aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
-rw-r--r--src/client/.soon0
-rw-r--r--src/genrevision/genrevision.cpp2
-rw-r--r--src/server/CMakeLists.txt37
-rw-r--r--src/server/authserver/Authentication/AuthCodes.h2
-rw-r--r--src/server/authserver/CMakeLists.txt118
-rw-r--r--src/server/authserver/Main.cpp21
-rw-r--r--src/server/authserver/Server/AuthSocket.cpp4
-rw-r--r--src/server/authserver/Server/AuthSocket.h2
-rw-r--r--src/server/authserver/Server/RealmSocket.h1
-rw-r--r--src/server/authserver/authserver.conf.dist (renamed from src/server/authserver/trinityrealm.conf.dist)4
-rw-r--r--src/server/authserver/authserver.ico (renamed from src/server/authserver/TrinityRealm.ico)bin136606 -> 136606 bytes
-rw-r--r--src/server/authserver/authserver.rc (renamed from src/server/authserver/TrinityRealm.rc)12
-rw-r--r--src/server/collision/BoundingIntervalHierarchy.cpp2
-rw-r--r--src/server/collision/BoundingIntervalHierarchy.h42
-rw-r--r--src/server/collision/CMakeLists.txt52
-rw-r--r--src/server/collision/Management/IVMapManager.h4
-rw-r--r--src/server/collision/Management/VMapFactory.cpp15
-rw-r--r--src/server/collision/Management/VMapManager2.cpp38
-rw-r--r--src/server/collision/Management/VMapManager2.h4
-rw-r--r--src/server/collision/Maps/MapTree.cpp121
-rw-r--r--src/server/collision/Maps/MapTree.h8
-rw-r--r--src/server/collision/Maps/TileAssembler.cpp30
-rw-r--r--src/server/collision/Models/ModelInstance.cpp30
-rw-r--r--src/server/collision/Models/ModelInstance.h2
-rw-r--r--src/server/collision/Models/WorldModel.cpp63
-rw-r--r--src/server/collision/Models/WorldModel.h4
-rw-r--r--src/server/collision/VMapDefinitions.h22
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp2
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h2
-rw-r--r--src/server/game/AI/CreatureAIFactory.h4
-rw-r--r--src/server/game/AI/CreatureAIImpl.h2
-rw-r--r--src/server/game/AI/CreatureAISelector.cpp9
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAI.cpp14
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAI.h2
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAIMgr.cpp17
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAIMgr.h5
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp10
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp40
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp24
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedGuardAI.cpp2
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedInstance.h10
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp2
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp8
-rw-r--r--src/server/game/Accounts/AccountMgr.h3
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp76
-rw-r--r--src/server/game/Achievements/AchievementMgr.h9
-rw-r--r--src/server/game/Addons/AddonMgr.cpp11
-rw-r--r--src/server/game/Addons/AddonMgr.h10
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.cpp28
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.h30
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp40
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h90
-rw-r--r--src/server/game/BattleGrounds/BattleGround.cpp20
-rw-r--r--src/server/game/BattleGrounds/BattleGroundMgr.cpp20
-rw-r--r--src/server/game/BattleGrounds/BattleGroundMgr.h11
-rw-r--r--src/server/game/BattleGrounds/Zones/BattleGroundAV.cpp4
-rw-r--r--src/server/game/BattleGrounds/Zones/BattleGroundEY.h4
-rw-r--r--src/server/game/BattleGrounds/Zones/BattleGroundSA.h2
-rw-r--r--src/server/game/BattleGrounds/Zones/BattleGroundWS.cpp14
-rw-r--r--src/server/game/BattleGrounds/Zones/BattleGroundWS.h4
-rw-r--r--src/server/game/CMakeLists.txt594
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp16
-rw-r--r--src/server/game/Chat/Channels/Channel.h4
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.cpp11
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.h5
-rw-r--r--src/server/game/Chat/Chat.cpp7
-rw-r--r--src/server/game/Chat/Chat.h3
-rw-r--r--src/server/game/Chat/Commands/Debugcmds.cpp2
-rw-r--r--src/server/game/Chat/Commands/Level0.cpp72
-rw-r--r--src/server/game/Chat/Commands/Level1.cpp14
-rw-r--r--src/server/game/Chat/Commands/Level2.cpp10
-rw-r--r--src/server/game/Chat/Commands/Level3.cpp52
-rw-r--r--src/server/game/Combat/HostileRefManager.h2
-rw-r--r--src/server/game/Combat/ThreatManager.cpp5
-rw-r--r--src/server/game/Combat/ThreatManager.h4
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp90
-rw-r--r--src/server/game/Conditions/ConditionMgr.h15
-rw-r--r--src/server/game/DataStores/DBCStores.cpp29
-rw-r--r--src/server/game/DataStores/DBCStores.h2
-rw-r--r--src/server/game/DataStores/DBCStructure.h33
-rw-r--r--src/server/game/DataStores/DBCfmt.h6
-rw-r--r--src/server/game/DungeonFinding/LFG.h2
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp7
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.h65
-rw-r--r--src/server/game/Entities/Corpse/Corpse.cpp6
-rw-r--r--src/server/game/Entities/Corpse/Corpse.h2
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp70
-rw-r--r--src/server/game/Entities/Creature/Creature.h24
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.cpp4
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.h5
-rw-r--r--src/server/game/Entities/Creature/GossipDef.cpp6
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.cpp6
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp10
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h14
-rw-r--r--src/server/game/Entities/Item/Container/Bag.cpp9
-rw-r--r--src/server/game/Entities/Item/Item.cpp31
-rw-r--r--src/server/game/Entities/Item/ItemEnchantmentMgr.cpp16
-rw-r--r--src/server/game/Entities/Item/ItemPrototype.h18
-rw-r--r--src/server/game/Entities/Object/Object.cpp87
-rw-r--r--src/server/game/Entities/Object/Object.h2
-rw-r--r--src/server/game/Entities/Object/ObjectDefines.h2
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateData.cpp2
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateFields.h2
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateMask.h6
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp18
-rw-r--r--src/server/game/Entities/Pet/Pet.h2
-rw-r--r--src/server/game/Entities/Player/Player.cpp481
-rw-r--r--src/server/game/Entities/Player/Player.h95
-rw-r--r--src/server/game/Entities/Player/SocialMgr.cpp6
-rw-r--r--src/server/game/Entities/Player/SocialMgr.h14
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp108
-rw-r--r--src/server/game/Entities/Transport/Transport.h41
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp402
-rw-r--r--src/server/game/Entities/Unit/Unit.h47
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.cpp21
-rw-r--r--src/server/game/Events/GameEventMgr.cpp17
-rw-r--r--src/server/game/Events/GameEventMgr.h10
-rw-r--r--src/server/game/Globals/GlobalEvents.cpp10
-rw-r--r--src/server/game/Globals/ObjectAccessor.cpp22
-rw-r--r--src/server/game/Globals/ObjectAccessor.h25
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp379
-rw-r--r--src/server/game/Globals/ObjectMgr.h51
-rw-r--r--src/server/game/Grids/Cells/Cell.h4
-rw-r--r--src/server/game/Grids/Grid.h9
-rw-r--r--src/server/game/Grids/GridDefines.h4
-rw-r--r--src/server/game/Grids/GridLoader.h2
-rw-r--r--src/server/game/Grids/GridRefManager.h2
-rw-r--r--src/server/game/Grids/GridReference.h2
-rw-r--r--src/server/game/Grids/GridStates.cpp2
-rw-r--r--src/server/game/Grids/NGrid.h13
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.cpp2
-rw-r--r--src/server/game/Grids/ObjectGridLoader.cpp2
-rw-r--r--src/server/game/Grids/ObjectGridLoader.h6
-rw-r--r--src/server/game/Groups/Group.cpp64
-rw-r--r--src/server/game/Groups/Group.h8
-rw-r--r--src/server/game/Groups/GroupRefManager.h2
-rw-r--r--src/server/game/Groups/GroupReference.h2
-rw-r--r--src/server/game/Guilds/Guild.cpp4
-rw-r--r--src/server/game/Instances/InstanceData.cpp10
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp36
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.h18
-rw-r--r--src/server/game/Loot/LootMgr.cpp9
-rw-r--r--src/server/game/Loot/LootMgr.h2
-rw-r--r--src/server/game/Mails/Mail.cpp4
-rw-r--r--src/server/game/Maps/Map.cpp161
-rw-r--r--src/server/game/Maps/Map.h14
-rw-r--r--src/server/game/Maps/MapInstanced.cpp6
-rw-r--r--src/server/game/Maps/MapManager.cpp99
-rw-r--r--src/server/game/Maps/MapManager.h27
-rw-r--r--src/server/game/Maps/MapRefManager.h2
-rw-r--r--src/server/game/Maps/MapReference.h2
-rw-r--r--src/server/game/Maps/MapUpdater.cpp2
-rw-r--r--src/server/game/Miscellaneous/Formulas.h7
-rw-r--r--src/server/game/Miscellaneous/Language.h3
-rw-r--r--src/server/game/Miscellaneous/SharedDefines.h35
-rw-r--r--src/server/game/Movement/DestinationHolder.h2
-rw-r--r--src/server/game/Movement/FollowerRefManager.h2
-rw-r--r--src/server/game/Movement/FollowerReference.h2
-rw-r--r--src/server/game/Movement/MotionMaster.cpp14
-rw-r--r--src/server/game/Movement/MovementGenerator.h8
-rw-r--r--src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp54
-rw-r--r--src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp81
-rw-r--r--src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h37
-rw-r--r--src/server/game/Movement/Waypoints/Path.h67
-rw-r--r--src/server/game/Movement/Waypoints/WaypointManager.cpp2
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp2
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.h2
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp3
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.h4
-rw-r--r--src/server/game/Pools/PoolMgr.cpp (renamed from src/server/game/Pools/PoolHandler.cpp)69
-rw-r--r--src/server/game/Pools/PoolMgr.h (renamed from src/server/game/Pools/PoolHandler.h)21
-rw-r--r--src/server/game/PrecompiledHeaders/NixCorePCH.cpp1
-rw-r--r--src/server/game/PrecompiledHeaders/ScriptPCH.cpp2
-rw-r--r--src/server/game/PrecompiledHeaders/ScriptPCH.h2
-rw-r--r--src/server/game/PrecompiledHeaders/WinCorePCH.cpp1
-rw-r--r--src/server/game/PrecompiledHeaders/WinCorePCH.h14
-rw-r--r--src/server/game/PrecompiledHeaders/gamePCH.cpp1
-rw-r--r--src/server/game/PrecompiledHeaders/gamePCH.h (renamed from src/server/game/PrecompiledHeaders/NixCorePCH.h)4
-rw-r--r--src/server/game/Quests/QuestDef.cpp10
-rw-r--r--src/server/game/Quests/QuestDef.h7
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp6
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp63
-rw-r--r--src/server/game/Scripting/ScriptMgr.h9
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp70
-rw-r--r--src/server/game/Server/Protocol/Handlers/AddonHandler.cpp9
-rw-r--r--src/server/game/Server/Protocol/Handlers/AddonHandler.h15
-rw-r--r--src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp4
-rw-r--r--src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp8
-rw-r--r--src/server/game/Server/Protocol/Handlers/ChatHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/GroupHandler.cpp30
-rw-r--r--src/server/game/Server/Protocol/Handlers/GuildHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/ItemHandler.cpp45
-rw-r--r--src/server/game/Server/Protocol/Handlers/MiscHandler.cpp24
-rw-r--r--src/server/game/Server/Protocol/Handlers/MovementHandler.cpp8
-rw-r--r--src/server/game/Server/Protocol/Handlers/NPCHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/QueryHandler.cpp8
-rw-r--r--src/server/game/Server/Protocol/Handlers/QuestHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/SkillHandler.cpp2
-rw-r--r--src/server/game/Server/Protocol/Handlers/SpellHandler.cpp4
-rw-r--r--src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp6
-rw-r--r--src/server/game/Server/Protocol/Handlers/TradeHandler.cpp499
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp26
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h6
-rw-r--r--src/server/game/Server/Protocol/WorldLog.cpp14
-rw-r--r--src/server/game/Server/Protocol/WorldLog.h10
-rw-r--r--src/server/game/Server/WorldSession.cpp5
-rw-r--r--src/server/game/Server/WorldSession.h4
-rw-r--r--src/server/game/Server/WorldSocket.cpp12
-rw-r--r--src/server/game/Server/WorldSocket.h2
-rw-r--r--src/server/game/Server/WorldSocketMgr.cpp14
-rw-r--r--src/server/game/Skills/SkillDiscovery.cpp3
-rw-r--r--src/server/game/Skills/SkillExtraItems.cpp2
-rw-r--r--src/server/game/Spells/Auras/SpellAuraDefines.h10
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp146
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h3
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp200
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.h2
-rw-r--r--src/server/game/Spells/Auras/SpellEffects.cpp458
-rw-r--r--src/server/game/Spells/Spell.cpp328
-rw-r--r--src/server/game/Spells/Spell.h16
-rw-r--r--src/server/game/Spells/SpellMgr.cpp227
-rw-r--r--src/server/game/Spells/SpellMgr.h31
-rw-r--r--src/server/game/Tools/PlayerDump.cpp4
-rw-r--r--src/server/game/Weather/Weather.cpp2
-rw-r--r--src/server/game/World/TimeMgr.cpp36
-rw-r--r--src/server/game/World/TimeMgr.h92
-rw-r--r--src/server/game/World/World.cpp120
-rw-r--r--src/server/game/World/World.h5
-rw-r--r--src/server/scripts/CMakeLists.txt675
-rw-r--r--src/server/scripts/Custom/custom_example.cpp28
-rw-r--r--src/server/scripts/Custom/custom_gossip_codebox.cpp26
-rw-r--r--src/server/scripts/Custom/npc_acherus_taxi.cpp19
-rw-r--r--src/server/scripts/Custom/npc_wyrmresttempel_taxi.cpp19
-rw-r--r--src/server/scripts/Custom/on_events.cpp19
-rw-r--r--src/server/scripts/Custom/test.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp63
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp59
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp61
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp61
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp57
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h20
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp38
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h25
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp29
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp38
-rw-r--r--src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/deadmines.h19
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h23
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp48
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp40
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp38
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.h22
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp36
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h20
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp44
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h20
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp37
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp25
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h20
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp36
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/scholomance.h20
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h20
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp36
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp48
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.h20
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h20
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp31
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp24
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp27
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h20
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp44
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp38
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp36
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp40
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp42
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp34
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.h20
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h20
-rw-r--r--src/server/scripts/EasternKingdoms/alterac_mountains.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/arathi_highlands.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/blasted_lands.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/boss_kruul.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/burning_steppes.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/dun_morogh.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/duskwood.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/elwynn_forest.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/eversong_woods.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/ghostlands.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/hinterlands.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/ironforge.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/loch_modan.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/redridge_mountains.cpp26
-rw-r--r--src/server/scripts/EasternKingdoms/searing_gorge.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/silvermoon_city.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/silverpine_forest.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/stormwind_city.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/tirisfal_glades.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/undercity.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/western_plaguelands.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/westfall.cpp28
-rw-r--r--src/server/scripts/EasternKingdoms/wetlands.cpp32
-rw-r--r--src/server/scripts/Examples/example_creature.cpp28
-rw-r--r--src/server/scripts/Examples/example_escort.cpp28
-rw-r--r--src/server/scripts/Examples/example_gossip_codebox.cpp28
-rw-r--r--src/server/scripts/Examples/example_misc.cpp28
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp35
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h20
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp33
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp33
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp35
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp32
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp36
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h16
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp30
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp33
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp33
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp33
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp33
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp33
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp33
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h31
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp35
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_chrono_lord_deja.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp38
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h20
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp44
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp48
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp28
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h20
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp28
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp28
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp30
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp28
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp27
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp29
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h25
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp25
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h23
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp30
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h26
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp28
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h18
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp32
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp28
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h20
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp28
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp34
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h20
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp25
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp28
-rw-r--r--src/server/scripts/Kalimdor/ashenvale.cpp36
-rw-r--r--src/server/scripts/Kalimdor/azshara.cpp28
-rw-r--r--src/server/scripts/Kalimdor/azuremyst_isle.cpp101
-rw-r--r--src/server/scripts/Kalimdor/bloodmyst_isle.cpp28
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp28
-rw-r--r--src/server/scripts/Kalimdor/darkshore.cpp28
-rw-r--r--src/server/scripts/Kalimdor/desolace.cpp28
-rw-r--r--src/server/scripts/Kalimdor/durotar.cpp35
-rw-r--r--src/server/scripts/Kalimdor/dustwallow_marsh.cpp28
-rw-r--r--src/server/scripts/Kalimdor/felwood.cpp28
-rw-r--r--src/server/scripts/Kalimdor/feralas.cpp28
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp28
-rw-r--r--src/server/scripts/Kalimdor/mulgore.cpp28
-rw-r--r--src/server/scripts/Kalimdor/orgrimmar.cpp28
-rw-r--r--src/server/scripts/Kalimdor/silithus.cpp28
-rw-r--r--src/server/scripts/Kalimdor/stonetalon_mountains.cpp28
-rw-r--r--src/server/scripts/Kalimdor/tanaris.cpp28
-rw-r--r--src/server/scripts/Kalimdor/teldrassil.cpp28
-rw-r--r--src/server/scripts/Kalimdor/the_barrens.cpp30
-rw-r--r--src/server/scripts/Kalimdor/thousand_needles.cpp28
-rw-r--r--src/server/scripts/Kalimdor/thunder_bluff.cpp28
-rw-r--r--src/server/scripts/Kalimdor/ungoro_crater.cpp34
-rw-r--r--src/server/scripts/Kalimdor/winterspring.cpp28
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h23
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp65
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp49
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp125
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp25
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h23
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp55
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp57
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp48
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp53
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp51
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp35
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp25
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp25
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp28
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp25
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.cpp25
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/trial_of_the_champion.h20
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp55
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp55
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp73
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp47
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h31
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp25
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h25
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h25
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp27
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h25
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp41
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_eck.cpp51
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp65
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp51
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp63
-rw-r--r--src/server/scripts/Northrend/Gundrak/gundrak.h31
-rw-r--r--src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp35
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp27
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp25
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp27
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp27
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp29
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp27
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp27
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_highlord_mograine.cpp179
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp28
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp25
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp25
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_noth.cpp27
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp27
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp25
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp25
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp25
-rw-r--r--src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp50
-rw-r--r--src/server/scripts/Northrend/Naxxramas/naxxramas.h23
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp19
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h17
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp19
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp47
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp45
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp51
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp59
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp19
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp19
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp29
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/nexus.h25
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp37
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp33
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp33
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp33
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp35
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp33
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.h17
-rw-r--r--src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp580
-rw-r--r--src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp39
-rw-r--r--src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h20
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp28
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp47
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp28
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp28
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h20
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp28
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp51
-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.cpp19
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp19
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h17
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp19
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_assembly_of_iron.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp1004
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp25
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp76
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h27
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp20
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp25
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp25
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp25
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp27
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp25
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h23
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp19
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp31
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp55
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp19
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp19
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h17
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp25
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp25
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp25
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp25
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp19
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h17
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp31
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_erekem.cpp30
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp51
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp30
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_moragg.cpp30
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp34
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp26
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp426
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp1163
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.h39
-rw-r--r--src/server/scripts/Northrend/borean_tundra.cpp30
-rw-r--r--src/server/scripts/Northrend/crystalsong_forest.cpp25
-rw-r--r--src/server/scripts/Northrend/dalaran.cpp27
-rw-r--r--src/server/scripts/Northrend/dragonblight.cpp28
-rw-r--r--src/server/scripts/Northrend/grizzly_hills.cpp28
-rw-r--r--src/server/scripts/Northrend/howling_fjord.cpp26
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp28
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp26
-rw-r--r--src/server/scripts/Northrend/storm_peaks.cpp26
-rw-r--r--src/server/scripts/Northrend/zuldrak.cpp25
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp30
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h20
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp36
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h20
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.h20
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp36
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp34
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp44
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp28
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp34
-rw-r--r--src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp36
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp49
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h20
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp32
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h20
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp28
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp28
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp28
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp28
-rw-r--r--src/server/scripts/Outland/GruulsLair/gruuls_lair.h20
-rw-r--r--src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h20
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp172
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h20
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp34
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp34
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h20
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp28
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h20
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp34
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp46
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/the_eye.h20
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp34
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp34
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp34
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h18
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h20
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp28
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp34
-rw-r--r--src/server/scripts/Outland/blades_edge_mountains.cpp28
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp28
-rw-r--r--src/server/scripts/Outland/boss_doomwalker.cpp34
-rw-r--r--src/server/scripts/Outland/hellfire_peninsula.cpp30
-rw-r--r--src/server/scripts/Outland/nagrand.cpp30
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp30
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp30
-rw-r--r--src/server/scripts/Outland/shattrath_city.cpp28
-rw-r--r--src/server/scripts/Outland/terokkar_forest.cpp28
-rw-r--r--src/server/scripts/Outland/zangarmarsh.cpp28
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp28
-rw-r--r--src/server/scripts/World/boss_emeriss.cpp30
-rw-r--r--src/server/scripts/World/boss_lethon.cpp28
-rw-r--r--src/server/scripts/World/boss_taerar.cpp30
-rw-r--r--src/server/scripts/World/boss_ysondre.cpp28
-rw-r--r--src/server/scripts/World/go_scripts.cpp58
-rw-r--r--src/server/scripts/World/guards.cpp28
-rw-r--r--src/server/scripts/World/item_scripts.cpp30
-rw-r--r--src/server/scripts/World/mob_generic_creature.cpp35
-rw-r--r--src/server/scripts/World/npc_innkeeper.cpp25
-rw-r--r--src/server/scripts/World/npc_professions.cpp30
-rw-r--r--src/server/scripts/World/npc_taxi.cpp28
-rw-r--r--src/server/scripts/World/npcs_special.cpp40
-rw-r--r--src/server/shared/CMakeLists.txt143
-rw-r--r--src/server/shared/Common.h10
-rw-r--r--src/server/shared/CompilerDefs.h2
-rw-r--r--src/server/shared/Configuration/CMakeLists.txt22
-rw-r--r--src/server/shared/Configuration/Config.cpp3
-rw-r--r--src/server/shared/Configuration/Config.h9
-rw-r--r--src/server/shared/Cryptography/ARC4.cpp2
-rw-r--r--src/server/shared/Cryptography/Authentication/AuthCrypt.cpp6
-rw-r--r--src/server/shared/Cryptography/Authentication/AuthCrypt.h2
-rw-r--r--src/server/shared/Cryptography/BigNumber.cpp2
-rw-r--r--src/server/shared/Cryptography/CMakeLists.txt27
-rw-r--r--src/server/shared/Cryptography/HMACSHA1.cpp2
-rw-r--r--src/server/shared/Cryptography/MD5.c2
-rw-r--r--src/server/shared/Cryptography/SHA1.cpp4
-rw-r--r--src/server/shared/DataStores/DBCFileLoader.h2
-rw-r--r--src/server/shared/DataStores/DBCStore.h2
-rw-r--r--src/server/shared/Database/CMakeLists.txt31
-rw-r--r--src/server/shared/Database/Database.cpp15
-rw-r--r--src/server/shared/Database/Database.h9
-rw-r--r--src/server/shared/Database/DatabaseEnv.h4
-rw-r--r--src/server/shared/Database/PreparedStatements.cpp93
-rw-r--r--src/server/shared/Database/PreparedStatements.h30
-rw-r--r--src/server/shared/Database/QueryResult.h2
-rw-r--r--src/server/shared/Database/SQLStorageImpl.h6
-rw-r--r--src/server/shared/Database/SqlDelayThread.h2
-rw-r--r--src/server/shared/Database/SqlOperations.h4
-rw-r--r--src/server/shared/Debugging/MemoryLeaks.cpp3
-rw-r--r--src/server/shared/Debugging/MemoryLeaks.h7
-rw-r--r--src/server/shared/Define.h2
-rw-r--r--src/server/shared/Dynamic/CountedReference/Reference.h100
-rw-r--r--src/server/shared/Dynamic/CountedReference/ReferenceHolder.h42
-rw-r--r--src/server/shared/Dynamic/CountedReference/ReferenceImpl.h133
-rw-r--r--src/server/shared/Dynamic/FactoryHolder.h12
-rw-r--r--src/server/shared/Dynamic/LinkedReference/RefManager.h4
-rw-r--r--src/server/shared/Dynamic/LinkedReference/Reference.h2
-rw-r--r--src/server/shared/Dynamic/ObjectRegistry.h14
-rw-r--r--src/server/shared/Dynamic/TypeContainer.h6
-rw-r--r--src/server/shared/Dynamic/TypeContainerFunctions.h4
-rw-r--r--src/server/shared/Dynamic/TypeContainerVisitor.h4
-rw-r--r--src/server/shared/Dynamic/UnorderedMap.h12
-rw-r--r--src/server/shared/Logging/Log.cpp81
-rw-r--r--src/server/shared/Logging/Log.h16
-rw-r--r--src/server/shared/Packets/ByteBuffer.h4
-rw-r--r--src/server/shared/Policies/CreationPolicy.h110
-rw-r--r--src/server/shared/Policies/ObjectLifeTime.cpp36
-rw-r--r--src/server/shared/Policies/ObjectLifeTime.h53
-rw-r--r--src/server/shared/Policies/Singleton.h65
-rw-r--r--src/server/shared/Policies/SingletonImp.h93
-rw-r--r--src/server/shared/Policies/ThreadingModel.h130
-rw-r--r--src/server/shared/SystemConfig.h2
-rw-r--r--src/server/shared/Threading/LockedQueue.h2
-rw-r--r--src/server/shared/Utilities/ByteConverter.h2
-rw-r--r--src/server/shared/Utilities/EventProcessor.h2
-rw-r--r--src/server/shared/Utilities/ProgressBar.h2
-rw-r--r--src/server/shared/Utilities/ServiceWin32.cpp7
-rw-r--r--src/server/shared/Utilities/ServiceWin32.h4
-rw-r--r--src/server/shared/Utilities/Timer.h2
-rw-r--r--src/server/shared/Utilities/Util.cpp9
-rw-r--r--src/server/worldserver/CMakeLists.txt193
-rw-r--r--src/server/worldserver/CommandLine/CliRunnable.cpp2
-rw-r--r--src/server/worldserver/Main.cpp10
-rw-r--r--src/server/worldserver/Master.cpp75
-rw-r--r--src/server/worldserver/Master.h4
-rw-r--r--src/server/worldserver/RemoteAccess/RASocket.cpp4
-rw-r--r--src/server/worldserver/RemoteAccess/RASocket.h2
-rw-r--r--src/server/worldserver/WorldThread/WorldRunnable.cpp6
-rw-r--r--src/server/worldserver/worldserver.conf.dist (renamed from src/server/worldserver/trinitycore.conf.dist)14
-rw-r--r--src/server/worldserver/worldserver.ico (renamed from src/server/worldserver/TrinityCore.ico)bin136606 -> 136606 bytes
-rw-r--r--src/server/worldserver/worldserver.rc (renamed from src/server/worldserver/TrinityCore.rc)12
-rw-r--r--src/tools/CMakeLists.txt10
-rw-r--r--src/tools/ExtractorToolsVC90.sln80
-rw-r--r--src/tools/map_extractor/CMakeLists.txt36
-rw-r--r--src/tools/map_extractor/README.linux7
-rw-r--r--src/tools/map_extractor/System.cpp127
-rw-r--r--src/tools/map_extractor/VC90/VC90_mapextractor.vcproj (renamed from src/tools/map_extractor/VC90_ad.vcproj)157
-rw-r--r--src/tools/map_extractor/VC90_AD.sln19
-rw-r--r--src/tools/map_extractor/adt.cpp420
-rw-r--r--src/tools/map_extractor/adt.h333
-rw-r--r--src/tools/map_extractor/dbcfile.cpp2
-rw-r--r--src/tools/map_extractor/loadlib.cpp (renamed from src/tools/map_extractor/loadlib/loadlib.cpp)5
-rw-r--r--src/tools/map_extractor/loadlib/CMakeLists.txt13
-rw-r--r--src/tools/map_extractor/loadlib/adt.cpp131
-rw-r--r--src/tools/map_extractor/loadlib/adt.h289
-rw-r--r--src/tools/map_extractor/loadlib/loadlib.h28
-rw-r--r--src/tools/map_extractor/mpq_libmpq.cpp61
-rw-r--r--src/tools/map_extractor/mpq_libmpq04.h (renamed from src/tools/map_extractor/mpq_libmpq.h)47
-rw-r--r--src/tools/map_extractor/wdt.cpp (renamed from src/tools/map_extractor/loadlib/wdt.cpp)0
-rw-r--r--src/tools/map_extractor/wdt.h (renamed from src/tools/map_extractor/loadlib/wdt.h)0
-rw-r--r--src/tools/vmap3_assembler/CMakeLists.txt107
-rw-r--r--src/tools/vmap3_assembler/VC90/VC90_vmap3assembler.vcproj (renamed from src/tools/vmap3_assembler/VC90/vmap_assembler.vcproj)128
-rw-r--r--src/tools/vmap3_assembler/VMapAssembler.cpp4
-rw-r--r--src/tools/vmap3_assembler/splitConfig.txt21
-rw-r--r--src/tools/vmap3_assembler/vmap_assemblerVC90.sln42
-rw-r--r--src/tools/vmap3_extractor/CMakeLists.txt35
-rw-r--r--src/tools/vmap3_extractor/VC90/VC90_vmap3extractor.vcproj276
-rw-r--r--src/tools/vmap3_extractor/adtfile.cpp11
-rw-r--r--src/tools/vmap3_extractor/dbcfile.h22
-rw-r--r--src/tools/vmap3_extractor/loadlib/loadlib.h2
-rw-r--r--src/tools/vmap3_extractor/model.cpp2
-rw-r--r--src/tools/vmap3_extractor/mpq_libmpq.cpp2
-rw-r--r--src/tools/vmap3_extractor/mpq_libmpq04.h3
-rw-r--r--src/tools/vmap3_extractor/vmapexport.cpp55
-rw-r--r--src/tools/vmap3_extractor/vmapexport.h2
-rw-r--r--src/tools/vmap3_extractor/wdtfile.cpp9
-rw-r--r--src/tools/vmap3_extractor/win/vmapExtractor3_VC90.sln19
-rw-r--r--src/tools/vmap3_extractor/wmo.cpp5
902 files changed, 18197 insertions, 14829 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 205a3961677..b7fd8c75336 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,16 @@
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
add_subdirectory(server)
if(DO_TOOLS)
- add_subdirectory(tools)
+ add_subdirectory(tools)
endif(DO_TOOLS)
diff --git a/src/client/.soon b/src/client/.soon
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/src/client/.soon
+++ /dev/null
diff --git a/src/genrevision/genrevision.cpp b/src/genrevision/genrevision.cpp
index 7e304b25a7e..71ca1553689 100644
--- a/src/genrevision/genrevision.cpp
+++ b/src/genrevision/genrevision.cpp
@@ -203,6 +203,7 @@ void extractDataFromGit(FILE* EntriesFile, std::string path, bool url, RawData&
strcpy(data.rev_str,hash_str);
strcpy(data.hash_str,"*");
+
time_t rev_time = 0;
// extracting date/time
FILE* LogFile = fopen((path+".git/logs/HEAD").c_str(), "r");
@@ -449,6 +450,7 @@ int main(int argc, char **argv)
res = extractDataFromArchive(path+"_hg_archival.txt",path,use_url,data);
}
+
else if(hg_prefered)
{
// HG data
diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt
index fa0cd1acce2..5d9b3b2ef9f 100644
--- a/src/server/CMakeLists.txt
+++ b/src/server/CMakeLists.txt
@@ -1,7 +1,30 @@
-add_subdirectory(game)
-if (DO_SCRIPTS)
- add_subdirectory(scripts)
-endif (DO_SCRIPTS)
-add_subdirectory(shared)
-add_subdirectory(worldserver)
-add_subdirectory(authserver)
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+if(DO_WORLDSERVER)
+ add_subdirectory(shared)
+ add_subdirectory(game)
+ add_subdirectory(collision)
+ if(DO_SCRIPTS)
+ add_subdirectory(scripts)
+ endif()
+ add_subdirectory(worldserver)
+else()
+ if(DO_TOOLS)
+ add_subdirectory(collision)
+ endif()
+endif()
+
+if (DO_AUTHSERVER)
+ if(NOT DO_WORLDSERVER)
+ add_subdirectory(shared)
+ endif()
+ add_subdirectory(authserver)
+endif()
diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h
index eb6e4abfb08..802b7b78f1b 100644
--- a/src/server/authserver/Authentication/AuthCodes.h
+++ b/src/server/authserver/Authentication/AuthCodes.h
@@ -80,7 +80,7 @@ enum LoginResult
//3.3.2 build 11403
//3.3.3a build 11723
-#define POST_BC_ACCEPTED_CLIENT_BUILD {11723, 11403, 11159, 10571, 10505, 10146, 9947, 8606, 0}
+#define POST_BC_ACCEPTED_CLIENT_BUILD {12340, 11723, 11403, 11159, 10571, 10505, 10146, 9947, 8606, 0}
#define PRE_BC_ACCEPTED_CLIENT_BUILD {5875, 6005, 0}
#define POST_BC_EXP_FLAG 0x2
diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt
index 5a993be5377..82b36c8ab3e 100644
--- a/src/server/authserver/CMakeLists.txt
+++ b/src/server/authserver/CMakeLists.txt
@@ -1,60 +1,88 @@
-########### next target ###############
-
-SET(trinity-realm_SRCS
-AuthCodes.cpp
-AuthCodes.h
-AuthSocket.cpp
-AuthSocket.h
-Main.cpp
-RealmList.cpp
-RealmList.h
-RealmSocket.h
-RealmSocket.cpp
-RealmAcceptor.h
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+########### authserver ###############
+
+set(authserver_SRCS
+ Authentication/AuthCodes.cpp
+ Realms/RealmList.cpp
+ Server/AuthSocket.cpp
+ Server/RealmSocket.cpp
+ Main.cpp
)
include_directories(
${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src/server/shared
${CMAKE_SOURCE_DIR}/src/server/shared/Database
- ${CMAKE_SOURCE_DIR}/src/server/framework
- ${MYSQL_INCLUDE_DIR}
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography/Authentication
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Logging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
+ ${CMAKE_SOURCE_DIR}/src/server/authserver
+ ${CMAKE_SOURCE_DIR}/src/server/authserver/Authentication
+ ${CMAKE_SOURCE_DIR}/src/server/authserver/Realms
+ ${CMAKE_SOURCE_DIR}/src/server/authserver/Server
)
-SET(trinity-realm_LINK_FLAGS "")
+set(authserver_LINK_FLAGS "")
-add_executable(trinity-realm ${trinity-realm_SRCS})
-add_definitions(
--D_TRINITY_REALM_CONFIG='"${CONF_DIR}/trinityrealm.conf"'
-)
-IF (DO_MYSQL)
- SET(trinity-realm_LINK_FLAGS "-pthread ${trinity-realm_LINK_FLAGS}")
-ENDIF(DO_MYSQL)
-
-IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
- SET(trinity-realm_LINK_FLAGS "-framework Carbon ${trinity-realm_LINK_FLAGS}")
-ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-
-SET_TARGET_PROPERTIES(trinity-realm PROPERTIES LINK_FLAGS "${trinity-realm_LINK_FLAGS}")
-
-target_link_libraries(
-trinity-realm
-shared
-trinityframework
-trinitysockets
-trinitydatabase
-trinityauth
-trinityconfig
-zlib
-${SSLLIB}
-${MYSQL_LIBRARIES}
-${OSX_LIBS}
+add_executable(authserver
+ ${authserver_SRCS}
)
-install(TARGETS trinity-realm DESTINATION bin)
+add_dependencies(authserver revision.h)
+
+if( NOT WIN32 )
+ add_definitions(-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"')
+endif()
+
+if( UNIX )
+ set(authserver_LINK_FLAGS "-pthread ${authserver_LINK_FLAGS}")
+endif()
+
+if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+ set(authserver_LINK_FLAGS "-framework Carbon ${authserver_LINK_FLAGS}")
+endif()
+set_target_properties(authserver PROPERTIES LINK_FLAGS "${authserver_LINK_FLAGS}")
-########### install files ###############
+if( WIN32 )
+ target_link_libraries(
+ authserver
+ shared
+ trinitydatabase
+ trinityauth
+ trinityconfig
+ ${MYSQL_LIBRARY}
+ ${OPENSSL_LIBRARIES}
+ ${OPENSSL_EXTRA_LIBRARIES}
+ )
+else()
+ target_link_libraries(
+ authserver
+ shared
+ trinitydatabase
+ trinityauth
+ trinityconfig
+ ${MYSQL_LIBRARY}
+ ${OPENSSL_LIBRARIES}
+ ${OSX_LIBS}
+ )
+endif()
-install(FILES trinityrealm.conf.dist DESTINATION etc)
+if( UNIX )
+ install(TARGETS authserver DESTINATION bin)
+ install(FILES authserver.conf.dist DESTINATION etc)
+endif()
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index 09bae4908e0..28757e914e3 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -24,8 +24,9 @@
#include "Common.h"
#include "Database/DatabaseEnv.h"
+#include "Database/PreparedStatements.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "Log.h"
#include "SystemConfig.h"
#include "Util.h"
@@ -42,10 +43,10 @@
#include <openssl/crypto.h>
#ifndef _TRINITY_REALM_CONFIG
-# define _TRINITY_REALM_CONFIG "TrinityRealm.conf"
+# define _TRINITY_REALM_CONFIG "authserver.conf"
#endif //_TRINITY_REALM_CONFIG
-#ifdef WIN32
+#ifdef _WIN32
#include "ServiceWin32.h"
char serviceName[] = "TrinityRealm";
char serviceLongName[] = "Trinity realm service";
@@ -92,7 +93,7 @@ void usage(const char *prog)
{
sLog.outString("Usage: \n %s [<options>]\n"
" -c config_file use config_file as configuration file\n\r"
- #ifdef WIN32
+ #ifdef _WIN32
" Running as service functions:\n\r"
" --service run as service\n\r"
" -s install install service\n\r"
@@ -122,7 +123,7 @@ extern int main(int argc, char **argv)
cfg_file = argv[c];
}
- #ifdef WIN32
+ #ifdef _WIN32
////////////
//Services//
////////////
@@ -243,7 +244,7 @@ extern int main(int argc, char **argv)
#endif /* _WIN32 */();
///- Handle affinity for multiple processors and process priority on Windows
- #ifdef WIN32
+ #ifdef _WIN32
{
HANDLE hProcess = GetCurrentProcess();
@@ -313,9 +314,9 @@ extern int main(int argc, char **argv)
{
loopCounter = 0;
sLog.outDetail("Ping MySQL to keep connection alive");
- LoginDatabase.Query("SELECT 1 FROM realmlist LIMIT 1");
+ sPreparedStatement.Query(&LoginDatabase, "auth_ping");
}
-#ifdef WIN32
+#ifdef _WIN32
if (m_ServiceStatus == 0) stopEvent = true;
while (m_ServiceStatus == 2) Sleep(1000);
#endif
@@ -345,6 +346,10 @@ bool StartDB()
return false;
}
LoginDatabase.ThreadStart();
+
+ uint32 count = 0;
+ sPreparedStatement.LoadAuthserver(&LoginDatabase, count);
+ sLog.outString("Loaded %u prepared MySQL statements for auth DB.", count);
return true;
}
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index cc293097977..c33f84a9669 100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -25,13 +25,13 @@
#include "Common.h"
#include "Database/DatabaseEnv.h"
#include "ByteBuffer.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "Log.h"
#include "RealmList.h"
#include "AuthSocket.h"
#include "AuthCodes.h"
#include <openssl/md5.h>
-#include "Auth/Sha1.h"
+#include "SHA1.h"
//#include "Util.h" -- for commented utf8ToUpperOnlyLatin
extern DatabaseType LoginDatabase;
diff --git a/src/server/authserver/Server/AuthSocket.h b/src/server/authserver/Server/AuthSocket.h
index bfd0fa4fdca..0ad40b6930b 100644
--- a/src/server/authserver/Server/AuthSocket.h
+++ b/src/server/authserver/Server/AuthSocket.h
@@ -26,7 +26,7 @@
#define _AUTHSOCKET_H
#include "Common.h"
-#include "Auth/BigNumber.h"
+#include "BigNumber.h"
#include "RealmSocket.h"
diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h
index 13be8327533..8749fba9def 100644
--- a/src/server/authserver/Server/RealmSocket.h
+++ b/src/server/authserver/Server/RealmSocket.h
@@ -25,7 +25,6 @@
#ifndef __REALMSOCKET_H__
#define __REALMSOCKET_H__
-#include <ace/Basic_Types.h>
#include <ace/Synch_Traits.h>
#include <ace/Svc_Handler.h>
#include <ace/SOCK_Stream.h>
diff --git a/src/server/authserver/trinityrealm.conf.dist b/src/server/authserver/authserver.conf.dist
index e98b9386878..33e2db43df3 100644
--- a/src/server/authserver/trinityrealm.conf.dist
+++ b/src/server/authserver/authserver.conf.dist
@@ -125,14 +125,14 @@
#
###############################################################################
-LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;realmd"
+LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"
LogsDir = ""
MaxPingTime = 30
RealmServerPort = 3724
BindIP = "0.0.0.0"
PidFile = ""
LogLevel = 0
-LogFile = "realmd.log"
+LogFile = "auth.log"
LogTimestamp = 0
LogFileLevel = 0
LogColors = ""
diff --git a/src/server/authserver/TrinityRealm.ico b/src/server/authserver/authserver.ico
index da318f48a8c..da318f48a8c 100644
--- a/src/server/authserver/TrinityRealm.ico
+++ b/src/server/authserver/authserver.ico
Binary files differ
diff --git a/src/server/authserver/TrinityRealm.rc b/src/server/authserver/authserver.rc
index dfc548305fd..74ce7f43858 100644
--- a/src/server/authserver/TrinityRealm.rc
+++ b/src/server/authserver/authserver.rc
@@ -36,7 +36,7 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_APPICON ICON "TrinityRealm.ico"
+IDI_APPICON ICON "authserver.ico"
/////////////////////////////////////////////////////////////////////////////
// Neutre (Par défaut système) resources
@@ -69,12 +69,12 @@ BEGIN
BEGIN
BLOCK "080004b0"
BEGIN
- VALUE "FileDescription", "TrinityRealm"
+ VALUE "FileDescription", "authserver"
VALUE "FileVersion", STRFILEVER
- VALUE "InternalName", "TrinityRealm"
- VALUE "LegalCopyright", "Copyright (C) 2008-2009"
- VALUE "OriginalFilename", "TrinityRealm.exe"
- VALUE "ProductName", "TrinityRealm"
+ VALUE "InternalName", "authserver"
+ VALUE "LegalCopyright", "Copyright (C) 2008-2010"
+ VALUE "OriginalFilename", "authserver.exe"
+ VALUE "ProductName", "authserver"
VALUE "ProductVersion", STRPRODUCTVER
END
END
diff --git a/src/server/collision/BoundingIntervalHierarchy.cpp b/src/server/collision/BoundingIntervalHierarchy.cpp
index 4bd6b3c701e..7bb44a97e86 100644
--- a/src/server/collision/BoundingIntervalHierarchy.cpp
+++ b/src/server/collision/BoundingIntervalHierarchy.cpp
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "BIH.h"
+#include "BoundingIntervalHierarchy.h"
void BIH::buildHierarchy(std::vector<uint32> &tempTree, buildData &dat, BuildStats &stats)
{
diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h
index 15ae90c23eb..1e1955641cf 100644
--- a/src/server/collision/BoundingIntervalHierarchy.h
+++ b/src/server/collision/BoundingIntervalHierarchy.h
@@ -19,11 +19,11 @@
#ifndef _BIH_H
#define _BIH_H
-#include <G3D/Vector3.h>
-#include <G3D/Ray.h>
-#include <G3D/AABox.h>
+#include "G3D/Vector3.h"
+#include "G3D/Ray.h"
+#include "G3D/AABox.h"
-#include <Platform/Define.h>
+#include "Define.h"
#include <stdexcept>
#include <vector>
@@ -116,32 +116,36 @@ class BIH
template<typename RayCallback>
void intersectRay(const Ray &r, RayCallback& intersectCallback, float &maxDist, bool stopAtFirst=false) const
{
- float intervalMin = 0.f;
- float intervalMax = maxDist;
+ float intervalMin = -1.f;
+ float intervalMax = -1.f;
Vector3 org = r.origin();
Vector3 dir = r.direction();
Vector3 invDir;
- float t1, t2;
- for(int i=0; i<3; ++i)
+ for (int i=0; i<3; ++i)
{
invDir[i] = 1.f / dir[i];
- t1 = (bounds.low()[i] - org[i]) * invDir[i];
- t2 = (bounds.high()[i] - org[i]) * invDir[i];
- if (invDir[i] > 0) {
+ if (dir[i] != 0.f)
+ {
+ float t1 = (bounds.low()[i] - org[i]) * invDir[i];
+ float t2 = (bounds.high()[i] - org[i]) * invDir[i];
+ if (t1 > t2)
+ std::swap(t1, t2);
if (t1 > intervalMin)
intervalMin = t1;
- if (t2 < intervalMax)
+ if (t2 < intervalMax || intervalMax < 0.f)
intervalMax = t2;
- } else {
- if (t2 > intervalMin)
- intervalMin = t2;
- if (t1 < intervalMax)
- intervalMax = t1;
+ // intervalMax can only become smaller for other axis,
+ // and intervalMin only larger respectively, so stop early
+ if (intervalMax <= 0 || intervalMin >= maxDist)
+ return;
}
- if (intervalMin > intervalMax)
- return;
}
+ if (intervalMin > intervalMax)
+ return;
+ intervalMin = std::max(intervalMin, 0.f);
+ intervalMax = std::min(intervalMax, maxDist);
+
uint32 offsetFront[3];
uint32 offsetBack[3];
uint32 offsetFront3[3];
diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt
index 7d865d354e7..4749d88b100 100644
--- a/src/server/collision/CMakeLists.txt
+++ b/src/server/collision/CMakeLists.txt
@@ -1,30 +1,38 @@
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-########### next target ###############
+########### collision ###############
-SET(vmaps_STAT_SRCS
- BIH.h
- BIH.cpp
- IVMapManager.h
- MapTree.cpp
- MapTree.h
- ModelInstance.cpp
- ModelInstance.h
- TileAssembler.cpp
- TileAssembler.h
- VMapDefinitions.h
- VMapFactory.cpp
- VMapFactory.h
- VMapManager2.cpp
- VMapManager2.h
- VMapTools.h
- WorldModel.cpp
- WorldModel.h
+set(collision_STAT_SRCS
+ BoundingIntervalHierarchy.cpp
+ Maps/MapTree.cpp
+ Maps/TileAssembler.cpp
+ Models/ModelInstance.cpp
+ Models/WorldModel.cpp
+ Management/VMapFactory.cpp
+ Management/VMapManager2.cpp
)
include_directories(
${ACE_INCLUDE_DIR}
- ${CMAKE_SOURCE_DIR}/src/server/framework
- ${CMAKE_SOURCE_DIR}/dep/include/g3dlite
+ ${CMAKE_SOURCE_DIR}/externals/g3dlite
+ ${CMAKE_SOURCE_DIR}/externals/mysql
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Logging
+ ${CMAKE_SOURCE_DIR}/src/server/collision
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Management
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Models
+ ${CMAKE_BINARY_DIR}
)
-add_library(vmaps STATIC ${vmaps_STAT_SRCS})
+add_library(collision STATIC ${collision_STAT_SRCS})
diff --git a/src/server/collision/Management/IVMapManager.h b/src/server/collision/Management/IVMapManager.h
index 00629eb122c..6a0e7179fa7 100644
--- a/src/server/collision/Management/IVMapManager.h
+++ b/src/server/collision/Management/IVMapManager.h
@@ -19,8 +19,8 @@
#ifndef _IVMAPMANAGER_H
#define _IVMAPMANAGER_H
-#include<string>
-#include <Platform/Define.h>
+#include <string>
+#include "Define.h"
//===========================================================
diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp
index 331acbace47..561bf0dfa02 100644
--- a/src/server/collision/Management/VMapFactory.cpp
+++ b/src/server/collision/Management/VMapFactory.cpp
@@ -122,15 +122,10 @@ namespace VMAP
// delete all internal data structures
void VMapFactory::clear()
{
- if(iIgnoreSpellIds)
- {
- delete iIgnoreSpellIds;
- iIgnoreSpellIds = NULL;
- }
- if(gVMapManager)
- {
- delete gVMapManager;
- gVMapManager = NULL;
- }
+ delete iIgnoreSpellIds;
+ iIgnoreSpellIds = NULL;
+
+ delete gVMapManager;
+ gVMapManager = NULL;
}
}
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp
index 1e8a84aee52..61b202c9342 100644
--- a/src/server/collision/Management/VMapManager2.cpp
+++ b/src/server/collision/Management/VMapManager2.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
- * 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
@@ -25,6 +25,7 @@
#include "ModelInstance.h"
#include "WorldModel.h"
#include "VMapDefinitions.h"
+#include "Log.h"
using G3D::Vector3;
@@ -56,7 +57,7 @@ namespace VMAP
Vector3 VMapManager2::convertPositionToInternalRep(float x, float y, float z) const
{
Vector3 pos;
- const float mid = 0.5 * 64.0 * 533.33333333f;
+ const float mid = 0.5f * 64.0f * 533.33333333f;
pos.x = mid - x;
pos.y = mid - y;
pos.z = z;
@@ -69,7 +70,7 @@ namespace VMAP
Vector3 VMapManager2::convertPositionToMangosRep(float x, float y, float z) const
{
Vector3 pos;
- const float mid = 0.5 * 64.0 * 533.33333333f;
+ const float mid = 0.5f * 64.0f * 533.33333333f;
pos.x = mid - x;
pos.y = mid - y;
pos.z = z;
@@ -109,7 +110,7 @@ namespace VMAP
ss2 >> map_num;
if (map_num >= 0)
{
- std::cout << "ingoring Map " << map_num << " for VMaps\n";
+ sLog.outDebug("Ignoring Map %i for VMaps", map_num);
iIgnoreMapIds[map_num] = true;
// unload map in case it is loaded
unloadMap(map_num);
@@ -279,6 +280,7 @@ namespace VMAP
if (instanceTree->second->GetLocationInfo(pos, info))
{
floor = info.ground_Z;
+ ASSERT(floor < std::numeric_limits<float>::max());
type = info.hitModel->GetLiquidType();
if (ReqLiquidType && !(type & ReqLiquidType))
return false;
@@ -299,11 +301,11 @@ namespace VMAP
WorldModel *worldmodel = new WorldModel();
if (!worldmodel->readFile(basepath + filename + ".vmo"))
{
- std::cout << "VMapManager2: could not load '" << basepath << filename << ".vmo'!\n";
+ sLog.outError("VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
delete worldmodel;
return NULL;
}
- std::cout << "VMapManager2: loading file '" << basepath << filename << "'.\n";
+ sLog.outDebug("VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str());
model = iLoadedModelFiles.insert(std::pair<std::string, ManagedModel>(filename, ManagedModel())).first;
model->second.setModel(worldmodel);
}
@@ -316,12 +318,12 @@ namespace VMAP
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
{
- std::cout << "VMapManager2: trying to unload non-loaded file '" << filename << "'!\n";
+ sLog.outError("VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
return;
}
if( model->second.decRefCount() == 0)
{
- std::cout << "VMapManager2: unloading file '" << filename << "'.\n";
+ sLog.outDebug("VMapManager2: unloading file '%s'", filename.c_str());
delete model->second.getModel();
iLoadedModelFiles.erase(model);
}
diff --git a/src/server/collision/Management/VMapManager2.h b/src/server/collision/Management/VMapManager2.h
index 5f03b87b07f..953a8f11fa7 100644
--- a/src/server/collision/Management/VMapManager2.h
+++ b/src/server/collision/Management/VMapManager2.h
@@ -20,8 +20,8 @@
#define _VMAPMANAGER2_H
#include "IVMapManager.h"
-#include "Utilities/UnorderedMap.h"
-#include "Platform/Define.h"
+#include "Dynamic/UnorderedMap.h"
+#include "Define.h"
#include <G3D/Vector3.h>
//===========================================================
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index 8c77ee109f3..b47e34b2b72 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -1,29 +1,37 @@
/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
- * 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "MapTree.h"
#include "ModelInstance.h"
#include "VMapManager2.h"
#include "VMapDefinitions.h"
+#include "Log.h"
#include <string>
#include <sstream>
#include <iomanip>
+#include <limits>
+
+#ifndef NO_CORE_FUNCS
+ #include "Errors.h"
+#else
+ #define ASSERT(x)
+#endif
using G3D::Vector3;
@@ -33,13 +41,18 @@ namespace VMAP
class MapRayCallback
{
public:
- MapRayCallback(ModelInstance *val): prims(val) {}
- ModelInstance *prims;
+ MapRayCallback(ModelInstance *val): prims(val), hit(false) {}
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool pStopAtFirstHit=true)
{
- return prims[entry].intersectRay(ray, distance, pStopAtFirstHit);
- //std::cout << "trying to intersect '" << entity->name << "'\n";
+ bool result = prims[entry].intersectRay(ray, distance, pStopAtFirstHit);
+ if (result)
+ hit = true;
+ return result;
}
+ bool didHit() { return hit; }
+ protected:
+ ModelInstance *prims;
+ bool hit;
};
class AreaInfoCallback
@@ -49,7 +62,7 @@ namespace VMAP
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
- std::cout << "trying to intersect '" << prims[entry].name << "'\n";
+ sLog.outDebug("AreaInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
#endif
prims[entry].intersectPoint(point, aInfo);
}
@@ -65,7 +78,7 @@ namespace VMAP
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
- std::cout << "trying to intersect '" << prims[entry].name << "'\n";
+ sLog.outDebug("LocationInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
#endif
if (prims[entry].GetLocationInfo(point, locInfo))
result = true;
@@ -113,7 +126,7 @@ namespace VMAP
}
StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath):
- iMapID(mapID), /* iTree(0), */ iTreeValues(0), iBasePath(basePath)
+ iMapID(mapID), iTreeValues(0), iBasePath(basePath)
{
if (iBasePath.length() > 0 && (iBasePath[iBasePath.length()-1] != '/' || iBasePath[iBasePath.length()-1] != '\\'))
{
@@ -130,33 +143,35 @@ namespace VMAP
//=========================================================
/**
- return dist to hit or inf() if no hit
+ If intersection is found within pMaxDist, sets pMaxDist to intersection distance and returns true.
+ Else, pMaxDist is not modified and returns false;
*/
- float StaticMapTree::getIntersectionTime(const G3D::Ray& pRay, float pMaxDist, bool pStopAtFirstHit) const
+ bool StaticMapTree::getIntersectionTime(const G3D::Ray& pRay, float &pMaxDist, bool pStopAtFirstHit) const
{
float distance = pMaxDist;
MapRayCallback intersectionCallBack(iTreeValues);
iTree.intersectRay(pRay, intersectionCallBack, distance, pStopAtFirstHit);
- return distance;
+ if (intersectionCallBack.didHit())
+ pMaxDist = distance;
+ return intersectionCallBack.didHit();
}
//=========================================================
bool StaticMapTree::isInLineOfSight(const Vector3& pos1, const Vector3& pos2) const
{
- bool result = true;
float maxDist = (pos2 - pos1).magnitude();
+ // valid map coords should *never ever* produce float overflow, but this would produce NaNs too
+ ASSERT(maxDist < std::numeric_limits<float>::max());
// prevent NaN values which can cause BIH intersection to enter infinite loop
if (maxDist < 1e-10f)
return true;
// direction with length of 1
G3D::Ray ray = G3D::Ray::fromOriginAndDirection(pos1, (pos2 - pos1)/maxDist);
- float resultDist = getIntersectionTime(ray, maxDist, true);
- if (resultDist < maxDist)
- {
- result = false;
- }
- return result;
+ if (getIntersectionTime(ray, maxDist, true))
+ return false;
+
+ return true;
}
//=========================================================
/**
@@ -168,6 +183,8 @@ namespace VMAP
{
bool result=false;
float maxDist = (pPos2 - pPos1).magnitude();
+ // valid map coords should *never ever* produce float overflow, but this would produce NaNs too
+ ASSERT(maxDist < std::numeric_limits<float>::max());
// prevent NaN values which can cause BIH intersection to enter infinite loop
if (maxDist < 1e-10f)
{
@@ -176,8 +193,8 @@ namespace VMAP
}
Vector3 dir = (pPos2 - pPos1)/maxDist; // direction with length of 1
G3D::Ray ray(pPos1, dir);
- float dist = getIntersectionTime(ray, maxDist, false);
- if (dist < maxDist)
+ float dist = maxDist;
+ if (getIntersectionTime(ray, dist, false))
{
pResultHitPos = pPos1 + dir * dist;
if (pModifyDist < 0)
@@ -213,10 +230,9 @@ namespace VMAP
Vector3 dir = Vector3(0,0,-1);
G3D::Ray ray(pPos, dir); // direction with length of 1
float maxDist = VMapDefinitions::getMaxCanFallDistance();
- float dist = getIntersectionTime(ray, maxDist, false);
- if (dist < maxDist)
+ if (getIntersectionTime(ray, maxDist, false))
{
- height = pPos.z - dist;
+ height = pPos.z - maxDist;
}
return(height);
}
@@ -248,7 +264,11 @@ namespace VMAP
if (!tf)
success = false;
else
+ {
+ if (!readChunk(tf, chunk, VMAP_MAGIC, 8))
+ success = false;
fclose(tf);
+ }
}
fclose(rf);
return success;
@@ -258,7 +278,7 @@ namespace VMAP
bool StaticMapTree::InitMap(const std::string &fname, VMapManager2 *vm)
{
- std::cout << "Initializing StaticMapTree '" << fname << "'\n";
+ sLog.outDebug("StaticMapTree::InitMap() : initializing StaticMapTree '%s'", fname.c_str());
bool success = true;
std::string fullname = iBasePath + fname;
FILE *rf = fopen(fullname.c_str(), "rb");
@@ -286,12 +306,12 @@ namespace VMAP
// only non-tiled maps have them, and if so exactly one (so far at least...)
ModelSpawn spawn;
#ifdef VMAP_DEBUG
- std::cout << "Map isTiled:" << bool(iIsTiled) << std::endl;
+ sLog.outDebug("StaticMapTree::InitMap() : map isTiled: %u", static_cast<uint32>(iIsTiled));
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{
WorldModel *model = vm->acquireModelInstance(iBasePath, spawn.name);
- std::cout << "StaticMapTree::InitMap(): loading " << spawn.name << std::endl;
+ sLog.outDebug("StaticMapTree::InitMap() : loading %s", spawn.name.c_str());
if (model)
{
// assume that global model always is the first and only tree value (could be improved...)
@@ -301,7 +321,7 @@ namespace VMAP
else
{
success = false;
- std::cout << "error: could not acquire WorldModel pointer!\n";
+ sLog.outError("StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str());
}
}
@@ -337,7 +357,7 @@ namespace VMAP
}
if (!iTreeValues)
{
- std::cout << "Tree has not been initialized!\n";
+ sLog.outError("StaticMapTree::LoadMapTile() : tree has not been initialized [%u,%u]", tileX, tileY);
return false;
}
bool result = true;
@@ -346,8 +366,12 @@ namespace VMAP
FILE* tf = fopen(tilefile.c_str(), "rb");
if (tf)
{
+ char chunk[8];
+
+ if (!readChunk(tf, chunk, VMAP_MAGIC, 8))
+ result = false;
uint32 numSpawns;
- if (fread(&numSpawns, sizeof(uint32), 1, tf) != 1)
+ if (result && fread(&numSpawns, sizeof(uint32), 1, tf) != 1)
result = false;
for (uint32 i=0; i<numSpawns && result; ++i)
{
@@ -358,7 +382,8 @@ namespace VMAP
{
// acquire model instance
WorldModel *model = vm->acquireModelInstance(iBasePath, spawn.name);
- if (!model) std::cout << "error: could not acquire WorldModel pointer!\n";
+ if (!model)
+ sLog.outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u,%u]", tileX, tileY);
// update tree
uint32 referencedVal;
@@ -369,7 +394,7 @@ namespace VMAP
#ifdef VMAP_DEBUG
if (referencedVal > iNTreeValues)
{
- std::cout << "invalid tree element! (" << referencedVal << "/" << iNTreeValues << ")\n";
+ sLog.outDebug("StaticMapTree::LoadMapTile() : invalid tree element (%u/%u)", referencedVal, iNTreeValues);
continue;
}
#endif
@@ -380,8 +405,10 @@ namespace VMAP
{
++iLoadedSpawns[referencedVal];
#ifdef VMAP_DEBUG
- if (iTreeValues[referencedVal].ID != spawn.ID) std::cout << "error: trying to load wrong spawn in node!\n";
- else if (iTreeValues[referencedVal].name != spawn.name) std::cout << "error: name collision on GUID="<< spawn.ID << "\n";
+ if (iTreeValues[referencedVal].ID != spawn.ID)
+ sLog.outDebug("StaticMapTree::LoadMapTile() : trying to load wrong spawn in node");
+ else if (iTreeValues[referencedVal].name != spawn.name)
+ sLog.outDebug("StaticMapTree::LoadMapTile() : name collision on GUID=%u", spawn.ID);
#endif
}
}
@@ -402,7 +429,7 @@ namespace VMAP
loadedTileMap::iterator tile = iLoadedTiles.find(tileID);
if (tile == iLoadedTiles.end())
{
- std::cout << "WARNING: trying to unload non-loaded tile. Map:" << iMapID << " X:" << tileX << " Y:" << tileY << std::endl;
+ sLog.outError("StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY);
return;
}
if (tile->second) // file associated with tile
@@ -412,6 +439,9 @@ namespace VMAP
if (tf)
{
bool result=true;
+ char chunk[8];
+ if (!readChunk(tf, chunk, VMAP_MAGIC, 8))
+ result = false;
uint32 numSpawns;
if (fread(&numSpawns, sizeof(uint32), 1, tf) != 1)
result = false;
@@ -431,11 +461,10 @@ namespace VMAP
fread(&referencedNode, sizeof(uint32), 1, tf);
if (!iLoadedSpawns.count(referencedNode))
{
- std::cout << "error! trying to unload non-referenced model '" << spawn.name << "' (ID:" << spawn.ID << ")\n";
+ sLog.outError("StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
}
else if (--iLoadedSpawns[referencedNode] == 0)
{
- //std::cout << "MapTree: removing '" << spawn.name << "' from tree\n";
iTreeValues[referencedNode].setUnloaded();
iLoadedSpawns.erase(referencedNode);
}
diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h
index 7955cb92d68..8f2242da5a6 100644
--- a/src/server/collision/Maps/MapTree.h
+++ b/src/server/collision/Maps/MapTree.h
@@ -19,9 +19,9 @@
#ifndef _MAPTREE_H
#define _MAPTREE_H
-#include "Platform/Define.h"
-#include "Utilities/UnorderedMap.h"
-#include "BIH.h"
+#include "Define.h"
+#include "Dynamic/UnorderedMap.h"
+#include "BoundingIntervalHierarchy.h"
namespace VMAP
{
@@ -57,7 +57,7 @@ namespace VMAP
std::string iBasePath;
private:
- float getIntersectionTime(const G3D::Ray& pRay, float pMaxDist, bool pStopAtFirstHit) const;
+ bool getIntersectionTime(const G3D::Ray& pRay, float &pMaxDist, bool pStopAtFirstHit) const;
//bool containsLoadedMapTile(unsigned int pTileIdent) const { return(iLoadedMapTiles.containsKey(pTileIdent)); }
public:
static std::string getTileFileName(uint32 mapID, uint32 tileX, uint32 tileY);
diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp
index d01b54a7564..c6798e70cc4 100644
--- a/src/server/collision/Maps/TileAssembler.cpp
+++ b/src/server/collision/Maps/TileAssembler.cpp
@@ -1,25 +1,25 @@
/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
- * 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "WorldModel.h"
#include "TileAssembler.h"
#include "MapTree.h"
-#include "BIH.h"
+#include "BoundingIntervalHierarchy.h"
#include "VMapDefinitions.h"
#include <set>
@@ -82,6 +82,7 @@ namespace VMAP
// build global map tree
std::vector<ModelSpawn*> mapSpawns;
UniqueEntryMap::iterator entry;
+ printf("Calculating model bounds for map %u...\n", map_iter->first);
for (entry = map_iter->second->UniqueEntries.begin(); entry != map_iter->second->UniqueEntries.end(); ++entry)
{
// M2 models don't have a bound set in WDT/ADT placement data, i still think they're not used for LoS at all on retail
@@ -100,6 +101,7 @@ namespace VMAP
spawnedModelFiles.insert(entry->second.name);
}
+ printf("Creating map tree...\n", map_iter->first);
BIH pTree;
pTree.build(mapSpawns, BoundsTrait<ModelSpawn*>::getBounds);
@@ -107,8 +109,6 @@ namespace VMAP
std::map<uint32, uint32> modelNodeIdx;
for (uint32 i=0; i<mapSpawns.size(); ++i)
modelNodeIdx.insert(pair<uint32, uint32>(mapSpawns[i]->ID, i));
- if (!modelNodeIdx.empty())
- printf("min GUID: %u, max GUID: %u\n", modelNodeIdx.begin()->first, modelNodeIdx.rbegin()->first);
// write map tree file
std::stringstream mapfilename;
@@ -158,6 +158,8 @@ namespace VMAP
StaticMapTree::unpackTileID(tile->first, x, y);
tilefilename << std::setw(2) << x << "_" << std::setw(2) << y << ".vmtile";
FILE *tilefile = fopen(tilefilename.str().c_str(), "wb");
+ // file header
+ if (success && fwrite(VMAP_MAGIC, 1, 8, tilefile) != 8) success = false;
// write number of tile spawns
if (success && fwrite(&nSpawns, sizeof(uint32), 1, tilefile) != 1) success = false;
// write tile spawns
diff --git a/src/server/collision/Models/ModelInstance.cpp b/src/server/collision/Models/ModelInstance.cpp
index 677a08e147a..1ab6b363b22 100644
--- a/src/server/collision/Models/ModelInstance.cpp
+++ b/src/server/collision/Models/ModelInstance.cpp
@@ -1,24 +1,25 @@
/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
- * 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ModelInstance.h"
#include "WorldModel.h"
#include "MapTree.h"
+#include "VMapDefinitions.h"
using G3D::Vector3;
using G3D::Ray;
@@ -56,8 +57,11 @@ namespace VMAP
Ray modRay(p, iInvRot * pRay.direction());
float distance = pMaxDist * iInvScale;
bool hit = iModel->IntersectRay(modRay, distance, pStopAtFirstHit);
- distance *= iScale;
- pMaxDist = distance;
+ if(hit)
+ {
+ distance *= iScale;
+ pMaxDist = distance;
+ }
return hit;
}
diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h
index 97b3ab632a1..42b92c8fb89 100644
--- a/src/server/collision/Models/ModelInstance.h
+++ b/src/server/collision/Models/ModelInstance.h
@@ -24,7 +24,7 @@
#include <G3D/AABox.h>
#include <G3D/Ray.h>
-#include "Platform/Define.h"
+#include "Define.h"
namespace VMAP
{
diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp
index 690c77577ae..0bd156fedc2 100644
--- a/src/server/collision/Models/WorldModel.cpp
+++ b/src/server/collision/Models/WorldModel.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
- * 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "WorldModel.h"
@@ -148,15 +148,48 @@ namespace VMAP
bool WmoLiquid::GetLiquidHeight(const Vector3 &pos, float &liqHeight) const
{
- uint32 tx = (pos.x - iCorner.x)/LIQUID_TILE_SIZE;
+ float tx_f = (pos.x - iCorner.x)/LIQUID_TILE_SIZE;
+ uint32 tx = uint32(tx_f);
if (tx<0 || tx >= iTilesX) return false;
- uint32 ty = (pos.y - iCorner.y)/LIQUID_TILE_SIZE;
+ float ty_f = (pos.y - iCorner.y)/LIQUID_TILE_SIZE;
+ uint32 ty = uint32(ty_f);
if (ty<0 || ty >= iTilesY) return false;
+
+ // check if tile shall be used for liquid level
// checking for 0x08 *might* be enough, but disabled tiles always are 0x?F:
if ((iFlags[tx + ty*iTilesX] & 0x0F) == 0x0F)
return false;
- //placeholder...use only lower left corner vertex
- liqHeight = /* iCorner.z + */ iHeight[tx + ty*(iTilesX+1)];
+
+ // (dx, dy) coordinates inside tile, in [0,1]^2
+ float dx = tx_f - (float)tx;
+ float dy = ty_f - (float)ty;
+
+ /* Tesselate tile to two triangles (not sure if client does it exactly like this)
+
+ ^ dy
+ |
+ 1 x---------x (1,1)
+ | (b) / |
+ | / |
+ | / |
+ | / (a) |
+ x---------x---> dx
+ 0 1
+ */
+
+ const uint32 rowOffset = iTilesX + 1;
+ if (dx > dy) // case (a)
+ {
+ float sx = iHeight[tx+1 + ty * rowOffset] - iHeight[tx + ty * rowOffset];
+ float sy = iHeight[tx+1 + (ty+1) * rowOffset] - iHeight[tx+1 + ty * rowOffset];
+ liqHeight = iHeight[tx + ty * rowOffset] + dx * sx + dy * sy;
+ }
+ else // case (b)
+ {
+ float sx = iHeight[tx+1 + (ty+1) * rowOffset] - iHeight[tx + (ty+1) * rowOffset];
+ float sy = iHeight[tx + (ty+1) * rowOffset] - iHeight[tx + ty * rowOffset];
+ liqHeight = iHeight[tx + ty * rowOffset] + dx * sx + dy * sy;
+ }
return true;
}
diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h
index f12efed4f5d..7d5c921ef6e 100644
--- a/src/server/collision/Models/WorldModel.h
+++ b/src/server/collision/Models/WorldModel.h
@@ -23,9 +23,9 @@
#include <G3D/Vector3.h>
#include <G3D/AABox.h>
#include <G3D/Ray.h>
-#include "BIH.h"
+#include "BoundingIntervalHierarchy.h"
-#include "Platform/Define.h"
+#include "Define.h"
namespace VMAP
{
diff --git a/src/server/collision/VMapDefinitions.h b/src/server/collision/VMapDefinitions.h
index e4a34cc1397..5f4a976ed2a 100644
--- a/src/server/collision/VMapDefinitions.h
+++ b/src/server/collision/VMapDefinitions.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-YYYY TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
*
- * 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 _VMAPDEFINITIONS_H
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 09ec8fae53f..cae50668a3a 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -231,7 +231,7 @@ void PetAI::UpdateAllies()
Unit* owner = me->GetCharmerOrOwner();
Group *pGroup = NULL;
- m_updateAlliesTimer = 10*IN_MILISECONDS; //update friendly targets every 10 seconds, lesser checks increase performance
+ m_updateAlliesTimer = 10*IN_MILLISECONDS; //update friendly targets every 10 seconds, lesser checks increase performance
if (!owner)
return;
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 62b7090a2d0..3033f0556db 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -21,7 +21,7 @@
#ifndef TRINITY_UNITAI_H
#define TRINITY_UNITAI_H
-#include "Platform/Define.h"
+#include "Define.h"
#include <list>
#include "Unit.h"
diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h
index 6aa69eaaa29..bc3b9628010 100644
--- a/src/server/game/AI/CreatureAIFactory.h
+++ b/src/server/game/AI/CreatureAIFactory.h
@@ -21,8 +21,8 @@
#define TRINITY_CREATUREAIFACTORY_H
//#include "Policies/Singleton.h"
-#include "Dynamic/ObjectRegistry.h"
-#include "Dynamic/FactoryHolder.h"
+#include "ObjectRegistry.h"
+#include "FactoryHolder.h"
struct SelectableAI : public FactoryHolder<CreatureAI>, public Permissible<Creature>
{
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index d2f96ffcabc..0f05d233891 100644
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
@@ -19,7 +19,7 @@
#define CREATUREAIIMPL_H
#include "Common.h"
-#include "Platform/Define.h"
+#include "Define.h"
#include "TemporarySummon.h"
#include "CreatureAI.h"
#include "SpellMgr.h"
diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index d3fd5a8aed9..8283baf87f9 100644
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
@@ -21,22 +21,19 @@
#include "Creature.h"
#include "CreatureAISelector.h"
#include "PassiveAI.h"
-#include "Policies/SingletonImp.h"
+
#include "MovementGenerator.h"
#include "Pet.h"
#include "TemporarySummon.h"
#include "CreatureAIFactory.h"
#include "ScriptMgr.h"
-INSTANTIATE_SINGLETON_1(CreatureAIRegistry);
-INSTANTIATE_SINGLETON_1(MovementGeneratorRegistry);
-
namespace FactorySelector
{
CreatureAI* selectAI(Creature *creature)
{
const CreatureAICreator *ai_factory = NULL;
- CreatureAIRegistry &ai_registry(CreatureAIRepository::Instance());
+ CreatureAIRegistry& ai_registry(*CreatureAIRepository::instance());
if (creature->isPet())
ai_factory = ai_registry.GetRegistryItem("PetAI");
@@ -106,7 +103,7 @@ namespace FactorySelector
MovementGenerator* selectMovementGenerator(Creature *creature)
{
- MovementGeneratorRegistry &mv_registry(MovementGeneratorRepository::Instance());
+ MovementGeneratorRegistry& mv_registry(*MovementGeneratorRepository::instance());
assert(creature->GetCreatureInfo() != NULL);
const MovementGeneratorCreator *mv_factory = mv_registry.GetRegistryItem(creature->GetDefaultMovementType());
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index 47c8e9e6ad8..c70f471a82f 100644
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -456,7 +456,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
caster = target;
//Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered
- bool canCast = !caster->IsNonMeleeSpellCasted(false) || (action.cast.castFlags & (CAST_TRIGGERED | CAST_INTURRUPT_PREVIOUS));
+ bool canCast = !caster->IsNonMeleeSpellCasted(false) || (action.cast.castFlags & (CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS));
// If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them
if (action.cast.castFlags & CAST_AURA_NOT_PRESENT)
@@ -492,7 +492,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
else
{
//Interrupt any previous spell
- if (caster->IsNonMeleeSpellCasted(false) && action.cast.castFlags & CAST_INTURRUPT_PREVIOUS)
+ if (caster->IsNonMeleeSpellCasted(false) && action.cast.castFlags & CAST_INTERRUPT_PREVIOUS)
caster->InterruptNonMeleeSpells(false);
caster->CastSpell(target, action.cast.spellId, (action.cast.castFlags & CAST_TRIGGERED));
@@ -1331,12 +1331,12 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote)
if ((*itr).Event.receive_emote.emoteId != text_emote)
return;
- Condition* cond = new Condition();
- cond->mConditionType = ConditionType((*itr).Event.receive_emote.condition);
- cond->mConditionValue1 = (*itr).Event.receive_emote.conditionValue1;
- cond->mConditionValue2 = (*itr).Event.receive_emote.conditionValue2;
+ Condition cond;
+ cond.mConditionType = ConditionType((*itr).Event.receive_emote.condition);
+ cond.mConditionValue1 = (*itr).Event.receive_emote.conditionValue1;
+ cond.mConditionValue2 = (*itr).Event.receive_emote.conditionValue2;
- if (cond->Meets(pPlayer))
+ if (cond.Meets(pPlayer))
{
sLog.outDebug("CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing");
ProcessEvent(*itr, pPlayer);
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.h b/src/server/game/AI/EventAI/CreatureEventAI.h
index 2fc5de46089..84b359787f5 100644
--- a/src/server/game/AI/EventAI/CreatureEventAI.h
+++ b/src/server/game/AI/EventAI/CreatureEventAI.h
@@ -150,7 +150,7 @@ enum Target
enum CastFlags
{
- CAST_INTURRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
+ CAST_INTERRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
CAST_TRIGGERED = 0x02, //Triggered (this makes spell cost zero mana and have no cast time)
CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
index 83d62ca74dc..9f4105050ae 100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
@@ -17,19 +17,16 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/SQLStorage.h"
+#include "DatabaseEnv.h"
+#include "SQLStorage.h"
#include "CreatureEventAI.h"
#include "CreatureEventAIMgr.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
-#include "Policies/SingletonImp.h"
#include "ObjectDefines.h"
#include "GridDefines.h"
#include "ConditionMgr.h"
-INSTANTIATE_SINGLETON_1(CreatureEventAIMgr);
-
// -------------------
void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
{
@@ -362,11 +359,11 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
}
if (temp.receive_emote.condition)
{
- Condition* cond = new Condition();
- cond->mConditionType = ConditionType(temp.receive_emote.condition);
- cond->mConditionValue1 = temp.receive_emote.conditionValue1;
- cond->mConditionValue2 = temp.receive_emote.conditionValue2;
- if (!sConditionMgr.isConditionTypeValid(cond))
+ Condition cond;
+ cond.mConditionType = ConditionType(temp.receive_emote.condition);
+ cond.mConditionValue1 = temp.receive_emote.conditionValue1;
+ cond.mConditionValue2 = temp.receive_emote.conditionValue2;
+ if (!sConditionMgr.isConditionTypeValid(&cond))
{
sLog.outErrorDb("CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.",temp.creature_id, i, temp.receive_emote.condition);
continue;
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.h b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
index ef191b22463..3c8181e9e74 100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.h
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
@@ -24,8 +24,9 @@
class CreatureEventAIMgr
{
+ friend class ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>;
+ CreatureEventAIMgr(){};
public:
- CreatureEventAIMgr(){};
~CreatureEventAIMgr(){};
void LoadCreatureEventAI_Texts();
@@ -42,5 +43,5 @@ class CreatureEventAIMgr
CreatureEventAI_TextMap m_CreatureEventAI_TextMap;
};
-#define CreatureEAI_Mgr Trinity::Singleton<CreatureEventAIMgr>::Instance()
+#define CreatureEAI_Mgr (*ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index 8c4ddd14f07..9ab9e06b624 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -5,7 +5,7 @@
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "Item.h"
#include "Spell.h"
#include "ObjectMgr.h"
@@ -153,7 +153,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId)
if (!GetSoundEntriesStore()->LookupEntry(uiSoundId))
{
- error_log("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow());
+ sLog.outError("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow());
return;
}
@@ -398,7 +398,7 @@ void ScriptedAI::DoResetThreat()
{
if (!me->CanHaveThreatList() || me->getThreatManager().isThreatListEmpty())
{
- error_log("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
+ sLog.outError("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
return;
}
@@ -441,7 +441,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, flo
if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER)
{
if (pUnit)
- error_log("TSCR: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO);
+ sLog.outError("TSCR: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO);
return;
}
@@ -578,7 +578,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff)
return false;
break;
default:
- error_log("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", me->GetEntry());
+ sLog.outError("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", me->GetEntry());
return false;
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 8b7aca888e1..84e2cff7e2f 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -9,7 +9,7 @@ SDComment:
SDCategory: Npc
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
enum ePoints
@@ -104,7 +104,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* pWho)
{
if (!me->getVictim())
{
- pWho->RemoveAurasDueToSpell(SPELL_AURA_MOD_STEALTH);
+ pWho->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
AttackStart(pWho);
}
else if (me->GetMap()->IsDungeon())
@@ -177,7 +177,7 @@ void npc_escortAI::EnterEvadeMode()
{
AddEscortState(STATE_ESCORT_RETURNING);
ReturnToLastPoint();
- debug_log("TSCR: EscortAI has left combat and is now returning to last point");
+ sLog.outDebug("TSCR: EscortAI has left combat and is now returning to last point");
}
else
{
@@ -224,7 +224,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
{
if (DespawnAtEnd)
{
- debug_log("TSCR: EscortAI reached end of waypoints");
+ sLog.outDebug("TSCR: EscortAI reached end of waypoints");
if (m_bCanReturnToStart)
{
@@ -235,7 +235,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
m_uiWPWaitTimer = 0;
- debug_log("TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
+ sLog.outDebug("TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
return;
}
@@ -251,7 +251,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
}
else
{
- debug_log("TSCR: EscortAI reached end of waypoints with Despawn off");
+ sLog.outDebug("TSCR: EscortAI reached end of waypoints with Despawn off");
return;
}
@@ -260,7 +260,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
if (!HasEscortState(STATE_ESCORT_PAUSED))
{
me->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
- debug_log("TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
+ sLog.outDebug("TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
WaypointStart(CurrentWP->id);
@@ -278,7 +278,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
{
if (DespawnAtFar && !IsPlayerOrGroupInRange())
{
- debug_log("TSCR: EscortAI failed because player/group was to far away or not found");
+ sLog.outDebug("TSCR: EscortAI failed because player/group was to far away or not found");
if (m_bCanInstantRespawn)
{
@@ -316,7 +316,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId)
//Combat start position reached, continue waypoint movement
if (uiPointId == POINT_LAST_POINT)
{
- debug_log("TSCR: EscortAI has returned to original position before combat");
+ sLog.outDebug("TSCR: EscortAI has returned to original position before combat");
if (m_bIsRunning && me->HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE))
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
@@ -330,7 +330,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId)
}
else if (uiPointId == POINT_HOME)
{
- debug_log("TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list.");
+ sLog.outDebug("TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list.");
CurrentWP = WaypointList.begin();
m_uiWPWaitTimer = 1;
@@ -340,11 +340,11 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId)
//Make sure that we are still on the right waypoint
if (CurrentWP->id != uiPointId)
{
- error_log("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", uiPointId, CurrentWP->id, me->GetEntry());
+ sLog.outError("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", uiPointId, CurrentWP->id, me->GetEntry());
return;
}
- debug_log("TSCR: EscortAI Waypoint %u reached", CurrentWP->id);
+ sLog.outDebug("TSCR: EscortAI Waypoint %u reached", CurrentWP->id);
//Call WP function
WaypointReached(CurrentWP->id);
@@ -415,14 +415,14 @@ void npc_escortAI::SetRun(bool bRun)
if (!m_bIsRunning)
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
else
- debug_log("TSCR: EscortAI attempt to set run mode, but is already running.");
+ sLog.outDebug("TSCR: EscortAI attempt to set run mode, but is already running.");
}
else
{
if (m_bIsRunning)
me->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
else
- debug_log("TSCR: EscortAI attempt to set walk mode, but is already walking.");
+ sLog.outDebug("TSCR: EscortAI attempt to set walk mode, but is already walking.");
}
m_bIsRunning = bRun;
}
@@ -432,13 +432,13 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
{
if (me->getVictim())
{
- error_log("TSCR ERROR: EscortAI attempt to Start while in combat. Scriptname: %s, creature entry: %u", me->GetScriptName().c_str(), me->GetEntry());
+ sLog.outError("TSCR ERROR: EscortAI attempt to Start while in combat. Scriptname: %s, creature entry: %u", me->GetScriptName().c_str(), me->GetEntry());
return;
}
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
- error_log("TSCR: EscortAI attempt to Start while already escorting.");
+ sLog.outError("TSCR: EscortAI attempt to Start while already escorting.");
return;
}
@@ -454,7 +454,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
if (WaypointList.empty())
{
- error_db_log("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", pQuest ? pQuest->GetQuestId() : 0);
+ sLog.outErrorDb("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", pQuest ? pQuest->GetQuestId() : 0);
return;
}
@@ -469,19 +469,19 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
m_bCanReturnToStart = bCanLoopPath;
if (m_bCanReturnToStart && m_bCanInstantRespawn)
- debug_log("TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
+ sLog.outDebug("TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
{
me->GetMotionMaster()->MovementExpired();
me->GetMotionMaster()->MoveIdle();
- debug_log("TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
+ sLog.outDebug("TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
}
//disable npcflags
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
- debug_log("TSCR: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %u", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
+ sLog.outDebug("TSCR: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %u", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
CurrentWP = WaypointList.begin();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index 4f1543dc778..499e4611693 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -9,7 +9,7 @@ SDComment: This AI is under development
SDCategory: Npc
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedFollowerAI.h"
const float MAX_PLAYER_DISTANCE = 100.0f;
@@ -102,7 +102,7 @@ void FollowerAI::MoveInLineOfSight(Unit* pWho)
{
if (!me->getVictim())
{
- pWho->RemoveAurasDueToSpell(SPELL_AURA_MOD_STEALTH);
+ pWho->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
AttackStart(pWho);
}
else if (me->GetMap()->IsDungeon())
@@ -164,7 +164,7 @@ void FollowerAI::EnterEvadeMode()
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
- debug_log("TSCR: FollowerAI left combat, returning to CombatStartPosition.");
+ sLog.outDebug("TSCR: FollowerAI left combat, returning to CombatStartPosition.");
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
{
@@ -190,7 +190,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT))
{
- debug_log("TSCR: FollowerAI is set completed, despawns.");
+ sLog.outDebug("TSCR: FollowerAI is set completed, despawns.");
me->ForcedDespawn();
return;
}
@@ -201,7 +201,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_RETURNING))
{
- debug_log("TSCR: FollowerAI is returning to leader.");
+ sLog.outDebug("TSCR: FollowerAI is returning to leader.");
RemoveFollowState(STATE_FOLLOW_RETURNING);
me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
@@ -230,7 +230,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
if (bIsMaxRangeExceeded)
{
- debug_log("TSCR: FollowerAI failed because player/group was to far away or not found");
+ sLog.outDebug("TSCR: FollowerAI failed because player/group was to far away or not found");
me->ForcedDespawn();
return;
}
@@ -273,13 +273,13 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const
{
if (me->getVictim())
{
- debug_log("TSCR: FollowerAI attempt to StartFollow while in combat.");
+ sLog.outDebug("TSCR: FollowerAI attempt to StartFollow while in combat.");
return;
}
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
- error_log("TSCR: FollowerAI attempt to StartFollow while already following.");
+ sLog.outError("TSCR: FollowerAI attempt to StartFollow while already following.");
return;
}
@@ -295,7 +295,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
- debug_log("TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
+ sLog.outDebug("TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
}
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
@@ -304,7 +304,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const
me->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
- debug_log("TSCR: FollowerAI start follow %s (GUID %u)", pLeader->GetName(), m_uiLeaderGUID);
+ sLog.outDebug("TSCR: FollowerAI start follow %s (GUID %u)", pLeader->GetName(), m_uiLeaderGUID);
}
Player* FollowerAI::GetLeaderForFollower()
@@ -323,7 +323,7 @@ Player* FollowerAI::GetLeaderForFollower()
if (pMember && pMember->isAlive() && me->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE))
{
- debug_log("TSCR: FollowerAI GetLeader changed and returned new leader.");
+ sLog.outDebug("TSCR: FollowerAI GetLeader changed and returned new leader.");
m_uiLeaderGUID = pMember->GetGUID();
return pMember;
break;
@@ -333,7 +333,7 @@ Player* FollowerAI::GetLeaderForFollower()
}
}
- debug_log("TSCR: FollowerAI GetLeader can not find suitable leader.");
+ sLog.outDebug("TSCR: FollowerAI GetLeader can not find suitable leader.");
return NULL;
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedGuardAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedGuardAI.cpp
index 68dc8690470..4dd19547dda 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedGuardAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedGuardAI.cpp
@@ -21,7 +21,7 @@ SDComment:
SDCategory: Guards
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedGuardAI.h"
// **** This script is for use within every single guard to save coding time ****
diff --git a/src/server/game/AI/ScriptedAI/ScriptedInstance.h b/src/server/game/AI/ScriptedAI/ScriptedInstance.h
index 25593e05300..8a9b8c4c5a3 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedInstance.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedInstance.h
@@ -8,11 +8,11 @@
#include "InstanceData.h"
#include "Map.h"
-#define OUT_SAVE_INST_DATA debug_log("TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
-#define OUT_SAVE_INST_DATA_COMPLETE debug_log("TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
-#define OUT_LOAD_INST_DATA(a) debug_log("TSCR: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a)
-#define OUT_LOAD_INST_DATA_COMPLETE debug_log("TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
-#define OUT_LOAD_INST_DATA_FAIL error_log("TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
+#define OUT_SAVE_INST_DATA sLog.outDebug("TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
+#define OUT_SAVE_INST_DATA_COMPLETE sLog.outDebug("TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
+#define OUT_LOAD_INST_DATA(a) sLog.outDebug("TSCR: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a)
+#define OUT_LOAD_INST_DATA_COMPLETE sLog.outDebug("TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
+#define OUT_LOAD_INST_DATA_FAIL sLog.outError("TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
#define ScriptedInstance InstanceData
diff --git a/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp
index 08797515837..7d86c8e54a6 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedSimpleAI.cpp
@@ -21,7 +21,7 @@ SDComment: Base Class for SimpleAI creatures
SDCategory: Creatures
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedSimpleAI.h"
SimpleAI::SimpleAI(Creature *c) : ScriptedAI(c)
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index 52906fb5454..54f80114131 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -18,19 +18,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Database/DatabaseEnv.h"
-#include "Policies/SingletonImp.h"
+#include "DatabaseEnv.h"
+
#include "AccountMgr.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "Util.h"
-#include "Auth/Sha1.h"
+#include "SHA1.h"
extern DatabaseType LoginDatabase;
-INSTANTIATE_SINGLETON_1(AccountMgr);
-
AccountMgr::AccountMgr()
{}
diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h
index b017bf1836a..a0e181cf4a0 100644
--- a/src/server/game/Accounts/AccountMgr.h
+++ b/src/server/game/Accounts/AccountMgr.h
@@ -24,7 +24,6 @@
#include <string>
#include "Common.h"
-#include "Policies/Singleton.h"
enum AccountOpResult
{
@@ -59,6 +58,6 @@ class AccountMgr
static bool normalizeString(std::string& utf8str);
};
-#define accmgr Trinity::Singleton<AccountMgr>::Instance()
+#define accmgr (*ACE_Singleton<AccountMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index e0a79fc71ed..bb156c40ca6 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -21,8 +21,8 @@
#include "ObjectMgr.h"
#include "World.h"
#include "WorldPacket.h"
-#include "Database/DatabaseEnv.h"
-#include "Policies/SingletonImp.h"
+#include "DatabaseEnv.h"
+
#include "AchievementMgr.h"
#include "ArenaTeam.h"
@@ -41,8 +41,6 @@
#include "Map.h"
#include "InstanceData.h"
-INSTANTIATE_SINGLETON_1(AchievementGlobalMgr);
-
namespace Trinity
{
class AchievementChatBuilder
@@ -873,6 +871,36 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
SetCriteriaProgress(achievementCriteria, counter);
break;
}
+ case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY:
+ {
+ time_t nextDailyResetTime = sWorld.GetNextDailyQuestsResetTime();
+ CriteriaProgress *progress = GetCriteriaProgress(achievementCriteria);
+
+ if (!miscvalue1) // Login case.
+ {
+ // reset if player missed one day.
+ if (progress && progress->date < (nextDailyResetTime - 2 * DAY))
+ SetCriteriaProgress(achievementCriteria, 0, PROGRESS_SET);
+ continue;
+ }
+
+ ProgressType progressType;
+ if (!progress)
+ // 1st time. Start count.
+ progressType = PROGRESS_SET;
+ else if (progress->date < (nextDailyResetTime - 2 * DAY))
+ // last progress is older than 2 days. Player missed 1 day => Retart count.
+ progressType = PROGRESS_SET;
+ else if (progress->date < (nextDailyResetTime - DAY))
+ // last progress is between 1 and 2 days. => 1st time of the day.
+ progressType = PROGRESS_ACCUMULATE;
+ else
+ // last progress is within the day before the reset => Already counted today.
+ continue;
+
+ SetCriteriaProgress(achievementCriteria, 1, progressType);
+ break;
+ }
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE:
{
// speedup for non-login case
@@ -935,7 +963,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (!miscvalue1)
continue;
- Map const* map = GetPlayer()->IsInWorld() ? GetPlayer()->GetMap() : MapManager::Instance().FindMap(GetPlayer()->GetMapId(), GetPlayer()->GetInstanceId());
+ Map const* map = GetPlayer()->IsInWorld() ? GetPlayer()->GetMap() : sMapMgr.FindMap(GetPlayer()->GetMapId(), GetPlayer()->GetInstanceId());
if (!map || !map->IsDungeon())
continue;
@@ -1428,7 +1456,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_RATING:
break;
// FIXME: not triggered in code as result, need to implement
- case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY:
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_RAID:
case ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE:
case ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA:
@@ -1483,11 +1510,10 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
return false;
}
- CriteriaProgressMap::const_iterator itr = m_criteriaProgress.find(achievementCriteria->ID);
- if (itr == m_criteriaProgress.end())
+ CriteriaProgress const* progress = GetCriteriaProgress(achievementCriteria);
+ if (!progress)
return false;
- CriteriaProgress const* progress = &itr->second;
switch(achievementCriteria->requiredType)
{
@@ -1516,6 +1542,8 @@ bool AchievementMgr::IsCompletedCriteria(AchievementCriteriaEntry const* achieve
return progress->counter >= 1;
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST_COUNT:
return progress->counter >= achievementCriteria->complete_quest_count.totalQuestCount;
+ case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY:
+ return progress->counter >= achievementCriteria->complete_daily_quest_daily.numberOfDays;
case ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE:
return progress->counter >= achievementCriteria->complete_quests_in_zone.questCount;
case ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE:
@@ -1661,11 +1689,10 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry)
{
AchievementCriteriaEntry const* criteria = *itr;
- CriteriaProgressMap::const_iterator itrProgress = m_criteriaProgress.find(criteria->ID);
- if (itrProgress == m_criteriaProgress.end())
+ CriteriaProgress const* progress = GetCriteriaProgress(criteria);
+ if (!progress)
continue;
- CriteriaProgress const* progress = &itrProgress->second;
count += progress->counter;
// for counters, field4 contains the main count requirement
@@ -1701,6 +1728,16 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry)
return false;
}
+CriteriaProgress* AchievementMgr::GetCriteriaProgress(AchievementCriteriaEntry const* entry)
+{
+ CriteriaProgressMap::iterator iter = m_criteriaProgress.find(entry->ID);
+
+ if (iter == m_criteriaProgress.end())
+ return NULL;
+
+ return &(iter->second);
+}
+
void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype)
{
// Don't allow to cheat - doing timed achievements without timer active
@@ -1711,11 +1748,8 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
if ((sLog.getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES) == 0)
sLog.outDetail("AchievementMgr::SetCriteriaProgress(%u, %u) for (GUID:%u)", entry->ID, changeValue, m_player->GetGUIDLow());
- CriteriaProgress *progress = NULL;
-
- CriteriaProgressMap::iterator iter = m_criteriaProgress.find(entry->ID);
-
- if (iter == m_criteriaProgress.end())
+ CriteriaProgress* progress = GetCriteriaProgress(entry);
+ if (!progress)
{
// not create record for 0 counter but allow it for timed achievements
// we will need to send 0 progress to client to start the timer
@@ -1724,12 +1758,9 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
progress = &m_criteriaProgress[entry->ID];
progress->counter = changeValue;
- progress->date = time(NULL);
}
else
{
- progress = &iter->second;
-
uint32 newValue = 0;
switch(ptype)
{
@@ -1756,6 +1787,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
}
progress->changed = true;
+ progress->date = time(NULL); // set the date to the latest update.
uint32 timeElapsed = 0;
bool timedCompleted = false;
@@ -1765,7 +1797,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
//has to exist else we wouldn't be here
timedCompleted = IsCompletedCriteria(entry, sAchievementStore.LookupEntry(entry->referredAchievement));
// Client expects this in packet
- timeElapsed = entry->timeLimit - (timedIter->second/IN_MILISECONDS);
+ timeElapsed = entry->timeLimit - (timedIter->second/IN_MILLISECONDS);
// Remove the timer, we wont need it anymore
if (timedCompleted)
@@ -1809,7 +1841,7 @@ void AchievementMgr::StartTimedAchievement(AchievementCriteriaTimedTypes type, u
if (m_timedAchievements.find((*i)->ID) == m_timedAchievements.end() && !IsCompletedCriteria(*i, achievement))
{
// Start the timer
- m_timedAchievements[(*i)->ID] = (*i)->timeLimit * IN_MILISECONDS;
+ m_timedAchievements[(*i)->ID] = (*i)->timeLimit * IN_MILLISECONDS;
// and at client too
SetCriteriaProgress(*i, 0, PROGRESS_SET);
diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h
index ea9e5e95142..0eedf971c20 100644
--- a/src/server/game/Achievements/AchievementMgr.h
+++ b/src/server/game/Achievements/AchievementMgr.h
@@ -22,8 +22,8 @@
#include <string>
#include "Common.h"
-#include "Policies/Singleton.h"
-#include "Database/DatabaseEnv.h"
+#include "ace/Singleton.h"
+#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "DBCStores.h"
@@ -36,7 +36,7 @@ typedef std::map<uint32,AchievementEntryList> AchievementListByReference
struct CriteriaProgress
{
uint32 counter;
- time_t date;
+ time_t date; // latest update time.
bool changed;
};
@@ -258,6 +258,7 @@ class AchievementMgr
enum ProgressType { PROGRESS_SET, PROGRESS_ACCUMULATE, PROGRESS_HIGHEST };
void SendAchievementEarned(AchievementEntry const* achievement);
void SendCriteriaUpdate(AchievementCriteriaEntry const* entry, CriteriaProgress const* progress, uint32 timeElapsed, bool timedCompleted);
+ CriteriaProgress* GetCriteriaProgress(AchievementCriteriaEntry const* entry);
void SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype = PROGRESS_SET);
void CompletedCriteriaFor(AchievementEntry const* achievement);
bool IsCompletedCriteria(AchievementCriteriaEntry const* criteria, AchievementEntry const* achievement);
@@ -341,6 +342,6 @@ class AchievementGlobalMgr
AchievementRewardLocales m_achievementRewardLocales;
};
-#define achievementmgr Trinity::Singleton<AchievementGlobalMgr>::Instance()
+#define achievementmgr (*ACE_Singleton<AchievementGlobalMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp
index 66e4fbc8765..830d439bfdd 100644
--- a/src/server/game/Addons/AddonMgr.cpp
+++ b/src/server/game/Addons/AddonMgr.cpp
@@ -1,8 +1,7 @@
/*
+ * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008-2009 Trinity <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
@@ -18,20 +17,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Database/DatabaseEnv.h"
-#include "Policies/SingletonImp.h"
+#include "DatabaseEnv.h"
+
#include "AddonMgr.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "Util.h"
-#include "Auth/Sha1.h"
+#include "SHA1.h"
#include "ProgressBar.h"
extern DatabaseType LoginDatabase;
-INSTANTIATE_SINGLETON_1(AddonMgr);
-
AddonMgr::AddonMgr()
{
}
diff --git a/src/server/game/Addons/AddonMgr.h b/src/server/game/Addons/AddonMgr.h
index 8f5eed4918f..112415e5b40 100644
--- a/src/server/game/Addons/AddonMgr.h
+++ b/src/server/game/Addons/AddonMgr.h
@@ -1,8 +1,7 @@
/*
+ * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008-2009 Trinity <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
@@ -22,7 +21,7 @@
#define _ADDONMGR_H
#include "Common.h"
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
#include <string>
@@ -68,9 +67,10 @@ typedef std::list<SavedAddon> SavedAddonsList;
class AddonMgr
{
+ friend class ACE_Singleton<AddonMgr, ACE_Null_Mutex>;
+ AddonMgr();
public:
- AddonMgr();
~AddonMgr();
void LoadFromDB();
@@ -83,7 +83,7 @@ class AddonMgr
SavedAddonsList m_knownAddons; // Known addons.
};
-#define sAddonMgr Trinity::Singleton<AddonMgr>::Instance()
+#define sAddonMgr (*ACE_Singleton<AddonMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.cpp b/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.cpp
index ebbf48e6476..0a4b6c3f32e 100644
--- a/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.cpp
@@ -1,11 +1,27 @@
+/*
+ * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "ObjectMgr.h"
#include "AuctionHouseMgr.h"
#include "AuctionHouseBot.h"
#include <vector>
-#include "Policies/SingletonImp.h"
-INSTANTIATE_SINGLETON_1(AuctionHouseBot);
-
using namespace std;
vector<uint32> npcItems;
vector<uint32> lootItems;
@@ -23,6 +39,7 @@ vector<uint32> blueItemsBin;
vector<uint32> purpleItemsBin;
vector<uint32> orangeItemsBin;
vector<uint32> yellowItemsBin;
+
AuctionHouseBot::AuctionHouseBot()
{
debug_Out = false;
@@ -693,7 +710,7 @@ void AuctionHouseBot::Update()
WorldSession _session(AHBplayerAccount, NULL, SEC_PLAYER, true, 0, LOCALE_enUS);
Player _AHBplayer(&_session);
_AHBplayer.Initialize(AHBplayerGUID);
- ObjectAccessor::Instance().AddObject(&_AHBplayer);
+ sObjectAccessor.AddObject(&_AHBplayer);
// Add New Bids
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
@@ -725,7 +742,7 @@ void AuctionHouseBot::Update()
addNewAuctionBuyerBotBid(&_AHBplayer, &NeutralConfig, &_session);
_lastrun_n = _newrun;
}
- ObjectAccessor::Instance().RemoveObject(&_AHBplayer);
+ sObjectAccessor.RemoveObject(&_AHBplayer);
}
void AuctionHouseBot::Initialize()
@@ -1510,6 +1527,7 @@ void AuctionHouseBot::Commands(uint32 command, uint32 ahMapID, uint32 col, char*
uint32 maxItems = (uint32) strtoul(param1, NULL, 0);
CharacterDatabase.PExecute("UPDATE auctionhousebot SET maxitems = '%u' WHERE auctionhouse = '%u'", maxItems, ahMapID);
config->SetMaxItems(maxItems);
+ config->CalculatePercents();
}
break;
case 3: //min time Deprecated (Place holder for future commands)
diff --git a/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.h b/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.h
index 208a09aa0b2..d1cec5f170e 100644
--- a/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.h
+++ b/src/server/game/AuctionHouse/AuctionHouseBot/AuctionHouseBot.h
@@ -1,8 +1,27 @@
+/*
+ * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef AUCTION_HOUSE_BOT_H
#define AUCTION_HOUSE_BOT_H
#include "World.h"
-#include "Config/ConfigEnv.h"
+#include "ConfigEnv.h"
#include "ItemPrototype.h"
#define AHB_GREY 0
@@ -173,7 +192,8 @@ public:
void SetMaxItems(uint32 value)
{
maxItems = value;
- CalculatePercents();
+ // CalculatePercents() needs to be called, but only if
+ // SetPercentages() has been called at least once already.
}
uint32 GetMaxItems()
{
@@ -1207,9 +1227,11 @@ private:
inline uint32 minValue(uint32 a, uint32 b) { return a <= b ? a : b; };
void addNewAuctions(Player *AHBplayer, AHBConfig *config);
void addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *config, WorldSession *session);
+
+ friend class ACE_Singleton<AuctionHouseBot, ACE_Null_Mutex>;
+ AuctionHouseBot();
public:
- AuctionHouseBot();
~AuctionHouseBot();
void Update();
void Initialize();
@@ -1220,6 +1242,6 @@ public:
uint32 GetAHBplayerGUID() { return AHBplayerGUID; };
};
-#define auctionbot Trinity::Singleton<AuctionHouseBot>::Instance()
+#define auctionbot (*ACE_Singleton<AuctionHouseBot, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index ddd44bbefa2..95e1fb5e931 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Common.h"
@@ -22,21 +22,19 @@
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/SQLStorage.h"
-#include "Policies/SingletonImp.h"
+#include "DatabaseEnv.h"
+#include "SQLStorage.h"
+
#include "DBCStores.h"
#include "AccountMgr.h"
#include "AuctionHouseMgr.h"
#include "Item.h"
#include "Language.h"
-#include "Log.h"
+#include "Logging/Log.h"
#include "ProgressBar.h"
#include <vector>
-INSTANTIATE_SINGLETON_1(AuctionHouseMgr);
-
using namespace std;
AuctionHouseMgr::AuctionHouseMgr()
@@ -483,7 +481,11 @@ AuctionHouseEntry const* AuctionHouseMgr::GetAuctionHouseEntry(uint32 factionTem
bool AuctionHouseObject::RemoveAuction(AuctionEntry *auction, uint32 item_template)
{
auctionbot.DecrementItemCounts(auction, item_template);
- return AuctionsMap.erase(auction->Id) ? true : false;
+ bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false;
+
+ // we need to delete the entry, it is not referenced any more
+ delete auction;
+ return wasInMap;
}
void AuctionHouseObject::Update()
@@ -711,7 +713,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const
data << uint32(bid ? GetAuctionOutBid() : 0);
//minimal outbid
data << uint32(buyout); //auction->buyout
- data << uint32((expire_time-time(NULL))*IN_MILISECONDS);//time left
+ data << uint32((expire_time-time(NULL))*IN_MILLISECONDS);//time left
data << uint64(bidder) ; //auction->bidder current
data << uint32(bid); //current bid
return true;
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index b92cec986c7..24c954a91e8 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -1,27 +1,25 @@
/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008-2010 Trinity <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 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.
*
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 _AUCTION_HOUSE_MGR_H
#define _AUCTION_HOUSE_MGR_H
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
#include "SharedDefines.h"
@@ -121,51 +119,53 @@ class AuctionHouseObject
class AuctionHouseMgr
{
- public:
+ friend class ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>;
AuctionHouseMgr();
- ~AuctionHouseMgr();
+
+ public:
+ ~AuctionHouseMgr();
- typedef UNORDERED_MAP<uint32, Item*> ItemMap;
+ typedef UNORDERED_MAP<uint32, Item*> ItemMap;
- AuctionHouseObject* GetAuctionsMap(uint32 factionTemplateId);
- AuctionHouseObject* GetBidsMap(uint32 factionTemplateId);
+ AuctionHouseObject* GetAuctionsMap(uint32 factionTemplateId);
+ AuctionHouseObject* GetBidsMap(uint32 factionTemplateId);
- Item* GetAItem(uint32 id)
- {
- ItemMap::const_iterator itr = mAitems.find(id);
- if (itr != mAitems.end())
+ Item* GetAItem(uint32 id)
{
- return itr->second;
+ ItemMap::const_iterator itr = mAitems.find(id);
+ if (itr != mAitems.end())
+ {
+ return itr->second;
+ }
+ return NULL;
}
- return NULL;
- }
- //auction messages
- void SendAuctionWonMail(AuctionEntry * auction);
- void SendAuctionSalePendingMail(AuctionEntry * auction);
- void SendAuctionSuccessfulMail(AuctionEntry * auction);
- void SendAuctionExpiredMail(AuctionEntry * auction);
- static uint32 GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 time, Item *pItem);
- static AuctionHouseEntry const* GetAuctionHouseEntry(uint32 factionTemplateId);
+ //auction messages
+ void SendAuctionWonMail(AuctionEntry * auction);
+ void SendAuctionSalePendingMail(AuctionEntry * auction);
+ void SendAuctionSuccessfulMail(AuctionEntry * auction);
+ void SendAuctionExpiredMail(AuctionEntry * auction);
+ static uint32 GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 time, Item *pItem);
+ static AuctionHouseEntry const* GetAuctionHouseEntry(uint32 factionTemplateId);
- public:
+ public:
//load first auction items, because of check if item exists, when loading
- void LoadAuctionItems();
- void LoadAuctions();
+ void LoadAuctionItems();
+ void LoadAuctions();
- void AddAItem(Item* it);
- bool RemoveAItem(uint32 id);
+ void AddAItem(Item* it);
+ bool RemoveAItem(uint32 id);
- void Update();
+ void Update();
- private:
- AuctionHouseObject mHordeAuctions;
- AuctionHouseObject mAllianceAuctions;
- AuctionHouseObject mNeutralAuctions;
+ private:
+ AuctionHouseObject mHordeAuctions;
+ AuctionHouseObject mAllianceAuctions;
+ AuctionHouseObject mNeutralAuctions;
- ItemMap mAitems;
+ ItemMap mAitems;
};
-#define auctionmgr Trinity::Singleton<AuctionHouseMgr>::Instance()
+#define auctionmgr (*ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/BattleGrounds/BattleGround.cpp b/src/server/game/BattleGrounds/BattleGround.cpp
index 5bfe2e139b6..d9d6dc98a58 100644
--- a/src/server/game/BattleGrounds/BattleGround.cpp
+++ b/src/server/game/BattleGrounds/BattleGround.cpp
@@ -323,7 +323,7 @@ void BattleGround::Update(uint32 diff)
plr->ResurrectPlayer(1.0f);
plr->CastSpell(plr, 6962, true);
plr->CastSpell(plr, SPELL_SPIRIT_HEAL_MANA, true);
- ObjectAccessor::Instance().ConvertCorpseForPlayer(*itr);
+ sObjectAccessor.ConvertCorpseForPlayer(*itr);
}
m_ResurrectQueue.clear();
}
@@ -356,16 +356,16 @@ void BattleGround::Update(uint32 diff)
{
uint32 newtime = m_PrematureCountDownTimer - diff;
// announce every minute
- if (newtime > (MINUTE * IN_MILISECONDS))
+ if (newtime > (MINUTE * IN_MILLISECONDS))
{
- if (newtime / (MINUTE * IN_MILISECONDS) != m_PrematureCountDownTimer / (MINUTE * IN_MILISECONDS))
- PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILISECONDS)));
+ if (newtime / (MINUTE * IN_MILLISECONDS) != m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS))
+ PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / (MINUTE * IN_MILLISECONDS)));
}
else
{
//announce every 15 seconds
- if (newtime / (15 * IN_MILISECONDS) != m_PrematureCountDownTimer / (15 * IN_MILISECONDS))
- PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / IN_MILISECONDS));
+ if (newtime / (15 * IN_MILLISECONDS) != m_PrematureCountDownTimer / (15 * IN_MILLISECONDS))
+ PSendMessageToAll(LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS, CHAT_MSG_SYSTEM, NULL, (uint32)(m_PrematureCountDownTimer / IN_MILLISECONDS));
}
m_PrematureCountDownTimer = newtime;
}
@@ -436,7 +436,7 @@ void BattleGround::Update(uint32 diff)
AuraApplication * aurApp = iter->second;
Aura * aura = aurApp->GetBase();
if (!aura->IsPermanent()
- && aura->GetDuration() <= 30*IN_MILISECONDS
+ && aura->GetDuration() <= 30*IN_MILLISECONDS
&& aurApp->IsPositive()
&& (!(aura->GetSpellProto()->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
&& (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY)))
@@ -856,7 +856,7 @@ void BattleGround::EndBattleGround(uint32 winner)
uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const
{
//variable kills means how many honorable kills you scored (so we need kills * honor_for_one_kill)
- uint32 maxLevel = (GetMaxLevel()<80)?GetMaxLevel():80;
+ uint32 maxLevel = (GetMaxLevel() < 80) ? GetMaxLevel() : 80;
return Trinity::Honor::hk_honor_at_level(maxLevel, kills);
}
@@ -1525,7 +1525,7 @@ Creature* BattleGround::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
/*
void BattleGround::SpawnBGCreature(uint32 type, uint32 respawntime)
{
- Map * map = MapManager::Instance().FindMap(GetMapId(),GetInstanceId());
+ Map * map = sMapMgr.FindMap(GetMapId(),GetInstanceId());
if (!map)
return false;
@@ -1962,4 +1962,4 @@ void BattleGround::RewardXPAtKill(Player* plr, Player* victim)
if (Pet* pet = plr->GetPet())
pet->GivePetXP(xp);
}
-} \ No newline at end of file
+}
diff --git a/src/server/game/BattleGrounds/BattleGroundMgr.cpp b/src/server/game/BattleGrounds/BattleGroundMgr.cpp
index 3bbe8c3cf31..2450cfe6e24 100644
--- a/src/server/game/BattleGrounds/BattleGroundMgr.cpp
+++ b/src/server/game/BattleGrounds/BattleGroundMgr.cpp
@@ -22,7 +22,7 @@
#include "ObjectMgr.h"
#include "World.h"
#include "WorldPacket.h"
-#include "Policies/SingletonImp.h"
+
#include "ArenaTeam.h"
#include "BattleGroundMgr.h"
@@ -49,8 +49,6 @@
#include "SharedDefines.h"
#include "Formulas.h"
-INSTANTIATE_SINGLETON_1(BattleGroundMgr);
-
/*********************************************************/
/*** BATTLEGROUND QUEUE SYSTEM ***/
/*********************************************************/
@@ -1271,8 +1269,8 @@ void BattleGroundMgr::BuildBattleGroundStatusPacket(WorldPacket *data, BattleGro
*data << uint32(bg->GetTypeID());
*data << uint16(0x1F90);
// End of uint64 segment, decomposed this way for simplicity
- *data << uint8(0); // 3.3.0
- *data << uint8(0); // 3.3.0
+ *data << uint8(0); // 3.3.0, some level, only saw 80...
+ *data << uint8(0); // 3.3.0, some level, only saw 80...
*data << uint32(bg->GetClientInstanceID());
// alliance/horde for BG and skirmish/rated for Arenas
// following displays the minimap-icon 0 = faction icon 1 = arenaicon
@@ -1287,10 +1285,12 @@ void BattleGroundMgr::BuildBattleGroundStatusPacket(WorldPacket *data, BattleGro
break;
case STATUS_WAIT_JOIN: // status_invite
*data << uint32(bg->GetMapId()); // map id
+ *data << uint64(0); // 3.3.5, unknown
*data << uint32(Time1); // time to remove from queue, milliseconds
break;
case STATUS_IN_PROGRESS: // status_in_progress
*data << uint32(bg->GetMapId()); // map id
+ *data << uint64(0); // 3.3.5, unknown
*data << uint32(Time1); // time to bg auto leave, 0 at bg start, 120000 after bg end, milliseconds
*data << uint32(Time2); // time from bg start, milliseconds
*data << uint8(/*bg->isArena() ? 0 :*/ 1); // unk, possibly 0 == preparation phase, 1 == battle
@@ -1629,8 +1629,11 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
return 0;
}
+ // set battelground difficulty before initialization
+ bg->SetBracket(bracketEntry);
+
// generate a new instance id
- bg->SetInstanceID(MapManager::Instance().GenerateInstanceId()); // set instance id
+ bg->SetInstanceID(sMapMgr.GenerateInstanceId()); // set instance id
bg->SetClientInstanceID(CreateClientVisibleInstanceId(isRandom ? BATTLEGROUND_RB : bgTypeId, bracketEntry->GetBracketId()));
// reset the new bg (set status to status_wait_queue from status_none)
@@ -1638,7 +1641,6 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
// start the joining of the bg
bg->SetStatus(STATUS_WAIT_JOIN);
- bg->SetBracket(bracketEntry);
bg->SetArenaType(arenaType);
bg->SetRated(isRated);
bg->SetRandom(isRandom);
@@ -1893,8 +1895,8 @@ void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint6
uint32 win_arena = plr->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;
uint32 loos_kills = plr->GetRandomWinner() ? BG_REWARD_LOOSER_HONOR_LAST : BG_REWARD_LOOSER_HONOR_FIRST;
- win_kills = (uint32)Trinity::Honor::hk_honor_at_level(plr->getLevel(), win_kills);
- loos_kills = (uint32)Trinity::Honor::hk_honor_at_level(plr->getLevel(), loos_kills);
+ win_kills = Trinity::Honor::hk_honor_at_level(plr->getLevel(), win_kills);
+ loos_kills = Trinity::Honor::hk_honor_at_level(plr->getLevel(), loos_kills);
data->Initialize(SMSG_BATTLEFIELD_LIST);
*data << uint64(guid); // battlemaster guid
diff --git a/src/server/game/BattleGrounds/BattleGroundMgr.h b/src/server/game/BattleGrounds/BattleGroundMgr.h
index 569651a95b3..40dfc39b5e5 100644
--- a/src/server/game/BattleGrounds/BattleGroundMgr.h
+++ b/src/server/game/BattleGrounds/BattleGroundMgr.h
@@ -22,7 +22,7 @@
#define __BATTLEGROUNDMGR_H
#include "Common.h"
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
#include "DBCEnums.h"
#include "BattleGround.h"
@@ -180,9 +180,12 @@ class BGQueueRemoveEvent : public BasicEvent
class BattleGroundMgr
{
+ /// Todo: Thread safety?
+ /* Construction */
+ friend class ACE_Singleton<BattleGroundMgr, ACE_Null_Mutex>;
+ BattleGroundMgr();
+
public:
- /* Construction */
- BattleGroundMgr();
~BattleGroundMgr();
void Update(uint32 diff);
@@ -271,6 +274,6 @@ class BattleGroundMgr
bool m_Testing;
};
-#define sBattleGroundMgr Trinity::Singleton<BattleGroundMgr>::Instance()
+#define sBattleGroundMgr (*ACE_Singleton<BattleGroundMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundAV.cpp b/src/server/game/BattleGrounds/Zones/BattleGroundAV.cpp
index 7f5482cbf16..b477d6723fe 100644
--- a/src/server/game/BattleGrounds/Zones/BattleGroundAV.cpp
+++ b/src/server/game/BattleGrounds/Zones/BattleGroundAV.cpp
@@ -23,9 +23,9 @@
#include "BattleGround.h"
#include "BattleGroundAV.h"
-#include "Formulas.h"
+#include "Miscellaneous/Formulas.h"
#include "GameObject.h"
-#include "Language.h"
+#include "Miscellaneous/Language.h"
#include "Player.h"
#include "SpellAuras.h"
diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundEY.h b/src/server/game/BattleGrounds/Zones/BattleGroundEY.h
index 4fe23c4c821..6b1ec6ced59 100644
--- a/src/server/game/BattleGrounds/Zones/BattleGroundEY.h
+++ b/src/server/game/BattleGrounds/Zones/BattleGroundEY.h
@@ -25,8 +25,8 @@
class BattleGround;
-#define BG_EY_FLAG_RESPAWN_TIME (8*IN_MILISECONDS) //8 seconds
-#define BG_EY_FPOINTS_TICK_TIME (2*IN_MILISECONDS) //2 seconds
+#define BG_EY_FLAG_RESPAWN_TIME (8*IN_MILLISECONDS) //8 seconds
+#define BG_EY_FPOINTS_TICK_TIME (2*IN_MILLISECONDS) //2 seconds
enum BG_EY_WorldStates
{
diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundSA.h b/src/server/game/BattleGrounds/Zones/BattleGroundSA.h
index 760be3ca02e..f1299fbb4a4 100644
--- a/src/server/game/BattleGrounds/Zones/BattleGroundSA.h
+++ b/src/server/game/BattleGrounds/Zones/BattleGroundSA.h
@@ -197,7 +197,7 @@ const float BG_SA_ObjSpawnlocs[BG_SA_MAXOBJ][4] =
{ 1431.3413f, -219.437f, 30.893f, 0.9736f },
{ 1227.667f, -212.555f, 55.372f, 0.5023f },
{ 1214.681f, 81.21f, 53.413f, 5.745f },
- { 878.555f, -108.989f, 119.835f, 0.0565f },
+ { 878.555f, -108.2f, 117.845f, 0.0f },
{ 836.5f, -108.8f, 120.219f, 0.0f },
//Ships
{ 2679.696777, -826.891235, 3.712860, 5.78367f}, //rot2 1 rot3 0.0002
diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundWS.cpp b/src/server/game/BattleGrounds/Zones/BattleGroundWS.cpp
index 71872511274..2521e93ebcf 100644
--- a/src/server/game/BattleGrounds/Zones/BattleGroundWS.cpp
+++ b/src/server/game/BattleGrounds/Zones/BattleGroundWS.cpp
@@ -70,7 +70,7 @@ void BattleGroundWS::Update(uint32 diff)
if (GetStatus() == STATUS_IN_PROGRESS)
{
- if (GetStartTime() >= 25*MINUTE*IN_MILISECONDS) // Òàéìåð òèêàòü íà÷èíàåò ïîñëå 25 ìèíóò
+ if (GetStartTime() >= 25*MINUTE*IN_MILLISECONDS)
{
if (GetTeamScore(ALLIANCE) == 0)
{
@@ -83,15 +83,15 @@ void BattleGroundWS::Update(uint32 diff)
else if (GetTeamScore(HORDE) == 0)
EndBattleGround(ALLIANCE); // Alliance has > 0, Horde has 0, alliance wins
- else if (GetTeamScore(HORDE) == GetTeamScore(ALLIANCE)) // Team score equal, winner is team that scored the first flag
- EndBattleGround(m_FirstFlagCaptureTeam);
+ else if (GetTeamScore(HORDE) == GetTeamScore(ALLIANCE)) // Team score equal, winner is team that scored the last flag
+ EndBattleGround(m_LastFlagCaptureTeam);
else if (GetTeamScore(HORDE) > GetTeamScore(ALLIANCE)) // Last but not least, check who has the higher score
EndBattleGround(HORDE);
else
EndBattleGround(ALLIANCE);
}
- else if (GetStartTime() > m_minutesElapsed*MINUTE*IN_MILISECONDS)
+ else if (GetStartTime() > m_minutesElapsed*MINUTE*IN_MILLISECONDS)
{
++m_minutesElapsed;
UpdateWorldState(BG_WS_STATE_TIMER, 25-m_minutesElapsed);
@@ -325,8 +325,8 @@ void BattleGroundWS::EventPlayerCapturedFlag(Player *Source)
// only flag capture should be updated
UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1); // +1 flag captures
- if (!m_FirstFlagCaptureTeam)
- SetFirstFlagCapture(Source->GetTeam());
+ // update last flag capture to be used if teamscore is equal
+ SetLastFlagCapture(Source->GetTeam());
if (GetTeamScore(ALLIANCE) == BG_WS_MAX_TEAM_SCORE)
winner = ALLIANCE;
@@ -720,7 +720,7 @@ void BattleGroundWS::Reset()
m_HonorEndKills = (isBGWeekend) ? 4 : 2;
// For WorldState
m_minutesElapsed = 0;
- m_FirstFlagCaptureTeam = 0;
+ m_LastFlagCaptureTeam = 0;
/* Spirit nodes is static at this BG and then not required deleting at BG reset.
if (m_BgCreatures[WS_SPIRIT_MAIN_ALLIANCE])
diff --git a/src/server/game/BattleGrounds/Zones/BattleGroundWS.h b/src/server/game/BattleGrounds/Zones/BattleGroundWS.h
index 1a733c14570..ff3a3c893ff 100644
--- a/src/server/game/BattleGrounds/Zones/BattleGroundWS.h
+++ b/src/server/game/BattleGrounds/Zones/BattleGroundWS.h
@@ -191,7 +191,7 @@ class BattleGroundWS : public BattleGround
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
void UpdateFlagState(uint32 team, uint32 value);
- void SetFirstFlagCapture(uint32 team) { m_FirstFlagCaptureTeam = team; }
+ void SetLastFlagCapture(uint32 team) { m_LastFlagCaptureTeam = team; }
void UpdateTeamScore(uint32 team);
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value, bool doAddHonor = true);
void SetDroppedFlagGUID(uint64 guid, uint32 TeamID) { m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)] = guid;}
@@ -209,7 +209,7 @@ class BattleGroundWS : public BattleGround
uint8 m_FlagState[2]; // for checking flag state
int32 m_FlagsTimer[2];
int32 m_FlagsDropTimer[2];
- uint32 m_FirstFlagCaptureTeam; // Winner is based on this if score is equal
+ uint32 m_LastFlagCaptureTeam; // Winner is based on this if score is equal
uint32 m_ReputationCapture;
uint32 m_HonorWinKills;
diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt
index 44fe870baa4..d1a9fac4f16 100644
--- a/src/server/game/CMakeLists.txt
+++ b/src/server/game/CMakeLists.txt
@@ -1,373 +1,263 @@
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+######## game ########
+
# Enable precompiled headers when using the GCC compiler.
-IF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-ENDIF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
+if(DO_PCH)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+endif()
-SET(game_STAT_SRCS
- Account/AccountMgr.cpp
- Account/AccountMgr.h
- Achievements/AchievementMgr.h
- Achievements/AchievementMgr.cpp
- Addons/AddonMgr.cpp
- Addons/AddonMgr.h
- Addons/AddonHandler.cpp
- Addons/AddonHandler.h
- AI/AuctionHouseBot/AuctionHouseBot.cpp
- AI/AuctionHouseBot/AuctionHouseBot.h
- AI/EventAI/CreatureEventAI.cpp
- AI/EventAI/CreatureEventAIMgr.cpp
- AI/ScriptedAI/ScriptedSmartAI.cpp
- AI/ScriptedAI/ScriptedSmartAI.h
- AI/CombatAI.cpp
- AI/CombatAI.h
- AI/CreatureAI.cpp
- AI/CreatureAI.h
- AI/CreatureAIFactory.h
- AI/CreatureAIImpl.h
- AI/CreatureAIRegistry.cpp
- AI/CreatureAIRegistry.h
- AI/CreatureAISelector.cpp
- AI/CreatureAISelector.h
- AI/GuardAI.cpp
- AI/GuardAI.h
- AI/PassiveAI.cpp
- AI/PassiveAI.h
- AI/PetAI.cpp
- AI/PetAI.h
- AI/ReactorAI.cpp
- AI/ReactorAI.h
- AI/TotemAI.cpp
- AI/TotemAI.h
- AI/UnitAI.cpp
- AI/UnitAI.h
- AuctionHouse/AuctionHouseHandler.cpp
- AuctionHouse/AuctionHouseMgr.cpp
- AuctionHouse/AuctionHouseMgr.h
- BattleGrounds/ArenaTeam.cpp
- BattleGrounds/ArenaTeam.h
- BattleGrounds/ArenaTeamHandler.cpp
- BattleGrounds/BattleGround.cpp
- BattleGrounds/BattleGroundAA.cpp
- BattleGrounds/BattleGroundAB.cpp
- BattleGrounds/BattleGroundRB.cpp
- BattleGrounds/BattleGroundAV.cpp
- BattleGrounds/BattleGroundBE.cpp
- BattleGrounds/BattleGroundDS.cpp
- BattleGrounds/BattleGroundEY.cpp
- BattleGrounds/BattleGroundIC.cpp
- BattleGrounds/BattleGroundNA.cpp
- BattleGrounds/BattleGroundRL.cpp
- BattleGrounds/BattleGroundRV.cpp
- BattleGrounds/BattleGroundSA.cpp
- BattleGrounds/BattleGroundWS.cpp
- BattleGrounds/BattleGround.h
- BattleGrounds/BattleGroundAA.h
- BattleGrounds/BattleGroundAB.h
- BattleGrounds/BattleGroundRB.h
- BattleGrounds/BattleGroundAV.h
- BattleGrounds/BattleGroundBE.h
- BattleGrounds/BattleGroundDS.h
- BattleGrounds/BattleGroundEY.h
- BattleGrounds/BattleGroundIC.h
- BattleGrounds/BattleGroundNA.h
- BattleGrounds/BattleGroundRL.h
- BattleGrounds/BattleGroundRV.h
- BattleGrounds/BattleGroundSA.h
- BattleGrounds/BattleGroundWS.h
- BattleGrounds/BattleGroundHandler.cpp
- BattleGrounds/BattleGroundMgr.cpp
- BattleGrounds/BattleGroundMgr.h
- Calendar/Calendar.cpp
- Calendar/Calendar.h
- Calendar/CalendarHandler.cpp
- Chat/Channel.cpp
- Chat/Channel.h
- Chat/ChannelHandler.cpp
- Chat/ChannelMgr.h
- Chat/ChannelMgr.cpp
- Chat/Chat.cpp
- Chat/Chat.h
- Chat/ChatHandler.cpp
- Chat/Debugcmds.cpp
- Chat/Level0.cpp
- Chat/Level1.cpp
- Chat/Level2.cpp
- Chat/Level3.cpp
- Combat/CombatHandler.cpp
- Combat/HostileRefManager.cpp
- Combat/HostileRefManager.h
- Combat/ThreatManager.cpp
- Combat/ThreatManager.h
- ConditionMgr/ConditionMgr.cpp
- ConditionMgr/ConditionMgr.h
- DataStores/DBCEnums.h
- DataStores/DBCStores.cpp
- DataStores/DBCStores.h
- DataStores/DBCStructure.h
- DataStores/DBCfmt.h
- Entities/Creature/Creature.cpp
- Entities/Creature/Creature.h
- Entities/Creature/CreatureGroups.cpp
- Entities/Creature/CreatureGroups.h
- Entities/Creature/GossipDef.cpp
- Entities/Creature/GossipDef.h
- Entities/Creature/NPCHandler.cpp
- Entities/Creature/NPCHandler.h
- Entities/Creature/TemporarySummon.cpp
- Entities/Creature/TemporarySummon.h
- Entities/GameObject/GameObject.cpp
- Entities/GameObject/GameObject.h
- Entities/Item/Bag.cpp
- Entities/Item/Bag.h
- Entities/Item/Item.cpp
- Entities/Item/Item.h
- Entities/Item/ItemEnchantmentMgr.cpp
- Entities/Item/ItemEnchantmentMgr.h
- Entities/Item/ItemHandler.cpp
- Entities/Item/ItemPrototype.h
- Entities/Object/Corpse.cpp
- Entities/Object/Corpse.h
- Entities/Object/DynamicObject.cpp
- Entities/Object/DynamicObject.h
- Entities/Object/ObjectAccessor.cpp
- Entities/Object/ObjectAccessor.h
- Entities/Object/Object.cpp
- Entities/Object/ObjectDefines.h
- Entities/Object/Object.h
- Entities/Object/ObjectMgr.cpp
- Entities/Object/ObjectMgr.h
- Entities/Object/UpdateData.cpp
- Entities/Object/UpdateData.h
- Entities/Object/UpdateFields.h
- Entities/Object/UpdateMask.h
- Entities/Pet/Pet.cpp
- Entities/Pet/Pet.h
- Entities/Pet/PetHandler.cpp
- Entities/Player/DuelHandler.cpp
- Entities/Player/MiscHandler.cpp
- Entities/Player/PetitionsHandler.cpp
- Entities/Player/Player.cpp
- Entities/Player/Player.h
- Entities/Player/SocialMgr.cpp
- Entities/Player/SocialMgr.h
- Entities/Player/TicketHandler.cpp
- Entities/Player/TradeHandler.cpp
- Entities/Player/VoiceChatHandler.cpp
- Entities/Player/CharacterHandler.cpp
- Entities/Unit/StatSystem.cpp
- Entities/Unit/Unit.cpp
- Entities/Unit/Unit.h
- Entities/Totem/Totem.cpp
- Entities/Totem/Totem.h
- Entities/Vehicle/Vehicle.cpp
- Entities/Vehicle/Vehicle.h
- Events/GameEventMgr.cpp
- Events/GameEventMgr.h
- Events/GlobalEvents.cpp
- Events/GlobalEvents.h
- Events/UnitEvents.h
- Globals/Formulas.h
- Globals/Language.h
- Globals/SharedDefines.h
- Groups/Group.cpp
- Groups/Group.h
- Groups/GroupHandler.cpp
- Groups/GroupReference.cpp
- Groups/GroupReference.h
- Groups/GroupRefManager.h
- Guilds/Guild.cpp
- Guilds/Guild.h
- Guilds/GuildHandler.cpp
- Instances/InstanceData.cpp
- Instances/InstanceData.h
- Instances/InstanceSaveMgr.cpp
- Instances/InstanceSaveMgr.h
- LookingForGroup/LFG.h
- LookingForGroup/LFGHandler.cpp
- LookingForGroup/LFGMgr.cpp
- LookingForGroup/LFGMgr.h
- Loot/LootHandler.cpp
- Loot/LootMgr.cpp
- Loot/LootMgr.h
- Mails/Mail.cpp
- Mails/Mail.h
- Map/Cell/Cell.h
- Map/Cell/CellImpl.h
- Map/Grid/GridDefines.h
- Map/Grid/GridNotifiers.cpp
- Map/Grid/GridNotifiers.h
- Map/Grid/GridNotifiersImpl.h
- Map/Grid/GridStates.cpp
- Map/Grid/GridStates.h
- Map/Grid/ObjectGridLoader.cpp
- Map/Grid/ObjectGridLoader.h
- Map/Map.cpp
- Map/Map.h
- Map/MapInstanced.cpp
- Map/MapInstanced.h
- Map/MapManager.cpp
- Map/MapManager.h
- Map/MapUpdater.cpp
- Map/MapUpdater.h
- Map/MapReference.h
- Map/MapRefManager.h
- Map/ObjectPosSelector.cpp
- Map/ObjectPosSelector.h
- Map/ZoneScript.h
- Movement/MovementGenerators/ConfusedMovementGenerator.cpp
- Movement/MovementGenerators/ConfusedMovementGenerator.h
- Movement/MovementGenerators/FleeingMovementGenerator.cpp
- Movement/MovementGenerators/FleeingMovementGenerator.h
- Movement/MovementGenerators/HomeMovementGenerator.cpp
- Movement/MovementGenerators/HomeMovementGenerator.h
- Movement/MovementGenerators/IdleMovementGenerator.cpp
- Movement/MovementGenerators/IdleMovementGenerator.h
- Movement/MovementGenerators/MovementGenerator.cpp
- Movement/MovementGenerators/MovementGenerator.h
- Movement/MovementGenerators/MovementGeneratorImpl.h
- Movement/MovementGenerators/PointMovementGenerator.cpp
- Movement/MovementGenerators/PointMovementGenerator.h
- Movement/MovementGenerators/RandomMovementGenerator.cpp
- Movement/MovementGenerators/RandomMovementGenerator.h
- Movement/MovementGenerators/TargetedMovementGenerator.cpp
- Movement/MovementGenerators/TargetedMovementGenerator.h
- Movement/MovementGenerators/WaypointMovementGenerator.cpp
- Movement/MovementGenerators/WaypointMovementGenerator.h
- Movement/DestinationHolder.cpp
- Movement/DestinationHolder.h
- Movement/DestinationHolderImp.h
- Movement/FollowerReference.cpp
- Movement/FollowerReference.h
- Movement/FollowerRefManager.h
- Movement/MotionMaster.cpp
- Movement/MotionMaster.h
- Movement/MovementHandler.cpp
- Movement/Path.h
- Movement/TaxiHandler.cpp
- Movement/Transports.cpp
- Movement/Transports.h
- Movement/Traveller.h
- Movement/WaypointManager.cpp
- Movement/WaypointManager.h
- Opcodes/Opcodes.cpp
- Opcodes/Opcodes.h
- OutdoorPvP/OutdoorPvP.cpp
- OutdoorPvP/OutdoorPvP.h
- OutdoorPvP/OutdoorPvPEP.cpp
- OutdoorPvP/OutdoorPvPEP.h
- OutdoorPvP/OutdoorPvPHP.cpp
- OutdoorPvP/OutdoorPvPHP.h
- OutdoorPvP/OutdoorPvPImpl.h
- OutdoorPvP/OutdoorPvPMgr.cpp
- OutdoorPvP/OutdoorPvPMgr.h
- OutdoorPvP/OutdoorPvPNA.cpp
- OutdoorPvP/OutdoorPvPNA.h
- OutdoorPvP/OutdoorPvPSI.cpp
- OutdoorPvP/OutdoorPvPSI.h
- OutdoorPvP/OutdoorPvPTF.cpp
- OutdoorPvP/OutdoorPvPTF.h
- OutdoorPvP/OutdoorPvPZM.cpp
- OutdoorPvP/OutdoorPvPZM.h
- Pools/PoolHandler.cpp
- Pools/PoolHandler.h
- Quests/QueryHandler.cpp
- Quests/QuestDef.cpp
- Quests/QuestDef.h
- Quests/QuestHandler.cpp
- Reputation/ReputationMgr.cpp
- Reputation/ReputationMgr.h
- ScriptMgr/ScriptLoader.cpp
- ScriptMgr/ScriptLoader.h
- ScriptMgr/ScriptMgr.cpp
- ScriptMgr/ScriptMgr.h
- ScriptMgr/ScriptSystem.cpp
- ScriptMgr/ScriptSystem.h
- Skills/SkillHandler.cpp
- Skills/SkillDiscovery.cpp
- Skills/SkillDiscovery.h
- Skills/SkillExtraItems.cpp
- Skills/SkillExtraItems.h
- Spells/Auras/SpellAuraDefines.h
- Spells/Auras/SpellAuras.cpp
- Spells/Auras/SpellAuras.h
- Spells/Auras/SpellAuraEffects.cpp
- Spells/Auras/SpellAuraEffects.h
- Spells/Auras/SpellEffects.cpp
- Spells/Spell.cpp
- Spells/Spell.h
- Spells/SpellHandler.cpp
- Spells/SpellMgr.cpp
- Spells/SpellMgr.h
- Tools/PlayerDump.cpp
- Tools/PlayerDump.h
- Tools/Tools.cpp
- Tools/Tools.h
- Weather/Weather.cpp
- Weather/Weather.h
- World/World.cpp
- World/World.h
- World/WorldLog.cpp
- World/WorldLog.h
- World/WorldSession.cpp
- World/WorldSession.h
- World/WorldSocket.cpp
- World/WorldSocket.h
- World/WorldSocketMgr.cpp
- World/WorldSocketMgr.h
+# Create game-libary
+set(game_STAT_SRCS
+ Accounts/AccountMgr.cpp
+ Achievements/AchievementMgr.cpp
+ Addons/AddonMgr.cpp
+ AI/CoreAI/CombatAI.cpp
+ AI/CoreAI/GuardAI.cpp
+ AI/CoreAI/PassiveAI.cpp
+ AI/CoreAI/PetAI.cpp
+ AI/CoreAI/ReactorAI.cpp
+ AI/CoreAI/TotemAI.cpp
+ AI/CoreAI/UnitAI.cpp
+ AI/EventAI/CreatureEventAI.cpp
+ AI/EventAI/CreatureEventAIMgr.cpp
+ AI/ScriptedAI/ScriptedSmartAI.cpp
+ AI/CreatureAIRegistry.cpp
+ AI/CreatureAISelector.cpp
+ AI/CreatureAI.cpp
+ AuctionHouse/AuctionHouseMgr.cpp
+ AuctionHouse/AuctionHouseBot/AuctionHouseBot.cpp
+ BattleGrounds/ArenaTeam.cpp
+ BattleGrounds/Zones/BattleGroundAA.cpp
+ BattleGrounds/Zones/BattleGroundAB.cpp
+ BattleGrounds/Zones/BattleGroundRB.cpp
+ BattleGrounds/Zones/BattleGroundAV.cpp
+ BattleGrounds/Zones/BattleGroundBE.cpp
+ BattleGrounds/Zones/BattleGroundDS.cpp
+ BattleGrounds/Zones/BattleGroundEY.cpp
+ BattleGrounds/Zones/BattleGroundIC.cpp
+ BattleGrounds/Zones/BattleGroundNA.cpp
+ BattleGrounds/Zones/BattleGroundRL.cpp
+ BattleGrounds/Zones/BattleGroundRV.cpp
+ BattleGrounds/Zones/BattleGroundSA.cpp
+ BattleGrounds/Zones/BattleGroundWS.cpp
+ BattleGrounds/BattleGround.cpp
+ BattleGrounds/BattleGroundMgr.cpp
+ Calendar/Calendar.cpp
+ Chat/Channels/Channel.cpp
+ Chat/Channels/ChannelMgr.cpp
+ Chat/Commands/Debugcmds.cpp
+ Chat/Commands/Level0.cpp
+ Chat/Commands/Level1.cpp
+ Chat/Commands/Level2.cpp
+ Chat/Commands/Level3.cpp
+ Chat/Chat.cpp
+ Combat/HostileRefManager.cpp
+ Combat/ThreatManager.cpp
+ Conditions/ConditionMgr.cpp
+ DataStores/DBCStores.cpp
+ DungeonFinding/LFGMgr.cpp
+ Entities/Corpse/Corpse.cpp
+ Entities/Creature/Creature.cpp
+ Entities/Creature/CreatureGroups.cpp
+ Entities/Creature/GossipDef.cpp
+ Entities/Creature/TemporarySummon.cpp
+ Entities/DynamicObject/DynamicObject.cpp
+ Entities/GameObject/GameObject.cpp
+ Entities/Item/Container/Bag.cpp
+ Entities/Item/Item.cpp
+ Entities/Item/ItemEnchantmentMgr.cpp
+ Entities/Object/Updates/UpdateData.cpp
+ Entities/Object/Object.cpp
+ Entities/Object/ObjectPosSelector.cpp
+ Entities/Pet/Pet.cpp
+ Entities/Player/Player.cpp
+ Entities/Player/SocialMgr.cpp
+ Entities/Unit/StatSystem.cpp
+ Entities/Unit/Unit.cpp
+ Entities/Totem/Totem.cpp
+ Entities/Transport/Transport.cpp
+ Entities/Vehicle/Vehicle.cpp
+ Events/GameEventMgr.cpp
+ Globals/GlobalEvents.cpp
+ Globals/ObjectAccessor.cpp
+ Globals/ObjectMgr.cpp
+ Grids/Notifiers/GridNotifiers.cpp
+ Grids/GridStates.cpp
+ Grids/ObjectGridLoader.cpp
+ Groups/Group.cpp
+ Groups/GroupReference.cpp
+ Guilds/Guild.cpp
+ Instances/InstanceData.cpp
+ Instances/InstanceSaveMgr.cpp
+ Loot/LootMgr.cpp
+ Mails/Mail.cpp
+ Maps/Map.cpp
+ Maps/MapInstanced.cpp
+ Maps/MapManager.cpp
+ Maps/MapUpdater.cpp
+ Movement/MovementGenerators/ConfusedMovementGenerator.cpp
+ Movement/MovementGenerators/FleeingMovementGenerator.cpp
+ Movement/MovementGenerators/HomeMovementGenerator.cpp
+ Movement/MovementGenerators/IdleMovementGenerator.cpp
+ Movement/MovementGenerators/PointMovementGenerator.cpp
+ Movement/MovementGenerators/RandomMovementGenerator.cpp
+ Movement/MovementGenerators/TargetedMovementGenerator.cpp
+ Movement/MovementGenerators/WaypointMovementGenerator.cpp
+ Movement/Waypoints/WaypointManager.cpp
+ Movement/DestinationHolder.cpp
+ Movement/FollowerReference.cpp
+ Movement/MotionMaster.cpp
+ Movement/MovementGenerator.cpp
+ OutdoorPvP/Zones/OutdoorPvPEP.cpp
+ OutdoorPvP/Zones/OutdoorPvPHP.cpp
+ OutdoorPvP/Zones/OutdoorPvPNA.cpp
+ OutdoorPvP/Zones/OutdoorPvPSI.cpp
+ OutdoorPvP/Zones/OutdoorPvPTF.cpp
+ OutdoorPvP/Zones/OutdoorPvPZM.cpp
+ OutdoorPvP/OutdoorPvP.cpp
+ OutdoorPvP/OutdoorPvPMgr.cpp
+ Pools/PoolMgr.cpp
+ Quests/QuestDef.cpp
+ Reputation/ReputationMgr.cpp
+ Scripting/ScriptLoader.cpp
+ Scripting/ScriptMgr.cpp
+ Scripting/ScriptSystem.cpp
+ Server/Protocol/Handlers/AddonHandler.cpp
+ Server/Protocol/Handlers/ArenaTeamHandler.cpp
+ Server/Protocol/Handlers/AuctionHouseHandler.cpp
+ Server/Protocol/Handlers/BattleGroundHandler.cpp
+ Server/Protocol/Handlers/CalendarHandler.cpp
+ Server/Protocol/Handlers/ChannelHandler.cpp
+ Server/Protocol/Handlers/CharacterHandler.cpp
+ Server/Protocol/Handlers/ChatHandler.cpp
+ Server/Protocol/Handlers/CombatHandler.cpp
+ Server/Protocol/Handlers/DuelHandler.cpp
+ Server/Protocol/Handlers/GroupHandler.cpp
+ Server/Protocol/Handlers/GuildHandler.cpp
+ Server/Protocol/Handlers/ItemHandler.cpp
+ Server/Protocol/Handlers/LFGHandler.cpp
+ Server/Protocol/Handlers/LootHandler.cpp
+ Server/Protocol/Handlers/MiscHandler.cpp
+ Server/Protocol/Handlers/MovementHandler.cpp
+ Server/Protocol/Handlers/NPCHandler.cpp
+ Server/Protocol/Handlers/PetHandler.cpp
+ Server/Protocol/Handlers/PetitionsHandler.cpp
+ Server/Protocol/Handlers/QueryHandler.cpp
+ Server/Protocol/Handlers/QuestHandler.cpp
+ Server/Protocol/Handlers/SkillHandler.cpp
+ Server/Protocol/Handlers/SpellHandler.cpp
+ Server/Protocol/Handlers/TaxiHandler.cpp
+ Server/Protocol/Handlers/TicketHandler.cpp
+ Server/Protocol/Handlers/TradeHandler.cpp
+ Server/Protocol/Handlers/VoiceChatHandler.cpp
+ Server/Protocol/Opcodes.cpp
+ Server/Protocol/WorldLog.cpp
+ Server/WorldSession.cpp
+ Server/WorldSocket.cpp
+ Server/WorldSocketMgr.cpp
+ Skills/SkillDiscovery.cpp
+ Skills/SkillExtraItems.cpp
+ Spells/Auras/SpellAuras.cpp
+ Spells/Auras/SpellAuraEffects.cpp
+ Spells/Auras/SpellEffects.cpp
+ Spells/Spell.cpp
+ Spells/SpellMgr.cpp
+ Tools/PlayerDump.cpp
+ Tools/Tools.cpp
+ Weather/Weather.cpp
+ World/World.cpp
)
include_directories(
- ${ACE_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/dep/include
- ${CMAKE_SOURCE_DIR}/src/server/framework
+ ${CMAKE_SOURCE_DIR}/externals/mersennetwister
+ ${CMAKE_SOURCE_DIR}/externals/zlib
+ ${CMAKE_SOURCE_DIR}/src/server/collision
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Management
${CMAKE_SOURCE_DIR}/src/server/shared
- ${CMAKE_SOURCE_DIR}/src/server/shared/vmap
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography/Authentication
${CMAKE_SOURCE_DIR}/src/server/shared/Database
+ ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/CountedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Logging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Policies
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Threading
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
${CMAKE_SOURCE_DIR}/src/server/game
- ${CMAKE_SOURCE_DIR}/src/server/game/Account
+ ${CMAKE_SOURCE_DIR}/src/server/game/Accounts
${CMAKE_SOURCE_DIR}/src/server/game/Achievements
${CMAKE_SOURCE_DIR}/src/server/game/Addons
${CMAKE_SOURCE_DIR}/src/server/game/AI
- ${CMAKE_SOURCE_DIR}/src/server/game/AI/AuctionHouseBot
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/CoreAI
${CMAKE_SOURCE_DIR}/src/server/game/AI/EventAI
${CMAKE_SOURCE_DIR}/src/server/game/AI/ScriptedAI
${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse
+ ${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse/AuctionHouseBot
${CMAKE_SOURCE_DIR}/src/server/game/BattleGrounds
+ ${CMAKE_SOURCE_DIR}/src/server/game/BattleGrounds/Zones
${CMAKE_SOURCE_DIR}/src/server/game/Calendar
${CMAKE_SOURCE_DIR}/src/server/game/Chat
+ ${CMAKE_SOURCE_DIR}/src/server/game/Chat/Channels
+ ${CMAKE_SOURCE_DIR}/src/server/game/Chat/Commands
${CMAKE_SOURCE_DIR}/src/server/game/Combat
- ${CMAKE_SOURCE_DIR}/src/server/game/ConditionMgr
+ ${CMAKE_SOURCE_DIR}/src/server/game/Conditions
${CMAKE_SOURCE_DIR}/src/server/game/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/game/DungeonFinding
${CMAKE_SOURCE_DIR}/src/server/game/Entities
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Creature
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Corpse
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/DynamicObject
${CMAKE_SOURCE_DIR}/src/server/game/Entities/GameObject
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item/Container
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object/Updates
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Pet
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Player
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Totem
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Unit
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Vehicle
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Transport
${CMAKE_SOURCE_DIR}/src/server/game/Events
${CMAKE_SOURCE_DIR}/src/server/game/Globals
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Cells
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids
${CMAKE_SOURCE_DIR}/src/server/game/Groups
${CMAKE_SOURCE_DIR}/src/server/game/Guilds
${CMAKE_SOURCE_DIR}/src/server/game/Instances
- ${CMAKE_SOURCE_DIR}/src/server/game/LookingForGroup
${CMAKE_SOURCE_DIR}/src/server/game/Loot
${CMAKE_SOURCE_DIR}/src/server/game/Mails
- ${CMAKE_SOURCE_DIR}/src/server/game/Map
- ${CMAKE_SOURCE_DIR}/src/server/game/Map/Cell
- ${CMAKE_SOURCE_DIR}/src/server/game/Map/Grid
+ ${CMAKE_SOURCE_DIR}/src/server/game/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/game/Miscellaneous
${CMAKE_SOURCE_DIR}/src/server/game/Movement
${CMAKE_SOURCE_DIR}/src/server/game/Movement/MovementGenerators
- ${CMAKE_SOURCE_DIR}/src/server/game/Opcodes
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Waypoints
${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP
+ ${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP/Zones
${CMAKE_SOURCE_DIR}/src/server/game/Pools
+ ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders
${CMAKE_SOURCE_DIR}/src/server/game/Quests
${CMAKE_SOURCE_DIR}/src/server/game/Reputation
- ${CMAKE_SOURCE_DIR}/src/server/game/ScriptMgr
+ ${CMAKE_SOURCE_DIR}/src/server/game/Scripting
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server
${CMAKE_SOURCE_DIR}/src/server/game/Skills
${CMAKE_SOURCE_DIR}/src/server/game/Spells
${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
@@ -375,33 +265,37 @@ include_directories(
${CMAKE_SOURCE_DIR}/src/server/game/Weather
${CMAKE_SOURCE_DIR}/src/server/game/World
${MYSQL_INCLUDE_DIR}
+ ${ACE_INCLUDE_DIR}
)
if(NOT DO_SCRIPTS)
- SET(game_STAT_SRCS ${game_STAT_SRCS}
- AI/ScriptedAI/ScriptedEscortAI.cpp
- AI/ScriptedAI/ScriptedEscortAI.h
- ScriptMgr/ScriptedPch.cpp
- ScriptMgr/ScriptedPch.h
- AI/ScriptedAI/ScriptedCreature.cpp
- AI/ScriptedAI/ScriptedCreature.h
- AI/ScriptedAI/ScriptedFollowerAI.cpp
- AI/ScriptedAI/ScriptedFollowerAI.h
- AI/ScriptedAI/ScriptedGossip.h
- AI/ScriptedAI/ScriptedGuardAI.cpp
- AI/ScriptedAI/ScriptedGuardAI.h
- AI/ScriptedAI/ScriptedInstance.h
- AI/ScriptedAI/ScriptedSimpleAI.cpp
- AI/ScriptedAI/ScriptedSimpleAI.h
- )
- message("-- Added Script Engine to GAME lib")
-endif(NOT DO_SCRIPTS)
+ set(game_STAT_SRCS
+ ${game_STAT_SRCS}
+ AI/ScriptedAI/ScriptedEscortAI.cpp
+ AI/ScriptedAI/ScriptedCreature.cpp
+ AI/ScriptedAI/ScriptedFollowerAI.cpp
+ AI/ScriptedAI/ScriptedGuardAI.cpp
+ AI/ScriptedAI/ScriptedSimpleAI.cpp
+ )
+ message("-- Added basic scriptAI-engines to GAME library")
+endif()
+
+# Add gamePCH.cpp to project on Windows
+if(MSVC)
+ set(game_STAT_SRCS
+ PrecompiledHeaders/gamePCH.cpp
+ ${game_STAT_SRCS})
+endif()
add_library(game STATIC ${game_STAT_SRCS})
-ADD_DEPENDENCIES(game revision.h)
-# Generate precompiled header
-IF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
- ADD_PRECOMPILED_HEADER(game ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/pchlinux.h)
-ENDIF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
+add_dependencies(game revision.h)
+# Generate precompiled header
+if(DO_PCH)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ add_precompiled_header(game ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/gamePCH.h)
+ elseif(MSVC)
+ add_native_precompiled_header(game ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/gamePCH)
+ endif()
+endif()
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 0047892972b..bb70e54354c 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -707,6 +707,14 @@ void Channel::Invite(uint64 p, const char *newname)
return;
}
+ if (IsBanned(newp->GetGUID()))
+ {
+ WorldPacket data;
+ MakePlayerInviteBanned(&data, newname);
+ SendToOne(&data, p);
+ return;
+ }
+
Player *plr = objmgr.GetPlayer(p);
if (!plr)
return;
@@ -983,10 +991,10 @@ void Channel::MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good)
}
// done 0x16
-void Channel::MakePlayerNotBanned(WorldPacket *data, uint64 guid)
+void Channel::MakePlayerNotBanned(WorldPacket *data, const std::string &name)
{
MakeNotifyPacket(data, CHAT_PLAYER_NOT_BANNED_NOTICE);
- *data << uint64(guid);
+ *data << name;
}
// done 0x17
@@ -1035,10 +1043,10 @@ void Channel::MakePlayerInvited(WorldPacket *data, const std::string& name)
}
// done 0x1E
-void Channel::MakePlayerInviteBanned(WorldPacket *data, uint64 guid)
+void Channel::MakePlayerInviteBanned(WorldPacket *data, const std::string& name)
{
MakeNotifyPacket(data, CHAT_PLAYER_INVITE_BANNED_NOTICE);
- *data << uint64(guid);
+ *data << name;
}
// done 0x1F
diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h
index d0b5923e30e..a52a697cba1 100644
--- a/src/server/game/Chat/Channels/Channel.h
+++ b/src/server/game/Chat/Channels/Channel.h
@@ -187,7 +187,7 @@ class Channel
void MakeBanned(WorldPacket *data); //? 0x13
void MakePlayerBanned(WorldPacket *data, uint64 bad, uint64 good); //? 0x14
void MakePlayerUnbanned(WorldPacket *data, uint64 bad, uint64 good); //? 0x15
- void MakePlayerNotBanned(WorldPacket *data, uint64 guid); //? 0x16
+ void MakePlayerNotBanned(WorldPacket *data, const std::string& name); //? 0x16
void MakePlayerAlreadyMember(WorldPacket *data, uint64 guid); //+ 0x17
void MakeInvite(WorldPacket *data, uint64 guid); //? 0x18
void MakeInviteWrongFaction(WorldPacket *data); //? 0x19
@@ -195,7 +195,7 @@ class Channel
void MakeInvalidName(WorldPacket *data); //? 0x1B
void MakeNotModerated(WorldPacket *data); //? 0x1C
void MakePlayerInvited(WorldPacket *data, const std::string& name); //+ 0x1D
- void MakePlayerInviteBanned(WorldPacket *data, uint64 guid); //? 0x1E
+ void MakePlayerInviteBanned(WorldPacket *data, const std::string &name);//? 0x1E
void MakeThrottled(WorldPacket *data); //? 0x1F
void MakeNotInArea(WorldPacket *data); //? 0x20
void MakeNotInLfg(WorldPacket *data); //? 0x21
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index f31d3ffde50..b72a2698d3a 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
@@ -17,21 +17,18 @@
*/
#include "ChannelMgr.h"
-#include "Policies/SingletonImp.h"
-#include "World.h"
-INSTANTIATE_SINGLETON_1(AllianceChannelMgr);
-INSTANTIATE_SINGLETON_1(HordeChannelMgr);
+#include "World.h"
ChannelMgr* channelMgr(uint32 team)
{
if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
- return &Trinity::Singleton<AllianceChannelMgr>::Instance(); // cross-faction
+ return ACE_Singleton<AllianceChannelMgr, ACE_Null_Mutex>::instance(); // cross-faction
if (team == ALLIANCE)
- return &Trinity::Singleton<AllianceChannelMgr>::Instance();
+ return ACE_Singleton<AllianceChannelMgr, ACE_Null_Mutex>::instance();
if (team == HORDE)
- return &Trinity::Singleton<HordeChannelMgr>::Instance();
+ return ACE_Singleton<HordeChannelMgr, ACE_Null_Mutex>::instance();
return NULL;
}
diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h
index 6f3b7c415ae..c4e872de6b6 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.h
+++ b/src/server/game/Chat/Channels/ChannelMgr.h
@@ -22,14 +22,11 @@
#include "Common.h"
#include "Channel.h"
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
#include <map>
#include <string>
-#include "Policies/Singleton.h"
-
-#include "Channel.h"
#include "World.h"
class ChannelMgr
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 6e1adffa625..f62dee975da 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -23,7 +23,7 @@
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "AccountMgr.h"
#include "CellImpl.h"
@@ -133,11 +133,13 @@ ChatCommand * ChatHandler::getCommandTable()
static ChatCommand channelSetCommandTable[] =
{
{ "public", SEC_ADMINISTRATOR, true, &ChatHandler::HandleChannelSetPublic, "", NULL },
+ { NULL, 0, false, NULL, "", NULL }
};
static ChatCommand channelCommandTable[] =
{
{ "set", SEC_ADMINISTRATOR, true, NULL, "", channelSetCommandTable },
+ { NULL, 0, false, NULL, "", NULL }
};
static ChatCommand debugPlayCommandTable[] =
@@ -460,6 +462,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "creature_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestInvRelationsCommand,"",NULL },
{ "creature_linked_respawn", SEC_GAMEMASTER, true, &ChatHandler::HandleReloadCreatureLinkedRespawnCommand, "", NULL },
{ "creature_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesCreatureCommand, "", NULL },
+ { "creature_onkill_reputation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadOnKillReputationCommand, "", NULL },
{ "creature_questrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestRelationsCommand, "", NULL },
{ "creature_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureTemplateCommand, "", NULL },
//{ "db_script_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadDbScriptStringCommand, "", NULL },
@@ -476,10 +479,12 @@ ChatCommand * ChatHandler::getCommandTable()
{ "gossip_menu_option", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadGossipMenuOptionCommand, "", NULL },
{ "item_enchantment_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemEnchantementsCommand, "", NULL },
{ "item_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesItemCommand, "", NULL },
+ { "item_set_names", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadItemSetNamesCommand, "", NULL },
{ "locales_achievement_reward", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesAchievementRewardCommand,"", NULL },
{ "locales_creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesCreatureCommand, "", NULL },
{ "locales_gameobject", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesGameobjectCommand, "", NULL },
{ "locales_item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesItemCommand, "", NULL },
+ { "locales_item_set_name", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesItemSetNameCommand, "", NULL },
{ "locales_npc_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesNpcTextCommand, "", NULL },
{ "locales_page_text", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPageTextCommand, "", NULL },
{ "locales_points_of_interest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLocalesPointsOfInterestCommand, "", NULL },
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index 58e6f6214c8..6b102129c8a 100644
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
@@ -364,6 +364,7 @@ class ChatHandler
bool HandleReloadEventAISummonsCommand(const char* args);
bool HandleReloadEventAIScriptsCommand(const char* args);
bool HandleReloadCommandCommand(const char* args);
+ bool HandleReloadOnKillReputationCommand(const char* args);
bool HandleReloadCreatureTemplateCommand(const char* args);
bool HandleReloadCreatureQuestRelationsCommand(const char* args);
bool HandleReloadCreatureQuestInvRelationsCommand(const char* args);
@@ -377,10 +378,12 @@ class ChatHandler
bool HandleReloadGOQuestRelationsCommand(const char* args);
bool HandleReloadGOQuestInvRelationsCommand(const char* args);
bool HandleReloadItemEnchantementsCommand(const char* args);
+ bool HandleReloadItemSetNamesCommand(const char* args);
bool HandleReloadLocalesAchievementRewardCommand(const char* args);
bool HandleReloadLocalesCreatureCommand(const char* args);
bool HandleReloadLocalesGameobjectCommand(const char* args);
bool HandleReloadLocalesItemCommand(const char* args);
+ bool HandleReloadLocalesItemSetNameCommand(const char* args);
bool HandleReloadLocalesNpcTextCommand(const char* args);
bool HandleReloadLocalesPageTextCommand(const char* args);
bool HandleReloadLocalesPointsOfInterestCommand(const char* args);
diff --git a/src/server/game/Chat/Commands/Debugcmds.cpp b/src/server/game/Chat/Commands/Debugcmds.cpp
index ee8c623c3d0..a6c973ea002 100644
--- a/src/server/game/Chat/Commands/Debugcmds.cpp
+++ b/src/server/game/Chat/Commands/Debugcmds.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "Vehicle.h"
#include "Player.h"
diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp
index ed021ac00d4..ff266caa328 100644
--- a/src/server/game/Chat/Commands/Level0.cpp
+++ b/src/server/game/Chat/Commands/Level0.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "World.h"
#include "Player.h"
#include "Opcodes.h"
@@ -87,7 +87,7 @@ bool ChatHandler::HandleStartCommand(const char* /*args*/)
}
// cast spell Stuck
- chr->CastSpell(chr,7355,false);
+ chr->CastSpell(chr, 7355, false);
return true;
}
@@ -103,14 +103,6 @@ bool ChatHandler::HandleServerInfoCommand(const char* /*args*/)
uint32 updateTime = sWorld.GetUpdateTime();
PSendSysMessage(_FULLVERSION);
- //if (m_session)
- // full = _FULLVERSION(REVISION_DATE,REVISION_TIME,"|cffffffff|Hurl:" REVISION_ID "|h" REVISION_ID "|h|r");
- //else
- // full = _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_ID);
-
- //SendSysMessage(full);
- //PSendSysMessage(LANG_USING_WORLD_DB,sWorld.GetDBVersion());
- //PSendSysMessage(LANG_USING_EVENT_AI,sWorld.GetCreatureEventAIVersion());
PSendSysMessage(LANG_CONNECTED_PLAYERS, PlayersNum, MaxPlayersNum);
PSendSysMessage(LANG_CONNECTED_USERS, activeClientsNum, maxActiveClientsNum, queuedClientsNum, maxQueuedClientsNum);
PSendSysMessage(LANG_UPTIME, uptime.c_str());
@@ -143,9 +135,9 @@ bool ChatHandler::HandleDismountCommand(const char* /*args*/)
bool ChatHandler::HandleSaveCommand(const char* /*args*/)
{
- Player *player=m_session->GetPlayer();
+ Player *player = m_session->GetPlayer();
- // save GM account without delay and output message (testing, etc)
+ // save GM account without delay and output message
if (m_session->GetSecurity() > SEC_PLAYER)
{
player->SaveToDB();
@@ -153,9 +145,9 @@ bool ChatHandler::HandleSaveCommand(const char* /*args*/)
return true;
}
- // save or plan save after 20 sec (logout delay) if current next save time more this value and _not_ output any messages to prevent cheat planning
+ // save if the player has last been saved over 20 seconds ago
uint32 save_interval = sWorld.getConfig(CONFIG_INTERVAL_SAVE);
- if ((save_interval == 0 || save_interval > 20*IN_MILISECONDS && player->GetSaveTimer() <= save_interval - 20*IN_MILISECONDS))
+ if ((save_interval == 0 || save_interval > 20*IN_MILLISECONDS && player->GetSaveTimer() <= save_interval - 20*IN_MILLISECONDS))
player->SaveToDB();
return true;
@@ -165,8 +157,8 @@ bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/)
{
bool first = true;
- ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
- HashMapHolder<Player>::MapType &m = ObjectAccessor::Instance().GetPlayers();
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, *HashMapHolder<Player>::GetLock(), true);
+ HashMapHolder<Player>::MapType &m = sObjectAccessor.GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
AccountTypes itr_sec = itr->second->GetSession()->GetSecurity();
@@ -192,35 +184,42 @@ bool ChatHandler::HandleGMListIngameCommand(const char* /*args*/)
bool ChatHandler::HandleAccountPasswordCommand(const char* args)
{
if (!*args)
+ {
+ SendSysMessage(LANG_CMD_SYNTAX);
+ SetSentErrorMessage(true);
return false;
+ }
- char *old_pass = strtok ((char*)args, " ");
- char *new_pass = strtok (NULL, " ");
- char *new_pass_c = strtok (NULL, " ");
+ char *old_pass = strtok((char*)args, " ");
+ char *new_pass = strtok(NULL, " ");
+ char *new_pass_c = strtok(NULL, " ");
if (!old_pass || !new_pass || !new_pass_c)
+ {
+ SendSysMessage(LANG_CMD_SYNTAX);
+ SetSentErrorMessage(true);
return false;
+ }
std::string password_old = old_pass;
std::string password_new = new_pass;
std::string password_new_c = new_pass_c;
- if (strcmp(new_pass, new_pass_c) != 0)
+ if (!accmgr.CheckPassword(m_session->GetAccountId(), password_old))
{
- SendSysMessage (LANG_NEW_PASSWORDS_NOT_MATCH);
- SetSentErrorMessage (true);
+ SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
+ SetSentErrorMessage(true);
return false;
}
- if (!accmgr.CheckPassword (m_session->GetAccountId(), password_old))
+ if (strcmp(new_pass, new_pass_c) != 0)
{
- SendSysMessage (LANG_COMMAND_WRONGOLDPASSWORD);
- SetSentErrorMessage (true);
+ SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH);
+ SetSentErrorMessage(true);
return false;
}
AccountOpResult result = accmgr.ChangePassword(m_session->GetAccountId(), password_new);
-
switch(result)
{
case AOR_OK:
@@ -230,7 +229,6 @@ bool ChatHandler::HandleAccountPasswordCommand(const char* args)
SendSysMessage(LANG_PASSWORD_TOO_LONG);
SetSentErrorMessage(true);
return false;
- case AOR_NAME_NOT_EXIST: // not possible case, don't want get account name for output
default:
SendSysMessage(LANG_COMMAND_NOTCHANGEPASSWORD);
SetSentErrorMessage(true);
@@ -243,15 +241,23 @@ bool ChatHandler::HandleAccountPasswordCommand(const char* args)
bool ChatHandler::HandleAccountAddonCommand(const char* args)
{
if (!*args)
+ {
+ SendSysMessage(LANG_CMD_SYNTAX);
+ SetSentErrorMessage(true);
return false;
+ }
- char *szExp = strtok((char*)args," ");
+ char *szExp = strtok((char*)args, " ");
uint32 account_id = m_session->GetAccountId();
- int expansion=atoi(szExp); //get int anyway (0 if error)
+ int expansion = atoi(szExp); //get int anyway (0 if error)
if (expansion < 0 || expansion > sWorld.getConfig(CONFIG_EXPANSION))
- return false;
+ {
+ SendSysMessage(LANG_IMPROPER_VALUE);
+ SetSentErrorMessage(true);
+ return false;
+ }
// No SQL injection
LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, account_id);
@@ -264,7 +270,8 @@ bool ChatHandler::HandleAccountLockCommand(const char* args)
if (!*args)
{
SendSysMessage(LANG_USE_BOL);
- return true;
+ SetSentErrorMessage(true);
+ return false;
}
std::string argstr = (char*)args;
@@ -283,7 +290,8 @@ bool ChatHandler::HandleAccountLockCommand(const char* args)
}
SendSysMessage(LANG_USE_BOL);
- return true;
+ SetSentErrorMessage(true);
+ return false;
}
/// Display the 'Message of the day' for the realm
diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp
index 11189d519a0..771339645fe 100644
--- a/src/server/game/Chat/Commands/Level1.cpp
+++ b/src/server/game/Chat/Commands/Level1.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "World.h"
@@ -817,7 +817,7 @@ bool ChatHandler::HandleNamegoCommand(const char* args)
if (pMap->IsBattleGroundOrArena())
{
// only allow if gm mode is on
- if (!target->isGameMaster())
+ if (!_player->isGameMaster())
{
PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM,nameLink.c_str());
SetSentErrorMessage(true);
@@ -2381,7 +2381,7 @@ bool ChatHandler::HandleWhispersCommand(const char* args)
//Save all players in the world
bool ChatHandler::HandleSaveAllCommand(const char* /*args*/)
{
- ObjectAccessor::Instance().SaveAllPlayers();
+ sObjectAccessor.SaveAllPlayers();
SendSysMessage(LANG_PLAYERS_SAVED);
return true;
}
@@ -2502,7 +2502,7 @@ bool ChatHandler::HandleTeleNameCommand(const char * args)
PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), GetTrinityString(LANG_OFFLINE), tele->name.c_str());
Player::SavePositionInDB(tele->mapId,tele->position_x,tele->position_y,tele->position_z,tele->orientation,
- MapManager::Instance().GetZoneId(tele->mapId,tele->position_x,tele->position_y,tele->position_z),target_guid);
+ sMapMgr.GetZoneId(tele->mapId,tele->position_x,tele->position_y,tele->position_z),target_guid);
}
return true;
@@ -2768,7 +2768,7 @@ bool ChatHandler::HandleGoXYCommand(const char* args)
else
_player->SaveRecallPosition();
- Map const *map = MapManager::Instance().CreateBaseMap(mapid);
+ Map const *map = sMapMgr.CreateBaseMap(mapid);
float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
_player->TeleportTo(mapid, x, y, z, _player->GetOrientation());
@@ -2861,7 +2861,7 @@ bool ChatHandler::HandleGoZoneXYCommand(const char* args)
// update to parent zone if exist (client map show only zones without parents)
AreaTableEntry const* zoneEntry = areaEntry->zone ? GetAreaEntryByAreaID(areaEntry->zone) : areaEntry;
- Map const *map = MapManager::Instance().CreateBaseMap(zoneEntry->mapid);
+ Map const *map = sMapMgr.CreateBaseMap(zoneEntry->mapid);
if (map->Instanceable())
{
@@ -2936,7 +2936,7 @@ bool ChatHandler::HandleGoGridCommand(const char* args)
else
_player->SaveRecallPosition();
- Map const *map = MapManager::Instance().CreateBaseMap(mapid);
+ Map const *map = sMapMgr.CreateBaseMap(mapid);
float z = std::max(map->GetHeight(x, y, MAX_HEIGHT), map->GetWaterLevel(x, y));
_player->TeleportTo(mapid, x, y, z, _player->GetOrientation());
diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp
index 4f299c932e8..77716e25954 100644
--- a/src/server/game/Chat/Commands/Level2.cpp
+++ b/src/server/game/Chat/Commands/Level2.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "DBCStores.h"
#include "ObjectMgr.h"
#include "Player.h"
@@ -32,7 +32,7 @@
#include "World.h"
#include "GameEventMgr.h"
#include "SpellMgr.h"
-#include "PoolHandler.h"
+#include "PoolMgr.h"
#include "AccountMgr.h"
#include "WaypointManager.h"
#include "Util.h"
@@ -1672,7 +1672,7 @@ bool ChatHandler::HandleNpcUnFollowCommand(const char* /*args*/)
if (/*creature->GetMotionMaster()->empty() ||*/
creature->GetMotionMaster()->GetCurrentMovementGeneratorType () != TARGETED_MOTION_TYPE)
{
- PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU);
+ PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName());
SetSentErrorMessage(true);
return false;
}
@@ -1682,7 +1682,7 @@ bool ChatHandler::HandleNpcUnFollowCommand(const char* /*args*/)
if (mgen->GetTarget() != player)
{
- PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU);
+ PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName());
SetSentErrorMessage(true);
return false;
}
@@ -2844,7 +2844,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
wpCreature2->LoadFromDB(wpCreature2->GetDBTableGUIDLow(), map);
map->Add(wpCreature2);
- //MapManager::Instance().GetMap(npcCreature->GetMapId())->Add(wpCreature2);
+ //sMapMgr.GetMap(npcCreature->GetMapId())->Add(wpCreature2);
}
WorldDatabase.PExecuteLog("UPDATE waypoint_data SET position_x = '%f',position_y = '%f',position_z = '%f' where id = '%u' AND point='%u'",
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp
index 8ac26cc5e8f..3ddf9b84365 100644
--- a/src/server/game/Chat/Commands/Level3.cpp
+++ b/src/server/game/Chat/Commands/Level3.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "World.h"
@@ -45,7 +45,7 @@
#include "SkillDiscovery.h"
#include "SkillExtraItems.h"
#include "SystemConfig.h"
-#include "Config/ConfigEnv.h"
+#include "ConfigEnv.h"
#include "Util.h"
#include "ItemEnchantmentMgr.h"
#include "BattleGroundMgr.h"
@@ -689,7 +689,7 @@ bool ChatHandler::HandleReloadConfigCommand(const char* /*args*/)
{
sLog.outString("Re-Loading config settings...");
sWorld.LoadConfigSettings(true);
- MapManager::Instance().InitializeVisibilityDistanceInfo();
+ sMapMgr.InitializeVisibilityDistanceInfo();
SendGlobalGMSysMessage("World config settings reloaded.");
return true;
}
@@ -749,6 +749,14 @@ bool ChatHandler::HandleReloadCommandCommand(const char*)
return true;
}
+bool ChatHandler::HandleReloadOnKillReputationCommand(const char*)
+{
+ sLog.outString("Re-Loading creature award reputation definitions...");
+ objmgr.LoadReputationOnKill();
+ SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded.");
+ return true;
+}
+
bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args)
{
if (!*args)
@@ -787,24 +795,21 @@ bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args)
size_t len = 0;
if (const char* temp = fields[9].GetString())
{
- if (cInfo->Name)
- delete cInfo->Name;
+ delete[] cInfo->Name;
len = strlen(temp)+1;
const_cast<CreatureInfo*>(cInfo)->Name = new char[len];
strncpy(cInfo->Name, temp, len);
}
if (const char* temp = fields[10].GetString())
{
- if (cInfo->SubName)
- delete cInfo->SubName;
+ delete[] cInfo->SubName;
len = strlen(temp)+1;
const_cast<CreatureInfo*>(cInfo)->SubName = new char[len];
strncpy(cInfo->SubName, temp, len);
}
if (const char* temp = fields[11].GetString())
{
- if (cInfo->IconName)
- delete cInfo->IconName;
+ delete[] cInfo->IconName;
len = strlen(temp)+1;
const_cast<CreatureInfo*>(cInfo)->IconName = new char[len];
strncpy(cInfo->IconName, temp, len);
@@ -863,8 +868,7 @@ bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args)
const_cast<CreatureInfo*>(cInfo)->maxgold = fields[63].GetUInt32();
if (const char* temp = fields[64].GetString())
{
- if (cInfo->AIName)
- delete cInfo->AIName;
+ delete[] cInfo->AIName;
len = strlen(temp)+1;
const_cast<CreatureInfo*>(cInfo)->AIName = new char[len];
strncpy(const_cast<char*>(cInfo->AIName), temp, len);
@@ -1276,6 +1280,14 @@ bool ChatHandler::HandleReloadItemEnchantementsCommand(const char*)
return true;
}
+bool ChatHandler::HandleReloadItemSetNamesCommand(const char*)
+{
+ sLog.outString("Re-Loading Item set names...");
+ LoadRandomEnchantmentsTable();
+ SendGlobalGMSysMessage("DB table `item_set_names` reloaded.");
+ return true;
+}
+
bool ChatHandler::HandleReloadGameObjectScriptsCommand(const char* arg)
{
if (sWorld.IsScriptScheduled())
@@ -1494,6 +1506,14 @@ bool ChatHandler::HandleReloadLocalesItemCommand(const char* /*arg*/)
return true;
}
+bool ChatHandler::HandleReloadLocalesItemSetNameCommand(const char* /*arg*/)
+{
+ sLog.outString("Re-Loading Locales Item set name... ");
+ objmgr.LoadItemSetNameLocales();
+ SendGlobalGMSysMessage("DB table `locales_item_set_name` reloaded.");
+ return true;
+}
+
bool ChatHandler::HandleReloadLocalesNpcTextCommand(const char* /*arg*/)
{
sLog.outString("Re-Loading Locales NPC Text ... ");
@@ -4493,7 +4513,7 @@ bool ChatHandler::HandleReviveCommand(const char *args)
}
else
// will resurrected at login without corpse
- ObjectAccessor::Instance().ConvertCorpseForPlayer(target_guid);
+ sObjectAccessor.ConvertCorpseForPlayer(target_guid);
return true;
}
@@ -5513,8 +5533,8 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'",atLogin,atLogin);
- ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
- HashMapHolder<Player>::MapType const& plist = ObjectAccessor::Instance().GetPlayers();
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, *HashMapHolder<Player>::GetLock(), true);
+ HashMapHolder<Player>::MapType const& plist = sObjectAccessor.GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
itr->second->SetAtLoginFlag(atLogin);
@@ -7000,8 +7020,8 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char *args)
bool ChatHandler::HandleInstanceStatsCommand(const char* /*args*/)
{
- PSendSysMessage("instances loaded: %d", MapManager::Instance().GetNumInstances());
- PSendSysMessage("players in instances: %d", MapManager::Instance().GetNumPlayersInInstances());
+ PSendSysMessage("instances loaded: %d", sMapMgr.GetNumInstances());
+ PSendSysMessage("players in instances: %d", sMapMgr.GetNumPlayersInInstances());
PSendSysMessage("instance saves: %d", sInstanceSaveManager.GetNumInstanceSaves());
PSendSysMessage("players bound: %d", sInstanceSaveManager.GetNumBoundPlayersTotal());
PSendSysMessage("groups bound: %d", sInstanceSaveManager.GetNumBoundGroupsTotal());
diff --git a/src/server/game/Combat/HostileRefManager.h b/src/server/game/Combat/HostileRefManager.h
index 80b676312a1..0a240ad44be 100644
--- a/src/server/game/Combat/HostileRefManager.h
+++ b/src/server/game/Combat/HostileRefManager.h
@@ -22,7 +22,7 @@
#define _HOSTILEREFMANAGER
#include "Common.h"
-#include "Utilities/LinkedReference/RefManager.h"
+#include "RefManager.h"
class Unit;
class ThreatManager;
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index 52f02f0f66d..fbf5a80d42b 100644
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -36,8 +36,13 @@
float ThreatCalcHelper::calcThreat(Unit* pHatedUnit, Unit* /*pHatingUnit*/, float fThreat, SpellSchoolMask schoolMask, SpellEntry const *pThreatSpell)
{
if (pThreatSpell)
+ {
+ if (pThreatSpell->AttributesEx & SPELL_ATTR_EX_NO_THREAT)
+ return 0.0f;
+
if (Player* modOwner = pHatedUnit->GetSpellModOwner())
modOwner->ApplySpellMod(pThreatSpell->Id, SPELLMOD_THREAT, fThreat);
+ }
return pHatedUnit->ApplyTotalThreatModifier(fThreat, schoolMask);
}
diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h
index 723a553e9d7..2903fe83c38 100644
--- a/src/server/game/Combat/ThreatManager.h
+++ b/src/server/game/Combat/ThreatManager.h
@@ -23,7 +23,7 @@
#include "Common.h"
#include "SharedDefines.h"
-#include "Utilities/LinkedReference/Reference.h"
+#include "LinkedReference/Reference.h"
#include "UnitEvents.h"
#include <list>
@@ -35,7 +35,7 @@ class Creature;
class ThreatManager;
struct SpellEntry;
-#define THREAT_UPDATE_INTERVAL 1 * IN_MILISECONDS // Server should send threat update to client periodically each second
+#define THREAT_UPDATE_INTERVAL 1 * IN_MILLISECONDS // Server should send threat update to client periodically each second
//==============================================================
// Class to calculate the real threat based
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 8e5a7e5677e..9164f55c6ce 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -19,7 +19,7 @@
*/
-#include "Policies/SingletonImp.h"
+
#include "Player.h"
#include "SpellAuras.h"
#include "SpellMgr.h"
@@ -29,12 +29,10 @@
#include "InstanceData.h"
#include "ConditionMgr.h"
-INSTANTIATE_SINGLETON_1(ConditionMgr);
-
// Checks if player meets the condition
// Can have CONDITION_SOURCE_TYPE_NONE && !mReferenceId if called from a special event (ie: eventAI)
bool Condition::Meets(Player * player, Unit* targetOverride)
-{
+{
if (!player)
{
sLog.outDebug("Condition player not found");
@@ -126,7 +124,7 @@ bool Condition::Meets(Player * player, Unit* targetOverride)
break;
}
case CONDITION_SPELL_SCRIPT_TARGET:
- condMeets = true;//spell target condition is handled in spellsystem, here it is always true
+ condMeets = true;//spell target condition is handled in spellsystem, here it is always true
refId = 0;//cant have references! use CONDITION_SOURCE_TYPE_SPELL for it
break;
case CONDITION_CREATURE_TARGET:
@@ -165,7 +163,7 @@ bool Condition::Meets(Player * player, Unit* targetOverride)
break;
case CONDITION_ITEM_TARGET:
{
- condMeets = true;//handled in Item::IsTargetValidForItemUse
+ condMeets = true;//handled in Item::IsTargetValidForItemUse
refId = 0;//cant have references for now
break;
}
@@ -201,6 +199,7 @@ ConditionMgr::ConditionMgr()
ConditionMgr::~ConditionMgr()
{
+ Clean();
}
ConditionList ConditionMgr::GetConditionReferences(uint32 refId)
@@ -236,12 +235,12 @@ bool ConditionMgr::IsPlayerMeetToConditionList(Player* player,const ConditionLis
}else{
sLog.outDebug("IsPlayerMeetToConditionList: Reference template -%u not found", (*i)->mReferenceId);//checked at loading, should never happen
}
-
+
} else//handle normal condition
{
if (!(*i)->Meets(player, targetOverride))
ElseGroupMap[(*i)->mElseGroup] = false;
- }
+ }
}
}
for (std::map<uint32, bool>::const_iterator i = ElseGroupMap.begin(); i != ElseGroupMap.end(); ++i)
@@ -273,7 +272,7 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType
{
ConditionMap::const_iterator itr = m_ConditionMap.find(sType);
if (itr != m_ConditionMap.end())
- {
+ {
ConditionTypeMap::const_iterator i = (*itr).second.find(uEntry);
if (i != (*itr).second.end())
{
@@ -287,8 +286,8 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType
void ConditionMgr::LoadConditions(bool isReload)
{
- m_ConditionMap.clear(); // for reload case
- m_ConditionReferenceMap.clear(); // for reload case
+ Clean();
+
//must clear all custom handled cases (groupped types) before reload
if (isReload)
{
@@ -336,11 +335,11 @@ void ConditionMgr::LoadConditions(bool isReload)
Field *fields = result->Fetch();
Condition* cond = new Condition();
- int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
+ int32 iSourceTypeOrReferenceId = fields[0].GetInt32();
cond->mSourceGroup = fields[1].GetUInt32();
cond->mSourceEntry = fields[2].GetUInt32();
cond->mElseGroup = fields[3].GetUInt32();
- int32 iConditionTypeOrReference = fields[4].GetInt32();
+ int32 iConditionTypeOrReference = fields[4].GetInt32();
cond->mConditionValue1 = fields[5].GetUInt32();
cond->mConditionValue2 = fields[6].GetUInt32();
cond->mConditionValue3 = fields[7].GetUInt32();
@@ -351,9 +350,10 @@ void ConditionMgr::LoadConditions(bool isReload)
if (iConditionTypeOrReference < 0)//it has a reference
{
- if (iConditionTypeOrReference == iSourceTypeOrReferenceId)//self referencing, skipp
+ if (iConditionTypeOrReference == iSourceTypeOrReferenceId)//self referencing, skip
{
sLog.outErrorDb("Condition reference %i is referencing self, skipped", iSourceTypeOrReferenceId);
+ delete cond;
continue;
}
cond->mReferenceId = uint32(abs(iConditionTypeOrReference));
@@ -373,8 +373,10 @@ void ConditionMgr::LoadConditions(bool isReload)
if (cond->mSourceEntry && iSourceTypeOrReferenceId < 0)
sLog.outErrorDb("Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->mSourceEntry);
}else if (!isConditionTypeValid(cond))//doesn't have reference, validate ConditionType
- continue;
-
+ {
+ delete cond;
+ continue;
+ }
if (iSourceTypeOrReferenceId < 0)//it is a reference template
{
@@ -390,15 +392,19 @@ void ConditionMgr::LoadConditions(bool isReload)
}//end of reference templates
cond->mSourceType = ConditionSourceType(iSourceTypeOrReferenceId);
-
+
//if not a reference and SourceType is invalid, skip
if (iConditionTypeOrReference >= 0 && !isSourceTypeValid(cond))
+ {
+ delete cond;
continue;
+ }
//Grouping is only allowed for some types (loot templates, gossip menus, gossip items)
if (cond->mSourceGroup && !isGroupable(cond->mSourceType))
{
sLog.outErrorDb("Condition type %u has not allowed grouping %u!", uint32(cond->mSourceType), cond->mSourceGroup);
+ delete cond;
continue;
}else if (cond->mSourceGroup)
{
@@ -450,9 +456,15 @@ void ConditionMgr::LoadConditions(bool isReload)
break;
}
if (!bIsDone)
+ {
sLog.outErrorDb("Not handled grouped condition, SourceGroup %u", cond->mSourceGroup);
+ delete cond;
+ }
else
+ {
+ m_AllocatedMemory.push_back(cond);
++count;
+ }
continue;
}
@@ -505,11 +517,10 @@ bool ConditionMgr::addToGossipMenus(Condition* cond)
if ((*itr).second.entry == cond->mSourceGroup && (*itr).second.text_id == cond->mSourceEntry)
{
(*itr).second.conditions.push_back(cond);
- sLog.outDebug("addToGossipMenus: entry %u textId %u", cond->mSourceGroup, cond->mSourceEntry);
return true;
}
}
- }
+ }
sLog.outErrorDb("addToGossipMenus: GossipMenu %u not found", cond->mSourceGroup);
return false;
}
@@ -524,12 +535,11 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond)
if ((*itr).second.menu_id == cond->mSourceGroup && (*itr).second.id == cond->mSourceEntry)
{
(*itr).second.conditions.push_back(cond);
- //sLog.outDebug("addToGossipMenuItems: menuId %u id %u", cond->mSourceGroup, cond->mSourceEntry);
return true;
}
}
}
- sLog.outErrorDb("addToGossipMenuItems: GossipMenuIt %u Item %u not found", cond->mSourceGroup, cond->mSourceEntry);
+ sLog.outErrorDb("addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->mSourceGroup, cond->mSourceEntry);
return false;
}
@@ -591,7 +601,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
break;
}
case CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE:
- {
+ {
if (!LootTemplates_Gameobject.HaveLootFor(cond->mSourceGroup))
{
sLog.outErrorDb("SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->mSourceGroup);
@@ -607,7 +617,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
break;
}
case CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE:
- {
+ {
if (!LootTemplates_Item.HaveLootFor(cond->mSourceGroup))
{
sLog.outErrorDb("SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->mSourceGroup);
@@ -776,7 +786,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
return false;
}
break;
- }
+ }
case CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE:
{
if (!sCreatureStorage.LookupEntry<CreatureInfo>(cond->mSourceEntry))
@@ -1043,10 +1053,10 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
sLog.outErrorDb("SpellTarget condition has non existing spell target type (%u), skipped", cond->mConditionValue1);
return false;
- }
+ }
switch(cond->mConditionValue1)
{
- case SPELL_TARGET_TYPE_GAMEOBJECT:
+ case SPELL_TARGET_TYPE_GAMEOBJECT:
{
if (cond->mConditionValue2 && !sGOStorage.LookupEntry<GameObjectInfo>(cond->mConditionValue2))
{
@@ -1143,3 +1153,31 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
return true;
}
+
+void ConditionMgr::Clean()
+{
+ for (ConditionReferenceMap::iterator itr = m_ConditionReferenceMap.begin(); itr != m_ConditionReferenceMap.end(); ++itr)
+ {
+ for (ConditionList::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
+ delete *it;
+ itr->second.clear();
+ }
+ m_ConditionReferenceMap.clear();
+
+ for (ConditionMap::iterator itr = m_ConditionMap.begin(); itr != m_ConditionMap.end(); ++itr)
+ {
+ for (ConditionTypeMap::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();
+ }
+ m_ConditionMap.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 = m_AllocatedMemory.begin(); itr != m_AllocatedMemory.end(); ++itr)
+ delete *itr;
+ m_AllocatedMemory.clear();
+}
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index bc2ce8d01a2..bb9fc2708fa 100644
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -47,7 +47,7 @@ enum ConditionType
CONDITION_CLASS = 15, // class 0 +referenceID true if player's class is equal to class
CONDITION_RACE = 16, // race 0 +referenceID true if player's race is equal to race
CONDITION_ACHIEVEMENT = 17, // achievement_id 0 +referenceID true if achievement is complete
- CONDITION_SPELL_SCRIPT_TARGET = 18, // SpellScriptTargetType, TargetEntry, 0
+ CONDITION_SPELL_SCRIPT_TARGET = 18, // SpellScriptTargetType, TargetEntry, 0
CONDITION_CREATURE_TARGET = 19, // creature entry 0 +referenceID true if current target is creature with value1 entry
CONDITION_TARGET_HEALTH_BELOW_PCT = 20, // 0-100 0 +referenceID true if target's health is below value1 percent, false if over or no target
CONDITION_TARGET_RANGE = 21, // minDistance maxDist +referenceID true if target is closer then minDist and further then maxDist or if max is 0 then max dist is infinit
@@ -84,7 +84,7 @@ enum ConditionSourceType
#define MAX_CONDITIONSOURCETYPE 19
struct Condition
-{
+{
ConditionSourceType mSourceType; //SourceTypeOrReferenceId
uint32 mSourceGroup;
uint32 mSourceEntry;
@@ -121,14 +121,16 @@ typedef std::map<uint32, ConditionList > ConditionReferenceMap;//only used for r
class ConditionMgr
{
+ friend class ACE_Singleton<ConditionMgr, ACE_Null_Mutex>;
+ ConditionMgr();
+
public:
- ConditionMgr();
~ConditionMgr();
void LoadConditions(bool isReload = false);
bool isConditionTypeValid(Condition* cond);
ConditionList GetConditionReferences(uint32 refId);
-
+
bool IsPlayerMeetToConditions(Player* player, ConditionList conditions, Unit* targetOverride = NULL);
ConditionList GetConditionsForNotGroupedEntry(ConditionSourceType sType, uint32 uEntry);
@@ -160,8 +162,11 @@ class ConditionMgr
sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU ||
sourceType == CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION);
}
+
+ void Clean(); // free up resources
+ std::list<Condition*> m_AllocatedMemory; // some garbage collection :)
};
-#define sConditionMgr Trinity::Singleton<ConditionMgr>::Instance()
+#define sConditionMgr (*ACE_Singleton<ConditionMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index ba0e3af9a64..4ddccd735f5 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -19,8 +19,8 @@
*/
#include "DBCStores.h"
-#include "Policies/SingletonImp.h"
-#include "Log.h"
+
+#include "Logging/Log.h"
#include "ProgressBar.h"
#include "SharedDefines.h"
#include "SpellMgr.h"
@@ -235,15 +235,15 @@ inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList
else
errlist.push_back(dbc_filename);
}
- if (sql)
- delete sql;
+
+ delete sql;
}
void LoadDBCStores(const std::string& dataPath)
{
std::string dbcPath = dataPath+"dbc/";
- const uint32 DBCFilesCount = 87;
+ const uint32 DBCFilesCount = 89;
barGoLink bar(DBCFilesCount);
@@ -506,8 +506,7 @@ void LoadDBCStores(const std::string& dataPath)
// fill data
for (uint32 i = 1; i < sTaxiPathNodeStore.GetNumRows(); ++i)
if (TaxiPathNodeEntry const* entry = sTaxiPathNodeStore.LookupEntry(i))
- sTaxiPathNodesByPath[entry->path][entry->index] = TaxiPathNode(entry->mapid,entry->x,entry->y,entry->z,entry->actionFlag,entry->delay);
- sTaxiPathNodeStore.Clear();
+ sTaxiPathNodesByPath[entry->path].set(entry->index, entry);
// Initialize global taxinodes mask
// include existed nodes that have at least single not spell base (scripted) path
@@ -579,7 +578,7 @@ void LoadDBCStores(const std::string& dataPath)
// error checks
if (bad_dbc_files.size() >= DBCFilesCount)
{
- sLog.outError("\nIncorrect DataDir value in Trinityd.conf or ALL required *.dbc files (%d) not found by path: %sdbc",DBCFilesCount,dataPath.c_str());
+ sLog.outError("\nIncorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc",DBCFilesCount,dataPath.c_str());
exit(1);
}
else if (!bad_dbc_files.empty())
@@ -593,13 +592,13 @@ void LoadDBCStores(const std::string& dataPath)
}
// Check loaded DBC files proper version
- if (!sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.3a
- !sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.3a
- !sGemPropertiesStore.LookupEntry(1629) || // last added spell in 3.3.3a
- !sItemStore.LookupEntry(54860) || // last gem property added in 3.3.3a
- !sItemExtendedCostStore.LookupEntry(2997) || // last item extended cost added in 3.3.3a
- !sMapStore.LookupEntry(724) || // last map added in 3.3.3a
- !sSpellStore.LookupEntry(76567) ) // last client known item added in 3.3.3a
+ if (!sAreaStore.LookupEntry(3617) || // last area (areaflag) added in 3.3.5a
+ !sCharTitlesStore.LookupEntry(177) || // last char title added in 3.3.5a
+ !sGemPropertiesStore.LookupEntry(1629) || // last added spell in 3.3.5a
+ !sItemStore.LookupEntry(56806) || // last gem property added in 3.3.5a
+ !sItemExtendedCostStore.LookupEntry(2997) || // last item extended cost added in 3.3.5a
+ !sMapStore.LookupEntry(724) || // last map added in 3.3.5a
+ !sSpellStore.LookupEntry(80864) ) // last client known item added in 3.3.5a
{
sLog.outError("\nYou have _outdated_ DBC files. Please extract correct versions from current using client.");
exit(1);
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index b14814e07a1..1bda56f38cc 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -20,7 +20,7 @@
#define TRINITY_DBCSTORES_H
#include "Common.h"
-#include "Database/DBCStore.h"
+#include "DBCStore.h"
#include "DBCStructure.h"
#include <list>
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 0fc0d1251f5..7663aaf3dcb 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -21,8 +21,10 @@
#ifndef TRINITY_DBCSTRUCTURE_H
#define TRINITY_DBCSTRUCTURE_H
+#include "Common.h"
#include "DBCEnums.h"
-#include "Platform/Define.h"
+#include "Define.h"
+#include "Path.h"
#include "Util.h"
#include <map>
@@ -1080,12 +1082,14 @@ struct ItemRandomSuffixEntry
uint32 prefix[5]; // 22-24 m_allocationPct
};
+#define MAX_ITEM_SET_ITEMS 10
struct ItemSetEntry
{
//uint32 id // 0 m_ID
char* name[16]; // 1-16 m_name_lang
// 17 string flags, unused
- //uint32 itemId[17]; // 18-34 m_itemID
+ uint32 itemId[MAX_ITEM_SET_ITEMS]; // 18-27 m_itemID
+ //uint32 unknown[7]; // 28-34 unk, all 0
uint32 spells[8]; // 35-42 m_setSpellID
uint32 items_to_triggerspell[8]; // 43-50 m_setThreshold
uint32 required_skill_id; // 51 m_requiredSkill
@@ -1509,9 +1513,6 @@ struct SpellEntry
//uint32 spellDescriptionVariableID; // 232 3.2.0
//uint32 SpellDifficultyId; // 233 3.3.0
- // helpers
- int32 CalculateSimpleValue(uint8 eff) const { return EffectBasePoints[eff]+int32(1); }
-
private:
// prevent creating custom entries (copy data from original in fact)
SpellEntry(SpellEntry const&); // DON'T must have implementation
@@ -1712,8 +1713,8 @@ struct TaxiPathNodeEntry
float z; // 6 m_LocZ
uint32 actionFlag; // 7 m_flags
uint32 delay; // 8 m_delay
- // 9 m_arrivalEventID
- // 10 m_departureEventID
+ uint32 arrivalEventID; // 9 m_arrivalEventID
+ uint32 departureEventID; // 10 m_departureEventID
};
struct TotemCategoryEntry
@@ -1909,19 +1910,15 @@ struct TaxiPathBySourceAndDestination
typedef std::map<uint32,TaxiPathBySourceAndDestination> TaxiPathSetForSource;
typedef std::map<uint32,TaxiPathSetForSource> TaxiPathSetBySource;
-struct TaxiPathNode
+struct TaxiPathNodePtr
{
- TaxiPathNode() : mapid(0), x(0),y(0),z(0),actionFlag(0),delay(0) {}
- TaxiPathNode(uint32 _mapid, float _x, float _y, float _z, uint32 _actionFlag, uint32 _delay) : mapid(_mapid), x(_x),y(_y),z(_z),actionFlag(_actionFlag),delay(_delay) {}
-
- uint32 mapid;
- float x;
- float y;
- float z;
- uint32 actionFlag;
- uint32 delay;
+ TaxiPathNodePtr() : i_ptr(NULL) {}
+ TaxiPathNodePtr(TaxiPathNodeEntry const* ptr) : i_ptr(ptr) {}
+ TaxiPathNodeEntry const* i_ptr;
+ operator TaxiPathNodeEntry const& () const { return *i_ptr; }
};
-typedef std::vector<TaxiPathNode> TaxiPathNodeList;
+
+typedef Path<TaxiPathNodePtr,TaxiPathNodeEntry const> TaxiPathNodeList;
typedef std::vector<TaxiPathNodeList> TaxiPathNodesByPath;
#define TaxiMaskSize 12
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 1f1b010a6fd..80d8791bd01 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -72,7 +72,7 @@ const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiiix";
const char ItemLimitCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxix";
const char ItemRandomPropertiesfmt[]="nxiiiiissssssssssssssssx";
const char ItemRandomSuffixfmt[]="nssssssssssssssssxxiiiiiiiiii";
-const char ItemSetEntryfmt[]="dssssssssssssssssxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii";
+const char ItemSetEntryfmt[]="dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii";
const char LFGDungeonEntryfmt[]="nxxxxxxxxxxxxxxxxxiiiiiiixixxixixxxxxxxxxxxxxxxxx";
const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
const char MailTemplateEntryfmt[]="nxxxxxxxxxxxxxxxxxssssssssssssssssx";
@@ -95,7 +95,7 @@ const std::string CustomSpellDifficultyfmt="ppppp";
const std::string CustomSpellDifficultyIndex="id";
const char SpellDurationfmt[]="niii";
const char SpellEntryfmt[]="niiiiiiiiiiiixixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixxxxxxx";
-const std::string CustomSpellEntryfmt="pappppppppaaaaaapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa";
+const std::string CustomSpellEntryfmt="pappppppppaapapapaaaaaaaaaaapaaapapppppppaaaaapaapaaaaaaaaaaaaaaaaaappppppppppppppppppppppppppppppppppppaaaaaapppppppppaaapppppppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaappppppppapppaaaaappaaaaaaa";
const std::string CustomSpellEntryIndex = "Id";
const char SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx";
const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiiiii";
@@ -110,7 +110,7 @@ const char TalentEntryfmt[]="niiiiiiiixxxxixxixxxxxx";
const char TalentTabEntryfmt[]="nxxxxxxxxxxxxxxxxxxxiiix";
const char TaxiNodesEntryfmt[]="nifffssssssssssssssssxii";
const char TaxiPathEntryfmt[]="niii";
-const char TaxiPathNodeEntryfmt[]="diiifffiixx";
+const char TaxiPathNodeEntryfmt[]="diiifffiiii";
const char TotemCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxii";
const char VehicleEntryfmt[]="niffffiiiiiiiifffffffffffffffssssfifiixx";
const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiiixxxxxxxxxxxx";
diff --git a/src/server/game/DungeonFinding/LFG.h b/src/server/game/DungeonFinding/LFG.h
index c1b55443852..a5461029c8d 100644
--- a/src/server/game/DungeonFinding/LFG.h
+++ b/src/server/game/DungeonFinding/LFG.h
@@ -19,7 +19,7 @@
#ifndef _LFG_H
#define _LFG_H
-#include "Platform/Define.h"
+#include "Define.h"
#include "Object.h"
enum LfgRoles
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index ba418cdb191..6c089a83bc3 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Policies/SingletonImp.h"
+
#include "Common.h"
#include "SharedDefines.h"
#include "Group.h"
@@ -24,8 +24,6 @@
#include "ObjectMgr.h"
#include "WorldPacket.h"
-INSTANTIATE_SINGLETON_1(LFGMgr);
-
/*********************************************************/
/*** LFG QUEUES ***/
/*********************************************************/
@@ -46,8 +44,7 @@ LFGQueue::~LFGQueue()
void LFGQueue::AddToQueue(uint64 guid, LfgQueueInfo* pqInfo)
{
- if (LfgQueueInfo* qInfo = m_LfgQueue[guid])
- delete qInfo;
+ delete m_LfgQueue[guid];
m_LfgQueue[guid] = pqInfo;
// ATM will only add it to the queue... No find group implementation... yet (on purpose)
}
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index b19da4e3d00..88d33743fa9 100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -20,7 +20,7 @@
#define _LFGMGR_H
#include "Common.h"
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
#include "Group.h"
#include "LFG.h"
@@ -237,43 +237,44 @@ typedef std::map<uint8, LFGQueue *> LFGQueueMap;
class LFGMgr
{
-public:
+ friend class ACE_Singleton<LFGMgr, ACE_Null_Mutex>;
LFGMgr();
- ~LFGMgr();
+ public:
+ ~LFGMgr();
- void InitLFG();
- void SendLfgPlayerInfo(Player *plr);
- void SendLfgPartyInfo(Player *plr);
- void Join(Player *plr);
- void Leave(Player *plr, Group *grp = NULL);
- void UpdateRoleCheck(Group *grp, Player *plr = NULL);
- void Update(uint32 diff);
+ void InitLFG();
+ void SendLfgPlayerInfo(Player *plr);
+ void SendLfgPartyInfo(Player *plr);
+ void Join(Player *plr);
+ void Leave(Player *plr, Group *grp = NULL);
+ void UpdateRoleCheck(Group *grp, Player *plr = NULL);
+ void Update(uint32 diff);
-private:
- void BuildLfgRoleCheck(WorldPacket &data, LfgRoleCheck *pRoleCheck);
- void BuildAvailableRandomDungeonList(WorldPacket &data, Player *plr);
- void BuildRewardBlock(WorldPacket &data, uint32 dungeon, Player *plr);
- void BuildPlayerLockDungeonBlock(WorldPacket &data, LfgLockStatusSet *lockSet);
- void BuildPartyLockDungeonBlock(WorldPacket &data, LfgLockStatusMap *lockMap);
- bool CheckGroupRoles(LfgRolesMap &groles, bool removeLeaderFlag = true);
+ private:
+ void BuildLfgRoleCheck(WorldPacket &data, LfgRoleCheck *pRoleCheck);
+ void BuildAvailableRandomDungeonList(WorldPacket &data, Player *plr);
+ void BuildRewardBlock(WorldPacket &data, uint32 dungeon, Player *plr);
+ void BuildPlayerLockDungeonBlock(WorldPacket &data, LfgLockStatusSet *lockSet);
+ void BuildPartyLockDungeonBlock(WorldPacket &data, LfgLockStatusMap *lockMap);
+ bool CheckGroupRoles(LfgRolesMap &groles, bool removeLeaderFlag = true);
- LfgLockStatusMap* GetPartyLockStatusDungeons(Player *plr, LfgDungeonSet *dungeons);
- LfgLockStatusSet* GetPlayerLockStatusDungeons(Player *plr, LfgDungeonSet *dungeons);
- LfgDungeonSet* GetRandomDungeons(uint8 level, uint8 expansion);
- LfgDungeonSet* GetDungeonsByRandom(uint32 randomdungeon);
- LfgDungeonSet* GetAllDungeons();
- LfgReward* GetRandomDungeonReward(uint32 dungeon, bool done, uint8 level);
- uint8 GetDungeonGroupType(uint32 dungeon);
+ LfgLockStatusMap* GetPartyLockStatusDungeons(Player *plr, LfgDungeonSet *dungeons);
+ LfgLockStatusSet* GetPlayerLockStatusDungeons(Player *plr, LfgDungeonSet *dungeons);
+ LfgDungeonSet* GetRandomDungeons(uint8 level, uint8 expansion);
+ LfgDungeonSet* GetDungeonsByRandom(uint32 randomdungeon);
+ LfgDungeonSet* GetAllDungeons();
+ LfgReward* GetRandomDungeonReward(uint32 dungeon, bool done, uint8 level);
+ uint8 GetDungeonGroupType(uint32 dungeon);
- LfgRewardList m_RewardList;
- LfgRewardList m_RewardDoneList;
- LfgDungeonMap m_DungeonsMap;
+ LfgRewardList m_RewardList;
+ LfgRewardList m_RewardDoneList;
+ LfgDungeonMap m_DungeonsMap;
- LFGQueueMap m_Queues;
- LfgRoleCheckMap m_RoleChecks;
- uint32 m_QueueTimer;
- bool m_update;
+ LFGQueueMap m_Queues;
+ LfgRoleCheckMap m_RoleChecks;
+ uint32 m_QueueTimer;
+ bool m_update;
};
-#define sLFGMgr Trinity::Singleton<LFGMgr>::Instance()
+#define sLFGMgr (*ACE_Singleton<LFGMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index 510ea13e78b..2811cfa129f 100644
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -23,7 +23,7 @@
#include "Player.h"
#include "UpdateMask.h"
#include "ObjectAccessor.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Opcodes.h"
#include "GossipDef.h"
#include "World.h"
@@ -54,7 +54,7 @@ void Corpse::AddToWorld()
{
///- Register the corpse for guid lookup
if (!IsInWorld())
- ObjectAccessor::Instance().AddObject(this);
+ sObjectAccessor.AddObject(this);
Object::AddToWorld();
}
@@ -63,7 +63,7 @@ void Corpse::RemoveFromWorld()
{
///- Remove the corpse from the accessor
if (IsInWorld())
- ObjectAccessor::Instance().RemoveObject(this);
+ sObjectAccessor.RemoveObject(this);
Object::RemoveFromWorld();
}
diff --git a/src/server/game/Entities/Corpse/Corpse.h b/src/server/game/Entities/Corpse/Corpse.h
index bab95e99d14..3ba00cec3b1 100644
--- a/src/server/game/Entities/Corpse/Corpse.h
+++ b/src/server/game/Entities/Corpse/Corpse.h
@@ -22,7 +22,7 @@
#define TRINITYCORE_CORPSE_H
#include "Object.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "GridDefines.h"
#include "LootMgr.h"
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index fbfae17a48b..7e79dc42664 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "World.h"
#include "ObjectMgr.h"
@@ -28,7 +28,7 @@
#include "QuestDef.h"
#include "GossipDef.h"
#include "Player.h"
-#include "PoolHandler.h"
+#include "PoolMgr.h"
#include "Opcodes.h"
#include "Log.h"
#include "LootMgr.h"
@@ -49,7 +49,7 @@
#include "Vehicle.h"
#include "SpellAuraEffects.h"
// apply implementation of the singletons
-#include "Policies/SingletonImp.h"
+
TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const
{
@@ -171,11 +171,8 @@ Creature::~Creature()
{
m_vendorItemCounts.clear();
- if (i_AI)
- {
- delete i_AI;
- i_AI = NULL;
- }
+ delete i_AI;
+ i_AI = NULL;
//if (m_uint32Values)
// sLog.outError("Deconstruct Creature Entry = %u", GetEntry());
@@ -188,7 +185,7 @@ void Creature::AddToWorld()
{
if (m_zoneScript)
m_zoneScript->OnCreatureCreate(this, true);
- ObjectAccessor::Instance().AddObject(this);
+ sObjectAccessor.AddObject(this);
Unit::AddToWorld();
SearchFormation();
AIM_Initialize();
@@ -206,7 +203,7 @@ void Creature::RemoveFromWorld()
if (m_formation)
formation_mgr.RemoveCreatureFromGroup(m_formation, this);
Unit::RemoveFromWorld();
- ObjectAccessor::Instance().RemoveObject(this);
+ sObjectAccessor.RemoveObject(this);
}
}
@@ -413,13 +410,7 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data)
if (isTrigger())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- if (isTotem() || isTrigger()
- || GetCreatureType() == CREATURE_TYPE_CRITTER)
- SetReactState(REACT_PASSIVE);
- /*else if (isCivilian())
- SetReactState(REACT_DEFENSIVE);*/
- else
- SetReactState(REACT_AGGRESSIVE);
+ InitializeReactState();
if (cInfo->flags_extra & CREATURE_FLAG_EXTRA_NO_TAUNT)
{
@@ -629,7 +620,7 @@ void Creature::RegenerateMana()
if ((*i)->GetMiscValue() == POWER_MANA)
addvalue *= ((*i)->GetAmount() + 100) / 100.0f;
- addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, POWER_MANA) * CREATURE_REGEN_INTERVAL / (5 * IN_MILISECONDS);
+ addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, POWER_MANA) * CREATURE_REGEN_INTERVAL / (5 * IN_MILLISECONDS);
ModifyPower(POWER_MANA, addvalue);
}
@@ -666,7 +657,7 @@ void Creature::RegenerateHealth()
for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
addvalue *= ((*i)->GetAmount() + 100) / 100.0f;
- addvalue += GetTotalAuraModifier(SPELL_AURA_MOD_REGEN) * CREATURE_REGEN_INTERVAL / (5 * IN_MILISECONDS);
+ addvalue += GetTotalAuraModifier(SPELL_AURA_MOD_REGEN) * CREATURE_REGEN_INTERVAL / (5 * IN_MILLISECONDS);
ModifyHealth(addvalue);
}
@@ -721,7 +712,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
Motion_Initialize();
i_AI = ai ? ai : FactorySelector::selectAI(this);
- if (oldAI) delete oldAI;
+ delete oldAI;
IsAIEnabled = true;
i_AI->InitializeAI();
return true;
@@ -1271,16 +1262,26 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
}
}
- uint32 curhealth = data->curhealth;
- if (curhealth)
+ uint32 curhealth;
+
+ if (!m_regenHealth)
+ {
+ curhealth = data->curhealth;
+ if (curhealth)
+ {
+ curhealth = uint32(curhealth*_GetHealthMod(GetCreatureInfo()->rank));
+ if (curhealth < 1)
+ curhealth = 1;
+ }
+ SetPower(POWER_MANA,data->curmana);
+ }
+ else
{
- curhealth = uint32(curhealth*_GetHealthMod(GetCreatureInfo()->rank));
- if (curhealth < 1)
- curhealth = 1;
+ curhealth = GetMaxHealth();
+ SetPower(POWER_MANA,GetMaxPower(POWER_MANA));
}
SetHealth(m_deathState == ALIVE ? curhealth : 0);
- SetPower(POWER_MANA,data->curmana);
// checked at creature_template loading
m_defaultMovementType = MovementGeneratorType(data->movementType);
@@ -1472,7 +1473,7 @@ void Creature::setDeathState(DeathState s)
{
if ((s == JUST_DIED && !m_isDeadByDefault)||(s == JUST_ALIVED && m_isDeadByDefault))
{
- m_deathTimer = m_corpseDelay*IN_MILISECONDS;
+ m_deathTimer = m_corpseDelay*IN_MILLISECONDS;
// always save boss respawn time at death to prevent crash cheating
if (sWorld.getConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY) || isWorldBoss())
@@ -1605,6 +1606,9 @@ void Creature::Respawn(bool force)
uint16 poolid = GetDBTableGUIDLow() ? poolhandler.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0;
if (poolid)
poolhandler.UpdatePool<Creature>(poolid, GetDBTableGUIDLow());
+
+ //Re-initialize reactstate that could be altered by movementgenerators
+ InitializeReactState();
}
UpdateObjectVisibility();
@@ -1983,7 +1987,7 @@ void Creature::SaveRespawnTime()
if (m_respawnTime > time(NULL)) // dead (no corpse)
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),m_respawnTime);
else if (m_deathTimer > 0) // dead (corpse)
- objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),time(NULL)+m_respawnDelay+m_deathTimer/IN_MILISECONDS);
+ objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),time(NULL)+m_respawnDelay+m_deathTimer/IN_MILLISECONDS);
}
// this should not be called by petAI or
@@ -2166,7 +2170,7 @@ void Creature::AddCreatureSpellCooldown(uint32 spellid)
modOwner->ApplySpellMod(spellid, SPELLMOD_COOLDOWN, cooldown);
if (cooldown)
- _AddCreatureSpellCooldown(spellid, time(NULL) + cooldown/IN_MILISECONDS);
+ _AddCreatureSpellCooldown(spellid, time(NULL) + cooldown/IN_MILLISECONDS);
if (spellInfo->Category)
_AddCreatureCategoryCooldown(spellInfo->Category, time(NULL));
@@ -2185,7 +2189,7 @@ bool Creature::HasCategoryCooldown(uint32 spell_id) const
return true;
CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->Category);
- return(itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->CategoryRecoveryTime / IN_MILISECONDS)) > time(NULL));
+ return(itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->CategoryRecoveryTime / IN_MILLISECONDS)) > time(NULL));
}
bool Creature::HasSpellCooldown(uint32 spell_id) const
@@ -2209,7 +2213,7 @@ time_t Creature::GetRespawnTimeEx() const
if (m_respawnTime > now) // dead (no corpse)
return m_respawnTime;
else if (m_deathTimer > 0) // dead (corpse)
- return now+m_respawnDelay+m_deathTimer/IN_MILISECONDS;
+ return now+m_respawnDelay+m_deathTimer/IN_MILLISECONDS;
else
return now;
}
@@ -2251,7 +2255,7 @@ void Creature::AllLootRemovedFromCorpse()
// corpse was not skinnable -> apply corpse looted timer
if (!cinfo || !cinfo->SkinLootId)
- nDeathTimer = (uint32)((m_corpseDelay * IN_MILISECONDS) * sWorld.getRate(RATE_CORPSE_DECAY_LOOTED));
+ nDeathTimer = (uint32)((m_corpseDelay * IN_MILLISECONDS) * sWorld.getRate(RATE_CORPSE_DECAY_LOOTED));
// corpse skinnable, but without skinning flag, and then skinned, corpse will despawn next update
else
nDeathTimer = 0;
@@ -2413,7 +2417,7 @@ time_t Creature::GetLinkedCreatureRespawnTime() const
if (data->mapid == GetMapId()) // look up on the same map
targetMap = GetMap();
else // it shouldn't be instanceable map here
- targetMap = MapManager::Instance().FindMap(data->mapid);
+ targetMap = sMapMgr.FindMap(data->mapid);
}
if (targetMap)
return objmgr.GetCreatureRespawnTime(targetGuid,targetMap->GetInstanceId());
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index d2d93d787da..203106f635e 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -26,7 +26,7 @@
#include "UpdateMask.h"
#include "ItemPrototype.h"
#include "LootMgr.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Cell.h"
#include <list>
@@ -66,7 +66,7 @@ enum CreatureFlagsExtra
#endif
#define MAX_KILL_CREDIT 2
-#define CREATURE_REGEN_INTERVAL 2 * IN_MILISECONDS
+#define CREATURE_REGEN_INTERVAL 2 * IN_MILLISECONDS
// from `creature_template` table
struct CreatureInfo
@@ -314,6 +314,9 @@ struct VendorItem
int32 maxcount; // 0 for infinity item amount
uint32 incrtime; // time for restore items amount if maxcount != 0
uint32 ExtendedCost;
+
+ //helpers
+ bool IsGoldRequired(ItemPrototype const* pProto) const { return pProto->Flags2 & ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD || !ExtendedCost; }
};
typedef std::vector<VendorItem*> VendorItemList;
@@ -424,9 +427,20 @@ class Creature : public Unit, public GridObject<Creature>
bool canWalk() const { return GetCreatureInfo()->InhabitType & INHABIT_GROUND; }
bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; }
//bool canFly() const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; }
+
void SetReactState(ReactStates st) { m_reactState = st; }
ReactStates GetReactState() { return m_reactState; }
bool HasReactState(ReactStates state) const { return (m_reactState == state); }
+ void InitializeReactState()
+ {
+ if (isTotem() || isTrigger() || GetCreatureType() == CREATURE_TYPE_CRITTER)
+ SetReactState(REACT_PASSIVE);
+ else
+ SetReactState(REACT_AGGRESSIVE);
+ /*else if (isCivilian())
+ SetReactState(REACT_DEFENSIVE);*/;
+ }
+
///// TODO RENAME THIS!!!!!
bool isCanTrainingOf(Player* player, bool msg) const;
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
@@ -607,10 +621,10 @@ class Creature : public Unit, public GridObject<Creature>
bool hasInvolvedQuest(uint32 quest_id) const;
bool isRegeneratingHealth() { return m_regenHealth; }
- virtual uint8 GetPetAutoSpellSize() const { return CREATURE_MAX_SPELLS; }
+ virtual uint8 GetPetAutoSpellSize() const { return MAX_SPELL_CHARM; }
virtual uint32 GetPetAutoSpellOnPos(uint8 pos) const
{
- if (pos >= CREATURE_MAX_SPELLS || m_charmInfo->GetCharmSpell(pos)->GetType() != ACT_ENABLED)
+ if (pos >= MAX_SPELL_CHARM || m_charmInfo->GetCharmSpell(pos)->GetType() != ACT_ENABLED)
return 0;
else
return m_charmInfo->GetCharmSpell(pos)->GetAction();
@@ -696,7 +710,7 @@ class Creature : public Unit, public GridObject<Creature>
bool DisableReputationGain;
- CreatureInfo const* m_creatureInfo; // in difficulty mode > 0 can different from ObjMgr::GetCreatureTemplate(GetEntry())
+ CreatureInfo const* m_creatureInfo; // in difficulty mode > 0 can different from objmgr.::GetCreatureTemplate(GetEntry())
CreatureData const* m_creatureData;
uint16 m_LootMode; // bitmask, default LOOT_MODE_DEFAULT, determines what loot will be lootable
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index c2af59458f7..7bd05123ec5 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.cpp
+++ b/src/server/game/Entities/Creature/CreatureGroups.cpp
@@ -22,13 +22,11 @@
#include "CreatureGroups.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
-#include "Policies/SingletonImp.h"
+
#include "CreatureAI.h"
#define MAX_DESYNC 5.0f
-INSTANTIATE_SINGLETON_1(CreatureGroupManager);
-
CreatureGroupInfoType CreatureGroupMap;
void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member)
diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h
index 521586b7457..4aa49571b5d 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.h
+++ b/src/server/game/Entities/Creature/CreatureGroups.h
@@ -35,12 +35,15 @@ struct FormationInfo
class CreatureGroupManager
{
+ friend class ACE_Singleton<CreatureGroupManager, ACE_Null_Mutex>;
public:
void AddCreatureToGroup(uint32 group_id, Creature *creature);
void RemoveCreatureFromGroup(CreatureGroup *group, Creature *creature);
void LoadCreatureFormations();
};
+#define formation_mgr (*ACE_Singleton<CreatureGroupManager, ACE_Null_Mutex>::instance())
+
typedef UNORDERED_MAP<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType;
extern CreatureGroupInfoType CreatureGroupMap;
@@ -73,6 +76,4 @@ class CreatureGroup
void MemberAttackStart(Creature* member, Unit *target);
};
-#define formation_mgr Trinity::Singleton<CreatureGroupManager>::Instance()
-
#endif
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index 3e0fec52bc7..cbbe7dc052b 100644
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -522,7 +522,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
}
// rewarded honor points. Multiply with 10 to satisfy client
- data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
+ data << 10 * Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills());
data << float(0); // new 3.3.0, honor multiplier?
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0)
data << int32(pQuest->GetRewSpellCast()); // casted spell
@@ -616,7 +616,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest)
data << int32(pQuest->GetRewSpellCast()); // casted spell
// rewarded honor points
- data << uint32(Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
+ data << Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills());
data << float(0); // new reward honor (multipled by ~62 at client side)
data << uint32(pQuest->GetSrcItemId()); // source item id
data << uint32(pQuest->GetFlags() & 0xFFFF); // quest flags
@@ -775,7 +775,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->XPValue(pSession->GetPlayer())*sWorld.getRate(RATE_XP_QUEST));
// rewarded honor points. Multiply with 10 to satisfy client
- data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills()));
+ data << 10 * Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills());
data << float(0); // unk, honor multiplier?
data << uint32(0x08); // unused by client?
data << uint32(pQuest->GetRewSpell()); // reward spell, this spell will display (icon) (casted if RewSpellCast == 0)
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index 48179190a6e..529710eda90 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -23,7 +23,7 @@
#include "Opcodes.h"
#include "World.h"
#include "ObjectAccessor.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "GridNotifiers.h"
#include "CellImpl.h"
#include "GridNotifiersImpl.h"
@@ -46,7 +46,7 @@ void DynamicObject::AddToWorld()
///- Register the dynamicObject for guid lookup
if (!IsInWorld())
{
- ObjectAccessor::Instance().AddObject(this);
+ sObjectAccessor.AddObject(this);
WorldObject::AddToWorld();
}
}
@@ -69,7 +69,7 @@ void DynamicObject::RemoveFromWorld()
}
}
WorldObject::RemoveFromWorld();
- ObjectAccessor::Instance().RemoveObject(this);
+ sObjectAccessor.RemoveObject(this);
}
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 596b156bd35..c2458a181a5 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -22,14 +22,14 @@
#include "QuestDef.h"
#include "GameObject.h"
#include "ObjectMgr.h"
-#include "PoolHandler.h"
+#include "PoolMgr.h"
#include "SpellMgr.h"
#include "Spell.h"
#include "UpdateMask.h"
#include "Opcodes.h"
#include "WorldPacket.h"
#include "World.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "LootMgr.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
@@ -117,7 +117,7 @@ void GameObject::AddToWorld()
if (m_zoneScript)
m_zoneScript->OnGameObjectCreate(this, true);
- ObjectAccessor::Instance().AddObject(this);
+ sObjectAccessor.AddObject(this);
WorldObject::AddToWorld();
}
}
@@ -139,7 +139,7 @@ void GameObject::RemoveFromWorld()
sLog.outError("Delete GameObject (GUID: %u Entry: %u) that have references in not found creature %u GO list. Crash possible later.",GetGUIDLow(),GetGOInfo()->id,GUID_LOPART(owner_guid));
}
WorldObject::RemoveFromWorld();
- ObjectAccessor::Instance().RemoveObject(this);
+ sObjectAccessor.RemoveObject(this);
}
}
@@ -1626,7 +1626,7 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
if (m_goValue->building.health <= m_goInfo->building.damagedNumHits)
{
if (!m_goInfo->building.destroyedDisplayId)
- m_goValue->building.health = 0;
+ m_goValue->building.health = m_goInfo->building.damagedNumHits;
else if (!m_goValue->building.health)
m_goValue->building.health = 1;
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 2154adf80c0..2c1765ea14e 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -25,7 +25,7 @@
#include "SharedDefines.h"
#include "Object.h"
#include "LootMgr.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform
#if defined(__GNUC__)
@@ -479,7 +479,7 @@ struct GameObjectInfo
case GAMEOBJECT_TYPE_AREADAMAGE: autoCloseTime = areadamage.autoCloseTime; break;
default: break;
}
- return autoCloseTime / IN_MILISECONDS; // prior to 3.0.3, conversion was / 0x10000;
+ return autoCloseTime / IN_MILLISECONDS; // prior to 3.0.3, conversion was / 0x10000;
}
uint32 GetLootId() const
@@ -500,6 +500,16 @@ struct GameObjectInfo
default: return 0;
}
}
+ uint32 GetEventScriptId() const
+ {
+ switch(type)
+ {
+ case GAMEOBJECT_TYPE_GOOBER: return goober.eventId;
+ case GAMEOBJECT_TYPE_CHEST: return chest.eventId;
+ case GAMEOBJECT_TYPE_CAMERA: return camera.eventID;
+ default: return 0;
+ }
+ }
};
class OPvPCapturePoint;
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index aa78126b198..12fd9efee28 100644
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -20,7 +20,7 @@
#include "Common.h"
#include "ObjectMgr.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Bag.h"
#include "Log.h"
@@ -117,11 +117,8 @@ bool Bag::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult_AutoPtr result)
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
{
SetUInt64Value(CONTAINER_FIELD_SLOT_1 + (i*2), 0);
- if (m_bagslot[i])
- {
- delete m_bagslot[i];
- m_bagslot[i] = NULL;
- }
+ delete m_bagslot[i];
+ m_bagslot[i] = NULL;
}
return true;
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 5c2d94d399b..52d9daeb4c8 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -18,11 +18,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+ #include <ace/Auto_Ptr.h>
+
#include "Common.h"
#include "Item.h"
#include "ObjectMgr.h"
#include "WorldPacket.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "ItemEnchantmentMgr.h"
#include "SpellMgr.h"
#include "ScriptMgr.h"
@@ -633,7 +635,7 @@ void Item::SetState(ItemUpdateState state, Player *forplayer)
{
// pretend the item never existed
RemoveFromUpdateQueueOf(forplayer);
- forplayer->DeleteRefundReference(GetGUID());
+ forplayer->DeleteRefundReference(GetGUIDLow());
delete this;
return;
}
@@ -834,7 +836,7 @@ bool Item::IsTargetValidForItemUse(Unit* pUnitTarget)
for (ConditionList::const_iterator itr = conditions.begin(); itr != conditions.end(); ++itr)
{
- ItemRequiredTarget *irt = new ItemRequiredTarget((ItemRequiredTargetType)(*itr)->mConditionValue1, (*itr)->mConditionValue2);
+ ACE_Auto_Ptr<ItemRequiredTarget> irt(new ItemRequiredTarget((ItemRequiredTargetType)(*itr)->mConditionValue1, (*itr)->mConditionValue2));
if (irt->IsFitToRequirements(pUnitTarget))
return true;
}
@@ -1035,20 +1037,11 @@ bool Item::IsBindedNotWith(Player const* player) const
if (GetOwnerGUID() == player->GetGUID())
return false;
- // not BOA item case
- if (!IsBoundAccountWide())
- return true;
-
- // online
- if (Player* owner = objmgr.GetPlayer(GetOwnerGUID()))
- {
- return owner->GetSession()->GetAccountId() != player->GetSession()->GetAccountId();
- }
- // offline slow case
- else
- {
- return objmgr.GetPlayerAccountIdByGUID(GetOwnerGUID()) != player->GetSession()->GetAccountId();
- }
+ // BOA item case
+ if (IsBoundAccountWide())
+ return false;
+
+ return true;
}
bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const
@@ -1106,7 +1099,7 @@ void Item::SetNotRefundable(Player *owner, bool changestate)
SetPaidExtendedCost(0);
DeleteRefundDataFromDB();
- owner->DeleteRefundReference(GetGUID());
+ owner->DeleteRefundReference(GetGUIDLow());
}
void Item::UpdatePlayedTime(Player *owner)
@@ -1147,4 +1140,4 @@ uint32 Item::GetPlayedTime()
bool Item::IsRefundExpired()
{
return (GetPlayedTime() > 2*HOUR);
-} \ No newline at end of file
+}
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index 8594ea864ba..440ea0027e8 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <functional>
#include "ItemEnchantmentMgr.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Log.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
@@ -91,18 +91,10 @@ uint32 GetItemEnchantMod(int32 entry)
if (!entry)
return 0;
- EnchantmentStore::const_iterator tab;
-
if (entry == -1)
- {
- tab = RandomItemEnch.begin();
- entry = urand(1, RandomItemEnch.size()) - 1;
- for (uint32 i = 0; i < entry; ++i)
- ++tab;
- }
- else
- tab = RandomItemEnch.find(entry);
-
+ return 0;
+
+ EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry);
if (tab == RandomItemEnch.end())
{
sLog.outErrorDb("Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.",entry);
diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h
index 31025005a15..1a91ad10c6b 100644
--- a/src/server/game/Entities/Item/ItemPrototype.h
+++ b/src/server/game/Entities/Item/ItemPrototype.h
@@ -111,8 +111,9 @@ enum ITEM_FLAGS
ITEM_FLAGS_OPENABLE = 0x00000004,
ITEM_FLAGS_WRAPPED = 0x00000008,
ITEM_FLAGS_BROKEN = 0x00000010, // appears red icon (like when item durability == 0)
- ITEM_FLAGS_TOTEM = 0x00000020, // ?
+ ITEM_FLAGS_INDESTRUCTIBLE = 0x00000020, // Item can not be destroyed, except by using spell (item can be reagent for spell and then allowed)
ITEM_FLAGS_USABLE = 0x00000040, // ?
+ ITEM_FLAGS_NO_EQUIP_COOLDOWN = 0x00000080, // ?
ITEM_FLAGS_WRAPPER = 0x00000200, // used or not used wrapper
ITEM_FLAGS_PARTY_LOOT = 0x00000800, // determines if item is party loot or not
ITEM_FLAGS_REFUNDABLE = 0x00001000, // item cost can be refunded within 2 hours after purchase
@@ -135,7 +136,7 @@ enum ItemFlagsExtra
{
ITEM_FLAGS_EXTRA_HORDE_ONLY = 0x00000001,
ITEM_FLAGS_EXTRA_ALLIANCE_ONLY = 0x00000002,
- ITEM_FLAGS_EXTRA_REFUNDABLE = 0x00000004,
+ ITEM_FLAGS_EXTRA_EXT_COST_REQUIRES_GOLD = 0x00000004, // when item uses extended cost, gold is also required
ITEM_FLAGS_EXTRA_NEED_ROLL_DISABLED = 0x00000100
};
@@ -623,7 +624,7 @@ struct ItemPrototype
uint32 GetMaxStackSize() const
{
- return (Stackable == 2147483647 || Stackable <= 0 || Stackable == 1000) ? uint32(0x7FFFFFFF-1) : uint32(Stackable);
+ return (Stackable == 2147483647 || Stackable <= 0) ? uint32(0x7FFFFFFF-1) : uint32(Stackable);
}
float getDPS() const
@@ -661,6 +662,17 @@ struct ItemLocale
std::vector<std::string> Description;
};
+struct ItemSetNameEntry
+{
+ std::string name;
+ uint32 InventoryType;
+};
+
+struct ItemSetNameLocale
+{
+ std::vector<std::string> Name;
+};
+
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
#if defined(__GNUC__)
#pragma pack()
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 2a7397db8b8..fe4b8673b8f 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -35,7 +35,7 @@
#include "MapManager.h"
#include "ObjectAccessor.h"
#include "Log.h"
-#include "Transports.h"
+#include "Transport.h"
#include "TargetedMovementGenerator.h"
#include "WaypointMovementGenerator.h"
#include "VMapFactory.h"
@@ -110,16 +110,12 @@ Object::~Object()
{
sLog.outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry());
assert(false);
- ObjectAccessor::Instance().RemoveUpdateObject(this);
+ sObjectAccessor.RemoveUpdateObject(this);
}
- if (m_uint32Values)
- {
- //DEBUG_LOG("Object desctr 1 check (%p)",(void*)this);
- delete [] m_uint32Values;
- delete [] m_uint32Values_mirror;
- //DEBUG_LOG("Object desctr 2 check (%p)",(void*)this);
- }
+ delete [] m_uint32Values;
+ delete [] m_uint32Values_mirror;
+
}
void Object::_InitValues()
@@ -299,7 +295,11 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
{
//WPAssert(this->ToPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE);
- FlightPathMovementGenerator *fmg = (FlightPathMovementGenerator*)(const_cast<Player*>(this->ToPlayer())->GetMotionMaster()->top());
+ Player *player = const_cast<Object*>(this)->ToPlayer();
+ if (!player)
+ return;
+
+ FlightPathMovementGenerator *fmg = (FlightPathMovementGenerator*)(player->GetMotionMaster()->top());
uint32 flags3 = MOVEFLAG_GLIDE;
@@ -324,10 +324,10 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
}
}
- Path &path = fmg->GetPath();
+ TaxiPathNodeList& path = const_cast<TaxiPathNodeList&>(fmg->GetPath());
float x, y, z;
- this->ToPlayer()->GetPosition(x, y, z);
+ player->GetPosition(x, y, z);
uint32 inflighttime = uint32(path.GetPassedLength(fmg->GetCurrentNode(), x, y, z) * 32);
uint32 traveltime = uint32(path.GetTotalLength() * 32);
@@ -342,21 +342,21 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
*data << uint32(0); // added in 3.1
- uint32 poscount = uint32(path.Size());
+ uint32 poscount = uint32(path.size());
*data << uint32(poscount); // points count
for (uint32 i = 0; i < poscount; ++i)
{
- *data << path.GetNodes()[i].x;
- *data << path.GetNodes()[i].y;
- *data << path.GetNodes()[i].z;
+ *data << float(path[i].x);
+ *data << float(path[i].y);
+ *data << float(path[i].z);
}
*data << uint8(0); // added in 3.0.8
- *data << path.GetNodes()[poscount-1].x;
- *data << path.GetNodes()[poscount-1].y;
- *data << path.GetNodes()[poscount-1].z;
+ *data << float(path[poscount-1].x);
+ *data << float(path[poscount-1].y);
+ *data << float(path[poscount-1].z);
}
}
else
@@ -731,7 +731,7 @@ void Object::ClearUpdateMask(bool remove)
if (m_objectUpdated)
{
if (remove)
- ObjectAccessor::Instance().RemoveUpdateObject(this);
+ sObjectAccessor.RemoveUpdateObject(this);
m_objectUpdated = false;
}
}
@@ -804,7 +804,7 @@ void Object::SetInt32Value(uint16 index, int32 value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -823,7 +823,7 @@ void Object::SetUInt32Value(uint16 index, uint32 value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -849,7 +849,7 @@ void Object::SetUInt64Value(uint16 index, const uint64 &value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -868,7 +868,7 @@ bool Object::AddUInt64Value(uint16 index, const uint64 &value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -889,7 +889,7 @@ bool Object::RemoveUInt64Value(uint16 index, const uint64 &value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -910,7 +910,7 @@ void Object::SetFloatValue(uint16 index, float value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -936,7 +936,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -962,7 +962,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1031,7 +1031,7 @@ void Object::SetFlag(uint16 index, uint32 newFlag)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1052,7 +1052,7 @@ void Object::RemoveFlag(uint16 index, uint32 oldFlag)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1077,7 +1077,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1102,7 +1102,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
@@ -1379,28 +1379,15 @@ bool Position::HasInArc(float arc, const Position *obj) const
return true;
// move arc to range 0.. 2*pi
- while (arc >= 2.0f * M_PI)
- arc -= 2.0f * M_PI;
- while (arc < 0)
- arc += 2.0f * M_PI;
+ arc = MapManager::NormalizeOrientation(arc);
float angle = GetAngle(obj);
angle -= m_orientation;
- //if (angle > 100 || angle < -100)
- //{
- // sLog.outCrash("Invalid Angle %f: this %u %u %f %f %f %f, that %u %u %f %f %f %f", angle,
- // GetEntry(), GetGUIDLow(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(),
- // obj->GetEntry(), obj->GetGUIDLow(), obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), obj->GetOrientation());
- // assert(false);
- // return false;
- //}
-
// move angle to range -pi ... +pi
- while (angle > M_PI)
- angle -= 2.0f * M_PI;
- while (angle < -M_PI)
- angle += 2.0f * M_PI;
+ angle = MapManager::NormalizeOrientation(angle);
+ if(angle > M_PI)
+ angle -= 2.0f*M_PI;
float lborder = -1 * (arc/2.0f); // in range -pi..0
float rborder = (arc/2.0f); // in range 0..pi
@@ -1515,7 +1502,7 @@ void Object::ForceValuesUpdateAtIndex(uint32 i)
{
if (!m_objectUpdated)
{
- ObjectAccessor::Instance().AddUpdateObject(this);
+ sObjectAccessor.AddUpdateObject(this);
m_objectUpdated = true;
}
}
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index c5a412c3ab7..ad7d0c072ab 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -24,7 +24,7 @@
#include "Common.h"
#include "UpdateFields.h"
#include "UpdateData.h"
-#include "GameSystem/GridReference.h"
+#include "GridReference.h"
#include "ObjectDefines.h"
#include "GridDefines.h"
#include "Map.h"
diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h
index a0e5ac1952d..15ce30d9a81 100644
--- a/src/server/game/Entities/Object/ObjectDefines.h
+++ b/src/server/game/Entities/Object/ObjectDefines.h
@@ -21,7 +21,7 @@
#ifndef TRINITY_OBJECTDEFINES_H
#define TRINITY_OBJECTDEFINES_H
-#include "Platform/Define.h"
+#include "Define.h"
// used for creating values for respawn for example
#define MAKE_PAIR64(l, h) uint64(uint32(l) | (uint64(h) << 32))
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index 68f0501f304..0b7a553d666 100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
@@ -25,7 +25,7 @@
#include "Log.h"
#include "Opcodes.h"
#include "World.h"
-#include <zlib/zlib.h>
+#include "zlib.h"
UpdateData::UpdateData() : m_blockCount(0)
{
diff --git a/src/server/game/Entities/Object/Updates/UpdateFields.h b/src/server/game/Entities/Object/Updates/UpdateFields.h
index 5f819375677..ecef0276e7a 100644
--- a/src/server/game/Entities/Object/Updates/UpdateFields.h
+++ b/src/server/game/Entities/Object/Updates/UpdateFields.h
@@ -21,7 +21,7 @@
#ifndef _UPDATEFIELDS_AUTO_H
#define _UPDATEFIELDS_AUTO_H
-// Auto generated for version 3, 3, 3, 11723
+// Auto generated for version 3, 3, 5, 12340
enum EObjectFields
{
diff --git a/src/server/game/Entities/Object/Updates/UpdateMask.h b/src/server/game/Entities/Object/Updates/UpdateMask.h
index 527bec42aa7..a18a044ee33 100644
--- a/src/server/game/Entities/Object/Updates/UpdateMask.h
+++ b/src/server/game/Entities/Object/Updates/UpdateMask.h
@@ -32,8 +32,7 @@ class UpdateMask
~UpdateMask()
{
- if (mUpdateMask)
- delete [] mUpdateMask;
+ delete [] mUpdateMask;
}
void SetBit (uint32 index)
@@ -58,8 +57,7 @@ class UpdateMask
void SetCount (uint32 valuesCount)
{
- if (mUpdateMask)
- delete [] mUpdateMask;
+ delete [] mUpdateMask;
mCount = valuesCount;
mBlocks = (valuesCount + 31) / 32;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 45b07e7bd96..1f0533ddcda 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Log.h"
#include "WorldPacket.h"
#include "ObjectMgr.h"
@@ -74,7 +74,7 @@ void Pet::AddToWorld()
if (!IsInWorld())
{
///- Register the pet for guid lookup
- ObjectAccessor::Instance().AddObject(this);
+ sObjectAccessor.AddObject(this);
Unit::AddToWorld();
AIM_Initialize();
}
@@ -98,7 +98,7 @@ void Pet::RemoveFromWorld()
{
///- Don't call the function for Creature, normal mobs + totems go in a different storage
Unit::RemoveFromWorld();
- ObjectAccessor::Instance().RemoveObject(this);
+ sObjectAccessor.RemoveObject(this);
}
}
@@ -324,9 +324,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
if (result)
{
- if (m_declinedname)
- delete m_declinedname;
-
+ delete m_declinedname;
m_declinedname = new DeclinedName;
Field *fields2 = result->Fetch();
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
@@ -621,7 +619,7 @@ void Creature::Regenerate(Powers power)
if ((*i)->GetMiscValue() == power)
addvalue *= ((*i)->GetAmount() + 100) / 100.0f;
- addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (isHunterPet()? PET_FOCUS_REGEN_INTERVAL : CREATURE_REGEN_INTERVAL) / (5 * IN_MILISECONDS);
+ addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * (isHunterPet()? PET_FOCUS_REGEN_INTERVAL : CREATURE_REGEN_INTERVAL) / (5 * IN_MILLISECONDS);
ModifyPower(power, (int32)addvalue);
}
@@ -1114,7 +1112,7 @@ void Pet::_LoadSpellCooldowns()
continue;
data << uint32(spell_id);
- data << uint32(uint32(db_time-curTime)*IN_MILISECONDS);
+ data << uint32(uint32(db_time-curTime)*IN_MILLISECONDS);
_AddCreatureSpellCooldown(spell_id,db_time);
@@ -1231,10 +1229,10 @@ void Pet::_LoadAuras(uint32 timediff)
// negative effects should continue counting down after logout
if (remaintime != -1 && !IsPositiveSpell(spellid))
{
- if (remaintime/IN_MILISECONDS <= int32(timediff))
+ if (remaintime/IN_MILLISECONDS <= int32(timediff))
continue;
- remaintime -= timediff*IN_MILISECONDS;
+ remaintime -= timediff*IN_MILLISECONDS;
}
// prevent wrong values of remaincharges
diff --git a/src/server/game/Entities/Pet/Pet.h b/src/server/game/Entities/Pet/Pet.h
index 16e80170cd4..2c9b72b4fa6 100644
--- a/src/server/game/Entities/Pet/Pet.h
+++ b/src/server/game/Entities/Pet/Pet.h
@@ -118,7 +118,7 @@ typedef std::vector<uint32> AutoSpellList;
#define PET_FOLLOW_DIST 1
#define PET_FOLLOW_ANGLE (M_PI/2)
-#define PET_FOCUS_REGEN_INTERVAL 4 * IN_MILISECONDS
+#define PET_FOCUS_REGEN_INTERVAL 4 * IN_MILLISECONDS
class Player;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 2221098a9be..5a8cb7b66fc 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -20,7 +20,7 @@
#include "Common.h"
#include "Language.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Log.h"
#include "Opcodes.h"
#include "SpellMgr.h"
@@ -50,7 +50,7 @@
#include "Guild.h"
#include "Pet.h"
#include "Util.h"
-#include "Transports.h"
+#include "Transport.h"
#include "Weather.h"
#include "BattleGround.h"
#include "BattleGroundAV.h"
@@ -59,7 +59,7 @@
#include "OutdoorPvPMgr.h"
#include "ArenaTeam.h"
#include "Chat.h"
-#include "Database/DatabaseImpl.h"
+#include "DatabaseImpl.h"
#include "Spell.h"
#include "SocialMgr.h"
#include "GameEventMgr.h"
@@ -69,7 +69,7 @@
#include "ConditionMgr.h"
#include <cmath>
-#define ZONE_UPDATE_INTERVAL (1*IN_MILISECONDS)
+#define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS)
#define PLAYER_SKILL_INDEX(x) (PLAYER_SKILL_INFO_1_1 + ((x)*3))
#define PLAYER_SKILL_VALUE_INDEX(x) (PLAYER_SKILL_INDEX(x)+1)
@@ -280,6 +280,105 @@ std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi)
return ss;
}
+//== TradeData =================================================
+
+TradeData* TradeData::GetTraderData() const
+{
+ return m_trader->GetTradeData();
+}
+
+Item* TradeData::GetItem(TradeSlots slot) const
+{
+ return m_items[slot] ? m_player->GetItemByGuid(m_items[slot]) : NULL;
+}
+
+bool TradeData::HasItem(uint64 item_guid) const
+{
+ for(uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
+ if (m_items[i] == item_guid)
+ return true;
+
+ return false;
+}
+
+Item* TradeData::GetSpellCastItem() const
+{
+ return m_spellCastItem ? m_player->GetItemByGuid(m_spellCastItem) : NULL;
+}
+
+void TradeData::SetItem(TradeSlots slot, Item* item)
+{
+ uint64 itemGuid = item ? item->GetGUID() : 0;
+
+ if (m_items[slot] == itemGuid)
+ return;
+
+ m_items[slot] = itemGuid;
+
+ SetAccepted(false);
+ GetTraderData()->SetAccepted(false);
+
+ Update();
+
+ // need remove possible trader spell applied to changed item
+ if (slot == TRADE_SLOT_NONTRADED)
+ GetTraderData()->SetSpell(0);
+
+ // need remove possible player spell applied (possible move reagent)
+ SetSpell(0);
+}
+
+void TradeData::SetSpell(uint32 spell_id, Item* castItem /*= NULL*/)
+{
+ uint64 itemGuid = castItem ? castItem->GetGUID() : 0;
+
+ if (m_spell == spell_id && m_spellCastItem == itemGuid)
+ return;
+
+ m_spell = spell_id;
+ m_spellCastItem = itemGuid;
+
+ SetAccepted(false);
+ GetTraderData()->SetAccepted(false);
+
+ Update(true); // send spell info to item owner
+ Update(false); // send spell info to caster self
+}
+
+void TradeData::SetMoney(uint32 money)
+{
+ if (m_money == money)
+ return;
+
+ m_money = money;
+
+ SetAccepted(false);
+ GetTraderData()->SetAccepted(false);
+
+ Update(true);
+}
+
+void TradeData::Update(bool forTarget /*= true*/)
+{
+ if (forTarget)
+ m_trader->GetSession()->SendUpdateTrade(true); // player state for trader
+ else
+ m_player->GetSession()->SendUpdateTrade(false); // player state for player
+}
+
+void TradeData::SetAccepted(bool state, bool crosssend /*= false*/)
+{
+ m_accepted = state;
+
+ if (!state)
+ {
+ if (crosssend)
+ m_trader->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
+ else
+ m_player->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
+ }
+}
+
// == Player ====================================================
UpdateMask Player::updateVisualBits;
@@ -354,8 +453,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_bHasDelayedTeleport = false;
m_teleport_options = 0;
- pTrader = 0;
- ClearTrade();
+ m_trade = NULL;
m_cinematic = 0;
@@ -379,7 +477,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_swingErrorMsg = 0;
- m_DetectInvTimer = 1*IN_MILISECONDS;
+ m_DetectInvTimer = 1*IN_MILLISECONDS;
for (uint8 j = 0; j < PLAYER_MAX_BATTLEGROUND_QUEUES; ++j)
{
@@ -477,6 +575,8 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
//Default movement to run mode
//m_unit_movement_flags = 0;
+ m_AreaID = 0;
+
m_mover = this;
m_movedPlayer = this;
m_seer = this;
@@ -514,10 +614,7 @@ Player::~Player ()
// Note: buy back item already deleted from DB when player was saved
for (uint8 i = 0; i < PLAYER_SLOTS_COUNT; ++i)
- {
- if (m_items[i])
- delete m_items[i];
- }
+ delete m_items[i];
for (PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
delete itr->second;
@@ -539,8 +636,7 @@ Player::~Player ()
delete PlayerTalkClass;
for (size_t x = 0; x < ItemSetEff.size(); x++)
- if (ItemSetEff[x])
- delete ItemSetEff[x];
+ delete ItemSetEff[x];
delete m_declinedname;
delete m_runes;
@@ -591,7 +687,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
return false;
}
- SetMap(MapManager::Instance().CreateMap(info->mapId, this, 0));
+ SetMap(sMapMgr.CreateMap(info->mapId, this, 0));
uint8 powertype = cEntry->powerType;
@@ -941,12 +1037,12 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
switch (timer)
{
case FATIGUE_TIMER:
- return MINUTE*IN_MILISECONDS;
+ return MINUTE*IN_MILLISECONDS;
case BREATH_TIMER:
{
if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_DISABLE_BREATHING))
return DISABLED_MIRROR_TIMER;
- int32 UnderWaterTime = 3*MINUTE*IN_MILISECONDS;
+ int32 UnderWaterTime = 3*MINUTE*IN_MILLISECONDS;
AuraEffectList const& mModWaterBreathing = GetAuraEffectsByType(SPELL_AURA_MOD_WATER_BREATHING);
for (AuraEffectList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetAmount()) / 100.0f);
@@ -956,7 +1052,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
{
if (!isAlive())
return DISABLED_MIRROR_TIMER;
- return 1*IN_MILISECONDS;
+ return 1*IN_MILLISECONDS;
}
default:
return 0;
@@ -990,7 +1086,7 @@ void Player::HandleDrowning(uint32 time_diff)
// Timer limit - need deal damage
if (m_MirrorTimer[BREATH_TIMER] < 0)
{
- m_MirrorTimer[BREATH_TIMER]+= 1*IN_MILISECONDS;
+ m_MirrorTimer[BREATH_TIMER]+= 1*IN_MILLISECONDS;
// Calculate and deal damage
// TODO: Check this formula
uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel()-1);
@@ -1026,7 +1122,7 @@ void Player::HandleDrowning(uint32 time_diff)
// Timer limit - need deal damage or teleport ghost to graveyard
if (m_MirrorTimer[FATIGUE_TIMER] < 0)
{
- m_MirrorTimer[FATIGUE_TIMER]+= 1*IN_MILISECONDS;
+ m_MirrorTimer[FATIGUE_TIMER]+= 1*IN_MILLISECONDS;
if (isAlive()) // Calculate and deal damage
{
uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel()-1);
@@ -1059,7 +1155,7 @@ void Player::HandleDrowning(uint32 time_diff)
m_MirrorTimer[FIRE_TIMER]-=time_diff;
if (m_MirrorTimer[FIRE_TIMER] < 0)
{
- m_MirrorTimer[FIRE_TIMER]+= 1*IN_MILISECONDS;
+ m_MirrorTimer[FIRE_TIMER]+= 1*IN_MILLISECONDS;
// Calculate and deal damage
// TODO: Check this formula
uint32 damage = urand(600, 700);
@@ -1394,7 +1490,7 @@ void Player::Update(uint32 p_time)
{
m_drunkTimer += p_time;
- if (m_drunkTimer > 10*IN_MILISECONDS)
+ if (m_drunkTimer > 10*IN_MILLISECONDS)
HandleSobering();
}
@@ -1826,12 +1922,12 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// Check enter rights before map getting to avoid creating instance copy for player
// this check not dependent from map instance copy and same for all instance copies of selected map
- if (!MapManager::Instance().CanPlayerEnter(mapid, this, false))
+ if (!sMapMgr.CanPlayerEnter(mapid, this, false))
return false;
// If the map is not created, assume it is possible to enter it.
// It will be created in the WorldPortAck.
- Map *map = MapManager::Instance().FindMap(mapid);
+ Map *map = sMapMgr.FindMap(mapid);
if (!map || map->CanEnter(this))
{
//lets reset near teleport flag if it wasn't reset during chained teleports
@@ -2147,7 +2243,7 @@ void Player::Regenerate(Powers power)
// Butchery requires combat for this effect
if (power != POWER_RUNIC_POWER || isInCombat())
- addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * ((power != POWER_ENERGY) ? m_regenTimerCount : m_regenTimer) / (5 * IN_MILISECONDS);
+ addvalue += GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_POWER_REGEN, power) * ((power != POWER_ENERGY) ? m_regenTimerCount : m_regenTimer) / (5 * IN_MILLISECONDS);
}
if (addvalue < 0.0f)
@@ -2225,7 +2321,7 @@ void Player::RegenerateHealth()
for (AuraEffectList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
addvalue *= (100.0f + (*i)->GetAmount()) / 100.0f;
- addvalue += GetTotalAuraModifier(SPELL_AURA_MOD_REGEN) * 2 * IN_MILISECONDS / (5 * IN_MILISECONDS);
+ addvalue += GetTotalAuraModifier(SPELL_AURA_MOD_REGEN) * 2 * IN_MILLISECONDS / (5 * IN_MILLISECONDS);
}
else if (HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT))
addvalue *= GetTotalAuraModifier(SPELL_AURA_MOD_REGEN_DURING_COMBAT) / 100.0f;
@@ -2533,13 +2629,6 @@ void Player::GiveXP(uint32 xp, Unit* victim)
// XP resting bonus for kill
uint32 rested_bonus_xp = victim ? GetXPRestBonus(xp) : 0;
- // Heirloom Experience Bonus
- float heirloomModifier = 1.0f;
- for (int i = 0; i < EQUIPMENT_SLOT_END; ++i)
- if (m_items[i] && m_items[i]->GetProto()->Spells->SpellId == 57353)
- heirloomModifier += 0.1f;
- xp = uint32(xp * heirloomModifier);
-
SendLogXPGain(xp,victim,rested_bonus_xp);
uint32 curXP = GetUInt32Value(PLAYER_XP);
@@ -2889,7 +2978,7 @@ void Player::SendInitialSpells()
continue;
}
- time_t cooldown = itr->second.end > curTime ? (itr->second.end-curTime)*IN_MILISECONDS : 0;
+ time_t cooldown = itr->second.end > curTime ? (itr->second.end-curTime)*IN_MILLISECONDS : 0;
if (sEntry->Category) // may be wrong, but anyway better than nothing...
{
@@ -3342,7 +3431,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
if (!Has310Flyer(false) && pSkill->id == SKILL_MOUNTS)
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
- spellInfo->CalculateSimpleValue(i) == 310)
+ SpellMgr::CalculateSpellEffectAmount(spellInfo, i) == 310)
SetHas310Flyer(true);
if (HasSkill(pSkill->id))
@@ -3447,6 +3536,15 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
bool learning = addSpell(spell_id,active,true,dependent,false);
+ // prevent duplicated entires in spell book, also not send if not in world (loading)
+ if (learning && IsInWorld())
+ {
+ WorldPacket data(SMSG_LEARNED_SPELL, 6);
+ data << uint32(spell_id);
+ data << uint16(0);
+ GetSession()->SendPacket(&data);
+ }
+
// learn all disabled higher ranks and required spells (recursive)
if (disabled)
{
@@ -3466,15 +3564,6 @@ void Player::learnSpell(uint32 spell_id, bool dependent)
learnSpell(itr2->second, false);
}
}
-
- // prevent duplicated entires in spell book, also not send if not in world (loading)
- if (!learning || !IsInWorld())
- return;
-
- WorldPacket data(SMSG_LEARNED_SPELL, 6);
- data << uint32(spell_id);
- data << uint16(0);
- GetSession()->SendPacket(&data);
}
void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
@@ -3616,7 +3705,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
SpellEntry const *pSpellInfo = sSpellStore.LookupEntry(spell_id);
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (pSpellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
- pSpellInfo->CalculateSimpleValue(i) == 310)
+ SpellMgr::CalculateSpellEffectAmount(pSpellInfo, i) == 310)
Has310Flyer(true, spell_id); // with true as first argument its also used to set/remove the flag
}
}
@@ -3710,7 +3799,7 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId)
pSpellInfo = sSpellStore.LookupEntry(itr->first);
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (pSpellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
- pSpellInfo->CalculateSimpleValue(i) == 310)
+ SpellMgr::CalculateSpellEffectAmount(pSpellInfo, i) == 310)
{
SetHas310Flyer(true);
return true;
@@ -3767,8 +3856,8 @@ void Player::RemoveArenaSpellCooldowns()
SpellEntry const * entry = sSpellStore.LookupEntry(itr->first);
// check if spellentry is present and if the cooldown is less than 10 mins
if (entry &&
- entry->RecoveryTime <= 10 * MINUTE * IN_MILISECONDS &&
- entry->CategoryRecoveryTime <= 10 * MINUTE * IN_MILISECONDS)
+ entry->RecoveryTime <= 10 * MINUTE * IN_MILLISECONDS &&
+ entry->CategoryRecoveryTime <= 10 * MINUTE * IN_MILLISECONDS)
{
// remove & notify
RemoveSpellCooldown(itr->first, true);
@@ -4259,7 +4348,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
// convert corpse to bones if exist (to prevent exiting Corpse in World without DB entry)
// bones will be deleted by corpse/bones deleting thread shortly
- ObjectAccessor::Instance().ConvertCorpseForPlayer(playerguid);
+ sObjectAccessor.ConvertCorpseForPlayer(playerguid);
// remove from guild
uint32 guildId = GetGuildIdFromDB(playerguid);
@@ -4556,7 +4645,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
if (Aura * aur = GetAura(15007, GetGUID()))
{
- aur->SetDuration(delta*IN_MILISECONDS);
+ aur->SetDuration(delta*IN_MILLISECONDS);
}
}
}
@@ -4609,7 +4698,7 @@ void Player::KillPlayer()
ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(GetMapId())->Instanceable());
// 6 minutes until repop at graveyard
- m_deathTimer = 6*MINUTE*IN_MILISECONDS;
+ m_deathTimer = 6*MINUTE*IN_MILLISECONDS;
UpdateCorpseReclaimDelay(); // dependent at use SetDeathPvP() call before kill
SendCorpseReclaimDelay();
@@ -4688,19 +4777,19 @@ void Player::CreateCorpse()
corpse->SaveToDB();
// register for player, but not show
- ObjectAccessor::Instance().AddCorpse(corpse);
+ sObjectAccessor.AddCorpse(corpse);
}
void Player::SpawnCorpseBones()
{
- if (ObjectAccessor::Instance().ConvertCorpseForPlayer(GetGUID()))
+ if (sObjectAccessor.ConvertCorpseForPlayer(GetGUID()))
if (!GetSession()->PlayerLogoutWithSave()) // at logout we will already store the player
SaveToDB(); // prevent loading as ghost without corpse
}
Corpse* Player::GetCorpse() const
{
- return ObjectAccessor::Instance().GetCorpseForPlayerGUID(GetGUID());
+ return sObjectAccessor.GetCorpseForPlayerGUID(GetGUID());
}
void Player::DurabilityLossAll(double percent, bool inventory)
@@ -6120,7 +6209,9 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
// code block for underwater state update
- UpdateUnderwaterState(GetMap(), x, y, z);
+ // Unit::SetPosition() checks for validity and updates our coordinates
+ // so we re-fetch them instead of using "raw" coordinates from function params
+ UpdateUnderwaterState(GetMap(), GetPositionX(), GetPositionY(), GetPositionZ());
if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
GetSession()->SendCancelTrade();
@@ -6445,7 +6536,7 @@ void Player::RewardReputation(Quest const *pQuest)
continue;
if (pQuest->RewRepValue[i])
{
- int32 rep = CalculateReputationGain(GetQuestLevel(pQuest), pQuest->RewRepValue[i], pQuest->RewRepFaction[i], true);
+ int32 rep = CalculateReputationGain(GetQuestLevel(pQuest), pQuest->RewRepValue[i]/100, pQuest->RewRepFaction[i], true);
if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(pQuest->RewRepFaction[i]))
GetReputationMgr().ModifyReputation(factionEntry, rep);
}
@@ -6506,7 +6597,7 @@ void Player::UpdateHonorFields()
///Calculate the amount of honor gained based on the victim
///and the size of the group for which the honor is divided
///An exact honor value can also be given (overriding the calcs)
-bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvptoken)
+bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, int32 honor, bool pvptoken)
{
// do not reward honor in arenas, but enable onkill spellproc
if (InArena())
@@ -6526,8 +6617,6 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt
uint64 victim_guid = 0;
uint32 victim_rank = 0;
- //uint32 rank_diff = 0;
- //time_t now = time(NULL);
// need call before fields update to have chance move yesterday data to appropriate fields before today data change.
UpdateHonorFields();
@@ -6536,7 +6625,10 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt
if (InBattleGround() && GetBattleGround() && GetBattleGround()->isArena())
return true;
- if (honor <= 0)
+ // Promote to float for calculations
+ float honor_f = honor;
+
+ if (honor_f <= 0)
{
if (!uVictim || uVictim == this || uVictim->HasAuraType(SPELL_AURA_NO_PVP_CREDIT))
return false;
@@ -6550,45 +6642,35 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt
if (GetTeam() == pVictim->GetTeam() && !sWorld.IsFFAPvPRealm())
return false;
- float f = 1; //need for total kills (?? need more info)
- uint32 k_grey = 0;
- uint32 k_level = getLevel();
- uint32 v_level = pVictim->getLevel();
-
- {
- // PLAYER_CHOSEN_TITLE VALUES DESCRIPTION
- // [0] Just name
- // [1..14] Alliance honor titles and player name
- // [15..28] Horde honor titles and player name
- // [29..38] Other title and player name
- // [39+] Nothing
- uint32 victim_title = pVictim->GetUInt32Value(PLAYER_CHOSEN_TITLE);
- // Get Killer titles, CharTitlesEntry::bit_index
- // Ranks:
- // title[1..14] -> rank[5..18]
- // title[15..28] -> rank[5..18]
- // title[other] -> 0
- if (victim_title == 0)
- victim_guid = 0; // Don't show HK: <rank> message, only log.
- else if (victim_title < 15)
- victim_rank = victim_title + 4;
- else if (victim_title < 29)
- victim_rank = victim_title - 14 + 4;
- else
- victim_guid = 0; // Don't show HK: <rank> message, only log.
- }
-
- k_grey = Trinity::XP::GetGrayLevel(k_level);
+ uint8 k_level = getLevel();
+ uint8 k_grey = Trinity::XP::GetGrayLevel(k_level);
+ uint8 v_level = pVictim->getLevel();
if (v_level <= k_grey)
return false;
- float diff_level = (k_level == k_grey) ? 1 : ((float(v_level) - float(k_grey)) / (float(k_level) - float(k_grey)));
-
- int32 v_rank =1; //need more info
+ // PLAYER_CHOSEN_TITLE VALUES DESCRIPTION
+ // [0] Just name
+ // [1..14] Alliance honor titles and player name
+ // [15..28] Horde honor titles and player name
+ // [29..38] Other title and player name
+ // [39+] Nothing
+ uint32 victim_title = pVictim->GetUInt32Value(PLAYER_CHOSEN_TITLE);
+ // Get Killer titles, CharTitlesEntry::bit_index
+ // Ranks:
+ // title[1..14] -> rank[5..18]
+ // title[15..28] -> rank[5..18]
+ // title[other] -> 0
+ if (victim_title == 0)
+ victim_guid = 0; // Don't show HK: <rank> message, only log.
+ else if (victim_title < 15)
+ victim_rank = victim_title + 4;
+ else if (victim_title < 29)
+ victim_rank = victim_title - 14 + 4;
+ else
+ victim_guid = 0; // Don't show HK: <rank> message, only log.
- honor = ((f * diff_level * (190 + v_rank*10))/6);
- honor *= ((float)k_level) / 21.50537f; //factor of dependence on levels of the killer
+ honor_f = ceil(Trinity::Honor::hk_honor_at_level_f(k_level) * (v_level - k_grey) / (k_level - k_grey));
// count the number of playerkills in one day
ApplyModUInt32Value(PLAYER_FIELD_KILLS, 1, true);
@@ -6603,7 +6685,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt
if (!uVictim->ToCreature()->isRacialLeader())
return false;
- honor = 100; // ??? need more info
+ honor_f = 100.0f; // ??? need more info
victim_rank = 19; // HK: Leader
}
}
@@ -6611,35 +6693,37 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt
if (uVictim != NULL)
{
if (groupsize > 1)
- honor /= groupsize;
+ honor_f /= groupsize;
// apply honor multiplier from aura (not stacking-get highest)
- honor = int32(float(honor) * (float(GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HONOR_GAIN_PCT))+100.0f)/100.0f);
+ honor_f *= (GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HONOR_GAIN_PCT) + 100) / 100.0f;
}
- honor *= sWorld.getRate(RATE_HONOR);
+ honor_f *= sWorld.getRate(RATE_HONOR);
+ // Back to int now
+ honor = honor_f;
// honor - for show honor points in log
// victim_guid - for show victim name in log
// victim_rank [1..4] HK: <dishonored rank>
// victim_rank [5..19] HK: <alliance\horde rank>
// victim_rank [0,20+] HK: <>
WorldPacket data(SMSG_PVP_CREDIT,4+8+4);
- data << (uint32) honor;
- data << (uint64) victim_guid;
- data << (uint32) victim_rank;
+ data << honor;
+ data << victim_guid;
+ data << victim_rank;
GetSession()->SendPacket(&data);
// add honor points
- ModifyHonorPoints(int32(honor));
+ ModifyHonorPoints(honor);
- ApplyModUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, uint32(honor), true);
+ ApplyModUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, honor, true);
if (InBattleGround() && honor > 0)
{
if (BattleGround *bg = GetBattleGround())
{
- bg->UpdatePlayerScore(this, SCORE_BONUS_HONOR, uint32(honor), false);//false: prevent looping
+ bg->UpdatePlayerScore(this, SCORE_BONUS_HONOR, honor, false); //false: prevent looping
}
}
@@ -6762,7 +6846,7 @@ uint32 Player::GetZoneIdFromDB(uint64 guid)
float posy = fields[2].GetFloat();
float posz = fields[3].GetFloat();
- zone = MapManager::Instance().GetZoneId(map,posx,posy,posz);
+ zone = sMapMgr.GetZoneId(map,posx,posy,posz);
if (zone > 0)
CharacterDatabase.PExecute("UPDATE characters SET zone='%u' WHERE guid='%u'", zone, guidLow);
@@ -7725,6 +7809,10 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
// Apply spell mods
ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance);
+
+ // Shiv has 100% chance to apply the poison
+ if (FindCurrentSpellBySpellId(5938))
+ chance = 100.0f;
if (roll_chance_f(chance))
{
@@ -7757,7 +7845,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
Spell *spell = new Spell(this, spellInfo,false);
spell->m_CastItem = item;
spell->m_cast_count = cast_count; //set count of casts
- spell->m_currentBasePoints[0] = learning_spell_id;
+ spell->m_currentBasePoints[0] = SpellMgr::CalculateSpellEffectBaseAmount(learning_spell_id);
spell->prepare(&targets);
return;
}
@@ -8017,7 +8105,7 @@ void Player::RemovedInsignia(Player* looterPlr)
// We have to convert player corpse to bones, not to be able to resurrect there
// SpawnCorpseBones isn't handy, 'cos it saves player while he in BG
- Corpse *bones = ObjectAccessor::Instance().ConvertCorpseForPlayer(GetGUID(),true);
+ Corpse *bones = sObjectAccessor.ConvertCorpseForPlayer(GetGUID(),true);
if (!bones)
return;
@@ -9543,7 +9631,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const
for (uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i);
- if (pItem && pItem->GetEntry() == item)
+ if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
{
tempcount += pItem->GetCount();
if (tempcount >= count)
@@ -9553,7 +9641,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const
for (uint8 i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i)
{
Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i);
- if (pItem && pItem->GetEntry() == item)
+ if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
{
tempcount += pItem->GetCount();
if (tempcount >= count)
@@ -9567,7 +9655,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const
for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
Item* pItem = GetItemByPos(i, j);
- if (pItem && pItem->GetEntry() == item)
+ if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
{
tempcount += pItem->GetCount();
if (tempcount >= count)
@@ -9582,7 +9670,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const
for (uint8 i = BANK_SLOT_ITEM_START; i < BANK_SLOT_ITEM_END; i++)
{
Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i);
- if (pItem && pItem->GetEntry() == item)
+ if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
{
tempcount += pItem->GetCount();
if (tempcount >= count)
@@ -9596,7 +9684,7 @@ bool Player::HasItemCount(uint32 item, uint32 count, bool inBankAlso) const
for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
Item* pItem = GetItemByPos(i, j);
- if (pItem && pItem->GetEntry() == item)
+ if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
{
tempcount += pItem->GetCount();
if (tempcount >= count)
@@ -11817,7 +11905,7 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
{
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem->GetEntry() == item)
+ if (pItem->GetEntry() == item && !pItem->IsInTrade())
{
if (pItem->GetCount() + remcount <= count)
{
@@ -11845,7 +11933,7 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
{
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem->GetEntry() == item)
+ if (pItem->GetEntry() == item && !pItem->IsInTrade())
{
if (pItem->GetCount() + remcount <= count)
{
@@ -11878,7 +11966,7 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
{
if (Item* pItem = pBag->GetItemByPos(j))
{
- if (pItem->GetEntry() == item)
+ if (pItem->GetEntry() == item && !pItem->IsInTrade())
{
// all items in bags can be unequipped
if (pItem->GetCount() + remcount <= count)
@@ -11909,7 +11997,7 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
{
if (Item* pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
{
- if (pItem && pItem->GetEntry() == item)
+ if (pItem && pItem->GetEntry() == item && !pItem->IsInTrade())
{
if (pItem->GetCount() + remcount <= count)
{
@@ -12155,7 +12243,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
BankItem(dest, pNewItem, true);
if (isRefundable)
{
- AddRefundReference(pNewItem->GetGUID());
+ AddRefundReference(pNewItem->GetGUIDLow());
pNewItem->SetPaidExtendedCost(pSrcItem->GetPaidExtendedCost());
pNewItem->SetPaidMoney(pSrcItem->GetPaidMoney());
pNewItem->SetRefundRecipient(GetGUIDLow());
@@ -12667,33 +12755,23 @@ void Player::SendSellError(uint8 msg, Creature* pCreature, uint64 guid, uint32 p
GetSession()->SendPacket(&data);
}
-void Player::ClearTrade()
-{
- tradeGold = 0;
- acceptTrade = false;
- for (uint8 i = 0; i < TRADE_SLOT_COUNT; i++)
- tradeItems[i] = 0;
-}
-
void Player::TradeCancel(bool sendback)
{
- if (pTrader)
+ if (m_trade)
{
+ Player* trader = m_trade->GetTrader();
+
// send yellow "Trade canceled" message to both traders
- WorldSession* ws;
- ws = GetSession();
if (sendback)
- ws->SendCancelTrade();
- ws = pTrader->GetSession();
- if (!ws->PlayerLogout())
- ws->SendCancelTrade();
+ GetSession()->SendCancelTrade();
+
+ trader->GetSession()->SendCancelTrade();
// cleanup
- ClearTrade();
- pTrader->ClearTrade();
- // prevent loss of reference
- pTrader->pTrader = NULL;
- pTrader = NULL;
+ delete m_trade;
+ m_trade = NULL;
+ delete trader->m_trade;
+ trader->m_trade = NULL;
}
}
@@ -13684,7 +13762,7 @@ void Player::PrepareQuestMenu(uint64 guid)
{
//we should obtain map pointer from GetMap() in 99% of cases. Special case
//only for quests which cast teleport spells on player
- Map * _map = IsInWorld() ? GetMap() : MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
+ Map * _map = IsInWorld() ? GetMap() : sMapMgr.FindMap(GetMapId(), GetInstanceId());
ASSERT(_map);
GameObject *pGameObject = _map->GetGameObject(guid);
if (pGameObject)
@@ -13859,7 +13937,7 @@ Quest const * Player::GetNextQuest(uint64 guid, Quest const *pQuest)
{
//we should obtain map pointer from GetMap() in 99% of cases. Special case
//only for quests which cast teleport spells on player
- Map * _map = IsInWorld() ? GetMap() : MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
+ Map * _map = IsInWorld() ? GetMap() : sMapMgr.FindMap(GetMapId(), GetInstanceId());
ASSERT(_map);
GameObject *pGameObject = _map->GetGameObject(guid);
if (pGameObject)
@@ -14135,10 +14213,10 @@ void Player::AddQuest(Quest const *pQuest, Object *questGiver)
// shared timed quest
if (questGiver && questGiver->GetTypeId() == TYPEID_PLAYER)
- limittime = questGiver->ToPlayer()->getQuestStatusMap()[quest_id].m_timer / IN_MILISECONDS;
+ limittime = questGiver->ToPlayer()->getQuestStatusMap()[quest_id].m_timer / IN_MILLISECONDS;
AddTimedQuest(quest_id);
- questStatusData.m_timer = limittime * IN_MILISECONDS;
+ questStatusData.m_timer = limittime * IN_MILLISECONDS;
qtime = static_cast<uint32>(time(NULL)) + limittime;
}
else
@@ -14316,7 +14394,8 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
if (pQuest->IsDaily())
{
SetDailyQuestStatus(quest_id);
- GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST, 1);
+ GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST, quest_id);
+ GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_DAILY_QUEST_DAILY, quest_id);
}
if (pQuest->IsWeekly())
@@ -15089,7 +15168,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
continue;
// just if !ingroup || !noraidgroup || raidgroup
QuestStatusData& q_status = mQuestStatus[questid];
- if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->GetType() == QUEST_TYPE_RAID))
+ if (q_status.m_status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid()))
{
if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL_OR_CAST))
{
@@ -15372,7 +15451,7 @@ bool Player::HasQuestForItem(uint32 itemid) const
continue;
// hide quest if player is in raid-group and quest is no raid quest
- if (GetGroup() && GetGroup()->isRaidGroup() && qinfo->GetType() != QUEST_TYPE_RAID)
+ if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
if (!InBattleGround()) //there are two ways.. we can make every bg-quest a raidquest, or add this code here.. i don't know if this can be exploited by other quests, but i think all other quests depend on a specific area.. but keep this in mind, if something strange happens later
continue;
@@ -15439,7 +15518,7 @@ void Player::SendQuestReward(Quest const *pQuest, uint32 XP, Object * questGiver
data << uint32(pQuest->GetRewOrReqMoney() + int32(pQuest->GetRewMoneyMaxLevel() * sWorld.getRate(RATE_DROP_MONEY)));
}
- data << uint32(10*Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills()));
+ data << 10 * Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills());
data << uint32(pQuest->GetBonusTalents()); // bonus talents
data << uint32(pQuest->GetRewArenaPoints());
GetSession()->SendPacket(&data);
@@ -15564,9 +15643,7 @@ void Player::_LoadDeclinedNames(QueryResult_AutoPtr result)
if (!result)
return;
- if (m_declinedname)
- delete m_declinedname;
-
+ delete m_declinedname;
m_declinedname = new DeclinedName;
Field *fields = result->Fetch();
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
@@ -15816,11 +15893,8 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0);
SetVisibleItemSlot(slot, NULL);
- if (m_items[slot])
- {
- delete m_items[slot];
- m_items[slot] = NULL;
- }
+ delete m_items[slot];
+ m_items[slot] = NULL;
}
sLog.outDebug("Load Basic value of player %s is: ", m_name.c_str());
@@ -15943,6 +16017,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
// There are no transports on instances
instanceId = 0;
+ m_movementInfo.t_guid = MAKE_NEW_GUID(transGUID, 0, HIGHGUID_TRANSPORT);
m_movementInfo.t_x = fields[26].GetFloat();
m_movementInfo.t_y = fields[27].GetFloat();
m_movementInfo.t_z = fields[28].GetFloat();
@@ -15962,7 +16037,7 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
}
else
{
- for (MapManager::TransportSet::iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
+ for (MapManager::TransportSet::iterator iter = sMapMgr.m_Transports.begin(); iter != sMapMgr.m_Transports.end(); ++iter)
{
if ((*iter)->GetGUIDLow() == transGUID)
{
@@ -16031,21 +16106,24 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
// Map could be changed before
mapEntry = sMapStore.LookupEntry(mapId);
// client without expansion support
- if (mapEntry && GetSession()->Expansion() < mapEntry->Expansion())
+ if (mapEntry)
{
- sLog.outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId);
- RelocateToHomebind();
- }
+ if (GetSession()->Expansion() < mapEntry->Expansion())
+ {
+ sLog.outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId);
+ RelocateToHomebind();
+ }
- // fix crash (because of if (Map *map = _FindMap(instanceId)) in MapInstanced::CreateInstance)
- if (instanceId)
- if (InstanceSave * save = GetInstanceSave(mapId, mapEntry->IsRaid()))
- if (save->GetInstanceId() != instanceId)
- instanceId = 0;
+ // fix crash (because of if (Map *map = _FindMap(instanceId)) in MapInstanced::CreateInstance)
+ if (instanceId)
+ if (InstanceSave * save = GetInstanceSave(mapId, mapEntry->IsRaid()))
+ if (save->GetInstanceId() != instanceId)
+ instanceId = 0;
+ }
// NOW player must have valid map
// load the player's map here if it's not already loaded
- Map *map = MapManager::Instance().CreateMap(mapId, this, instanceId);
+ Map *map = sMapMgr.CreateMap(mapId, this, instanceId);
if (!map)
{
@@ -16063,14 +16141,14 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
RelocateToHomebind();
}
- map = MapManager::Instance().CreateMap(mapId, this, 0);
+ map = sMapMgr.CreateMap(mapId, this, 0);
if (!map)
{
PlayerInfo const *info = objmgr.GetPlayerInfo(getRace(), getClass());
mapId = info->mapId;
Relocate(info->positionX,info->positionY,info->positionZ,0.0f);
sLog.outError("ERROR: Player (guidlow %d) have invalid coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
- map = MapManager::Instance().CreateMap(mapId, this, 0);
+ map = sMapMgr.CreateMap(mapId, this, 0);
if (!map)
{
sLog.outError("ERROR: Player (guidlow %d) has invalid default map coordinates (X: %f Y: %f Z: %f O: %f). or instance couldn't be created",guid,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
@@ -16472,10 +16550,10 @@ void Player::_LoadAuras(QueryResult_AutoPtr result, uint32 timediff)
// negative effects should continue counting down after logout
if (remaintime != -1 && !IsPositiveSpell(spellid))
{
- if (remaintime/IN_MILISECONDS <= int32(timediff))
+ if (remaintime/IN_MILLISECONDS <= int32(timediff))
continue;
- remaintime -= timediff*IN_MILISECONDS;
+ remaintime -= timediff*IN_MILLISECONDS;
}
// prevent wrong values of remaincharges
@@ -16539,7 +16617,7 @@ void Player::_LoadGlyphAuras()
void Player::LoadCorpse()
{
if (isAlive())
- ObjectAccessor::Instance().ConvertCorpseForPlayer(GetGUID());
+ sObjectAccessor.ConvertCorpseForPlayer(GetGUID());
else
{
if (Corpse *corpse = GetCorpse())
@@ -16640,7 +16718,7 @@ void Player::_LoadInventory(QueryResult_AutoPtr result, uint32 timediff)
item->SetRefundRecipient(fields[0].GetUInt32());
item->SetPaidMoney(fields[1].GetUInt32());
item->SetPaidExtendedCost(fields[2].GetUInt32());
- AddRefundReference(item->GetGUID());
+ AddRefundReference(item->GetGUIDLow());
}
}
}
@@ -16901,7 +16979,7 @@ void Player::_LoadQuestStatus(QueryResult_AutoPtr result)
if (quest_time <= sWorld.GetGameTime())
questStatusData.m_timer = 1;
else
- questStatusData.m_timer = (quest_time - sWorld.GetGameTime()) * IN_MILISECONDS;
+ questStatusData.m_timer = (quest_time - sWorld.GetGameTime()) * IN_MILLISECONDS;
}
else
quest_time = 0;
@@ -17453,7 +17531,7 @@ bool Player::CheckInstanceLoginValid()
}
// do checks for satisfy accessreqs, instance full, encounter in progress (raid), perm bind group != perm bind player
- return MapManager::Instance().CanPlayerEnter(GetMap()->GetId(), this, true);
+ return sMapMgr.CanPlayerEnter(GetMap()->GetId(), this, true);
}
bool Player::_LoadHomeBind(QueryResult_AutoPtr result)
@@ -17801,14 +17879,14 @@ void Player::_SaveInventory()
// the client auto counts down in real time after having received the initial played time on the first
// SMSG_ITEM_REFUND_INFO_RESPONSE packet.
// Item::UpdatePlayedTime is only called when needed, which is in DB saves, and item refund info requests.
- std::set<uint64>::iterator i_next;
- for (std::set<uint64>::iterator itr = m_refundableItems.begin(); itr!= m_refundableItems.end(); itr = i_next)
+ std::set<uint32>::iterator i_next;
+ for (std::set<uint32>::iterator itr = m_refundableItems.begin(); itr!= m_refundableItems.end(); itr = i_next)
{
// use copy iterator because itr may be invalid after operations in this loop
i_next = itr;
++i_next;
- Item* iPtr = GetItemByGuid(*itr);
+ Item* iPtr = GetItemByGuid(MAKE_NEW_GUID(*itr, 0, HIGHGUID_ITEM));
if (iPtr)
{
iPtr->UpdatePlayedTime(this);
@@ -17816,7 +17894,7 @@ void Player::_SaveInventory()
}
else
{
- sLog.outError("Can't find item guid " UI64FMTD " but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow());
+ sLog.outError("Can't find item guid %u but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow());
m_refundableItems.erase(itr);
}
}
@@ -17945,11 +18023,11 @@ void Player::_SaveQuestStatus()
case QUEST_NEW :
CharacterDatabase.PExecute("INSERT INTO character_queststatus (guid,quest,status,rewarded,explored,timer,mobcount1,mobcount2,mobcount3,mobcount4,itemcount1,itemcount2,itemcount3,itemcount4) "
"VALUES ('%u', '%u', '%u', '%u', '%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')",
- GetGUIDLow(), i->first, i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILISECONDS+ sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3]);
+ GetGUIDLow(), i->first, i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS+ sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3]);
break;
case QUEST_CHANGED :
CharacterDatabase.PExecute("UPDATE character_queststatus SET status = '%u',rewarded = '%u',explored = '%u',timer = '" UI64FMTD "',mobcount1 = '%u',mobcount2 = '%u',mobcount3 = '%u',mobcount4 = '%u',itemcount1 = '%u',itemcount2 = '%u',itemcount3 = '%u',itemcount4 = '%u' WHERE guid = '%u' AND quest = '%u' ",
- i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILISECONDS + sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3], GetGUIDLow(), i->first);
+ i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS + sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3], GetGUIDLow(), i->first);
break;
case QUEST_UNCHANGED:
break;
@@ -18292,7 +18370,7 @@ void Player::ResetInstances(uint8 method, bool isRaid)
}
// if the map is loaded, reset it
- Map *map = MapManager::Instance().FindMap(p->GetMapId(), p->GetInstanceId());
+ Map *map = sMapMgr.FindMap(p->GetMapId(), p->GetInstanceId());
if (map && map->IsDungeon())
if (!((InstanceMap*)map)->Reset(method))
{
@@ -18647,7 +18725,7 @@ void Player::PetSpellInitialize()
for (CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
{
- time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
+ time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILLISECONDS : 0;
data << uint32(itr->first); // spellid
data << uint16(0); // spell category?
@@ -18657,7 +18735,7 @@ void Player::PetSpellInitialize()
for (CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureCategoryCooldowns.begin(); itr != pet->m_CreatureCategoryCooldowns.end(); ++itr)
{
- time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
+ time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILLISECONDS : 0;
data << uint32(itr->first); // spellid
data << uint16(0); // spell category?
@@ -18811,6 +18889,10 @@ bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mo
if (spell && mod->charges == -1 && spell->m_appliedMods.find(mod->ownerAura) == spell->m_appliedMods.end())
return false;
+ // +duration to infinite duration spells making them limited
+ if (mod->op == SPELLMOD_DURATION && GetSpellDuration(spellInfo) == -1)
+ return false;
+
return spellmgr.IsAffectedByMod(spellInfo, mod);
}
@@ -19372,8 +19454,8 @@ void Player::ContinueTaxiFlight()
for (uint32 i = 1; i < nodeList.size(); ++i)
{
- TaxiPathNode const& node = nodeList[i];
- TaxiPathNode const& prevNode = nodeList[i-1];
+ TaxiPathNodeEntry const& node = nodeList[i];
+ TaxiPathNodeEntry const& prevNode = nodeList[i-1];
// skip nodes at another map
if (node.mapid != GetMapId())
@@ -19431,7 +19513,7 @@ void Player::ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
{
data << uint32(unSpellId);
data << uint32(unTimeMs); // in m.secs
- AddSpellCooldown(unSpellId, 0, curTime + unTimeMs/IN_MILISECONDS);
+ AddSpellCooldown(unSpellId, 0, curTime + unTimeMs/IN_MILLISECONDS);
}
}
GetSession()->SendPacket(&data);
@@ -19615,10 +19697,11 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
}
}
- int32 price = pProto->BuyPrice * count;
+ int32 price = crItem->IsGoldRequired(pProto) ? pProto->BuyPrice * count : 0;
// reputation discount
- price = uint32(floor(price * GetReputationPriceDiscount(pCreature)));
+ if (price)
+ price = uint32(floor(price * GetReputationPriceDiscount(pCreature)));
if (GetMoney() < price)
{
@@ -19672,7 +19755,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
it->SetPaidMoney(price);
it->SetPaidExtendedCost(crItem->ExtendedCost);
it->SaveRefundDataToDB();
- AddRefundReference(it->GetGUID());
+ AddRefundReference(it->GetGUIDLow());
}
}
}
@@ -19730,7 +19813,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
it->SetPaidMoney(price);
it->SetPaidExtendedCost(crItem->ExtendedCost);
it->SaveRefundDataToDB();
- AddRefundReference(it->GetGUID());
+ AddRefundReference(it->GetGUIDLow());
}
}
}
@@ -19926,8 +20009,8 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
if (rec == 0 && catrec == 0)
return;
- catrecTime = catrec ? curTime+catrec/IN_MILISECONDS : 0;
- recTime = rec ? curTime+rec/IN_MILISECONDS : catrecTime;
+ catrecTime = catrec ? curTime+catrec/IN_MILLISECONDS : 0;
+ recTime = rec ? curTime+rec/IN_MILLISECONDS : catrecTime;
}
// self spell cooldown
@@ -20919,6 +21002,9 @@ void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint3
void Player::ApplyEquipCooldown(Item * pItem)
{
+ if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_NO_EQUIP_COOLDOWN))
+ return;
+
for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
_Spell const& spellData = pItem->GetProto()->Spells[i];
@@ -21311,7 +21397,7 @@ bool Player::HasQuestForGO(int32 GOId) const
if (!qinfo)
continue;
- if (GetGroup() && GetGroup()->isRaidGroup() && qinfo->GetType() != QUEST_TYPE_RAID)
+ if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid())
continue;
for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j)
@@ -21646,7 +21732,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
continue; // member (alive or dead) or his corpse at req. distance
// honor can be in PvP and !PvP (racial leader) cases (for alive)
- if (pGroupGuy->isAlive() && pGroupGuy->RewardHonor(pVictim,count, -1, true) && pGroupGuy == this)
+ if (pGroupGuy->isAlive() && pGroupGuy->RewardHonor(pVictim, count, -1, true) && pGroupGuy == this)
honored_kill = true;
// xp and reputation only in !PvP case
@@ -21690,7 +21776,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
xp = (PvP || GetVehicle()) ? 0 : Trinity::XP::Gain(this, pVictim);
// honor can be in PvP and !PvP (racial leader) cases
- if (RewardHonor(pVictim,1, -1, true))
+ if (RewardHonor(pVictim, 1, -1, true))
honored_kill = true;
// xp and reputation only in !PvP case
@@ -21938,7 +22024,7 @@ void Player::SendCorpseReclaimDelay(bool load)
//! corpse reclaim delay 30 * 1000ms or longer at often deaths
WorldPacket data(SMSG_CORPSE_RECLAIM_DELAY, 4);
- data << uint32(delay*IN_MILISECONDS);
+ data << uint32(delay*IN_MILLISECONDS);
GetSession()->SendPacket(&data);
}
@@ -23121,6 +23207,9 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
if (m_specsCount)
{
+ if (m_specsCount > MAX_TALENT_SPECS)
+ m_specsCount = MAX_TALENT_SPECS;
+
// loop through all specs (only 1 for now)
for (uint32 specIdx = 0; specIdx < m_specsCount; ++specIdx)
{
@@ -23751,14 +23840,14 @@ void Player::SendDuelCountdown(uint32 counter)
GetSession()->SendPacket(&data);
}
-void Player::AddRefundReference(uint64 it)
+void Player::AddRefundReference(uint32 it)
{
m_refundableItems.insert(it);
}
-void Player::DeleteRefundReference(uint64 it)
+void Player::DeleteRefundReference(uint32 it)
{
- std::set<uint64>::iterator itr = m_refundableItems.find(it);
+ std::set<uint32>::iterator itr = m_refundableItems.find(it);
if (itr != m_refundableItems.end())
{
m_refundableItems.erase(itr);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index d6de8679323..0b64d7e3821 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -26,7 +26,7 @@
#include "Unit.h"
#include "Item.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "NPCHandler.h"
#include "QuestDef.h"
#include "Group.h"
@@ -920,6 +920,55 @@ struct BGData
bool HasTaxiPath() const { return taxiPath[0] && taxiPath[1]; }
};
+class TradeData
+{
+ public: // constructors
+ TradeData(Player* player, Player* trader) :
+ m_player(player), m_trader(trader), m_accepted(false), m_acceptProccess(false),
+ m_money(0), m_spell(0) {}
+
+ Player* GetTrader() const { return m_trader; }
+ TradeData* GetTraderData() const;
+
+ Item* GetItem(TradeSlots slot) const;
+ bool HasItem(uint64 item_guid) const;
+ void SetItem(TradeSlots slot, Item* item);
+
+ uint32 GetSpell() const { return m_spell; }
+ void SetSpell(uint32 spell_id, Item* castItem = NULL);
+
+ Item* GetSpellCastItem() const;
+ bool HasSpellCastItem() const { return m_spellCastItem != 0; }
+
+ uint32 GetMoney() const { return m_money; }
+ void SetMoney(uint32 money);
+
+ bool IsAccepted() const { return m_accepted; }
+ void SetAccepted(bool state, bool crosssend = false);
+
+ bool IsInAcceptProcess() const { return m_acceptProccess; }
+ void SetInAcceptProcess(bool state) { m_acceptProccess = state; }
+
+ private: // internal functions
+
+ void Update(bool for_trader = true);
+
+ private: // fields
+
+ Player* m_player; // Player who own of this TradeData
+ Player* m_trader; // Player who trade with m_player
+
+ bool m_accepted; // m_player press accept for trade list
+ bool m_acceptProccess; // one from player/trader press accept and this processed
+
+ uint32 m_money; // m_player place money to trade
+
+ uint32 m_spell; // m_player apply spell to non-traded slot item
+ uint64 m_spellCastItem; // applied spell casted by item use
+
+ uint64 m_items[TRADE_SLOT_COUNT]; // traded itmes from m_player side including non-traded slot
+};
+
class Player : public Unit, public GridObject<Player>
{
friend class WorldSession;
@@ -1137,8 +1186,8 @@ class Player : public Unit, public GridObject<Player>
uint8 _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const;
uint8 _CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL) const;
- void AddRefundReference(uint64 it);
- void DeleteRefundReference(uint64 it);
+ void AddRefundReference(uint32 it);
+ void DeleteRefundReference(uint32 it);
void ApplyEquipCooldown(Item * pItem);
void SetAmmo(uint32 item);
@@ -1191,15 +1240,10 @@ class Player : public Unit, public GridObject<Player>
bool BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot);
float GetReputationPriceDiscount(Creature const* pCreature) const;
- Player* GetTrader() const { return pTrader; }
- void ClearTrade();
+
+ Player* GetTrader() const { return m_trade ? m_trade->GetTrader() : NULL; }
+ TradeData* GetTradeData() const { return m_trade; }
void TradeCancel(bool sendback);
- Item *GetItemByTradeSlot(uint8 slot) const
- {
- if (slot < TRADE_SLOT_COUNT && tradeItems[slot])
- return GetItemByGuid(tradeItems[slot]);
- return NULL;
- }
void UpdateEnchantTime(uint32 time);
void UpdateItemDuration(uint32 time, bool realtimeonly=false);
@@ -1395,11 +1439,19 @@ class Player : public Unit, public GridObject<Player>
if (d < 0)
SetMoney (GetMoney() > uint32(-d) ? GetMoney() + d : 0);
else
- SetMoney (GetMoney() < uint32(MAX_MONEY_AMOUNT - d) ? GetMoney() + d : MAX_MONEY_AMOUNT);
-
- // "At Gold Limit"
- if (GetMoney() >= MAX_MONEY_AMOUNT)
- SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD,NULL,NULL);
+ {
+ uint32 newAmount = 0;
+ if (GetMoney() < uint32(MAX_MONEY_AMOUNT - d))
+ newAmount = GetMoney() + d;
+ else
+ {
+ // "At Gold Limit"
+ newAmount = MAX_MONEY_AMOUNT;
+ if (d)
+ SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, NULL);
+ }
+ SetMoney (newAmount);
+ }
}
void SetMoney(uint32 value)
{
@@ -1874,7 +1926,7 @@ class Player : public Unit, public GridObject<Player>
/*** PVP SYSTEM ***/
/*********************************************************/
void UpdateHonorFields();
- bool RewardHonor(Unit *pVictim, uint32 groupsize, float honor = -1, bool pvptoken = false);
+ bool RewardHonor(Unit *pVictim, uint32 groupsize, int32 honor = -1, bool pvptoken = false);
uint32 GetHonorPoints() { return GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY); }
uint32 GetArenaPoints() { return GetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY); }
void ModifyHonorPoints(int32 value);
@@ -2074,7 +2126,7 @@ class Player : public Unit, public GridObject<Player>
/*** REST SYSTEM ***/
/*********************************************************/
- bool isRested() const { return GetRestTime() >= 10*IN_MILISECONDS; }
+ bool isRested() const { return GetRestTime() >= 10*IN_MILLISECONDS; }
uint32 GetXPRestBonus(uint32 xp);
uint32 GetRestTime() const { return m_restTime;}
void SetRestTime(uint32 v) { m_restTime = v;}
@@ -2460,10 +2512,7 @@ class Player : public Unit, public GridObject<Player>
int m_cinematic;
- Player *pTrader;
- bool acceptTrade;
- uint64 tradeItems[TRADE_SLOT_COUNT];
- uint32 tradeGold;
+ TradeData* m_trade;
bool m_DailyQuestChanged;
bool m_WeeklyQuestChanged;
@@ -2535,7 +2584,7 @@ class Player : public Unit, public GridObject<Player>
uint8 _CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, ItemPosCountVec& dest, ItemPrototype const *pProto, uint32& count, bool merge, Item *pSrcItem, uint8 skip_bag, uint8 skip_slot) const;
Item* _StoreItem(uint16 pos, Item *pItem, uint32 count, bool clone, bool update);
- std::set<uint64> m_refundableItems;
+ std::set<uint32> m_refundableItems;
void SendRefundInfo(Item* item);
void RefundItem(Item* item);
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index f0f27691007..0de95352d19 100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -19,8 +19,8 @@
*/
#include "SocialMgr.h"
-#include "Policies/SingletonImp.h"
-#include "Database/DatabaseEnv.h"
+
+#include "DatabaseEnv.h"
#include "Opcodes.h"
#include "WorldPacket.h"
#include "Player.h"
@@ -28,8 +28,6 @@
#include "World.h"
#include "Util.h"
-INSTANTIATE_SINGLETON_1(SocialMgr);
-
PlayerSocial::PlayerSocial()
{
m_playerGUID = 0;
diff --git a/src/server/game/Entities/Player/SocialMgr.h b/src/server/game/Entities/Player/SocialMgr.h
index 40f0066ec2e..1f40fcf28e9 100644
--- a/src/server/game/Entities/Player/SocialMgr.h
+++ b/src/server/game/Entities/Player/SocialMgr.h
@@ -21,8 +21,8 @@
#ifndef __TRINITY_SOCIALMGR_H
#define __TRINITY_SOCIALMGR_H
-#include "Policies/Singleton.h"
-#include "Database/DatabaseEnv.h"
+#include "ace/Singleton.h"
+#include "DatabaseEnv.h"
#include "Common.h"
class SocialMgr;
@@ -43,7 +43,8 @@ enum SocialFlag
{
SOCIAL_FLAG_FRIEND = 0x01,
SOCIAL_FLAG_IGNORED = 0x02,
- SOCIAL_FLAG_MUTED = 0x04 // guessed
+ SOCIAL_FLAG_MUTED = 0x04, // guessed
+ SOCIAL_FLAG_RAF = 0x08 // Recruit A Friend
};
struct FriendInfo
@@ -112,7 +113,7 @@ enum FriendsResult
};
#define SOCIALMGR_FRIEND_LIMIT 50
-#define SOCIALMGR_IGNORE_LIMIT 25
+#define SOCIALMGR_IGNORE_LIMIT 50
class PlayerSocial
{
@@ -139,8 +140,9 @@ class PlayerSocial
class SocialMgr
{
+ friend class ACE_Singleton<SocialMgr, ACE_Null_Mutex>;
+ SocialMgr();
public:
- SocialMgr();
~SocialMgr();
// Misc
void RemovePlayerSocial(uint32 guid) { m_socialMap.erase(guid); }
@@ -156,6 +158,6 @@ class SocialMgr
SocialMap m_socialMap;
};
-#define sSocialMgr Trinity::Singleton<SocialMgr>::Instance()
+#define sSocialMgr (*ACE_Singleton<SocialMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 444e115f8b9..2a82b5c33df 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -20,7 +20,7 @@
#include "Common.h"
-#include "Transports.h"
+#include "Transport.h"
#include "MapManager.h"
#include "ObjectMgr.h"
#include "Path.h"
@@ -106,7 +106,7 @@ void MapManager::LoadTransports()
m_TransportsByMap[*i].insert(t);
//If we someday decide to use the grid to track transports, here:
- t->SetMap(MapManager::Instance().CreateMap(mapid, t, 0));
+ t->SetMap(sMapMgr.CreateMap(mapid, t, 0));
//t->GetMap()->Add<GameObject>((GameObject *)t);
++count;
@@ -185,18 +185,13 @@ bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z,
struct keyFrame
{
- keyFrame(float _x, float _y, float _z, uint32 _mapid, int _actionflag, int _delay)
- {
- x = _x; y = _y; z = _z; mapid = _mapid; actionflag = _actionflag; delay = _delay; distFromPrev = -1; distSinceStop = -1; distUntilStop = -1;
- tFrom = 0; tTo = 0;
- }
+ explicit keyFrame(TaxiPathNodeEntry const& _node) : node(&_node),
+ distSinceStop(-1.0f), distUntilStop(-1.0f), distFromPrev(-1.0f), tFrom(0.0f), tTo(0.0f)
+ {
+ }
+
+ TaxiPathNodeEntry const* node;
- float x;
- float y;
- float z;
- uint32 mapid;
- int actionflag;
- int delay;
float distSinceStop;
float distUntilStop;
float distFromPrev;
@@ -205,24 +200,24 @@ struct keyFrame
bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
{
- TransportPath path;
- objmgr.GetTransportPathNodes(pathid, path);
-
- if (path.Empty())
+ if (pathid >= sTaxiPathNodesByPath.size())
return false;
+ TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathid];
+
std::vector<keyFrame> keyFrames;
int mapChange = 0;
mapids.clear();
- for (size_t i = 1; i < path.Size() - 1; ++i)
+ for (size_t i = 1; i < path.size() - 1; ++i)
{
if (mapChange == 0)
{
- if ((path[i].mapid == path[i+1].mapid))
+ TaxiPathNodeEntry const& node_i = path[i];
+ if (node_i.mapid == path[i+1].mapid)
{
- keyFrame k(path[i].x, path[i].y, path[i].z, path[i].mapid, path[i].actionFlag, path[i].delay);
+ keyFrame k(node_i);
keyFrames.push_back(k);
- mapids.insert(k.mapid);
+ mapids.insert(k.node->mapid);
}
else
{
@@ -240,7 +235,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
// first cell is arrived at by teleportation :S
keyFrames[0].distFromPrev = 0;
- if (keyFrames[0].actionflag == 2)
+ if (keyFrames[0].node->actionFlag == 2)
{
lastStop = 0;
}
@@ -248,18 +243,18 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
// find the rest of the distances between key points
for (size_t i = 1; i < keyFrames.size(); ++i)
{
- if ((keyFrames[i].actionflag == 1) || (keyFrames[i].mapid != keyFrames[i-1].mapid))
+ if ((keyFrames[i].node->actionFlag == 1) || (keyFrames[i].node->mapid != keyFrames[i-1].node->mapid))
{
keyFrames[i].distFromPrev = 0;
}
else
{
keyFrames[i].distFromPrev =
- sqrt(pow(keyFrames[i].x - keyFrames[i - 1].x, 2) +
- pow(keyFrames[i].y - keyFrames[i - 1].y, 2) +
- pow(keyFrames[i].z - keyFrames[i - 1].z, 2));
+ sqrt(pow(keyFrames[i].node->x - keyFrames[i - 1].node->x, 2) +
+ pow(keyFrames[i].node->y - keyFrames[i - 1].node->y, 2) +
+ pow(keyFrames[i].node->z - keyFrames[i - 1].node->z, 2));
}
- if (keyFrames[i].actionflag == 2)
+ if (keyFrames[i].node->actionFlag == 2)
{
// remember first stop frame
if (firstStop == -1)
@@ -272,7 +267,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
for (size_t i = 0; i < keyFrames.size(); ++i)
{
int j = (i + lastStop) % keyFrames.size();
- if (keyFrames[j].actionflag == 2)
+ if (keyFrames[j].node->actionFlag == 2)
tmpDist = 0;
else
tmpDist += keyFrames[j].distFromPrev;
@@ -284,7 +279,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
int j = (i + (firstStop+1)) % keyFrames.size();
tmpDist += keyFrames[(j + 1) % keyFrames.size()].distFromPrev;
keyFrames[j].distUntilStop = tmpDist;
- if (keyFrames[j].actionflag == 2)
+ if (keyFrames[j].node->actionFlag == 2)
tmpDist = 0;
}
@@ -312,14 +307,15 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
// speed = max(30, t) (remember x = 0.5s^2, and when accelerating, a = 1 unit/s^2
int t = 0;
bool teleport = false;
- if (keyFrames[keyFrames.size() - 1].mapid != keyFrames[0].mapid)
+ if (keyFrames[keyFrames.size() - 1].node->mapid != keyFrames[0].node->mapid)
teleport = true;
- WayPoint pos(keyFrames[0].mapid, keyFrames[0].x, keyFrames[0].y, keyFrames[0].z, teleport, 0);
+ WayPoint pos(keyFrames[0].node->mapid, keyFrames[0].node->x, keyFrames[0].node->y, keyFrames[0].node->z, teleport, 0,
+ keyFrames[0].node->arrivalEventID, keyFrames[0].node->departureEventID);
m_WayPoints[0] = pos;
- t += keyFrames[0].delay * 1000;
+ t += keyFrames[0].node->delay * 1000;
- uint32 cM = keyFrames[0].mapid;
+ uint32 cM = keyFrames[0].node->mapid;
for (size_t i = 0; i < keyFrames.size() - 1; ++i)
{
float d = 0;
@@ -337,19 +333,19 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
if (d > 0)
{
float newX, newY, newZ;
- newX = keyFrames[i].x + (keyFrames[i + 1].x - keyFrames[i].x) * d / keyFrames[i + 1].distFromPrev;
- newY = keyFrames[i].y + (keyFrames[i + 1].y - keyFrames[i].y) * d / keyFrames[i + 1].distFromPrev;
- newZ = keyFrames[i].z + (keyFrames[i + 1].z - keyFrames[i].z) * d / keyFrames[i + 1].distFromPrev;
+ newX = keyFrames[i].node->x + (keyFrames[i + 1].node->x - keyFrames[i].node->x) * d / keyFrames[i + 1].distFromPrev;
+ newY = keyFrames[i].node->y + (keyFrames[i + 1].node->y - keyFrames[i].node->y) * d / keyFrames[i + 1].distFromPrev;
+ newZ = keyFrames[i].node->z + (keyFrames[i + 1].node->z - keyFrames[i].node->z) * d / keyFrames[i + 1].distFromPrev;
bool teleport = false;
- if (keyFrames[i].mapid != cM)
+ if (keyFrames[i].node->mapid != cM)
{
teleport = true;
- cM = keyFrames[i].mapid;
+ cM = keyFrames[i].node->mapid;
}
// sLog.outString("T: %d, D: %f, x: %f, y: %f, z: %f", t, d, newX, newY, newZ);
- WayPoint pos(keyFrames[i].mapid, newX, newY, newZ, teleport, i);
+ WayPoint pos(keyFrames[i].node->mapid, newX, newY, newZ, teleport, 0);
if (teleport)
m_WayPoints[t] = pos;
}
@@ -389,14 +385,14 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
t += (long)keyFrames[i + 1].tTo % 100;
bool teleport = false;
- if ((keyFrames[i + 1].actionflag == 1) || (keyFrames[i + 1].mapid != keyFrames[i].mapid))
+ if ((keyFrames[i + 1].node->actionFlag == 1) || (keyFrames[i + 1].node->mapid != keyFrames[i].node->mapid))
{
teleport = true;
- cM = keyFrames[i + 1].mapid;
+ cM = keyFrames[i + 1].node->mapid;
}
- WayPoint pos(keyFrames[i + 1].mapid, keyFrames[i + 1].x, keyFrames[i + 1].y, keyFrames[i + 1].z, teleport, i);
-
+ WayPoint pos(keyFrames[i + 1].node->mapid, keyFrames[i + 1].node->x, keyFrames[i + 1].node->y, keyFrames[i + 1].node->z, teleport,
+ 0, keyFrames[i + 1].node->arrivalEventID, keyFrames[i + 1].node->departureEventID);
// sLog.outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport);
/*
if (keyFrames[i+1].delay > 5)
@@ -405,7 +401,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
//if (teleport)
m_WayPoints[t] = pos;
- t += keyFrames[i + 1].delay * 1000;
+ t += keyFrames[i + 1].node->delay * 1000;
// sLog.outString("------");
}
@@ -459,7 +455,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
//yes, you're right
ResetMap();
- Map * newMap = MapManager::Instance().CreateMap(newMapid, this, 0);
+ Map * newMap = sMapMgr.CreateMap(newMapid, this, 0);
SetMap(newMap);
assert (GetMap());
@@ -484,13 +480,6 @@ bool Transport::RemovePassenger(Player* passenger)
return true;
}
-void Transport::CheckForEvent(uint32 entry, uint32 wp_id)
-{
- uint32 key = entry*100+wp_id;
- if (objmgr.TransportEventMap.find(key) != objmgr.TransportEventMap.end())
- GetMap()->ScriptsStart(sEventScripts, objmgr.TransportEventMap[key], this, NULL);
-}
-
void Transport::Update(uint32 /*p_time*/)
{
if (m_WayPoints.size() <= 1)
@@ -499,9 +488,13 @@ void Transport::Update(uint32 /*p_time*/)
m_timer = getMSTime() % m_period;
while (((m_timer - m_curr->first) % m_pathTime) > ((m_next->first - m_curr->first) % m_pathTime))
{
+ DoEventIfAny(*m_curr, true);
+
m_curr = GetNextWayPoint();
m_next = GetNextWayPoint();
+ DoEventIfAny(*m_curr,false);
+
// first check help in case client-server transport coordinates de-synchronization
if (m_curr->second.mapid != GetMapId() || m_curr->second.teleport)
{
@@ -548,9 +541,6 @@ void Transport::Update(uint32 /*p_time*/)
if ((sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0)
sLog.outDetail("%s moved to %d %f %f %f %d", this->m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
-
- //Transport Event System
- CheckForEvent(this->GetEntry(), m_curr->second.id);
}
}
@@ -587,3 +577,11 @@ void Transport::UpdateForMap(Map const* targetMap)
}
}
+void Transport::DoEventIfAny(WayPointMap::value_type const& node, bool departure)
+{
+ if (uint32 eventid = departure ? node.second.departureEventID : node.second.arrivalEventID)
+ {
+ sLog.outDebug("Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName());
+ GetMap()->ScriptsStart(sEventScripts, eventid, this, this);
+ }
+}
diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h
index 25b9ade1461..7b93d3e28a8 100644
--- a/src/server/game/Entities/Transport/Transport.h
+++ b/src/server/game/Entities/Transport/Transport.h
@@ -27,35 +27,6 @@
#include <set>
#include <string>
-class TransportPath
-{
- public:
- struct PathNode
- {
- uint32 mapid;
- float x,y,z;
- uint32 actionFlag;
- uint32 delay;
- };
-
- void SetLength(const unsigned int sz)
- {
- i_nodes.resize(sz);
- }
-
- unsigned int Size(void) const { return i_nodes.size(); }
- bool Empty(void) const { return i_nodes.empty(); }
- void Resize(unsigned int sz) { i_nodes.resize(sz); }
- void Clear(void) { i_nodes.clear(); }
- PathNode* GetNodes(void) { return static_cast<PathNode *>(&i_nodes[0]); }
-
- PathNode& operator[](const unsigned int idx) { return i_nodes[idx]; }
- const PathNode& operator()(const unsigned int idx) const { return i_nodes[idx]; }
-
- protected:
- std::vector<PathNode> i_nodes;
-};
-
class Transport : public GameObject
{
public:
@@ -66,7 +37,6 @@ class Transport : public GameObject
void Update(uint32 p_time);
bool AddPassenger(Player* passenger);
bool RemovePassenger(Player* passenger);
- void CheckForEvent(uint32 entry, uint32 wp_id);
typedef std::set<Player*> PlayerSet;
PlayerSet const& GetPassengers() const { return m_passengers; }
@@ -75,14 +45,20 @@ class Transport : public GameObject
struct WayPoint
{
WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false), id(0) {}
- WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id) :
- mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), id(_id) {}
+ WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id = 0,
+ uint32 _arrivalEventID = 0, uint32 _departureEventID = 0)
+ : mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), id(_id),
+ arrivalEventID(_arrivalEventID), departureEventID(_departureEventID)
+ {
+ }
uint32 mapid;
float x;
float y;
float z;
bool teleport;
uint32 id;
+ uint32 arrivalEventID;
+ uint32 departureEventID;
};
typedef std::map<uint32, WayPoint> WayPointMap;
@@ -102,6 +78,7 @@ class Transport : public GameObject
private:
void TeleportTransport(uint32 newMapid, float x, float y, float z);
void UpdateForMap(Map const* map);
+ void DoEventIfAny(WayPointMap::value_type const& node, bool departure);
WayPointMap::const_iterator GetNextWayPoint();
};
#endif
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 720e177075f..1fb662c43df 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -54,7 +54,7 @@
#include "Traveller.h"
#include "TemporarySummon.h"
#include "Vehicle.h"
-#include "Transports.h"
+#include "Transport.h"
#include <math.h>
@@ -201,10 +201,8 @@ Unit::~Unit()
RemoveAllDynObjects();
_DeleteRemovedAuras();
- if (m_charmInfo)
- delete m_charmInfo;
- if (m_vehicleKit)
- delete m_vehicleKit;
+ delete m_charmInfo;
+ delete m_vehicleKit;
assert(!m_attacking);
assert(m_attackers.empty());
@@ -437,29 +435,6 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 M
SendMessageToSet(&data, true);
}*/
-void Unit::SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end)
-{
- uint32 traveltime = uint32(path.GetTotalLength(start, end) * 32);
-
- uint32 pathSize = end - start;
-
- WorldPacket data(SMSG_MONSTER_MOVE, (GetPackGUID().size()+1+4+4+4+4+1+4+4+4+pathSize*4*3));
- data.append(GetPackGUID());
- data << uint8(0);
- data << GetPositionX();
- data << GetPositionY();
- data << GetPositionZ();
- data << uint32(getMSTime());
- data << uint8(0);
- data << uint32(((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) || isInFlight())? (MOVEFLAG_FLY|MOVEFLAG_WALK) : MOVEFLAG_WALK);
- data << uint32(traveltime);
- data << uint32(pathSize);
- data.append((char*)path.GetNodes(start), pathSize * 4 * 3);
- SendMessageToSet(&data, true);
-//MONSTER_MOVE_SPLINE_FLY
- addUnitState(UNIT_STAT_MOVE);
-}
-
void Unit::SendMonsterMoveTransport(Unit *vehicleOwner)
{
WorldPacket data(SMSG_MONSTER_MOVE_TRANSPORT, GetPackGUID().size()+vehicleOwner->GetPackGUID().size());
@@ -587,23 +562,6 @@ void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellEntry const *spellProto, bool durabilityLoss)
{
- // if attacker is a player and spell is not empty/fail
- if (GetTypeId() == TYPEID_PLAYER && spellProto)
- {
- // on divine storm dealed damage - heal
- if (spellProto->SpellFamilyName == SPELLFAMILY_PALADIN && spellProto->SpellFamilyFlags[1] & 0x20000)
- {
- Unit *pRaidGrpMember = GetNextRandomRaidMemberOrPet(30.0f);
-
- int32 divineDmg = damage * (25 + (HasAura(63220) ? 15 : 0)) / 100; //25%, if has Glyph of Divine Storm -> 40%
-
- if (!pRaidGrpMember)
- pRaidGrpMember = this;
-
- CastCustomSpell(pRaidGrpMember, 54172, &divineDmg, 0, 0, true);
- }
- }
-
if (pVictim->GetTypeId() == TYPEID_UNIT && pVictim->ToCreature()->IsAIEnabled)
pVictim->ToCreature()->AI()->DamageTaken(this, damage);
@@ -611,8 +569,26 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
{
// interrupting auras with AURA_INTERRUPT_FLAG_DAMAGE before checking !damage (absorbed damage breaks that type of auras)
pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TAKE_DAMAGE, spellProto ? spellProto->Id : 0);
- }
+ // copy damage to casters of this aura
+ AuraEffectList const& vCopyDamage = pVictim->GetAuraEffectsByType(SPELL_AURA_SHARE_DAMAGE_PCT);
+ for (AuraEffectList::const_iterator i = vCopyDamage.begin(); i != vCopyDamage.end(); ++i)
+ {
+ // check damage school mask
+ if (((*i)->GetMiscValue() & damageSchoolMask) == 0)
+ continue;
+
+ Unit * shareDamageTarget = (*i)->GetCaster();
+ if (!shareDamageTarget)
+ continue;
+ SpellEntry const * spell = (*i)->GetSpellProto();
+
+ uint32 share = damage * (float((*i)->GetAmount()) / 100.0f);
+ // TODO: check packets if damage is done by pVictim, or by attacker of pVicitm
+ DealDamageMods(shareDamageTarget, share, NULL);
+ DealDamage(shareDamageTarget, share, NULL, NODAMAGE, GetSpellSchoolMask(spell), spell, false);
+ }
+ }
// Rage from Damage made (only from direct weapon damage)
if (cleanDamage && damagetype == DIRECT_DAMAGE && this != pVictim && getPowerType() == POWER_RAGE)
@@ -1816,14 +1792,20 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
if (spellProto->SpellIconID == 2253)
{
//reduces all damage taken while Stunned
- if (unitflag & UNIT_FLAG_STUNNED)
+ if (pVictim->m_form == FORM_CAT && (unitflag & UNIT_FLAG_STUNNED))
RemainingDamage -= RemainingDamage * currentAbsorb / 100;
continue;
}
- // Savage Defense (amount store original percent of attack power applied)
- if (spellProto->SpellIconID == 50) // only spell with this aura fit
+ // Savage Defense
+ if (spellProto->SpellIconID == 146)
{
- RemainingDamage -= int32(currentAbsorb * pVictim->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
+ if (RemainingDamage < currentAbsorb)
+ currentAbsorb = RemainingDamage;
+
+ (*i)->SetAmount(0); // guarantee removal
+ existExpired = true; // maybe hacky but not crashy
+
+ RemainingDamage -= currentAbsorb;
continue;
}
// Moonkin Form passive
@@ -2211,6 +2193,71 @@ void Unit::CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEff
}
}
+void Unit::CalcHealAbsorb(Unit *pVictim, const SpellEntry *healSpell, uint32 &healAmount, uint32 &absorb)
+{
+ if (!healAmount)
+ return;
+
+ int32 RemainingHeal = healAmount;
+ // Get unit state (need for some absorb check)
+ uint32 unitflag = pVictim->GetUInt32Value(UNIT_FIELD_FLAGS);
+ // Need remove expired auras after
+ bool existExpired = false;
+
+ // absorb without mana cost
+ AuraEffectList const& vHealAbsorb = pVictim->GetAuraEffectsByType(SPELL_AURA_SCHOOL_HEAL_ABSORB);
+ for (AuraEffectList::const_iterator i = vHealAbsorb.begin(); i != vHealAbsorb.end() && RemainingHeal > 0; ++i)
+ {
+ if (!((*i)->GetMiscValue() & healSpell->SchoolMask))
+ continue;
+
+ SpellEntry const* spellProto = (*i)->GetSpellProto();
+
+ // Max Amount can be absorbed by this aura
+ int32 currentAbsorb = (*i)->GetAmount();
+
+ // Found empty aura (impossible but..)
+ if (currentAbsorb <= 0)
+ {
+ existExpired = true;
+ continue;
+ }
+
+ // currentAbsorb - damage can be absorbed by shield
+ // If need absorb less damage
+ if (RemainingHeal < currentAbsorb)
+ currentAbsorb = RemainingHeal;
+
+ RemainingHeal -= currentAbsorb;
+
+ // Reduce shield amount
+ (*i)->SetAmount((*i)->GetAmount() - currentAbsorb);
+ // Need remove it later
+ if ((*i)->GetAmount() <= 0)
+ existExpired = true;
+ }
+
+ // Remove all expired absorb auras
+ if (existExpired)
+ {
+ for (AuraEffectList::const_iterator i = vHealAbsorb.begin(); i != vHealAbsorb.end();)
+ {
+ AuraEffect *auraEff = *i;
+ ++i;
+ if (auraEff->GetAmount() <= 0)
+ {
+ uint32 removedAuras = pVictim->m_removedAurasCount;
+ auraEff->GetBase()->Remove(AURA_REMOVE_BY_ENEMY_SPELL);
+ if (removedAuras+1 < pVictim->m_removedAurasCount)
+ i = vHealAbsorb.begin();
+ }
+ }
+ }
+
+ absorb = RemainingHeal > 0 ? (healAmount - RemainingHeal) : healAmount;
+ healAmount = RemainingHeal;
+}
+
void Unit::AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType, bool /*extra*/)
{
if (hasUnitState(UNIT_STAT_CANNOT_AUTOATTACK) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
@@ -2846,11 +2893,12 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
return SPELL_MISS_MISS;
// Chance resist mechanic (select max value from every mechanic spell effect)
- int32 resist_chance = pVictim->GetMechanicResistChance(spell);
+ int32 resist_chance = pVictim->GetMechanicResistChance(spell)*100;
tmp += resist_chance;
// Chance resist debuff
- tmp -= pVictim->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->Dispel));
+ tmp += pVictim->GetMaxPositiveAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->Dispel)) * 100;
+ tmp += pVictim->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MOD_DEBUFF_RESISTANCE, int32(spell->Dispel)) * 100;
// Roll chance
if (rand < tmp)
@@ -3270,8 +3318,8 @@ void Unit::_UpdateAutoRepeatSpell()
return;
}
- //apply delay
- if (m_AutoRepeatFirstCast && getAttackTimer(RANGED_ATTACK) < 500)
+ //apply delay (Auto Shot (spellID 75) not affected)
+ if (m_AutoRepeatFirstCast && getAttackTimer(RANGED_ATTACK) < 500 && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != 75)
setAttackTimer(RANGED_ATTACK,500);
m_AutoRepeatFirstCast = false;
@@ -3521,7 +3569,18 @@ void Unit::_AddAura(UnitAura * aura, Unit * caster)
if (Aura * foundAura = GetOwnedAura(aura->GetId(), aura->GetCasterGUID(), 0, aura))
{
if (aura->GetSpellProto()->StackAmount)
+ {
aura->ModStackAmount(foundAura->GetStackAmount());
+ }
+ // Update periodic timers from the previous aura
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ {
+ AuraEffect *existingEff = foundAura->GetEffect(i);
+ AuraEffect *newEff = aura->GetEffect(i);
+ if (!existingEff || !newEff)
+ continue;
+ newEff->SetPeriodicTimer(existingEff->GetPeriodicTimer());
+ }
// Use the new one to replace the old one
// This is the only place where AURA_REMOVE_BY_STACK should be used
@@ -4118,7 +4177,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
}
else
{
- int32 dur = 2*MINUTE*IN_MILISECONDS < aura->GetDuration() ? 2*MINUTE*IN_MILISECONDS : aura->GetDuration();
+ int32 dur = 2*MINUTE*IN_MILLISECONDS < aura->GetDuration() ? 2*MINUTE*IN_MILLISECONDS : aura->GetDuration();
newAura = Aura::TryCreate(aura->GetSpellProto(), effMask, stealer, NULL, &baseDamage[0], NULL, aura->GetCasterGUID());
if (!newAura)
@@ -4335,16 +4394,14 @@ void Unit::RemoveAreaAurasDueToLeaveWorld()
void Unit::RemoveAllAuras()
{
- while (!m_appliedAuras.empty() || !m_ownedAuras.empty())
- {
- AuraApplicationMap::iterator aurAppIter = m_appliedAuras.begin();
- while (!m_appliedAuras.empty())
- _UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT);
+ AuraApplicationMap::iterator aurAppIter;
+ for (aurAppIter = m_appliedAuras.begin(); aurAppIter != m_appliedAuras.end();)
+ _UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT);
+
+ AuraMap::iterator aurIter;
+ for (aurIter = m_ownedAuras.begin(); aurIter != m_ownedAuras.end();)
+ RemoveOwnedAura(aurIter);
- AuraMap::iterator aurIter = m_ownedAuras.begin();
- while (!m_ownedAuras.empty())
- RemoveOwnedAura(aurIter);
- }
}
void Unit::RemoveArenaAuras(bool onleave)
@@ -6561,11 +6618,11 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
return false;
// mana cost save
- int32 mana = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
- basepoints0 = mana * 40/100;
+ basepoints0 = CalculatePowerCost(procSpell, this, SpellSchoolMask(procSpell->SchoolMask)) * 4/10;
if (basepoints0 <= 0)
return false;
+ basepoints0 += 1; // standard basepoint increase for CastCustomSpell
target = this;
triggered_spell_id = 34720;
break;
@@ -7285,27 +7342,25 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
sLog.outError("Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id);
return false;
}
- // No thread generated mod
- // TODO: exist special flag in spell attributes for this, need found and use!
- SpellModifier *mod = new SpellModifier;
- mod->op = SPELLMOD_THREAT;
- mod->value = -100;
- mod->type = SPELLMOD_PCT;
- mod->spellId = dummySpell->Id;
- mod->mask[0] = 0x02;
- mod->mask[2] = 0x00;
- this->ToPlayer()->AddSpellMod(mod, true);
-
- // Remove cooldown (Chain Lightning - have Category Recovery time)
+
+ // Chain Lightning
if (procSpell->SpellFamilyFlags[0] & 0x2)
+ {
+ // Chain lightning has [LightOverload_Proc_Chance] / [Max_Number_of_Targets] chance to proc of each individual target hit.
+ // A maxed LO would have a 33% / 3 = 11% chance to proc of each target.
+ // LO chance was already "accounted" at the proc chance roll, now need to divide the chance by [Max_Number_of_Targets]
+ float chance = 100.0f / procSpell->EffectChainTarget[effIndex];
+ if (!roll_chance_f(chance))
+ return false;
+
+ // Remove cooldown (Chain Lightning - have Category Recovery time)
ToPlayer()->RemoveSpellCooldown(spellId);
+ }
CastSpell(pVictim, spellId, true, castItem, triggeredByAura);
- this->ToPlayer()->AddSpellMod(mod, false);
-
if (cooldown && GetTypeId() == TYPEID_PLAYER)
- ToPlayer()->AddSpellCooldown(dummySpell->Id,0,time(NULL) + cooldown);
+ ToPlayer()->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown);
return true;
}
@@ -7744,12 +7799,35 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 /*damage*/, Aur
// Used in case when access to whole aura is needed
// All procs should be handled like this...
-bool Unit::HandleAuraProc(Unit * /*pVictim*/, uint32 damage, Aura * triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/, bool * handled)
+bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/, bool * handled)
{
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto();
switch(dummySpell->SpellFamilyName)
{
+ case SPELLFAMILY_PALADIN:
+ {
+ // Infusion of Light
+ if (dummySpell->SpellIconID == 3021)
+ {
+ // Flash of Light HoT on Flash of Light when Sacred Shield active
+ if (procSpell->SpellFamilyFlags[0] & 0x40000000 && procSpell->SpellIconID == 242)
+ {
+ *handled = true;
+ if (pVictim->HasAura(53601))
+ {
+ int32 bp0 = (damage/12) * SpellMgr::CalculateSpellEffectAmount(dummySpell, 2)/100;
+ CastCustomSpell(pVictim, 66922, &bp0, NULL, NULL, true);
+ return true;
+ }
+ }
+ // but should not proc on non-critical Holy Shocks
+ else if ((procSpell->SpellFamilyFlags[0] & 0x200000 || procSpell->SpellFamilyFlags[1] & 0x10000) && !(procEx & PROC_EX_CRITICAL_HIT))
+ *handled = true;
+ break;
+ }
+ break;
+ }
case SPELLFAMILY_MAGE:
{
// Combustion
@@ -7783,7 +7861,7 @@ bool Unit::HandleAuraProc(Unit * /*pVictim*/, uint32 damage, Aura * triggeredByA
if (!spInfo)
return false;
- int32 bp0 = this->GetCreateMana() * spInfo->CalculateSimpleValue(0) / 100;
+ int32 bp0 = this->GetCreateMana() * SpellMgr::CalculateSpellEffectAmount(spInfo, 0) / 100;
this->CastCustomSpell(this, 67545, &bp0, NULL, NULL, true, NULL, triggeredByAura->GetEffect(0), this->GetGUID());
return true;
}
@@ -8137,6 +8215,24 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
target = pVictim;
break;
}
+ //Item - Coliseum 25 Heroic Caster Trinket
+ case 67758:
+ {
+ if(!pVictim || !pVictim->isAlive())
+ return false;
+ // stacking
+ CastSpell(this, 67759, true, NULL, triggeredByAura);
+
+ Aura * dummy = GetAura(67759);
+ // release at 3 aura in stack (cont contain in basepoint of trigger aura)
+ if(!dummy || dummy->GetStackAmount() < triggerAmount)
+ return false;
+
+ RemoveAurasDueToSpell(67759);
+ trigger_spell_id = 67760;
+ target = pVictim;
+ break;
+ }
default:
// Illumination
if (auraSpellInfo->SpellIconID == 241)
@@ -8170,7 +8266,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
}
// percent stored in effect 1 (class scripts) base points
int32 cost = originalSpell->manaCost + originalSpell->ManaCostPercentage * GetCreateMana() / 100;
- basepoints0 = cost*auraSpellInfo->CalculateSimpleValue(1)/100;
+ basepoints0 = cost*SpellMgr::CalculateSpellEffectAmount(auraSpellInfo, 1)/100;
trigger_spell_id = 20272;
target = this;
}
@@ -9608,7 +9704,13 @@ void Unit::SetCharm(Unit* charm, bool apply)
int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellProto, bool critical)
{
- int32 gain = pVictim->ModifyHealth(int32(addhealth));
+ uint32 absorb = 0;
+ // calculate heal absorb and reduce healing
+ CalcHealAbsorb(pVictim, spellProto, addhealth, absorb);
+ int32 gain = 0;
+
+ if (addhealth)
+ gain = pVictim->ModifyHealth(int32(addhealth));
Unit* unit = this;
@@ -9618,7 +9720,7 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro
if (unit->GetTypeId() == TYPEID_PLAYER)
{
// overheal = addhealth - gain
- unit->SendHealSpellLog(pVictim, spellProto->Id, addhealth, addhealth - gain, critical);
+ unit->SendHealSpellLog(pVictim, spellProto->Id, addhealth, addhealth - gain, absorb, critical);
if (BattleGround *bg = unit->ToPlayer()->GetBattleGround())
bg->UpdatePlayerScore((Player*)unit, SCORE_HEALING_DONE, gain);
@@ -9823,7 +9925,7 @@ void Unit::UnsummonAllTotems()
}
}
-void Unit::SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, bool critical)
+void Unit::SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical)
{
// we guess size
WorldPacket data(SMSG_SPELLHEALLOG, (8+8+4+4+4+4+1));
@@ -9832,7 +9934,7 @@ void Unit::SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32
data << uint32(SpellID);
data << uint32(Damage);
data << uint32(OverHeal);
- data << uint32(0); // Absorb amount
+ data << uint32(Absorb); // Absorb amount
data << uint8(critical ? 1 : 0);
SendMessageToSet(&data, true);
}
@@ -9955,7 +10057,8 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
case 5142: // Increased Lightning Damage
case 5147: // Improved Consecration / Libram of Resurgence
case 5148: // Idol of the Shooting Star
- case 6008: // Increased Lightning Damage / Totem of Hex
+ case 6008: // Increased Lightning Damage
+ case 8627: // Totem of Hex
{
DoneTotal += (*i)->GetAmount();
break;
@@ -10122,7 +10225,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
case 49638:
{
if (const SpellEntry *proto=sSpellStore.LookupEntry(itr->first))
- ApCoeffMod *= (100.0f + proto->CalculateSimpleValue(0)) / 100.0f;
+ ApCoeffMod *= (100.0f + SpellMgr::CalculateSpellEffectAmount(proto, 0)) / 100.0f;
}
break;
}
@@ -10371,6 +10474,10 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic
bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType) const
{
+ // Mobs can't crit with spells.
+ if (IS_CREATURE_GUID(GetGUID()))
+ return false;
+
// not critting spell
if ((spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_CRIT))
return false;
@@ -10445,7 +10552,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
}
}
// Custom crit by class
- switch(spellProto->SpellFamilyName)
+ switch (spellProto->SpellFamilyName)
{
case SPELLFAMILY_DRUID:
// Starfire
@@ -10458,6 +10565,11 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
break;
}
break;
+ case SPELLFAMILY_ROGUE:
+ // Shiv-applied poisons can't crit
+ if (FindCurrentSpellBySpellId(5938))
+ crit_chance = 0.0f;
+ break;
case SPELLFAMILY_PALADIN:
// Flash of light
if (spellProto->SpellFamilyFlags[0] & 0x40000000)
@@ -10606,6 +10718,10 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
if (Unit* owner = GetOwner())
return owner->SpellHealingBonus(pVictim, spellProto, healamount, damagetype, stack);
+ // no bonus for heal potions/bandages
+ if (spellProto->SpellFamilyName == SPELLFAMILY_POTION /*|| spellProto->Mechanic == MECHANIC_BANDAGE*/ )
+ return healamount;
+
// Healing Done
// Taken/Done total percent damage auras
float DoneTotalMod = 1.0f;
@@ -10877,7 +10993,7 @@ int32 Unit::SpellBaseHealingBonus(SpellSchoolMask schoolMask)
AuraEffectList const& mHealingDone = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE);
for (AuraEffectList::const_iterator i = mHealingDone.begin(); i != mHealingDone.end(); ++i)
- if (((*i)->GetMiscValue() & schoolMask) != 0)
+ if (!(*i)->GetMiscValue() || ((*i)->GetMiscValue() & schoolMask) != 0)
AdvertisedBenefit += (*i)->GetAmount();
// Healing bonus of spirit, intellect and strength
@@ -11094,17 +11210,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
// ..done (base at attack power for marked target and base at attack power for creature type)
int32 APbonus = 0;
- if (attType == RANGED_ATTACK && pVictim->GetTypeId() == TYPEID_UNIT)
- {
- APbonus += pVictim->GetTotalAuraModifier(SPELL_AURA_RANGED_AP_ATTACKER_CREATURES_BONUS);
-
- // ..done (base at attack power and creature type)
- AuraEffectList const& mCreatureAttackPower = GetAuraEffectsByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_VERSUS);
- for (AuraEffectList::const_iterator i = mCreatureAttackPower.begin(); i != mCreatureAttackPower.end(); ++i)
- if (creatureTypeMask & uint32((*i)->GetMiscValue()))
- APbonus += (*i)->GetAmount();
- }
- else if (attType == RANGED_ATTACK)
+ if (attType == RANGED_ATTACK)
{
APbonus += pVictim->GetTotalAuraModifier(SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS);
@@ -12419,7 +12525,7 @@ Unit* Creature::SelectVictim()
//======================================================================
//======================================================================
-int32 Unit::ApplyEffectModifiers(SpellEntry const* spellProto, uint8 effect_index, int32 value)
+int32 Unit::ApplyEffectModifiers(SpellEntry const* spellProto, uint8 effect_index, int32 value) const
{
if (Player* modOwner = GetSpellModOwner())
{
@@ -12440,57 +12546,10 @@ int32 Unit::ApplyEffectModifiers(SpellEntry const* spellProto, uint8 effect_inde
return value;
}
-int32 Unit::CalculateSpellDamage(Unit const* /*target*/, SpellEntry const* spellProto, uint8 effect_index, int32 const* effBasePoints)
+// function uses real base points (typically value - 1)
+int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProto, uint8 effect_index, int32 const* basePoints) const
{
- int32 level = int32(getLevel());
- if (level > int32(spellProto->maxLevel) && spellProto->maxLevel > 0)
- level = int32(spellProto->maxLevel);
- else if (level < int32(spellProto->baseLevel))
- level = int32(spellProto->baseLevel);
- level -= int32(spellProto->spellLevel);
-
- float basePointsPerLevel = spellProto->EffectRealPointsPerLevel[effect_index];
- int32 basePoints = effBasePoints ? *effBasePoints - 1 : spellProto->EffectBasePoints[effect_index];
- basePoints += int32(level * basePointsPerLevel);
- int32 randomPoints = int32(spellProto->EffectDieSides[effect_index]);
-
- switch(randomPoints)
- {
- case 0: // not used
- case 1: basePoints += 1; break; // range 1..1
- default:
- // range can have positive (1..rand) and negative (rand..1) values, so order its for irand
- int32 randvalue = (randomPoints >= 1)
- ? irand(1, randomPoints)
- : irand(randomPoints, 1);
-
- basePoints += randvalue;
- break;
- }
-
- int32 value = basePoints;
-
- // random damage
- //if (comboDamage != 0 && unitPlayer /*&& target && (target->GetGUID() == unitPlayer->GetComboTarget())*/)
- if (m_movedPlayer)
- if (uint8 comboPoints = m_movedPlayer->GetComboPoints())
- if (float comboDamage = spellProto->EffectPointsPerComboPoint[effect_index])
- value += int32(comboDamage * comboPoints);
-
- value = ApplyEffectModifiers(spellProto, effect_index, value);
-
- if (!basePointsPerLevel && (spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel) &&
- spellProto->Effect[effect_index] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
- spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK &&
- spellProto->EffectApplyAuraName[effect_index] != SPELL_AURA_MOD_SPEED_ALWAYS &&
- spellProto->EffectApplyAuraName[effect_index] != SPELL_AURA_MOD_SPEED_NOT_STACK &&
- spellProto->EffectApplyAuraName[effect_index] != SPELL_AURA_MOD_INCREASE_SPEED &&
- spellProto->EffectApplyAuraName[effect_index] != SPELL_AURA_MOD_DECREASE_SPEED)
- //there are many more: slow speed, -healing pct
- value = int32(value*0.25f*exp(getLevel()*(70-spellProto->spellLevel)/1000.0f));
- //value = int32(value * (int32)getLevel() / (int32)(spellProto->spellLevel ? spellProto->spellLevel : 1));
-
- return value;
+ return SpellMgr::CalculateSpellEffectAmount(spellProto, effect_index, this, basePoints, target);
}
int32 Unit::CalcSpellDuration(SpellEntry const* spellProto)
@@ -12575,7 +12634,7 @@ int32 Unit::ModSpellDuration(SpellEntry const* spellProto, Unit const* target, i
{
// Glyph of Thorns
if (AuraEffect * aurEff = GetAuraEffect(57862, 0))
- duration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS;
+ duration += aurEff->GetAmount() * MINUTE * IN_MILLISECONDS;
}
break;
case SPELLFAMILY_PALADIN:
@@ -12583,13 +12642,13 @@ int32 Unit::ModSpellDuration(SpellEntry const* spellProto, Unit const* target, i
{
// Glyph of Blessing of Might
if (AuraEffect * aurEff = GetAuraEffect(57958, 0))
- duration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS;
+ duration += aurEff->GetAmount() * MINUTE * IN_MILLISECONDS;
}
else if (spellProto->SpellFamilyFlags[0] & 0x00010000)
{
// Glyph of Blessing of Wisdom
if (AuraEffect * aurEff = GetAuraEffect(57979, 0))
- duration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS;
+ duration += aurEff->GetAmount() * MINUTE * IN_MILLISECONDS;
}
break;
}
@@ -12607,11 +12666,10 @@ void Unit::ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spel
if (!(spellProto->Attributes & (SPELL_ATTR_UNK4|SPELL_ATTR_TRADESPELL)) && spellProto->SpellFamilyName)
castTime = int32(float(castTime) * GetFloatValue(UNIT_MOD_CAST_SPEED));
- else
- {
- if (spellProto->Attributes & SPELL_ATTR_REQ_AMMO && !(spellProto->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG))
- castTime = int32(float(castTime) * m_modAttackSpeedPct[RANGED_ATTACK]);
- }
+ else if (spellProto->Attributes & SPELL_ATTR_REQ_AMMO && !(spellProto->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG))
+ castTime = int32(float(castTime) * m_modAttackSpeedPct[RANGED_ATTACK]);
+ else if (spellProto->SpellVisual[0] == 3881 && HasAura(67556)) // cooking with Chef Hat.
+ castTime = 500;
}
DiminishingLevels Unit::GetDiminishing(DiminishingGroup group)
@@ -12654,10 +12712,10 @@ void Unit::IncrDiminishing(DiminishingGroup group)
m_Diminishing.push_back(DiminishingReturn(group,getMSTime(),DIMINISHING_LEVEL_2));
}
-void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster,DiminishingLevels Level, int32 limitduration)
+float Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster,DiminishingLevels Level, int32 limitduration)
{
if (duration == -1 || group == DIMINISHING_NONE || caster->IsFriendlyTo(this))
- return;
+ return 1.0f;
// test pet/charm masters instead pets/charmeds
Unit const* targetOwner = GetCharmerOrOwner();
@@ -12711,6 +12769,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un
}
duration = int32(duration * mod);
+ return mod;
}
void Unit::ApplyDiminishingAura(DiminishingGroup group, bool apply)
@@ -13277,8 +13336,7 @@ void Unit::UpdateCharmAI()
{
if (!isCharmed())
{
- if (i_AI)
- delete i_AI;
+ delete i_AI;
i_AI = i_disabledAI;
i_disabledAI = NULL;
}
@@ -13314,7 +13372,8 @@ void Unit::DeleteCharmInfo()
}
CharmInfo::CharmInfo(Unit* unit)
-: m_unit(unit), m_CommandState(COMMAND_FOLLOW), m_petnumber(0), m_barInit(false)
+: 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)
{
for (uint8 i = 0; i < MAX_SPELL_CHARM; ++i)
m_charmspells[i].SetActionAndType(0,ACT_DISABLED);
@@ -13623,7 +13682,6 @@ bool InitTriggerAuraData()
isNonTriggerAura[SPELL_AURA_MOD_POWER_REGEN]=true;
isNonTriggerAura[SPELL_AURA_REDUCE_PUSHBACK]=true;
- isTriggerAura[SPELL_AURA_RANGED_AP_ATTACKER_CREATURES_BONUS] = true;
return true;
}
@@ -14064,7 +14122,7 @@ void Unit::StopMoving()
// send explicit stop packet
// rely on vmaps here because for example stormwind is in air
- //float z = MapManager::Instance().GetBaseMap(GetMapId())->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true);
+ //float z = sMapMgr.GetBaseMap(GetMapId())->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), true);
//if (fabs(GetPositionZ() - z) < 2.0f)
// Relocate(GetPositionX(), GetPositionY(), z);
//Relocate(GetPositionX(), GetPositionY(),GetPositionZ());
@@ -15146,6 +15204,10 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type)
if (!charmer)
return false;
+ // unmount players when charmed
+ if (GetTypeId() == TYPEID_PLAYER)
+ Unmount();
+
assert(type != CHARM_TYPE_POSSESS || charmer->GetTypeId() == TYPEID_PLAYER);
assert((type == CHARM_TYPE_VEHICLE) == IsVehicle());
@@ -16272,7 +16334,7 @@ void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool cas
bool Unit::SetPosition(float x, float y, float z, float orientation, bool teleport)
{
// prevent crash when a bad coord is sent by the client
- if (!Trinity::IsValidMapCoord(x,y))
+ if (!Trinity::IsValidMapCoord(x,y,z,orientation))
{
sLog.outDebug("Unit::SetPosition(%f, %f, %f) .. bad coordinates!",x,y,z);
return false;
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index a2f4b2cd388..347a862b5d4 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -31,9 +31,12 @@
#include "HostileRefManager.h"
#include "FollowerReference.h"
#include "FollowerRefManager.h"
-#include "Utilities/EventProcessor.h"
+#include "EventProcessor.h"
#include "MotionMaster.h"
#include "DBCStructure.h"
+#include "Path.h"
+#include "WorldPacket.h"
+#include "Timer.h"
#include <list>
#define WORLD_TRIGGER 12999
@@ -324,7 +327,6 @@ class DynamicObject;
class GameObject;
class Item;
class Pet;
-class Path;
class PetAura;
class Minion;
class Guardian;
@@ -1104,7 +1106,7 @@ class Unit : public WorldObject
DiminishingLevels GetDiminishing(DiminishingGroup group);
void IncrDiminishing(DiminishingGroup group);
- void ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster, DiminishingLevels Level, int32 limitduration);
+ float ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster, DiminishingLevels Level, int32 limitduration);
void ApplyDiminishingAura(DiminishingGroup group, bool apply);
void ClearDiminishings() { m_Diminishing.clear(); }
@@ -1397,7 +1399,7 @@ class Unit : public WorldObject
virtual bool IsUnderWater() const;
bool isInAccessiblePlaceFor(Creature const* c) const;
- void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, bool critical = false);
+ void SendHealSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false);
void SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage,Powers powertype);
void EnergizeBySpell(Unit *pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
uint32 SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage);
@@ -1436,12 +1438,14 @@ class Unit : public WorldObject
void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 Time, Player* player = NULL);
void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 MoveFlags, uint32 time, float speedZ, Player *player = NULL);
//void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player = NULL);
- void SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end);
void SendMonsterMoveTransport(Unit *vehicleOwner);
void SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime = 0, Player* player = NULL);
void SendMonsterMoveWithSpeedToCurrentDestination(Player* player = NULL);
void SendMovementFlagUpdate();
+ template<typename PathElem, typename PathNode>
+ void SendMonsterMoveByPath(Path<PathElem,PathNode> const& path, uint32 start, uint32 end);
+
void SendChangeCurrentVictimOpcode(HostileReference* pHostileReference);
void SendClearThreatListOpcode();
void SendRemoveFromThreatListOpcode(HostileReference* pHostileReference);
@@ -1525,7 +1529,7 @@ class Unit : public WorldObject
void DeleteCharmInfo();
void UpdateCharmAI();
//Player * GetMoverSource() const;
- Player *m_movedPlayer;
+ Player * m_movedPlayer;
SharedVisionList const& GetSharedVisionList() { return m_sharedVision; }
void AddPlayerToVision(Player* plr);
void RemovePlayerFromVision(Player* plr);
@@ -1831,6 +1835,7 @@ class Unit : public WorldObject
uint32 CalcNotIgnoreDamageRedunction(uint32 damage, SpellSchoolMask damageSchoolMask);
uint32 CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEntry const *spellInfo, WeaponAttackType attackType=MAX_ATTACK);
void CalcAbsorbResist(Unit *pVictim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellEntry const *spellInfo = NULL);
+ void CalcHealAbsorb(Unit *pVictim, const SpellEntry *spellProto, uint32 &healAmount, uint32 &absorb);
void UpdateSpeed(UnitMoveType mtype, bool forced);
float GetSpeed(UnitMoveType mtype) const;
@@ -1841,8 +1846,8 @@ class Unit : public WorldObject
void SetHover(bool on);
bool isHover() const { return HasAuraType(SPELL_AURA_HOVER); }
- int32 ApplyEffectModifiers(SpellEntry const* spellProto, uint8 effect_index, int32 value);
- int32 CalculateSpellDamage(Unit const* target, SpellEntry const* spellProto, uint8 effect_index, int32 const* basePoints = NULL);
+ int32 ApplyEffectModifiers(SpellEntry const* spellProto, uint8 effect_index, int32 value) const;
+ int32 CalculateSpellDamage(Unit const* target, SpellEntry const* spellProto, uint8 effect_index, int32 const* basePoints = NULL) const;
int32 CalcSpellDuration(SpellEntry const* spellProto);
int32 ModSpellDuration(SpellEntry const* spellProto, Unit const* target, int32 duration, bool positive);
void ModSpellCastTime(SpellEntry const* spellProto, int32 & castTime, Spell * spell=NULL);
@@ -2116,4 +2121,30 @@ namespace Trinity
};
}
+template<typename Elem, typename Node>
+inline void Unit::SendMonsterMoveByPath(Path<Elem,Node> const& path, uint32 start, uint32 end)
+{
+ uint32 traveltime = uint32(path.GetTotalLength(start, end) * 32);
+ uint32 pathSize = end - start;
+ WorldPacket data(SMSG_MONSTER_MOVE, (GetPackGUID().size()+1+4+4+4+4+1+4+4+4+pathSize*4*3));
+ data.append(GetPackGUID());
+ data << uint8(0);
+ data << GetPositionX();
+ data << GetPositionY();
+ data << GetPositionZ();
+ data << uint32(getMSTime());
+ data << uint8(0);
+ data << uint32(((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) || isInFlight()) ? (MOVEFLAG_FLY|MOVEFLAG_WALK) : MOVEFLAG_WALK);
+ data << uint32(traveltime);
+ data << uint32(pathSize);
+
+ for (uint32 i = start; i < end; ++i)
+ {
+ data << float(path[i].x);
+ data << float(path[i].y);
+ data << float(path[i].z);
+ }
+
+ SendMessageToSet(&data, true);
+}
#endif
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index a154c579605..850296aaafe 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -39,6 +39,27 @@ Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleI
++m_usableSeatNum;
}
}
+
+ // HACKY WAY, We must found a more generic way to handle this
+ // Set inmunities since db ones are rewritten with player's ones
+ switch (GetVehicleInfo()->m_ID)
+ {
+ case 160:
+ me->SetControlled(true, UNIT_STAT_ROOT);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
+ case 158:
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_HEAL, true);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_FEAR, true);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_HEAL, true);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_STUN, true);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_ROOT, true);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_DECREASE_SPEED, true);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_CONFUSE, true);
+ me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip jump effect
+ break;
+ default:
+ break;
+ }
assert(!m_Seats.empty());
}
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index a2c6f2f2422..f0500e177bb 100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -22,18 +22,15 @@
#include "World.h"
#include "ObjectMgr.h"
#include "WorldPacket.h"
-#include "PoolHandler.h"
+#include "PoolMgr.h"
#include "ProgressBar.h"
#include "Language.h"
#include "Log.h"
#include "MapManager.h"
-#include "Policies/SingletonImp.h"
#include "GossipDef.h"
#include "Player.h"
#include "BattleGroundMgr.h"
-INSTANTIATE_SINGLETON_1(GameEventMgr);
-
bool GameEventMgr::CheckOneGameEvent(uint16 entry) const
{
switch(mGameEvent[entry].state)
@@ -1154,7 +1151,7 @@ uint32 GameEventMgr::Update() // return the next e
for (std::set<uint16>::iterator itr = deactivate.begin(); itr != deactivate.end(); ++itr)
StopEvent(*itr);
sLog.outDetail("Next game event check in %u seconds.", nextEventDelay + 1);
- return (nextEventDelay + 1) * IN_MILISECONDS; // Add 1 second to be sure event has started/stopped at next call
+ return (nextEventDelay + 1) * IN_MILLISECONDS; // Add 1 second to be sure event has started/stopped at next call
}
void GameEventMgr::UnApplyEvent(uint16 event_id)
@@ -1270,7 +1267,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
objmgr.AddCreatureToGrid(*itr, data);
// Spawn if necessary (loaded grids only)
- Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
+ Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
// We use spawn coords to spawn
if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
{
@@ -1298,7 +1295,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
objmgr.AddGameobjectToGrid(*itr, data);
// Spawn if necessary (loaded grids only)
// this base map checked as non-instanced and then only existed
- Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
+ Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
// We use current coords to unspawn, not spawn coords since creature can have changed grid
if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
{
@@ -1345,7 +1342,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
{
objmgr.RemoveCreatureFromGrid(*itr, data);
- if (Creature* pCreature = ObjectAccessor::Instance().GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_UNIT), (Creature*)NULL))
+ if (Creature* pCreature = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_UNIT), (Creature*)NULL))
pCreature->AddObjectToRemoveList();
}
}
@@ -1366,7 +1363,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
{
objmgr.RemoveGameobjectFromGrid(*itr, data);
- if (GameObject* pGameobject = ObjectAccessor::Instance().GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
+ if (GameObject* pGameobject = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
pGameobject->AddObjectToRemoveList();
}
}
@@ -1392,7 +1389,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
continue;
// Update if spawned
- Creature* pCreature = ObjectAccessor::Instance().GetObjectInWorld(MAKE_NEW_GUID(itr->first, data->id,HIGHGUID_UNIT), (Creature*)NULL);
+ Creature* pCreature = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(itr->first, data->id,HIGHGUID_UNIT), (Creature*)NULL);
if (pCreature)
{
if (activate)
diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h
index 2c3e41f5f20..656be331edc 100644
--- a/src/server/game/Events/GameEventMgr.h
+++ b/src/server/game/Events/GameEventMgr.h
@@ -23,8 +23,8 @@
#include "Common.h"
#include "SharedDefines.h"
-#include "Platform/Define.h"
-#include "Policies/Singleton.h"
+#include "Define.h"
+#include "ace/Singleton.h"
#define max_ge_check_delay DAY // 1 day in seconds
@@ -92,9 +92,11 @@ class Creature;
class GameEventMgr
{
+ friend class ACE_Singleton<GameEventMgr, ACE_Null_Mutex>;
+ GameEventMgr();
public:
- GameEventMgr();
~GameEventMgr() {};
+
typedef std::set<uint16> ActiveEvents;
typedef std::vector<GameEventData> GameEventDataMap;
ActiveEvents const& GetActiveEventList() const { return m_ActiveEvents; }
@@ -172,7 +174,7 @@ class GameEventMgr
GameEventGuidMap mGameEventGameobjectGuids;
};
-#define gameeventmgr Trinity::Singleton<GameEventMgr>::Instance()
+#define gameeventmgr (*ACE_Singleton<GameEventMgr, ACE_Null_Mutex>::instance())
bool IsHolidayActive(HolidayIds id);
bool IsEventActive(uint16 event_id);
diff --git a/src/server/game/Globals/GlobalEvents.cpp b/src/server/game/Globals/GlobalEvents.cpp
index 300527aad73..e83441cf3bb 100644
--- a/src/server/game/Globals/GlobalEvents.cpp
+++ b/src/server/game/Globals/GlobalEvents.cpp
@@ -23,9 +23,9 @@
*/
#include "Log.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/DatabaseImpl.h"
-#include "Platform/Define.h"
+#include "DatabaseEnv.h"
+#include "DatabaseImpl.h"
+#include "Define.h"
#include "MapManager.h"
#include "ObjectAccessor.h"
#include "GlobalEvents.h"
@@ -53,7 +53,7 @@ static void CorpsesEraseCallBack(QueryResult_AutoPtr result, bool bones)
/// Resurrectable - convert corpses to bones
if (!bones)
{
- if (!ObjectAccessor::Instance().ConvertCorpseForPlayer(player_guid))
+ if (!sObjectAccessor.ConvertCorpseForPlayer(player_guid))
{
sLog.outDebug("Corpse %u not found in world or bones creating forbidden. Delete from DB.",guidlow);
CharacterDatabase.PExecute("DELETE FROM corpse WHERE guid = '%u'",guidlow);
@@ -62,7 +62,7 @@ static void CorpsesEraseCallBack(QueryResult_AutoPtr result, bool bones)
else
///- or delete bones
{
- MapManager::Instance().RemoveBonesFromMap(mapid, guid, positionX, positionY);
+ sMapMgr.RemoveBonesFromMap(mapid, guid, positionX, positionY);
///- remove bones from the database
CharacterDatabase.PExecute("DELETE FROM corpse WHERE guid = '%u'",guidlow);
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index cf5bc728c6e..b82944d8327 100644
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -20,7 +20,7 @@
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
-#include "Policies/SingletonImp.h"
+
#include "Player.h"
#include "Creature.h"
#include "GameObject.h"
@@ -41,10 +41,6 @@
#include <cmath>
-#define CLASS_LOCK Trinity::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex>
-INSTANTIATE_SINGLETON_2(ObjectAccessor, CLASS_LOCK);
-INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ACE_Thread_Mutex);
-
ObjectAccessor::ObjectAccessor()
{
}
@@ -151,7 +147,7 @@ Player* ObjectAccessor::FindPlayer(uint64 guid)
Player* ObjectAccessor::FindPlayerByName(const char* name)
{
- Guard guard(*HashMapHolder<Player>::GetLock());
+ ACE_GUARD_RETURN(LockType, g, *HashMapHolder<Player>::GetLock(), NULL);
HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
for (HashMapHolder<Player>::MapType::iterator iter = m.begin(); iter != m.end(); ++iter)
if (iter->second->IsInWorld() && strcmp(name, iter->second->GetName()) == 0)
@@ -162,7 +158,7 @@ Player* ObjectAccessor::FindPlayerByName(const char* name)
void ObjectAccessor::SaveAllPlayers()
{
- Guard guard(*HashMapHolder<Player>::GetLock());
+ ACE_GUARD(LockType, g, *HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType& m = HashMapHolder<Player>::GetContainer();
for (HashMapHolder<Player>::MapType::iterator itr = m.begin(); itr != m.end(); ++itr)
itr->second->SaveToDB();
@@ -175,7 +171,7 @@ Pet* ObjectAccessor::GetPet(uint64 guid)
Corpse* ObjectAccessor::GetCorpseForPlayerGUID(uint64 guid)
{
- Guard guard(i_corpseGuard);
+ ACE_GUARD_RETURN(LockType, guard, i_corpseGuard, NULL);
Player2CorpsesMapType::iterator iter = i_player2corpse.find(guid);
if (iter == i_player2corpse.end())
@@ -197,7 +193,7 @@ void ObjectAccessor::RemoveCorpse(Corpse* corpse)
// Critical section
{
- Guard guard(i_corpseGuard);
+ ACE_GUARD(LockType, g, i_corpseGuard);
Player2CorpsesMapType::iterator iter = i_player2corpse.find(corpse->GetOwnerGUID());
if (iter == i_player2corpse.end()) // TODO: Fix this
@@ -219,7 +215,7 @@ void ObjectAccessor::AddCorpse(Corpse* corpse)
// Critical section
{
- Guard guard(i_corpseGuard);
+ ACE_GUARD(LockType, g, i_corpseGuard);
assert(i_player2corpse.find(corpse->GetOwnerGUID()) == i_player2corpse.end());
i_player2corpse[corpse->GetOwnerGUID()] = corpse;
@@ -234,7 +230,7 @@ void ObjectAccessor::AddCorpse(Corpse* corpse)
void ObjectAccessor::AddCorpsesToGrid(GridPair const& gridpair, GridType& grid, Map* map)
{
- Guard guard(i_corpseGuard);
+ ACE_GUARD(LockType, g, i_corpseGuard);
for (Player2CorpsesMapType::iterator iter = i_player2corpse.begin(); iter != i_player2corpse.end(); ++iter)
{
@@ -274,7 +270,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool /*insign
// done in removecorpse
// remove resurrectable corpse from grid object registry (loaded state checked into call)
// do not load the map if it's not loaded
- //Map *map = MapManager::Instance().FindMap(corpse->GetMapId(), corpse->GetInstanceId());
+ //Map *map = sMapMgr.FindMap(corpse->GetMapId(), corpse->GetInstanceId());
//if (map)
// map->Remove(corpse, false);
@@ -333,7 +329,7 @@ void ObjectAccessor::Update(uint32 /*diff*/)
// Critical section
{
- Guard guard(i_updateGuard);
+ ACE_GUARD(LockType, g, i_updateGuard);
while (!i_objects.empty())
{
diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h
index 8e64eb48fa0..fc128d6a4e0 100644
--- a/src/server/game/Globals/ObjectAccessor.h
+++ b/src/server/game/Globals/ObjectAccessor.h
@@ -21,11 +21,10 @@
#ifndef TRINITY_OBJECTACCESSOR_H
#define TRINITY_OBJECTACCESSOR_H
-#include "Platform/Define.h"
-#include "Policies/Singleton.h"
+#include "Define.h"
+#include <ace/Singleton.h>
#include <ace/Thread_Mutex.h>
-#include "Utilities/UnorderedMap.h"
-#include "Policies/ThreadingModel.h"
+#include "UnorderedMap.h"
#include "UpdateData.h"
@@ -50,23 +49,22 @@ class HashMapHolder
typedef UNORDERED_MAP<uint64, T*> MapType;
typedef ACE_Thread_Mutex LockType;
- typedef Trinity::GeneralLock<LockType> Guard;
static void Insert(T* o)
{
- Guard guard(i_lock);
+ ACE_GUARD(LockType, Guard, i_lock);
m_objectMap[o->GetGUID()] = o;
}
static void Remove(T* o)
{
- Guard guard(i_lock);
+ ACE_GUARD(LockType, Guard, i_lock);
m_objectMap.erase(o->GetGUID());
}
static T* Find(uint64 guid)
{
- Guard guard(i_lock);
+ ACE_GUARD_RETURN(LockType, Guard, i_lock, NULL);
typename MapType::iterator itr = m_objectMap.find(guid);
return (itr != m_objectMap.end()) ? itr->second : NULL;
}
@@ -84,9 +82,9 @@ class HashMapHolder
static MapType m_objectMap;
};
-class ObjectAccessor : public Trinity::Singleton<ObjectAccessor, Trinity::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex> >
+class ObjectAccessor
{
- friend class Trinity::OperatorNew<ObjectAccessor>;
+ friend class ACE_Singleton<ObjectAccessor, ACE_Thread_Mutex>;
ObjectAccessor();
~ObjectAccessor();
ObjectAccessor(const ObjectAccessor&);
@@ -220,13 +218,13 @@ class ObjectAccessor : public Trinity::Singleton<ObjectAccessor, Trinity::ClassL
void AddUpdateObject(Object* obj)
{
- Guard guard(i_updateGuard);
+ ACE_GUARD(LockType, Guard, i_updateGuard);
i_objects.insert(obj);
}
void RemoveUpdateObject(Object* obj)
{
- Guard guard(i_updateGuard);
+ ACE_GUARD(LockType, Guard, i_updateGuard);
i_objects.erase(obj);
}
@@ -239,7 +237,6 @@ class ObjectAccessor : public Trinity::Singleton<ObjectAccessor, Trinity::ClassL
Corpse* ConvertCorpseForPlayer(uint64 player_guid, bool insignia = false);
typedef ACE_Thread_Mutex LockType;
- typedef Trinity::GeneralLock<LockType> Guard;
private:
@@ -254,4 +251,6 @@ class ObjectAccessor : public Trinity::Singleton<ObjectAccessor, Trinity::ClassL
LockType i_updateGuard;
LockType i_corpseGuard;
};
+
+#define sObjectAccessor (*ACE_Singleton<ObjectAccessor, ACE_Thread_Mutex>::instance())
#endif
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index ce86c2a4e77..71cd4c46b80 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -19,11 +19,9 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/SQLStorage.h"
-#include "Database/SQLStorageImpl.h"
-#include "Policies/SingletonImp.h"
-
+#include "DatabaseEnv.h"
+#include "SQLStorage.h"
+#include "SQLStorageImpl.h"
#include "Log.h"
#include "MapManager.h"
#include "ObjectMgr.h"
@@ -33,7 +31,7 @@
#include "Group.h"
#include "Guild.h"
#include "ArenaTeam.h"
-#include "Transports.h"
+#include "Transport.h"
#include "ProgressBar.h"
#include "Language.h"
#include "GameEventMgr.h"
@@ -48,8 +46,6 @@
#include "Vehicle.h"
#include "AchievementMgr.h"
-INSTANTIATE_SINGLETON_1(ObjectMgr);
-
ScriptMapMap sQuestEndScripts;
ScriptMapMap sQuestStartScripts;
ScriptMapMap sSpellScripts;
@@ -1177,14 +1173,14 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guid, uint32 linkedGuid)
if (!linkedGuid) // we're removing the linking
{
mCreatureLinkedRespawnMap.erase(guid);
- WorldDatabase.DirectPExecute("DELETE FROM creature_linked_respawn WHERE guid = '%u'",guid);
+ WorldDatabase.PExecute("DELETE FROM creature_linked_respawn WHERE guid = '%u'",guid);
return true;
}
if (CheckCreatureLinkedRespawn(guid,linkedGuid)) // we add/change linking
{
mCreatureLinkedRespawnMap[guid] = linkedGuid;
- WorldDatabase.DirectPExecute("REPLACE INTO creature_linked_respawn (guid,linkedGuid) VALUES ('%u','%u')",guid,linkedGuid);
+ WorldDatabase.PExecute("REPLACE INTO creature_linked_respawn (guid,linkedGuid) VALUES ('%u','%u')",guid,linkedGuid);
return true;
}
return false;
@@ -1412,7 +1408,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
if (!goinfo)
return 0;
- Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId));
+ Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(mapId));
if (!map)
return 0;
@@ -1473,7 +1469,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
AddCreatureToGrid(guid, &data);
// Spawn if necessary (loaded grids only)
- if (Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId)))
+ if (Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(mapId)))
{
// We use spawn coords to spawn
if (!map->Instanceable() && map->IsLoaded(data.posX, data.posY))
@@ -1524,7 +1520,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
AddCreatureToGrid(guid, &data);
// Spawn if necessary (loaded grids only)
- if (Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(mapId)))
+ if (Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(mapId)))
{
// We use spawn coords to spawn
if (!map->Instanceable() && !map->IsRemovalGrid(x, y))
@@ -2260,10 +2256,17 @@ void ObjectMgr::LoadItemPrototypes()
const_cast<ItemPrototype*>(proto)->Sheath = SHEATHETYPE_NONE;
}
- if (proto->RandomProperty && !sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(proto->RandomProperty)))
+ if (proto->RandomProperty)
{
- sLog.outErrorDb("Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)",i,proto->RandomProperty);
- const_cast<ItemPrototype*>(proto)->RandomProperty = 0;
+ // To be implemented later
+ if (proto->RandomProperty == -1)
+ const_cast<ItemPrototype*>(proto)->RandomProperty = 0;
+
+ else if (!sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(proto->RandomProperty)))
+ {
+ sLog.outErrorDb("Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)",i,proto->RandomProperty);
+ const_cast<ItemPrototype*>(proto)->RandomProperty = 0;
+ }
}
if (proto->RandomSuffix && !sItemRandomSuffixStore.LookupEntry(GetItemEnchantMod(proto->RandomSuffix)))
@@ -2368,7 +2371,132 @@ void ObjectMgr::LoadItemPrototypes()
}
for (std::set<uint32>::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr)
- sLog.outErrorDb("Item (Entry: %u) not exist in `item_template` but referenced in `CharStartOutfit.dnc`", *itr);
+ sLog.outErrorDb("Item (Entry: %u) not exist in `item_template` but referenced in `CharStartOutfit.dbc`", *itr);
+}
+
+void ObjectMgr::LoadItemSetNameLocales()
+{
+ mItemSetNameLocaleMap.clear(); // need for reload case
+
+ QueryResult_AutoPtr result = WorldDatabase.Query("SELECT `entry`,`name_loc1`,`name_loc2`,`name_loc3`,`name_loc4`,`name_loc5`,`name_loc6`,`name_loc7`,`name_loc8` FROM `locales_item_set_names`");
+
+ if (!result)
+ return;
+
+ barGoLink bar(result->GetRowCount());
+
+ do
+ {
+ Field *fields = result->Fetch();
+ bar.step();
+
+ uint32 entry = fields[0].GetUInt32();
+
+ ItemSetNameLocale& data = mItemSetNameLocaleMap[entry];
+
+ for (uint8 i = 1; i < MAX_LOCALE; ++i)
+ {
+ std::string str = fields[i].GetCppString();
+ if (!str.empty())
+ {
+ int idx = GetOrNewIndexForLocale(LocaleConstant(i));
+ if (idx >= 0)
+ {
+ if (data.Name.size() <= idx)
+ data.Name.resize(idx+1);
+
+ data.Name[idx] = str;
+ }
+ }
+ }
+ } while (result->NextRow());
+
+ sLog.outString();
+ sLog.outString(">> Loaded %lu Item set name locale strings", (uint32)mItemSetNameLocaleMap.size());
+}
+
+void ObjectMgr::LoadItemSetNames()
+{
+ mItemSetNameMap.clear(); // needed for reload case
+
+ QueryResult_AutoPtr result = WorldDatabase.Query("SELECT `entry`,`name`,`InventoryType` FROM `item_set_names`");
+
+ uint32 count = 0;
+ std::set<uint32> itemSetItems;
+
+ // fill item set member ids
+ for (uint32 entryId = 0; entryId < sItemSetStore.GetNumRows(); ++entryId)
+ {
+ ItemSetEntry const* setEntry = sItemSetStore.LookupEntry(entryId);
+ if (!setEntry)
+ continue;
+
+ for (uint32 i = 0; i < MAX_ITEM_SET_ITEMS; ++i)
+ if (setEntry->itemId[i])
+ itemSetItems.insert(setEntry->itemId[i]);
+ }
+
+ if (result)
+ {
+ barGoLink bar(result->GetRowCount());
+ do
+ {
+ Field *fields = result->Fetch();
+ bar.step();
+
+ uint32 entry = fields[0].GetUInt32();
+ if (itemSetItems.find(entry) == itemSetItems.end())
+ {
+ sLog.outErrorDb("Item set name (Entry: %u) not found in ItemSet.dbc, data useless.", entry);
+ continue;
+ }
+
+ ItemSetNameEntry &data = mItemSetNameMap[entry];
+ data.name = fields[1].GetCppString();
+
+ uint32 invType = fields[2].GetUInt32();
+ if (invType >= MAX_INVTYPE)
+ {
+ sLog.outErrorDb("Item set name (Entry: %u) has wrong InventoryType value (%u)", entry, invType);
+ invType = INVTYPE_NON_EQUIP;
+ }
+
+ data.InventoryType = invType;
+ itemSetItems.erase(entry);
+ ++count;
+ } while (result->NextRow());
+ }
+ else
+ {
+ barGoLink bar(1);
+ bar.step();
+
+ sLog.outString();
+ sLog.outErrorDb(">> Loaded 0 item set names. DB table `item_set_names` is empty.");
+ }
+
+ if (!itemSetItems.empty())
+ {
+ ItemPrototype const* pProto;
+ for (std::set<uint32>::iterator itr = itemSetItems.begin(); itr != itemSetItems.end(); ++itr)
+ {
+ uint32 entry = *itr;
+ // add data from item_template if available
+ if (pProto = GetItemPrototype(entry))
+ {
+ sLog.outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry);
+ ItemSetNameEntry &data = mItemSetNameMap[entry];
+ data.name = pProto->Name1;
+ data.InventoryType = pProto->InventoryType;
+ ++count;
+ }
+ else
+ sLog.outErrorDb("Item set part (Entry: %u) does not have entry in `item_set_names`, set will not display properly.", entry);
+ }
+ }
+
+ sLog.outString();
+ sLog.outString(">> Loaded %u item set names", count);
}
void ObjectMgr::LoadVehicleAccessories()
@@ -2462,7 +2590,7 @@ void ObjectMgr::LoadPetLevelInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `pet_levelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in Trinityd.conf) level %u in `pet_levelstats` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `pet_levelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@@ -2535,6 +2663,47 @@ PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level)
return &itr->second[level-1]; // data for level 1 stored in [0] array element, ...
}
+void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count)
+{
+ if (count > 0)
+ playerInfo[race_][class_].item.push_back(PlayerCreateInfoItem(itemId, count));
+ else
+ {
+ if (count < -1)
+ sLog.outErrorDb("Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId);
+
+ uint32 RaceClass = (race_) | (class_ << 8);
+ bool doneOne = false;
+ for (uint32 i = 1; i < sCharStartOutfitStore.GetNumRows(); ++i)
+ {
+ if (CharStartOutfitEntry const* entry = sCharStartOutfitStore.LookupEntry(i))
+ {
+ if (entry->RaceClassGender == RaceClass || entry->RaceClassGender == (RaceClass | (1 << 16)))
+ {
+ bool found = false;
+ for (uint8 x = 0; x < MAX_OUTFIT_ITEMS; ++x)
+ {
+ if (entry->ItemId[x] == itemId)
+ {
+ found = true;
+ const_cast<CharStartOutfitEntry*>(entry)->ItemId[x] = 0;
+ break;
+ }
+ }
+
+ if (!found)
+ sLog.outErrorDb("Item %u specified to be removed from original create info not found in dbc!", itemId);
+
+ if (!doneOne)
+ doneOne = true;
+ else
+ break;
+ }
+ }
+ }
+ }
+}
+
void ObjectMgr::LoadPlayerInfo()
{
// Load playercreate
@@ -2665,8 +2834,6 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- PlayerInfo* pInfo = &playerInfo[current_race][current_class];
-
uint32 item_id = fields[2].GetUInt32();
if (!GetItemPrototype(item_id))
@@ -2675,7 +2842,7 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- uint32 amount = fields[3].GetUInt32();
+ int32 amount = fields[3].GetInt32();
if (!amount)
{
@@ -2683,7 +2850,18 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
- pInfo->item.push_back(PlayerCreateInfoItem(item_id, amount));
+ if (!current_race || !current_class)
+ {
+ uint32 min_race = current_race ? current_race : 1;
+ uint32 max_race = current_race ? current_race + 1 : MAX_RACES;
+ uint32 min_class = current_class ? current_class : 1;
+ uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
+ for (uint32 r = min_race; r < max_race; ++r)
+ for (uint32 c = min_class; c < max_class; ++c)
+ PlayerCreateInfoAddItemHelper(r, c, item_id, amount);
+ }
+ else
+ PlayerCreateInfoAddItemHelper(current_race, current_class, item_id, amount);
bar.step();
++count;
@@ -2849,7 +3027,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_classlevelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in Trinityd.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@@ -2946,7 +3124,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_levelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in Trinityd.conf) level %u in `player_levelstats` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_levelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@@ -3056,7 +3234,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL,current_level);
else
{
- sLog.outDetail("Unused (> MaxPlayerLevel in TrinityCore.conf) level %u in `player_xp_for_levels` table, ignoring.",current_level);
+ sLog.outDetail("Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_xp_for_levels` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@@ -3244,7 +3422,7 @@ void ObjectMgr::LoadGuilds()
!newGuild->LoadMembersFromDB(guildMembersResult) ||
!newGuild->LoadBankRightsFromDB(guildBankTabRightsResult) ||
!newGuild->CheckGuildStructure()
-)
+ )
{
newGuild->Disband();
delete newGuild;
@@ -4638,26 +4816,9 @@ void ObjectMgr::LoadEventScripts()
// Load all possible script entries from gameobjects
for (uint32 i = 1; i < sGOStorage.MaxEntry; ++i)
{
- GameObjectInfo const * goInfo = sGOStorage.LookupEntry<GameObjectInfo>(i);
- if (goInfo)
- {
- switch(goInfo->type)
- {
- case GAMEOBJECT_TYPE_GOOBER:
- if (goInfo->goober.eventId)
- evt_scripts.insert(goInfo->goober.eventId);
- break;
- case GAMEOBJECT_TYPE_CHEST:
- if (goInfo->chest.eventId)
- evt_scripts.insert(goInfo->chest.eventId);
- break;
- case GAMEOBJECT_TYPE_CAMERA:
- if (goInfo->camera.eventID)
- evt_scripts.insert(goInfo->camera.eventID);
- default:
- break;
- }
- }
+ if (GameObjectInfo const * goInfo = sGOStorage.LookupEntry<GameObjectInfo>(i))
+ if (uint32 eventId = goInfo->GetEventScriptId())
+ evt_scripts.insert(eventId);
}
// Load all possible script entries from spells
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
@@ -4676,6 +4837,20 @@ void ObjectMgr::LoadEventScripts()
}
}
+ for(size_t path_idx = 0; path_idx < sTaxiPathNodesByPath.size(); ++path_idx)
+ {
+ for(size_t node_idx = 0; node_idx < sTaxiPathNodesByPath[path_idx].size(); ++node_idx)
+ {
+ TaxiPathNodeEntry const& node = sTaxiPathNodesByPath[path_idx][node_idx];
+
+ if (node.arrivalEventID)
+ evt_scripts.insert(node.arrivalEventID);
+
+ if (node.departureEventID)
+ evt_scripts.insert(node.departureEventID);
+ }
+ }
+
// Then check if all scripts are in above list of possible script entries
for (ScriptMapMap::const_iterator itr = sEventScripts.begin(); itr != sEventScripts.end(); ++itr)
{
@@ -4693,7 +4868,7 @@ void ObjectMgr::LoadWaypointScripts()
for (ScriptMapMap::const_iterator itr = sWaypointScripts.begin(); itr != sWaypointScripts.end(); ++itr)
{
- QueryResult_AutoPtr query = WorldDatabase.PQuery("SELECT * FROM waypoint_scripts WHERE id = %u", itr->first);
+ QueryResult_AutoPtr query = WorldDatabase.PQuery("SELECT * FROM waypoint_data WHERE action = %u", itr->first);
if (!query || !query->GetRowCount())
sLog.outErrorDb("There is no waypoint which links to the waypoint script %u", itr->first);
}
@@ -5307,46 +5482,6 @@ uint32 ObjectMgr::GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt
return mount_id;
}
-void ObjectMgr::GetTaxiPathNodes(uint32 path, Path &pathnodes, std::vector<uint32>& mapIds)
-{
- if (path >= sTaxiPathNodesByPath.size())
- return;
-
- TaxiPathNodeList& nodeList = sTaxiPathNodesByPath[path];
-
- pathnodes.Resize(nodeList.size());
- mapIds.resize(nodeList.size());
-
- for (size_t i = 0; i < nodeList.size(); ++i)
- {
- pathnodes[ i ].x = nodeList[i].x;
- pathnodes[ i ].y = nodeList[i].y;
- pathnodes[ i ].z = nodeList[i].z;
-
- mapIds[i] = nodeList[i].mapid;
- }
-}
-
-void ObjectMgr::GetTransportPathNodes(uint32 path, TransportPath &pathnodes)
-{
- if (path >= sTaxiPathNodesByPath.size())
- return;
-
- TaxiPathNodeList& nodeList = sTaxiPathNodesByPath[path];
-
- pathnodes.Resize(nodeList.size());
-
- for (size_t i = 0; i < nodeList.size(); ++i)
- {
- pathnodes[ i ].mapid = nodeList[i].mapid;
- pathnodes[ i ].x = nodeList[i].x;
- pathnodes[ i ].y = nodeList[i].y;
- pathnodes[ i ].z = nodeList[i].z;
- pathnodes[ i ].actionFlag = nodeList[i].actionFlag;
- pathnodes[ i ].delay = nodeList[i].delay;
- }
-}
-
void ObjectMgr::LoadGraveyardZones()
{
mGraveYardMap.clear(); // need for reload case
@@ -5415,7 +5550,7 @@ void ObjectMgr::LoadGraveyardZones()
WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team)
{
// search for zone associated closest graveyard
- uint32 zoneId = MapManager::Instance().GetZoneId(MapId,x,y,z);
+ uint32 zoneId = sMapMgr.GetZoneId(MapId,x,y,z);
// Simulate std. algorithm:
// found some graveyard associated to (ghost_zone,ghost_map)
@@ -6476,7 +6611,7 @@ void ObjectMgr::LoadCorpses()
continue;
}
- ObjectAccessor::Instance().AddCorpse(corpse);
+ sObjectAccessor.AddCorpse(corpse);
++count;
}
@@ -6488,6 +6623,9 @@ void ObjectMgr::LoadCorpses()
void ObjectMgr::LoadReputationOnKill()
{
+ // For reload case
+ mRepOnKill.clear();
+
uint32 count = 0;
// 0 1 2
@@ -6529,7 +6667,7 @@ void ObjectMgr::LoadReputationOnKill()
if (!GetCreatureTemplate(creature_id))
{
- sLog.outErrorDb("Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped",creature_id);
+ sLog.outErrorDb("Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped", creature_id);
continue;
}
@@ -6538,7 +6676,7 @@ void ObjectMgr::LoadReputationOnKill()
FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(repOnKill.repfaction1);
if (!factionEntry1)
{
- sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`",repOnKill.repfaction1);
+ sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction1);
continue;
}
}
@@ -6548,7 +6686,7 @@ void ObjectMgr::LoadReputationOnKill()
FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(repOnKill.repfaction2);
if (!factionEntry2)
{
- sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`",repOnKill.repfaction2);
+ sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction2);
continue;
}
}
@@ -7953,12 +8091,12 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32> *s
uint32 incrtime = fields[2].GetUInt32();
uint32 ExtendedCost = fields[3].GetUInt32();
- if (!IsVendorItemValid(vendor,item_id,maxcount,incrtime,ExtendedCost,NULL,skip_vendors))
+ if (!IsVendorItemValid(vendor, item_id, maxcount, incrtime, ExtendedCost, NULL, skip_vendors))
continue;
VendorItemData& vList = m_mCacheVendorItemMap[vendor];
- vList.AddItem(item_id,maxcount,incrtime,ExtendedCost);
+ vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
}
@@ -8008,12 +8146,12 @@ void ObjectMgr::LoadVendors()
uint32 incrtime = fields[3].GetUInt32();
uint32 ExtendedCost = fields[4].GetUInt32();
- if (!IsVendorItemValid(entry,item_id,maxcount,incrtime,ExtendedCost,NULL,&skip_vendors))
+ if (!IsVendorItemValid(entry, item_id, maxcount, incrtime, ExtendedCost, NULL, &skip_vendors))
continue;
VendorItemData& vList = m_mCacheVendorItemMap[entry];
- vList.AddItem(item_id,maxcount,incrtime,ExtendedCost);
+ vList.AddItem(item_id, maxcount, incrtime, ExtendedCost);
++count;
}
@@ -8128,7 +8266,7 @@ void ObjectMgr::LoadGossipMenuItems()
QueryResult_AutoPtr result = WorldDatabase.Query(
"SELECT menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, "
"action_menu_id, action_poi_id, action_script_id, box_coded, box_money, box_text "
- "FROM gossip_menu_option");
+ "FROM gossip_menu_option ORDER BY menu_id, id");
if (!result)
{
@@ -8223,9 +8361,10 @@ void ObjectMgr::LoadGossipMenuItems()
void ObjectMgr::AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedcost, bool savetodb)
{
VendorItemData& vList = m_mCacheVendorItemMap[entry];
- vList.AddItem(item,maxcount,incrtime,extendedcost);
+ vList.AddItem(item, maxcount, incrtime, extendedcost);
- if (savetodb) WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%u')",entry, item, maxcount,incrtime,extendedcost);
+ if (savetodb)
+ WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%u')", entry, item, maxcount, incrtime, extendedcost);
}
bool ObjectMgr::RemoveVendorItem(uint32 entry,uint32 item, bool savetodb)
@@ -8273,16 +8412,16 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (pl)
ChatHandler(pl).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
else
- sLog.outErrorDb("Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore",vendor_entry,item_id);
+ sLog.outErrorDb("Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id);
return false;
}
if (ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
{
if (pl)
- ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST,ExtendedCost);
+ ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
else
- sLog.outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,ExtendedCost,vendor_entry);
+ sLog.outErrorDb("Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry);
return false;
}
@@ -8307,7 +8446,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (!vItems)
return true; // later checks for non-empty lists
- if(vItems->FindItemCostPair(item_id,ExtendedCost))
+ if (vItems->FindItemCostPair(item_id, ExtendedCost))
{
if (pl)
ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost);
@@ -8462,40 +8601,6 @@ CreatureInfo const *GetCreatureInfo(uint32 id)
return objmgr.GetCreatureTemplate(id);
}
-void ObjectMgr::LoadTransportEvents()
-{
-
- QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, waypoint_id, event_id FROM transport_events");
-
- if (!result)
- {
- barGoLink bar1(1);
- bar1.step();
- sLog.outString("\n>> Transport events table is empty \n");
- return;
- }
-
- barGoLink bar1(result->GetRowCount());
-
- do
- {
- bar1.step();
-
- Field *fields = result->Fetch();
-
- //Load event values
- uint32 entry = fields[0].GetUInt32();
- uint32 waypoint_id = fields[1].GetUInt32();
- uint32 event_id = fields[2].GetUInt32();
-
- uint32 event_count = (entry*100)+waypoint_id;
- TransportEventMap[event_count] = event_id;
- }
- while (result->NextRow());
-
- sLog.outString("\n>> Loaded %u transport events \n", result->GetRowCount());
-}
-
CreatureInfo const* GetCreatureTemplateStore(uint32 entry)
{
return sCreatureStorage.LookupEntry<CreatureInfo>(entry);
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 79b6ffdd0eb..7b7e0e2bdb9 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -30,16 +30,15 @@
#include "GameObject.h"
#include "Corpse.h"
#include "QuestDef.h"
-#include "Path.h"
#include "ItemPrototype.h"
#include "NPCHandler.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Mail.h"
#include "Map.h"
#include "ObjectAccessor.h"
#include "ObjectDefines.h"
-#include "Policies/Singleton.h"
-#include "Database/SQLStorage.h"
+#include "ace/Singleton.h"
+#include "SQLStorage.h"
#include "Vehicle.h"
#include "ObjectMgr.h"
#include <string>
@@ -60,8 +59,6 @@ extern SQLStorage sInstanceTemplate;
class Group;
class Guild;
class ArenaTeam;
-class Path;
-class TransportPath;
class Item;
struct GameTele
@@ -164,6 +161,7 @@ typedef UNORDERED_MAP<uint32,GameObjectData> GameObjectDataMap;
typedef UNORDERED_MAP<uint32,CreatureLocale> CreatureLocaleMap;
typedef UNORDERED_MAP<uint32,GameObjectLocale> GameObjectLocaleMap;
typedef UNORDERED_MAP<uint32,ItemLocale> ItemLocaleMap;
+typedef UNORDERED_MAP<uint32,ItemSetNameLocale> ItemSetNameLocaleMap;
typedef UNORDERED_MAP<uint32,QuestLocale> QuestLocaleMap;
typedef UNORDERED_MAP<uint32,NpcTextLocale> NpcTextLocaleMap;
typedef UNORDERED_MAP<uint32,PageTextLocale> PageTextLocaleMap;
@@ -356,11 +354,11 @@ class PlayerDumpReader;
class ObjectMgr
{
friend class PlayerDumpReader;
-
+ friend class ACE_Singleton<ObjectMgr, ACE_Null_Mutex>;
+ ObjectMgr();
+ ~ObjectMgr();
+
public:
- ObjectMgr();
- ~ObjectMgr();
-
typedef UNORDERED_MAP<uint32, Item*> ItemMap;
typedef std::set< Group * > GroupSet;
@@ -384,9 +382,7 @@ class ObjectMgr
typedef std::vector<std::string> ScriptNameMap;
- UNORDERED_MAP<uint32, uint32> TransportEventMap;
-
- Player* GetPlayer(const char* name) const { return ObjectAccessor::Instance().FindPlayerByName(name);}
+ Player* GetPlayer(const char* name) const { return sObjectAccessor.FindPlayerByName(name);}
Player* GetPlayer(uint64 guid) const { return ObjectAccessor::FindPlayer(guid); }
static GameObjectInfo const *GetGameObjectInfo(uint32 id) { return sGOStorage.LookupEntry<GameObjectInfo>(id); }
@@ -431,6 +427,14 @@ class ObjectMgr
static ItemPrototype const* GetItemPrototype(uint32 id) { return sItemStorage.LookupEntry<ItemPrototype>(id); }
+ ItemSetNameEntry const* GetItemSetNameEntry(uint32 itemId)
+ {
+ ItemSetNameMap::iterator itr = mItemSetNameMap.find(itemId);
+ if(itr != mItemSetNameMap.end())
+ return &itr->second;
+ return NULL;
+ }
+
static InstanceTemplate const* GetInstanceTemplate(uint32 map)
{
return sInstanceTemplate.LookupEntry<InstanceTemplate>(map);
@@ -464,8 +468,6 @@ class ObjectMgr
uint32 GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 team);
void GetTaxiPath(uint32 source, uint32 destination, uint32 &path, uint32 &cost);
uint32 GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt_team = false);
- void GetTaxiPathNodes(uint32 path, Path &pathnodes, std::vector<uint32>& mapIds);
- void GetTransportPathNodes(uint32 path, TransportPath &pathnodes);
Quest const* GetQuestTemplate(uint32 quest_id) const
{
@@ -585,8 +587,6 @@ class ObjectMgr
void LoadGossipScripts();
void LoadWaypointScripts();
- void LoadTransportEvents();
-
bool LoadTrinityStrings(DatabaseType& db, char const* table, int32 min_value, int32 max_value);
bool LoadTrinityStrings() { return LoadTrinityStrings(WorldDatabase,"trinity_string",MIN_TRINITY_STRING_ID,MAX_TRINITY_STRING_ID); }
void LoadDbScriptStrings();
@@ -607,6 +607,8 @@ class ObjectMgr
void LoadGameobjectRespawnTimes();
void LoadItemPrototypes();
void LoadItemLocales();
+ void LoadItemSetNames();
+ void LoadItemSetNameLocales();
void LoadQuestLocales();
void LoadNpcTextLocales();
void LoadPageTextLocales();
@@ -740,6 +742,12 @@ class ObjectMgr
if (itr == mItemLocaleMap.end()) return NULL;
return &itr->second;
}
+ ItemSetNameLocale const* GetItemSetNameLocale(uint32 entry) const
+ {
+ ItemSetNameLocaleMap::const_iterator itr = mItemSetNameLocaleMap.find(entry);
+ if (itr == mItemSetNameLocaleMap.end())return NULL;
+ return &itr->second;
+ }
QuestLocale const* GetQuestLocale(uint32 entry) const
{
QuestLocaleMap::const_iterator itr = mQuestLocaleMap.find(entry);
@@ -875,7 +883,7 @@ class ObjectMgr
return &iter->second;
}
void AddVendorItem(uint32 entry,uint32 item, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, bool savetodb = true); // for event
- bool RemoveVendorItem(uint32 entry,uint32 item, bool savetodb = true); // for event
+ bool RemoveVendorItem(uint32 entry, uint32 item, bool savetodb = true); // for event
bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const;
void LoadScriptNames();
@@ -1018,6 +1026,7 @@ class ObjectMgr
void LoadCreatureAddons(SQLStorage& creatureaddons, char const* entryName, char const* comment);
void ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const* table, char const* guidEntryStr);
void LoadQuestRelationsHelper(QuestRelations& map,char const* table);
+ void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count);
MailLevelRewardMap m_mailLevelRewardMap;
@@ -1045,6 +1054,9 @@ class ObjectMgr
HalfNameMap PetHalfName0;
HalfNameMap PetHalfName1;
+ typedef UNORDERED_MAP<uint32, ItemSetNameEntry> ItemSetNameMap;
+ ItemSetNameMap mItemSetNameMap;
+
MapObjectGuids mMapObjectGuids;
CreatureDataMap mCreatureDataMap;
CreatureLinkedRespawnMap mCreatureLinkedRespawnMap;
@@ -1052,6 +1064,7 @@ class ObjectMgr
GameObjectDataMap mGameObjectDataMap;
GameObjectLocaleMap mGameObjectLocaleMap;
ItemLocaleMap mItemLocaleMap;
+ ItemSetNameLocaleMap mItemSetNameLocaleMap;
QuestLocaleMap mQuestLocaleMap;
NpcTextLocaleMap mNpcTextLocaleMap;
PageTextLocaleMap mPageTextLocaleMap;
@@ -1070,7 +1083,7 @@ class ObjectMgr
};
-#define objmgr Trinity::Singleton<ObjectMgr>::Instance()
+#define objmgr (*ACE_Singleton<ObjectMgr, ACE_Null_Mutex>::instance())
// scripting access functions
bool LoadTrinityStrings(DatabaseType& db, char const* table,int32 start_value = MAX_CREATURE_AI_TEXT_STRING_ID, int32 end_value = std::numeric_limits<int32>::min());
diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h
index 49e0329ace6..4bc08e3b1b9 100644
--- a/src/server/game/Grids/Cells/Cell.h
+++ b/src/server/game/Grids/Cells/Cell.h
@@ -23,8 +23,8 @@
#include <cmath>
-#include "GameSystem/TypeContainer.h"
-#include "GameSystem/TypeContainerVisitor.h"
+#include "TypeContainer.h"
+#include "TypeContainerVisitor.h"
#include "GridDefines.h"
diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h
index 65bf3c92f9d..2e300ac5e38 100644
--- a/src/server/game/Grids/Grid.h
+++ b/src/server/game/Grids/Grid.h
@@ -32,8 +32,7 @@
Grid's perspective, the loader meets its API requirement is suffice.
*/
-#include "Platform/Define.h"
-#include "Policies/ThreadingModel.h"
+#include "Define.h"
#include "TypeContainer.h"
#include "TypeContainerVisitor.h"
@@ -44,8 +43,7 @@ template
<
class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
-class GRID_OBJECT_TYPES,
-class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT>
+class GRID_OBJECT_TYPES
>
class Grid
{
@@ -131,9 +129,6 @@ class Grid
}*/
private:
- typedef typename ThreadModel::Lock Guard;
- typedef typename ThreadModel::VolatileType VolatileType;
-
TypeMapContainer<GRID_OBJECT_TYPES> i_container;
TypeMapContainer<WORLD_OBJECT_TYPES> i_objects;
//typedef std::set<void*> ActiveGridObjects;
diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h
index 5269d0a094d..620b8dd2a03 100644
--- a/src/server/game/Grids/GridDefines.h
+++ b/src/server/game/Grids/GridDefines.h
@@ -22,7 +22,7 @@
#define TRINITY_GRIDDEFINES_H
#include "Common.h"
-#include "GameSystem/NGrid.h"
+#include "NGrid.h"
#include <cmath>
// Forward class definitions
@@ -42,7 +42,7 @@ class Player;
#define CENTER_GRID_OFFSET (SIZE_OF_GRIDS/2)
-#define MIN_GRID_DELAY (MINUTE*IN_MILISECONDS)
+#define MIN_GRID_DELAY (MINUTE*IN_MILLISECONDS)
#define MIN_MAP_UPDATE_DELAY 50
#define SIZE_OF_GRID_CELL (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)
diff --git a/src/server/game/Grids/GridLoader.h b/src/server/game/Grids/GridLoader.h
index 03fa0f5b813..ca80451e023 100644
--- a/src/server/game/Grids/GridLoader.h
+++ b/src/server/game/Grids/GridLoader.h
@@ -32,7 +32,7 @@
GridLoader manages the grid (both local and remote).
*/
-#include "Platform/Define.h"
+#include "Define.h"
#include "Grid.h"
#include "TypeContainerVisitor.h"
diff --git a/src/server/game/Grids/GridRefManager.h b/src/server/game/Grids/GridRefManager.h
index 79799105fb7..44a6c9b802c 100644
--- a/src/server/game/Grids/GridRefManager.h
+++ b/src/server/game/Grids/GridRefManager.h
@@ -21,7 +21,7 @@
#ifndef _GRIDREFMANAGER
#define _GRIDREFMANAGER
-#include "Utilities/LinkedReference/RefManager.h"
+#include "RefManager.h"
template<class OBJECT>
class GridReference;
diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h
index d2e3a455895..0f5b46b4950 100644
--- a/src/server/game/Grids/GridReference.h
+++ b/src/server/game/Grids/GridReference.h
@@ -21,7 +21,7 @@
#ifndef _GRIDREFERENCE_H
#define _GRIDREFERENCE_H
-#include "Utilities/LinkedReference/Reference.h"
+#include "LinkedReference/Reference.h"
template<class OBJECT>
class GridRefManager;
diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp
index 9d39531cfad..0f725539d00 100644
--- a/src/server/game/Grids/GridStates.cpp
+++ b/src/server/game/Grids/GridStates.cpp
@@ -20,7 +20,7 @@
#include "GridStates.h"
#include "GridNotifiers.h"
-#include "GameSystem/Grid.h"
+#include "Grid.h"
#include "Log.h"
void
diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h
index 3810286e123..1411ac71c4a 100644
--- a/src/server/game/Grids/NGrid.h
+++ b/src/server/game/Grids/NGrid.h
@@ -24,8 +24,8 @@
/** NGrid is nothing more than a wrapper of the Grid with an NxN cells
*/
-#include "GameSystem/Grid.h"
-#include "GameSystem/GridReference.h"
+#include "Grid.h"
+#include "GridReference.h"
#include "Timer.h"
#include "Util.h"
@@ -74,14 +74,13 @@ template
unsigned int N,
class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
-class GRID_OBJECT_TYPES,
-class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT>
+class GRID_OBJECT_TYPES
>
class NGrid
{
public:
- typedef Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES, ThreadModel> GridType;
+ typedef Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> GridType;
NGrid(uint32 id, int32 x, int32 y, time_t expiry, bool unload = true)
: i_gridId(id), i_x(x), i_y(y), i_cellstate(GRID_STATE_INVALID), i_GridObjectDataLoaded(false)
{
@@ -109,7 +108,7 @@ class NGrid
int32 getX() const { return i_x; }
int32 getY() const { return i_y; }
- void link(GridRefManager<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES, ThreadModel> >* pTo)
+ void link(GridRefManager<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> >* pTo)
{
i_Reference.link(pTo, this);
}
@@ -178,7 +177,7 @@ class NGrid
uint32 i_gridId;
GridInfo i_GridInfo;
- GridReference<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES, ThreadModel> > i_Reference;
+ GridReference<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> > i_Reference;
int32 i_x;
int32 i_y;
grid_state_t i_cellstate;
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
index b10dfa8791e..88d17b0286f 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp
@@ -25,7 +25,7 @@
#include "UpdateData.h"
#include "Item.h"
#include "Map.h"
-#include "Transports.h"
+#include "Transport.h"
#include "ObjectAccessor.h"
#include "CellImpl.h"
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index ab69d9a966b..f0da10975ac 100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -151,7 +151,7 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType
uint32 player_guid = itr->first;
- Corpse *obj = ObjectAccessor::Instance().GetCorpseForPlayerGUID(player_guid);
+ Corpse *obj = sObjectAccessor.GetCorpseForPlayerGUID(player_guid);
if (!obj)
continue;
diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h
index e890bf8d482..c1a59cb4ecb 100644
--- a/src/server/game/Grids/ObjectGridLoader.h
+++ b/src/server/game/Grids/ObjectGridLoader.h
@@ -21,9 +21,9 @@
#ifndef TRINITY_OBJECTGRIDLOADER_H
#define TRINITY_OBJECTGRIDLOADER_H
-#include "Utilities/TypeList.h"
-#include "Platform/Define.h"
-#include "GameSystem/GridLoader.h"
+#include "TypeList.h"
+#include "Define.h"
+#include "GridLoader.h"
#include "GridDefines.h"
#include "Cell.h"
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index acd19e02838..614c6a45143 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -79,8 +79,7 @@ Group::~Group()
itr2->second.save->RemoveGroup(this);
// Sub group counters clean up
- if (m_subGroupsCounts)
- delete[] m_subGroupsCounts;
+ delete[] m_subGroupsCounts;
}
bool Group::Create(const uint64 &guid, const char * name)
@@ -486,13 +485,6 @@ void Group::Disband(bool hideDestroy)
CharacterDatabase.CommitTransaction();
ResetInstances(INSTANCE_RESET_GROUP_DISBAND, false, NULL);
ResetInstances(INSTANCE_RESET_GROUP_DISBAND, true, NULL);
- // FIXME - Safe check! Debug purposes - Will remove after a time if got no reports
- QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT COUNT(1) FROM group_instance WHERE guid=%u", lowguid);
- if (result)
- {
- sLog.outError("Group::Disband: %u instances are not being properly deleted from group %u", (*result)[0].GetUInt8(), lowguid);
- CharacterDatabase.PExecute("DELETE FROM group_instance WHERE guid=%u", lowguid);
- }
}
m_guid = 0;
@@ -1200,7 +1192,7 @@ bool Group::_addMember(const uint64 &guid, const char* name)
if (m_subGroupsCounts)
{
bool groupFound = false;
- for (; groupid < MAXRAIDSIZE/MAXGROUPSIZE; ++groupid)
+ for (; groupid < MAX_RAID_SUBGROUPS; ++groupid)
{
if (m_subGroupsCounts[groupid] < MAXGROUPSIZE)
{
@@ -1453,17 +1445,20 @@ void Group::ChangeMembersGroup(const uint64 &guid, const uint8 &group)
{
if (!isRaidGroup())
return;
+
Player *player = objmgr.GetPlayer(guid);
if (!player)
{
- uint8 prevSubGroup;
- prevSubGroup = GetMemberGroup(guid);
-
- SubGroupCounterDecrease(prevSubGroup);
+ uint8 prevSubGroup = GetMemberGroup(guid);
+ if (prevSubGroup == group)
+ return;
if (_setMembersGroup(guid, group))
+ {
+ SubGroupCounterDecrease(prevSubGroup);
SendUpdate();
+ }
}
else
// This methods handles itself groupcounter decrease
@@ -1475,9 +1470,13 @@ void Group::ChangeMembersGroup(Player *player, const uint8 &group)
{
if (!player || !isRaidGroup())
return;
+
+ uint8 prevSubGroup = player->GetSubGroup();
+ if (prevSubGroup == group)
+ return;
+
if (_setMembersGroup(player->GetGUID(), group))
{
- uint8 prevSubGroup = player->GetSubGroup();
if (player->GetGroup() == this)
player->GetGroupRef().setSubGroup(group);
//if player is in BG raid, it is possible that he is also in normal raid - and that normal raid is stored in m_originalGroup reference
@@ -1725,7 +1724,7 @@ void Group::ResetInstances(uint8 method, bool isRaid, Player* SendMsgTo)
bool isEmpty = true;
// if the map is loaded, reset it
- Map *map = MapManager::Instance().FindMap(p->GetMapId(), p->GetInstanceId());
+ Map *map = sMapMgr.FindMap(p->GetMapId(), p->GetInstanceId());
if (map && map->IsDungeon() && !(method == INSTANCE_RESET_GROUP_DISBAND && !p->CanReset()))
{
if (p->CanReset())
@@ -1761,34 +1760,39 @@ InstanceGroupBind* Group::GetBoundInstance(Player* player)
{
uint32 mapid = player->GetMapId();
MapEntry const* mapEntry = sMapStore.LookupEntry(mapid);
- if (!mapEntry)
- return NULL;
+ return GetBoundInstance(mapEntry);
+}
- Difficulty difficulty = player->GetDifficulty(mapEntry->IsRaid());
+InstanceGroupBind* Group::GetBoundInstance(Map* aMap)
+{
+ // Currently spawn numbering not different from map difficulty
+ Difficulty difficulty = GetDifficulty(aMap->IsRaid());
// some instances only have one difficulty
- MapDifficulty const* mapDiff = GetMapDifficultyData(mapid,difficulty);
+ MapDifficulty const* mapDiff = GetMapDifficultyData(aMap->GetId(),difficulty);
if (!mapDiff)
- difficulty = DUNGEON_DIFFICULTY_NORMAL;
+ return NULL;
- BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapid);
+ BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(aMap->GetId());
if (itr != m_boundInstances[difficulty].end())
return &itr->second;
else
return NULL;
}
-InstanceGroupBind* Group::GetBoundInstance(Map* aMap)
+InstanceGroupBind* Group::GetBoundInstance(MapEntry const* mapEntry)
{
- // Currently spawn numbering not different from map difficulty
- Difficulty difficulty = GetDifficulty(aMap->IsRaid());
-
+ if (!mapEntry)
+ return NULL;
+
+ Difficulty difficulty = GetDifficulty(mapEntry->IsRaid());
+
// some instances only have one difficulty
- MapDifficulty const* mapDiff = GetMapDifficultyData(aMap->GetId(),difficulty);
+ MapDifficulty const* mapDiff = GetMapDifficultyData(mapEntry->MapID,difficulty);
if (!mapDiff)
- return NULL;
-
- BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(aMap->GetId());
+ difficulty = DUNGEON_DIFFICULTY_NORMAL;
+
+ BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapEntry->MapID);
if (itr != m_boundInstances[difficulty].end())
return &itr->second;
else
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index 808de417b79..2b93b7b1d6e 100644
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -33,6 +33,7 @@
#define MAXGROUPSIZE 5
#define MAXRAIDSIZE 40
+#define MAX_RAID_SUBGROUPS MAXRAIDSIZE/MAXGROUPSIZE
#define TARGETICONCOUNT 8
enum RollVote
@@ -260,7 +261,7 @@ class Group
{
member_citerator mslot = _getMemberCSlot(guid);
if (mslot == m_memberSlots.end())
- return (MAXRAIDSIZE/MAXGROUPSIZE+1);
+ return (MAX_RAID_SUBGROUPS+1);
return mslot->group;
}
@@ -357,6 +358,7 @@ class Group
void UnbindInstance(uint32 mapid, uint8 difficulty, bool unload = false);
InstanceGroupBind* GetBoundInstance(Player* player);
InstanceGroupBind* GetBoundInstance(Map* aMap);
+ InstanceGroupBind* GetBoundInstance(MapEntry const* mapEntry);
BoundInstancesMap& GetBoundInstances(Difficulty difficulty) { return m_boundInstances[difficulty]; }
// FG: evil hacks
@@ -381,9 +383,9 @@ class Group
{
// Sub group counters initialization
if (!m_subGroupsCounts)
- m_subGroupsCounts = new uint8[MAXRAIDSIZE / MAXGROUPSIZE];
+ m_subGroupsCounts = new uint8[MAX_RAID_SUBGROUPS];
- memset((void*)m_subGroupsCounts, 0, (MAXRAIDSIZE / MAXGROUPSIZE)*sizeof(uint8));
+ memset((void*)m_subGroupsCounts, 0, (MAX_RAID_SUBGROUPS)*sizeof(uint8));
for (member_citerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
++m_subGroupsCounts[itr->group];
diff --git a/src/server/game/Groups/GroupRefManager.h b/src/server/game/Groups/GroupRefManager.h
index 4fdeba2dd8c..19c4c8122c1 100644
--- a/src/server/game/Groups/GroupRefManager.h
+++ b/src/server/game/Groups/GroupRefManager.h
@@ -21,7 +21,7 @@
#ifndef _GROUPREFMANAGER
#define _GROUPREFMANAGER
-#include "Utilities/LinkedReference/RefManager.h"
+#include "RefManager.h"
class Group;
class Player;
diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h
index 76f54c5230f..56dc5a3375f 100644
--- a/src/server/game/Groups/GroupReference.h
+++ b/src/server/game/Groups/GroupReference.h
@@ -21,7 +21,7 @@
#ifndef _GROUPREFERENCE_H
#define _GROUPREFERENCE_H
-#include "Utilities/LinkedReference/Reference.h"
+#include "LinkedReference/Reference.h"
class Group;
class Player;
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 418e409998f..f1f3187bc32 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "Player.h"
@@ -30,7 +30,7 @@
#include "Util.h"
#include "Language.h"
#include "World.h"
-#include "Config/ConfigEnv.h"
+#include "ConfigEnv.h"
Guild::Guild()
{
diff --git a/src/server/game/Instances/InstanceData.cpp b/src/server/game/Instances/InstanceData.cpp
index 214c5ca2327..7408efe97e5 100644
--- a/src/server/game/Instances/InstanceData.cpp
+++ b/src/server/game/Instances/InstanceData.cpp
@@ -19,7 +19,7 @@
*/
#include "InstanceData.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Map.h"
#include "Player.h"
#include "GameObject.h"
@@ -43,7 +43,7 @@ void InstanceData::HandleGameObject(uint64 GUID, bool open, GameObject *go)
if (go)
go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
else
- debug_log("TSCR: InstanceData: HandleGameObject failed");
+ sLog.outDebug("TSCR: InstanceData: HandleGameObject failed");
}
bool InstanceData::IsEncounterInProgress() const
@@ -263,7 +263,7 @@ void InstanceData::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, bo
pGo->ResetDoorOrButton();
}
else
- error_log("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType());
+ sLog.outError("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType());
}
}
@@ -294,7 +294,7 @@ void InstanceData::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
pPlayer->SendUpdateWorldState(uiStateId, uiStateData);
}
else
- debug_log("TSCR: DoUpdateWorldState attempt send data but no players in map.");
+ sLog.outDebug("TSCR: DoUpdateWorldState attempt send data but no players in map.");
}
// Send Notify to all players in instance
@@ -318,7 +318,7 @@ void InstanceData::DoCompleteAchievement(uint32 achievement)
if (!pAE)
{
- error_log("TSCR: DoCompleteAchievement called for not existing achievement %u", achievement);
+ sLog.outError("TSCR: DoCompleteAchievement called for not existing achievement %u", achievement);
return;
}
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index d67364966d6..dd9001402a0 100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
@@ -20,8 +20,7 @@
*/
#include "Common.h"
-#include "Database/SQLStorage.h"
-
+#include "SQLStorage.h"
#include "Player.h"
#include "GridNotifiers.h"
#include "Log.h"
@@ -33,21 +32,14 @@
#include "InstanceSaveMgr.h"
#include "Timer.h"
#include "GridNotifiersImpl.h"
-#include "Config/ConfigEnv.h"
-#include "Transports.h"
+#include "ConfigEnv.h"
+#include "Transport.h"
#include "ObjectMgr.h"
#include "World.h"
#include "Group.h"
#include "InstanceData.h"
#include "ProgressBar.h"
-#include "Policies/Singleton.h"
-#include "Policies/SingletonImp.h"
-
-INSTANTIATE_SINGLETON_1(InstanceSaveManager);
-InstanceSaveManager::InstanceSaveManager() : lock_instLists(false)
-{
-}
InstanceSaveManager::~InstanceSaveManager()
{
@@ -173,7 +165,7 @@ void InstanceSave::SaveToDB()
// save instance data too
std::string data;
- Map *map = MapManager::Instance().FindMap(GetMapId(),m_instanceid);
+ Map *map = sMapMgr.FindMap(GetMapId(),m_instanceid);
if (map)
{
assert(map->IsDungeon());
@@ -251,7 +243,7 @@ void InstanceSaveManager::_DelHelper(DatabaseType &db, const char *fields, const
db.escape_string(fieldValue);
ss << (i != 0 ? " AND " : "") << fieldTokens[i] << " = '" << fieldValue << "'";
}
- db.DirectPExecute("DELETE FROM %s WHERE %s", table, ss.str().c_str());
+ db.PExecute("DELETE FROM %s WHERE %s", table, ss.str().c_str());
} while (result->NextRow());
}
}
@@ -297,7 +289,7 @@ void InstanceSaveManager::CleanupInstances()
{
Field *fields = result->Fetch();
if (InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
- WorldDatabase.DirectPExecute("DELETE FROM creature_respawn WHERE instance = '%u'", fields[0].GetUInt32());
+ WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE instance = '%u'", fields[0].GetUInt32());
}
while (result->NextRow());
}
@@ -310,7 +302,7 @@ void InstanceSaveManager::CleanupInstances()
{
Field *fields = result->Fetch();
if (InstanceSet.find(fields[0].GetUInt32()) == InstanceSet.end())
- WorldDatabase.DirectPExecute("DELETE FROM gameobject_respawn WHERE instance = '%u'", fields[0].GetUInt32());
+ WorldDatabase.PExecute("DELETE FROM gameobject_respawn WHERE instance = '%u'", fields[0].GetUInt32());
}
while (result->NextRow());
}
@@ -441,7 +433,7 @@ void InstanceSaveManager::LoadResetTimes()
InstResetTimeMapDiffType::iterator itr = instResetTime.find(instance);
if (itr != instResetTime.end() && itr->second.second != resettime)
{
- CharacterDatabase.DirectPExecute("UPDATE instance SET resettime = '"UI64FMTD"' WHERE id = '%u'", uint64(resettime), instance);
+ CharacterDatabase.PExecute("UPDATE instance SET resettime = '"UI64FMTD"' WHERE id = '%u'", uint64(resettime), instance);
itr->second.second = resettime;
}
}
@@ -470,14 +462,14 @@ void InstanceSaveManager::LoadResetTimes()
if (!mapDiff)
{
sLog.outError("InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty);
- CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid,difficulty);
+ CharacterDatabase.PExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid,difficulty);
continue;
}
// update the reset time if the hour in the configs changes
uint64 newresettime = (oldresettime / DAY) * DAY + diff;
if (oldresettime != newresettime)
- CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty = '%u'", newresettime, mapid, difficulty);
+ CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty = '%u'", newresettime, mapid, difficulty);
SetResetTimeFor(mapid,difficulty,newresettime);
} while (result->NextRow());
@@ -508,7 +500,7 @@ void InstanceSaveManager::LoadResetTimes()
{
// initialize the reset time
t = today + period + diff;
- CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u','%u','"UI64FMTD"')", mapid, difficulty, (uint64)t);
+ CharacterDatabase.PExecute("INSERT INTO instance_reset VALUES ('%u','%u','"UI64FMTD"')", mapid, difficulty, (uint64)t);
}
if (t < now)
@@ -517,7 +509,7 @@ void InstanceSaveManager::LoadResetTimes()
// calculate the next reset time
t = (t / DAY) * DAY;
t += ((today - t) / period + 1) * period + diff;
- CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty);
+ CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty);
}
SetResetTimeFor(mapid,difficulty,t);
@@ -615,7 +607,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
{
sLog.outDebug("InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
- Map *map = (MapInstanced*)MapManager::Instance().CreateBaseMap(mapid);
+ Map *map = (MapInstanced*)sMapMgr.CreateBaseMap(mapid);
if (!map->Instanceable())
return;
@@ -679,7 +671,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
}
// note: this isn't fast but it's meant to be executed very rarely
- Map const *map = MapManager::Instance().CreateBaseMap(mapid); // _not_ include difficulty
+ Map const *map = sMapMgr.CreateBaseMap(mapid); // _not_ include difficulty
MapInstanced::InstancedMaps &instMaps = ((MapInstanced*)map)->GetInstancedMaps();
MapInstanced::InstancedMaps::iterator mitr;
for (mitr = instMaps.begin(); mitr != instMaps.end(); ++mitr)
diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h
index 91cd3d9ebe6..66751cc4f10 100644
--- a/src/server/game/Instances/InstanceSaveMgr.h
+++ b/src/server/game/Instances/InstanceSaveMgr.h
@@ -22,13 +22,13 @@
#ifndef __InstanceSaveMgr_H
#define __InstanceSaveMgr_H
-#include "Platform/Define.h"
-#include "Policies/Singleton.h"
+#include "Define.h"
+#include "ace/Singleton.h"
#include "ace/Thread_Mutex.h"
#include <list>
#include <map>
-#include "Utilities/UnorderedMap.h"
-#include "Database/DatabaseEnv.h"
+#include "UnorderedMap.h"
+#include "DatabaseEnv.h"
#include "DBCEnums.h"
#include "ObjectDefines.h"
@@ -117,13 +117,14 @@ class InstanceSave
typedef UNORDERED_MAP<uint32 /*PAIR32(map,difficulty)*/,time_t /*resetTime*/> ResetTimeByMapDifficultyMap;
-class InstanceSaveManager : public Trinity::Singleton<InstanceSaveManager, Trinity::ClassLevelLockable<InstanceSaveManager, ACE_Thread_Mutex> >
+class InstanceSaveManager
{
+ friend class ACE_Singleton<InstanceSaveManager, ACE_Null_Mutex>;
friend class InstanceSave;
public:
- InstanceSaveManager();
+ InstanceSaveManager() : lock_instLists(false) {};
~InstanceSaveManager();
-
+
typedef UNORDERED_MAP<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap;
typedef UNORDERED_MAP<uint32 /*mapId*/, InstanceSaveHashMap> InstanceSaveMapMap;
@@ -176,6 +177,7 @@ class InstanceSaveManager : public Trinity::Singleton<InstanceSaveManager, Trini
uint32 GetNumBoundGroupsTotal();
private:
+
void _ResetOrWarnAll(uint32 mapid, Difficulty difficulty, bool warn, uint32 timeleft);
void _ResetInstance(uint32 mapid, uint32 instanceId);
void _ResetSave(InstanceSaveHashMap::iterator &itr);
@@ -189,5 +191,5 @@ class InstanceSaveManager : public Trinity::Singleton<InstanceSaveManager, Trini
ResetTimeQueue m_resetTimeQueue;
};
-#define sInstanceSaveManager Trinity::Singleton<InstanceSaveManager>::Instance()
+#define sInstanceSaveManager (*ACE_Singleton<InstanceSaveManager, ACE_Thread_Mutex>::instance())
#endif
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 2137c8872b5..77b7f08fd5a 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -188,7 +188,6 @@ bool LootStore::HaveQuestLootForPlayer(uint32 loot_id,Player* player) const
void LootStore::ResetConditions()
{
- LootTemplateMap m_LootTemplates;
for (LootTemplateMap::iterator itr = m_LootTemplates.begin(); itr != m_LootTemplates.end(); ++itr)
{
ConditionList empty;
@@ -969,11 +968,11 @@ void LootTemplate::LootGroup::CopyConditions(ConditionList conditions)
{
for (LootStoreItemList::iterator i = ExplicitlyChanced.begin(); i != ExplicitlyChanced.end(); ++i)
{
- i->conditions = conditions;
+ i->conditions.clear();
}
for (LootStoreItemList::iterator i = EqualChanced.begin(); i != EqualChanced.end(); ++i)
{
- i->conditions = conditions;
+ i->conditions.clear();
}
}
@@ -1146,7 +1145,7 @@ void LootTemplate::AddEntry(LootStoreItem& item)
void LootTemplate::CopyConditions(ConditionList conditions)
{
for (LootStoreItemList::iterator i = Entries.begin(); i != Entries.end(); ++i)
- i->conditions = conditions;
+ i->conditions.clear();
for (LootGroups::iterator i = Groups.begin(); i != Groups.end(); ++i)
i->CopyConditions(conditions);
@@ -1197,8 +1196,6 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, bool rate, uint16
if (!Referenced)
continue; // Error message already printed at loading stage
- const_cast<LootTemplate*>(Referenced)->CopyConditions(i->conditions);//copy conditions from referer template
-
for (uint32 loop = 0; loop < i->maxcount; ++loop) // Ref multiplicator
Referenced->Process(loot, store, rate, lootMode, i->group);
}
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index 65fe3de22e1..00fe2a97888 100644
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -23,7 +23,7 @@
#include "ItemEnchantmentMgr.h"
#include "ByteBuffer.h"
-#include "Utilities/LinkedReference/RefManager.h"
+#include "RefManager.h"
#include "SharedDefines.h"
#include "ConditionMgr.h"
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 847009b83dc..77f971bf4d0 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -375,8 +375,8 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction();
pl->RemoveMail(mailId);
- // send back only to players and simple drop for other cases
- if (m->messageType == MAIL_NORMAL)
+ // only return mail if the player exists (and delete if not existing)
+ if (m->messageType == MAIL_NORMAL && m->sender)
{
MailDraft draft(m->subject, m->body);
if (m->mailTemplateId)
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 11bfdcd6f99..6c9b505d6c9 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -28,8 +28,8 @@
#include "InstanceData.h"
#include "Map.h"
#include "GridNotifiersImpl.h"
-#include "Config/ConfigEnv.h"
-#include "Transports.h"
+#include "ConfigEnv.h"
+#include "Transport.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "World.h"
@@ -94,10 +94,9 @@ bool Map::ExistMap(uint32 mapid,int gx,int gy)
map_fileheader header;
fread(&header, sizeof(header), 1, pf);
- if (header.mapMagic != uint32(MAP_MAGIC) ||
- header.versionMagic != uint32(MAP_VERSION_MAGIC))
+ if (header.mapMagic != uint32(MAP_MAGIC) || header.versionMagic != uint32(MAP_VERSION_MAGIC))
{
- sLog.outError("Map file '%s' is non-compatible version (outdated?). Please, create new using ad.exe program.",tmp);
+ sLog.outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.",tmp);
delete [] tmp;
fclose(pf); //close file before return
return false;
@@ -114,7 +113,6 @@ bool Map::ExistVMap(uint32 mapid,int gx,int gy)
{
if (vmgr->isMapLoadingEnabled())
{
- // x and y are swapped !! => fixed now
bool exists = vmgr->existsMap((sWorld.GetDataPath()+ "vmaps").c_str(), mapid, gx,gy);
if (!exists)
{
@@ -326,7 +324,7 @@ void Map::DeleteFromWorld(T* obj)
template<>
void Map::DeleteFromWorld(Player* pl)
{
- ObjectAccessor::Instance().RemoveObject(pl);
+ sObjectAccessor.RemoveObject(pl);
delete pl;
}
@@ -335,7 +333,7 @@ Map::EnsureGridCreated(const GridPair &p)
{
if (!getNGrid(p.x_coord, p.y_coord))
{
- Guard guard(*this);
+ ACE_GUARD(ACE_Thread_Mutex, Guard, Lock);
if (!getNGrid(p.x_coord, p.y_coord))
{
sLog.outDebug("Creating grid[%u,%u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
@@ -396,7 +394,7 @@ bool Map::EnsureGridLoaded(const Cell &cell)
loader.LoadN();
// Add resurrectable corpses to world object list in grid
- ObjectAccessor::Instance().AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this);
+ sObjectAccessor.AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this);
setGridObjectDataLoaded(true,cell.GridX(), cell.GridY());
return true;
@@ -829,7 +827,7 @@ bool Map::RemoveBones(uint64 guid, float x, float y)
{
if (IsRemovalGrid(x, y))
{
- Corpse * corpse = ObjectAccessor::Instance().GetObjectInWorld(GetId(), x, y, guid, (Corpse*)NULL);
+ Corpse * corpse = sObjectAccessor.GetObjectInWorld(GetId(), x, y, guid, (Corpse*)NULL);
if (corpse && corpse->GetTypeId() == TYPEID_CORPSE && corpse->GetType() == CORPSE_BONES)
corpse->DeleteBonesFromWorld();
else
@@ -1209,8 +1207,7 @@ bool GridMap::loadData(char *filename)
if (!in)
return true;
fread(&header, sizeof(header),1,in);
- if (header.mapMagic == uint32(MAP_MAGIC) &&
- header.versionMagic == uint32(MAP_VERSION_MAGIC))
+ if (header.mapMagic == uint32(MAP_MAGIC) && header.versionMagic == uint32(MAP_VERSION_MAGIC))
{
// loadup area data
if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize))
@@ -1236,18 +1233,18 @@ bool GridMap::loadData(char *filename)
fclose(in);
return true;
}
- sLog.outError("Map file '%s' is a non-compatible version (outdated?). Please, create new using the ad.exe program.", filename);
+ sLog.outError("Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename);
fclose(in);
return false;
}
void GridMap::unloadData()
{
- if (m_area_map) delete[] m_area_map;
- if (m_V9) delete[] m_V9;
- if (m_V8) delete[] m_V8;
- if (m_liquid_type) delete[] m_liquid_type;
- if (m_liquid_map) delete[] m_liquid_map;
+ delete[] m_area_map;
+ delete[] m_V9;
+ delete[] m_V8;
+ delete[] m_liquid_type;
+ delete[] m_liquid_map;
m_area_map = NULL;
m_V9 = NULL;
m_V8 = NULL;
@@ -2071,7 +2068,7 @@ void Map::SendInitSelf(Player * player)
void Map::SendInitTransports(Player * player)
{
// Hack to send out transports
- MapManager::TransportMap& tmap = MapManager::Instance().m_TransportsByMap;
+ MapManager::TransportMap& tmap = sMapMgr.m_TransportsByMap;
// no transports at map
if (tmap.find(player->GetMapId()) == tmap.end())
@@ -2098,7 +2095,7 @@ void Map::SendInitTransports(Player * player)
void Map::SendRemoveTransports(Player * player)
{
// Hack to send out transports
- MapManager::TransportMap& tmap = MapManager::Instance().m_TransportsByMap;
+ MapManager::TransportMap& tmap = sMapMgr.m_TransportsByMap;
// no transports at map
if (tmap.find(player->GetMapId()) == tmap.end())
@@ -2198,7 +2195,7 @@ void Map::RemoveAllObjectsInRemoveList()
{
case TYPEID_CORPSE:
{
- Corpse* corpse = ObjectAccessor::Instance().GetCorpse(*obj, obj->GetGUID());
+ Corpse* corpse = sObjectAccessor.GetCorpse(*obj, obj->GetGUID());
if (!corpse)
sLog.outError("Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow());
else
@@ -2352,11 +2349,8 @@ InstanceMap::InstanceMap(uint32 id, time_t expiry, uint32 InstanceId, uint8 Spaw
InstanceMap::~InstanceMap()
{
- if (i_data)
- {
- delete i_data;
- i_data = NULL;
- }
+ delete i_data;
+ i_data = NULL;
}
void InstanceMap::InitVisibilityDistance()
@@ -2400,6 +2394,32 @@ bool InstanceMap::CanEnter(Player *player)
return false;
}
+ // cannot enter if instance is in use by another party/soloer that have a
+ // permanent save in the same instance id
+
+ PlayerList const &playerList = GetPlayers();
+ Player *firstInsidePlayer = NULL;
+
+ if (!playerList.isEmpty())
+ for (PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i)
+ if (Player *iPlayer = i->getSource())
+ {
+ if (iPlayer->isGameMaster()) // bypass GMs
+ continue;
+ if (!player->GetGroup()) // player has not group and there is someone inside, deny entry
+ {
+ player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS);
+ return false;
+ }
+ // player inside instance has no group or his groups is different to entering player's one, deny entry
+ if (!iPlayer->GetGroup() || iPlayer->GetGroup() != player->GetGroup() )
+ {
+ player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS);
+ return false;
+ }
+ break;
+ }
+
return Map::CanEnter(player);
}
@@ -2413,7 +2433,7 @@ bool InstanceMap::Add(Player *player)
// Is it needed?
{
- Guard guard(*this);
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
// Check moved to void WorldSession::HandleMoveWorldportAckOpcode()
//if (!CanEnter(player))
//return false;
@@ -2738,7 +2758,7 @@ bool BattleGroundMap::CanEnter(Player * player)
bool BattleGroundMap::Add(Player * player)
{
{
- Guard guard(*this);
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, guard, Lock, false);
//Check moved to void WorldSession::HandleMoveWorldportAckOpcode()
//if (!CanEnter(player))
//return false;
@@ -2882,7 +2902,7 @@ void Map::ScriptsProcess()
source = HashMapHolder<Corpse>::Find(step.sourceGUID);
break;
case HIGHGUID_MO_TRANSPORT:
- for (MapManager::TransportSet::iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
+ for (MapManager::TransportSet::iterator iter = sMapMgr.m_Transports.begin(); iter != sMapMgr.m_Transports.end(); ++iter)
{
if ((*iter)->GetGUID() == step.sourceGUID)
{
@@ -2941,8 +2961,9 @@ void Map::ScriptsProcess()
break;
}
- Creature* cSource = NULL;
- cSource = source->ToCreature() != NULL ? source->ToCreature() : target->ToCreature();
+ Creature* cSource = source->ToCreature();
+ if (!cSource && target)
+ cSource = target->ToCreature();
if (!cSource)
{
@@ -2998,8 +3019,9 @@ void Map::ScriptsProcess()
break;
}
- Creature* cSource = NULL;
- cSource = source->ToCreature() != NULL ? source->ToCreature() : target->ToCreature();
+ Creature* cSource = source->ToCreature();
+ if (!cSource && target)
+ target->ToCreature();
if (!cSource)
{
@@ -3023,7 +3045,10 @@ void Map::ScriptsProcess()
break;
}
- Creature* cSource = source->ToCreature() != NULL ? source->ToCreature() : target->ToCreature();
+ Creature* cSource = source->ToCreature();
+ if (!cSource && target)
+ cSource = target->ToCreature();
+
if (!cSource)
{
sLog.outError("SCRIPT_COMMAND_FIELD_SET (script id: %u) call for non-creature source.", step.script->id);
@@ -3049,7 +3074,10 @@ void Map::ScriptsProcess()
break;
}
- Creature* cSource = source->ToCreature() != NULL ? source->ToCreature() : target->ToCreature();
+ Creature* cSource = source->ToCreature();
+ if (!cSource && target)
+ cSource = target->ToCreature();
+
if (!cSource)
{
sLog.outError("SCRIPT_COMMAND_MOVE_TO (script id: %u) call for non-creature (TypeId: %u, Entry: %u, GUID: %u), skipping.",
@@ -3070,7 +3098,10 @@ void Map::ScriptsProcess()
break;
}
- Creature* cSource = source->ToCreature() != NULL ? source->ToCreature() : target->ToCreature();
+ Creature* cSource = source->ToCreature();
+ if (!cSource && target)
+ cSource = target->ToCreature();
+
if (!cSource)
{
sLog.outError("SCRIPT_COMMAND_FLAG_SET (script id: %u) call for non-creature source.", step.script->id);
@@ -3096,7 +3127,10 @@ void Map::ScriptsProcess()
break;
}
- Creature* cSource = source->ToCreature() != NULL ? source->ToCreature() : target->ToCreature();
+ Creature* cSource = source->ToCreature();
+ if (!cSource && target)
+ cSource = target->ToCreature();
+
if (!cSource)
{
sLog.outError("SCRIPT_COMMAND_FLAG_REMOVE (script id: %u) call for non-creature source.", step.script->id);
@@ -3125,7 +3159,12 @@ void Map::ScriptsProcess()
if (step.script->datalong2 == 0)
{
- Player* pSource = target->ToPlayer() != NULL ? target->ToPlayer() : source->ToPlayer();
+ Player* pSource = NULL;
+ if (target)
+ pSource = target->ToPlayer();
+ if (!pSource && source)
+ pSource = source->ToPlayer();
+
// must be only Player
if (!pSource)
{
@@ -3138,7 +3177,12 @@ void Map::ScriptsProcess()
}
else if (step.script->datalong2 == 1)
{
- Creature *cSource = target->ToCreature() != NULL ? target->ToCreature() : source->ToCreature();
+ Creature *cSource = NULL;
+ if (target)
+ cSource = target->ToCreature();
+ if (!cSource && source)
+ cSource = source->ToCreature();
+
// must be only Creature
if (!cSource)
{
@@ -3154,16 +3198,14 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_KILL_CREDIT:
{
+ Player* pSource = NULL;
// accept player in any one from target/source arg
- if (!target && !source)
- {
- sLog.outError("SCRIPT_COMMAND_KILL_CREDIT (script id: %u) call for NULL object.", step.script->id);
- break;
- }
-
- Player* pSource = target->ToPlayer() != NULL ? target->ToPlayer() : source->ToPlayer();
- // must be only Player
- if (!pSource)
+ if (target)
+ pSource = target->ToPlayer();
+ if (!pSource && source)
+ pSource = source->ToPlayer();
+
+ if (!pSource) // must be only Player
{
sLog.outError("SCRIPT_COMMAND_KILL_CREDIT (script id: %u) call for non-player (TypeIdSource: %u)(TypeIdTarget: %u), skipping.",
step.script->id, source ? source->GetTypeId() : 0, target ? target->GetTypeId() : 0);
@@ -3277,6 +3319,7 @@ void Map::ScriptsProcess()
go->GetMap()->Add(go);
break;
}
+
case SCRIPT_COMMAND_OPEN_DOOR:
{
if (!step.script->datalong) // door not specified
@@ -3334,6 +3377,7 @@ void Map::ScriptsProcess()
((GameObject*)target)->UseDoorOrButton(time_to_close);
break;
}
+
case SCRIPT_COMMAND_CLOSE_DOOR:
{
if (!step.script->datalong) // guid for door not specified
@@ -3392,6 +3436,7 @@ void Map::ScriptsProcess()
break;
}
+
case SCRIPT_COMMAND_QUEST_EXPLORED:
{
if (!source)
@@ -3408,7 +3453,7 @@ void Map::ScriptsProcess()
// when script called for item spell casting then target == (unit or GO) and source is player
WorldObject* worldObject;
- Player* pTarget;
+ Player* pTarget = NULL;
pTarget = target->ToPlayer();
if (pTarget)
@@ -3577,7 +3622,7 @@ void Map::ScriptsProcess()
}
// bitmask: 0/1=anyone/target, 0/2=with distance dependent
- Player* pTarget;
+ Player* pTarget = NULL;
if (step.script->datalong2 & 1)
{
if (!target)
@@ -3586,7 +3631,7 @@ void Map::ScriptsProcess()
break;
}
- pTarget = target->ToPlayer();
+ pTarget = target ? target->ToPlayer() : NULL;
if (!pTarget)
{
sLog.outError("SCRIPT_COMMAND_PLAY_SOUND (script id: %u) in targeted mode call for non-player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
@@ -3605,13 +3650,19 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_CREATE_ITEM:
{
- if (!target && !source)
+ if (!source)
{
- sLog.outError("SCRIPT_COMMAND_CREATE_ITEM (script id: %u) call for NULL object.", step.script->id);
+ sLog.outError("SCRIPT_COMMAND_CREATE_ITEM (script id: %u) call for NULL source.",
+ step.script->id);
break;
}
- Player *pReceiver = target->ToPlayer() != NULL ? target->ToPlayer() : source->ToPlayer();
+ Player *pReceiver = NULL;
+ if (target)
+ pReceiver = target->ToPlayer();
+ if (!pReceiver)
+ pReceiver = source->ToPlayer();
+
// only Player
if (!pReceiver)
{
@@ -3798,6 +3849,7 @@ void Map::ScriptsProcess()
uSource->SendMovementFlagUpdate();
break;
}
+
case SCRIPT_COMMAND_EQUIP:
{
if (!source)
@@ -3816,6 +3868,7 @@ void Map::ScriptsProcess()
cSource->LoadEquipment(step.script->datalong);
break;
}
+
case SCRIPT_COMMAND_MODEL:
{
if (!source)
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index ceb526b8244..4d25381fbe1 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -21,8 +21,7 @@
#ifndef TRINITY_MAP_H
#define TRINITY_MAP_H
-#include "Platform/Define.h"
-#include "Policies/ThreadingModel.h"
+#include "Define.h"
#include "ace/RW_Thread_Mutex.h"
#include "ace/Thread_Mutex.h"
@@ -31,9 +30,9 @@
#include "Cell.h"
#include "Timer.h"
#include "SharedDefines.h"
-#include "GameSystem/GridRefManager.h"
+#include "GridRefManager.h"
#include "MapRefManager.h"
-#include "mersennetwister/MersenneTwister.h"
+#include "MersenneTwister.h"
#include <bitset>
#include <list>
@@ -57,7 +56,7 @@ class BattleGround;
// Map file format defines
//******************************************
#define MAP_MAGIC 'SPAM'
-#define MAP_VERSION_MAGIC '0.1w'
+#define MAP_VERSION_MAGIC '1.1v'
#define MAP_AREA_MAGIC 'AERA'
#define MAP_HEIGHT_MAGIC 'TGHM'
#define MAP_LIQUID_MAGIC 'QILM'
@@ -66,6 +65,7 @@ struct map_fileheader
{
uint32 mapMagic;
uint32 versionMagic;
+ uint32 buildMagic;
uint32 areaMapOffset;
uint32 areaMapSize;
uint32 heightMapOffset;
@@ -238,7 +238,7 @@ typedef UNORDERED_MAP<Creature*, CreatureMover> CreatureMoveList;
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
-class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockable<Map, ACE_Thread_Mutex>
+class Map : public GridRefManager<NGridType>
{
friend class MapReference;
public:
@@ -489,7 +489,7 @@ class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockabl
protected:
void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
- typedef Trinity::ObjectLevelLockable<Map, ACE_Thread_Mutex>::Lock Guard;
+ ACE_Thread_Mutex Lock;
MapEntry const* i_mapEntry;
uint8 i_spawnMode;
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index 0736bfa6fb3..008baeb79d9 100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -170,7 +170,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
{
// if no instanceId via group members or instance saves is found
// the instance will be created for the first time
- NewInstanceId = MapManager::Instance().GenerateInstanceId();
+ NewInstanceId = sMapMgr.GenerateInstanceId();
Difficulty diff = player->GetGroup() ? player->GetGroup()->GetDifficulty(IsRaid()) : player->GetDifficulty(IsRaid());
map = CreateInstance(NewInstanceId, NULL, diff);
@@ -183,7 +183,7 @@ Map* MapInstanced::CreateInstance(const uint32 mapId, Player * player)
InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save, Difficulty difficulty)
{
// load/create a map
- Guard guard(*this);
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
// make sure we have a valid map id
const MapEntry* entry = sMapStore.LookupEntry(GetId());
@@ -219,7 +219,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
BattleGroundMap* MapInstanced::CreateBattleGround(uint32 InstanceId, BattleGround* bg)
{
// load/create a map
- Guard guard(*this);
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
sLog.outDebug("MapInstanced::CreateBattleGround: map bg %d for %d created.", InstanceId, GetId());
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index de3d0ebbaff..36999aab14f 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -20,16 +20,15 @@
#include "MapManager.h"
#include "InstanceSaveMgr.h"
-#include "Policies/SingletonImp.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Log.h"
#include "ObjectAccessor.h"
-#include "Transports.h"
+#include "Transport.h"
#include "GridDefines.h"
#include "MapInstanced.h"
#include "InstanceData.h"
#include "DestinationHolderImp.h"
-#include "Config/ConfigEnv.h"
+#include "ConfigEnv.h"
#include "World.h"
#include "CellImpl.h"
#include "Corpse.h"
@@ -37,10 +36,6 @@
#include "Language.h"
#include "WorldPacket.h"
-#define CLASS_LOCK Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex>
-INSTANTIATE_SINGLETON_2(MapManager, CLASS_LOCK);
-INSTANTIATE_CLASS_MUTEX(MapManager, ACE_Thread_Mutex);
-
extern GridState* si_GridStates[]; // debugging code, should be deleted some day
MapManager::MapManager()
@@ -116,7 +111,7 @@ Map* MapManager::_createBaseMap(uint32 id)
if (m == NULL)
{
- Guard guard(*this);
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
const MapEntry* entry = sMapStore.LookupEntry(id);
if (entry && entry->Instanceable())
@@ -166,14 +161,35 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
if (!entry->IsDungeon())
return true;
+ InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid);
+ if (!instance)
+ return false;
+
+ //The player has a heroic mode and tries to enter into instance which has no a heroic mode
+ MapDifficulty const* mapDiff = GetMapDifficultyData(entry->MapID,player->GetDifficulty(entry->IsRaid()));
+ if (!mapDiff)
+ {
+ bool isNormalTargetMap = entry->IsRaid()
+ ? (player->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
+ : (player->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
+
+ // Send aborted message
+ // FIX ME: what about absent normal/heroic mode with specific players limit...
+ player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, isNormalTargetMap ? DUNGEON_DIFFICULTY_NORMAL : DUNGEON_DIFFICULTY_HEROIC);
+ return false;
+ }
+
+ //Bypass checks for GMs
+ if (player->isGameMaster())
+ return true;
+
const char *mapName = entry->name[player->GetSession()->GetSessionDbcLocale()];
Group* pGroup = player->GetGroup();
if (entry->IsRaid())
{
// can only enter in a raid group
- // GMs can avoid raid limitations
- if ((!pGroup || !pGroup->isRaidGroup()) && !player->isGameMaster() && !sWorld.getConfig(CONFIG_INSTANCE_IGNORE_RAID))
+ if ((!pGroup || !pGroup->isRaidGroup()) && !sWorld.getConfig(CONFIG_INSTANCE_IGNORE_RAID))
{
// probably there must be special opcode, because client has this string constant in GlobalStrings.lua
// TODO: this is not a good place to send the message
@@ -183,20 +199,6 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
}
}
- //The player has a heroic mode and tries to enter into instance which has no a heroic mode
- MapDifficulty const* mapDiff = GetMapDifficultyData(entry->MapID,player->GetDifficulty(entry->IsRaid()));
- if (!mapDiff)
- {
- bool isNormalTargetMap = entry->IsRaid()
- ? (player->GetRaidDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
- : (player->GetDungeonDifficulty() == DUNGEON_DIFFICULTY_NORMAL);
-
- // Send aborted message
- // FIX ME: what about absent normal/heroic mode with specific players limit...
- player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, isNormalTargetMap ? DUNGEON_DIFFICULTY_NORMAL : DUNGEON_DIFFICULTY_HEROIC);
- return false;
- }
-
if (!player->isAlive())
{
if (Corpse *corpse = player->GetCorpse())
@@ -226,49 +228,24 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
sLog.outDebug("Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName());
}
- InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid);
- if (!instance)
- return false;
-
//Get instance where player's group is bound & its map
if (pGroup)
{
- InstanceGroupBind* boundedInstance = pGroup->GetBoundInstance(player);
+ InstanceGroupBind* boundedInstance = pGroup->GetBoundInstance(entry);
if (boundedInstance && boundedInstance->save)
- {
- if (Map *boundedMap = MapManager::Instance().FindMap(mapid,boundedInstance->save->GetInstanceId()))
- {
+ if (Map *boundedMap = sMapMgr.FindMap(mapid,boundedInstance->save->GetInstanceId()))
+ if (!loginCheck && !boundedMap->CanEnter(player))
+ return false;
+ /*
+ This check has to be moved to InstanceMap::CanEnter()
// Player permanently bounded to different instance than groups one
- InstancePlayerBind* playerBoundedInstance = player->GetBoundInstance(mapid, player->GetDungeonDifficulty());
+ InstancePlayerBind* playerBoundedInstance = player->GetBoundInstance(mapid, player->GetDifficulty(entry->IsRaid()));
if (playerBoundedInstance && playerBoundedInstance->perm && playerBoundedInstance->save &&
boundedInstance->save->GetInstanceId() != playerBoundedInstance->save->GetInstanceId())
{
//TODO: send some kind of error message to the player
return false;
- }
-
- // Encounters in progress
- if (!loginCheck && entry->IsRaid() && ((InstanceMap*)boundedMap)->GetInstanceData() && ((InstanceMap*)boundedMap)->GetInstanceData()->IsEncounterInProgress())
- {
- sLog.outDebug("MAP: Player '%s' cannot enter instance '%s' while an encounter is in progress.", player->GetName(), mapName);
- player->SendTransferAborted(mapid, TRANSFER_ABORT_ZONE_IN_COMBAT);
- return false;
- }
-
- // Instance is full
- MapDifficulty const* mapDiff = ((InstanceMap*)boundedMap)->GetMapDifficulty();
- int8 maxPlayers = mapDiff ? mapDiff->maxPlayers : 0;
- if (maxPlayers != -1) //-1: unlimited access
- {
- if (boundedMap->GetPlayersCountExceptGMs() >= (loginCheck ? maxPlayers+1 : maxPlayers))
- {
- sLog.outDebug("MAP: Player '%s' cannot enter instance '%s' because it is full.", player->GetName(), mapName);
- player->SendTransferAborted(mapid, TRANSFER_ABORT_MAX_PLAYERS);
- return false;
- }
- }
- }
- }
+ }*/
}
//Other requirements
@@ -307,7 +284,7 @@ void MapManager::Update(uint32 diff)
for (iter = i_maps.begin(); iter != i_maps.end(); ++iter)
iter->second->DelayedUpdate(i_timer.GetCurrent());
- ObjectAccessor::Instance().Update(i_timer.GetCurrent());
+ sObjectAccessor.Update(i_timer.GetCurrent());
for (TransportSet::iterator iter = m_Transports.begin(); iter != m_Transports.end(); ++iter)
(*iter)->Update(i_timer.GetCurrent());
@@ -361,7 +338,7 @@ void MapManager::InitMaxInstanceId()
uint32 MapManager::GetNumInstances()
{
- Guard guard(*this);
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
uint32 ret = 0;
for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
@@ -378,7 +355,7 @@ uint32 MapManager::GetNumInstances()
uint32 MapManager::GetNumPlayersInInstances()
{
- Guard guard(*this);
+ ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);
uint32 ret = 0;
for (MapMapType::iterator itr = i_maps.begin(); itr != i_maps.end(); ++itr)
diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h
index d94f9fced0e..47cb9d2f795 100644
--- a/src/server/game/Maps/MapManager.h
+++ b/src/server/game/Maps/MapManager.h
@@ -21,8 +21,8 @@
#ifndef TRINITY_MAPMANAGER_H
#define TRINITY_MAPMANAGER_H
-#include "Platform/Define.h"
-#include "Policies/Singleton.h"
+#include "Define.h"
+#include "ace/Singleton.h"
#include "ace/Thread_Mutex.h"
#include "Common.h"
#include "Map.h"
@@ -31,10 +31,9 @@
class Transport;
-class MapManager : public Trinity::Singleton<MapManager, Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex> >
+class MapManager
{
-
- friend class Trinity::OperatorNew<MapManager>;
+ friend class ACE_Singleton<MapManager, ACE_Thread_Mutex>;
typedef UNORDERED_MAP<uint32, Map*> MapMapType;
typedef std::pair<UNORDERED_MAP<uint32, Map*>::iterator, bool> MapMapPair;
@@ -108,6 +107,21 @@ class MapManager : public Trinity::Singleton<MapManager, Trinity::ClassLevelLock
return IsValidMapCoord(loc.GetMapId(), loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ(), loc.GetOrientation());
}
+ // modulos a radian orientation to the range of 0..2PI
+ static float NormalizeOrientation(float o)
+ {
+ // fmod only supports positive numbers. Thus we have
+ // to emulate negative numbers
+ if (o < 0)
+ {
+ float mod = o *-1;
+ mod = fmod(mod, 2.0f * static_cast<float>(M_PI));
+ mod = -mod + 2.0f * M_PI;
+ return mod;
+ }
+ return fmod(o, 2.0f * static_cast<float>(M_PI));
+ }
+
void DoDelayedMovesAndRemoves();
void LoadTransports();
@@ -147,7 +161,7 @@ class MapManager : public Trinity::Singleton<MapManager, Trinity::ClassLevelLock
return (iter == i_maps.end() ? NULL : iter->second);
}
- typedef Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex>::Lock Guard;
+ ACE_Thread_Mutex Lock;
uint32 i_gridCleanUpDelay;
MapMapType i_maps;
IntervalTimer i_timer;
@@ -155,4 +169,5 @@ class MapManager : public Trinity::Singleton<MapManager, Trinity::ClassLevelLock
uint32 i_MaxInstanceId;
MapUpdater m_updater;
};
+#define sMapMgr (*ACE_Singleton<MapManager, ACE_Thread_Mutex>::instance())
#endif
diff --git a/src/server/game/Maps/MapRefManager.h b/src/server/game/Maps/MapRefManager.h
index 4337aa75fd9..2cf38c1b000 100644
--- a/src/server/game/Maps/MapRefManager.h
+++ b/src/server/game/Maps/MapRefManager.h
@@ -19,7 +19,7 @@
#ifndef _MAPREFMANAGER
#define _MAPREFMANAGER
-#include "Utilities/LinkedReference/RefManager.h"
+#include "RefManager.h"
class MapReference;
diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h
index 7cd4fcde76c..e74fdba229b 100644
--- a/src/server/game/Maps/MapReference.h
+++ b/src/server/game/Maps/MapReference.h
@@ -19,7 +19,7 @@
#ifndef _MAPREFERENCE_H
#define _MAPREFERENCE_H
-#include "Utilities/LinkedReference/Reference.h"
+#include "Reference.h"
#include "Map.h"
class MapReference : public Reference<Map, Player>
diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp
index f9bb5e2bbbc..5720ed1eb50 100644
--- a/src/server/game/Maps/MapUpdater.cpp
+++ b/src/server/game/Maps/MapUpdater.cpp
@@ -1,7 +1,7 @@
#include "MapUpdater.h"
#include "DelayExecutor.h"
#include "Map.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include <ace/Guard_T.h>
#include <ace/Method_Request.h>
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index e5961834a78..8244e344275 100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -27,9 +27,14 @@ namespace Trinity
{
namespace Honor
{
+ inline float hk_honor_at_level_f(uint8 level, uint32 count = 1)
+ {
+ return count * level * 1.55f;
+ }
+
inline uint32 hk_honor_at_level(uint8 level, uint32 count = 1)
{
- return uint32(ceil(count * (33.333f * ((float)level) / 21.50537f)));
+ return ceil(hk_honor_at_level_f(level, count));
}
}
namespace XP
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index c0c8fc486f3..435c6549f56 100644
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -87,7 +87,8 @@ enum TrinityStrings
LANG_USING_EVENT_AI = 59,
LANG_CONNECTED_PLAYERS = 60,
LANG_ACCOUNT_ADDON = 61,
- // Room for more level 0 62-99 not used
+ LANG_IMPROPER_VALUE = 62,
+ // 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 903dd4b09ca..0d5025a5d5f 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -21,7 +21,7 @@
#ifndef TRINITY_SHAREDDEFINES_H
#define TRINITY_SHAREDDEFINES_H
-#include "Platform/Define.h"
+#include "Define.h"
#include <cassert>
// loot modes for creatures and gameobjects, bitmask!
@@ -287,7 +287,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
#define SPELL_ATTR_EX_NEGATIVE 0x00000080 // 7
#define SPELL_ATTR_EX_NOT_IN_COMBAT_TARGET 0x00000100 // 8 Spell req target not to be in combat state
#define SPELL_ATTR_EX_UNK9 0x00000200 // 9 melee spells
-#define SPELL_ATTR_EX_UNK10 0x00000400 // 10 no generates threat on cast 100%? (old NO_INITIAL_AGGRO)
+#define SPELL_ATTR_EX_NO_THREAT 0x00000400 // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO)
#define SPELL_ATTR_EX_UNK11 0x00000800 // 11 aura
#define SPELL_ATTR_EX_UNK12 0x00001000 // 12
#define SPELL_ATTR_EX_UNK13 0x00002000 // 13
@@ -643,7 +643,7 @@ enum SpellEffects
SPELL_EFFECT_LANGUAGE = 39,
SPELL_EFFECT_DUAL_WIELD = 40,
SPELL_EFFECT_JUMP = 41,
- SPELL_EFFECT_JUMP2 = 42,
+ SPELL_EFFECT_JUMP_DEST = 42,
SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER= 43,
SPELL_EFFECT_SKILL_STEP = 44,
SPELL_EFFECT_ADD_HONOR = 45,
@@ -750,7 +750,7 @@ enum SpellEffects
SPELL_EFFECT_ACTIVATE_RUNE = 146,
SPELL_EFFECT_QUEST_FAIL = 147,
SPELL_EFFECT_148 = 148,
- SPELL_EFFECT_149 = 149,
+ SPELL_EFFECT_CHARGE_DEST = 149,
SPELL_EFFECT_150 = 150,
SPELL_EFFECT_TRIGGER_SPELL_2 = 151,
SPELL_EFFECT_152 = 152,
@@ -2769,4 +2769,31 @@ enum SpellFamilyNames
SPELLFAMILY_PET = 17
};
+enum TradeStatus
+{
+ TRADE_STATUS_BUSY = 0,
+ TRADE_STATUS_BEGIN_TRADE = 1,
+ TRADE_STATUS_OPEN_WINDOW = 2,
+ TRADE_STATUS_TRADE_CANCELED = 3,
+ TRADE_STATUS_TRADE_ACCEPT = 4,
+ TRADE_STATUS_BUSY_2 = 5,
+ TRADE_STATUS_NO_TARGET = 6,
+ TRADE_STATUS_BACK_TO_TRADE = 7,
+ TRADE_STATUS_TRADE_COMPLETE = 8,
+ // 9?
+ TRADE_STATUS_TARGET_TO_FAR = 10,
+ TRADE_STATUS_WRONG_FACTION = 11,
+ TRADE_STATUS_CLOSE_WINDOW = 12,
+ // 13?
+ TRADE_STATUS_IGNORE_YOU = 14,
+ TRADE_STATUS_YOU_STUNNED = 15,
+ TRADE_STATUS_TARGET_STUNNED = 16,
+ TRADE_STATUS_YOU_DEAD = 17,
+ TRADE_STATUS_TARGET_DEAD = 18,
+ TRADE_STATUS_YOU_LOGOUT = 19,
+ TRADE_STATUS_TARGET_LOGOUT = 20,
+ TRADE_STATUS_TRIAL_ACCOUNT = 21, // Trial accounts can not perform that action
+ TRADE_STATUS_ONLY_CONJURED = 22 // You can only trade conjured items... (cross realm BG related).
+};
+
#endif
diff --git a/src/server/game/Movement/DestinationHolder.h b/src/server/game/Movement/DestinationHolder.h
index e09a153615c..c0ee668eb99 100644
--- a/src/server/game/Movement/DestinationHolder.h
+++ b/src/server/game/Movement/DestinationHolder.h
@@ -21,7 +21,7 @@
#ifndef TRINITY_DESTINATION_HOLDER_H
#define TRINITY_DESTINATION_HOLDER_H
-#include "Platform/Define.h"
+#include "Define.h"
#include "Timer.h"
class WorldObject;
diff --git a/src/server/game/Movement/FollowerRefManager.h b/src/server/game/Movement/FollowerRefManager.h
index c2068b36f81..e451cd4747a 100644
--- a/src/server/game/Movement/FollowerRefManager.h
+++ b/src/server/game/Movement/FollowerRefManager.h
@@ -21,7 +21,7 @@
#ifndef _FOLLOWERREFMANAGER
#define _FOLLOWERREFMANAGER
-#include "Utilities/LinkedReference/RefManager.h"
+#include "RefManager.h"
class Unit;
class TargetedMovementGeneratorBase;
diff --git a/src/server/game/Movement/FollowerReference.h b/src/server/game/Movement/FollowerReference.h
index e468f79f017..72a6d4f463e 100644
--- a/src/server/game/Movement/FollowerReference.h
+++ b/src/server/game/Movement/FollowerReference.h
@@ -21,7 +21,7 @@
#ifndef _FOLLOWERREFERENCE_H
#define _FOLLOWERREFERENCE_H
-#include "Utilities/LinkedReference/Reference.h"
+#include "Reference.h"
class TargetedMovementGeneratorBase;
class Unit;
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 5c20494bfcc..46a4c806067 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -440,9 +440,17 @@ MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode)
{
if (i_owner->GetTypeId() == TYPEID_PLAYER)
{
- DEBUG_LOG("Player (GUID: %u) taxi to (Path %u node %u)", i_owner->GetGUIDLow(), path, pathnode);
- FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(path,pathnode);
- Mutate(mgen, MOTION_SLOT_CONTROLLED);
+ if (path < sTaxiPathNodesByPath.size())
+ {
+ DEBUG_LOG("%s taxi to (Path %u node %u)", i_owner->GetName(), path, pathnode);
+ FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path],pathnode);
+ Mutate(mgen, MOTION_SLOT_CONTROLLED);
+ }
+ else
+ {
+ sLog.outError("%s attempt taxi to (not existed Path %u node %u)",
+ i_owner->GetName(), path, pathnode);
+ }
}
else
{
diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h
index ab7a52c483e..9699f6951c2 100644
--- a/src/server/game/Movement/MovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerator.h
@@ -21,10 +21,10 @@
#ifndef TRINITY_MOVEMENTGENERATOR_H
#define TRINITY_MOVEMENTGENERATOR_H
-#include "Platform/Define.h"
-#include "Policies/Singleton.h"
-#include "Dynamic/ObjectRegistry.h"
-#include "Dynamic/FactoryHolder.h"
+#include "Define.h"
+#include "ace/Singleton.h"
+#include "ObjectRegistry.h"
+#include "FactoryHolder.h"
#include "Common.h"
#include "MotionMaster.h"
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
index 43c6052d2d3..73e24486768 100644
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
@@ -47,38 +47,44 @@ ConfusedMovementGenerator<T>::Initialize(T &unit)
bool is_water_ok, is_land_ok;
_InitSpecific(unit, is_water_ok, is_land_ok);
- VMAP::IVMapManager *vMaps = VMAP::VMapFactory::createOrGetVMapManager();
-
for (uint8 idx = 0; idx <= MAX_CONF_WAYPOINTS; ++idx)
{
- const bool isInLoS = vMaps->isInLineOfSight(unit.GetMapId(), x, y, z + 2.0f, i_waypoints[idx][0], i_waypoints[idx][1], z + 2.0f);
- if (isInLoS)
- {
- const float wanderX = wander_distance*rand_norm() - wander_distance/2;
- const float wanderY = wander_distance*rand_norm() - wander_distance/2;
- i_waypoints[idx][0] = x + wanderX;
- i_waypoints[idx][1] = y + wanderY;
- }
- else
+ float wanderX = x + wander_distance*rand_norm() - wander_distance/2;
+ float wanderY = y + wander_distance*rand_norm() - wander_distance/2;
+ Trinity::NormalizeMapCoord(wanderX);
+ Trinity::NormalizeMapCoord(wanderY);
+
+ float new_z = map->GetHeight(wanderX, wanderY, z, true);
+ if (new_z > INVALID_HEIGHT && unit.IsWithinLOS(wanderX, wanderY, new_z))
{
- i_waypoints[idx][0] = x;
- i_waypoints[idx][1] = y;
+ // Don't move in water if we're not already in
+ // Don't move on land if we're not already on it either
+ bool is_water_now = map->IsInWater(x, y, z);
+ bool is_water_next = map->IsInWater(wanderX, wanderY, new_z);
+ if ((is_water_now && !is_water_next && !is_land_ok) || (!is_water_now && is_water_next && !is_water_ok))
+ {
+ i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx-1][0] : x; // Back to previous location
+ i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx-1][1] : y;
+ i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx-1][2] : z;
+ continue;
+ }
+
+ // Taken from FleeingMovementGenerator
+ if (!(new_z - z) || wander_distance / fabs(new_z - z) > 1.0f)
+ {
+ i_waypoints[idx][0] = wanderX;
+ i_waypoints[idx][1] = wanderY;
+ i_waypoints[idx][2] = new_z;
+ continue;
+ }
}
-
- // prevent invalid coordinates generation
- Trinity::NormalizeMapCoord(i_waypoints[idx][0]);
- Trinity::NormalizeMapCoord(i_waypoints[idx][1]);
-
- bool is_water = map->IsInWater(i_waypoints[idx][0],i_waypoints[idx][1],z);
- // if generated wrong path just ignore
- if ((is_water && !is_water_ok) || (!is_water && !is_land_ok))
+ else // Back to previous location
{
i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx-1][0] : x;
i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx-1][1] : y;
+ i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx-1][2] : z;
+ continue;
}
-
- unit.UpdateGroundPositionZ(i_waypoints[idx][0],i_waypoints[idx][1],z);
- i_waypoints[idx][2] = z;
}
unit.SetUInt64Value(UNIT_FIELD_TARGET, 0);
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index 2a0c7c0253d..416b775ef7e 100644
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -229,24 +229,20 @@ template bool WaypointMovementGenerator<Player>::Update(Player &, const uint32 &
template void WaypointMovementGenerator<Player>::MovementInform(Player &);
//----------------------------------------------------//
-void FlightPathMovementGenerator::LoadPath(Player &)
-{
- objmgr.GetTaxiPathNodes(i_pathId, i_path,i_mapIds);
-}
uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const
{
- if (i_currentNode >= i_mapIds.size())
- return i_mapIds.size();
+ if (i_currentNode >= i_path->size())
+ return i_path->size();
- uint32 curMapId = i_mapIds[i_currentNode];
- for (uint32 i = i_currentNode; i < i_mapIds.size(); ++i)
+ uint32 curMapId = (*i_path)[i_currentNode].mapid;
+ for (uint32 i = i_currentNode; i < i_path->size(); ++i)
{
- if (i_mapIds[i] != curMapId)
+ if ((*i_path)[i].mapid != curMapId)
return i;
}
- return i_mapIds.size();
+ return i_path->size();
}
void FlightPathMovementGenerator::Initialize(Player &player)
@@ -254,23 +250,12 @@ void FlightPathMovementGenerator::Initialize(Player &player)
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
- LoadPath(player);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
- i_destinationHolder.SetDestination(traveller, i_path[i_currentNode].x, i_path[i_currentNode].y, i_path[i_currentNode].z, false);
-
+ i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
+ // For preloading end grid
+ InitEndGridInfo();
player.SendMonsterMoveByPath(GetPath(), GetCurrentNode(), GetPathAtMapEnd());
-
- // Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will
- // be reinitialized for each flightmaster at the end of each spline (or stop) in the flight.
-
- uint32 nodeCount = i_mapIds.size(); // Get the number of nodes in the path. i_path and i_mapIds are the
- // same size when loaded in ObjectMgr::GetTaxiPathNodes, called from LoadPath()
-
- m_endMapId = i_mapIds[nodeCount -1]; // Get the map ID from the last node
- m_preloadTargetNode = nodeCount / 2; // Split the number of nodes in half to preload the flightmaster half-way through the flight
- m_endGridX = i_path[nodeCount -1].x; // Get the X position from the last node
- m_endGridY = i_path[nodeCount -1].y; // Get tye Y position from the last node
}
void FlightPathMovementGenerator::Finalize(Player & player)
@@ -280,6 +265,7 @@ void FlightPathMovementGenerator::Finalize(Player & player)
float x, y, z;
i_destinationHolder.GetLocationNow(player.GetBaseMap(), x, y, z);
player.SetPosition(x, y, z, player.GetOrientation());
+
}
bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
@@ -292,18 +278,22 @@ bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
i_destinationHolder.ResetUpdate(FLIGHT_TRAVEL_UPDATE);
if (i_destinationHolder.HasArrived())
{
- uint32 curMap = i_mapIds[i_currentNode];
+ DoEventIfAny(player,(*i_path)[i_currentNode], false);
+
+ uint32 curMap = (*i_path)[i_currentNode].mapid;
++i_currentNode;
if (MovementInProgress())
{
+ DoEventIfAny(player,(*i_path)[i_currentNode], true);
+
DEBUG_LOG("loading node %u for player %s", i_currentNode, player.GetName());
- if (i_mapIds[i_currentNode] == curMap)
+ if ((*i_path)[i_currentNode].mapid == curMap)
{
// do not send movement, it was sent already
- i_destinationHolder.SetDestination(traveller, i_path[i_currentNode].x, i_path[i_currentNode].y, i_path[i_currentNode].z, false);
+ i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
}
-
- // check if it's time to preload the flightmaster grid at path end
+
+ // check if it's time to preload the flightmaster grid at path end
if (i_currentNode == m_preloadTargetNode)
PreloadEndGrid();
@@ -324,13 +314,13 @@ bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
{
- if (i_mapIds.empty())
+ if (i_path->empty())
return;
- uint32 map0 = i_mapIds[0];
- for (size_t i = 1; i < i_mapIds.size(); ++i)
+ uint32 map0 = (*i_path)[0].mapid;
+ for (size_t i = 1; i < i_path->size(); ++i)
{
- if (i_mapIds[i] != map0)
+ if ((*i_path)[i].mapid != map0)
{
i_currentNode = i;
return;
@@ -338,10 +328,22 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
}
}
+void FlightPathMovementGenerator::InitEndGridInfo()
+{
+ // Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will
+ // be reinitialized for each flightmaster at the end of each spline (or stop) in the flight.
+
+ uint32 nodeCount = (*i_path).size(); // Get the number of nodes in the path.
+ m_endMapId = (*i_path)[nodeCount -1].mapid; // Get the map ID from the last node
+ m_preloadTargetNode = nodeCount - 3; // 2 nodes before the final node, we pre-load the grid
+ m_endGridX = (*i_path)[nodeCount -1].x; // Get the X position from the last node
+ m_endGridY = (*i_path)[nodeCount -1].y; // Get the Y position from the last node
+}
+
void FlightPathMovementGenerator::PreloadEndGrid()
{
// used to preload the final grid where the flightmaster is
- Map *endMap = MapManager::Instance().FindMap(m_endMapId);
+ Map *endMap = sMapMgr.FindMap(m_endMapId);
// Load the grid
if (endMap)
@@ -353,6 +355,17 @@ void FlightPathMovementGenerator::PreloadEndGrid()
sLog.outDetail("Unable to determine map to preload flightmaster grid");
}
+void FlightPathMovementGenerator::DoEventIfAny(Player& player, TaxiPathNodeEntry const& node, bool departure)
+{
+ if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID)
+ {
+ sLog.outDebug("Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName());
+ player.GetMap()->ScriptsStart(sEventScripts, eventid, &player, &player);
+ }
+}
+
+
+
//
// Unique1's ASTAR Pathfinding Code... For future use & reference...
//
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
index 4b74e80e168..cce0eff290e 100644
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
@@ -39,21 +39,24 @@
#include <set>
#define FLIGHT_TRAVEL_UPDATE 100
-#define STOP_TIME_FOR_PLAYER 3 * MINUTE * IN_MILISECONDS // 3 Minutes
+#define STOP_TIME_FOR_PLAYER 3 * MINUTE * IN_MILLISECONDS // 3 Minutes
#define TIMEDIFF_NEXT_WP 250
-template<class T, class P = Path>
+template<class T, class P>
class PathMovementBase
{
public:
PathMovementBase() : i_currentNode(0) {}
virtual ~PathMovementBase() {};
- bool MovementInProgress(void) const { return i_currentNode < i_path.Size(); }
+ bool MovementInProgress(void) const { return i_currentNode < i_path->size(); }
void LoadPath(T &);
void ReloadPath(T &);
uint32 GetCurrentNode() const { return i_currentNode; }
+
+ bool GetDestination(float& x, float& y, float& z) const { i_destinationHolder.GetDestination(x,y,z); return true; }
+ bool GetPosition(float& x, float& y, float& z) const { i_destinationHolder.GetLocationNowNoMicroMovement(x,y,z); return true; }
protected:
uint32 i_currentNode;
@@ -64,7 +67,7 @@ class PathMovementBase
template<class T>
class WaypointMovementGenerator
- : public MovementGeneratorMedium< T, WaypointMovementGenerator<T> >, public PathMovementBase<T>
+ : public MovementGeneratorMedium< T, WaypointMovementGenerator<T> >, public PathMovementBase<T, WaypointPath const*>
{
public:
WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true) :
@@ -93,28 +96,31 @@ class WaypointMovementGenerator
*/
class FlightPathMovementGenerator
: public MovementGeneratorMedium< Player, FlightPathMovementGenerator >,
-public PathMovementBase<Player>
+public PathMovementBase<Player,TaxiPathNodeList const*>
{
- uint32 i_pathId;
- std::vector<uint32> i_mapIds;
public:
- explicit FlightPathMovementGenerator(uint32 id, uint32 startNode = 0) : i_pathId(id) { i_currentNode = startNode; }
+ explicit FlightPathMovementGenerator(TaxiPathNodeList const& pathnodes, uint32 startNode = 0)
+ {
+ i_path = &pathnodes;
+ i_currentNode = startNode;
+ }
void Initialize(Player &);
+ void Reset(Player &u){};
void Finalize(Player &);
- void Reset(Player &) {}
bool Update(Player &, const uint32 &);
MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }
- void LoadPath(Player &);
- void ReloadPath(Player &) { /* don't reload flight path */ }
-
- Path& GetPath() { return i_path; }
+ TaxiPathNodeList const& GetPath() { return *i_path; }
uint32 GetPathAtMapEnd() const;
- bool HasArrived() const { return (i_currentNode >= i_path.Size()); }
+ bool HasArrived() const { return (i_currentNode >= i_path->size()); }
void SetCurrentNodeAfterTeleport();
void SkipCurrentNode() { ++i_currentNode; }
- bool GetDestination(float& x, float& y, float& z) const { i_destinationHolder.GetDestination(x,y,z); return true; }
+ void DoEventIfAny(Player& player, TaxiPathNodeEntry const& node, bool departure);
+ bool GetDestination(float& x, float& y, float& z) const { return PathMovementBase<Player,TaxiPathNodeList const*>::GetDestination(x,y,z); }
+
+ void PreloadEndGrid();
+ void InitEndGridInfo();
private:
// storage for preloading the flightmaster grid at end
// before reaching final waypoint
@@ -122,7 +128,6 @@ public PathMovementBase<Player>
uint32 m_preloadTargetNode;
float m_endGridX;
float m_endGridY;
- void PreloadEndGrid();
};
#endif
diff --git a/src/server/game/Movement/Waypoints/Path.h b/src/server/game/Movement/Waypoints/Path.h
index 9ec079f3c9c..de73d9270af 100644
--- a/src/server/game/Movement/Waypoints/Path.h
+++ b/src/server/game/Movement/Waypoints/Path.h
@@ -24,65 +24,64 @@
#include "Common.h"
#include <vector>
+struct SimplePathNode
+{
+ float x, y, z;
+};
+template<typename PathElem, typename PathNode = PathElem>
+
class Path
{
public:
- struct PathNode
- {
- float x,y,z;
- };
-
- void SetLength(const unsigned int sz)
- {
- i_nodes.resize(sz);
- }
+ size_t size() const { return i_nodes.size(); }
+ bool empty() const { return i_nodes.empty(); }
+ void resize(unsigned int sz) { i_nodes.resize(sz); }
+ void clear() { i_nodes.clear(); }
+ void erase(uint32 idx) { i_nodes.erase(i_nodes.begin()+idx); }
- unsigned int Size() const { return i_nodes.size(); }
- bool Empty() const { return i_nodes.empty(); }
- void Resize(unsigned int sz) { i_nodes.resize(sz); }
- void Clear(void) { i_nodes.clear(); }
- PathNode const* GetNodes(uint32 start = 0) const { return &i_nodes[start]; }
- float GetTotalLength() const { return GetTotalLength(0,Size()); }
float GetTotalLength(uint32 start, uint32 end) const
{
- float len = 0, xd, yd, zd;
- for (unsigned int idx=start+1; idx < end; ++idx)
+ float len = 0.0f;
+ for (uint32 idx=start+1; idx < end; ++idx)
{
- xd = i_nodes[ idx ].x - i_nodes[ idx-1 ].x;
- yd = i_nodes[ idx ].y - i_nodes[ idx-1 ].y;
- zd = i_nodes[ idx ].z - i_nodes[ idx-1 ].z;
+ PathNode const& node = i_nodes[idx];
+ PathNode const& prev = i_nodes[idx-1];
+ float xd = node.x - prev.x;
+ float yd = node.y - prev.y;
+ float zd = node.z - prev.z;
len += sqrtf(xd*xd + yd*yd + zd*zd);
}
return len;
}
+
+ float GetTotalLength() const { return GetTotalLength(0,size()); }
float GetPassedLength(uint32 curnode, float x, float y, float z)
{
- float len = 0, xd, yd, zd;
- for (unsigned int idx=1; idx < curnode; ++idx)
- {
- xd = i_nodes[ idx ].x - i_nodes[ idx-1 ].x;
- yd = i_nodes[ idx ].y - i_nodes[ idx-1 ].y;
- zd = i_nodes[ idx ].z - i_nodes[ idx-1 ].z;
- len += sqrtf(xd*xd + yd*yd + zd*zd);
- }
+ float len = GetTotalLength(0,curnode);
if (curnode > 0)
{
- xd = x - i_nodes[curnode-1].x;
- yd = y - i_nodes[curnode-1].y;
- zd = z - i_nodes[curnode-1].z;
+ PathNode const& node = i_nodes[curnode-1];
+ float xd = x - node.x;
+ float yd = y - node.y;
+ float zd = z - node.z;
len += sqrtf(xd*xd + yd*yd + zd*zd);
}
return len;
}
- PathNode& operator[](const unsigned int idx) { return i_nodes[idx]; }
- const PathNode& operator()(const unsigned int idx) const { return i_nodes[idx]; }
+ PathNode& operator[](size_t idx) { return i_nodes[idx]; }
+ PathNode const& operator[](size_t idx) const { return i_nodes[idx]; }
+
+ void set(size_t idx, PathElem elem) { i_nodes[idx] = elem; }
protected:
- std::vector<PathNode> i_nodes;
+ std::vector<PathElem> i_nodes;
};
+
+typedef Path<SimplePathNode> SimplePath;
+
#endif
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp
index 0cbdd0bf975..078d272f62a 100644
--- a/src/server/game/Movement/Waypoints/WaypointManager.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "GridDefines.h"
#include "WaypointManager.h"
#include "ProgressBar.h"
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 71659a20be7..b19dc01ccd9 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -165,7 +165,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
// explicit removal from map
// beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
// so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
- //if (Map * map = MapManager::Instance().FindMap(cr->GetMapId()))
+ //if (Map * map = sMapMgr.FindMap(cr->GetMapId()))
// map->Remove(cr,false);
// delete respawn time for this creature
WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE guid = '%u'", guid);
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index 55ea98a2a1f..8aa19ef94df 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -19,7 +19,7 @@
#ifndef OUTDOOR_PVP_H_
#define OUTDOOR_PVP_H_
-#include "Util.h"
+#include "Utilities/Util.h"
#include "SharedDefines.h"
#include "ZoneScript.h"
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index 4a0baf49a04..1ec2bcb6a9c 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
@@ -25,9 +25,6 @@
#include "OutdoorPvPEP.h"
#include "ObjectMgr.h"
#include "Player.h"
-#include "Policies/SingletonImp.h"
-
-INSTANTIATE_SINGLETON_1(OutdoorPvPMgr);
OutdoorPvPMgr::OutdoorPvPMgr()
{
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
index 1e314bfd169..2a18a602da9 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
@@ -22,7 +22,7 @@
#define OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL 1000
#include "OutdoorPvP.h"
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
class Player;
class GameObject;
@@ -79,7 +79,7 @@ private:
uint32 m_UpdateTimer;
};
-#define sOutdoorPvPMgr Trinity::Singleton<OutdoorPvPMgr>::Instance()
+#define sOutdoorPvPMgr (*ACE_Singleton<OutdoorPvPMgr, ACE_Null_Mutex>::instance())
#endif /*OUTDOOR_PVP_MGR_H_*/
diff --git a/src/server/game/Pools/PoolHandler.cpp b/src/server/game/Pools/PoolMgr.cpp
index 0b5a55623e0..28fb67ad4dd 100644
--- a/src/server/game/Pools/PoolHandler.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
@@ -16,14 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "PoolHandler.h"
+#include "PoolMgr.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "Log.h"
#include "MapManager.h"
-#include "Policies/SingletonImp.h"
-
-INSTANTIATE_SINGLETON_1(PoolHandler);
////////////////////////////////////////////////////////////
// template class SpawnedPoolData
@@ -121,10 +118,10 @@ void PoolGroup<T>::AddEntry(PoolObject& poolitem, uint32 maxentries)
template <class T>
bool PoolGroup<T>::CheckPool() const
{
- if (EqualChanced.size() == 0)
+ if (!EqualChanced.size())
{
float chance = 0;
- for (uint32 i=0; i<ExplicitlyChanced.size(); ++i)
+ for (uint32 i = 0; i < ExplicitlyChanced.size(); ++i)
chance += ExplicitlyChanced[i].chance;
if (chance != 100 && chance != 0)
return false;
@@ -201,7 +198,7 @@ void PoolGroup<Creature>::Despawn1Object(uint32 guid)
{
objmgr.RemoveCreatureFromGrid(guid, data);
- if (Creature* pCreature = ObjectAccessor::Instance().GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
+ if (Creature* pCreature = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
pCreature->AddObjectToRemoveList();
}
}
@@ -214,7 +211,7 @@ void PoolGroup<GameObject>::Despawn1Object(uint32 guid)
{
objmgr.RemoveGameobjectFromGrid(guid, data);
- if (GameObject* pGameobject = ObjectAccessor::Instance().GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
+ if (GameObject* pGameobject = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
pGameobject->AddObjectToRemoveList();
}
}
@@ -297,7 +294,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
objmgr.AddCreatureToGrid(obj->guid, data);
// Spawn if necessary (loaded grids only)
- Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
+ Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
// We use spawn coords to spawn
if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
{
@@ -323,7 +320,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
objmgr.AddGameobjectToGrid(obj->guid, data);
// Spawn if necessary (loaded grids only)
// this base map checked as non-instanced and then only existed
- Map* map = const_cast<Map*>(MapManager::Instance().CreateBaseMap(data->mapid));
+ Map* map = const_cast<Map*>(sMapMgr.CreateBaseMap(data->mapid));
// We use current coords to unspawn, not spawn coords since creature can have changed grid
if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
{
@@ -355,7 +352,7 @@ template <>
void PoolGroup<Creature>::ReSpawn1Object(PoolObject* obj)
{
if (CreatureData const* data = objmgr.GetCreatureData(obj->guid))
- if (Creature* pCreature = ObjectAccessor::Instance().GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
+ if (Creature* pCreature = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_UNIT), (Creature*)NULL))
pCreature->GetMap()->Add(pCreature);
}
@@ -364,7 +361,7 @@ template <>
void PoolGroup<GameObject>::ReSpawn1Object(PoolObject* obj)
{
if (GameObjectData const* data = objmgr.GetGOData(obj->guid))
- if (GameObject* pGameobject = ObjectAccessor::Instance().GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
+ if (GameObject* pGameobject = sObjectAccessor.GetObjectInWorld(MAKE_NEW_GUID(obj->guid, data->id, HIGHGUID_GAMEOBJECT), (GameObject*)NULL))
pGameobject->GetMap()->Add(pGameobject);
}
@@ -375,13 +372,13 @@ void PoolGroup<Pool>::ReSpawn1Object(PoolObject* /*obj*/)
}
////////////////////////////////////////////////////////////
-// Methods of class PoolHandler
+// Methods of class PoolMgr
-PoolHandler::PoolHandler()
+PoolMgr::PoolMgr()
{
}
-void PoolHandler::LoadFromDB()
+void PoolMgr::LoadFromDB()
{
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT MAX(entry) FROM pool_template");
if (!result)
@@ -657,9 +654,9 @@ void PoolHandler::LoadFromDB()
}
// The initialize method will spawn all pools not in an event and not in another pool, this is why there is 2 left joins with 2 null checks
-void PoolHandler::Initialize()
+void PoolMgr::Initialize()
{
- QueryResult_AutoPtr result = WorldDatabase.Query("SELECT DISTINCT pool_template.entry FROM pool_template LEFT JOIN game_event_pool ON pool_template.entry=game_event_pool.pool_entry LEFT JOIN pool_pool ON pool_template.entry=pool_pool.pool_id WHERE game_event_pool.pool_entry IS NULL AND pool_pool.pool_id IS NULL");
+ QueryResult_AutoPtr result = WorldDatabase.Query("SELECT DISTINCT pool_template.entry, pool_pool.pool_id, pool_pool.mother_pool FROM pool_template LEFT JOIN game_event_pool ON pool_template.entry=game_event_pool.pool_entry LEFT JOIN pool_pool ON pool_template.entry=pool_pool.pool_id WHERE game_event_pool.pool_entry IS NULL");
uint32 count=0;
if (result)
{
@@ -667,13 +664,25 @@ void PoolHandler::Initialize()
{
Field *fields = result->Fetch();
uint16 pool_entry = fields[0].GetUInt16();
+ uint16 pool_pool_id = fields[1].GetUInt16();
+
if (!CheckPool(pool_entry))
{
- sLog.outErrorDb("Pool Id (%u) has all creatures or gameobjects with explicit chance sum <>100 and no equal chance defined. The pool system cannot pick one to spawn.", pool_entry);
+ if (pool_pool_id)
+ // The pool is a child pool in pool_pool table. Ideally we should remove it from the pool handler to ensure it never gets spawned,
+ // however that could recursively invalidate entire chain of mother pools. It can be done in the future but for now we'll do nothing.
+ sLog.outErrorDb("Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. This broken pool is a child pool of Id %u and cannot be safely removed.", pool_entry, fields[2].GetUInt16());
+ else
+ sLog.outErrorDb("Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. The pool will not be spawned.", pool_entry);
continue;
}
- SpawnPool(pool_entry);;
- count++;
+
+ // Don't spawn child pools, they are spawned recursively by their parent pools
+ if (!pool_pool_id)
+ {
+ SpawnPool(pool_entry);;
+ count++;
+ }
} while (result->NextRow());
}
@@ -683,7 +692,7 @@ void PoolHandler::Initialize()
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different
// If it's same, the creature is respawned only (added back to map)
template<>
-void PoolHandler::SpawnPool<Creature>(uint16 pool_id, uint32 db_guid)
+void PoolMgr::SpawnPool<Creature>(uint16 pool_id, uint32 db_guid)
{
if (!mPoolCreatureGroups[pool_id].isEmpty())
mPoolCreatureGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid);
@@ -692,7 +701,7 @@ void PoolHandler::SpawnPool<Creature>(uint16 pool_id, uint32 db_guid)
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different
// If it's same, the gameobject is respawned only (added back to map)
template<>
-void PoolHandler::SpawnPool<GameObject>(uint16 pool_id, uint32 db_guid)
+void PoolMgr::SpawnPool<GameObject>(uint16 pool_id, uint32 db_guid)
{
if (!mPoolGameobjectGroups[pool_id].isEmpty())
mPoolGameobjectGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, db_guid);
@@ -701,13 +710,13 @@ void PoolHandler::SpawnPool<GameObject>(uint16 pool_id, uint32 db_guid)
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different
// If it's same, the pool is respawned only
template<>
-void PoolHandler::SpawnPool<Pool>(uint16 pool_id, uint32 sub_pool_id)
+void PoolMgr::SpawnPool<Pool>(uint16 pool_id, uint32 sub_pool_id)
{
if (!mPoolPoolGroups[pool_id].isEmpty())
mPoolPoolGroups[pool_id].SpawnObject(mSpawnedData, mPoolTemplate[pool_id].MaxLimit, sub_pool_id);
}
-void PoolHandler::SpawnPool(uint16 pool_id)
+void PoolMgr::SpawnPool(uint16 pool_id)
{
SpawnPool<Pool>(pool_id, 0);
SpawnPool<GameObject>(pool_id, 0);
@@ -715,7 +724,7 @@ void PoolHandler::SpawnPool(uint16 pool_id)
}
// Call to despawn a pool, all gameobjects/creatures in this pool are removed
-void PoolHandler::DespawnPool(uint16 pool_id)
+void PoolMgr::DespawnPool(uint16 pool_id)
{
if (!mPoolCreatureGroups[pool_id].isEmpty())
mPoolCreatureGroups[pool_id].DespawnObject(mSpawnedData);
@@ -728,7 +737,7 @@ void PoolHandler::DespawnPool(uint16 pool_id)
}
// Method that check chance integrity of the creatures and gameobjects in this pool
-bool PoolHandler::CheckPool(uint16 pool_id) const
+bool PoolMgr::CheckPool(uint16 pool_id) const
{
return pool_id <= max_pool_id &&
mPoolGameobjectGroups[pool_id].CheckPool() &&
@@ -740,7 +749,7 @@ bool PoolHandler::CheckPool(uint16 pool_id) const
// Here we cache only the creature/gameobject whose guid is passed as parameter
// Then the spawn pool call will use this cache to decide
template<typename T>
-void PoolHandler::UpdatePool(uint16 pool_id, uint32 db_guid_or_pool_id)
+void PoolMgr::UpdatePool(uint16 pool_id, uint32 db_guid_or_pool_id)
{
if (uint16 motherpoolid = IsPartOfAPool<Pool>(pool_id))
SpawnPool<Pool>(motherpoolid, pool_id);
@@ -748,6 +757,6 @@ void PoolHandler::UpdatePool(uint16 pool_id, uint32 db_guid_or_pool_id)
SpawnPool<T>(pool_id, db_guid_or_pool_id);
}
-template void PoolHandler::UpdatePool<Pool>(uint16 pool_id, uint32 db_guid_or_pool_id);
-template void PoolHandler::UpdatePool<GameObject>(uint16 pool_id, uint32 db_guid_or_pool_id);
-template void PoolHandler::UpdatePool<Creature>(uint16 pool_id, uint32 db_guid_or_pool_id); \ No newline at end of file
+template void PoolMgr::UpdatePool<Pool>(uint16 pool_id, uint32 db_guid_or_pool_id);
+template void PoolMgr::UpdatePool<GameObject>(uint16 pool_id, uint32 db_guid_or_pool_id);
+template void PoolMgr::UpdatePool<Creature>(uint16 pool_id, uint32 db_guid_or_pool_id);
diff --git a/src/server/game/Pools/PoolHandler.h b/src/server/game/Pools/PoolMgr.h
index 0ba4cc7769f..71cae3e4a1b 100644
--- a/src/server/game/Pools/PoolHandler.h
+++ b/src/server/game/Pools/PoolMgr.h
@@ -19,8 +19,8 @@
#ifndef TRINITY_POOLHANDLER_H
#define TRINITY_POOLHANDLER_H
-#include "Platform/Define.h"
-#include "Policies/Singleton.h"
+#include "Define.h"
+#include "ace/Singleton.h"
#include "Creature.h"
#include "GameObject.h"
@@ -87,12 +87,13 @@ class PoolGroup
PoolObjectList EqualChanced;
};
-class PoolHandler
+class PoolMgr
{
- public:
- PoolHandler();
- ~PoolHandler() {};
+ friend class ACE_Singleton<PoolMgr, ACE_Null_Mutex>;
+ PoolMgr();
+ ~PoolMgr() {};
+ public:
void LoadFromDB();
void Initialize();
@@ -134,11 +135,11 @@ class PoolHandler
SpawnedPoolData mSpawnedData;
};
-#define poolhandler Trinity::Singleton<PoolHandler>::Instance()
+#define poolhandler (*ACE_Singleton<PoolMgr, ACE_Null_Mutex>::instance())
// Method that tell if the creature is part of a pool and return the pool id if yes
template<>
-inline uint16 PoolHandler::IsPartOfAPool<Creature>(uint32 db_guid) const
+inline uint16 PoolMgr::IsPartOfAPool<Creature>(uint32 db_guid) const
{
SearchMap::const_iterator itr = mCreatureSearchMap.find(db_guid);
if (itr != mCreatureSearchMap.end())
@@ -149,7 +150,7 @@ inline uint16 PoolHandler::IsPartOfAPool<Creature>(uint32 db_guid) const
// Method that tell if the gameobject is part of a pool and return the pool id if yes
template<>
-inline uint16 PoolHandler::IsPartOfAPool<GameObject>(uint32 db_guid) const
+inline uint16 PoolMgr::IsPartOfAPool<GameObject>(uint32 db_guid) const
{
SearchMap::const_iterator itr = mGameobjectSearchMap.find(db_guid);
if (itr != mGameobjectSearchMap.end())
@@ -160,7 +161,7 @@ inline uint16 PoolHandler::IsPartOfAPool<GameObject>(uint32 db_guid) const
// Method that tell if the pool is part of another pool and return the pool id if yes
template<>
-inline uint16 PoolHandler::IsPartOfAPool<Pool>(uint32 pool_id) const
+inline uint16 PoolMgr::IsPartOfAPool<Pool>(uint32 pool_id) const
{
SearchMap::const_iterator itr = mPoolSearchMap.find(pool_id);
if (itr != mPoolSearchMap.end())
diff --git a/src/server/game/PrecompiledHeaders/NixCorePCH.cpp b/src/server/game/PrecompiledHeaders/NixCorePCH.cpp
deleted file mode 100644
index e588392689e..00000000000
--- a/src/server/game/PrecompiledHeaders/NixCorePCH.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "pchdef.h" \ No newline at end of file
diff --git a/src/server/game/PrecompiledHeaders/ScriptPCH.cpp b/src/server/game/PrecompiledHeaders/ScriptPCH.cpp
index a80690d05da..41fecf3c60d 100644
--- a/src/server/game/PrecompiledHeaders/ScriptPCH.cpp
+++ b/src/server/game/PrecompiledHeaders/ScriptPCH.cpp
@@ -2,5 +2,5 @@
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
diff --git a/src/server/game/PrecompiledHeaders/ScriptPCH.h b/src/server/game/PrecompiledHeaders/ScriptPCH.h
index 1e83a88b87a..f8515e99f89 100644
--- a/src/server/game/PrecompiledHeaders/ScriptPCH.h
+++ b/src/server/game/PrecompiledHeaders/ScriptPCH.h
@@ -23,7 +23,7 @@
#include "DBCStores.h"
#include "ObjectMgr.h"
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#endif
diff --git a/src/server/game/PrecompiledHeaders/WinCorePCH.cpp b/src/server/game/PrecompiledHeaders/WinCorePCH.cpp
deleted file mode 100644
index e588392689e..00000000000
--- a/src/server/game/PrecompiledHeaders/WinCorePCH.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "pchdef.h" \ No newline at end of file
diff --git a/src/server/game/PrecompiledHeaders/WinCorePCH.h b/src/server/game/PrecompiledHeaders/WinCorePCH.h
deleted file mode 100644
index cd1ea4a418a..00000000000
--- a/src/server/game/PrecompiledHeaders/WinCorePCH.h
+++ /dev/null
@@ -1,14 +0,0 @@
-//add here most rarely modified headers to speed up debug build compilation
-#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it
-#include "Common.h"
-
-#include "MapManager.h"
-#include "Log.h"
-#include "ObjectAccessor.h"
-#include "ObjectDefines.h"
-#include "Database/SQLStorage.h"
-#include "Opcodes.h"
-#include "SharedDefines.h"
-#include "ObjectMgr.h"
-
-#include "ScriptedPch.h" \ No newline at end of file
diff --git a/src/server/game/PrecompiledHeaders/gamePCH.cpp b/src/server/game/PrecompiledHeaders/gamePCH.cpp
new file mode 100644
index 00000000000..11e501ec7f2
--- /dev/null
+++ b/src/server/game/PrecompiledHeaders/gamePCH.cpp
@@ -0,0 +1 @@
+#include "gamePCH.h"
diff --git a/src/server/game/PrecompiledHeaders/NixCorePCH.h b/src/server/game/PrecompiledHeaders/gamePCH.h
index 7252e980e7d..dd56e3fc16c 100644
--- a/src/server/game/PrecompiledHeaders/NixCorePCH.h
+++ b/src/server/game/PrecompiledHeaders/gamePCH.h
@@ -3,10 +3,10 @@
#include "Common.h"
#include "MapManager.h"
-#include "Log.h"
+#include "Logging/Log.h"
#include "ObjectAccessor.h"
#include "ObjectDefines.h"
-#include "Database/SQLStorage.h"
+#include "SQLStorage.h"
#include "Opcodes.h"
#include "SharedDefines.h"
#include "ObjectMgr.h"
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 2fdd1c58e9b..43ad7ffc114 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -175,7 +175,7 @@ uint32 Quest::XPValue(Player *pPlayer) const
if (!xpentry)
return 0;
- int diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20;
+ int32 diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20;
if (diffFactor < 1)
diffFactor = 1;
else if (diffFactor > 10)
@@ -204,3 +204,11 @@ int32 Quest::GetRewOrReqMoney() const
return int32(RewOrReqMoney * sWorld.getRate(RATE_DROP_MONEY));
}
+
+bool Quest::IsAllowedInRaid() const
+{
+ if (IsRaidQuest())
+ return true;
+
+ return sWorld.getConfig(CONFIG_QUEST_IGNORE_RAID);
+}
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index 20d4ca3d28d..64c9b47627d 100644
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -21,8 +21,9 @@
#ifndef TRINITYCORE_QUEST_H
#define TRINITYCORE_QUEST_H
-#include "Platform/Define.h"
-#include "Database/DatabaseEnv.h"
+#include "Define.h"
+#include "DatabaseEnv.h"
+#include "SharedDefines.h"
#include <string>
#include <vector>
@@ -244,6 +245,8 @@ class Quest
bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; }
bool IsDailyOrWeekly() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; }
+ bool IsRaidQuest() const { return Type == QUEST_TYPE_RAID || Type == QUEST_TYPE_RAID_10 || Type == QUEST_TYPE_RAID_25; }
+ bool IsAllowedInRaid() const;
// multiple values
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 2006c091287..cf378db2bac 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -14,11 +14,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "ScriptedPch.h"
-
-#ifdef WIN32
- #define DO_SCRIPTS
-#endif
+#include "ScriptPCH.h"
#ifdef DO_SCRIPTS
//custom
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 2dcfd258942..70b1ff6be64 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -2,17 +2,14 @@
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
-#include "ScriptedPch.h"
-#include "Config/Config.h"
-#include "Database/DatabaseEnv.h"
+#include "ScriptPCH.h"
+#include "Config.h"
+#include "DatabaseEnv.h"
#include "DBCStores.h"
#include "ObjectMgr.h"
#include "ProgressBar.h"
#include "ScriptLoader.h"
#include "ScriptSystem.h"
-#include "Policies/SingletonImp.h"
-
-INSTANTIATE_SINGLETON_1(ScriptMgr);
int num_sc_scripts;
Script *m_scripts[MAX_SCRIPTS];
@@ -45,22 +42,22 @@ ScriptMgr::~ScriptMgr()
void ScriptMgr::ScriptsInit()
{
//Trinity Script startup
- outstring_log(" _____ _ _ _ ____ _ _");
- outstring_log("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
- outstring_log(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
- outstring_log(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
- outstring_log(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
- outstring_log(" |___/ |_| ");
- outstring_log("");
- outstring_log("");
+ /*sLog.outString(" _____ _ _ _ ____ _ _");
+ sLog.outString("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
+ sLog.outString(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
+ sLog.outString(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
+ sLog.outString(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
+ sLog.outString(" |___/ |_| ");
+ sLog.outString("");
+ sLog.outString("");*/
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
- outstring_log("TSCR: Loading C++ scripts");
+ sLog.outString("Loading C++ scripts");
barGoLink bar(1);
bar.step();
- outstring_log("");
+ sLog.outString("");
for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
@@ -69,9 +66,9 @@ void ScriptMgr::ScriptsInit()
AddScripts();
- outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
+ sLog.outString(">> Loaded %i C++ Scripts.", num_sc_scripts);
- outstring_log(">> Load Overriden SQL Data.");
+ sLog.outString(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
@@ -82,13 +79,13 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
{
if (!pSource)
{
- error_log("TSCR: DoScriptText entry %i, invalid Source pointer.", iTextEntry);
+ sLog.outError("TSCR: DoScriptText entry %i, invalid Source pointer.", iTextEntry);
return;
}
if (iTextEntry >= 0)
{
- error_log("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);
+ sLog.outError("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;
}
@@ -96,11 +93,11 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (!pData)
{
- error_log("TSCR: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry);
+ sLog.outError("TSCR: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry);
return;
}
- debug_log("TSCR: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote);
+ sLog.outDebug("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)
{
@@ -109,7 +106,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
pSource->SendPlaySound(pData->uiSoundId, false);
}
else
- error_log("TSCR: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId);
+ sLog.outError("TSCR: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId);
}
if (pData->uiEmote)
@@ -117,7 +114,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER)
((Unit*)pSource)->HandleEmoteCommand(pData->uiEmote);
else
- error_log("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId());
+ sLog.outError("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId());
}
switch(pData->uiType)
@@ -139,7 +136,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID());
else
- error_log("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
+ sLog.outError("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
}
break;
case CHAT_TYPE_BOSS_WHISPER:
@@ -147,7 +144,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID(), true);
else
- error_log("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
+ sLog.outError("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
}
break;
case CHAT_TYPE_ZONE_YELL:
@@ -165,7 +162,7 @@ void Script::RegisterSelf()
// somebody forgot to allocate memory for a script by a method like this: newscript = new Script
if (m_scripts[i] == this)
{
- error_log("ScriptName: '%s' - Forgot to allocate memory, so this script and/or the script before that can't work.", Name.c_str());
+ sLog.outError("ScriptName: '%s' - Forgot to allocate memory, so this script and/or the script before that can't work.", Name.c_str());
// don't register it
// and don't delete it because its memory is used for another script
return;
@@ -200,14 +197,14 @@ void Script::RegisterSelf()
else
{
// TODO: write a better error message than this one :)
- error_log("ScriptName: '%s' already assigned with the same ScriptName, so the script can't work.", Name.c_str());
+ sLog.outError("ScriptName: '%s' already assigned with the same ScriptName, so the script can't work.", Name.c_str());
delete this;
}
}
else
{
if (Name.find("example") == std::string::npos)
- error_db_log("TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
+ sLog.outErrorDb("TrinityScript: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
delete this;
}
}
@@ -326,7 +323,7 @@ bool ScriptMgr::GossipHello (Player * pPlayer, Creature* pCreature)
bool ScriptMgr::GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
- debug_log("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pGossipSelect) return false;
@@ -337,7 +334,7 @@ bool ScriptMgr::GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSend
bool ScriptMgr::GossipSelectWithCode(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode)
{
- debug_log("TSCR: Gossip selection with code, sender: %d, action: %d", uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection with code, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false;
@@ -350,7 +347,7 @@ bool ScriptMgr::GOSelect(Player* pPlayer, GameObject* pGO, uint32 uiSender, uint
{
if (!pGO)
return false;
- debug_log("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection, sender: %d, action: %d", uiSender, uiAction);
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGOSelect) return false;
@@ -363,7 +360,7 @@ bool ScriptMgr::GOSelectWithCode(Player* pPlayer, GameObject* pGO, uint32 uiSend
{
if (!pGO)
return false;
- debug_log("TSCR: Gossip selection, sender: %d, action: %d",uiSender, uiAction);
+ sLog.outDebug("TSCR: Gossip selection, sender: %d, action: %d",uiSender, uiAction);
Script *tmpscript = m_scripts[pGO->GetGOInfo()->ScriptId];
if (!tmpscript || !tmpscript->pGOSelectWithCode) return false;
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index ed7200d5786..bcb26381809 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -9,9 +9,9 @@
#define SC_SCRIPTMGR_H
#include "Common.h"
-#include "Platform/CompilerDefs.h"
+#include "CompilerDefs.h"
#include "DBCStructure.h"
-#include "Config/ConfigEnv.h"
+#include "ConfigEnv.h"
class Player;
class Creature;
@@ -94,8 +94,9 @@ struct Script
class ScriptMgr
{
+ friend class ACE_Singleton<ScriptMgr, ACE_Null_Mutex>;
+ ScriptMgr();
public:
- ScriptMgr();
~ScriptMgr();
void ScriptsInit();
@@ -158,6 +159,6 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit *pTarget = NULL);
#define FUNC_PTR(name, callconvention, returntype, parameters) typedef returntype(callconvention *name)parameters;
#endif
-#define sScriptMgr Trinity::Singleton<ScriptMgr>::Instance()
+#define sScriptMgr (*ACE_Singleton<ScriptMgr, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index 0037b100412..54a14228bc1 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -18,11 +18,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptSystem.h"
#include "ProgressBar.h"
#include "ObjectMgr.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
SystemMgr::SystemMgr()
{
@@ -43,24 +43,24 @@ void SystemMgr::LoadVersion()
{
Field* pFields = Result->Fetch();
- outstring_log("TSCR: Database version is: %s", pFields[0].GetString());
- outstring_log("");
+ sLog.outString("TSCR: Database version is: %s", pFields[0].GetString());
+ sLog.outString("");
}
else
{
- error_log("TSCR: Missing `version`.`script_version` information.");
- outstring_log("");
+ sLog.outError("TSCR: Missing `version`.`script_version` information.");
+ sLog.outString("");
}
}
void SystemMgr::LoadScriptTexts()
{
- outstring_log("TSCR: Loading Script Texts...");
+ sLog.outString("TSCR: Loading Script Texts...");
LoadTrinityStrings(WorldDatabase,"script_texts",TEXT_SOURCE_RANGE,1+(TEXT_SOURCE_RANGE*2));
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM script_texts");
- outstring_log("TSCR: Loading Script Texts additional data...");
+ sLog.outString("TSCR: Loading Script Texts additional data...");
if (Result)
{
@@ -81,52 +81,52 @@ void SystemMgr::LoadScriptTexts()
if (iId >= 0)
{
- error_db_log("TSCR: Entry %i in table `script_texts` is not a negative value.", iId);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` is not a negative value.", iId);
continue;
}
if (iId > TEXT_SOURCE_RANGE || iId <= TEXT_SOURCE_RANGE*2)
{
- error_db_log("TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` is out of accepted entry range for table.", iId);
continue;
}
if (pTemp.uiSoundId)
{
if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId))
- error_db_log("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
}
if (!GetLanguageDescByID(pTemp.uiLanguage))
- error_db_log("TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
if (pTemp.uiType > CHAT_TYPE_ZONE_YELL)
- error_db_log("TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
+ sLog.outErrorDb("TSCR: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
m_mTextDataMap[iId] = pTemp;
++uiCount;
} while (Result->NextRow());
- outstring_log("");
- outstring_log(">> Loaded %u additional Script Texts data.", uiCount);
+ sLog.outString("");
+ sLog.outString(">> Loaded %u additional Script Texts data.", uiCount);
}
else
{
barGoLink bar(1);
bar.step();
- outstring_log("");
- outstring_log(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
+ sLog.outString("");
+ sLog.outString(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty.");
}
}
void SystemMgr::LoadScriptTextsCustom()
{
- outstring_log("TSCR: Loading Custom Texts...");
+ sLog.outString("TSCR: Loading Custom Texts...");
LoadTrinityStrings(WorldDatabase,"custom_texts",TEXT_SOURCE_RANGE*2,1+(TEXT_SOURCE_RANGE*3));
QueryResult_AutoPtr Result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM custom_texts");
- outstring_log("TSCR: Loading Custom Texts additional data...");
+ sLog.outString("TSCR: Loading Custom Texts additional data...");
if (Result)
{
@@ -147,41 +147,41 @@ void SystemMgr::LoadScriptTextsCustom()
if (iId >= 0)
{
- error_db_log("TSCR: Entry %i in table `custom_texts` is not a negative value.", iId);
+ sLog.outErrorDb("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)
{
- error_db_log("TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId);
continue;
}
if (pTemp.uiSoundId)
{
if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId))
- error_db_log("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId);
}
if (!GetLanguageDescByID(pTemp.uiLanguage))
- error_db_log("TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage);
if (pTemp.uiType > CHAT_TYPE_ZONE_YELL)
- error_db_log("TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
+ sLog.outErrorDb("TSCR: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType);
m_mTextDataMap[iId] = pTemp;
++uiCount;
} while (Result->NextRow());
- outstring_log("");
- outstring_log(">> Loaded %u additional Custom Texts data.", uiCount);
+ sLog.outString("");
+ sLog.outString(">> Loaded %u additional Custom Texts data.", uiCount);
}
else
{
barGoLink bar(1);
bar.step();
- outstring_log("");
- outstring_log(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
+ sLog.outString("");
+ sLog.outString(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty.");
}
}
@@ -197,7 +197,7 @@ void SystemMgr::LoadScriptWaypoints()
if (Result)
uiCreatureCount = Result->GetRowCount();
- outstring_log("TSCR: Loading Script Waypoints for %u creature(s)...", uiCreatureCount);
+ sLog.outString("TSCR: Loading Script Waypoints for %u creature(s)...", uiCreatureCount);
Result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
@@ -224,25 +224,25 @@ void SystemMgr::LoadScriptWaypoints()
if (!pCInfo)
{
- error_db_log("TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", pTemp.uiCreatureEntry);
+ sLog.outErrorDb("TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", pTemp.uiCreatureEntry);
continue;
}
if (!pCInfo->ScriptID)
- error_db_log("TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", pTemp.uiCreatureEntry);
+ sLog.outErrorDb("TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", pTemp.uiCreatureEntry);
m_mPointMoveMap[uiEntry].push_back(pTemp);
++uiNodeCount;
} while (Result->NextRow());
- outstring_log("");
- outstring_log(">> Loaded %u Script Waypoint nodes.", uiNodeCount);
+ sLog.outString("");
+ sLog.outString(">> Loaded %u Script Waypoint nodes.", uiNodeCount);
}
else
{
barGoLink bar(1);
bar.step();
- outstring_log("");
- outstring_log(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
+ sLog.outString("");
+ sLog.outString(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
}
}
diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp
index a9c8101d7b1..13fbd266ea4 100644
--- a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp
@@ -18,17 +18,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "zlib/zlib.h"
-
+#include "zlib.h"
#include "AddonHandler.h"
-#include "Database/DatabaseEnv.h"
-#include "Policies/SingletonImp.h"
+#include "DatabaseEnv.h"
#include "Opcodes.h"
-
#include "Log.h"
-INSTANTIATE_SINGLETON_1( AddonHandler );
-
AddonHandler::AddonHandler()
{
}
diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.h b/src/server/game/Server/Protocol/Handlers/AddonHandler.h
index 999785339bc..68620751da3 100644
--- a/src/server/game/Server/Protocol/Handlers/AddonHandler.h
+++ b/src/server/game/Server/Protocol/Handlers/AddonHandler.h
@@ -22,20 +22,21 @@
#define __ADDONHANDLER_H
#include "Common.h"
-#include "Config/ConfigEnv.h"
-#include "Policies/Singleton.h"
-
+#include "ConfigEnv.h"
+#include "ace/Singleton.h"
#include "WorldPacket.h"
class AddonHandler
{
+ /* Construction */
+ friend class ACE_Singleton<AddonHandler, ACE_Null_Mutex>;
+ AddonHandler();
+
public:
- /* Construction */
- AddonHandler();
~AddonHandler();
- //built addon packet
+ //build addon packet
bool BuildAddonPacket(WorldPacket* Source, WorldPacket* Target);
};
-#define sAddOnHandler Trinity::Singleton<AddonHandler>::Instance()
+#define sAddOnHandler ACE_Singleton<AddonHandler, ACE_Null_Mutex>::instance()
#endif
diff --git a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
index 3a9a14524f9..3c26e17bddd 100644
--- a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
@@ -22,7 +22,7 @@
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "ArenaTeam.h"
#include "Log.h"
@@ -91,7 +91,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
if (!normalizePlayerName(Invitedname))
return;
- player = ObjectAccessor::Instance().FindPlayerByName(Invitedname.c_str());
+ player = sObjectAccessor.FindPlayerByName(Invitedname.c_str());
}
if (!player)
diff --git a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp
index 0f615579cb6..442fe55b194 100644
--- a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp
@@ -18,8 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Policies/SingletonImp.h"
-
#include "ObjectMgr.h" // for normalizePlayerName
#include "ChannelMgr.h"
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 416827d73ea..ca08d197c3f 100644
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -25,9 +25,9 @@
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
-#include "Auth/md5.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/DatabaseImpl.h"
+#include "MD5.h"
+#include "DatabaseEnv.h"
+#include "DatabaseImpl.h"
#include "ArenaTeam.h"
#include "Chat.h"
@@ -719,7 +719,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->GetOrientation());
}
- ObjectAccessor::Instance().AddObject(pCurrChar);
+ sObjectAccessor.AddObject(pCurrChar);
//sLog.outDebug("Player %s added to Map.",pCurrChar->GetName());
pCurrChar->SendInitialPacketsAfterAddToMap();
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
index 88e2b5473a5..85f37b52478 100644
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
@@ -24,7 +24,7 @@
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "CellImpl.h"
#include "Chat.h"
diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
index f973bc24722..4f43ad3c30b 100644
--- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Opcodes.h"
#include "Log.h"
#include "WorldPacket.h"
@@ -126,7 +126,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
if (group)
{
// not have permissions for invite
- if (group->isRaidGroup() && !group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID()))
+ if (!group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID()))
{
SendPartyResult(PARTY_OP_INVITE, "", ERR_NOT_LEADER);
return;
@@ -534,8 +534,10 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
std::string name;
uint8 groupNr;
recv_data >> name;
-
recv_data >> groupNr;
+
+ if (groupNr >= MAX_RAID_SUBGROUPS)
+ return;
/** error handling **/
uint64 senderGuid = GetPlayer()->GetGUID();
@@ -546,16 +548,18 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
return;
/********************/
- Player *movedPlayer=objmgr.GetPlayer(name.c_str());
- if (!movedPlayer)
- return;
-
- //Do not allow leader to change group of player in combat
- if (movedPlayer->isInCombat())
- return;
+ Player *movedPlayer = objmgr.GetPlayer(name.c_str());
+ if (movedPlayer)
+ {
+ //Do not allow leader to change group of player in combat
+ if (movedPlayer->isInCombat())
+ return;
- // everything's fine, do it
- group->ChangeMembersGroup(movedPlayer, groupNr);
+ // everything's fine, do it
+ group->ChangeMembersGroup(movedPlayer, groupNr);
+ }
+ else
+ group->ChangeMembersGroup(objmgr.GetPlayerGUIDByName(name.c_str()), groupNr);
}
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
@@ -593,7 +597,7 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data)
/** error handling **/
uint64 senderGuid = GetPlayer()->GetGUID();
- if (!group->IsLeader(senderGuid) && group->IsAssistant(senderGuid))
+ if (!group->IsLeader(senderGuid) && !group->IsAssistant(senderGuid))
return;
/********************/
diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
index 6803fe63a86..4db1961e7af 100644
--- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
@@ -75,7 +75,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
recvPacket >> Invitedname;
if (normalizePlayerName(Invitedname))
- player = ObjectAccessor::Instance().FindPlayerByName(Invitedname.c_str());
+ player = sObjectAccessor.FindPlayerByName(Invitedname.c_str());
if (!player)
{
diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
index 53aede43492..39c3b61a445 100644
--- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
@@ -263,6 +263,12 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data)
return;
}
+ if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_INDESTRUCTIBLE))
+ {
+ _player->SendEquipError(EQUIP_ERR_CANT_DROP_SOULBOUND, NULL, NULL);
+ return;
+ }
+
if (count)
{
uint32 i_count = count;
@@ -766,7 +772,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
++count;
// reputation discount
- int32 price = uint32(floor(pProto->BuyPrice * discountMod));
+ int32 price = crItem->IsGoldRequired(pProto) ? uint32(floor(pProto->BuyPrice * discountMod)) : 0;
data << uint32(vendorslot+1); // client expects counting to start at 1
data << uint32(crItem->item);
@@ -1003,40 +1009,25 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
recv_data.read_skip<uint64>(); // guid
sLog.outDebug("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
- ItemPrototype const *pProto = objmgr.GetItemPrototype(itemid);
- if (pProto)
+ ItemSetNameEntry const *pName = objmgr.GetItemSetNameEntry(itemid);
+ if (pName)
{
- std::string Name;
- Name = pProto->Name1;
-
+ std::string Name = pName->name;
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- ItemLocale const *il = objmgr.GetItemLocale(pProto->ItemId);
- if (il)
- {
- if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty())
- Name = il->Name[loc_idx];
- }
+ ItemSetNameLocale const *isnl = objmgr.GetItemSetNameLocale(itemid);
+ if (isnl)
+ if (isnl->Name.size() > size_t(loc_idx) && !isnl->Name[loc_idx].empty())
+ Name = isnl->Name[loc_idx];
}
- // guess size
- WorldPacket data(SMSG_ITEM_NAME_QUERY_RESPONSE, (4+10));
- data << uint32(pProto->ItemId);
+
+ WorldPacket data(SMSG_ITEM_NAME_QUERY_RESPONSE, (4+Name.size()+1+4));
+ data << uint32(itemid);
data << Name;
- data << uint32(pProto->InventoryType);
+ data << uint32(pName->InventoryType);
SendPacket(&data);
- return;
}
-// This is a BS check, there are lots of items listed in Item.dbc that do not even exist on official -- so we can NEVER get the data for them.
-// If you *really* want to spam your error log -- uncomment this.
-/* else
- {
- // listed in dbc or not expected to exist unknown item
- if (sItemStore.LookupEntry(itemid))
- sLog.outErrorDb("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (item listed in Item.dbc but not exist in DB)", itemid);
- else
- sLog.outError("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (unknown item, not listed in Item.dbc)", itemid);
- } */
}
void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
index ea6f892c126..4225a99c72b 100644
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
@@ -20,8 +20,8 @@
#include "Common.h"
#include "Language.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/DatabaseImpl.h"
+#include "DatabaseEnv.h"
+#include "DatabaseImpl.h"
#include "WorldPacket.h"
#include "Opcodes.h"
#include "Log.h"
@@ -30,12 +30,12 @@
#include "World.h"
#include "ObjectMgr.h"
#include "WorldSession.h"
-#include "Auth/BigNumber.h"
-#include "Auth/Sha1.h"
+#include "BigNumber.h"
+#include "SHA1.h"
#include "UpdateData.h"
#include "LootMgr.h"
#include "Chat.h"
-#include <zlib/zlib.h>
+#include "zlib.h"
#include "ObjectAccessor.h"
#include "Object.h"
#include "BattleGround.h"
@@ -232,8 +232,8 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
data << uint32(clientcount); // clientcount place holder, listed count
data << uint32(clientcount); // clientcount place holder, online count
- ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
- HashMapHolder<Player>::MapType& m = ObjectAccessor::Instance().GetPlayers();
+ ACE_GUARD(ACE_Thread_Mutex, g, *HashMapHolder<Player>::GetLock());
+ HashMapHolder<Player>::MapType& m = sObjectAccessor.GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
if (security == SEC_PLAYER)
@@ -374,7 +374,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
return;
}
- //instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in TrinityCore.conf
+ //instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in worldserver.conf
if (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() ||
GetSecurity() >= sWorld.getConfig(CONFIG_INSTANT_LOGOUT))
{
@@ -931,11 +931,13 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (!at)
return;
- if (!GetPlayer()->Satisfy(objmgr.GetAccessRequirement(at->access_id), at->target_mapId, true))
- return;
+ // MapManager::CanPlayerEnter() calls players->Satisfy() so this is not needed here
+ // if (!GetPlayer()->Satisfy(objmgr.GetAccessRequirement(at->access_id), at->target_mapId, true))
+ // return;
+ // Check only if target map != current player's map
// check if player can enter instance : instance not full, and raid instance not in encounter fight
- if (!MapManager::Instance().CanPlayerEnter(at->target_mapId, GetPlayer(), false))
+ if (GetPlayer()->GetMapId() != at->target_mapId && !sMapMgr.CanPlayerEnter(at->target_mapId, GetPlayer(), false))
return;
GetPlayer()->TeleportTo(at->target_mapId,at->target_X,at->target_Y,at->target_Z,at->target_Orientation,TELE_TO_NOT_LEAVE_TRANSPORT);
diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
index 1148fe174fc..a31361e9275 100644
--- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
@@ -28,7 +28,7 @@
#include "Vehicle.h"
#include "SpellAuras.h"
#include "MapManager.h"
-#include "Transports.h"
+#include "Transport.h"
#include "BattleGround.h"
#include "WaypointMovementGenerator.h"
#include "InstanceSaveMgr.h"
@@ -75,7 +75,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
}
// relocate the player to the teleport destination
- Map * newMap = MapManager::Instance().CreateMap(loc.GetMapId(), GetPlayer(), 0);
+ Map * newMap = sMapMgr.CreateMap(loc.GetMapId(), GetPlayer(), 0);
// the CanEnter checks are done in TeleporTo but conditions may change
// while the player is in transit, for example the map may get full
if (!newMap || !newMap->CanEnter(GetPlayer()))
@@ -198,7 +198,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
uint32 flags, time;
recv_data >> flags >> time;
DEBUG_LOG("Guid " UI64FMTD, guid);
- DEBUG_LOG("Flags %u, time %u", flags, time/IN_MILISECONDS);
+ DEBUG_LOG("Flags %u, time %u", flags, time/IN_MILLISECONDS);
Unit *mover = _player->m_mover;
Player *plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL;
@@ -302,7 +302,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
if (plMover && !plMover->GetTransport())
{
// elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just unmount if the guid can be found in the transport list
- for (MapManager::TransportSet::const_iterator iter = MapManager::Instance().m_Transports.begin(); iter != MapManager::Instance().m_Transports.end(); ++iter)
+ for (MapManager::TransportSet::const_iterator iter = sMapMgr.m_Transports.begin(); iter != sMapMgr.m_Transports.end(); ++iter)
{
if ((*iter)->GetGUID() == movementInfo.t_guid)
{
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
index 4e73fb381af..00da860db89 100644
--- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
@@ -20,7 +20,7 @@
#include "Common.h"
#include "Language.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "Opcodes.h"
diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
index 1067ad49bc4..fc2c3baf735 100644
--- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
@@ -20,8 +20,8 @@
#include "Common.h"
#include "Language.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/DatabaseImpl.h"
+#include "DatabaseEnv.h"
+#include "DatabaseImpl.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "Opcodes.h"
@@ -302,7 +302,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
if (corpseMapEntry->IsDungeon() && corpseMapEntry->entrance_map >= 0)
{
// if corpse map have entrance
- if (Map const* entranceMap = MapManager::Instance().CreateBaseMap(corpseMapEntry->entrance_map))
+ if (Map const* entranceMap = sMapMgr.CreateBaseMap(corpseMapEntry->entrance_map))
{
mapid = corpseMapEntry->entrance_map;
x = corpseMapEntry->entrance_x;
@@ -536,4 +536,4 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
}
SendPacket(&data);
-} \ No newline at end of file
+}
diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
index 8043f5ed149..d513dc4b84c 100644
--- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
@@ -422,7 +422,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
if (!pOriginalPlayer)
return;
- if (pQuest->GetType() == QUEST_TYPE_RAID)
+ if (pQuest->IsRaidQuest())
{
if (!_player->IsInSameRaidWith(pOriginalPlayer))
return;
diff --git a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp b/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp
index 312065f9f13..e6ad7a4c9e4 100644
--- a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Opcodes.h"
#include "Log.h"
#include "Player.h"
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
index b8a4a127824..a526c61a5e7 100644
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
@@ -538,11 +538,7 @@ void WorldSession::HandleSpellClick(WorldPacket & recv_data)
// TODO: Unit::SetCharmedBy: 28782 is not in world but 0 is trying to charm it! -> crash
if (!unit->IsInWorld())
- {
- sLog.outCrash("Spell click target %u is not in world!", unit->GetEntry());
- assert(false);
return;
- }
SpellClickInfoMapBounds clickPair = objmgr.GetSpellClickInfoMapBounds(unit->GetEntry());
for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
index b0660527f71..3402c99ce8b 100644
--- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "Opcodes.h"
@@ -222,7 +222,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->SetCurrentNodeAfterTeleport();
- Path::PathNode const& node = flight->GetPath()[flight->GetCurrentNode()];
+ TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id,node.x,node.y,node.z,GetPlayer()->GetOrientation());
@@ -259,6 +259,8 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
GetPlayer()->m_taxi.ClearTaxiDestinations(); // clear problematic path and next
return;
}
+ else
+ GetPlayer()->m_taxi.ClearTaxiDestinations(); // not destinations, clear source node
GetPlayer()->CleanupAfterTaxiFlight();
GetPlayer()->SetFallInformation(0, GetPlayer()->GetPositionZ());
diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp
index 448a6e0520d..6191b88587e 100644
--- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp
@@ -27,37 +27,11 @@
#include "Opcodes.h"
#include "Player.h"
#include "Item.h"
+#include "Spell.h"
#include "SocialMgr.h"
#include "Language.h"
-enum TradeStatus
-{
- TRADE_STATUS_BUSY = 0,
- TRADE_STATUS_BEGIN_TRADE = 1,
- TRADE_STATUS_OPEN_WINDOW = 2,
- TRADE_STATUS_TRADE_CANCELED = 3,
- TRADE_STATUS_TRADE_ACCEPT = 4,
- TRADE_STATUS_BUSY_2 = 5,
- TRADE_STATUS_NO_TARGET = 6,
- TRADE_STATUS_BACK_TO_TRADE = 7,
- TRADE_STATUS_TRADE_COMPLETE = 8,
- // 9?
- TRADE_STATUS_TARGET_TO_FAR = 10,
- TRADE_STATUS_WRONG_FACTION = 11,
- TRADE_STATUS_CLOSE_WINDOW = 12,
- // 13?
- TRADE_STATUS_IGNORE_YOU = 14,
- TRADE_STATUS_YOU_STUNNED = 15,
- TRADE_STATUS_TARGET_STUNNED = 16,
- TRADE_STATUS_YOU_DEAD = 17,
- TRADE_STATUS_TARGET_DEAD = 18,
- TRADE_STATUS_YOU_LOGOUT = 19,
- TRADE_STATUS_TARGET_LOGOUT = 20,
- TRADE_STATUS_TRIAL_ACCOUNT = 21, // Trial accounts can not perform that action
- TRADE_STATUS_ONLY_CONJURED = 22 // You can only trade conjured items... (cross realm BG related).
-};
-
-void WorldSession::SendTradeStatus(uint32 status)
+void WorldSession::SendTradeStatus(TradeStatus status)
{
WorldPacket data;
@@ -106,68 +80,50 @@ void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
// recvPacket.print_storage();
}
-void WorldSession::SendUpdateTrade()
+void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
{
- Item *item = NULL;
+ TradeData* view_trade = trader_data ? _player->GetTradeData()->GetTraderData() : _player->GetTradeData();
- if (!_player || !_player->pTrader)
- return;
+ WorldPacket data(SMSG_TRADE_STATUS_EXTENDED, 1+4+4+4+4+4+7*(1+4+4+4+4+8+4+4+4+4+8+4+4+4+4+4+4));
+ data << uint8(trader_data); // 1 means traders data, 0 means own
+ data << uint32(0); // added in 2.4.0, this value must be equal to value from TRADE_STATUS_OPEN_WINDOW status packet (different value for different players to block multiple trades?)
+ data << uint32(TRADE_SLOT_COUNT); // trade slots count/number?, = next field in most cases
+ data << uint32(TRADE_SLOT_COUNT); // trade slots count/number?, = prev field in most cases
+ data << uint32(view_trade->GetMoney()); // trader gold
+ data << uint32(view_trade->GetSpell()); // spell casted on lowest slot item
- // reset trade status
- if (_player->acceptTrade)
- {
- _player->acceptTrade = false;
- SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
- }
-
- if (_player->pTrader->acceptTrade)
- {
- _player->pTrader->acceptTrade = false;
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
- }
-
- WorldPacket data(SMSG_TRADE_STATUS_EXTENDED, (100)); // guess size
- data << (uint8) 1; // can be different (only seen 0 and 1)
- data << (uint32) 0; // added in 2.4.0, this value must be equal to value from TRADE_STATUS_OPEN_WINDOW status packet (different value for different players to block multiple trades?)
- data << (uint32) TRADE_SLOT_COUNT; // trade slots count/number?, = next field in most cases
- data << (uint32) TRADE_SLOT_COUNT; // trade slots count/number?, = prev field in most cases
- data << (uint32) _player->pTrader->tradeGold; // trader gold
- data << (uint32) 0; // spell casted on lowest slot item
+ Item *item = NULL;
for (uint8 i = 0; i < TRADE_SLOT_COUNT; ++i)
{
- item = (_player->pTrader->tradeItems[i] != 0 ? _player->pTrader->GetItemByGuid(_player->pTrader->tradeItems[i]) : NULL);
+ data << uint8(i); // trade slot number, if not specified, then end of packet
- data << (uint8) i; // trade slot number, if not specified, then end of packet
-
- if (item)
+ if (Item* item = view_trade->GetItem(TradeSlots(i)))
{
- data << (uint32) item->GetProto()->ItemId; // entry
- // display id
- data << (uint32) item->GetProto()->DisplayInfoID;
- // stack count
- data << (uint32) item->GetUInt32Value(ITEM_FIELD_STACK_COUNT);
- data << (uint32) 0; // probably gift=1, created_by=0?
- // gift creator
- data << (uint64) item->GetUInt64Value(ITEM_FIELD_GIFTCREATOR);
- data << (uint32) item->GetEnchantmentId(PERM_ENCHANTMENT_SLOT);
- for (uint8 j = 0; j < 3; ++j)
- data << (uint32) 0; // enchantment id (permanent/gems?)
+ data << uint32(item->GetProto()->ItemId); // entry
+ data << uint32(item->GetProto()->DisplayInfoID);// display id
+ data << uint32(item->GetCount()); // stack count
+ // wrapped: hide stats but show giftcreator name
+ data << uint32(item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED) ? 1 : 0);
+ data << uint64(item->GetUInt64Value(ITEM_FIELD_GIFTCREATOR));
+ // perm. enchantment and gems
+ data << uint32(item->GetEnchantmentId(PERM_ENCHANTMENT_SLOT));
+ for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
+ data << uint32(item->GetEnchantmentId(EnchantmentSlot(enchant_slot)));
// creator
- data << (uint64) item->GetUInt64Value(ITEM_FIELD_CREATOR);
- data << (uint32) item->GetSpellCharges(); // charges
- data << (uint32) item->GetItemSuffixFactor(); // SuffixFactor
- // random properties id
- data << (int32) item->GetItemRandomPropertyId();
- data << (uint32) item->GetProto()->LockID; // lock id
+ data << uint64(item->GetUInt64Value(ITEM_FIELD_CREATOR));
+ data << uint32(item->GetSpellCharges()); // charges
+ data << uint32(item->GetItemSuffixFactor()); // SuffixFactor
+ data << uint32(item->GetItemRandomPropertyId());// random properties id
+ data << uint32(item->GetProto()->LockID); // lock id
// max durability
- data << (uint32) item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY);
+ data << uint32(item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY));
// durability
- data << (uint32) item->GetUInt32Value(ITEM_FIELD_DURABILITY);
+ data << uint32(item->GetUInt32Value(ITEM_FIELD_DURABILITY));
}
else
{
- for (uint8 j = 0; j < 18; j++)
+ for (uint8 j = 0; j < 18; ++j)
data << uint32(0);
}
}
@@ -179,11 +135,15 @@ void WorldSession::SendUpdateTrade()
void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
{
- for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ Player* trader = _player->GetTrader();
+ if (!trader)
+ return;
+
+ for (uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i)
{
ItemPosCountVec traderDst;
ItemPosCountVec playerDst;
- bool traderCanTrade = (myItems[i] == NULL || _player->pTrader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, myItems[i], false) == EQUIP_ERR_OK);
+ bool traderCanTrade = (myItems[i] == NULL || trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, myItems[i], false) == EQUIP_ERR_OK);
bool playerCanTrade = (hisItems[i] == NULL || _player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, hisItems[i], false) == EQUIP_ERR_OK);
if (traderCanTrade && playerCanTrade)
{
@@ -196,25 +156,25 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
sLog.outDebug("partner storing: %u",myItems[i]->GetGUIDLow());
if (_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
- sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
- _player->GetName(),_player->GetSession()->GetAccountId(),
- myItems[i]->GetProto()->Name1,myItems[i]->GetEntry(),myItems[i]->GetCount(),
- _player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId());
+ sLog.outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
+ _player->GetName(), _player->GetSession()->GetAccountId(),
+ myItems[i]->GetProto()->Name1, myItems[i]->GetEntry(), myItems[i]->GetCount(),
+ trader->GetName(), trader->GetSession()->GetAccountId());
}
// store
- _player->pTrader->MoveItemToInventory(traderDst, myItems[i], true, true);
+ trader->MoveItemToInventory(traderDst, myItems[i], true, true);
}
if (hisItems[i])
{
// logging
sLog.outDebug("player storing: %u",hisItems[i]->GetGUIDLow());
- if (_player->pTrader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
+ if (trader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
- sLog.outCommand(_player->pTrader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
- _player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId(),
- hisItems[i]->GetProto()->Name1,hisItems[i]->GetEntry(),hisItems[i]->GetCount(),
- _player->GetName(),_player->GetSession()->GetAccountId());
+ sLog.outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
+ trader->GetName(), trader->GetSession()->GetAccountId(),
+ hisItems[i]->GetProto()->Name1, hisItems[i]->GetEntry(), hisItems[i]->GetCount(),
+ _player->GetName(), _player->GetSession()->GetAccountId());
}
// store
@@ -239,8 +199,8 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
{
if (!playerCanTrade)
sLog.outError("player can't store item: %u",hisItems[i]->GetGUIDLow());
- if (_player->pTrader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false) == EQUIP_ERR_OK)
- _player->pTrader->MoveItemToInventory(traderDst, hisItems[i], true, true);
+ if (trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false) == EQUIP_ERR_OK)
+ trader->MoveItemToInventory(traderDst, hisItems[i], true, true);
else
sLog.outError("trader can't take item back: %u",hisItems[i]->GetGUIDLow());
}
@@ -250,135 +210,231 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
//==============================================================
+static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **myItems, Item **hisItems)
+{
+ myTrade->SetInAcceptProcess(true);
+ hisTrade->SetInAcceptProcess(true);
+
+ // store items in local list and set 'in-trade' flag
+ for(uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i)
+ {
+ if (Item* item = myTrade->GetItem(TradeSlots(i)))
+ {
+ DEBUG_LOG("player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
+ //Can return NULL
+ myItems[i] = item;
+ myItems[i]->SetInTrade();
+ }
+
+ if (Item* item = hisTrade->GetItem(TradeSlots(i)))
+ {
+ DEBUG_LOG("partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
+ hisItems[i] = item;
+ hisItems[i]->SetInTrade();
+ }
+ }
+}
+
+static void clearAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade)
+{
+ myTrade->SetInAcceptProcess(false);
+ hisTrade->SetInAcceptProcess(false);
+}
+
+static void clearAcceptTradeMode(Item **myItems, Item **hisItems)
+{
+ // clear 'in-trade' flag
+ for (uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i)
+ {
+ if (myItems[i])
+ myItems[i]->SetInTrade(false);
+ if (hisItems[i])
+ hisItems[i]->SetInTrade(false);
+ }
+}
+
void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
{
+ TradeData* my_trade = _player->m_trade;
+ if (!my_trade)
+ return;
+
+ Player* trader = my_trade->GetTrader();
+
+ TradeData* his_trade = trader->m_trade;
+ if (!his_trade)
+ return;
+
Item *myItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
Item *hisItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
- bool myCanCompleteTrade=true,hisCanCompleteTrade=true;
+ bool myCanCompleteTrade = true, hisCanCompleteTrade = true;
- if (!GetPlayer()->pTrader)
- return;
+ // set before checks for propertly undo at problems (it already set in to client)
+ my_trade->SetAccepted(true);
// not accept case incorrect money amount
- if (_player->tradeGold > _player->GetMoney())
+ if (my_trade->GetMoney() > _player->GetMoney())
{
SendNotification(LANG_NOT_ENOUGH_GOLD);
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
- _player->acceptTrade = false;
+ my_trade->SetAccepted(false, true);
return;
}
// not accept case incorrect money amount
- if (_player->pTrader->tradeGold > _player->pTrader->GetMoney())
+ if (his_trade->GetMoney() > trader->GetMoney())
{
- _player->pTrader->GetSession()->SendNotification(LANG_NOT_ENOUGH_GOLD);
- SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
- _player->pTrader->acceptTrade = false;
+ trader->GetSession()->SendNotification(LANG_NOT_ENOUGH_GOLD);
+ his_trade->SetAccepted(false, true);
return;
}
// not accept if some items now can't be trade (cheating)
- for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ for (uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i)
{
- if (_player->tradeItems[i] != 0)
+ if (Item* item = my_trade->GetItem(TradeSlots(i)))
{
- if (Item* item =_player->GetItemByGuid(_player->tradeItems[i]))
+ if (!item->CanBeTraded())
{
- if (!item->CanBeTraded())
- {
- SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
- return;
- }
+ SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
+ return;
}
}
- if (_player->pTrader->tradeItems[i] != 0)
+
+ if (Item* item = his_trade->GetItem(TradeSlots(i)))
{
- if (Item* item =_player->pTrader->GetItemByGuid(_player->pTrader->tradeItems[i]))
+ if (!item->CanBeTraded())
{
- if (!item->CanBeTraded())
- {
- SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
- return;
- }
+ SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
+ return;
}
}
}
- _player->acceptTrade = true;
- if (_player->pTrader->acceptTrade)
+ if (his_trade->IsAccepted())
{
- // inform partner client
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_ACCEPT);
+ setAcceptTradeMode(my_trade, his_trade, myItems, hisItems);
+
+ Spell* my_spell = NULL;
+ SpellCastTargets my_targets;
+
+ Spell* his_spell = NULL;
+ SpellCastTargets his_targets;
- // store items in local list and set 'in-trade' flag
- for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ // not accept if spell can't be casted now (cheating)
+ if (uint32 my_spell_id = my_trade->GetSpell())
{
- if (_player->tradeItems[i] != 0)
+ SpellEntry const* spellEntry = sSpellStore.LookupEntry(my_spell_id);
+ Item* castItem = my_trade->GetSpellCastItem();
+
+ if (!spellEntry || !his_trade->GetItem(TRADE_SLOT_NONTRADED) ||
+ my_trade->HasSpellCastItem() && !castItem)
{
- //Can return NULL
- myItems[i] = _player->GetItemByGuid(_player->tradeItems[i]);
- if (myItems[i])
- {
- myItems[i]->SetInTrade();
- sLog.outDebug("Player trade item bag: %u slot: %u", myItems[i]->GetBagSlot(), myItems[i]->GetSlot());
- }
+ clearAcceptTradeMode(my_trade, his_trade);
+ clearAcceptTradeMode(myItems, hisItems);
+
+ my_trade->SetSpell(0);
+ return;
}
- if (_player->pTrader->tradeItems[i] != 0)
+
+ my_spell = new Spell(_player, spellEntry, true);
+ my_spell->m_CastItem = castItem;
+ my_targets.setTradeItemTarget(_player);
+ my_spell->m_targets = my_targets;
+
+ SpellCastResult res = my_spell->CheckCast(true);
+ if (res != SPELL_CAST_OK)
{
- //Can return NULL
- hisItems[i]=_player->pTrader->GetItemByGuid(_player->pTrader->tradeItems[i]);
- if (hisItems[i])
- {
- hisItems[i]->SetInTrade();
- sLog.outDebug("Player trade item bag: %u slot: %u", hisItems[i]->GetBagSlot(), hisItems[i]->GetSlot());
- }
+ my_spell->SendCastResult(res);
+
+ clearAcceptTradeMode(my_trade, his_trade);
+ clearAcceptTradeMode(myItems, hisItems);
+
+ delete my_spell;
+ my_trade->SetSpell(0);
+ return;
}
}
- // test if item will fit in each inventory
- hisCanCompleteTrade = (_player->pTrader->CanStoreItems(myItems,TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK);
- myCanCompleteTrade = (_player->CanStoreItems(hisItems,TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK);
-
- // clear 'in-trade' flag
- for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ // not accept if spell can't be casted now (cheating)
+ if (uint32 his_spell_id = his_trade->GetSpell())
{
- if (myItems[i]) myItems[i]->SetInTrade(false);
- if (hisItems[i]) hisItems[i]->SetInTrade(false);
+ SpellEntry const* spellEntry = sSpellStore.LookupEntry(his_spell_id);
+ Item* castItem = his_trade->GetSpellCastItem();
+
+ if (!spellEntry || !my_trade->GetItem(TRADE_SLOT_NONTRADED) || his_trade->HasSpellCastItem() && !castItem)
+ {
+ delete my_spell;
+ his_trade->SetSpell(0);
+
+ clearAcceptTradeMode(my_trade, his_trade);
+ clearAcceptTradeMode(myItems, hisItems);
+ return;
+ }
+
+ his_spell = new Spell(trader, spellEntry, true);
+ his_spell->m_CastItem = castItem;
+ his_targets.setTradeItemTarget(trader);
+ his_spell->m_targets = his_targets;
+
+ SpellCastResult res = his_spell->CheckCast(true);
+ if (res != SPELL_CAST_OK)
+ {
+ his_spell->SendCastResult(res);
+
+ clearAcceptTradeMode(my_trade, his_trade);
+ clearAcceptTradeMode(myItems, hisItems);
+
+ delete my_spell;
+ delete his_spell;
+
+ his_trade->SetSpell(0);
+ return;
+ }
}
+ // inform partner client
+ trader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_ACCEPT);
+
+ // test if item will fit in each inventory
+ hisCanCompleteTrade = (trader->CanStoreItems(myItems, TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK);
+ myCanCompleteTrade = (_player->CanStoreItems(hisItems, TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK);
+
+ clearAcceptTradeMode(myItems, hisItems);
+
// in case of missing space report error
if (!myCanCompleteTrade)
{
+ clearAcceptTradeMode(my_trade, his_trade);
+
SendNotification(LANG_NOT_FREE_TRADE_SLOTS);
- GetPlayer()->pTrader->GetSession()->SendNotification(LANG_NOT_PARTNER_FREE_TRADE_SLOTS);
- SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
+ trader->GetSession()->SendNotification(LANG_NOT_PARTNER_FREE_TRADE_SLOTS);
+ my_trade->SetAccepted(false);
+ his_trade->SetAccepted(false);
return;
}
else if (!hisCanCompleteTrade)
{
+ clearAcceptTradeMode(my_trade, his_trade);
+
SendNotification(LANG_NOT_PARTNER_FREE_TRADE_SLOTS);
- GetPlayer()->pTrader->GetSession()->SendNotification(LANG_NOT_FREE_TRADE_SLOTS);
- SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
+ trader->GetSession()->SendNotification(LANG_NOT_FREE_TRADE_SLOTS);
+ my_trade->SetAccepted(false);
+ his_trade->SetAccepted(false);
return;
}
// execute trade: 1. remove
- for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i)
+ for (uint8 i = 0; i < TRADE_SLOT_TRADED_COUNT; ++i)
{
- Item* iPtr = NULL;
if (myItems[i])
{
myItems[i]->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, _player->GetGUID());
- iPtr = _player->GetItemByGuid(_player->tradeItems[i]);
- _player->MoveItemFromInventory(iPtr->GetBagSlot(), iPtr->GetSlot(), true);
+ _player->MoveItemFromInventory(myItems[i]->GetBagSlot(), myItems[i]->GetSlot(), true);
}
if (hisItems[i])
{
- hisItems[i]->SetUInt64Value(ITEM_FIELD_GIFTCREATOR,_player->pTrader->GetGUID());
- iPtr = _player->pTrader->GetItemByGuid(_player->pTrader->tradeItems[i]);
- _player->pTrader->MoveItemFromInventory(iPtr->GetBagSlot(), iPtr->GetSlot(), true);
+ hisItems[i]->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, trader->GetGUID());
+ trader->MoveItemFromInventory(hisItems[i]->GetBagSlot(), hisItems[i]->GetSlot(), true);
}
}
@@ -388,72 +444,80 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
// logging money
if (sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
- if (_player->GetSession()->GetSecurity() > SEC_PLAYER && _player->tradeGold > 0)
+ if (_player->GetSession()->GetSecurity() > SEC_PLAYER && my_trade->GetMoney() > 0)
{
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
- _player->GetName(),_player->GetSession()->GetAccountId(),
- _player->tradeGold,
- _player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId());
+ _player->GetName(), _player->GetSession()->GetAccountId(),
+ my_trade->GetMoney(),
+ trader->GetName(), trader->GetSession()->GetAccountId());
}
- if (_player->pTrader->GetSession()->GetSecurity() > SEC_PLAYER && _player->pTrader->tradeGold > 0)
+ if (trader->GetSession()->GetSecurity() > SEC_PLAYER && his_trade->GetMoney() > 0)
{
- sLog.outCommand(_player->pTrader->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
- _player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId(),
- _player->pTrader->tradeGold,
- _player->GetName(),_player->GetSession()->GetAccountId());
+ sLog.outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
+ trader->GetName(), trader->GetSession()->GetAccountId(),
+ his_trade->GetMoney(),
+ _player->GetName(), _player->GetSession()->GetAccountId());
}
}
// update money
- _player->ModifyMoney(-int32(_player->tradeGold));
- _player->ModifyMoney(_player->pTrader->tradeGold);
- _player->pTrader->ModifyMoney(-int32(_player->pTrader->tradeGold));
- _player->pTrader->ModifyMoney(_player->tradeGold);
+ _player->ModifyMoney(-int32(my_trade->GetMoney()));
+ _player->ModifyMoney(his_trade->GetMoney());
+ trader->ModifyMoney(-int32(his_trade->GetMoney()));
+ trader->ModifyMoney(my_trade->GetMoney());
+
+ if (my_spell)
+ my_spell->prepare(&my_targets);
+
+ if (his_spell)
+ his_spell->prepare(&his_targets);
- _player->ClearTrade();
- _player->pTrader->ClearTrade();
+ // cleanup
+ clearAcceptTradeMode(my_trade, his_trade);
+ delete _player->m_trade;
+ _player->m_trade = NULL;
+ delete trader->m_trade;
+ trader->m_trade = NULL;
// desynchronized with the other saves here (SaveInventoryAndGoldToDB() not have own transaction guards)
CharacterDatabase.BeginTransaction();
_player->SaveInventoryAndGoldToDB();
- _player->pTrader->SaveInventoryAndGoldToDB();
+ trader->SaveInventoryAndGoldToDB();
CharacterDatabase.CommitTransaction();
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_COMPLETE);
+ trader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_COMPLETE);
SendTradeStatus(TRADE_STATUS_TRADE_COMPLETE);
-
- _player->pTrader->pTrader = NULL;
- _player->pTrader = NULL;
}
else
{
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_ACCEPT);
+ trader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_ACCEPT);
}
}
void WorldSession::HandleUnacceptTradeOpcode(WorldPacket& /*recvPacket*/)
{
- if (!GetPlayer()->pTrader)
+ TradeData* my_trade = _player->GetTradeData();
+ if (!my_trade)
return;
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
- _player->acceptTrade = false;
+ my_trade->SetAccepted(false, true);
}
void WorldSession::HandleBeginTradeOpcode(WorldPacket& /*recvPacket*/)
{
- if (!_player->pTrader)
+ TradeData* my_trade = _player->m_trade;
+ if (!my_trade)
return;
- _player->pTrader->GetSession()->SendTradeStatus(TRADE_STATUS_OPEN_WINDOW);
- _player->pTrader->ClearTrade();
-
+ my_trade->GetTrader()->GetSession()->SendTradeStatus(TRADE_STATUS_OPEN_WINDOW);
SendTradeStatus(TRADE_STATUS_OPEN_WINDOW);
- _player->ClearTrade();
}
void WorldSession::SendCancelTrade()
{
+ if (m_playerRecentlyLogout)
+ return;
+
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
}
@@ -466,7 +530,7 @@ void WorldSession::HandleCancelTradeOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
{
- if (GetPlayer()->pTrader)
+ if (GetPlayer()->m_trade)
return;
uint64 ID;
@@ -511,7 +575,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
return;
}
- if (pOther == GetPlayer() || pOther->pTrader)
+ if (pOther == GetPlayer() || pOther->m_trade)
{
SendTradeStatus(TRADE_STATUS_BUSY);
return;
@@ -566,35 +630,30 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
}
// OK start trade
- _player->pTrader = pOther;
- pOther->pTrader =_player;
+ _player->m_trade = new TradeData(_player, pOther);
+ pOther->m_trade = new TradeData(pOther, _player);
WorldPacket data(SMSG_TRADE_STATUS, 12);
- data << (uint32) TRADE_STATUS_BEGIN_TRADE;
- data << (uint64)_player->GetGUID();
- _player->pTrader->GetSession()->SendPacket(&data);
+ data << uint32(TRADE_STATUS_BEGIN_TRADE);
+ data << uint64(_player->GetGUID());
+ pOther->GetSession()->SendPacket(&data);
}
void WorldSession::HandleSetTradeGoldOpcode(WorldPacket& recvPacket)
{
- if (!_player->pTrader)
- return;
-
uint32 gold;
-
recvPacket >> gold;
- // gold can be incorrect, but this is checked at trade finished.
- _player->tradeGold = gold;
+ TradeData* my_trade = _player->GetTradeData();
+ if (!my_trade)
+ return;
- _player->pTrader->GetSession()->SendUpdateTrade();
+ // gold can be incorrect, but this is checked at trade finished.
+ my_trade->SetMoney(gold);
}
void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
{
- if (!_player->pTrader)
- return;
-
// send update
uint8 tradeSlot;
uint8 bag;
@@ -604,6 +663,10 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
recvPacket >> bag;
recvPacket >> slot;
+ TradeData* my_trade = _player->GetTradeData();
+ if (!my_trade)
+ return;
+
// invalid slot number
if (tradeSlot >= TRADE_SLOT_COUNT)
{
@@ -612,7 +675,7 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
}
// check cheating, can't fail with correct client operations
- Item* item = _player->GetItemByPos(bag,slot);
+ Item* item = _player->GetItemByPos(bag, slot);
if (!item || (tradeSlot != TRADE_SLOT_NONTRADED && !item->CanBeTraded()))
{
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
@@ -622,35 +685,29 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
uint64 iGUID = item->GetGUID();
// prevent place single item into many trade slots using cheating and client bugs
- for (int i = 0; i < TRADE_SLOT_COUNT; ++i)
+ if (my_trade->HasItem(iGUID))
{
- if (_player->tradeItems[i] == iGUID)
- {
- // cheating attempt
- SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
- return;
- }
+ // cheating attempt
+ SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
+ return;
}
- _player->tradeItems[tradeSlot] = iGUID;
-
- _player->pTrader->GetSession()->SendUpdateTrade();
+ my_trade->SetItem(TradeSlots(tradeSlot), item);
}
void WorldSession::HandleClearTradeItemOpcode(WorldPacket& recvPacket)
{
- if (!_player->pTrader)
- return;
-
uint8 tradeSlot;
recvPacket >> tradeSlot;
+ TradeData* my_trade = _player->m_trade;
+ if (!my_trade)
+ return;
+
// invalid slot number
if (tradeSlot >= TRADE_SLOT_COUNT)
return;
- _player->tradeItems[tradeSlot] = 0;
-
- _player->pTrader->GetSession()->SendUpdateTrade();
+ my_trade->SetItem(TradeSlots(tradeSlot), NULL);
}
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 0b67199b4ea..8a45aa9e910 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -361,7 +361,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x14A*/ { "SMSG_ATTACKERSTATEUPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x14B*/ { "SMSG_BATTLEFIELD_PORT_DENIED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x14C*/ { "SMSG_DAMAGE_DONE_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x14D*/ { "SMSG_DAMAGE_TAKEN_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x14D*/ { "SMSG_UNIT_SPELLCAST_START", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x14E*/ { "SMSG_CANCEL_COMBAT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x14F*/ { "SMSG_SPELLBREAKLOG", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x150*/ { "SMSG_SPELLHEALLOG", STATUS_NEVER, &WorldSession::Handle_ServerSide },
@@ -570,7 +570,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x21B*/ { "SMSG_GMTICKET_SYSTEMSTATUS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x21C*/ { "CMSG_SPIRIT_HEALER_ACTIVATE", STATUS_LOGGEDIN, &WorldSession::HandleSpiritHealerActivateOpcode},
/*0x21D*/ { "CMSG_SET_STAT_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
- /*0x21E*/ { "SMSG_SET_REST_START_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x21E*/ { "SMSG_QUEST_FORCE_REMOVE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x21F*/ { "CMSG_SKILL_BUY_STEP", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x220*/ { "CMSG_SKILL_BUY_RANK", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x221*/ { "CMSG_XP_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
@@ -1148,8 +1148,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x45D*/ { "CMSG_FORCE_PITCH_RATE_CHANGE_ACK", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x45E*/ { "SMSG_SPLINE_SET_PITCH_RATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x45F*/ { "SMSG_MOVE_ABANDON_TRANSPORT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x460*/ { "MSG_MOVE_ABANDON_TRANSPORT", STATUS_NEVER, &WorldSession::Handle_NULL },
- /*0x461*/ { "CMSG_MOVE_ABANDON_TRANSPORT_ACK", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x460*/ { "SMSG_CALENDAR_UPDATE_INVITE_LIST", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x461*/ { "SMSG_CALENDAR_UPDATE_INVITE_LIST2", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x462*/ { "CMSG_UPDATE_MISSILE_TRAJECTORY", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x463*/ { "SMSG_UPDATE_ACCOUNT_DATA_COMPLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x464*/ { "SMSG_TRIGGER_MOVIE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
@@ -1165,7 +1165,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x46E*/ { "CMSG_COMPLETE_ACHIEVEMENT_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x46F*/ { "SMSG_QUESTUPDATE_ADD_PVP_KILL", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x470*/ { "CMSG_SET_CRITERIA_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
- /*0x471*/ { "SMSG_GROUP_SWAP_FAILED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x471*/ { "SMSG_CALENDAR_UPDATE_INVITE_LIST3", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x472*/ { "CMSG_UNITANIMTIER_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x473*/ { "CMSG_CHAR_CUSTOMIZE", STATUS_AUTHED, &WorldSession::HandleCharCustomize },
/*0x474*/ { "SMSG_CHAR_CUSTOMIZE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
@@ -1258,13 +1258,13 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x4CB*/ { "UMSG_UNKNOWN_1227", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4CC*/ { "UMSG_UNKNOWN_1228", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4CD*/ { "SMSG_MULTIPLE_PACKETS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x4CE*/ { "SMSG_UNKNOWN_1230", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x4CF*/ { "CMSG_UNKNOWN_1231_ACK", STATUS_NEVER, &WorldSession::Handle_NULL },
- /*0x4D0*/ { "SMSG_UNKNOWN_1232", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x4D1*/ { "CMSG_UNKNOWN_1233_ACK", STATUS_NEVER, &WorldSession::Handle_NULL },
- /*0x4D2*/ { "SMSG_UNKNOWN_1234", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x4D3*/ { "SMSG_UNKNOWN_1235", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x4D4*/ { "SMSG_UNKNOWN_1236", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x4CE*/ { "SMSG_FORCE_UNK1_SPEED_CHANGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x4CF*/ { "CMSG_FORCE_UNK1_SPEED_CHANGE_ACK", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4D0*/ { "SMSG_FORCE_UNK2_SPEED_CHANGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x4D1*/ { "CMSG_FORCE_UNK2_SPEED_CHANGE_ACK", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4D2*/ { "MSG_MOVE_UNKNOWN_1234", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x4D3*/ { "SMSG_SPLINE_MOVE_UNKNOWN_1235", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x4D4*/ { "SMSG_SPLINE_MOVE_UNKNOWN_1236", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x4D5*/ { "CMSG_EQUIPMENT_SET_USE", STATUS_LOGGEDIN, &WorldSession::HandleEquipmentSetUse },
/*0x4D6*/ { "SMSG_EQUIPMENT_SET_USE_RESULT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x4D7*/ { "UMSG_UNKNOWN_1239", STATUS_NEVER, &WorldSession::Handle_NULL },
@@ -1275,7 +1275,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x4DC*/ { "UMSG_UNKNOWN_1244", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4DD*/ { "UMSG_UNKNOWN_1245", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4DE*/ { "SMSG_BATTLEFIELD_MGR_ENTRY_INVITE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
- /*0x4DF*/ { "CMSG_BATTLEFIELD_MGR_ENTRY_INVITE_RESPONS", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4DF*/ { "CMSG_BATTLEFIELD_MGR_ENTRY_INVITE_RESPONSE", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4E0*/ { "SMSG_BATTLEFIELD_MGR_ENTERED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x4E1*/ { "SMSG_BATTLEFIELD_MGR_QUEUE_INVITE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x4E2*/ { "CMSG_BATTLEFIELD_MGR_QUEUE_INVITE_RESPONSE", STATUS_NEVER, &WorldSession::Handle_NULL },
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index 4ae6931c3f5..44a06ddb8d3 100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -1343,7 +1343,11 @@ enum Opcodes
SMSG_UNKNOWN_1304 = 0x518, // something with player movement (move event 58?), speed packet
UMSG_UNKNOWN_1305 = 0x519, // not found
UMSG_UNKNOWN_1306 = 0x51A, // not found
- NUM_MSG_TYPES = 0x51B
+ CMSG_COMMENTATOR_SKIRMISH_QUEUE_COMMAND = 0x51B, // lua: CommentatorSetSkirmishMatchmakingMode/CommentatorRequestSkirmishQueueData/CommentatorRequestSkirmishMode/CommentatorStartSkirmishMatch
+ SMSG_UNKNOWN_1308 = 0x51C, // event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST, CGCommentator::QueueNode
+ SMSG_UNKNOWN_1309 = 0x51D, // event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST
+ SMSG_UNKNOWN_1310 = 0x51E, // some compressed packet?
+ NUM_MSG_TYPES = 0x51F
};
/// Player state
diff --git a/src/server/game/Server/Protocol/WorldLog.cpp b/src/server/game/Server/Protocol/WorldLog.cpp
index 7c6c4020336..e66bff0b504 100644
--- a/src/server/game/Server/Protocol/WorldLog.cpp
+++ b/src/server/game/Server/Protocol/WorldLog.cpp
@@ -23,14 +23,9 @@
*/
#include "WorldLog.h"
-#include "Policies/SingletonImp.h"
-#include "Config/ConfigEnv.h"
+#include "ConfigEnv.h"
#include "Log.h"
-#define CLASS_LOCK Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>
-INSTANTIATE_SINGLETON_2(WorldLog, CLASS_LOCK);
-INSTANTIATE_CLASS_MUTEX(WorldLog, ACE_Thread_Mutex);
-
WorldLog::WorldLog() : i_file(NULL)
{
Initialize();
@@ -67,7 +62,7 @@ void WorldLog::outTimestampLog(char const *fmt, ...)
{
if (LogWorld())
{
- Guard guard(*this);
+ ACE_GUARD(ACE_Thread_Mutex, Guard, Lock);
ASSERT(i_file);
Log::outTimestamp(i_file);
@@ -95,7 +90,7 @@ void WorldLog::outLog(char const *fmt, ...)
{
if (LogWorld())
{
- Guard guard(*this);
+ ACE_GUARD(ACE_Thread_Mutex, Guard, Lock);
ASSERT(i_file);
va_list args;
@@ -117,6 +112,3 @@ void WorldLog::outLog(char const *fmt, ...)
va_end(ap2);
}
}
-
-#define sWorldLog WorldLog::Instance()
-
diff --git a/src/server/game/Server/Protocol/WorldLog.h b/src/server/game/Server/Protocol/WorldLog.h
index 4ee9bb178ec..fd228ce4559 100644
--- a/src/server/game/Server/Protocol/WorldLog.h
+++ b/src/server/game/Server/Protocol/WorldLog.h
@@ -26,19 +26,19 @@
#define TRINITY_WORLDLOG_H
#include "Common.h"
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
#include "Errors.h"
#include <stdarg.h>
/// %Log packets to a file
-class WorldLog : public Trinity::Singleton<WorldLog, Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex> >
+class WorldLog
{
- friend class Trinity::OperatorNew<WorldLog>;
+ friend class ACE_Singleton<WorldLog, ACE_Thread_Mutex>;
WorldLog();
WorldLog(const WorldLog &);
WorldLog& operator=(const WorldLog &);
- typedef Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>::Lock Guard;
+ ACE_Thread_Mutex Lock;
/// Close the file in destructor
~WorldLog();
@@ -57,7 +57,7 @@ class WorldLog : public Trinity::Singleton<WorldLog, Trinity::ClassLevelLockable
bool m_dbWorld;
};
-#define sWorldLog WorldLog::Instance()
+#define sWorldLog (*ACE_Singleton<WorldLog, ACE_Thread_Mutex>::instance())
#endif
/// @}
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index bc737717840..6de0cb27381 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -24,7 +24,7 @@
#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Log.h"
#include "Opcodes.h"
#include "WorldPacket.h"
@@ -40,7 +40,7 @@
#include "OutdoorPvPMgr.h"
#include "MapManager.h"
#include "SocialMgr.h"
-#include "zlib/zlib.h"
+#include "zlib.h"
#include "ScriptMgr.h"
#include "LFGMgr.h"
@@ -82,7 +82,6 @@ WorldSession::~WorldSession()
delete packet;
LoginDatabase.PExecute("UPDATE account SET online = 0 WHERE id = %u;", GetAccountId());
- CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = %u;", GetAccountId());
}
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index c17f3e3f3e6..dbcc94f071b 100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -205,12 +205,12 @@ class WorldSession
void SendBattlegGroundList(uint64 guid, BattleGroundTypeId bgTypeId);
- void SendTradeStatus(uint32 status);
+ void SendTradeStatus(TradeStatus status);
void SendCancelTrade();
void SendStablePet(uint64 guid);
void SendPetitionQueryOpcode(uint64 petitionguid);
- void SendUpdateTrade();
+ void SendUpdateTrade(bool trader_data = true);
//pet
void SendPetNameQuery(uint64 guid, uint32 petnumber);
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index c07b369d0b9..f7b128fb761 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -38,9 +38,9 @@
#include "SharedDefines.h"
#include "ByteBuffer.h"
#include "Opcodes.h"
-#include "Database/DatabaseEnv.h"
-#include "Auth/BigNumber.h"
-#include "Auth/Sha1.h"
+#include "DatabaseEnv.h"
+#include "BigNumber.h"
+#include "SHA1.h"
#include "WorldSession.h"
#include "WorldSocketMgr.h"
#include "Log.h"
@@ -120,8 +120,7 @@ m_LastPingTime(ACE_Time_Value::zero)
WorldSocket::~WorldSocket (void)
{
- if (m_RecvWPct)
- delete m_RecvWPct;
+ delete m_RecvWPct;
if (m_OutBuffer)
m_OutBuffer->release();
@@ -769,7 +768,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
// NOTE: ATM the socket is singlethread, have this in mind ...
uint8 digest[20];
uint32 clientSeed;
- uint32 unk2, unk3;
+ uint32 unk2, unk3, unk5, unk6, unk7;
uint64 unk4;
uint32 BuiltNumberClient;
uint32 id, security;
@@ -798,6 +797,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
recvPacket >> account;
recvPacket >> unk3;
recvPacket >> clientSeed;
+ recvPacket >> unk5 >> unk6 >> unk7;
recvPacket >> unk4;
recvPacket.read (digest, 20);
diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h
index 70654274215..d07e9a3f2e4 100644
--- a/src/server/game/Server/WorldSocket.h
+++ b/src/server/game/Server/WorldSocket.h
@@ -43,7 +43,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Common.h"
-#include "Auth/AuthCrypt.h"
+#include "AuthCrypt.h"
class ACE_Message_Block;
class WorldPacket;
diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp
index c23d08e6f78..6ccb30b64ef 100644
--- a/src/server/game/Server/WorldSocketMgr.cpp
+++ b/src/server/game/Server/WorldSocketMgr.cpp
@@ -42,8 +42,8 @@
#include "Log.h"
#include "Common.h"
-#include "Config/ConfigEnv.h"
-#include "Database/DatabaseEnv.h"
+#include "ConfigEnv.h"
+#include "DatabaseEnv.h"
#include "WorldSocket.h"
/**
@@ -84,8 +84,7 @@ class ReactorRunnable : protected ACE_Task_Base
Stop();
Wait();
- if (m_Reactor)
- delete m_Reactor;
+ delete m_Reactor;
}
void Stop()
@@ -220,11 +219,8 @@ WorldSocketMgr::WorldSocketMgr() :
WorldSocketMgr::~WorldSocketMgr()
{
- if (m_NetThreads)
- delete [] m_NetThreads;
-
- if (m_Acceptor)
- delete m_Acceptor;
+ delete [] m_NetThreads;
+ delete m_Acceptor;
}
int
diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp
index 163f7a2bf7e..fb34cff150c 100644
--- a/src/server/game/Skills/SkillDiscovery.cpp
+++ b/src/server/game/Skills/SkillDiscovery.cpp
@@ -18,10 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Log.h"
#include "ProgressBar.h"
-#include "Policies/SingletonImp.h"
#include "World.h"
#include "Util.h"
#include "SkillDiscovery.h"
diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp
index cc50d3683f4..982556c0557 100644
--- a/src/server/game/Skills/SkillExtraItems.cpp
+++ b/src/server/game/Skills/SkillExtraItems.cpp
@@ -19,7 +19,7 @@
*/
#include "SkillExtraItems.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "Log.h"
#include "ProgressBar.h"
#include "Player.h"
diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h
index 8b21062e371..a3a037ae5a8 100644
--- a/src/server/game/Spells/Auras/SpellAuraDefines.h
+++ b/src/server/game/Spells/Auras/SpellAuraDefines.h
@@ -344,8 +344,8 @@ enum AuraType
SPELL_AURA_297 = 297,
SPELL_AURA_298 = 298,
SPELL_AURA_299 = 299,
- SPELL_AURA_300 = 300,
- SPELL_AURA_301 = 301,
+ SPELL_AURA_SHARE_DAMAGE_PCT = 300,
+ SPELL_AURA_SCHOOL_HEAL_ABSORB = 301,
SPELL_AURA_302 = 302,
SPELL_AURA_303 = 303,
SPELL_AURA_304 = 304,
@@ -354,12 +354,12 @@ enum AuraType
SPELL_AURA_307 = 307,
SPELL_AURA_308 = 308,
SPELL_AURA_309 = 309,
- SPELL_AURA_RANGED_AP_ATTACKER_CREATURES_BONUS = 310,
+ SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE = 310,
SPELL_AURA_311 = 311,
SPELL_AURA_312 = 312,
SPELL_AURA_313 = 313,
- SPELL_AURA_314 = 314,
- SPELL_AURA_315 = 315,
+ SPELL_AURA_PREVENT_RESSURECTION = 314,
+ SPELL_AURA_UNDERWATER_WALKING = 315,
SPELL_AURA_PERIODIC_HASTE = 316,
TOTAL_AURAS = 317
};
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 6a3e52d9646..7a70155a23e 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -271,7 +271,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleNULL, //214 Tamed Pet Passive
&AuraEffect::HandleArenaPreparation, //215 SPELL_AURA_ARENA_PREPARATION
&AuraEffect::HandleModCastingSpeed, //216 SPELL_AURA_HASTE_SPELLS
- &AuraEffect::HandleUnused, //217 unused (3.2.0)
+ &AuraEffect::HandleNULL, //217 69106 - killing spree helper - unknown use
&AuraEffect::HandleAuraModRangedHaste, //218 SPELL_AURA_HASTE_RANGED
&AuraEffect::HandleModManaRegen, //219 SPELL_AURA_MOD_MANA_REGEN_FROM_STAT
&AuraEffect::HandleModRatingFromStat, //220 SPELL_AURA_MOD_RATING_FROM_STAT
@@ -347,36 +347,36 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
&AuraEffect::HandleAuraModCritPct, //290 SPELL_AURA_MOD_CRIT_PCT
&AuraEffect::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_XP_QUEST_PCT implemented in Player::RewardQuest
&AuraEffect::HandleNULL, //292 call stabled pet
- &AuraEffect::HandleNULL, //293 2 test spells
+ &AuraEffect::HandleNULL, //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, //296 2 spells
- &AuraEffect::HandleNULL, //297 1 spell (counter spell school?)
- &AuraEffect::HandleNULL, //298 unused
+ &AuraEffect::HandleNULL, //295 0 spells in 3.3.5
+ &AuraEffect::HandleNULL, //296 6 spells, something vehicle or character display related
+ &AuraEffect::HandleNULL, //297 Spirit Burst spells
+ &AuraEffect::HandleNULL, //298 70569 - Strangulating, maybe prevents talk or cast
&AuraEffect::HandleNULL, //299 unused
- &AuraEffect::HandleNULL, //300 3 spells (share damage?)
- &AuraEffect::HandleNULL, //301 5 spells
- &AuraEffect::HandleNULL, //302 unused
- &AuraEffect::HandleNULL, //303 17 spells
- &AuraEffect::HandleNULL, //304 2 spells (alcohol effect?)
+ &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::HandleNULL, //303 SPELL_AURA_MOD_DMG_VERSUS_AURASTATE_PCT? - 22 and 19 look like serverside aurastates (22 - dark, gas cloud, 19 light, ooze)
+ &AuraEffect::HandleUnused, //304 clientside
&AuraEffect::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED
- &AuraEffect::HandleNULL, //306 1 spell
- &AuraEffect::HandleNULL, //307 absorb healing?
+ &AuraEffect::HandleNULL, //306 0 spells in 3.3.5
+ &AuraEffect::HandleNULL, //307 0 spells in 3.3.5
&AuraEffect::HandleNULL, //308 new aura for hunter traps
- &AuraEffect::HandleNULL, //309 absorb healing?
- &AuraEffect::HandleNoImmediateEffect, //310 5 spells SPELL_AURA_RANGED_AP_ATTACKER_CREATURES_BONUS implemented in Unit::MeleeDamageBonus
- &AuraEffect::HandleNULL, //311 0 spells in 3.3
- &AuraEffect::HandleNULL, //312 0 spells in 3.3
- &AuraEffect::HandleNULL, //313 0 spells in 3.3
- &AuraEffect::HandleNULL, //314 1 test spell (reduce duration of silince/magic)
- &AuraEffect::HandleNULL, //315 underwater walking
+ &AuraEffect::HandleNULL, //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::HandleNoImmediateEffect, //314 SPELL_AURA_PREVENT_RESSURECTION todo
+ &AuraEffect::HandleNoImmediateEffect, //315 SPELL_AURA_UNDERWATER_WALKING todo
&AuraEffect::HandleNoImmediateEffect, //316 SPELL_AURA_PERIODIC_HASTE implemented in AuraEffect::CalculatePeriodic
- &AuraEffect::HandleNULL
};
AuraEffect::AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit * caster) :
m_base(base), m_spellProto(base->GetSpellProto()), m_spellmod(NULL), m_periodicTimer(0),
m_tickNumber(0), m_effIndex(effIndex), m_isPeriodic(false), m_canBeRecalculated(true),
- m_baseAmount (baseAmount ? *baseAmount : m_spellProto->EffectBasePoints[m_effIndex] + 1)
+ m_baseAmount (baseAmount ? *baseAmount : m_spellProto->EffectBasePoints[m_effIndex])
{
CalculatePeriodic(caster, true);
@@ -387,8 +387,7 @@ AuraEffect::AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit * ca
AuraEffect::~AuraEffect()
{
- if (m_spellmod)
- delete m_spellmod;
+ delete m_spellmod;
}
void AuraEffect::GetTargetList(std::list<Unit *> & targetList) const
@@ -406,10 +405,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
{
int32 amount;
// default amount calculation
- if (caster)
- amount = caster->CalculateSpellDamage(NULL, m_spellProto, m_effIndex, &m_baseAmount);
- else
- amount = m_baseAmount + 1;
+ amount = SpellMgr::CalculateSpellEffectAmount(m_spellProto, m_effIndex, caster, &m_baseAmount, NULL);
// check item enchant aura cast
if (!amount && caster)
@@ -483,16 +479,32 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
// Ice Barrier
if (GetSpellProto()->SpellFamilyFlags[1] & 0x1 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
{
- // +80.67% from sp bonus
- DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8067f;
+ // +80.68% from sp bonus
+ DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
+ // Glyph of Ice Barrier: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :)
+ // Glyph of Ice Barrier is only applied at the spell damage bonus because it was already applied to the base value in CalculateSpellDamage
+ if (Player* modOwner = caster->GetSpellModOwner())
+ modOwner->ApplySpellMod(GetSpellProto()->Id, SPELLMOD_ALL_EFFECTS, DoneActualBenefit);
+ }
+ // Fire Ward
+ else if(GetSpellProto()->SpellFamilyFlags[0] & 0x8 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
+ {
+ // +80.68% from sp bonus
+ DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
+ }
+ // Frost Ward
+ else if(GetSpellProto()->SpellFamilyFlags[0] & 0x100 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
+ {
+ // +80.68% from sp bonus
+ DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
}
break;
case SPELLFAMILY_WARLOCK:
// Shadow Ward
- if (m_spellProto->SpellFamilyFlags[2]& 0x40)
+ if (m_spellProto->SpellFamilyFlags[2] & 0x40)
{
- // +30% from sp bonus
- DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.3f;
+ // +80.68% from sp bonus
+ DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
}
break;
case SPELLFAMILY_PRIEST:
@@ -607,7 +619,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
if (spellmgr.GetSpellRank(m_spellProto->Id) >= 9)
{
if (GetBase()->GetUnitOwner()->HasAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, m_spellProto, caster))
- amount += int32(amount * m_spellProto->CalculateSimpleValue(2) / 100.0f);
+ amount += int32(amount * SpellMgr::CalculateSpellEffectAmount(m_spellProto, 2, caster) / 100.0f);
}
}
break;
@@ -718,7 +730,7 @@ void AuraEffect::CalculatePeriodic(Unit * caster, bool create)
case SPELL_AURA_OBS_MOD_POWER:
// 3 spells have no amplitude set
if (!m_amplitude)
- m_amplitude = 1 * IN_MILISECONDS;
+ m_amplitude = 1 * IN_MILLISECONDS;
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_PERIODIC_ENERGIZE:
@@ -747,7 +759,7 @@ void AuraEffect::CalculatePeriodic(Unit * caster, bool create)
{
m_isPeriodic = true;
m_amplitude = irand (0, 60) + 30;
- m_amplitude *= IN_MILISECONDS;
+ m_amplitude *= IN_MILLISECONDS;
}
break;
}
@@ -768,7 +780,8 @@ void AuraEffect::CalculatePeriodic(Unit * caster, bool create)
modOwner->ModSpellCastTime(m_spellProto, m_amplitude);
}
// For spells that can benefit from haste
- else if (modOwner->HasAuraType(SPELL_AURA_PERIODIC_HASTE)) {
+ else if (modOwner->HasAuraType(SPELL_AURA_PERIODIC_HASTE))
+ {
const Unit::AuraEffectList &effList = modOwner->GetAuraEffectsByType(SPELL_AURA_PERIODIC_HASTE);
for (Unit::AuraEffectList::const_iterator itr = effList.begin(), end = effList.end(); itr != end; ++itr)
{
@@ -1032,7 +1045,7 @@ void AuraEffect::UpdatePeriodic(Unit * caster)
if (GetId() == 7057)
{
m_amplitude = irand (0 , 60) + 30;
- m_amplitude *= IN_MILISECONDS;
+ m_amplitude *= IN_MILLISECONDS;
}
break;
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
@@ -1296,10 +1309,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
bool crit = IsPeriodicTickCrit(target, caster);
if (crit)
- {
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
- damage -= target->GetSpellCritDamageReduction(damage);
- }
// Reduce damage from resilience for players and pets only.
// As of patch 3.3 pets inherit 100% of master resilience.
@@ -1308,7 +1318,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
{
if (crit)
damage -= modOwner->GetSpellCritDamageReduction(damage);
- damage -= modOwner->GetSpellDamageReduction(damage);
+ damage -= modOwner->GetSpellDamageReduction(damage);
}
caster->CalcAbsorbResist(target, GetSpellSchoolMask(GetSpellProto()), DOT, damage, &absorb, &resist, m_spellProto);
@@ -1367,10 +1377,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
bool crit = IsPeriodicTickCrit(target, caster);
if (crit)
- {
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
- damage -= target->GetSpellCritDamageReduction(damage);
- }
//Calculate armor mitigation if it is a physical spell
if (GetSpellSchoolMask(GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL)
@@ -1470,7 +1477,37 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
int32 damage = m_amount > 0 ? m_amount : 0;
if (GetAuraType() == SPELL_AURA_OBS_MOD_HEALTH)
+ {
+ // Taken mods
+ float TakenTotalMod = 1.0f;
+
+ // Tenacity increase healing % taken
+ if (AuraEffect const* Tenacity = target->GetAuraEffect(58549, 0))
+ TakenTotalMod *= (Tenacity->GetAmount() + 100.0f) / 100.0f;
+
+ // Healing taken percent
+ float minval = target->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT);
+ if (minval)
+ TakenTotalMod *= (100.0f + minval) / 100.0f;
+
+ float maxval = target->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT);
+ if (maxval)
+ TakenTotalMod *= (100.0f + maxval) / 100.0f;
+
+ // Healing over time taken percent
+ float minval_hot = target->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT);
+ if (minval_hot)
+ TakenTotalMod *= (100.0f + minval_hot) / 100.0f;
+
+ float maxval_hot = target->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT);
+ if (maxval_hot)
+ TakenTotalMod *= (100.0f + maxval_hot) / 100.0f;
+
+ TakenTotalMod = TakenTotalMod > 0.0f ? TakenTotalMod : 0.0f;
+
damage = uint32(target->GetMaxHealth() * damage / 100);
+ damage = uint32(damage * TakenTotalMod);
+ }
else
{
// Wild Growth = amount + (6 - 2*doneTicks) * ticks* amount / 100
@@ -1811,13 +1848,6 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const
else
target->RemoveAurasDueToSpell(58670);
break;
- case 58600: // No fly Zone - Dalaran
- if (GetTickNumber() == 10)
- {
- target->RemoveAurasByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED);
- target->RemoveAurasByType(SPELL_AURA_FLY);
- }
- break;
case 62292: // Blaze (Pool of Tar)
// should we use custom damage?
target->CastSpell((Unit*)NULL, m_spellProto->EffectTriggerSpell[m_effIndex], true);
@@ -2473,14 +2503,14 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
}
// Heart of the Wild
if (HotWSpellId)
- {
+ { // hacky, but the only way as spell family is not SPELLFAMILY_DRUID
Unit::AuraEffectList const& mModTotalStatPct = target->GetAuraEffectsByType(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE);
for (Unit::AuraEffectList::const_iterator i = mModTotalStatPct.begin(); i != mModTotalStatPct.end(); ++i)
{
// Heart of the Wild
if ((*i)->GetSpellProto()->SpellIconID == 240 && (*i)->GetMiscValue() == 3)
{
- int32 HotWMod = (*i)->GetSpellProto()->EffectBasePoints[1] + 1;
+ int32 HotWMod = (*i)->GetAmount();
target->CastCustomSpell(target, HotWSpellId, &HotWMod, NULL, NULL, true, NULL, this);
break;
@@ -2490,11 +2520,11 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
switch(GetMiscValue())
{
case FORM_CAT:
- // Savage Roar
+ // Savage Roar
if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0))
target->CastSpell(target, 62071, true);
// Nurturing Instinct
- if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254,0))
+ if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254, 0))
{
uint32 spellId = 0;
switch (aurEff->GetId())
@@ -2524,9 +2554,9 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
target->CastCustomSpell(target, 48418, &bp, NULL, NULL, true);
}
// Survival of the Fittest
- if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE,SPELLFAMILY_DRUID, 961, 0))
+ if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DRUID, 961, 0))
{
- int32 bp = 100 + aurEff->GetSpellProto()->CalculateSimpleValue(2);
+ int32 bp = 100 + SpellMgr::CalculateSpellEffectAmount(aurEff->GetSpellProto(), 2);
target->CastCustomSpell(target, 62069, &bp, NULL, NULL, true, 0, this);
}
break;
@@ -3093,7 +3123,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
// for players, start regeneration after 1s (in polymorph fast regeneration case)
// only if caster is Player (after patch 2.4.2)
if (IS_PLAYER_GUID(GetCasterGUID()))
- target->ToPlayer()->setRegenTimerCount(1*IN_MILISECONDS);
+ target->ToPlayer()->setRegenTimerCount(1*IN_MILLISECONDS);
//dismount polymorphed target (after patch 2.4.2)
if (target->IsMounted())
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index c2c99b167e0..d44e73f360f 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -45,6 +45,9 @@ class AuraEffect
int32 GetAmount() const { return m_amount; }
void SetAmount(int32 amount) { m_amount = amount; m_canBeRecalculated = false;}
+ int32 GetPeriodicTimer() const { return m_periodicTimer; }
+ void SetPeriodicTimer(int32 periodicTimer) { m_periodicTimer = periodicTimer; }
+
int32 CalculateAmount(Unit * caster);
void CalculatePeriodic(Unit * caster, bool create = false);
void CalculateSpellMod();
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 1b75ab75473..3ebfa44492c 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -77,14 +77,15 @@ AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint
else
sLog.outDebug("Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
}
- m_flags |= (_CheckPositive(caster) ? AFLAG_POSITIVE : AFLAG_NEGATIVE) |
- (GetBase()->GetCasterGUID() == GetTarget()->GetGUID() ? AFLAG_CASTER : AFLAG_NONE);
m_isNeedManyNegativeEffects = false;
if (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) // caster == target - 1 negative effect is enough for aura to be negative
m_isNeedManyNegativeEffects = false;
else if (caster)
m_isNeedManyNegativeEffects = caster->IsFriendlyTo(m_target);
+
+ m_flags |= (_CheckPositive(caster) ? AFLAG_POSITIVE : AFLAG_NEGATIVE) |
+ (GetBase()->GetCasterGUID() == GetTarget()->GetGUID() ? AFLAG_CASTER : AFLAG_NONE);
}
void AuraApplication::_Remove()
@@ -305,7 +306,7 @@ m_spellProto(spellproto), m_owner(owner), m_casterGuid(casterGUID ? casterGUID :
m_procCharges(0), m_stackAmount(1), m_isRemoved(false), m_casterLevel(caster ? caster->getLevel() : m_spellProto->spellLevel)
{
if (m_spellProto->manaPerSecond || m_spellProto->manaPerSecondPerLevel)
- m_timeCla = 1 * IN_MILISECONDS;
+ m_timeCla = 1 * IN_MILLISECONDS;
Player* modOwner = NULL;
@@ -342,8 +343,7 @@ Aura::~Aura()
{
// free effects memory
for (uint8 i = 0 ; i < MAX_SPELL_EFFECTS; ++i)
- if (m_effects[i])
- delete m_effects[i];
+ delete m_effects[i];
assert(m_applications.empty());
_DeleteRemovedApplications();
@@ -391,9 +391,17 @@ void Aura::_UnapplyForTarget(Unit * target, Unit * caster, AuraApplication * aur
assert(auraApp);
ApplicationMap::iterator itr = m_applications.find(target->GetGUID());
+ // TODO: Figure out why this happens.
+ if (itr == m_applications.end())
+ {
+ sLog.outError("Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!",
+ target->GetGUIDLow(), caster->GetGUIDLow(), auraApp->GetBase()->GetSpellProto()->Id);
+ }
+ else
+ m_applications.erase(itr);
+
// aura has to be already applied
- assert(itr->second == auraApp);
- m_applications.erase(itr);
+ //assert(itr->second == auraApp);
m_removedApplications.push_back(auraApp);
// reset cooldown state for spells
@@ -412,7 +420,7 @@ void Aura::_Remove(AuraRemoveMode removeMode)
assert (!m_isRemoved);
m_isRemoved = true;
ApplicationMap::iterator appItr = m_applications.begin();
- while (!m_applications.empty())
+ for (appItr = m_applications.begin(); appItr != m_applications.end();)
{
AuraApplication * aurApp = appItr->second;
Unit * target = aurApp->GetTarget();
@@ -459,8 +467,10 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply)
for (std::map<Unit *, uint8>::iterator itr = targets.begin(); itr!= targets.end();)
{
bool addUnit = true;
- // check target immunities
- if (itr->first->IsImmunedToSpell(GetSpellProto()))
+ // check target immunities
+ if (itr->first->IsImmunedToSpell(GetSpellProto())
+ // check area target requirements
+ || (itr->first != GetOwner() && !CheckAreaTarget(itr->first)))
addUnit = false;
if (addUnit)
@@ -532,7 +542,7 @@ void Aura::_ApplyEffectForTargets(uint8 effIndex)
UnitList targetList;
for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
{
- if ((appIter->second->GetEffectsToApply() & (1<<effIndex)) && CheckTarget(appIter->second->GetTarget()) && !appIter->second->HasEffect(effIndex))
+ if ((appIter->second->GetEffectsToApply() & (1<<effIndex)) && !appIter->second->HasEffect(effIndex))
targetList.push_back(appIter->second->GetTarget());
}
@@ -632,45 +642,6 @@ void Aura::Update(uint32 diff, Unit * caster)
}
}
-bool Aura::CheckTarget(Unit *target)
-{
- // some special cases
- switch(GetId())
- {
- case 45828: // AV Marshal's HP/DMG auras
- case 45829:
- case 45830:
- case 45821:
- case 45822: // AV Warmaster's HP/DMG auras
- case 45823:
- case 45824:
- case 45826:
- switch(target->GetEntry())
- {
- // alliance
- case 14762: // Dun Baldar North Marshal
- case 14763: // Dun Baldar South Marshal
- case 14764: // Icewing Marshal
- case 14765: // Stonehearth Marshal
- case 11948: // Vandar Stormspike
- // horde
- case 14772: // East Frostwolf Warmaster
- case 14776: // Tower Point Warmaster
- case 14773: // Iceblood Warmaster
- case 14777: // West Frostwolf Warmaster
- case 11946: // Drek'thar
- return true;
- default:
- return false;
- break;
- }
- break;
- default:
- return true;
- break;
- }
-}
-
void Aura::SetDuration(int32 duration, bool withMods)
{
if (withMods)
@@ -691,7 +662,7 @@ void Aura::RefreshDuration()
m_effects[i]->ResetPeriodic();
if (m_spellProto->manaPerSecond || m_spellProto->manaPerSecondPerLevel)
- m_timeCla = 1 * IN_MILISECONDS;
+ m_timeCla = 1 * IN_MILLISECONDS;
}
void Aura::SetCharges(uint8 charges)
@@ -781,33 +752,6 @@ bool Aura::CanBeSaved() const
return true;
}
-bool Aura::HasEffectType(AuraType type) const
-{
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- {
- if (m_effects[i] && m_effects[i]->GetAuraType() == type)
- return true;
- }
- return false;
-}
-
-void Aura::RecalculateAmountOfEffects()
-{
- assert (!IsRemoved());
- Unit * caster = GetCaster();
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- if (m_effects[i])
- m_effects[i]->RecalculateAmount(caster);
-}
-
-void Aura::HandleAllEffects(AuraApplication const * aurApp, uint8 mode, bool apply)
-{
- assert (!IsRemoved());
- for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- if (m_effects[i] && !IsRemoved())
- m_effects[i]->HandleEffect(aurApp, mode, apply);
-}
-
bool Aura::IsVisible() const
{
// Is this blizzlike? show totem passive auras
@@ -842,6 +786,39 @@ void Aura::SetLoadedState(int32 maxduration, int32 duration, int32 charges, uint
}
}
+bool Aura::HasEffectType(AuraType type) const
+{
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ {
+ if (m_effects[i] && m_effects[i]->GetAuraType() == type)
+ return true;
+ }
+ return false;
+}
+
+void Aura::RecalculateAmountOfEffects()
+{
+ assert (!IsRemoved());
+ Unit * caster = GetCaster();
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ if (m_effects[i])
+ m_effects[i]->RecalculateAmount(caster);
+}
+
+void Aura::HandleAllEffects(AuraApplication const * aurApp, uint8 mode, bool apply)
+{
+ assert (!IsRemoved());
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ if (m_effects[i] && !IsRemoved())
+ m_effects[i]->HandleEffect(aurApp, mode, apply);
+}
+
+void Aura::SetNeedClientUpdateForTargets() const
+{
+ for (ApplicationMap::const_iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
+ appIter->second->SetNeedClientUpdate();
+}
+
// trigger effects on real aura apply/remove
void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, bool apply)
{
@@ -895,6 +872,10 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
if (GetStackAmount() >= 5 && !target->HasAura(33652))
target->CastSpell(target, 33652, true);
break;
+ case 50836: //Petrifying Grip, becomes stoned
+ if (GetStackAmount() >= 5 && !target->HasAura(50812))
+ target->CastSpell(target, 50812, true);
+ break;
case 60970: // Heroic Fury (remove Intercept cooldown)
if (target->GetTypeId() == TYPEID_PLAYER)
target->ToPlayer()->RemoveSpellCooldown(20252, true);
@@ -936,20 +917,17 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
// Arcane Potency
if (AuraEffect const * aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, 2120, 0))
{
- if (roll_chance_i(aurEff->GetAmount()))
- {
- uint32 spellId = 0;
+ uint32 spellId = 0;
- switch (aurEff->GetId())
- {
- case 31571: spellId = 57529; break;
- case 31572: spellId = 57531; break;
- default:
- sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
- }
- if (spellId)
- caster->CastSpell(caster, spellId, true);
+ switch (aurEff->GetId())
+ {
+ case 31571: spellId = 57529; break;
+ case 31572: spellId = 57531; break;
+ default:
+ sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
}
+ if (spellId)
+ caster->CastSpell(caster, spellId, true);
}
break;
}
@@ -1278,7 +1256,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
data << uint64(player->GetGUID());
data << uint8(0x0); // flags (0x1, 0x2)
data << uint32(GetSpellProto()->Id);
- data << uint32(aurEff->GetAmount()*IN_MILISECONDS);
+ data << uint32(aurEff->GetAmount()*IN_MILLISECONDS);
player->SendDirectMessage(&data);
}
break;
@@ -1514,10 +1492,44 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
}
}
-void Aura::SetNeedClientUpdateForTargets() const
+bool Aura::CheckAreaTarget(Unit *target)
{
- for (ApplicationMap::const_iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
- appIter->second->SetNeedClientUpdate();
+ // for owner check use Spell::CheckTarget
+ assert(GetOwner() != target);
+
+ // some special cases
+ switch(GetId())
+ {
+ case 45828: // AV Marshal's HP/DMG auras
+ case 45829:
+ case 45830:
+ case 45821:
+ case 45822: // AV Warmaster's HP/DMG auras
+ case 45823:
+ case 45824:
+ case 45826:
+ switch(target->GetEntry())
+ {
+ // alliance
+ case 14762: // Dun Baldar North Marshal
+ case 14763: // Dun Baldar South Marshal
+ case 14764: // Icewing Marshal
+ case 14765: // Stonehearth Marshal
+ case 11948: // Vandar Stormspike
+ // horde
+ case 14772: // East Frostwolf Warmaster
+ case 14776: // Tower Point Warmaster
+ case 14773: // Iceblood Warmaster
+ case 14777: // West Frostwolf Warmaster
+ case 11946: // Drek'thar
+ return true;
+ default:
+ return false;
+ break;
+ }
+ break;
+ }
+ return true;
}
void Aura::_DeleteRemovedApplications()
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index be76b520bd9..97c0076fcd5 100644
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -163,7 +163,7 @@ class Aura
void SetNeedClientUpdateForTargets() const;
void HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, bool apply);
- bool CheckTarget(Unit *target);
+ bool CheckAreaTarget(Unit *target);
private:
void _DeleteRemovedApplications();
protected:
diff --git a/src/server/game/Spells/Auras/SpellEffects.cpp b/src/server/game/Spells/Auras/SpellEffects.cpp
index 2f7486d53d9..0b2191d5e48 100644
--- a/src/server/game/Spells/Auras/SpellEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellEffects.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "Opcodes.h"
#include "Log.h"
@@ -107,11 +107,11 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectUnused, // 39 SPELL_EFFECT_LANGUAGE
&Spell::EffectDualWield, // 40 SPELL_EFFECT_DUAL_WIELD
&Spell::EffectJump, // 41 SPELL_EFFECT_JUMP
- &Spell::EffectJump, // 42 SPELL_EFFECT_JUMP2
+ &Spell::EffectJumpDest, // 42 SPELL_EFFECT_JUMP_DEST
&Spell::EffectTeleUnitsFaceCaster, // 43 SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER
&Spell::EffectLearnSkill, // 44 SPELL_EFFECT_SKILL_STEP
&Spell::EffectAddHonor, // 45 SPELL_EFFECT_ADD_HONOR honor/pvp related
- &Spell::EffectNULL, // 46 SPELL_EFFECT_SPAWN we must spawn pet there
+ &Spell::EffectUnused, // 46 SPELL_EFFECT_SPAWN clientside, unit appears as if it was just spawned
&Spell::EffectTradeSkill, // 47 SPELL_EFFECT_TRADE_SKILL
&Spell::EffectUnused, // 48 SPELL_EFFECT_STEALTH one spell: Base Stealth
&Spell::EffectUnused, // 49 SPELL_EFFECT_DETECT one spell: Detect
@@ -154,7 +154,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectActivateObject, // 86 SPELL_EFFECT_ACTIVATE_OBJECT
&Spell::EffectWMODamage, // 87 SPELL_EFFECT_WMO_DAMAGE
&Spell::EffectWMORepair, // 88 SPELL_EFFECT_WMO_REPAIR
- &Spell::EffectUnused, // 89 SPELL_EFFECT_WMO_CHANGE
+ &Spell::EffectUnused, // 89 SPELL_EFFECT_WMO_CHANGE // 0 intact // 1 damaged // 2 destroyed // 3 rebuilding
&Spell::EffectKillCreditPersonal, // 90 SPELL_EFFECT_KILL_CREDIT Kill credit but only for single person
&Spell::EffectUnused, // 91 SPELL_EFFECT_THREAT_ALL one spell: zzOLDBrainwash
&Spell::EffectEnchantHeldItem, // 92 SPELL_EFFECT_ENCHANT_HELD_ITEM
@@ -203,10 +203,10 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectNULL, //135 SPELL_EFFECT_CALL_PET
&Spell::EffectHealPct, //136 SPELL_EFFECT_HEAL_PCT
&Spell::EffectEnergizePct, //137 SPELL_EFFECT_ENERGIZE_PCT
- &Spell::EffectJump2, //138 SPELL_EFFECT_LEAP_BACK Leap back
- &Spell::EffectUnused, //139 SPELL_EFFECT_CLEAR_QUEST (misc - is quest ID)
+ &Spell::EffectLeapBack, //138 SPELL_EFFECT_LEAP_BACK Leap back
+ &Spell::EffectQuestClear, //139 SPELL_EFFECT_CLEAR_QUEST Reset quest status (miscValue - quest ID)
&Spell::EffectForceCast, //140 SPELL_EFFECT_FORCE_CAST
- &Spell::EffectNULL, //141 SPELL_EFFECT_141 damage and reduce speed?
+ &Spell::EffectForceCastWithValue, //141 SPELL_EFFECT_FORCE_CAST_WITH_VALUE
&Spell::EffectTriggerSpellWithValue, //142 SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE
&Spell::EffectApplyAreaAura, //143 SPELL_EFFECT_APPLY_AREA_AURA_OWNER
&Spell::EffectKnockBack, //144 SPELL_EFFECT_KNOCK_BACK_2 Spectral Blast
@@ -214,7 +214,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectActivateRune, //146 SPELL_EFFECT_ACTIVATE_RUNE
&Spell::EffectQuestFail, //147 SPELL_EFFECT_QUEST_FAIL quest fail
&Spell::EffectUnused, //148 SPELL_EFFECT_148 unused
- &Spell::EffectCharge2, //149 SPELL_EFFECT_CHARGE2 swoop
+ &Spell::EffectChargeDest, //149 SPELL_EFFECT_CHARGE_DEST
&Spell::EffectUnused, //150 SPELL_EFFECT_150 unused
&Spell::EffectTriggerRitualOfSummoning, //151 SPELL_EFFECT_TRIGGER_SPELL_2
&Spell::EffectNULL, //152 SPELL_EFFECT_152 summon Refer-a-Friend
@@ -303,7 +303,7 @@ void Spell::EffectEnvirinmentalDMG(uint32 i)
// Note: this hack with damage replace required until GO casting not implemented
// environment damage spells already have around enemies targeting but this not help in case not existed GO casting support
// currently each enemy selected explicitly and self cast damage, we prevent apply self casted spell bonuses/etc
- damage = m_spellInfo->CalculateSimpleValue(i);
+ damage = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, i, m_caster);
m_caster->CalcAbsorbResist(m_caster, GetSpellSchoolMask(m_spellInfo), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist, m_spellInfo);
@@ -391,8 +391,9 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
return;
break;
}
- // gruul's shatter
- case 33671:
+ case 33671: // gruul's shatter
+ case 50811: // krystallus shatter ( Normal )
+ case 61547: // krystallus shatter ( Heroic )
{
// don't damage self and only players
if (unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER)
@@ -430,6 +431,22 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage = (m_caster->getLevel() - 60) * 4 + 60;
break;
}
+
+ // Loken Pulsing Shockwave
+ case 59837:
+ case 52942:
+ {
+ // don't damage self and only players
+ if(unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[0]));
+ if (!radius)
+ return;
+ float distance = m_caster->GetDistance2d(unitTarget);
+ damage = (distance > radius) ? 0 : int32(m_spellInfo->EffectBasePoints[0]*distance);
+ break;
+ }
}
break;
}
@@ -504,7 +521,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage += pdamage * aura->GetTotalTicks() * pct_dir / 100;
uint32 pct_dot = m_caster->CalculateSpellDamage(unitTarget, m_spellInfo, (effect_idx + 2)) / 3;
- m_currentBasePoints[1] = pdamage * aura->GetTotalTicks() * pct_dot / 100;
+ m_currentBasePoints[1] = SpellMgr::CalculateSpellEffectBaseAmount(pdamage * aura->GetTotalTicks() * pct_dot / 100);
apply_direct_bonus = false;
// Glyph of Conflagrate
@@ -566,7 +583,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_PRIEST &&
((*i)->GetSpellProto()->SpellIconID == 95))
{
- int chance = (*i)->GetSpellProto()->CalculateSimpleValue(1);
+ int chance = SpellMgr::CalculateSpellEffectAmount((*i)->GetSpellProto(), 1, m_caster);
if (roll_chance_i(chance))
// Mind Trauma
m_caster->CastSpell(unitTarget, 48301, true, 0);
@@ -621,7 +638,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
{
if ((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_ROGUE && (*iter)->GetSpellProto()->SpellIconID == 1960)
{
- uint32 chance = (*iter)->GetSpellProto()->CalculateSimpleValue(2);
+ uint32 chance = SpellMgr::CalculateSpellEffectAmount((*iter)->GetSpellProto(), 2, m_caster);
if (chance && roll_chance_i(chance))
needConsume = false;
@@ -710,7 +727,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
// Add main hand dps * effect[2] amount
float average = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2;
int32 count = m_caster->CalculateSpellDamage(unitTarget, m_spellInfo, 2);
- damage += count * int32(average * IN_MILISECONDS) / m_caster->GetAttackTime(BASE_ATTACK);
+ damage += count * int32(average * IN_MILLISECONDS) / m_caster->GetAttackTime(BASE_ATTACK);
}
// Shield of Righteousness
else if (m_spellInfo->SpellFamilyFlags[1]&0x00100000)
@@ -769,33 +786,6 @@ void Spell::EffectDummy(uint32 i)
{
switch (m_spellInfo->Id)
{
- // Magic Pull
- case 51336:
- m_caster->CastSpell(unitTarget,50770,true);
- break;
- // Wrath of the Astromancer
- case 42784:
- {
- uint32 count = 0;
- for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
- if (ihit->effectMask & (1<<i))
- ++count;
-
- damage = 12000; // maybe wrong value
- damage /= count;
-
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(42784);
-
- // now deal the damage
- for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
- if (ihit->effectMask & (1<<i))
- {
- if (Unit* casttarget = Unit::GetUnit((*unitTarget), ihit->targetGUID))
- m_caster->DealDamage(casttarget, damage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, spellInfo, false);
- }
-
- return;
- }
case 8063: // Deviate Fish
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
@@ -939,6 +929,46 @@ void Spell::EffectDummy(uint32 i)
}
return;
}
+ case 14537: // Six Demon Bag
+ {
+ if( !unitTarget || !unitTarget->isAlive()) return;
+
+ uint32 ClearSpellId[6] =
+ {
+ 15662, // Fireball
+ 11538, // Frostball
+ 21179, // Chain Lightning
+ 14621, // Polymorph
+ 25189, // Enveloping Winds
+ 14642 // Summon Felhund minion
+ };
+
+ uint32 effect = 0;
+ uint32 rand = urand(0, 100);
+
+ if (rand >= 0 && rand < 25) // Fireball (25% chance)
+ effect = ClearSpellId[0];
+ else if (rand >= 25 && rand < 50) // Frostball (25% chance)
+ effect = ClearSpellId[1];
+ else if (rand >=50 && rand < 70) // Chain Lighting (25% chance)
+ effect = ClearSpellId[2];
+ else if (rand >= 70 && rand < 80) // Polymorph (10% chance)
+ {
+ effect = ClearSpellId[3];
+ if (urand(0, 100) <= 30) // 30% chance to self-cast
+ unitTarget = m_caster;
+ }
+ else if (rand >=80 && rand < 95) // Enveloping Winds (15% chance)
+ effect = ClearSpellId[4];
+ else // Summon Felhund minion (5% chance)
+ {
+ effect = ClearSpellId[5];
+ unitTarget = m_caster;
+ }
+
+ m_caster->CastSpell(unitTarget, effect, true);
+ return;
+ }
case 15998: // Capture Worg Pup
case 29435: // Capture Female Kaliri Hatchling
{
@@ -1146,6 +1176,20 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster, spell_id, true, NULL);
return;
}
+ case 34665: //Administer Antidote
+ {
+ if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT
+ || unitTarget->GetEntry() != 16880 || unitTarget->ToCreature()->isPet())
+ return;
+
+ unitTarget->ToCreature()->UpdateEntry(16992);
+ m_caster->ToPlayer()->RewardPlayerAndGroupAtEvent(16992, unitTarget);
+
+ if (unitTarget->IsAIEnabled)
+ unitTarget->ToCreature()->AI()->AttackStart(m_caster);
+
+ return;
+ }
case 35745: // Socrethar's Stone
{
uint32 spell_id;
@@ -1206,6 +1250,29 @@ void Spell::EffectDummy(uint32 i)
DoCreateItem(i, newitemid);
return;
}
+ // Wrath of the Astromancer
+ case 42784:
+ {
+ uint32 count = 0;
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ if (ihit->effectMask & (1<<i))
+ ++count;
+
+ damage = 12000; // maybe wrong value
+ damage /= count;
+
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(42784);
+
+ // now deal the damage
+ for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
+ if (ihit->effectMask & (1<<i))
+ {
+ if (Unit* casttarget = Unit::GetUnit((*unitTarget), ihit->targetGUID))
+ m_caster->DealDamage(casttarget, damage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, spellInfo, false);
+ }
+
+ return;
+ }
// Demon Broiled Surprise
case 43723:
{
@@ -1238,20 +1305,6 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster, 42337, true, NULL);
return;
}
- case 34665: //Administer Antidote
- {
- if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT
- || unitTarget->GetEntry() != 16880 || unitTarget->ToCreature()->isPet())
- return;
-
- unitTarget->ToCreature()->UpdateEntry(16992);
- m_caster->ToPlayer()->RewardPlayerAndGroupAtEvent(16992, unitTarget);
-
- if (unitTarget->IsAIEnabled)
- unitTarget->ToCreature()->AI()->AttackStart(m_caster);
-
- return;
- }
case 44997: // Converting Sentry
{
//Converted Sentry Credit
@@ -1310,6 +1363,10 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster, 49378, true);
}
return;
+ // Magic Pull
+ case 51336:
+ m_caster->CastSpell(unitTarget,50770,true);
+ break;
case 52845: // Brewfest Mount Transformation (Faction Swap)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
@@ -1391,8 +1448,8 @@ void Spell::EffectDummy(uint32 i)
{
case 0:
{
- uint32 spellID = m_spellInfo->CalculateSimpleValue(0);
- uint32 reqAuraID = m_spellInfo->CalculateSimpleValue(1);
+ uint32 spellID = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 0);
+ uint32 reqAuraID = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1);
if (m_caster->HasAuraEffect(reqAuraID,0))
m_caster->CastSpell(m_caster,spellID,true,NULL);
@@ -1415,6 +1472,11 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster, 54586, true);
return;
}
+ case 54171: //Divine Storm
+ {
+ m_caster->CastCustomSpell(unitTarget, 54172, &damage, 0, 0, true);
+ return;
+ }
case 58418: // Portal to Orgrimmar
case 58420: // Portal to Stormwind
return; // implemented in EffectScript[0]
@@ -1721,41 +1783,14 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster, 63848, true);
break;
}
- switch(m_spellInfo->Id)
+ switch (m_spellInfo->Id)
{
case 5938: // Shiv
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
- Player *pCaster = m_caster->ToPlayer();
-
- Item *item = pCaster->GetWeaponForAttack(OFF_ATTACK);
- if (!item)
- return;
-
- // all poison enchantments is temporary
- uint32 enchant_id = item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT);
- if (!enchant_id)
- return;
-
- SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
- if (!pEnchant)
- return;
-
- for (int s=0; s<3; s++)
- {
- if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
- continue;
-
- SpellEntry const* combatEntry = sSpellStore.LookupEntry(pEnchant->spellid[s]);
- if (!combatEntry || combatEntry->Dispel != DISPEL_POISON)
- continue;
-
- m_caster->CastSpell(unitTarget, combatEntry, true, item);
- }
-
- m_caster->CastSpell(unitTarget, 5940, true);
+ m_caster->CastSpell(unitTarget, 5940, true);
return;
}
case 14185: // Preparation
@@ -1850,7 +1885,7 @@ void Spell::EffectDummy(uint32 i)
if (Pet *pPet = m_caster->ToPlayer()->GetPet())
if (pPet->isAlive())
- pPet->CastSpell(unitTarget, m_spellInfo->CalculateSimpleValue(i), true);
+ pPet->CastSpell(unitTarget, SpellMgr::CalculateSpellEffectAmount(m_spellInfo, i), true);
return;
}
}
@@ -1900,10 +1935,6 @@ void Spell::EffectDummy(uint32 i)
switch(m_spellInfo->Id)
{
- case 54171: //Divine Storm
- {
- m_caster->CastCustomSpell(unitTarget, 54172, &damage, 0, 0, true);
- }
case 20425: // Judgement of command
{
if (!unitTarget)
@@ -2131,7 +2162,7 @@ void Spell::EffectDummy(uint32 i)
if (m_targets.HasDst())
targets.setDst(&m_targets.m_dstPos);
- spell_id = m_currentBasePoints[0];
+ spell_id = CalculateDamage(0, NULL);
}
// Corpse Explosion
else if (m_spellInfo->SpellIconID == 1737)
@@ -2150,7 +2181,7 @@ void Spell::EffectDummy(uint32 i)
{
bp = damage;
}
- m_caster->CastCustomSpell(unitTarget,m_spellInfo->CalculateSimpleValue(1),&bp,NULL,NULL,true);
+ m_caster->CastCustomSpell(unitTarget, SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1), &bp,NULL,NULL,true);
// Corpse Explosion (Suicide)
unitTarget->CastCustomSpell(unitTarget,43999,&bp,NULL,NULL,true);
// Set corpse look
@@ -2183,7 +2214,7 @@ void Spell::EffectDummy(uint32 i)
targets.setUnitTarget(unitTarget);
Spell* spell = new Spell(m_caster, spellInfo, triggered, m_originalCasterGUID, NULL, true);
- if (bp) spell->m_currentBasePoints[0] = bp;
+ if (bp) spell->m_currentBasePoints[0] = SpellMgr::CalculateSpellEffectBaseAmount(bp);
spell->prepare(&targets);
}
@@ -2276,6 +2307,28 @@ void Spell::EffectForceCast(uint32 i)
caster->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID);
}
+void Spell::EffectForceCastWithValue(uint32 i)
+{
+ if (!unitTarget)
+ return;
+
+ uint32 triggered_spell_id = m_spellInfo->EffectTriggerSpell[i];
+
+ // normal case
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(triggered_spell_id);
+
+ if (!spellInfo)
+ {
+ sLog.outError("EffectForceCastWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id);
+ return;
+ }
+ int32 bp = damage;
+ Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
+
+ caster->CastCustomSpell(unitTarget, spellInfo->Id, &bp, &bp, &bp, true, NULL, NULL, m_originalCasterGUID);
+}
+
+
void Spell::EffectTriggerSpell(uint32 effIndex)
{
// only unit case known
@@ -2480,6 +2533,33 @@ void Spell::EffectJump(uint32 i)
if (m_caster->isInFlight())
return;
+ float x,y,z,o;
+ if (m_targets.getUnitTarget())
+ {
+ m_targets.getUnitTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE);
+ o = m_caster->GetOrientation();
+ }
+ else if (m_targets.getGOTarget())
+ {
+ m_targets.getGOTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE);
+ o = m_caster->GetOrientation();
+ }
+ else
+ {
+ sLog.outError("Spell::EffectJump - unsupported target mode for spell ID %u", m_spellInfo->Id);
+ return;
+ }
+
+ float speedXY, speedZ;
+ CalculateJumpSpeeds(i, m_caster->GetExactDist2d(x, y), speedXY, speedZ);
+ m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
+}
+
+void Spell::EffectJumpDest(uint32 i)
+{
+ if (m_caster->isInFlight())
+ return;
+
// Init dest coordinates
float x,y,z,o;
if (m_targets.HasDst())
@@ -2503,32 +2583,26 @@ void Spell::EffectJump(uint32 i)
else
o = m_caster->GetOrientation();
}
- else if (m_targets.getUnitTarget())
- {
- m_targets.getUnitTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE);
- o = m_caster->GetOrientation();
- }
- else if (m_targets.getGOTarget())
- {
- m_targets.getGOTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE);
- o = m_caster->GetOrientation();
- }
else
{
- sLog.outError("Spell::EffectJump - unsupported target mode for spell ID %u", m_spellInfo->Id);
+ sLog.outError("Spell::EffectJumpDest - unsupported target mode for spell ID %u", m_spellInfo->Id);
return;
}
- //m_caster->NearTeleportTo(x,y,z,o,true);
- float speedZ;
+ float speedXY, speedZ;
+ CalculateJumpSpeeds(i, m_caster->GetExactDist2d(x, y), speedXY, speedZ);
+ m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
+}
+
+void Spell::CalculateJumpSpeeds(uint8 i, float dist, float & speedXY, float & speedZ)
+{
if (m_spellInfo->EffectMiscValue[i])
speedZ = float(m_spellInfo->EffectMiscValue[i])/10;
else if (m_spellInfo->EffectMiscValueB[i])
speedZ = float(m_spellInfo->EffectMiscValueB[i])/10;
else
speedZ = 10.0f;
- float speedXY = m_caster->GetExactDist2d(x, y) * 10.0f / speedZ;
- m_caster->GetMotionMaster()->MoveJump(x, y, z, speedXY, speedZ);
+ speedXY = dist * 10.0f / speedZ;
}
void Spell::EffectTeleportUnits(uint32 /*i*/)
@@ -2536,6 +2610,27 @@ void Spell::EffectTeleportUnits(uint32 /*i*/)
if (!unitTarget || unitTarget->isInFlight())
return;
+ // Pre effects
+ uint8 uiMaxSafeLevel = 0;
+ switch (m_spellInfo->Id)
+ {
+ case 48129: // Scroll of Recall
+ uiMaxSafeLevel = 40;
+ case 60320: // Scroll of Recall II
+ if (!uiMaxSafeLevel)
+ uiMaxSafeLevel = 70;
+ case 60321: // Scroll of Recal III
+ if (!uiMaxSafeLevel)
+ uiMaxSafeLevel = 80;
+
+ if (unitTarget->getLevel() > uiMaxSafeLevel)
+ {
+ unitTarget->AddAura(60444,unitTarget); //Apply Lost! Aura
+ return;
+ }
+ break;
+ }
+
// If not exist data for dest location - return
if (!m_targets.HasDst())
{
@@ -2912,6 +3007,10 @@ void Spell::SpellDamageHeal(uint32 /*i*/)
else
addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL);
+ // Remove Grievious bite if fully healed
+ if (unitTarget->HasAura(48920) && (unitTarget->GetHealth() + addhealth >= unitTarget->GetMaxHealth()))
+ unitTarget->RemoveAura(48920);
+
m_damage -= addhealth;
}
}
@@ -3138,7 +3237,9 @@ void Spell::EffectCreateItem2(uint32 i)
// create some random items
player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell);
- }
+ }
+ else
+ player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell); // create some random items
}
}
@@ -3706,7 +3807,7 @@ void Spell::EffectSummonType(uint32 i)
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
- TempSummon * summon = m_originalCaster->SummonCreature(entry, pos, summonType, duration);
+ summon = m_originalCaster->SummonCreature(entry, pos, summonType, duration);
if (!summon)
continue;
if (properties->Category == SUMMON_CATEGORY_ALLY)
@@ -3736,7 +3837,7 @@ void Spell::EffectSummonType(uint32 i)
if (m_spellInfo->EffectBasePoints[i])
{
- SpellEntry const *spellProto = sSpellStore.LookupEntry(m_spellInfo->CalculateSimpleValue(i));
+ SpellEntry const *spellProto = sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, i));
if (spellProto)
m_caster->CastSpell(summon, spellProto, true);
}
@@ -3747,7 +3848,10 @@ void Spell::EffectSummonType(uint32 i)
}
if (summon)
+ {
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
+ summon->SetCreatorGUID(m_originalCaster->GetGUID());
+ }
}
void Spell::EffectLearnSpell(uint32 i)
@@ -3829,7 +3933,7 @@ void Spell::EffectDispel(uint32 i)
bool success = false;
// 2.4.3 Patch Notes: "Dispel effects will no longer attempt to remove effects that have 100% dispel resistance."
- if (GetDispelChance(itr->first->GetCaster(), unitTarget, itr->first->GetId(), !unitTarget->IsFriendlyTo(m_caster), &success) > 99)
+ if (!GetDispelChance(itr->first->GetCaster(), unitTarget, itr->first->GetId(), !unitTarget->IsFriendlyTo(m_caster), &success))
{
dispel_list.erase(itr);
continue;
@@ -3885,7 +3989,7 @@ void Spell::EffectDispel(uint32 i)
// Devour Magic
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->Category == SPELLCATEGORY_DEVOUR_MAGIC)
{
- int32 heal_amount = m_spellInfo->CalculateSimpleValue(1);
+ int32 heal_amount = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1);
m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true);
}
}
@@ -3926,7 +4030,7 @@ void Spell::EffectDistract(uint32 /*i*/)
// Set creature Distracted, Stop it, And turn it
unitTarget->SetOrientation(angle);
unitTarget->StopMoving();
- unitTarget->GetMotionMaster()->MoveDistract(damage * IN_MILISECONDS);
+ unitTarget->GetMotionMaster()->MoveDistract(damage * IN_MILLISECONDS);
}
}
@@ -3998,7 +4102,7 @@ void Spell::EffectLearnSkill(uint32 i)
uint32 skillid = m_spellInfo->EffectMiscValue[i];
uint16 skillval = unitTarget->ToPlayer()->GetPureSkillValue(skillid);
- unitTarget->ToPlayer()->SetSkill(skillid, m_spellInfo->CalculateSimpleValue(i), skillval?skillval:1, damage*75);
+ unitTarget->ToPlayer()->SetSkill(skillid, SpellMgr::CalculateSpellEffectAmount(m_spellInfo, i), skillval?skillval:1, damage*75);
}
void Spell::EffectAddHonor(uint32 /*i*/)
@@ -4853,7 +4957,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
int32 duration = GetSpellDuration(m_spellInfo);
- pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
+ pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
pGameObj->SetSpellId(m_spellInfo->Id);
// Wild object not have owner and check clickable by players
@@ -4896,7 +5000,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
if (linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, map,
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
- linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
+ linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
linkedGO->SetSpellId(m_spellInfo->Id);
// Wild object not have owner and check clickable by players
@@ -5015,7 +5119,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
case 55693: // Remove Collapsing Cave Aura
if (!unitTarget)
return;
- unitTarget->RemoveAurasDueToSpell(m_spellInfo->CalculateSimpleValue(effIndex));
+ unitTarget->RemoveAurasDueToSpell(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, effIndex));
break;
// PX-238 Winter Wondervolt TRAP
case 26275:
@@ -5558,8 +5662,8 @@ void Spell::EffectScriptEffect(uint32 effIndex)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER || effIndex != 0)
return;
- uint32 spellID = m_spellInfo->CalculateSimpleValue(0);
- uint32 questID = m_spellInfo->CalculateSimpleValue(1);
+ uint32 spellID = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 0);
+ uint32 questID = SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1);
if (unitTarget->ToPlayer()->GetQuestStatus(questID) == QUEST_STATUS_COMPLETE && !unitTarget->ToPlayer()->GetQuestRewardStatus (questID))
unitTarget->CastSpell(unitTarget, spellID, true);
@@ -5980,6 +6084,17 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->CastSpell(unitTarget, spellTarget[urand(0,4)], true);
break;
}
+ case 64142: // Upper Deck - Create Foam Sword
+ if (unitTarget->GetTypeId() != TYPEID_PLAYER)
+ return;
+ Player *plr = unitTarget->ToPlayer();
+ static uint32 const itemId[] = {45061, 45176, 45177, 45178, 45179, 0};
+ // player can only have one of these items
+ for (uint32 const *itr = &itemId[0]; *itr; ++itr)
+ if (plr->HasItemCount(*itr, 1, true))
+ return;
+ DoCreateItem(effIndex, itemId[urand(0,4)]);
+ return;
}
break;
}
@@ -6476,7 +6591,7 @@ void Spell::EffectDuel(uint32 i)
pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->getFaction());
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()+1);
int32 duration = GetSpellDuration(m_spellInfo);
- pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
+ pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
pGameObj->SetSpellId(m_spellInfo->Id);
m_caster->AddGameObject(pGameObj);
@@ -6554,7 +6669,7 @@ void Spell::EffectSummonPlayer(uint32 /*i*/)
WorldPacket data(SMSG_SUMMON_REQUEST, 8+4+4);
data << uint64(m_caster->GetGUID()); // summoner guid
data << uint32(m_caster->GetZoneId()); // summoner zone
- data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILISECONDS); // auto decline after msecs
+ data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS); // auto decline after msecs
unitTarget->ToPlayer()->GetSession()->SendPacket(&data);
}
@@ -6652,7 +6767,7 @@ void Spell::EffectEnchantHeldItem(uint32 i)
return;
// Apply the temporary enchantment
- item->SetEnchantment(slot, enchant_id, duration*IN_MILISECONDS, 0);
+ item->SetEnchantment(slot, enchant_id, duration*IN_MILLISECONDS, 0);
item_owner->ApplyEnchantment(item, slot, true);
}
}
@@ -6782,7 +6897,7 @@ void Spell::EffectSummonObject(uint32 i)
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL,m_caster->getLevel());
int32 duration = GetSpellDuration(m_spellInfo);
- pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
+ pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
pGameObj->SetSpellId(m_spellInfo->Id);
m_caster->AddGameObject(pGameObj);
@@ -6821,6 +6936,13 @@ void Spell::EffectResurrect(uint32 /*effIndex*/)
return;
}
break;
+ // Defibrillate ( Gnomish Army Knife) have 67% chance on success_list
+ case 54732:
+ if (roll_chance_i(33))
+ {
+ return;
+ }
+ break;
default:
break;
}
@@ -6955,7 +7077,14 @@ void Spell::EffectQuestComplete(uint32 i)
return;
uint32 quest_id = m_spellInfo->EffectMiscValue[i];
- pPlayer->AreaExploredOrEventHappens(quest_id);
+ if (quest_id)
+ {
+ uint16 log_slot = pPlayer->FindQuestSlot(quest_id);
+ if (log_slot < MAX_QUEST_LOG_SIZE)
+ pPlayer->AreaExploredOrEventHappens(quest_id);
+ else
+ pPlayer->CompleteQuest(quest_id); // quest not in log - for internal use
+ }
}
void Spell::EffectForceDeselect(uint32 /*i*/)
@@ -7027,9 +7156,6 @@ void Spell::EffectSkinning(uint32 /*i*/)
void Spell::EffectCharge(uint32 /*i*/)
{
- if (!m_caster)
- return;
-
Unit *target = m_targets.getUnitTarget();
if (!target)
return;
@@ -7043,22 +7169,14 @@ void Spell::EffectCharge(uint32 /*i*/)
m_caster->Attack(target, true);
}
-void Spell::EffectCharge2(uint32 /*i*/)
+void Spell::EffectChargeDest(uint32 /*i*/)
{
- float x, y, z;
if (m_targets.HasDst())
- m_targets.m_dstPos.GetPosition(x, y, z);
- else if (Unit *target = m_targets.getUnitTarget())
{
- target->GetContactPoint(m_caster, x, y, z);
- // not all charge effects used in negative spells
- if (!IsPositiveSpell(m_spellInfo->Id) && m_caster->GetTypeId() == TYPEID_PLAYER)
- m_caster->Attack(target, true);
+ float x, y, z;
+ m_targets.m_dstPos.GetPosition(x, y, z);
+ m_caster->GetMotionMaster()->MoveCharge(x, y, z);
}
- else
- return;
-
- m_caster->GetMotionMaster()->MoveCharge(x, y, z);
}
void Spell::EffectKnockBack(uint32 i)
@@ -7101,7 +7219,7 @@ void Spell::EffectKnockBack(uint32 i)
unitTarget->KnockbackFrom(x, y, speedxy, speedz);
}
-void Spell::EffectJump2(uint32 i)
+void Spell::EffectLeapBack(uint32 i)
{
float speedxy = float(m_spellInfo->EffectMiscValue[i])/10;
float speedz = float(damage/10);
@@ -7117,6 +7235,50 @@ void Spell::EffectJump2(uint32 i)
}
}
+void Spell::EffectQuestClear(uint32 i)
+{
+ Player *pPlayer = NULL;
+ if (m_caster->GetTypeId() == TYPEID_PLAYER)
+ pPlayer = m_caster->ToPlayer();
+ else if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER)
+ pPlayer = unitTarget->ToPlayer();
+
+ if (!pPlayer)
+ return;
+
+ uint32 quest_id = m_spellInfo->EffectMiscValue[i];
+
+ Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
+
+ if (!pQuest)
+ return;
+
+ QuestStatusMap::iterator qs_itr = pPlayer->getQuestStatusMap().find(quest_id);
+ // Player has never done this quest
+ if (qs_itr == pPlayer->getQuestStatusMap().end())
+ return;
+
+ // remove all quest entries for 'entry' from quest log
+ for (uint8 slot = 0; slot < MAX_QUEST_LOG_SIZE; ++slot)
+ {
+ uint32 quest = pPlayer->GetQuestSlotQuestId(slot);
+ if (quest == quest_id)
+ {
+ pPlayer->SetQuestSlot(slot, 0);
+
+ // we ignore unequippable quest items in this case, its' still be equipped
+ pPlayer->TakeQuestSourceItem(quest, false);
+ }
+ }
+
+ // set quest status to not started (will be updated in DB at next save)
+ pPlayer->SetQuestStatus(quest_id, QUEST_STATUS_NONE);
+
+ // reset rewarded for restart repeatable quest
+ QuestStatusData &data = qs_itr->second;
+ data.m_rewarded = false;
+}
+
void Spell::EffectSendTaxi(uint32 i)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
@@ -7152,7 +7314,7 @@ void Spell::EffectDispelMechanic(uint32 i)
continue;
bool success = false;
GetDispelChance(aura->GetCaster(), unitTarget, aura->GetId(), !unitTarget->IsFriendlyTo(m_caster), &success);
- if((GetAllSpellMechanicMask(aura->GetSpellProto()) & (1<<(mechanic))) && success)
+ if ((GetAllSpellMechanicMask(aura->GetSpellProto()) & (1 << mechanic)) && success)
dispel_list.push(std::make_pair(aura->GetId(), aura->GetCasterGUID()));
}
@@ -7356,7 +7518,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
case 3: lastSec = 17; break;
}
- duration = duration - lastSec*IN_MILISECONDS + FISHING_BOBBER_READY_TIME*IN_MILISECONDS;
+ duration = duration - lastSec*IN_MILLISECONDS + FISHING_BOBBER_READY_TIME*IN_MILLISECONDS;
break;
}
case GAMEOBJECT_TYPE_SUMMONING_RITUAL:
@@ -7377,7 +7539,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
break;
}
- pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
+ pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
pGameObj->SetOwnerGUID(m_caster->GetGUID());
@@ -7396,7 +7558,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
if (linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, cMap,
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
- linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
+ linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
//linkedGO->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
linkedGO->SetSpellId(m_spellInfo->Id);
linkedGO->SetOwnerGUID(m_caster->GetGUID());
@@ -7543,7 +7705,7 @@ void Spell::EffectStealBeneficialBuff(uint32 i)
bool success = false;
// 2.4.3 Patch Notes: "Dispel effects will no longer attempt to remove effects that have 100% dispel resistance."
- if (GetDispelChance(itr->first->GetCaster(), unitTarget, itr->first->GetId(), !unitTarget->IsFriendlyTo(m_caster), &success) > 99)
+ if (!GetDispelChance(itr->first->GetCaster(), unitTarget, itr->first->GetId(), !unitTarget->IsFriendlyTo(m_caster), &success))
{
steal_list.erase(itr);
continue;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 5016e5ebc2b..510be691d18 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -19,7 +19,7 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
+#include "DatabaseEnv.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "GridNotifiers.h"
@@ -41,7 +41,6 @@
#include "MapManager.h"
#include "ObjectAccessor.h"
#include "CellImpl.h"
-#include "Policies/SingletonImp.h"
#include "SharedDefines.h"
#include "LootMgr.h"
#include "VMapFactory.h"
@@ -53,7 +52,7 @@
#include "ScriptMgr.h"
#include "ConditionMgr.h"
-#define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILISECONDS)
+#define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILLISECONDS)
extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS];
@@ -149,6 +148,15 @@ void SpellCastTargets::setItemTarget(Item* item)
m_targetMask |= TARGET_FLAG_ITEM;
}
+void SpellCastTargets::setTradeItemTarget(Player* caster)
+{
+ m_itemTargetGUID = uint64(TRADE_SLOT_NONTRADED);
+ m_itemTargetEntry = 0;
+ m_targetMask |= TARGET_FLAG_TRADE_ITEM;
+
+ Update(caster);
+}
+
void SpellCastTargets::setCorpseTarget(Corpse* corpse)
{
m_CorpseTargetGUID = corpse->GetGUID();
@@ -164,12 +172,13 @@ void SpellCastTargets::Update(Unit* caster)
m_itemTarget = NULL;
if (caster->GetTypeId() == TYPEID_PLAYER)
{
+ Player *player = caster->ToPlayer();
if (m_targetMask & TARGET_FLAG_ITEM)
- m_itemTarget = caster->ToPlayer()->GetItemByGuid(m_itemTargetGUID);
+ m_itemTarget = player->GetItemByGuid(m_itemTargetGUID);
else if (m_targetMask & TARGET_FLAG_TRADE_ITEM)
- if (m_itemTargetGUID == TRADE_SLOT_NONTRADED) // here it is not guid but slot. Also prevent hacking slots
- if (Player* pTrader = caster->ToPlayer()->GetTrader())
- m_itemTarget = pTrader->GetItemByTradeSlot(m_itemTargetGUID);
+ if (m_itemTargetGUID == TRADE_SLOT_NONTRADED) // here it is not guid but slot. Also prevents hacking slots
+ if (TradeData* pTrade = player->GetTradeData())
+ m_itemTarget = pTrade->GetTraderData()->GetItem(TRADE_SLOT_NONTRADED);
if (m_itemTarget)
m_itemTargetEntry = m_itemTarget->GetEntry();
@@ -390,13 +399,12 @@ Spell::Spell(Unit* Caster, SpellEntry const *info, bool triggered, uint64 origin
}
for (int i=0; i <3; ++i)
- m_currentBasePoints[i] = m_spellInfo->CalculateSimpleValue(i);
+ m_currentBasePoints[i] = m_spellInfo->EffectBasePoints[i];
m_spellState = SPELL_STATE_NULL;
m_TriggerSpells.clear();
m_IsTriggeredSpell = triggered;
- //m_AreaAura = false;
m_CastItem = NULL;
unitTarget = NULL;
@@ -1336,7 +1344,15 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
// Now Reduce spell duration using data received at spell hit
int32 duration = m_spellAura->GetMaxDuration();
int32 limitduration = GetDiminishingReturnsLimitDuration(m_diminishGroup,aurSpellInfo);
- unit->ApplyDiminishingToDuration(m_diminishGroup, duration, m_originalCaster, m_diminishLevel,limitduration);
+ float diminishMod = unit->ApplyDiminishingToDuration(m_diminishGroup, duration, m_originalCaster, m_diminishLevel,limitduration);
+
+ // unit is immune to aura if it was diminished to 0 duration
+ if (diminishMod == 0.0f)
+ {
+ m_spellAura->Remove();
+ return SPELL_MISS_IMMUNE;
+ }
+
((UnitAura*)m_spellAura)->SetDiminishGroup(m_diminishGroup);
bool positive = IsPositiveSpell(m_spellAura->GetId());
@@ -1350,12 +1366,6 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
if (IsChanneledSpell(m_spellInfo))
m_originalCaster->ModSpellCastTime(aurSpellInfo, duration, this);
- if (duration == 0 && !positive)
- {
- m_spellAura->Remove();
- return SPELL_MISS_IMMUNE;
- }
-
if (duration != m_spellAura->GetMaxDuration())
{
m_spellAura->SetMaxDuration(duration);
@@ -1989,7 +1999,6 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
if (cur == TARGET_DST_TARGET_ENEMY || cur == TARGET_DEST_TARGET_ANY)
{
m_targets.setDst(target);
- AddUnitTarget(target, i);
break;
}
@@ -2018,9 +2027,6 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
Position pos;
target->GetNearPosition(pos, dist, angle);
m_targets.setDst(&pos);
- // Teleports use this as destination
- if (m_spellInfo->Effect[i] != SPELL_EFFECT_TELEPORT_UNITS)
- AddUnitTarget(target, i);
break;
}
@@ -2416,6 +2422,117 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
if (!unitList.empty())
{
+ // Special target selection for smart heals and energizes
+ uint32 maxSize = 0;
+ int32 power = -1;
+ switch (m_spellInfo->SpellFamilyName)
+ {
+ case SPELLFAMILY_GENERIC:
+ switch (m_spellInfo->Id)
+ {
+ case 52759: // Ancestral Awakening
+ case 71610: // Echoes of Light (Althor's Abacus normal version)
+ case 71641: // Echoes of Light (Althor's Abacus heroic version)
+ maxSize = 1;
+ power = POWER_HEALTH;
+ break;
+ case 54968: // Glyph of Holy Light
+ maxSize = m_spellInfo->MaxAffectedTargets;
+ power = POWER_HEALTH;
+ break;
+ case 57669: // Replenishment
+ // In arenas Replenishment may only affect the caster
+ if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->InArena())
+ {
+ unitList.clear();
+ unitList.push_back(m_caster);
+ break;
+ }
+ maxSize = 10;
+ power = POWER_MANA;
+ break;
+ default:
+ break;
+ }
+ break;
+ case SPELLFAMILY_PRIEST:
+ if (m_spellInfo->SpellFamilyFlags[0] == 0x10000000) // Circle of Healing
+ {
+ maxSize = m_caster->HasAura(55675) ? 6 : 5; // Glyph of Circle of Healing
+ power = POWER_HEALTH;
+ }
+ else if (m_spellInfo->Id == 64844) // Divine Hymn
+ {
+ maxSize = 3;
+ power = POWER_HEALTH;
+ }
+ else if (m_spellInfo->Id == 64904) // Hymn of Hope
+ {
+ maxSize = 3;
+ power = POWER_MANA;
+ }
+ else
+ break;
+
+ // Remove targets outside caster's raid
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
+ {
+ if (!(*itr)->IsInRaidWith(m_caster))
+ itr = unitList.erase(itr);
+ else
+ ++itr;
+ }
+ break;
+ case SPELLFAMILY_DRUID:
+ if (m_spellInfo->SpellFamilyFlags[1] == 0x04000000) // Wild Growth
+ {
+ maxSize = m_caster->HasAura(62970) ? 6 : 5; // Glyph of Wild Growth
+ power = POWER_HEALTH;
+ }
+ else
+ break;
+
+ // Remove targets outside caster's raid
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
+ {
+ if (!(*itr)->IsInRaidWith(m_caster))
+ itr = unitList.erase(itr);
+ else
+ ++itr;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if (maxSize && power != -1)
+ {
+ if (power == POWER_HEALTH)
+ {
+ if (unitList.size() > maxSize)
+ {
+ unitList.sort(Trinity::HealthPctOrderPred());
+ unitList.resize(maxSize);
+ }
+ }
+ else
+ {
+ for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
+ {
+ if ((*itr)->getPowerType() != (Powers)power)
+ itr = unitList.erase(itr);
+ else
+ ++itr;
+ }
+ if (unitList.size() > maxSize)
+ {
+ unitList.sort(Trinity::PowerPctOrderPred((Powers)power));
+ unitList.resize(maxSize);
+ }
+ }
+ }
+
+ // Other special target selection goes here
if (uint32 maxTargets = m_spellValue->MaxAffectedTargets)
{
Unit::AuraEffectList const& Auras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
@@ -2438,56 +2555,6 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
case 59725: // Improved Spell Reflection - aoe aura
unitList.remove(m_caster);
break;
- case 57669: //Replenishment (special target selection) 10 targets with lowest mana
- {
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
- {
- if ((*itr)->getPowerType() != POWER_MANA)
- itr = unitList.erase(itr);
- else
- ++itr;
- }
- if (unitList.size() > 10)
- {
- unitList.sort(Trinity::PowerPctOrderPred(POWER_MANA));
- unitList.resize(10);
- }
- break;
- }
- case 52759: // Ancestral Awakening
- {
- if (unitList.size() > 1)
- {
- unitList.sort(Trinity::HealthPctOrderPred());
- unitList.resize(1);
- }
- break;
- }
- }
- if (m_spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_TARGET_ANY
- && m_spellInfo->EffectImplicitTargetB[i] == TARGET_UNIT_AREA_ALLY_DST)// Wild Growth, Circle of Healing, Glyph of holy light target special selection
- {
- for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
- {
- if (!(*itr)->IsInRaidWith(m_targets.getUnitTarget()))
- itr = unitList.erase(itr);
- else
- ++itr;
- }
-
- uint32 maxsize = 5;
-
- if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x04000000) // Wild Growth
- maxsize += m_caster->HasAura(62970) ? 1 : 0; // Glyph of Wild Growth
-
- if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellInfo->SpellFamilyFlags[0] & 0x10000000 && m_spellInfo->SpellIconID == 2214) // Circle of Healing
- maxsize += m_caster->HasAura(55675) ? 1 : 0; // Glyph of Circle of Healing
-
- if (unitList.size() > maxsize)
- {
- unitList.sort(Trinity::HealthPctOrderPred());
- unitList.resize(maxsize);
- }
}
// Death Pact
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] & 0x00080000)
@@ -2844,6 +2911,32 @@ void Spell::cast(bool skipCheck)
SetExecutedCurrently(false);
return;
}
+
+ // additional check after cast bar completes (must not be in CheckCast)
+ // if trade not complete then remember it in trade data
+ if (m_targets.getTargetMask() & TARGET_FLAG_TRADE_ITEM)
+ {
+ if (m_caster->GetTypeId() == TYPEID_PLAYER)
+ {
+ if (TradeData* my_trade = m_caster->ToPlayer()->GetTradeData())
+ {
+ if (!my_trade->IsInAcceptProcess())
+ {
+ // Spell will be casted at completing the trade. Silently ignore at this place
+ my_trade->SetSpell(m_spellInfo->Id, m_CastItem);
+ SendCastResult(SPELL_FAILED_DONT_REPORT);
+ SendInterrupted(0);
+ m_caster->ToPlayer()->RestoreSpellMods(this);
+ // cleanup after mod system
+ // triggered spell pointer can be not removed in some cases
+ m_caster->ToPlayer()->SetSpellModTakingSpell(this, false);
+ finish(false);
+ SetExecutedCurrently(false);
+ return;
+ }
+ }
+ }
+ }
}
SelectSpellTargets();
@@ -2909,6 +3002,12 @@ void Spell::cast(bool skipCheck)
TakePower();
TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot
}
+ else if (Item* targetItem = m_targets.getItemTarget())
+ {
+ /// Not own traded item (in trader trade slot) req. reagents including triggered spell case
+ if (targetItem->GetOwnerGUID() != m_caster->GetGUID())
+ TakeReagents();
+ }
// are there any spells need to be triggered after hit?
// handle SPELL_AURA_ADD_TARGET_TRIGGER auras
@@ -2938,8 +3037,9 @@ void Spell::cast(bool skipCheck)
switch(m_spellInfo->Effect[i])
{
case SPELL_EFFECT_CHARGE:
+ case SPELL_EFFECT_CHARGE_DEST:
case SPELL_EFFECT_JUMP:
- case SPELL_EFFECT_JUMP2:
+ case SPELL_EFFECT_JUMP_DEST:
case SPELL_EFFECT_LEAP_BACK:
case SPELL_EFFECT_ACTIVATE_RUNE:
HandleEffects(NULL,NULL,NULL,i);
@@ -4274,7 +4374,12 @@ void Spell::TakeRunePower()
void Spell::TakeReagents()
{
if (m_IsTriggeredSpell) // reagents used in triggered spell removed by original spell or don't must be removed.
- return;
+ {
+ Item* targetItem = m_targets.getItemTarget();
+ /// Not own traded item (in trader trade slot) req. reagents including triggered spell case
+ if (!(targetItem && targetItem->GetOwnerGUID() != m_caster->GetGUID()))
+ return;
+ }
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4669,7 +4774,7 @@ SpellCastResult Spell::CheckCast(bool strict)
// - with greater than 10 min CD without SPELL_ATTR_EX4_USABLE_IN_ARENA flag
// - with SPELL_ATTR_EX4_NOT_USABLE_IN_ARENA flag
if ((m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_NOT_USABLE_IN_ARENA) ||
- GetSpellRecoveryTime(m_spellInfo) > 10 * MINUTE * IN_MILISECONDS && !(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_USABLE_IN_ARENA))
+ GetSpellRecoveryTime(m_spellInfo) > 10 * MINUTE * IN_MILLISECONDS && !(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_USABLE_IN_ARENA))
if (MapEntry const* mapEntry = sMapStore.LookupEntry(m_caster->GetMapId()))
if (mapEntry->IsBattleArena())
return SPELL_FAILED_NOT_IN_ARENA;
@@ -5212,24 +5317,6 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_caster->GetTypeId() != TYPEID_PLAYER || !m_caster->ToPlayer()->IsInFeralForm())
return SPELL_FAILED_ONLY_SHAPESHIFT;
break;
- // Wild Growth
- case 48438:
- case 53248:
- case 53249:
- case 53251:
- {
- if (m_caster->GetTypeId() != TYPEID_PLAYER)
- return SPELL_FAILED_DONT_REPORT;
-
- Unit* target = m_targets.getUnitTarget();
- if (!target || target->GetTypeId() != TYPEID_PLAYER)
- return SPELL_FAILED_BAD_TARGETS;
-
- if (!m_caster->ToPlayer()->IsInSameRaidWith(target->ToPlayer()))
- return SPELL_FAILED_TARGET_NOT_IN_RAID;
-
- break;
- }
case 1515:
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
@@ -5304,6 +5391,9 @@ SpellCastResult Spell::CheckCast(bool strict)
if (target->GetTypeId() == TYPEID_UNIT && target->ToCreature()->IsVehicle())
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
+ if (target->IsMounted())
+ return SPELL_FAILED_CANT_BE_CHARMED;
+
if (target->GetCharmerGUID())
return SPELL_FAILED_CHARMED;
@@ -5357,23 +5447,12 @@ SpellCastResult Spell::CheckCast(bool strict)
// allow always ghost flight spells
if (m_originalCaster && m_originalCaster->GetTypeId() == TYPEID_PLAYER && m_originalCaster->isAlive())
{
- // 4197 = Wintergrasp || 4395 = Dalaran && 4564 = Krasus Landing
- if (m_originalCaster->GetZoneId() == 4197 || m_originalCaster->GetZoneId() == 4395 && m_originalCaster->GetAreaId() != 4564)
- return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
+ if (AreaTableEntry const* pArea = GetAreaEntryByAreaID(m_originalCaster->GetAreaId()))
+ if (pArea->flags & AREA_FLAG_NO_FLY_ZONE)
+ return m_IsTriggeredSpell ? SPELL_FAILED_DONT_REPORT : SPELL_FAILED_NOT_HERE;
}
break;
}
- case SPELL_AURA_RANGED_AP_ATTACKER_CREATURES_BONUS:
- {
- if (!m_targets.getUnitTarget() && m_targets.getUnitTarget()->GetTypeId() != TYPEID_UNIT)
- return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
-
- // can be casted at non-friendly unit or own pet/charm
- if (m_caster->IsFriendlyTo(m_targets.getUnitTarget()))
- return SPELL_FAILED_TARGET_FRIENDLY;
-
- break;
- }
case SPELL_AURA_PERIODIC_MANA_LEECH:
{
if (!m_targets.getUnitTarget())
@@ -5392,6 +5471,26 @@ SpellCastResult Spell::CheckCast(bool strict)
}
}
+ // check trade slot case (last, for allow catch any another cast problems)
+ if (m_targets.getTargetMask() & TARGET_FLAG_TRADE_ITEM)
+ {
+ if (m_caster->GetTypeId() != TYPEID_PLAYER)
+ return SPELL_FAILED_NOT_TRADING;
+
+ TradeData* my_trade = m_caster->ToPlayer()->GetTradeData();
+
+ if (!my_trade)
+ return SPELL_FAILED_NOT_TRADING;
+
+ TradeSlots slot = TradeSlots(m_targets.getItemTargetGUID());
+ if (slot != TRADE_SLOT_NONTRADED)
+ return SPELL_FAILED_ITEM_NOT_READY;
+
+ if (!m_IsTriggeredSpell)
+ if (my_trade->GetSpell())
+ return SPELL_FAILED_ITEM_ALREADY_ENCHANTED;
+ }
+
// all ok
return SPELL_CAST_OK;
}
@@ -5892,7 +5991,7 @@ SpellCastResult Spell::CheckItems()
else if (!(p_caster->HasItemCount(m_spellInfo->EffectItemType[i],1)))
return SPELL_FAILED_TOO_MANY_OF_ITEM;
else
- p_caster->CastSpell(m_caster,m_spellInfo->CalculateSimpleValue(1),false); // move this to anywhere
+ p_caster->CastSpell(m_caster,SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1),false); // move this to anywhere
return SPELL_FAILED_DONT_REPORT;
}
}
@@ -6346,6 +6445,8 @@ bool Spell::CheckTarget(Unit* target, uint32 eff)
case SPELL_AURA_AOE_CHARM:
if (target->GetTypeId() == TYPEID_UNIT && target->IsVehicle())
return false;
+ if (target->IsMounted())
+ return false;
if (target->GetCharmerGUID())
return false;
if (int32 damage = CalculateDamage(eff, target))
@@ -6687,8 +6788,9 @@ int32 Spell::CalculateDamageDone(Unit *unit, const uint32 effectMask, float *mul
{
if (IsAreaEffectTarget[m_spellInfo->EffectImplicitTargetA[i]] || IsAreaEffectTarget[m_spellInfo->EffectImplicitTargetB[i]])
{
- if (int32 reducedPct = unit->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE))
- m_damage = m_damage * (100 + reducedPct) / 100;
+ m_damage = float(m_damage) * unit->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE, m_spellInfo->SchoolMask);
+ if (m_caster->GetTypeId() == TYPEID_UNIT)
+ m_damage = float(m_damage) * unit->GetTotalAuraMultiplierByMiscMask(SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE, m_spellInfo->SchoolMask);
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
@@ -6748,8 +6850,8 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk
if (skillId != SKILL_NONE)
{
// skill bonus provided by casting spell (mostly item spells)
- // add the damage modifier from the spell casted (cheat lock / skeleton key etc.) (use m_currentBasePoints, CalculateDamage returns wrong value)
- uint32 spellSkillBonus = uint32(m_currentBasePoints[effIndex]);
+ // add the damage modifier from the spell casted (cheat lock / skeleton key etc.)
+ uint32 spellSkillBonus = uint32(CalculateDamage(effIndex, NULL));
reqSkillValue = lockInfo->Skill[j];
// castitem check: rogue using skeleton keys. the skill values should not be added in this case.
@@ -6778,15 +6880,15 @@ void Spell::SetSpellValue(SpellValueMod mod, int32 value)
switch(mod)
{
case SPELLVALUE_BASE_POINT0:
- m_spellValue->EffectBasePoints[0] = value - int32(1);
+ m_spellValue->EffectBasePoints[0] = SpellMgr::CalculateSpellEffectBaseAmount(value);
m_currentBasePoints[0] = m_spellValue->EffectBasePoints[0]; //this should be removed in the future
break;
case SPELLVALUE_BASE_POINT1:
- m_spellValue->EffectBasePoints[1] = value - int32(1);
+ m_spellValue->EffectBasePoints[1] = SpellMgr::CalculateSpellEffectBaseAmount(value);
m_currentBasePoints[1] = m_spellValue->EffectBasePoints[1];
break;
case SPELLVALUE_BASE_POINT2:
- m_spellValue->EffectBasePoints[2] = value - int32(1);
+ m_spellValue->EffectBasePoints[2] = SpellMgr::CalculateSpellEffectBaseAmount(value);
m_currentBasePoints[2] = m_spellValue->EffectBasePoints[2];
break;
case SPELLVALUE_RADIUS_MOD:
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index a987e35e65d..ffbcfdb056d 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -180,6 +180,7 @@ class SpellCastTargets
Item* getItemTarget() const { return m_itemTarget; }
uint32 getItemTargetEntry() const { return m_itemTargetEntry; }
void setItemTarget(Item* item);
+ void setTradeItemTarget(Player* caster);
void updateTradeSlotItem()
{
if (m_itemTarget && (m_targetMask & TARGET_FLAG_TRADE_ITEM))
@@ -303,7 +304,9 @@ class Spell
void EffectAddFarsight(uint32 i);
void EffectHealMechanical(uint32 i);
void EffectJump(uint32 i);
- void EffectJump2(uint32 i);
+ void EffectJumpDest(uint32 i);
+ void EffectLeapBack(uint32 i);
+ void EffectQuestClear(uint32 i);
void EffectTeleUnitsFaceCaster(uint32 i);
void EffectLearnSkill(uint32 i);
void EffectAddHonor(uint32 i);
@@ -315,6 +318,7 @@ class Spell
void EffectLearnPetSpell(uint32 i);
void EffectWeaponDmg(uint32 i);
void EffectForceCast(uint32 i);
+ void EffectForceCastWithValue(uint32 i);
void EffectTriggerSpell(uint32 i);
void EffectTriggerMissileSpell(uint32 i);
void EffectThreat(uint32 i);
@@ -345,7 +349,7 @@ class Spell
void EffectSelfResurrect(uint32 i);
void EffectSkinning(uint32 i);
void EffectCharge(uint32 i);
- void EffectCharge2(uint32 i);
+ void EffectChargeDest(uint32 i);
void EffectProspecting(uint32 i);
void EffectMilling(uint32 i);
void EffectRenamePet(uint32 i);
@@ -460,7 +464,7 @@ class Spell
void HandleThreatSpells(uint32 spellId);
const SpellEntry * const m_spellInfo;
- int32 m_currentBasePoints[3]; // cache SpellEntry::EffectBasePoints and use for set custom base points
+ int32 m_currentBasePoints[3]; // overrides SpellEntry::EffectBasePoints IMPORTANT: base points != points calculated
Item* m_CastItem;
uint64 m_castItemGUID;
uint8 m_cast_count;
@@ -642,8 +646,10 @@ class Spell
void SpellDamageWeaponDmg(uint32 i);
void SpellDamageHeal(uint32 i);
+ // effect helpers
void GetSummonPosition(uint32 i, Position &pos, float radius = 0.0f, uint32 count = 0);
void SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const *properties);
+ void CalculateJumpSpeeds(uint8 i, float dist, float & speedxy, float & speedz);
SpellCastResult CanOpenLock(uint32 effIndex, uint32 lockid, SkillType& skillid, int32& reqSkillValue, int32& skillValue);
// -------------------------------------------
@@ -769,14 +775,14 @@ namespace Trinity
}
}
- #ifdef WIN32
+ #ifdef _WIN32
template<> inline void Visit(CorpseMapType &) {}
template<> inline void Visit(GameObjectMapType &) {}
template<> inline void Visit(DynamicObjectMapType &) {}
#endif
};
- #ifndef WIN32
+ #ifndef _WIN32
template<> inline void SpellNotifierCreatureAndPlayer::Visit(CorpseMapType&) {}
template<> inline void SpellNotifierCreatureAndPlayer::Visit(GameObjectMapType&) {}
template<> inline void SpellNotifierCreatureAndPlayer::Visit(DynamicObjectMapType&) {}
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 510fdccb98a..55a421b7a57 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -83,8 +83,9 @@ SpellMgr::SpellMgr()
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
case SPELL_EFFECT_CHARGE:
+ case SPELL_EFFECT_CHARGE_DEST:
case SPELL_EFFECT_JUMP:
- case SPELL_EFFECT_JUMP2:
+ case SPELL_EFFECT_JUMP_DEST:
case SPELL_EFFECT_LEAP_BACK:
EffectTargetType[i] = SPELL_REQUIRE_CASTER;
break;
@@ -290,7 +291,7 @@ int32 GetSpellMaxDuration(SpellEntry const *spellInfo)
return (du->Duration[2] == -1) ? -1 : abs(du->Duration[2]);
}
-int32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offensive, bool *result)
+uint32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offensive, bool *result)
{
// we assume that aura dispel chance is 100% on start
// need formula for level difference based chance
@@ -310,7 +311,9 @@ int32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offen
if (result)
*result = !roll_chance_i(resist_chance);
- return resist_chance;
+ resist_chance = resist_chance < 0 ? 0 : resist_chance;
+ resist_chance = resist_chance > 100 ? 100 : resist_chance;
+ return 100 - resist_chance;
}
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell * spell)
@@ -750,20 +753,47 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
if (spellproto->Attributes & SPELL_ATTR_NEGATIVE_1)
return false;
- switch(spellId)
+ switch (spellproto->SpellFamilyName)
{
- //case 37675: // Chaos Blast removed from mangos
- case 34700: // Allergic Reaction
- case 61987: // Avenging Wrath Marker
- case 61988: // Divine Shield exclude aura
- case 50524: // Runic Power Feed
- return false;
- case 12042: // Arcane Power
- case 30877: // Tag Murloc
- return true;
+ case SPELLFAMILY_GENERIC:
+ switch (spellId)
+ {
+ case 34700: // Allergic Reaction
+ case 61987: // Avenging Wrath Marker
+ case 61988: // Divine Shield exclude aura
+ return false;
+ case 30877: // Tag Murloc
+ return true;
+ default:
+ break;
+ }
+ break;
+ case SPELLFAMILY_MAGE:
+ // Amplify Magic, Dampen Magic
+ if (spellproto->SpellFamilyFlags[0] == 0x00002000)
+ return true;
+ break;
+ case SPELLFAMILY_PRIEST:
+ switch (spellId)
+ {
+ case 64844: // Divine Hymn
+ case 64904: // Hymn of Hope
+ case 47585: // Dispersion
+ return true;
+ default:
+ break;
+ }
+ break;
+ case SPELLFAMILY_HUNTER:
+ // Aspect of the Viper
+ if (spellId == 34074)
+ return true;
+ break;
+ default:
+ break;
}
- switch(spellproto->Mechanic)
+ switch (spellproto->Mechanic)
{
case MECHANIC_IMMUNE_SHIELD:
return true;
@@ -809,16 +839,16 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
case SPELL_AURA_MOD_HEALING_PCT:
case SPELL_AURA_MOD_HEALING_DONE:
case SPELL_AURA_MOD_DAMAGE_PERCENT_DONE:
- if (spellproto->CalculateSimpleValue(effIndex) < 0)
+ if (SpellMgr::CalculateSpellEffectAmount(spellproto, effIndex) < 0)
return false;
break;
case SPELL_AURA_MOD_DAMAGE_TAKEN: // dependent from bas point sign (positive -> negative)
- if (spellproto->CalculateSimpleValue(effIndex) > 0)
+ if (SpellMgr::CalculateSpellEffectAmount(spellproto, effIndex) > 0)
return false;
break;
case SPELL_AURA_MOD_CRIT_PCT:
case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
- if (spellproto->CalculateSimpleValue(effIndex) > 0)
+ if (SpellMgr::CalculateSpellEffectAmount(spellproto, effIndex) > 0)
return true; // some expected positive spells have SPELL_ATTR_EX_NEGATIVE
break;
case SPELL_AURA_ADD_TARGET_TRIGGER:
@@ -861,6 +891,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
case SPELL_AURA_PERIODIC_LEECH:
case SPELL_AURA_MOD_STALKED:
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
+ case SPELL_AURA_PREVENT_RESSURECTION:
return false;
case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
// part of negative spell if casted at self (prevent cancel)
@@ -896,7 +927,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
switch(spellproto->EffectMiscValue[effIndex])
{
case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
- if (spellproto->CalculateSimpleValue(effIndex) > 0)
+ if (SpellMgr::CalculateSpellEffectAmount(spellproto, effIndex) > 0)
{
if (!deep)
{
@@ -1142,7 +1173,7 @@ void SpellMgr::LoadSpellTargetPositions()
// additional requirements
if (spellInfo->Effect[i]==SPELL_EFFECT_BIND && spellInfo->EffectMiscValue[i])
{
- uint32 area_id = MapManager::Instance().GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z);
+ uint32 area_id = sMapMgr.GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z);
if (area_id != uint32(spellInfo->EffectMiscValue[i]))
{
sLog.outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.",Spell_ID, spellInfo->EffectMiscValue[i], area_id);
@@ -1781,6 +1812,80 @@ bool SpellMgr::IsSkillBonusSpell(uint32 spellId) const
return false;
}
+bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const
+{
+ SkillLineAbilityMapBounds bounds = GetSkillLineAbilityMapBounds(spellId);
+
+ for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
+ if (_spell_idx->second->skillId == uint32(type))
+ return true;
+
+ return false;
+}
+
+// basepoints provided here have to be valid basepoints (use SpellMgr::CalculateSpellEffectBaseAmount)
+int32 SpellMgr::CalculateSpellEffectAmount(SpellEntry const * spellEntry, uint8 effIndex, Unit const * caster, int32 const * effBasePoints, Unit const * target)
+{
+ float basePointsPerLevel = spellEntry->EffectRealPointsPerLevel[effIndex];
+ int32 basePoints = effBasePoints ? *effBasePoints : spellEntry->EffectBasePoints[effIndex];
+ int32 randomPoints = int32(spellEntry->EffectDieSides[effIndex]);
+
+ // base amount modification based on spell lvl vs caster lvl
+ if (caster)
+ {
+ int32 level = int32(caster->getLevel());
+ if (level > int32(spellEntry->maxLevel) && spellEntry->maxLevel > 0)
+ level = int32(spellEntry->maxLevel);
+ else if (level < int32(spellEntry->baseLevel))
+ level = int32(spellEntry->baseLevel);
+ level -= int32(spellEntry->spellLevel);
+ basePoints += int32(level * basePointsPerLevel);
+ }
+
+ // roll in a range <1;EffectDieSides> as of patch 3.3.3
+ switch(randomPoints)
+ {
+ case 0: // not used
+ case 1: basePoints += 1; break; // range 1..1
+ default:
+ // range can have positive (1..rand) and negative (rand..1) values, so order its for irand
+ int32 randvalue = (randomPoints >= 1)
+ ? irand(1, randomPoints)
+ : irand(randomPoints, 1);
+
+ basePoints += randvalue;
+ break;
+ }
+
+ int32 value = basePoints;
+
+ // random damage
+ if (caster)
+ {
+ // bonus amount from combo points
+ if (caster->m_movedPlayer)
+ if (uint8 comboPoints = caster->m_movedPlayer->GetComboPoints())
+ if (float comboDamage = spellEntry->EffectPointsPerComboPoint[effIndex])
+ value += int32(comboDamage * comboPoints);
+
+ value = caster->ApplyEffectModifiers(spellEntry, effIndex, value);
+
+ // amount multiplication based on caster's level
+ if (!basePointsPerLevel && (spellEntry->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellEntry->spellLevel) &&
+ spellEntry->Effect[effIndex] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
+ spellEntry->Effect[effIndex] != SPELL_EFFECT_KNOCK_BACK &&
+ spellEntry->EffectApplyAuraName[effIndex] != SPELL_AURA_MOD_SPEED_ALWAYS &&
+ spellEntry->EffectApplyAuraName[effIndex] != SPELL_AURA_MOD_SPEED_NOT_STACK &&
+ spellEntry->EffectApplyAuraName[effIndex] != SPELL_AURA_MOD_INCREASE_SPEED &&
+ spellEntry->EffectApplyAuraName[effIndex] != SPELL_AURA_MOD_DECREASE_SPEED)
+ //there are many more: slow speed, -healing pct
+ value = int32(value*0.25f*exp(caster->getLevel()*(70-spellEntry->spellLevel)/1000.0f));
+ //value = int32(value * (int32)getLevel() / (int32)(spellProto->spellLevel ? spellProto->spellLevel : 1));
+ }
+
+ return value;
+}
+
SpellEntry const* SpellMgr::SelectAuraRankForPlayerLevel(SpellEntry const* spellInfo, uint32 playerLevel) const
{
// ignore passive spells
@@ -1843,7 +1948,7 @@ void SpellMgr::LoadSpellLearnSkills()
{
SpellLearnSkillNode dbc_node;
dbc_node.skill = entry->EffectMiscValue[i];
- dbc_node.step = entry->CalculateSimpleValue(i);
+ dbc_node.step = SpellMgr::CalculateSpellEffectAmount(entry, i);
if (dbc_node.skill != SKILL_RIDING)
dbc_node.value = 1;
else
@@ -2030,7 +2135,7 @@ void SpellMgr::LoadSpellPetAuras()
continue;
}
- PetAura pa(pet, aura, spellInfo->EffectImplicitTargetA[eff] == TARGET_UNIT_PET, spellInfo->CalculateSimpleValue(eff));
+ PetAura pa(pet, aura, spellInfo->EffectImplicitTargetA[eff] == TARGET_UNIT_PET, SpellMgr::CalculateSpellEffectAmount(spellInfo, eff));
mSpellPetAuraMap[(spell<<8) + eff] = pa;
}
@@ -2847,38 +2952,38 @@ int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry cons
{
// Wyvern Sting
if (spellproto->SpellFamilyFlags[1] & 0x1000)
- return 6 * IN_MILISECONDS;
+ return 6 * IN_MILLISECONDS;
// Hunter's Mark
if (spellproto->SpellFamilyFlags[0] & 0x400)
- return 120 * IN_MILISECONDS;
+ return 120 * IN_MILLISECONDS;
break;
}
case SPELLFAMILY_PALADIN:
{
// Repentance - limit to 6 seconds in PvP
if (spellproto->SpellFamilyFlags[0] & 0x4)
- return 6 * IN_MILISECONDS;
+ return 6 * IN_MILLISECONDS;
break;
}
case SPELLFAMILY_DRUID:
{
// Faerie Fire - limit to 40 seconds in PvP (3.1)
if (spellproto->SpellFamilyFlags[0] & 0x400)
- return 40 * IN_MILISECONDS;
+ return 40 * IN_MILLISECONDS;
break;
}
case SPELLFAMILY_PRIEST:
{
// Vampiric Embrace - limit to 60 seconds in PvP (3.1)
if ((spellproto->SpellFamilyFlags[0] & 0x4) && spellproto->SpellIconID == 150)
- return 60 * IN_MILISECONDS;
+ return 60 * IN_MILLISECONDS;
break;
}
default:
break;
}
- return 10 * IN_MILISECONDS;
+ return 10 * IN_MILLISECONDS;
}
bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group)
@@ -2974,7 +3079,13 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
switch(spellId)
{
case 58600: // No fly Zone - Dalaran (Krasus Landing exception)
- if (!player || player->GetAreaId() == 4564 || !player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY) || player->HasAura(44795))
+ if (!player)
+ return false;
+
+ AreaTableEntry const* pArea = GetAreaEntryByAreaID(player->GetAreaId());
+ if (!(pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE))
+ return false;
+ if (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY) || player->HasAura(44795))
return false;
break;
}
@@ -3018,6 +3129,7 @@ bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *sp
{
// DOT or HOT from different casters will stack
case SPELL_AURA_PERIODIC_DAMAGE:
+ case SPELL_AURA_PERIODIC_DUMMY:
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
case SPELL_AURA_PERIODIC_ENERGIZE:
@@ -3350,8 +3462,9 @@ void SpellMgr::LoadSpellCustomAttr()
count++;
break;
case SPELL_EFFECT_CHARGE:
+ case SPELL_EFFECT_CHARGE_DEST:
case SPELL_EFFECT_JUMP:
- case SPELL_EFFECT_JUMP2:
+ case SPELL_EFFECT_JUMP_DEST:
case SPELL_EFFECT_LEAP_BACK:
if (!spellInfo->speed && !spellInfo->SpellFamilyName)
spellInfo->speed = SPEED_CHARGE;
@@ -3505,6 +3618,12 @@ void SpellMgr::LoadSpellCustomAttr()
case 39365: // Thundering Storm
case 41071: // Raise Dead (HACK)
case 52124: // Sky Darkener Assault
+ case 42442: // Vengeance Landing Cannonfire
+ case 45863: // Cosmetic - Incinerate to Random Target
+ case 25425: // Shoot
+ case 45761: // Shoot
+ case 42611: // Shoot
+ case 62374: // Pursued
spellInfo->MaxAffectedTargets = 1;
count++;
break;
@@ -3526,6 +3645,8 @@ void SpellMgr::LoadSpellCustomAttr()
case 54172: // Divine Storm (heal)
case 29213: // Curse of the Plaguebringer - Noth
case 28542: // Life Drain - Sapphiron
+ case 66588: // Flaming Spear
+ case 54171: // Divine Storm
spellInfo->MaxAffectedTargets = 3;
count++;
break;
@@ -3587,6 +3708,15 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->procCharges = 6;
count++;
break;
+ case 47201: // Everlasting Affliction
+ case 47202:
+ case 47203:
+ case 47204:
+ case 47205:
+ // add corruption to affected spells
+ spellInfo->EffectSpellClassMask[1][0] |= 2;
+ count++;
+ break;
case 51852: // The Eye of Acherus (no spawn in phase 2 in db)
spellInfo->EffectMiscValue[0] |= 1;
count++;
@@ -3650,10 +3780,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->rangeIndex = 13;
count++;
break;
- case 62374: // Pursued
- spellInfo->MaxAffectedTargets = 1;
- count++;
- break;
case 48743: // Death Pact
spellInfo->AttributesEx &= ~SPELL_ATTR_EX_CANT_TARGET_SELF;
count++;
@@ -3675,30 +3801,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->EffectMiscValue[0] = MECHANIC_IMMUNE_SHIELD;
count++;
break;
- case 42442: // Vengeance Landing Cannonfire
- spellInfo->MaxAffectedTargets = 1;
- count++;
- break;
- case 45863: // Cosmetic - Incinerate to Random Target
- spellInfo->MaxAffectedTargets = 1;
- count++;
- break;
- case 25425: // Shoot
- spellInfo->MaxAffectedTargets = 1;
- count++;
- break;
- case 45761: // Shoot
- spellInfo->MaxAffectedTargets = 1;
- count++;
- break;
- case 42611: // Shoot
- spellInfo->MaxAffectedTargets = 1;
- count++;
- break;
- case 66588: // Flaming Spear
- spellInfo->MaxAffectedTargets = 3;
- count++;
- break;
case 53651:
spellInfo->AttributesEx3 |= SPELL_ATTR_EX3_NO_INITIAL_AGGRO;
count++;
@@ -3805,17 +3907,6 @@ void SpellMgr::LoadEnchantCustomAttr()
sLog.outString(">> Loaded %u custom enchant attributes", count);
}
-bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const
-{
- SkillLineAbilityMapBounds bounds = GetSkillLineAbilityMapBounds(spellId);
-
- for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
- if (_spell_idx->second->skillId == uint32(type))
- return true;
-
- return false;
-}
-
void SpellMgr::LoadSpellLinked()
{
mSpellLinkedMap.clear(); // need for reload case
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index 224760029e7..872a19a27f1 100644
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -28,9 +28,9 @@
#include "SpellAuraDefines.h"
#include "DBCStructure.h"
#include "DBCStores.h"
-#include "Database/SQLStorage.h"
+#include "SQLStorage.h"
-#include "Utilities/UnorderedMap.h"
+#include "UnorderedMap.h"
#include "Player.h"
@@ -192,7 +192,7 @@ AuraState GetSpellAuraState(SpellEntry const * spellInfo);
inline float GetSpellRadiusForHostile(SpellRadiusEntry const *radius) { return (radius ? radius->radiusHostile : 0); }
inline float GetSpellRadiusForFriend(SpellRadiusEntry const *radius) { return (radius ? radius->radiusFriend : 0); }
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell * spell = NULL);
-int32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offensive, bool *result);
+uint32 GetDispelChance(Unit* auraCaster, Unit* target, uint32 spellId, bool offensive, bool *result);
inline float GetSpellMinRangeForHostile(SpellRangeEntry const *range) { return (range ? range->minRangeHostile : 0); }
inline float GetSpellMaxRangeForHostile(SpellRangeEntry const *range) { return (range ? range->maxRangeHostile : 0); }
inline float GetSpellMinRangeForFriend(SpellRangeEntry const *range) { return (range ? range->minRangeFriend : 0); }
@@ -1212,6 +1212,8 @@ class SpellMgr
bool IsSkillBonusSpell(uint32 spellId) const;
bool IsSkillTypeSpell(uint32 spellId, SkillType type) const;
+ static int32 CalculateSpellEffectAmount(SpellEntry const * spellEntry, uint8 effIndex, Unit const * caster = NULL, int32 const * basePoints = NULL, Unit const * target = NULL);
+ static int32 CalculateSpellEffectBaseAmount(int32 value) {return value-1;};
// Spell correctess for client using
static bool IsSpellValid(SpellEntry const * spellInfo, Player* pl = NULL, bool msg = true);
@@ -1322,21 +1324,20 @@ class SpellMgr
}
void SetSpellDifficultyId(uint32 spellId, uint32 id) { mSpellDifficultySearcherMap[spellId] = id; }
- const SpellsRequiringSpellMap GetSpellsRequiringSpell()
- {
- return this->mSpellsReqSpell;
- }
-
- uint32 GetSpellRequired(uint32 spell_id) const
- {
- SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
+ const SpellsRequiringSpellMap GetSpellsRequiringSpell()
+ {
+ return this->mSpellsReqSpell;
+ }
- if (itr == mSpellReq.end())
- return NULL;
+ uint32 GetSpellRequired(uint32 spell_id) const
+ {
+ SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
- return itr->second;
- }
+ if (itr == mSpellReq.end())
+ return NULL;
+ return itr->second;
+ }
// Modifiers
public:
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index 8ebcbce50c8..964e7f9b3b1 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -20,8 +20,8 @@
#include "Common.h"
#include "PlayerDump.h"
-#include "Database/DatabaseEnv.h"
-#include "Database/SQLStorage.h"
+#include "DatabaseEnv.h"
+#include "SQLStorage.h"
#include "UpdateFields.h"
#include "ObjectMgr.h"
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp
index d74f945fd5a..0bfb7f19345 100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
@@ -37,7 +37,7 @@ Weather::Weather(uint32 zone, WeatherZoneChances const* weatherChances) : m_zone
m_type = WEATHER_TYPE_FINE;
m_grade = 0;
- sLog.outDetail("WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILISECONDS)));
+ sLog.outDetail("WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)));
}
/// Launch a weather update
diff --git a/src/server/game/World/TimeMgr.cpp b/src/server/game/World/TimeMgr.cpp
deleted file mode 100644
index 42ecc77bbf9..00000000000
--- a/src/server/game/World/TimeMgr.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "TimeMgr.h"
-#include "Policies/SingletonImp.h"
-
-INSTANTIATE_SINGLETON_1(GameTime);
-
-bool PeriodicTimer::Update(const uint32 &diff)
-{
- if((i_expireTime -= diff) > 0)
- return false;
-
- i_expireTime += i_period > diff ? i_period : diff;
- return true;
-}
-
-void PeriodicTimer::SetPeriodic(int32 period, int32 start_time)
-{
- i_expireTime=start_time, i_period=period;
-}
diff --git a/src/server/game/World/TimeMgr.h b/src/server/game/World/TimeMgr.h
deleted file mode 100644
index 5776bb1151c..00000000000
--- a/src/server/game/World/TimeMgr.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef _TIMEMGR_H
-#define _TIMEMGR_H
-
-#include "Timer.h"
-#include "Policies/Singleton.h"
-
-struct IntervalTimer
-{
- public:
- IntervalTimer() : _interval(0), _current(0) {}
-
- void Update(time_t diff) { _current += diff; if(_current<0) _current=0;}
- bool Passed() { return _current >= _interval; }
- void Reset() { if(_current >= _interval) _current -= _interval; }
-
- void SetCurrent(time_t current) { _current = current; }
- void SetInterval(time_t interval) { _interval = interval; }
- time_t GetInterval() const { return _interval; }
- time_t GetCurrent() const { return _current; }
-
- private:
- time_t _interval;
- time_t _current;
-};
-
-template <typename T> struct TimeTrack
-{
- public:
- TimeTrack(T expire) : i_expireTime(expire) {}
- void Update(T diff) { i_expireTime -= diff; }
- bool Passed(void) const { return (i_expireTime <= 0); }
- void Reset(T interval) { i_expireTime = interval; }
- T GetExpireTime(void) const { return i_expireTime; }
- private:
- T i_expireTime;
-};
-
-typedef TimeTrack<time_t> TimeTracker;
-typedef TimeTrack<int32> TimeTrackerSmall;
-
-struct PeriodicTimer
-{
- public:
- PeriodicTimer(int32 period, int32 start_time) :
- i_expireTime(start_time), i_period(period) {}
-
- bool Update(const uint32 &diff);
- void SetPeriodic(int32 period, int32 start_time);
-
- private:
- int32 i_period;
- int32 i_expireTime;
-};
-
-class GameTime
-{
- public:
- /// When server started?
- time_t const& GetStartTime() const { return m_startTime; }
- /// What time is it?
- time_t const& GetGameTime() const { return m_gameTime; }
- /// Uptime (in secs)
- uint32 GetUptime() const { return uint32(m_gameTime - m_startTime); }
-
- void SetGameTime(void) { m_gameTime = time(NULL); }
- void SetStartTime(void){ m_startTime = time(NULL); }
- private:
- time_t m_gameTime;
- time_t m_startTime;
-};
-
-#define sGameTime Trinity::Singleton<GameTime>::Instance()
-
-#endif
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 0b00621dc72..05065140c35 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -23,8 +23,8 @@
*/
#include "Common.h"
-#include "Database/DatabaseEnv.h"
-#include "Config/ConfigEnv.h"
+#include "DatabaseEnv.h"
+#include "ConfigEnv.h"
#include "SystemConfig.h"
#include "Log.h"
#include "Opcodes.h"
@@ -48,7 +48,6 @@
#include "ItemEnchantmentMgr.h"
#include "MapManager.h"
#include "CreatureAIRegistry.h"
-#include "Policies/SingletonImp.h"
#include "BattleGroundMgr.h"
#include "OutdoorPvPMgr.h"
#include "TemporarySummon.h"
@@ -57,23 +56,21 @@
#include "VMapFactory.h"
#include "GlobalEvents.h"
#include "GameEventMgr.h"
-#include "PoolHandler.h"
-#include "Database/DatabaseImpl.h"
+#include "PoolMgr.h"
+#include "DatabaseImpl.h"
#include "GridNotifiersImpl.h"
#include "CellImpl.h"
#include "InstanceSaveMgr.h"
#include "Util.h"
#include "Language.h"
#include "CreatureGroups.h"
-#include "Transports.h"
+#include "Transport.h"
#include "ProgressBar.h"
#include "ScriptMgr.h"
#include "AddonMgr.h"
#include "LFGMgr.h"
#include "ConditionMgr.h"
-INSTANTIATE_SINGLETON_1(World);
-
volatile bool World::m_stopEvent = false;
uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE;
volatile uint32 World::m_worldLoopCounter = 0;
@@ -142,7 +139,7 @@ World::~World()
VMAP::VMapFactory::clear();
- if (m_resultQueue) delete m_resultQueue;
+ delete m_resultQueue;
//TODO free addSessQueue
}
@@ -316,17 +313,18 @@ int32 World::GetQueuePos(WorldSession* sess)
void World::AddQueuedPlayer(WorldSession* sess)
{
sess->SetInQueue(true);
- m_QueuedPlayer.push_back (sess);
+ m_QueuedPlayer.push_back(sess);
// The 1st SMSG_AUTH_RESPONSE needs to contain other info too.
- WorldPacket packet (SMSG_AUTH_RESPONSE, 1 + 4 + 1 + 4 + 1);
- packet << uint8 (AUTH_WAIT_QUEUE);
- packet << uint32 (0); // BillingTimeRemaining
- packet << uint8 (0); // BillingPlanFlags
- packet << uint32 (0); // BillingTimeRested
- packet << uint8 (sess->Expansion()); // 0 - normal, 1 - TBC, 2 - WOTLK, must be set in database manually for each account
- packet << uint32(GetQueuePos (sess));
- sess->SendPacket (&packet);
+ WorldPacket packet(SMSG_AUTH_RESPONSE, 1+4+1+4+1);
+ packet << uint8(AUTH_WAIT_QUEUE);
+ packet << uint32(0); // BillingTimeRemaining
+ packet << uint8(0); // BillingPlanFlags
+ packet << uint32(0); // BillingTimeRested
+ packet << uint8(sess->Expansion()); // 0 - normal, 1 - TBC, 2 - WOTLK, must be set in database manually for each account
+ packet << uint32(GetQueuePos(sess)); // Queue position
+ packet << uint8(0); // Unk 3.3.0
+ sess->SendPacket(&packet);
//sess->SendAuthWaitQue (GetQueuePos (sess));
}
@@ -616,7 +614,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_MAIL_LEVEL_REQ] = sConfig.GetIntDefault("LevelReq.Mail", 1);
m_configs[CONFIG_ALLOW_PLAYER_COMMANDS] = sConfig.GetBoolDefault("AllowPlayerCommands", 1);
m_configs[CONFIG_GRID_UNLOAD] = sConfig.GetBoolDefault("GridUnload", true);
- m_configs[CONFIG_INTERVAL_SAVE] = sConfig.GetIntDefault("PlayerSaveInterval", 15 * MINUTE * IN_MILISECONDS);
+ m_configs[CONFIG_INTERVAL_SAVE] = sConfig.GetIntDefault("PlayerSaveInterval", 15 * MINUTE * IN_MILLISECONDS);
m_configs[CONFIG_INTERVAL_DISCONNECT_TOLERANCE] = sConfig.GetIntDefault("DisconnectToleranceInterval", 0);
m_configs[CONFIG_STATS_SAVE_ONLY_ON_LOGOUT] = sConfig.GetBoolDefault("PlayerSave.Stats.SaveOnlyOnLogout", true);
@@ -627,14 +625,14 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = 0;
}
- m_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfig.GetIntDefault("GridCleanUpDelay", 5 * MINUTE * IN_MILISECONDS);
+ m_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfig.GetIntDefault("GridCleanUpDelay", 5 * MINUTE * IN_MILLISECONDS);
if (m_configs[CONFIG_INTERVAL_GRIDCLEAN] < MIN_GRID_DELAY)
{
sLog.outError("GridCleanUpDelay (%i) must be greater %u. Use this minimal value.",m_configs[CONFIG_INTERVAL_GRIDCLEAN],MIN_GRID_DELAY);
m_configs[CONFIG_INTERVAL_GRIDCLEAN] = MIN_GRID_DELAY;
}
if (reload)
- MapManager::Instance().SetGridCleanUpDelay(m_configs[CONFIG_INTERVAL_GRIDCLEAN]);
+ sMapMgr.SetGridCleanUpDelay(m_configs[CONFIG_INTERVAL_GRIDCLEAN]);
m_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfig.GetIntDefault("MapUpdateInterval", 100);
if (m_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY)
@@ -643,15 +641,15 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_INTERVAL_MAPUPDATE] = MIN_MAP_UPDATE_DELAY;
}
if (reload)
- MapManager::Instance().SetMapUpdateInterval(m_configs[CONFIG_INTERVAL_MAPUPDATE]);
+ sMapMgr.SetMapUpdateInterval(m_configs[CONFIG_INTERVAL_MAPUPDATE]);
- m_configs[CONFIG_INTERVAL_CHANGEWEATHER] = sConfig.GetIntDefault("ChangeWeatherInterval", 10 * MINUTE * IN_MILISECONDS);
+ m_configs[CONFIG_INTERVAL_CHANGEWEATHER] = sConfig.GetIntDefault("ChangeWeatherInterval", 10 * MINUTE * IN_MILLISECONDS);
if (reload)
{
uint32 val = sConfig.GetIntDefault("WorldServerPort", DEFAULT_WORLDSERVER_PORT);
if (val != m_configs[CONFIG_PORT_WORLD])
- sLog.outError("WorldServerPort option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_PORT_WORLD]);
+ sLog.outError("WorldServerPort option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_PORT_WORLD]);
}
else
m_configs[CONFIG_PORT_WORLD] = sConfig.GetIntDefault("WorldServerPort", DEFAULT_WORLDSERVER_PORT);
@@ -660,7 +658,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME);
if (val != m_configs[CONFIG_SOCKET_SELECTTIME])
- sLog.outError("SocketSelectTime option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_SOCKET_SELECTTIME]);
+ sLog.outError("SocketSelectTime option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_SOCKET_SELECTTIME]);
}
else
m_configs[CONFIG_SOCKET_SELECTTIME] = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME);
@@ -669,7 +667,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_SESSION_ADD_DELAY] = sConfig.GetIntDefault("SessionAddDelay", 10000);
m_configs[CONFIG_GROUP_XP_DISTANCE] = sConfig.GetIntDefault("MaxGroupXPDistance", 74);
- /// \todo Add MonsterSight and GuarderSight (with meaning) in Trinityd.conf or put them as define
+ /// \todo Add MonsterSight and GuarderSight (with meaning) in worldserver.conf or put them as define
m_configs[CONFIG_SIGHT_MONSTER] = sConfig.GetIntDefault("MonsterSight", 50);
m_configs[CONFIG_SIGHT_GUARDER] = sConfig.GetIntDefault("GuarderSight", 50);
@@ -677,7 +675,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("GameType", 0);
if (val != m_configs[CONFIG_GAME_TYPE])
- sLog.outError("GameType option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_GAME_TYPE]);
+ sLog.outError("GameType option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_GAME_TYPE]);
}
else
m_configs[CONFIG_GAME_TYPE] = sConfig.GetIntDefault("GameType", 0);
@@ -686,7 +684,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT);
if (val != m_configs[CONFIG_REALM_ZONE])
- sLog.outError("RealmZone option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_REALM_ZONE]);
+ sLog.outError("RealmZone option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_REALM_ZONE]);
}
else
m_configs[CONFIG_REALM_ZONE] = sConfig.GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT);
@@ -865,7 +863,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_CAST_UNSTUCK] = sConfig.GetBoolDefault("CastUnstuck", true);
m_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfig.GetIntDefault("Instance.ResetTimeHour", 4);
- m_configs[CONFIG_INSTANCE_UNLOAD_DELAY] = sConfig.GetIntDefault("Instance.UnloadDelay", 30 * MINUTE * IN_MILISECONDS);
+ m_configs[CONFIG_INSTANCE_UNLOAD_DELAY] = sConfig.GetIntDefault("Instance.UnloadDelay", 30 * MINUTE * IN_MILLISECONDS);
m_configs[CONFIG_MAX_PRIMARY_TRADE_SKILL] = sConfig.GetIntDefault("MaxPrimaryTradeSkill", 2);
m_configs[CONFIG_MIN_PETITION_SIGNS] = sConfig.GetIntDefault("MinPetitionSigns", 9);
@@ -913,7 +911,7 @@ void World::LoadConfigSettings(bool reload)
}
if (reload)
{
- m_timers[WUPDATE_UPTIME].SetInterval(m_configs[CONFIG_UPTIME_UPDATE]*MINUTE*IN_MILISECONDS);
+ m_timers[WUPDATE_UPTIME].SetInterval(m_configs[CONFIG_UPTIME_UPDATE]*MINUTE*IN_MILLISECONDS);
m_timers[WUPDATE_UPTIME].Reset();
}
@@ -926,7 +924,7 @@ void World::LoadConfigSettings(bool reload)
}
if (reload)
{
- m_timers[WUPDATE_CLEANDB].SetInterval(m_configs[CONFIG_LOGDB_CLEARINTERVAL] * MINUTE * IN_MILISECONDS);
+ m_timers[WUPDATE_CLEANDB].SetInterval(m_configs[CONFIG_LOGDB_CLEARINTERVAL] * MINUTE * IN_MILLISECONDS);
m_timers[WUPDATE_CLEANDB].Reset();
}
m_configs[CONFIG_LOGDB_CLEARTIME] = sConfig.GetIntDefault("LogDB.Opt.ClearTime", 1209600); // 14 days default
@@ -990,7 +988,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfig.GetIntDefault("Expansion",1);
if (val != m_configs[CONFIG_EXPANSION])
- sLog.outError("Expansion option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[CONFIG_EXPANSION]);
+ sLog.outError("Expansion option can't be changed at worldserver.conf reload, using current value (%u).",m_configs[CONFIG_EXPANSION]);
}
else
m_configs[CONFIG_EXPANSION] = sConfig.GetIntDefault("Expansion",1);
@@ -1015,6 +1013,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = sConfig.GetIntDefault("Quests.HighLevelHideDiff", 7);
if (m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] > MAX_LEVEL)
m_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = MAX_LEVEL;
+ m_configs[CONFIG_QUEST_IGNORE_RAID] = sConfig.GetBoolDefault("Quests.IgnoreRaid", false);
m_configs[CONFIG_RANDOM_BG_RESET_HOUR] = sConfig.GetIntDefault("BattleGround.Random.ResetHour", 6);
if (m_configs[CONFIG_RANDOM_BG_RESET_HOUR] < 0 || m_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
@@ -1061,11 +1060,11 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.Enable", false);
m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false);
m_configs[CONFIG_BATTLEGROUND_INVITATION_TYPE] = sConfig.GetIntDefault ("Battleground.InvitationType", 0);
- m_configs[CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER] = sConfig.GetIntDefault ("BattleGround.PrematureFinishTimer", 5 * MINUTE * IN_MILISECONDS);
- m_configs[CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH] = sConfig.GetIntDefault ("BattleGround.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILISECONDS);
+ m_configs[CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER] = sConfig.GetIntDefault ("BattleGround.PrematureFinishTimer", 5 * MINUTE * IN_MILLISECONDS);
+ m_configs[CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH] = sConfig.GetIntDefault ("BattleGround.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILLISECONDS);
m_configs[CONFIG_BG_XP_FOR_KILL] = sConfig.GetBoolDefault("Battleground.GiveXPForKills", false);
m_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfig.GetIntDefault ("Arena.MaxRatingDifference", 150);
- m_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfig.GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILISECONDS);
+ m_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfig.GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
m_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = sConfig.GetBoolDefault("Arena.AutoDistributePoints", false);
m_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS] = sConfig.GetIntDefault ("Arena.AutoDistributeInterval", 7);
m_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Arena.QueueAnnouncer.Enable", false);
@@ -1180,7 +1179,7 @@ void World::LoadConfigSettings(bool reload)
if (reload)
{
if (dataPath != m_dataPath)
- sLog.outError("DataDir option can't be changed at Trinityd.conf reload, using current value (%s).",m_dataPath.c_str());
+ sLog.outError("DataDir option can't be changed at worldserver.conf reload, using current value (%s).",m_dataPath.c_str());
}
else
{
@@ -1273,7 +1272,7 @@ void World::SetInitialWorldSettings()
||m_configs[CONFIG_EXPANSION] && (
!MapManager::ExistMapAndVMap(530,10349.6f,-6357.29f) || !MapManager::ExistMapAndVMap(530,-3961.64f,-13931.2f)))
{
- sLog.outError("Correct *.map files not found in path '%smaps' or *.vmap/*vmdir files in '%svmaps'. Please place *.map/*.vmap/*.vmdir files in appropriate directories or correct the DataDir value in the Trinityd.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
+ sLog.outError("Correct *.map files not found in path '%smaps' or *.vmtree/*.vmtile files in '%svmaps'. Please place *.map/*.vmtree/*.vmtile files in appropriate directories or correct the DataDir value in the worldserver.conf file.",m_dataPath.c_str(),m_dataPath.c_str());
exit(1);
}
@@ -1319,6 +1318,7 @@ void World::SetInitialWorldSettings()
objmgr.LoadCreatureLocales();
objmgr.LoadGameObjectLocales();
objmgr.LoadItemLocales();
+ objmgr.LoadItemSetNameLocales();
objmgr.LoadQuestLocales();
objmgr.LoadNpcTextLocales();
objmgr.LoadPageTextLocales();
@@ -1331,7 +1331,7 @@ void World::SetInitialWorldSettings()
sLog.outString("Loading Page Texts...");
objmgr.LoadPageTexts();
- sLog.outString("Loading Game Object Templates..."); // must be after LoadPageTexts
+ sLog.outString("Loading Game Object Templates..."); // must be after LoadPageTexts
objmgr.LoadGameobjectInfo();
sLog.outString("Loading Spell Rank Data...");
@@ -1370,9 +1370,12 @@ void World::SetInitialWorldSettings()
sLog.outString("Loading Item Random Enchantments Table...");
LoadRandomEnchantmentsTable();
- sLog.outString("Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
+ sLog.outString("Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
objmgr.LoadItemPrototypes();
+ sLog.outString("Loading Item set names..."); // must be after LoadItemPrototypes
+ objmgr.LoadItemSetNames();
+
sLog.outString("Loading Creature Model Based Info Data...");
objmgr.LoadCreatureModelInfo();
@@ -1407,15 +1410,15 @@ void World::SetInitialWorldSettings()
objmgr.LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
sLog.outString("Loading Vehicle Accessories...");
- objmgr.LoadVehicleAccessories(); // must be after LoadCreatureTemplates()
+ objmgr.LoadVehicleAccessories(); // must be after LoadCreatureTemplates()
- sLog.outString("Loading Creature Respawn Data..."); // must be after PackInstances()
+ sLog.outString("Loading Creature Respawn Data..."); // must be after PackInstances()
objmgr.LoadCreatureRespawnTimes();
sLog.outString("Loading Gameobject Data...");
objmgr.LoadGameobjects();
- sLog.outString("Loading Gameobject Respawn Data..."); // must be after PackInstances()
+ sLog.outString("Loading Gameobject Respawn Data..."); // must be after PackInstances()
objmgr.LoadGameobjectRespawnTimes();
sLog.outString("Loading Objects Pooling Data...");
@@ -1439,7 +1442,7 @@ void World::SetInitialWorldSettings()
sLog.outString("Loading UNIT_NPC_FLAG_SPELLCLICK Data...");
objmgr.LoadNPCSpellClickSpells();
- sLog.outString("Loading SpellArea Data..."); // must be after quest load
+ sLog.outString("Loading SpellArea Data..."); // must be after quest load
spellmgr.LoadSpellAreas();
sLog.outString("Loading AreaTrigger definitions...");
@@ -1602,7 +1605,7 @@ void World::SetInitialWorldSettings()
sLog.outString(">>> Scripts loaded");
sLog.outString();
- sLog.outString("Loading Scripts text locales..."); // must be after Load*Scripts calls
+ sLog.outString("Loading Scripts text locales..."); // must be after Load*Scripts calls
objmgr.LoadDbScriptStrings();
sLog.outString("Loading CreatureEventAI Texts...");
@@ -1635,24 +1638,24 @@ void World::SetInitialWorldSettings()
static uint32 abtimer = 0;
abtimer = sConfig.GetIntDefault("AutoBroadcast.Timer", 60000);
- m_timers[WUPDATE_OBJECTS].SetInterval(IN_MILISECONDS/2);
+ m_timers[WUPDATE_OBJECTS].SetInterval(IN_MILLISECONDS/2);
m_timers[WUPDATE_SESSIONS].SetInterval(0);
- m_timers[WUPDATE_WEATHERS].SetInterval(1*IN_MILISECONDS);
- m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE*IN_MILISECONDS);
- m_timers[WUPDATE_UPTIME].SetInterval(m_configs[CONFIG_UPTIME_UPDATE]*MINUTE*IN_MILISECONDS);
+ m_timers[WUPDATE_WEATHERS].SetInterval(1*IN_MILLISECONDS);
+ m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE*IN_MILLISECONDS);
+ m_timers[WUPDATE_UPTIME].SetInterval(m_configs[CONFIG_UPTIME_UPDATE]*MINUTE*IN_MILLISECONDS);
//Update "uptime" table based on configuration entry in minutes.
- m_timers[WUPDATE_CORPSES].SetInterval(20*MINUTE*IN_MILISECONDS);
+ m_timers[WUPDATE_CORPSES].SetInterval(20*MINUTE*IN_MILLISECONDS);
//erase corpses every 20 minutes
- m_timers[WUPDATE_CLEANDB].SetInterval(m_configs[CONFIG_LOGDB_CLEARINTERVAL]*MINUTE*IN_MILISECONDS);
+ m_timers[WUPDATE_CLEANDB].SetInterval(m_configs[CONFIG_LOGDB_CLEARINTERVAL]*MINUTE*IN_MILLISECONDS);
// clean logs table every 14 days by default
m_timers[WUPDATE_AUTOBROADCAST].SetInterval(abtimer);
//to set mailtimer to return mails every day between 4 and 5 am
//mailtimer is increased when updating auctions
//one second is 1000 -(tested on win system)
- mail_timer = ((((localtime(&m_gameTime)->tm_hour + 20) % 24)* HOUR * IN_MILISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval());
+ mail_timer = ((((localtime(&m_gameTime)->tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval());
//1440
- mail_timer_expires = ((DAY * IN_MILISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval()));
+ mail_timer_expires = ((DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval()));
sLog.outDebug("Mail timer set to: %u, mail return is called every %u minutes", mail_timer, mail_timer_expires);
///- Initilize static helper structures
@@ -1661,7 +1664,7 @@ void World::SetInitialWorldSettings()
///- Initialize MapManager
sLog.outString("Starting Map System");
- MapManager::Instance().Initialize();
+ sMapMgr.Initialize();
sLog.outString("Starting Game Event system...");
uint32 nextGameEvent = gameeventmgr.Initialize();
@@ -1670,7 +1673,7 @@ void World::SetInitialWorldSettings()
sLog.outString("Starting Arena Season...");
gameeventmgr.StartArenaSeason();
- sLog.outString("Loading World States..."); // must be loaded before battleground and outdoor PvP
+ sLog.outString("Loading World States..."); // must be loaded before battleground and outdoor PvP
LoadWorldStates();
///- Initialize Looking For Group
@@ -1688,10 +1691,7 @@ void World::SetInitialWorldSettings()
//Not sure if this can be moved up in the sequence (with static data loading) as it uses MapManager
sLog.outString("Loading Transports...");
- MapManager::Instance().LoadTransports();
-
- sLog.outString("Loading Transports Events...");
- objmgr.LoadTransportEvents();
+ sMapMgr.LoadTransports();
sLog.outString("Deleting expired bans...");
LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate");
@@ -1943,12 +1943,12 @@ void World::Update(uint32 diff)
/// <li> Handle all other objects
///- Update objects when the timer has passed (maps, transport, creatures,...)
- MapManager::Instance().Update(diff); // As interval = 0
+ sMapMgr.Update(diff); // As interval = 0
/*if (m_timers[WUPDATE_OBJECTS].Passed())
{
m_timers[WUPDATE_OBJECTS].Reset();
- MapManager::Instance().DoDelayedMovesAndRemoves();
+ sMapMgr.DoDelayedMovesAndRemoves();
}*/
static uint32 autobroadcaston = 0;
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 1a95253fa03..07d7d3c51db 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -27,7 +27,7 @@
#include "Common.h"
#include "Timer.h"
-#include "Policies/Singleton.h"
+#include <ace/Singleton.h>
#include "SharedDefines.h"
#include "ace/Atomic_Op.h"
#include "QueryResult.h"
@@ -188,6 +188,7 @@ enum WorldConfigs
CONFIG_WORLD_BOSS_LEVEL_DIFF,
CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF,
CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF,
+ CONFIG_QUEST_IGNORE_RAID,
CONFIG_DETECT_POS_COLLISION,
CONFIG_RESTRICTED_LFG_CHANNEL,
CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL,
@@ -779,6 +780,6 @@ class World
extern uint32 realmID;
-#define sWorld Trinity::Singleton<World>::Instance()
+#define sWorld (*ACE_Singleton<World, ACE_Null_Mutex>::instance())
#endif
/// @}
diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt
index d29670e4fc9..1c55955c777 100644
--- a/src/server/scripts/CMakeLists.txt
+++ b/src/server/scripts/CMakeLists.txt
@@ -1,629 +1,119 @@
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+file(GLOB_RECURSE scripts_easternkingdoms EasternKingdoms/*.cpp)
+file(GLOB_RECURSE scripts_kalimdor Kalimdor/*.cpp)
+file(GLOB_RECURSE scripts_northrend Northrend/*.cpp)
+file(GLOB_RECURSE scripts_outland Outland/*.cpp)
+file(GLOB_RECURSE scripts_world World/*.cpp)
+file(GLOB_RECURSE scripts_examples Examples/*.cpp)
+
# Enable precompiled headers when using the GCC compiler.
-IF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-ENDIF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
+if(DO_PCH)
+ include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+endif()
-SET(scripts_STAT_SRCS
- ../game/ScriptMgr/ScriptedPch.cpp
- ../game/ScriptMgr/ScriptedPch.h
- ../game/AI/ScriptedAI/ScriptedEscortAI.cpp
- ../game/AI/ScriptedAI/ScriptedEscortAI.h
- ../game/AI/ScriptedAI/ScriptedCreature.cpp
- ../game/AI/ScriptedAI/ScriptedCreature.h
- ../game/AI/ScriptedAI/ScriptedFollowerAI.cpp
- ../game/AI/ScriptedAI/ScriptedFollowerAI.h
- ../game/AI/ScriptedAI/ScriptedGossip.h
- ../game/AI/ScriptedAI/ScriptedGuardAI.cpp
- ../game/AI/ScriptedAI/ScriptedGuardAI.h
- ../game/AI/ScriptedAI/ScriptedInstance.h
- ../game/AI/ScriptedAI/ScriptedSimpleAI.cpp
- ../game/AI/ScriptedAI/ScriptedSimpleAI.h
- custom/on_events.cpp
- eastern_kingdoms/alterac_valley/alterac_valley.cpp
- eastern_kingdoms/alterac_valley/boss_balinda.cpp
- eastern_kingdoms/alterac_valley/boss_drekthar.cpp
- eastern_kingdoms/alterac_valley/boss_galvangar.cpp
- eastern_kingdoms/alterac_valley/boss_vanndar.cpp
- eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
- eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp
- eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp
- eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
- eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp
- eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp
- eastern_kingdoms/blackrock_depths/boss_grizzle.cpp
- eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp
- eastern_kingdoms/blackrock_depths/boss_magmus.cpp
- eastern_kingdoms/blackrock_depths/boss_moira_bronzebeard.cpp
- eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp
- eastern_kingdoms/blackrock_depths/blackrock_depths.h
- eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp
- eastern_kingdoms/blackrock_spire/blackrock_spire.cpp
- eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp
- eastern_kingdoms/blackrock_spire/boss_gyth.cpp
- eastern_kingdoms/blackrock_spire/boss_halycon.cpp
- eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp
- eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp
- eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp
- eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp
- eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp
- eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp
- eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp
- eastern_kingdoms/blackrock_spire/boss_the_beast.cpp
- eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp
- eastern_kingdoms/blackrock_spire/blackrock_spire.h
- eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp
- eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp
- eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp
- eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp
- eastern_kingdoms/blackwing_lair/boss_firemaw.cpp
- eastern_kingdoms/blackwing_lair/boss_flamegor.cpp
- eastern_kingdoms/blackwing_lair/boss_nefarian.cpp
- eastern_kingdoms/blackwing_lair/boss_razorgore.cpp
- eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp
- eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp
- eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp
- eastern_kingdoms/deadmines/boss_mr_smite.cpp
- eastern_kingdoms/deadmines/deadmines.h
- eastern_kingdoms/deadmines/deadmines.cpp
- eastern_kingdoms/deadmines/instance_deadmines.cpp
- eastern_kingdoms/gnomeregan/gnomeregan.h
- eastern_kingdoms/gnomeregan/gnomeregan.cpp
- eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp
- eastern_kingdoms/karazhan/boss_curator.cpp
- eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp
- eastern_kingdoms/karazhan/boss_midnight.cpp
- eastern_kingdoms/karazhan/boss_moroes.cpp
- eastern_kingdoms/karazhan/boss_netherspite.cpp
- eastern_kingdoms/karazhan/boss_nightbane.cpp
- eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp
- eastern_kingdoms/karazhan/boss_shade_of_aran.cpp
- eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp
- eastern_kingdoms/karazhan/bosses_opera.cpp
- eastern_kingdoms/karazhan/karazhan.h
- eastern_kingdoms/karazhan/instance_karazhan.cpp
- eastern_kingdoms/karazhan/karazhan.cpp
- eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp
- eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp
- eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp
- eastern_kingdoms/magisters_terrace/boss_vexallus.cpp
- eastern_kingdoms/magisters_terrace/magisters_terrace.h
- eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp
- eastern_kingdoms/magisters_terrace/magisters_terrace.cpp
- eastern_kingdoms/molten_core/boss_baron_geddon.cpp
- eastern_kingdoms/molten_core/boss_garr.cpp
- eastern_kingdoms/molten_core/boss_gehennas.cpp
- eastern_kingdoms/molten_core/boss_golemagg.cpp
- eastern_kingdoms/molten_core/boss_lucifron.cpp
- eastern_kingdoms/molten_core/boss_magmadar.cpp
- eastern_kingdoms/molten_core/boss_majordomo_executus.cpp
- eastern_kingdoms/molten_core/boss_ragnaros.cpp
- eastern_kingdoms/molten_core/boss_shazzrah.cpp
- eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp
- eastern_kingdoms/molten_core/molten_core.h
- eastern_kingdoms/molten_core/instance_molten_core.cpp
- eastern_kingdoms/molten_core/molten_core.cpp
- eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
- eastern_kingdoms/scarlet_enclave/chapter1.cpp
- eastern_kingdoms/scarlet_enclave/chapter2.cpp
- eastern_kingdoms/scarlet_enclave/chapter5.cpp
- eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp
- eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp
- eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp
- eastern_kingdoms/scarlet_monastery/boss_herod.cpp
- eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp
- eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp
- eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp
- eastern_kingdoms/scarlet_monastery/boss_scorn.cpp
- eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp
- eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp
- eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp
- eastern_kingdoms/scarlet_monastery/scarlet_monastery.h
- eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp
- eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp
- eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp
- eastern_kingdoms/scholomance/boss_illucia_barov.cpp
- eastern_kingdoms/scholomance/boss_instructor_malicia.cpp
- eastern_kingdoms/scholomance/boss_jandice_barov.cpp
- eastern_kingdoms/scholomance/boss_kormok.cpp
- eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp
- eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp
- eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp
- eastern_kingdoms/scholomance/boss_the_ravenian.cpp
- eastern_kingdoms/scholomance/boss_vectus.cpp
- eastern_kingdoms/scholomance/scholomance.h
- eastern_kingdoms/scholomance/instance_scholomance.cpp
- eastern_kingdoms/shadowfang_keep/shadowfang_keep.h
- eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp
- eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp
- eastern_kingdoms/stratholme/boss_baron_rivendare.cpp
- eastern_kingdoms/stratholme/boss_baroness_anastari.cpp
- eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp
- eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp
- eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp
- eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp
- eastern_kingdoms/stratholme/boss_nerubenkan.cpp
- eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp
- eastern_kingdoms/stratholme/boss_postmaster_malown.cpp
- eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp
- eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp
- eastern_kingdoms/stratholme/stratholme.h
- eastern_kingdoms/stratholme/instance_stratholme.cpp
- eastern_kingdoms/stratholme/stratholme.cpp
- eastern_kingdoms/sunken_temple/sunken_temple.h
- eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
- eastern_kingdoms/sunken_temple/sunken_temple.cpp
- eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
- eastern_kingdoms/sunwell_plateau/boss_muru.cpp
- eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp
- eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp
- eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp
- eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp
- eastern_kingdoms/sunwell_plateau/sunwell_plateau.cpp
- eastern_kingdoms/sunwell_plateau/sunwell_plateau.h
- eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp
- eastern_kingdoms/uldaman/boss_archaedas.cpp
- eastern_kingdoms/uldaman/instance_uldaman.cpp
- eastern_kingdoms/uldaman/boss_ironaya.cpp
- eastern_kingdoms/uldaman/uldaman.cpp
- eastern_kingdoms/zulaman/boss_akilzon.cpp
- eastern_kingdoms/zulaman/boss_halazzi.cpp
- eastern_kingdoms/zulaman/boss_hexlord.cpp
- eastern_kingdoms/zulaman/boss_janalai.cpp
- eastern_kingdoms/zulaman/boss_nalorakk.cpp
- eastern_kingdoms/zulaman/boss_zuljin.cpp
- eastern_kingdoms/zulaman/zulaman.h
- eastern_kingdoms/zulaman/instance_zulaman.cpp
- eastern_kingdoms/zulaman/zulaman.cpp
- eastern_kingdoms/zulgurub/boss_arlokk.cpp
- eastern_kingdoms/zulgurub/boss_gahzranka.cpp
- eastern_kingdoms/zulgurub/boss_grilek.cpp
- eastern_kingdoms/zulgurub/boss_hakkar.cpp
- eastern_kingdoms/zulgurub/boss_hazzarah.cpp
- eastern_kingdoms/zulgurub/boss_jeklik.cpp
- eastern_kingdoms/zulgurub/boss_jindo.cpp
- eastern_kingdoms/zulgurub/boss_mandokir.cpp
- eastern_kingdoms/zulgurub/boss_marli.cpp
- eastern_kingdoms/zulgurub/boss_renataki.cpp
- eastern_kingdoms/zulgurub/boss_thekal.cpp
- eastern_kingdoms/zulgurub/boss_venoxis.cpp
- eastern_kingdoms/zulgurub/boss_wushoolay.cpp
- eastern_kingdoms/zulgurub/zulgurub.h
- eastern_kingdoms/zulgurub/instance_zulgurub.cpp
- eastern_kingdoms/alterac_mountains.cpp
- eastern_kingdoms/arathi_highlands.cpp
- eastern_kingdoms/blasted_lands.cpp
- eastern_kingdoms/boss_kruul.cpp
- eastern_kingdoms/burning_steppes.cpp
- eastern_kingdoms/dun_morogh.cpp
- eastern_kingdoms/duskwood.cpp
- eastern_kingdoms/eastern_plaguelands.cpp
- eastern_kingdoms/elwynn_forest.cpp
- eastern_kingdoms/eversong_woods.cpp
- eastern_kingdoms/ghostlands.cpp
- eastern_kingdoms/hinterlands.cpp
- eastern_kingdoms/ironforge.cpp
- eastern_kingdoms/isle_of_queldanas.cpp
- eastern_kingdoms/loch_modan.cpp
- eastern_kingdoms/redridge_mountains.cpp
- eastern_kingdoms/searing_gorge.cpp
- eastern_kingdoms/silvermoon_city.cpp
- eastern_kingdoms/silverpine_forest.cpp
- eastern_kingdoms/stormwind_city.cpp
- eastern_kingdoms/stranglethorn_vale.cpp
- eastern_kingdoms/tirisfal_glades.cpp
- eastern_kingdoms/undercity.cpp
- eastern_kingdoms/western_plaguelands.cpp
- eastern_kingdoms/westfall.cpp
- eastern_kingdoms/wetlands.cpp
- examples/example_creature.cpp
- examples/example_escort.cpp
- examples/example_gossip_codebox.cpp
- examples/example_misc.cpp
- kalimdor/blackfathom_depths/boss_gelihast.cpp
- kalimdor/blackfathom_depths/boss_kelris.cpp
- kalimdor/blackfathom_depths/boss_aku_mai.cpp
- kalimdor/blackfathom_depths/instance_blackfathom_deeps.cpp
- kalimdor/blackfathom_depths/blackfathom_deeps.cpp
- kalimdor/blackfathom_depths/blackfathom_deeps.h
- kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp
- kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp
- kalimdor/caverns_of_time/culling_of_stratholme/boss_epoch.cpp
- kalimdor/caverns_of_time/culling_of_stratholme/boss_mal_ganis.cpp
- kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp
- kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite.cpp
- kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp
- kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h
- kalimdor/caverns_of_time/dark_portal/dark_portal.h
- kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp
- kalimdor/caverns_of_time/dark_portal/dark_portal.cpp
- kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp
- kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp
- kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp
- kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp
- kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp
- kalimdor/caverns_of_time/hyjal/boss_azgalor.cpp
- kalimdor/caverns_of_time/hyjal/boss_kazrogal.cpp
- kalimdor/caverns_of_time/hyjal/boss_rage_winterchill.cpp
- kalimdor/caverns_of_time/hyjal/hyjal.h
- kalimdor/caverns_of_time/hyjal/hyjal.cpp
- kalimdor/caverns_of_time/hyjal/hyjal_trash.cpp
- kalimdor/caverns_of_time/hyjal/hyjal_trash.h
- kalimdor/caverns_of_time/hyjal/hyjalAI.cpp
- kalimdor/caverns_of_time/hyjal/hyjalAI.h
- kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp
- kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp
- kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp
- kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp
- kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h
- kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
- kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
- kalimdor/maraudon/boss_celebras_the_cursed.cpp
- kalimdor/maraudon/boss_landslide.cpp
- kalimdor/maraudon/boss_noxxion.cpp
- kalimdor/maraudon/boss_princess_theradras.cpp
- kalimdor/onyxias_lair/boss_onyxia.cpp
- kalimdor/onyxias_lair/instance_onyxias_lair.cpp
- kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp
- kalimdor/razorfen_downs/razorfen_downs.cpp
- kalimdor/razorfen_downs/instance_razorfen_downs.cpp
- kalimdor/razorfen_downs/razorfen_downs.h
- kalimdor/razorfen_kraul/razorfen_kraul.h
- kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp
- kalimdor/razorfen_kraul/razorfen_kraul.cpp
- kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp
- kalimdor/ruins_of_ahnqiraj/boss_buru.cpp
- kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp
- kalimdor/ruins_of_ahnqiraj/boss_moam.cpp
- kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp
- kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp
- kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h
- kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp
- kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp
- kalimdor/temple_of_ahnqiraj/boss_cthun.cpp
- kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp
- kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp
- kalimdor/temple_of_ahnqiraj/boss_ouro.cpp
- kalimdor/temple_of_ahnqiraj/boss_sartura.cpp
- kalimdor/temple_of_ahnqiraj/boss_skeram.cpp
- kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp
- kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp
- kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h
- kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp
- kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
- kalimdor/wailing_caverns/wailing_caverns.h
- kalimdor/wailing_caverns/instance_wailing_caverns.cpp
- kalimdor/wailing_caverns/wailing_caverns.cpp
- kalimdor/zulfarrak/zulfarrak.cpp
- kalimdor/zulfarrak/instance_zulfarrak.cpp
- kalimdor/ashenvale.cpp
- kalimdor/azshara.cpp
- kalimdor/azuremyst_isle.cpp
- kalimdor/bloodmyst_isle.cpp
- kalimdor/boss_azuregos.cpp
- kalimdor/darkshore.cpp
- kalimdor/desolace.cpp
- kalimdor/durotar.cpp
- kalimdor/dustwallow_marsh.cpp
- kalimdor/felwood.cpp
- kalimdor/feralas.cpp
- kalimdor/moonglade.cpp
- kalimdor/mulgore.cpp
- kalimdor/orgrimmar.cpp
- kalimdor/silithus.cpp
- kalimdor/stonetalon_mountains.cpp
- kalimdor/tanaris.cpp
- kalimdor/teldrassil.cpp
- kalimdor/the_barrens.cpp
- kalimdor/thousand_needles.cpp
- kalimdor/thunder_bluff.cpp
- kalimdor/ungoro_crater.cpp
- kalimdor/winterspring.cpp
- northrend/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp
- northrend/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp
- northrend/azjol_nerub/azjol_nerub/boss_hadronox.cpp
- northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp
- northrend/azjol_nerub/azjol_nerub/azjol_nerub.h
- northrend/azjol_nerub/ahnkahet/instance_ahnkahet.cpp
- northrend/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp
- northrend/azjol_nerub/ahnkahet/boss_elder_nadox.cpp
- northrend/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp
- northrend/azjol_nerub/ahnkahet/boss_herald_volazj.cpp
- northrend/azjol_nerub/ahnkahet/boss_amanitar.cpp
- northrend/azjol_nerub/ahnkahet/ahnkahet.h
- northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp
- northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
- northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
- northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp
- northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp
- northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
- northrend/draktharon_keep/instance_drak_tharon_keep.cpp
- northrend/draktharon_keep/boss_trollgore.cpp
- northrend/draktharon_keep/boss_novos.cpp
- northrend/draktharon_keep/boss_dred.cpp
- northrend/draktharon_keep/boss_tharon_ja.cpp
- northrend/draktharon_keep/drak_tharon_keep.h
- northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp
- northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
- northrend/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp
- northrend/frozen_halls/forge_of_souls/forge_of_souls.h
- northrend/frozen_halls/forge_of_souls/forge_of_souls.cpp
- northrend/frozen_halls/halls_of_reflection/boss_falric.cpp
- northrend/frozen_halls/halls_of_reflection/boss_marwyn.cpp
- northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp
- northrend/frozen_halls/halls_of_reflection/halls_of_reflection.cpp
- northrend/frozen_halls/halls_of_reflection/halls_of_reflection.h
- northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp
- northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp
- northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp
- northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp
- northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp
- northrend/frozen_halls/pit_of_saron/pit_of_saron.h
- northrend/gundrak/instance_gundrak.cpp
- northrend/gundrak/boss_slad_ran.cpp
- northrend/gundrak/boss_moorabi.cpp
- northrend/gundrak/boss_drakkari_colossus.cpp
- northrend/gundrak/boss_gal_darah.cpp
- northrend/gundrak/boss_eck.cpp
- northrend/gundrak/gundrak.h
- northrend/naxxramas/boss_anubrekhan.cpp
- northrend/naxxramas/boss_faerlina.cpp
- northrend/naxxramas/boss_gluth.cpp
- northrend/naxxramas/boss_gothik.cpp
- northrend/naxxramas/boss_grobbulus.cpp
- northrend/naxxramas/boss_heigan.cpp
- northrend/naxxramas/boss_kelthuzad.cpp
- northrend/naxxramas/boss_four_horsemen.cpp
- northrend/naxxramas/boss_loatheb.cpp
- northrend/naxxramas/boss_maexxna.cpp
- northrend/naxxramas/boss_noth.cpp
- northrend/naxxramas/boss_patchwerk.cpp
- northrend/naxxramas/boss_razuvious.cpp
- northrend/naxxramas/boss_sapphiron.cpp
- northrend/naxxramas/boss_thaddius.cpp
- northrend/naxxramas/naxxramas.h
- northrend/naxxramas/instance_naxxramas.cpp
- northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp
- northrend/nexus/eye_of_eternity/boss_malygos.cpp
- northrend/nexus/eye_of_eternity/eye_of_eternity.h
- northrend/nexus/nexus/instance_nexus.cpp
- northrend/nexus/nexus/boss_magus_telestra.cpp
- northrend/nexus/nexus/boss_anomalus.cpp
- northrend/nexus/nexus/boss_ormorok.cpp
- northrend/nexus/nexus/boss_keristrasza.cpp
- northrend/nexus/nexus/commander_stoutbeard.cpp
- northrend/nexus/nexus/commander_kolurg.cpp
- northrend/nexus/nexus/nexus.h
- northrend/nexus/oculus/instance_oculus.cpp
- northrend/nexus/oculus/boss_drakos.cpp
- northrend/nexus/oculus/boss_urom.cpp
- northrend/nexus/oculus/boss_varos.cpp
- northrend/nexus/oculus/boss_eregos.cpp
- northrend/nexus/oculus/oculus.h
- northrend/nexus/oculus/oculus.cpp
- northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp
- northrend/obsidian_sanctum/boss_sartharion.cpp
- northrend/obsidian_sanctum/obsidian_sanctum.h
- northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp
- northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp
- northrend/ulduar/halls_of_stone/boss_krystallus.cpp
- northrend/ulduar/halls_of_stone/boss_sjonnir.cpp
- northrend/ulduar/halls_of_stone/halls_of_stone.h
- northrend/ulduar/halls_of_stone/halls_of_stone.cpp
- northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp
- northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp
- northrend/ulduar/halls_of_lightning/boss_ionar.cpp
- northrend/ulduar/halls_of_lightning/boss_volkhan.cpp
- northrend/ulduar/halls_of_lightning/boss_loken.cpp
- northrend/ulduar/halls_of_lightning/halls_of_lightning.h
- northrend/ulduar/ulduar/boss_algalon.cpp
- northrend/ulduar/ulduar/boss_assembly_of_iron.cpp
- northrend/ulduar/ulduar/boss_auriaya.cpp
- northrend/ulduar/ulduar/boss_flame_leviathan.cpp
- northrend/ulduar/ulduar/boss_freya.cpp
- northrend/ulduar/ulduar/boss_general_vezax.cpp
- northrend/ulduar/ulduar/boss_hodir.cpp
- northrend/ulduar/ulduar/boss_ignis.cpp
- northrend/ulduar/ulduar/boss_kologarn.cpp
- northrend/ulduar/ulduar/boss_mimiron.cpp
- northrend/ulduar/ulduar/boss_razorscale.cpp
- northrend/ulduar/ulduar/boss_thorim.cpp
- northrend/ulduar/ulduar/boss_xt002.cpp
- northrend/ulduar/ulduar/boss_yoggsaron.cpp
- northrend/ulduar/ulduar/ulduar_teleporter.cpp
- northrend/ulduar/ulduar/ulduar.h
- northrend/ulduar/ulduar/instance_ulduar.cpp
- northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp
- northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp
- northrend/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp
- northrend/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp
- northrend/utgarde_keep/utgarde_keep/utgarde_keep.h
- northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp
- northrend/utgarde_keep/utgarde_pinnacle/instance_pinnacle.cpp
- northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp
- northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp
- northrend/utgarde_keep/utgarde_pinnacle/boss_palehoof.cpp
- northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp
- northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h
- northrend/vault_of_archavon/instance_vault_of_archavon.cpp
- northrend/vault_of_archavon/boss_archavon.cpp
- northrend/vault_of_archavon/boss_emalon.cpp
- northrend/vault_of_archavon/boss_koralon.cpp
- northrend/vault_of_archavon/boss_toravon.cpp
- northrend/vault_of_archavon/vault_of_archavon.h
- northrend/violet_hold/instance_violet_hold.cpp
- northrend/violet_hold/boss_cyanigosa.cpp
- northrend/violet_hold/boss_erekem.cpp
- northrend/violet_hold/boss_ichoron.cpp
- northrend/violet_hold/boss_lavanthor.cpp
- northrend/violet_hold/boss_moragg.cpp
- northrend/violet_hold/boss_xevozz.cpp
- northrend/violet_hold/boss_zuramat.cpp
- northrend/violet_hold/violet_hold.h
- northrend/violet_hold/violet_hold.cpp
- northrend/dalaran.cpp
- northrend/borean_tundra.cpp
- northrend/dragonblight.cpp
- northrend/grizzly_hills.cpp
- northrend/howling_fjord.cpp
- northrend/icecrown.cpp
- northrend/sholazar_basin.cpp
- northrend/storm_peaks.cpp
- northrend/zuldrak.cpp
- northrend/crystalsong_forest.cpp
- outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
- outland/auchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp
- outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
- outland/auchindoun/mana_tombs/boss_pandemonius.cpp
- outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp
- outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
- outland/auchindoun/sethekk_halls/sethekk_halls.h
- outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp
- outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
- outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
- outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
- outland/auchindoun/shadow_labyrinth/boss_murmur.cpp
- outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h
- outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
- outland/black_temple/black_temple.cpp
- outland/black_temple/boss_bloodboil.cpp
- outland/black_temple/boss_illidan.cpp
- outland/black_temple/boss_mother_shahraz.cpp
- outland/black_temple/boss_reliquary_of_souls.cpp
- outland/black_temple/boss_shade_of_akama.cpp
- outland/black_temple/boss_supremus.cpp
- outland/black_temple/boss_teron_gorefiend.cpp
- outland/black_temple/boss_warlord_najentus.cpp
- outland/black_temple/black_temple.h
- outland/black_temple/illidari_council.cpp
- outland/black_temple/instance_black_temple.cpp
- outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
- outland/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
- outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
- outland/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
- outland/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
- outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
- outland/coilfang_resevoir/serpent_shrine/serpent_shrine.h
- outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
- outland/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
- outland/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
- outland/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
- outland/coilfang_resevoir/steam_vault/steam_vault.h
- outland/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
- outland/coilfang_resevoir/underbog/boss_hungarfen.cpp
- outland/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
- outland/gruuls_lair/boss_gruul.cpp
- outland/gruuls_lair/boss_high_king_maulgar.cpp
- outland/gruuls_lair/gruuls_lair.h
- outland/gruuls_lair/instance_gruuls_lair.cpp
- outland/hellfire_citadel/blood_furnace/boss_broggok.cpp
- outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
- outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp
- outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp
- outland/hellfire_citadel/blood_furnace/blood_furnace.h
- outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
- outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
- outland/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp
- outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h
- outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp
- outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
- outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h
- outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
- outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
- outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
- outland/hellfire_citadel/shattered_halls/shattered_halls.h
- outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp
- outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp
- outland/tempest_keep/arcatraz/arcatraz.cpp
- outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
- outland/tempest_keep/arcatraz/arcatraz.h
- outland/tempest_keep/arcatraz/instance_arcatraz.cpp
- outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
- outland/tempest_keep/botanica/boss_laj.cpp
- outland/tempest_keep/botanica/boss_warp_splinter.cpp
- outland/tempest_keep/the_eye/boss_alar.cpp
- outland/tempest_keep/the_eye/boss_astromancer.cpp
- outland/tempest_keep/the_eye/boss_kaelthas.cpp
- outland/tempest_keep/the_eye/boss_void_reaver.cpp
- outland/tempest_keep/the_eye/the_eye.h
- outland/tempest_keep/the_eye/instance_the_eye.cpp
- outland/tempest_keep/the_eye/the_eye.cpp
- outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp
- outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
- outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
- outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
- outland/tempest_keep/the_mechanar/mechanar.h
- outland/tempest_keep/the_mechanar/instance_mechanar.cpp
- outland/blades_edge_mountains.cpp
- outland/boss_doomlord_kazzak.cpp
- outland/boss_doomwalker.cpp
- outland/hellfire_peninsula.cpp
- outland/nagrand.cpp
- outland/netherstorm.cpp
- outland/shadowmoon_valley.cpp
- outland/shattrath_city.cpp
- outland/terokkar_forest.cpp
- outland/zangarmarsh.cpp
- world/areatrigger_scripts.cpp
- world/boss_emeriss.cpp
- world/boss_lethon.cpp
- world/boss_taerar.cpp
- world/boss_ysondre.cpp
- world/go_scripts.cpp
- world/guards.cpp
- world/item_scripts.cpp
- world/mob_generic_creature.cpp
- world/npc_innkeeper.cpp
- world/npc_professions.cpp
- world/npcs_special.cpp
- world/npc_taxi.cpp
+set(scripts_STAT_SRCS
+ ../game/AI/ScriptedAI/ScriptedEscortAI.cpp
+ ../game/AI/ScriptedAI/ScriptedCreature.cpp
+ ../game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+ ../game/AI/ScriptedAI/ScriptedGuardAI.cpp
+ ../game/AI/ScriptedAI/ScriptedSimpleAI.cpp
+ Custom/on_events.cpp
+ ${scripts_easternkingdoms}
+ ${scripts_kalimdor}
+ ${scripts_northrend}
+ ${scripts_outland}
+ ${scripts_world}
+ ${scripts_examples}
)
-message("-- Added Script Engine to SCRIPTS lib")
+message("-- Added Scriptengine to SCRIPTS lib")
include_directories(
${ACE_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/dep/include
+ ${CMAKE_SOURCE_DIR}/externals/mersennetwister
+ ${CMAKE_SOURCE_DIR}/externals/zlib
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Database
+ ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/CountedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Logging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Policies
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Threading
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
+ ${CMAKE_SOURCE_DIR}/src/server/collision
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Management
${CMAKE_SOURCE_DIR}/src/server/shared
- ${CMAKE_SOURCE_DIR}/src/server/framework
${CMAKE_SOURCE_DIR}/src/server/shared/Database
${CMAKE_SOURCE_DIR}/src/server/game/Account
${CMAKE_SOURCE_DIR}/src/server/game/Achievements
${CMAKE_SOURCE_DIR}/src/server/game/Addons
${CMAKE_SOURCE_DIR}/src/server/game/AI
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/CoreAI
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/EventAI
${CMAKE_SOURCE_DIR}/src/server/game/AI/ScriptedAI
${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse
${CMAKE_SOURCE_DIR}/src/server/game/BattleGrounds
${CMAKE_SOURCE_DIR}/src/server/game/Calendar
${CMAKE_SOURCE_DIR}/src/server/game/Chat
- ${CMAKE_SOURCE_DIR}/src/server/game/ConditionMgr
+ ${CMAKE_SOURCE_DIR}/src/server/game/Conditions
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
${CMAKE_SOURCE_DIR}/src/server/game/Combat
${CMAKE_SOURCE_DIR}/src/server/game/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/game/DungeonFinding
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Corpse
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Creature
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/DynamicObject
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item/Container
${CMAKE_SOURCE_DIR}/src/server/game/Entities/GameObject
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object/Updates
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Pet
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Player
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Unit
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Vehicle
${CMAKE_SOURCE_DIR}/src/server/game/Events
${CMAKE_SOURCE_DIR}/src/server/game/Globals
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Cells
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers
${CMAKE_SOURCE_DIR}/src/server/game/Groups
${CMAKE_SOURCE_DIR}/src/server/game/Guilds
${CMAKE_SOURCE_DIR}/src/server/game/Instances
${CMAKE_SOURCE_DIR}/src/server/game/LookingForGroup
${CMAKE_SOURCE_DIR}/src/server/game/Loot
${CMAKE_SOURCE_DIR}/src/server/game/Mails
- ${CMAKE_SOURCE_DIR}/src/server/game/Map
- ${CMAKE_SOURCE_DIR}/src/server/game/Map/Cell
- ${CMAKE_SOURCE_DIR}/src/server/game/Map/Grid
+ ${CMAKE_SOURCE_DIR}/src/server/game/Miscellaneous
+ ${CMAKE_SOURCE_DIR}/src/server/game/Maps
${CMAKE_SOURCE_DIR}/src/server/game/Movement
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Waypoints
${CMAKE_SOURCE_DIR}/src/server/game/Opcodes
${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP
${CMAKE_SOURCE_DIR}/src/server/game/Pools
+ ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders
${CMAKE_SOURCE_DIR}/src/server/game/Quests
${CMAKE_SOURCE_DIR}/src/server/game/Reputation
- ${CMAKE_SOURCE_DIR}/src/server/game/ScriptMgr
+ ${CMAKE_SOURCE_DIR}/src/server/game/Scripting
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers
${CMAKE_SOURCE_DIR}/src/server/game/Skills
${CMAKE_SOURCE_DIR}/src/server/game/Spells
${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
@@ -633,9 +123,20 @@ include_directories(
${MYSQL_INCLUDE_DIR}
)
+# Add ScriptPCH.cpp to project on Windows
+if(MSVC)
+set(scripts_STAT_SRCS
+ ../game/PrecompiledHeaders/ScriptPCH.cpp
+ ${scripts_STAT_SRCS})
+endif()
+
add_library(scripts STATIC ${scripts_STAT_SRCS})
# Generate precompiled header
-IF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
- ADD_PRECOMPILED_HEADER(scripts ${CMAKE_SOURCE_DIR}/src/server/game/ScriptMgr/ScriptedPch.h)
-ENDIF(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
+if(DO_PCH)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ add_precompiled_header(scripts ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/ScriptPCH.h)
+ elseif(MSVC)
+ add_native_precompiled_header(scripts ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/ScriptPCH)
+ endif()
+endif()
diff --git a/src/server/scripts/Custom/custom_example.cpp b/src/server/scripts/Custom/custom_example.cpp
index 0e230ba901d..d922dfed0aa 100644
--- a/src/server/scripts/Custom/custom_example.cpp
+++ b/src/server/scripts/Custom/custom_example.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2008 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -89,7 +91,7 @@ struct TRINITY_DLL_DECL custom_exampleAI : public ScriptedAI
//*** HANDLED FUNCTION ***
//Attack Start is called whenever someone hits us.
- void Aggro(Unit *who)
+ void EnterCombat(Unit *who)
{
//Say some stuff
DoSay(SAY_AGGRO,LANG_UNIVERSAL,NULL);
diff --git a/src/server/scripts/Custom/custom_gossip_codebox.cpp b/src/server/scripts/Custom/custom_gossip_codebox.cpp
index a00d2b7031f..e7dd58f0a33 100644
--- a/src/server/scripts/Custom/custom_gossip_codebox.cpp
+++ b/src/server/scripts/Custom/custom_gossip_codebox.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2008 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
diff --git a/src/server/scripts/Custom/npc_acherus_taxi.cpp b/src/server/scripts/Custom/npc_acherus_taxi.cpp
index 6e00e365e8e..dff5165ce70 100644
--- a/src/server/scripts/Custom/npc_acherus_taxi.cpp
+++ b/src/server/scripts/Custom/npc_acherus_taxi.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "WorldPacket.h"
#define GOSSIP_FLIGHT "I need a ride"
diff --git a/src/server/scripts/Custom/npc_wyrmresttempel_taxi.cpp b/src/server/scripts/Custom/npc_wyrmresttempel_taxi.cpp
index d4c2cb5ab74..cec34365c67 100644
--- a/src/server/scripts/Custom/npc_wyrmresttempel_taxi.cpp
+++ b/src/server/scripts/Custom/npc_wyrmresttempel_taxi.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "WorldPacket.h"
#define GOSSIP_UP "My Lord, I must go to the upper floor of the temple."
diff --git a/src/server/scripts/Custom/on_events.cpp b/src/server/scripts/Custom/on_events.cpp
index 94e54a07fba..58cc8275a3a 100644
--- a/src/server/scripts/Custom/on_events.cpp
+++ b/src/server/scripts/Custom/on_events.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include <cstring>
//This function is called when the player logs in (every login)
diff --git a/src/server/scripts/Custom/test.cpp b/src/server/scripts/Custom/test.cpp
index aa9e6879075..0e841d450ba 100644
--- a/src/server/scripts/Custom/test.cpp
+++ b/src/server/scripts/Custom/test.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2008 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -85,7 +87,7 @@ struct TRINITY_DLL_DECL npc_testAI : public npc_escortAI
}
}
- void Aggro(Unit*)
+ void EnterCombat(Unit*)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
me->Say(SAY_AGGRO1, LANG_UNIVERSAL, PlayerGUID);
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
index a61fc21d5ba..7592742ef23 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
enum Spells
{
@@ -62,13 +63,13 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
void Reset()
{
- uiChargeTimer = urand(2*IN_MILISECONDS,12*IN_MILISECONDS);
- uiCleaveTimer = urand(1*IN_MILISECONDS,11*IN_MILISECONDS);
- uiDemoralizingShoutTimer = urand(2*IN_MILISECONDS,2*IN_MILISECONDS);
- uiWhirlwind1Timer = urand(1*IN_MILISECONDS,12*IN_MILISECONDS);
- uiWhirlwind2Timer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
- uiEnrageTimer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
- uiResetTimer = 5*IN_MILISECONDS;
+ uiChargeTimer = urand(2*IN_MILLISECONDS,12*IN_MILLISECONDS);
+ uiCleaveTimer = urand(1*IN_MILLISECONDS,11*IN_MILLISECONDS);
+ uiDemoralizingShoutTimer = urand(2*IN_MILLISECONDS,2*IN_MILLISECONDS);
+ uiWhirlwind1Timer = urand(1*IN_MILLISECONDS,12*IN_MILLISECONDS);
+ uiWhirlwind2Timer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
+ uiEnrageTimer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
+ uiResetTimer = 5*IN_MILLISECONDS;
bHasAura = false;
}
@@ -119,37 +120,37 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
if (uiChargeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CHARGE);
- uiChargeTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
+ uiChargeTimer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
} else uiChargeTimer -= diff;
if (uiCleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
- uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS);
+ uiCleaveTimer = urand(10*IN_MILLISECONDS,16*IN_MILLISECONDS);
} else uiCleaveTimer -= diff;
if (uiDemoralizingShoutTimer <= diff)
{
DoCast(me->getVictim(), SPELL_DEMORALIZING_SHOUT);
- uiDemoralizingShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiDemoralizingShoutTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else uiDemoralizingShoutTimer -= diff;
if (uiWhirlwind1Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
- uiWhirlwind1Timer = urand(6*IN_MILISECONDS,20*IN_MILISECONDS);
+ uiWhirlwind1Timer = urand(6*IN_MILLISECONDS,20*IN_MILLISECONDS);
} else uiWhirlwind1Timer -= diff;
if (uiWhirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
- uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
+ uiWhirlwind2Timer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
} else uiWhirlwind2Timer -= diff;
if (uiEnrageTimer <= diff)
{
DoCast(me->getVictim(), SPELL_ENRAGE);
- uiEnrageTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiEnrageTimer = urand(10*IN_MILLISECONDS,30*IN_MILLISECONDS);
}else uiEnrageTimer -= diff;
@@ -158,7 +159,7 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
- uiResetTimer = 5*IN_MILISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
} else uiResetTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index ce2a81c864a..bfc0e418334 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
@@ -50,8 +51,8 @@ struct mob_water_elementalAI : public ScriptedAI
void Reset()
{
- uiWaterBoltTimer = 3*IN_MILISECONDS;
- uiResetTimer = 5*IN_MILISECONDS;
+ uiWaterBoltTimer = 3*IN_MILLISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -62,7 +63,7 @@ struct mob_water_elementalAI : public ScriptedAI
if (uiWaterBoltTimer < diff)
{
DoCast(me->getVictim(), SPELL_WATERBOLT);
- uiWaterBoltTimer = 5*IN_MILISECONDS;
+ uiWaterBoltTimer = 5*IN_MILLISECONDS;
} else uiWaterBoltTimer -= diff;
// check if creature is not outside of building
@@ -71,7 +72,7 @@ struct mob_water_elementalAI : public ScriptedAI
if (Creature *pBalinda = Unit::GetCreature(*me, uiBalindaGUID))
if (me->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
- uiResetTimer = 5*IN_MILISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
} else uiResetTimer -= diff;
DoMeleeAttackIfReady();
@@ -93,11 +94,11 @@ struct boss_balindaAI : public ScriptedAI
void Reset()
{
- uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
- uiConeOfColdTimer = 8*IN_MILISECONDS;
- uiFireBoltTimer = 1*IN_MILISECONDS;
- uiFrostboltTimer = 4*IN_MILISECONDS;
- uiResetTimer = 5*IN_MILISECONDS;
+ uiArcaneExplosionTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
+ uiConeOfColdTimer = 8*IN_MILLISECONDS;
+ uiFireBoltTimer = 1*IN_MILLISECONDS;
+ uiFrostboltTimer = 4*IN_MILLISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
uiWaterElementalTimer = 0;
Summons.DespawnAll();
@@ -134,32 +135,32 @@ struct boss_balindaAI : public ScriptedAI
if (uiWaterElementalTimer < diff)
{
if (Summons.empty())
- me->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILISECONDS);
- uiWaterElementalTimer = 50*IN_MILISECONDS;
+ me->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILLISECONDS);
+ uiWaterElementalTimer = 50*IN_MILLISECONDS;
} else uiWaterElementalTimer -= diff;
if (uiArcaneExplosionTimer < diff)
{
DoCast(me->getVictim(), SPELL_ARCANE_EXPLOSION);
- uiArcaneExplosionTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiArcaneExplosionTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else uiArcaneExplosionTimer -= diff;
if (uiConeOfColdTimer < diff)
{
DoCast(me->getVictim(), SPELL_CONE_OF_COLD);
- uiConeOfColdTimer = urand(10*IN_MILISECONDS,20*IN_MILISECONDS);
+ uiConeOfColdTimer = urand(10*IN_MILLISECONDS,20*IN_MILLISECONDS);
} else uiConeOfColdTimer -= diff;
if (uiFireBoltTimer < diff)
{
DoCast(me->getVictim(), SPELL_FIREBALL);
- uiFireBoltTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS);
+ uiFireBoltTimer = urand(5*IN_MILLISECONDS,9*IN_MILLISECONDS);
} else uiFireBoltTimer -= diff;
if (uiFrostboltTimer < diff)
{
DoCast(me->getVictim(), SPELL_FROSTBOLT);
- uiFrostboltTimer = urand(4*IN_MILISECONDS,12*IN_MILISECONDS);
+ uiFrostboltTimer = urand(4*IN_MILLISECONDS,12*IN_MILLISECONDS);
} else uiFrostboltTimer -= diff;
@@ -171,7 +172,7 @@ struct boss_balindaAI : public ScriptedAI
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- uiResetTimer = 5*IN_MILISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
} else uiResetTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
index 6477ebe5eaf..385812c6776 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
enum Spells
{
@@ -53,15 +54,15 @@ struct boss_drektharAI : public ScriptedAI
void Reset()
{
- uiWhirlwindTimer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS);
- uiWhirlwind2Timer = urand(1*IN_MILISECONDS,20*IN_MILISECONDS);
- uiKnockdownTimer = 12*IN_MILISECONDS;
- uiFrenzyTimer = 6*IN_MILISECONDS;
- uiResetTimer = 5*IN_MILISECONDS;
- uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
+ uiWhirlwindTimer = urand(1*IN_MILLISECONDS,20*IN_MILLISECONDS);
+ uiWhirlwind2Timer = urand(1*IN_MILLISECONDS,20*IN_MILLISECONDS);
+ uiKnockdownTimer = 12*IN_MILLISECONDS;
+ uiFrenzyTimer = 6*IN_MILLISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
+ uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); //20 to 30 seconds
}
- void Aggro(Unit * /*who*/)
+ void EnterCombat(Unit * /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -80,31 +81,31 @@ struct boss_drektharAI : public ScriptedAI
if (uiWhirlwindTimer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND);
- uiWhirlwindTimer = urand(8*IN_MILISECONDS,18*IN_MILISECONDS);
+ uiWhirlwindTimer = urand(8*IN_MILLISECONDS,18*IN_MILLISECONDS);
} else uiWhirlwindTimer -= diff;
if (uiWhirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
- uiWhirlwind2Timer = urand(7*IN_MILISECONDS,25*IN_MILISECONDS);
+ uiWhirlwind2Timer = urand(7*IN_MILLISECONDS,25*IN_MILLISECONDS);
} else uiWhirlwind2Timer -= diff;
if (uiKnockdownTimer <= diff)
{
DoCast(me->getVictim(), SPELL_KNOCKDOWN);
- uiKnockdownTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiKnockdownTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else uiKnockdownTimer -= diff;
if (uiFrenzyTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FRENZY);
- uiFrenzyTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiFrenzyTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiFrenzyTimer -= diff;
if (uiYellTimer <= diff)
{
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5), me);
- uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
+ uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); //20 to 30 seconds
} else uiYellTimer -= diff;
// check if creature is not outside of building
@@ -115,7 +116,7 @@ struct boss_drektharAI : public ScriptedAI
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- uiResetTimer = 5*IN_MILISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
} else uiResetTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
index a12b9f267f9..380a841fb7c 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
enum Spells
{
@@ -46,15 +47,15 @@ struct boss_galvangarAI : public ScriptedAI
void Reset()
{
- uiCleaveTimer = urand(1*IN_MILISECONDS,9*IN_MILISECONDS);
- uiFrighteningShoutTimer = urand(2*IN_MILISECONDS,19*IN_MILISECONDS);
- uiWhirlwind1Timer = urand(1*IN_MILISECONDS,13*IN_MILISECONDS);
- uiWhirlwind2Timer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
- uiMortalStrikeTimer = urand(5*IN_MILISECONDS,20*IN_MILISECONDS);
- uiResetTimer = 5*IN_MILISECONDS;
+ uiCleaveTimer = urand(1*IN_MILLISECONDS,9*IN_MILLISECONDS);
+ uiFrighteningShoutTimer = urand(2*IN_MILLISECONDS,19*IN_MILLISECONDS);
+ uiWhirlwind1Timer = urand(1*IN_MILLISECONDS,13*IN_MILLISECONDS);
+ uiWhirlwind2Timer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
+ uiMortalStrikeTimer = urand(5*IN_MILLISECONDS,20*IN_MILLISECONDS);
+ uiResetTimer = 5*IN_MILLISECONDS;
}
- void Aggro(Unit * /*who*/)
+ void EnterCombat(Unit * /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -72,31 +73,31 @@ struct boss_galvangarAI : public ScriptedAI
if (uiCleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
- uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS);
+ uiCleaveTimer = urand(10*IN_MILLISECONDS,16*IN_MILLISECONDS);
} else uiCleaveTimer -= diff;
if (uiFrighteningShoutTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FRIGHTENING_SHOUT);
- uiFrighteningShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiFrighteningShoutTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else uiFrighteningShoutTimer -= diff;
if (uiWhirlwind1Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
- uiWhirlwind1Timer = urand(6*IN_MILISECONDS,10*IN_MILISECONDS);
+ uiWhirlwind1Timer = urand(6*IN_MILLISECONDS,10*IN_MILLISECONDS);
} else uiWhirlwind1Timer -= diff;
if (uiWhirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
- uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
+ uiWhirlwind2Timer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
} else uiWhirlwind2Timer -= diff;
if (uiMortalStrikeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTAL_STRIKE);
- uiMortalStrikeTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiMortalStrikeTimer = urand(10*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiMortalStrikeTimer -= diff;
// check if creature is not outside of building
@@ -107,7 +108,7 @@ struct boss_galvangarAI : public ScriptedAI
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- uiResetTimer = 5*IN_MILISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
} else uiResetTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
index 785827bc5d9..6ae75c0fa06 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
enum Yells
{
@@ -52,14 +53,14 @@ struct boss_vanndarAI : public ScriptedAI
void Reset()
{
- uiAvatarTimer = 3*IN_MILISECONDS;
- uiThunderclapTimer = 4*IN_MILISECONDS;
- uiStormboltTimer = 6*IN_MILISECONDS;
- uiResetTimer = 5*IN_MILISECONDS;
- uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiAvatarTimer = 3*IN_MILLISECONDS;
+ uiThunderclapTimer = 4*IN_MILLISECONDS;
+ uiStormboltTimer = 6*IN_MILLISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
+ uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
}
- void Aggro(Unit * /*who*/)
+ void EnterCombat(Unit * /*who*/)
{
DoScriptText(YELL_AGGRO, me);
}
@@ -78,25 +79,25 @@ struct boss_vanndarAI : public ScriptedAI
if (uiAvatarTimer <= diff)
{
DoCast(me->getVictim(), SPELL_AVATAR);
- uiAvatarTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS);
+ uiAvatarTimer = urand(15*IN_MILLISECONDS,20*IN_MILLISECONDS);
} else uiAvatarTimer -= diff;
if (uiThunderclapTimer <= diff)
{
DoCast(me->getVictim(), SPELL_THUNDERCLAP);
- uiThunderclapTimer = urand(5*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiThunderclapTimer = urand(5*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else uiThunderclapTimer -= diff;
if (uiStormboltTimer <= diff)
{
DoCast(me->getVictim(), SPELL_STORMBOLT);
- uiStormboltTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
+ uiStormboltTimer = urand(10*IN_MILLISECONDS,25*IN_MILLISECONDS);
} else uiStormboltTimer -= diff;
if (uiYellTimer <= diff)
{
DoScriptText(RAND(YELL_RANDOM1,YELL_RANDOM2,YELL_RANDOM3,YELL_RANDOM4,YELL_RANDOM5,YELL_RANDOM6,YELL_RANDOM7), me);
- uiYellTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS); //20 to 30 seconds
+ uiYellTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); //20 to 30 seconds
} else uiYellTimer -= diff;
// check if creature is not outside of building
@@ -107,7 +108,7 @@ struct boss_vanndarAI : public ScriptedAI
EnterEvadeMode();
DoScriptText(YELL_EVADE, me);
}
- uiResetTimer = 5*IN_MILISECONDS;
+ uiResetTimer = 5*IN_MILLISECONDS;
} else uiResetTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
index e04fa8444b2..6b8d17b3f55 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
@@ -1,18 +1,18 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -36,7 +36,7 @@ npc_tobias_seecher
npc_rocknot
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "blackrock_depths.h"
@@ -214,7 +214,7 @@ struct npc_grimstoneAI : public npc_escortAI
if (pInstance)
{
pInstance->SetData(TYPE_RING_OF_LAW,DONE);
- debug_log("TSCR: npc_grimstone: event reached end and set complete.");
+ sLog.outDebug("TSCR: npc_grimstone: event reached end and set complete.");
}
break;
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h
index edb340252b2..a9228615604 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
-* This program is free software licensed under GPL version 2
-* Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_BRD_H
#define DEF_BRD_H
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
index a387e816951..df77770a410 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
index 60e1dec236c..e8277d9e931 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
index 29fe219d6ec..d177e3c97ac 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Yells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
index 77d69263133..0c50893633b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
index 886bc3fc909..718278d3720 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
index d3551d38790..f369e4d645a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Yells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
index 2af203826a1..53df13eee1f 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp
index 2a0cf9be133..bc0181bbb9a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
index 1c0ed389287..fe81ad5eeac 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Healing of Emperor NYI
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Spells
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
index 94a37e8da7e..ac1795d5e43 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Missing event.
SDCategory: Blackrock Depths
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blackrock_depths.h"
enum Spells
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
index 7684aa6c6ac..9be222e8bb2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Instance_Blackrock_Depths
@@ -29,7 +31,7 @@ update `creature_template` set `npcflag`='1',`ScriptName`='npc_tobias_seecher' w
update `instance_template` set `script`='instance_blackrock_depths' where `map`='230';
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blackrock_depths.h"
#define TIMER_TOMBOFTHESEVEN 15000
@@ -207,7 +209,7 @@ struct instance_blackrock_depths : public ScriptedInstance
void SetData64(uint32 type, uint64 data)
{
- debug_log("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
+ sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
switch(type)
{
@@ -223,7 +225,7 @@ struct instance_blackrock_depths : public ScriptedInstance
void SetData(uint32 type, uint32 data)
{
- debug_log("TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
+ sLog.outDebug("TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
switch(type)
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp
index 2ea115e6e0b..86de9f60920 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blackrock_spire.h"
enum Creatures
@@ -55,7 +56,7 @@ bool GOHello_rookey_egg(Player *pPlayer, GameObject * /*pGO*/)
{
Position pos;
pPlayer->GetPosition(&pos);
- pPlayer->SummonCreature(NPC_ROOKERY_WHELP, pos, TEMPSUMMON_TIMED_DESPAWN, 15*IN_MILISECONDS);
+ pPlayer->SummonCreature(NPC_ROOKERY_WHELP, pos, TEMPSUMMON_TIMED_DESPAWN, 15*IN_MILLISECONDS);
//destroy gobject need to be implemented
return true;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
index 56b6e0cbe23..94ad1c24ef4 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
@@ -1,17 +1,18 @@
-/* Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_BRS_H
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
index b53ddaf23ef..612201efa1c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_FIRENOVA 23462
#define SPELL_CLEAVE 20691
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
index fcd2ea1a6d0..676115b0595 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_CORROSIVEACID 20667
#define SPELL_FREEZE 18763
@@ -176,7 +178,7 @@ struct boss_gythAI : public ScriptedAI
&& me->GetHealth() > 0)
{
//summon Rend and Change model to normal Gyth
- //Inturrupt any spell casting
+ //Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
//Gyth model
me->SetDisplayId(9806);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp
index 9e78667717a..679ec4d37a0 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_CROWDPUMMEL 10887
#define SPELL_MIGHTYBLOW 14099
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
index 65f1e8081a0..1b40580572b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_WARSTOMP 24375
#define SPELL_CLEAVE 15579
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
index 60dda5a5fab..1f7d9d1dd18 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Uncertain how often mother's milk is casted
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_CRYSTALIZE 16104
#define SPELL_MOTHERSMILK 16468
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
index 8846442705b..dd93ef85325 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_BLASTWAVE 11130
#define SPELL_SHOUT 23511
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
index 6cbd6955665..267a590a307 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Event to activate Emberseer NYI
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_FIRENOVA 23462
#define SPELL_FLAMEBUFFET 23341
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
index 9058b35cd5c..4d46394a536 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Needs revision
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SHOOT 16496
#define SPELL_STUNBOMB 16497
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
index 56de5dbb385..4973246df79 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Intro event NYI
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_WHIRLWIND 26038
#define SPELL_CLEAVE 20691
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
index 73afc3b5afe..b3470b43e21 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_CURSEOFBLOOD 24673
#define SPELL_HEX 16708
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
index 499f9cf4ce5..4af0dbc3a73 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_FLAMEBREAK 16785
#define SPELL_IMMOLATE 20294
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
index 50b47c94fc5..7e05dec67cf 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackrock Spire
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SNAPKICK 15618
#define SPELL_CLEAVE 15579
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
index f2e2b39fe87..53f2b730a80 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blackrock_spire.h"
enum Achievements
@@ -34,7 +35,7 @@ struct instance_blackrock_spire : public ScriptedInstance
void Initialize()
{
- uiLeeroyTimer = 15*IN_MILISECONDS;
+ uiLeeroyTimer = 15*IN_MILLISECONDS;
uiWhelpCount = 0;
bLeeeeeeeeroy = true;
uiLeroyData = 0;
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
index 856e1236176..33e0ff49e5a 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1469000
#define SAY_LEASH -1469001
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
index 08bebe95384..bc0e451932f 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Chromatic Mutation disabled due to lack of core support
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum Emotes
{
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
index 49a999fc458..1eeb7b3a6ae 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Shadow of Ebonroc needs core support
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SHADOWFLAME 22539
#define SPELL_WINGBUFFET 18500
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp
index af62b1103bc..a9142a2049b 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SHADOWFLAME 22539
#define SPELL_WINGBUFFET 23339
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
index b29fe41f2b1..32fc2d52b37 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define EMOTE_FRENZY -1469031
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
index 5ef05be519c..b78c999e0e5 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Some issues with class calls effecting more than one class
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1469007
#define SAY_XHEALTH -1469008
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
index a095756b18b..59c4d2a6730 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Needs additional review. Phase 1 NYI (Grethok the Controller)
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
//Razorgore Phase 2 Script
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
index f6e94307f2f..bba4cac82f1 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Burning Adrenaline not correctly implemented in core
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_LINE1 -1469026
#define SAY_LINE2 -1469027
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
index dfeb2519bae..d6a31cda4af 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing some text, Vael beginning event, and spawns Nef in wrong plac
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_GAMESBEGIN_1 -1469004
#define SAY_GAMESBEGIN_2 -1469005
@@ -189,9 +191,9 @@ struct boss_victor_nefariusAI : public ScriptedAI
//Trinity::Singleton<MapManager>::Instance().GetMap(me->GetMapId(), me)->GetPlayers().begin();
/*
- list <Player*>::const_iterator i = MapManager::Instance().GetMap(me->GetMapId(), me)->GetPlayers().begin();
+ list <Player*>::const_iterator i = sMapMgr.GetMap(me->GetMapId(), me)->GetPlayers().begin();
- for (i = MapManager::Instance().GetMap(me->GetMapId(), me)->GetPlayers().begin(); i != MapManager::Instance().GetMap(me->GetMapId(), me)->GetPlayers().end(); ++i)
+ for (i = sMapMgr.GetMap(me->GetMapId(), me)->GetPlayers().begin(); i != sMapMgr.GetMap(me->GetMapId(), me)->GetPlayers().end(); ++i)
{
AttackStart((*i));
}
@@ -288,9 +290,9 @@ struct boss_victor_nefariusAI : public ScriptedAI
if (SpawnedAdds >= 42)
{
//Teleport Victor Nefarius way out of the map
- //MapManager::Instance().GetMap(me->GetMapId(), me)->CreatureRelocation(me,0,0,-5000,0);
+ //sMapMgr.GetMap(me->GetMapId(), me)->CreatureRelocation(me,0,0,-5000,0);
- //Inturrupt any spell casting
+ //Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
//Root self
@@ -312,7 +314,7 @@ struct boss_victor_nefariusAI : public ScriptedAI
Nefarian->setFaction(103);
NefarianGUID = Nefarian->GetGUID();
}
- else error_log("TSCR: Blackwing Lair: Unable to spawn nefarian properly.");
+ else sLog.outError("TSCR: Blackwing Lair: Unable to spawn nefarian properly.");
}
AddSpawnTimer = 4000;
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
index d6403fa1206..9d680b13cfe 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Instance_Blackwing_Lair
@@ -21,5 +23,5 @@ SDComment:
SDCategory: Blackwing Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
index 5c6bab46e5a..77fb826e9dd 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/* ScriptData
SDName: Boss Mr.Smite
@@ -22,7 +21,7 @@ SD%Complete:
SDComment: Timers and say taken from acid script
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "deadmines.h"
enum eSpels
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
index 5bc1121bead..0540ae7194d 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Placeholder
SDCategory: Deadmines
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "deadmines.h"
#include "Spell.h"
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h
index 203494ad5b7..6f0e922b421 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h
+++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h
@@ -1,7 +1,24 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_DEADMINES_H
#define DEF_DEADMINES_H
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum CannonState
{
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
index f1aa0c62b8a..153d7ed10e1 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2008 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Deadmines
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "deadmines.h"
enum Sounds
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
index c39bfb69910..776515891e4 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* Script Data Start
@@ -23,7 +22,7 @@ SD%Complete: 90%
SDComment: Some visual effects are not implemented.
Script Data End */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "gnomeregan.h"
#include "ScriptedEscortAI.h"
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
index e46c811e9b1..cbb0d166fb0 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 DEF_GNOMEREGAN_H
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
index 980a6d3552b..c678fc55140 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "gnomeregan.h"
#define MAX_ENCOUNTER 1
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
index 7105d27ca6a..ce6d4158fd7 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1532057
#define SAY_SUMMON1 -1532058
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
index 21db1be1be3..19b6b203d4c 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1532018
#define SAY_SLAY1 -1532019
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index a2f2a8b605e..939a5a1684a 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_MIDNIGHT_KILL -1532000
#define SAY_APPEAR1 -1532001
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
index 6c8fabcca35..fc46d027d07 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2008 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
#define SAY_AGGRO -1532011
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
index 004f1902bfc..3e3f7ffb9c4 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Not sure about timing and portals placing
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
#define EMOTE_PHASE_PORTAL -1532089
@@ -245,7 +247,7 @@ struct boss_netherspiteAI : public ScriptedAI
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
}
- void Aggro(Unit * /*who*/)
+ void EnterCombat(Unit * /*who*/)
{
HandleDoors(false);
SwitchToPortalPhase();
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
index 2e8b6f51317..1cf397e2ce5 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: SDComment: Timers may incorrect
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
//phase 1
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index 1071eae78a0..aea8703f2f2 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
#define SAY_AGGRO -1532091
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
index 394cff3ccc5..37ea79fefbe 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Flame wreath missing cast animation, mods won't triggere.
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedSimpleAI.h"
#include "karazhan.h"
#include "GameObject.h"
@@ -107,7 +109,7 @@ struct boss_aranAI : public ScriptedAI
uint32 FireCooldown;
uint32 FrostCooldown;
- uint32 DrinkInturruptTimer;
+ uint32 DrinkInterruptTimer;
bool ElementalsSpawned;
bool Drinking;
@@ -131,7 +133,7 @@ struct boss_aranAI : public ScriptedAI
FireCooldown = 0;
FrostCooldown = 0;
- DrinkInturruptTimer = 10000;
+ DrinkInterruptTimer = 10000;
ElementalsSpawned = false;
Drinking = false;
@@ -259,11 +261,11 @@ struct boss_aranAI : public ScriptedAI
DoCast(me, SPELL_CONJURE, false);
DoCast(me, SPELL_DRINK, false);
me->SetStandState(UNIT_STAND_STATE_SIT);
- DrinkInturruptTimer = 10000;
+ DrinkInterruptTimer = 10000;
}
}
- //Drink Inturrupt
+ //Drink Interrupt
if (Drinking && DrinkInturrupted)
{
Drinking = false;
@@ -273,10 +275,10 @@ struct boss_aranAI : public ScriptedAI
DoCast(me, SPELL_POTION, false);
}
- //Drink Inturrupt Timer
+ //Drink Interrupt Timer
if (Drinking && !DrinkInturrupted)
- if (DrinkInturruptTimer >= diff)
- DrinkInturruptTimer -= diff;
+ if (DrinkInterruptTimer >= diff)
+ DrinkInterruptTimer -= diff;
else
{
me->SetStandState(UNIT_STAND_STATE_STAND);
@@ -474,13 +476,13 @@ struct boss_aranAI : public ScriptedAI
void SpellHit(Unit* /*pAttacker*/, const SpellEntry* Spell)
{
- //We only care about inturrupt effects and only if they are durring a spell currently being casted
+ //We only care about interrupt effects and only if they are durring a spell currently being casted
if ((Spell->Effect[0] != SPELL_EFFECT_INTERRUPT_CAST &&
Spell->Effect[1] != SPELL_EFFECT_INTERRUPT_CAST &&
Spell->Effect[2] != SPELL_EFFECT_INTERRUPT_CAST) || !me->IsNonMeleeSpellCasted(false))
return;
- //Inturrupt effect
+ //Interrupt effect
me->InterruptNonMeleeSpells(false);
//Normally we would set the cooldown equal to the spell duration
@@ -534,7 +536,7 @@ CreatureAI* GetAI_water_elemental(Creature* pCreature)
// CONVERT TO ACID
CreatureAI* GetAI_shadow_of_aran(Creature* pCreature)
{
- outstring_log("TSCR: Convert simpleAI script for Creature Entry %u to ACID", pCreature->GetEntry());
+ sLog.outString("TSCR: Convert simpleAI script for Creature Entry %u to ACID", pCreature->GetEntry());
SimpleAI* ai = new SimpleAI (pCreature);
ai->Spell[0].Enabled = true;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index 5305cc8d354..039b517bd9b 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Complete! Needs adjustments to use spell though.
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
#define SAY_SLAY1 -1532065
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index ae6de9c1add..6498e48069a 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Oz, Hood, and RAJ event implemented. RAJ event requires more testing.
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
/***********************************/
@@ -92,7 +94,7 @@ void SummonCroneIfReady(ScriptedInstance* pInstance, Creature* pCreature)
if (pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4)
{
- if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, pCreature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
+ if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, pCreature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
{
if (pCreature->getVictim())
pCrone->AI()->AttackStart(pCreature->getVictim());
@@ -725,7 +727,7 @@ bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 /
{
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
- if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
+ if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
pBigBadWolf->AI()->AttackStart(pPlayer);
pCreature->ForcedDespawn();
@@ -1154,7 +1156,7 @@ void boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
if (Phase == PHASE_ROMULO)
{
- error_log("TSCR: boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
+ sLog.outError("TSCR: boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
damage = 0;
return;
}
@@ -1188,7 +1190,7 @@ void boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
return;
}
}
- error_log("TSCR: boss_julianneAI: DamageTaken reach end of code, that should not happen.");
+ sLog.outError("TSCR: boss_julianneAI: DamageTaken reach end of code, that should not happen.");
}
void boss_romuloAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
@@ -1242,7 +1244,7 @@ void boss_romuloAI::DamageTaken(Unit* /*done_by*/, uint32 &damage)
}
}
- error_log("TSCR: boss_romuloAI: DamageTaken reach end of code, that should not happen.");
+ sLog.outError("TSCR: boss_romuloAI: DamageTaken reach end of code, that should not happen.");
}
void boss_julianneAI::UpdateAI(const uint32 diff)
@@ -1283,7 +1285,7 @@ void boss_julianneAI::UpdateAI(const uint32 diff)
{
if (SummonRomuloTimer <= diff)
{
- if (Creature* pRomulo = me->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
+ if (Creature* pRomulo = me->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
{
RomuloGUID = pRomulo->GetGUID();
CAST_AI(boss_romuloAI, pRomulo->AI())->JulianneGUID = me->GetGUID();
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
index 59c1236bcdc..7a7039b94fe 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Instance Script for Karazhan to help in various encounters. TODO: Gam
SDCategory: Karazhan
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
#define MAX_ENCOUNTER 12
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 5186a794b0d..29e22d36047 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -1,17 +1,19 @@
- /* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ /*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_berthold
npc_image_of_medivh
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "karazhan.h"
#include "ScriptedEscortAI.h"
@@ -220,7 +222,7 @@ struct npc_barnesAI : public npc_escortAI
void PrepareEncounter()
{
- debug_log("TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
+ sLog.outDebug("TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
uint8 index = 0;
uint8 count = 0;
@@ -245,7 +247,7 @@ struct npc_barnesAI : public npc_escortAI
uint32 entry = ((uint32)Spawns[index][0]);
float PosX = Spawns[index][1];
- if (Creature* pCreature = me->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
+ if (Creature* pCreature = me->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
{
// In case database has bad flags
pCreature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
@@ -371,17 +373,17 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 /*uiSe
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_OZ;
- outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
+ sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_HOOD;
- outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
+ sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
pPlayer->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_RAJ;
- outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
+ sLog.outString("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID());
break;
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
index 56a6b106332..a24dba53e49 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_KARAZHAN_H
#define DEF_KARAZHAN_H
@@ -48,6 +62,6 @@ enum OperaEvents
EVENT_RAJ = 3
};
-#define ERROR_INST_DATA(a) error_log("TSCR: Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry());
+#define ERROR_INST_DATA(a) sLog.outError("TSCR: Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry());
#endif
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index b5835dfe0a1..3f0cffbacaa 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Normal and Heroic Support. Issues: Arcane Spheres do not initially fo
SDCategory: Magisters' Terrace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "magisters_terrace.h"
#include "WorldPacket.h"
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 2112eaabc87..bc4049bb1fb 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: No Heroic support yet. Needs further testing. Several scripts for pet
SDCategory: Magister's Terrace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "magisters_terrace.h"
struct Speech
@@ -595,7 +597,7 @@ struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
boss_priestess_lackey_commonAI::Reset();
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* /*pWho*/)
{
DoCast(me, SPELL_SUMMON_IMP);
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index adb0700eabf..9636d596213 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Heroic and Normal Support. Needs further testing.
SDCategory: Magister's Terrace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "magisters_terrace.h"
#define SAY_AGGRO -1585000
@@ -63,7 +65,7 @@ struct boss_selin_fireheartAI : public ScriptedAI
for (uint8 i = 0; i < size; ++i)
{
uint64 guid = pInstance->GetData64(DATA_FEL_CRYSTAL);
- debug_log("TSCR: Selin: Adding Fel Crystal %u to list", guid);
+ sLog.outDebug("TSCR: Selin: Adding Fel Crystal %u to list", guid);
Crystals.push_back(guid);
}
}
@@ -108,7 +110,7 @@ struct boss_selin_fireheartAI : public ScriptedAI
// Small door opened after event are expected to be closed by default
// Set Inst data for encounter
pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(ERROR_INST_DATA);
DrainLifeTimer = 3000 + rand()%4000;
DrainManaTimer = DrainLifeTimer + 5000;
@@ -208,7 +210,7 @@ struct boss_selin_fireheartAI : public ScriptedAI
else
{
// Make an error message in case something weird happened here
- error_log("TSCR: Selin Fireheart unable to drain crystal as the crystal is either dead or despawned");
+ sLog.outError("TSCR: Selin Fireheart unable to drain crystal as the crystal is either dead or despawned");
DrainingCrystal = false;
}
}
@@ -340,7 +342,7 @@ struct mob_fel_crystalAI : public ScriptedAI
}
}
}
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(ERROR_INST_DATA);
}
};
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
index bc8bd5cec30..c89c7683749 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Heroic and Normal support. Needs further testing.
SDCategory: Magister's Terrace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "magisters_terrace.h"
enum eEnums
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index 455c03739bc..ab1bf3b04d1 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Designed only for Selin Fireheart
SDCategory: Magister's Terrace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "magisters_terrace.h"
#define MAX_ENCOUNTER 4
@@ -169,7 +171,7 @@ struct instance_magisters_terrace : public ScriptedInstance
{
if (FelCrystals.empty())
{
- error_log("TSCR: Magisters Terrace: No Fel Crystals loaded in Inst Data");
+ sLog.outError("TSCR: Magisters Terrace: No Fel Crystals loaded in Inst Data");
return 0;
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
index e46da9cb1bf..f6f1631fa6a 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_kalecgos
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_kalecgos
@@ -70,7 +72,7 @@ struct npc_kalecgosAI : public ScriptedAI
return;
if (uiPointId == POINT_ID_LAND)
- m_uiTransformTimer = MINUTE*IN_MILISECONDS;
+ m_uiTransformTimer = MINUTE*IN_MILLISECONDS;
}
// some targeting issues with the spell, so use this workaround as temporary solution
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
index d6419ea409c..a7de6da1c8e 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_MAGISTERS_TERRACE_H
#define DEF_MAGISTERS_TERRACE_H
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
index 77c6fafa10a..86894f75f73 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define EMOTE_SERVICE -1409000
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp
index 75891cf8c43..18eef567088 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Adds NYI
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
// Garr spells
#define SPELL_ANTIMAGICPULSE 19492
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp
index 9ebe69c0c4e..a2e3550b87b 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Adds MC NYI
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SHADOWBOLT 19728
#define SPELL_RAINOFFIRE 19717
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp
index 2aba378d399..5ad9768d567 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Timers need to be confirmed, Golemagg's Trust need to be checked
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "molten_core.h"
enum eEnums
@@ -53,9 +55,9 @@ struct boss_golemaggAI : public ScriptedAI
void Reset()
{
- m_uiPyroblastTimer = 7*IN_MILISECONDS; // These timers are probably wrong
- m_uiEarthquakeTimer = 3*IN_MILISECONDS;
- m_uiBuffTimer = 2.5*IN_MILISECONDS;
+ m_uiPyroblastTimer = 7*IN_MILLISECONDS; // These timers are probably wrong
+ m_uiEarthquakeTimer = 3*IN_MILLISECONDS;
+ m_uiBuffTimer = 2.5*IN_MILLISECONDS;
m_bEnraged = false;
DoCast(me, SPELL_MAGMASPLASH, true);
@@ -78,7 +80,7 @@ struct boss_golemaggAI : public ScriptedAI
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_PYROBLAST);
- m_uiPyroblastTimer = 7*IN_MILISECONDS;
+ m_uiPyroblastTimer = 7*IN_MILLISECONDS;
}
else
m_uiPyroblastTimer -= uiDiff;
@@ -96,7 +98,7 @@ struct boss_golemaggAI : public ScriptedAI
if (m_uiEarthquakeTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_EARTHQUAKE);
- m_uiEarthquakeTimer = 3*IN_MILISECONDS;
+ m_uiEarthquakeTimer = 3*IN_MILLISECONDS;
}
else
m_uiEarthquakeTimer -= uiDiff;
@@ -107,7 +109,7 @@ struct boss_golemaggAI : public ScriptedAI
if (m_uiBuffTimer <= uidiff)
{
DoCast(me, SPELL_GOLEMAGG_TRUST);
- m_uiBuffTimer = 2.5*IN_MILISECONDS;
+ m_uiBuffTimer = 2.5*IN_MILLISECONDS;
}
else
m_uiBuffTimer -= uiDiff;
@@ -130,7 +132,7 @@ struct mob_core_ragerAI : public ScriptedAI
void Reset()
{
- m_uiMangleTimer = 7*IN_MILISECONDS; // These times are probably wrong
+ m_uiMangleTimer = 7*IN_MILLISECONDS; // These times are probably wrong
}
void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage)
@@ -162,7 +164,7 @@ struct mob_core_ragerAI : public ScriptedAI
if (m_uiMangleTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_MANGLE);
- m_uiMangleTimer = 10*IN_MILISECONDS;
+ m_uiMangleTimer = 10*IN_MILLISECONDS;
}
else
m_uiMangleTimer -= uiDiff;
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp
index 50601f04147..761bfa97f81 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_IMPENDINGDOOM 19702
#define SPELL_LUCIFRONCURSE 19703
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
index f612003b076..fd64e42fed1 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Conflag on ground nyi, fear causes issues without VMAPs
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define EMOTE_FRENZY -1409001
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
index 11ae70befcf..3b8bf20256d 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Correct spawning and Event NYI
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1409003
#define SAY_SPAWN -1409004
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp
index 71c0b40de3f..fc7f9948f0a 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Intro Dialog and event NYI
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_REINFORCEMENTS1 -1409013
#define SAY_REINFORCEMENTS2 -1409014
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp
index 4b0774cdc54..f2b6b4a99f8 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Teleport NYI
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_ARCANEEXPLOSION 19712
#define SPELL_SHAZZRAHCURSE 19713
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp
index 83288fe003b..66d6d115b12 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Adds NYI
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "molten_core.h"
#define SPELL_DARKSTRIKE 19777
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp
index eb79c234134..fb313fba3ae 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Place Holder
SDCategory: Molten Core
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "molten_core.h"
#define MAX_ENCOUNTER 9
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp
index f8fe5bf1477..5a77af76d63 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
mob_ancient_core_hound
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedSimpleAI.h"
#define SPELL_CONE_OF_FIRE 19630
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h
index 5874d8b9408..419aeb4acbf 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_MOLTEN_CORE_H
#define DEF_MOLTEN_CORE_H
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index bdbf6b7c081..609e8bd9322 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "Vehicle.h"
#include "ObjectMgr.h"
#include "ScriptedEscortAI.h"
@@ -199,7 +198,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
anchorGUID = anchor->GetGUID();
}
else
- error_log("npc_unworthy_initiateAI: unable to find anchor!");
+ sLog.outError("npc_unworthy_initiateAI: unable to find anchor!");
float dist = 99.0f;
GameObject *prison = NULL;
@@ -219,7 +218,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
if (prison)
prison->ResetDoorOrButton();
else
- error_log("npc_unworthy_initiateAI: unable to find prison!");
+ sLog.outError("npc_unworthy_initiateAI: unable to find prison!");
}
return;
case PHASE_TO_EQUIP:
@@ -230,7 +229,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
else
{
me->GetMotionMaster()->MovePoint(1, anchorX, anchorY, me->GetPositionZ());
- //debug_log("npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
+ //sLog.outDebug("npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
phase = PHASE_EQUIPING;
wait_timer = 0;
}
@@ -989,9 +988,9 @@ bool GOHello_go_inconspicuous_mine_car(Player* pPlayer, GameObject* /*pGO*/)
{
car->AI()->SetGUID(miner->GetGUID());
CAST_AI(npc_scarlet_minerAI, miner->AI())->InitCartQuest(pPlayer);
- } else error_log("TSCR: GOHello_go_inconspicuous_mine_car vehicle entry is not correct.");
- } else error_log("TSCR: GOHello_go_inconspicuous_mine_car player is not on the vehicle.");
- } else error_log("TSCR: GOHello_go_inconspicuous_mine_car Scarlet Miner cant be found by script.");
+ } else sLog.outError("TSCR: GOHello_go_inconspicuous_mine_car vehicle entry is not correct.");
+ } else sLog.outError("TSCR: GOHello_go_inconspicuous_mine_car player is not on the vehicle.");
+ } else sLog.outError("TSCR: GOHello_go_inconspicuous_mine_car Scarlet Miner cant be found by script.");
}
return true;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index 91f7e0e6cbe..bafb12d5606 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
//How to win friends and influence enemies
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 3b0ce186592..6d40618a936 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
index cdfd69234fb..e39dace9920 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*####
## npc_valkyr_battle_maiden
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
index cb6ed1daf22..6659d1aaba8 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
index 6b6efa0f934..e30e527d567 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_CALLOFTHEGRAVE 17831
#define SPELL_TERRIFY 7399
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
index f7b6b7cce4b..2a53ce591db 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 17bbf0c23c6..50a4dd8f60e 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "SpellMgr.h"
#include "scarlet_monastery.h"
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
index e0db29aa240..e6b535c1073 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Should in addition spawn Myrmidons in the hallway outside
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#define SAY_AGGRO -1189000
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
index b9b15f34508..e643e001ca6 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: TODO: if this guy not involved in some special event, remove (and let
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eSpells
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
index 300e69611cd..324f28ccf6a 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
index b4b84fc8059..d804a680e76 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scarlet_monastery.h"
enum eEnums
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
index 32b85e214a0..2d4f7e8e244 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scarlet_monastery.h"
enum eEnums
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
index 5d0a3b3792f..f37903d09e1 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_LICHSLAP 28873
#define SPELL_FROSTBOLTVOLLEY 8398
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index 33642d4511c..dd7a88dbc88 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -1,18 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Instance_Scarlet_Monastery
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scarlet Monastery
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scarlet_monastery.h"
#define ENTRY_PUMPKIN_SHRINE 186267
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
index 2b6399ae3e4..d34636df360 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SCARLET_M
#define DEF_SCARLET_M
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
index 50a9e204566..1f2e2fe1429 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Doors missing in instance script.
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
#define SPELL_ARCANEMISSILES 22272
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp
index 8bb9ec68aca..c021e9e677e 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
struct boss_death_knight_darkreaverAI : public ScriptedAI
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp
index 5ff01d48623..24b5bafd57c 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
enum eEnums
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
index a038fc7a0b8..b2748fef22a 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
#define SPELL_CURSEOFAGONY 18671
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
index c4c0f95d8d1..d78b486d00f 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
#define SPELL_CALLOFGRAVES 17831
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
index f8d8520e394..63ba5885573 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_jandicebarov
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_CURSEOFBLOOD 24673
//#define SPELL_ILLUSION 17773
@@ -91,7 +93,7 @@ struct boss_jandicebarovAI : public ScriptedAI
if (!Invisible && Illusion_Timer <= diff)
{
- //Inturrupt any spell casting
+ //Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
me->setFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
index c4ae5cc490e..9a41a16a2e7 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SHADOWBOLTVOLLEY 20741
#define SPELL_BONESHIELD 27688
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
index 0956a04d824..9782475540f 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: aura applied/defined in database
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
#define SPELL_IMMOLATE 20294 // Old ID was 15570
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp
index d3b75900202..7d3dc7cf873 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
#define SPELL_VOLATILEINFECTION 24928
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
index 63837e04ad5..a5957995981 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_FROSTBOLT 21369
#define SPELL_ICEARMOR 18100 //This is actually a buff he gives himself
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp
index 6340f2b0e2d..e23bc4fdd97 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
#define SPELL_TRAMPLE 15550
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
index a38369faab0..1aa278f1bce 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
index 992849cff1b..28ed326cefa 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Scholomance
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "scholomance.h"
#define GO_GATE_KIRTONOS 175570
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
index 83ce26c9687..463c848b9ef 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
+++ b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SCHOLOMANCE_H
#define DEF_SCHOLOMANCE_H
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index 20959641889..be3cd67c8d6 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Shadowfang Keep
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shadowfang_keep.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
index 23b8ad89160..61f06276bb6 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
@@ -1,17 +1,19 @@
- /* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ /*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_shadowfang_prisoner
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "shadowfang_keep.h"
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h
index a1a59789632..fb5bf310589 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SHADOWFANG_H
#define DEF_SHADOWFANG_H
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp
index de17717e289..ca2ca46d198 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Baron_Rivendare
@@ -21,7 +23,7 @@ SDComment: aura applied/defined in database
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
#define SAY_0 "Intruders! More pawns of the Argent Dawn, no doubt. I already count one of their number among my prisoners. Withdraw from my domain before she is executed!"
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp
index cff4fe3fbae..ba2a49a1804 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Baroness_Anastari
@@ -21,7 +23,7 @@ SDComment: MC disabled
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
#define SPELL_BANSHEEWAIL 16565
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp
index c12f7b9ad04..0de4d122904 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_cannon_master_willey
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
//front, left
#define ADD_1X 3553.851807
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
index a8489a7f549..ec2fd370a16 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Dathrohan_Balnazzar
@@ -21,7 +23,7 @@ SDComment: Possibly need to fix/improve summons after death
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
@@ -100,7 +102,7 @@ struct boss_dathrohan_balnazzarAI : public ScriptedAI
for (uint8 i=0; i<uiCount; ++i)
me->SummonCreature(NPC_ZOMBIE,
m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient,
- TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILISECONDS);
+ TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS);
}
void EnterCombat(Unit * /*who*/)
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp
index 89de7dbc207..4551a8c5118 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Magistrate_Barthilas
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
#define SPELL_DRAININGBLOW 16793
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp
index 0c1cf011d5e..f47da709578 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_maleki_the_pallid
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
#define SPELL_FROSTBOLT 17503
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp
index ae7299071f4..1e39e4ef3e4 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Nerubenkan
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
#define SPELL_ENCASINGWEBS 4962
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp
index 905feb9fffc..c20ac90aae0 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Silver_Hand_Bosses
@@ -21,7 +23,7 @@ SDComment: Basic script to have support for Horde paladin epic mount (quest 9737
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
/*#####
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp
index c04bae15468..002cd963e2a 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_postmaster_malown
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
//Spell ID to summon this guy is 24627 "Summon Postmaster Malown"
//He should be spawned along with three other elites once the third postbox has been opened
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp
index 3a3ae60c9c9..809b62e68af 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Ramstein_The_Gorger
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
#define SPELL_TRAMPLE 5568
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp
index f15eb59ba47..426e40e2db2 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_timmy_the_cruel
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_SPAWN "TIMMY!"
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
index ffeaa070a26..797a3899806 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: instance_stratholme
@@ -21,7 +23,7 @@ SDComment: In progress. Undead side 75% implemented. Save/load not implemented.
SDCategory: Stratholme
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
#define GO_SERVICE_ENTRANCE 175368
@@ -112,7 +114,7 @@ struct instance_stratholme : public ScriptedInstance
return true;
}
- debug_log("TSCR: Instance Stratholme: Cannot open slaugther square yet.");
+ sLog.outDebug("TSCR: Instance Stratholme: Cannot open slaugther square yet.");
return false;
}
@@ -208,7 +210,7 @@ struct instance_stratholme : public ScriptedInstance
break;
Encounter[0] = data;
BaronRun_Timer = 2700000;
- debug_log("TSCR: Instance Stratholme: Baron run in progress.");
+ sLog.outDebug("TSCR: Instance Stratholme: Baron run in progress.");
break;
case FAIL:
//may add code to remove aura from players, but in theory the time should be up already and removed.
@@ -266,10 +268,10 @@ struct instance_stratholme : public ScriptedInstance
//UpdateGoState(ziggurat4GUID,0,true);
if (Creature* pBaron = instance->GetCreature(baronGUID))
pBaron->SummonCreature(C_RAMSTEIN,4032.84,-3390.24,119.73,4.71,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000);
- debug_log("TSCR: Instance Stratholme: Ramstein spawned.");
+ sLog.outDebug("TSCR: Instance Stratholme: Ramstein spawned.");
}
else
- debug_log("TSCR: Instance Stratholme: %u Abomnation left to kill.",count);
+ sLog.outDebug("TSCR: Instance Stratholme: %u Abomnation left to kill.",count);
}
if (data == NOT_STARTED)
@@ -278,7 +280,7 @@ struct instance_stratholme : public ScriptedInstance
if (data == DONE)
{
SlaugtherSquare_Timer = 300000;
- debug_log("TSCR: Instance Stratholme: Slaugther event will continue in 5 minutes.");
+ sLog.outDebug("TSCR: Instance Stratholme: Slaugther event will continue in 5 minutes.");
}
Encounter[4] = data;
break;
@@ -419,7 +421,7 @@ struct instance_stratholme : public ScriptedInstance
if (GetData(TYPE_BARON_RUN) != DONE)
SetData(TYPE_BARON_RUN, FAIL);
BaronRun_Timer = 0;
- debug_log("TSCR: Instance Stratholme: Baron run event reached end. Event has state %u.",GetData(TYPE_BARON_RUN));
+ sLog.outDebug("TSCR: Instance Stratholme: Baron run event reached end. Event has state %u.",GetData(TYPE_BARON_RUN));
} else BaronRun_Timer -= diff;
}
@@ -434,7 +436,7 @@ struct instance_stratholme : public ScriptedInstance
HandleGameObject(ziggurat4GUID, true);
HandleGameObject(ziggurat5GUID, true);
- debug_log("TSCR: Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
+ sLog.outDebug("TSCR: Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
}
SlaugtherSquare_Timer = 0;
} else SlaugtherSquare_Timer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index 035fca68b95..ed87b7fdccb 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -28,7 +30,7 @@ mob_restless_soul
mobs_spectral_ghostly_citizen
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "stratholme.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h
index b9246091a7c..6198ea85723 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
-* This program is free software licensed under GPL version 2
-* Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_STRATHOLME_H
#define DEF_STRATHOLME_H
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
index 6fe65cf963d..99c018161dc 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 kb_z
- * 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:Place Holder
SDCategory: Sunken Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunken_temple.h"
#define GO_ATALAI_STATUE1 148830
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
index 7f0ca126d78..ca49cac4908 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 kb_z
- * 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
at_malfurion_Stormrage_trigger
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunken_temple.h"
/*#####
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h
index 82245095c31..39fdee13ef3 100644
--- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h
+++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 kb_z
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SUNKEN_TEMPLE_H
#define DEF_SUNKEN_TEMPLE_H
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
index 59e58d6df1a..5aa1daaad77 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -20,7 +22,7 @@ SD%Complete: 80
SDComment: Find a way to start the intro, best code for the intro
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
enum Quotes
@@ -143,7 +145,7 @@ struct boss_brutallusAI : public ScriptedAI
{
if (!Intro || IsIntro)
return;
- error_log("Start Intro");
+ sLog.outError("Start Intro");
Creature *Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
if (Madrigosa)
{
@@ -158,7 +160,7 @@ struct boss_brutallusAI : public ScriptedAI
}else
{
//Madrigosa not found, end intro
- error_log("Madrigosa was not found");
+ sLog.outError("Madrigosa was not found");
EndIntro();
}
}
@@ -168,7 +170,7 @@ struct boss_brutallusAI : public ScriptedAI
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Intro = false;
IsIntro = false;
- error_log("End Intro");
+ sLog.outError("End Intro");
}
void AttackStart(Unit* pWho)
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
index 602f12065fa..6ce5b933d6a 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
@@ -1,18 +1,19 @@
-/* Copyright (C) 2009 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
/* ScriptData
SDName: Boss_Eredar_Twins
@@ -20,7 +21,7 @@ SD%Complete: 100
SDComment:
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
enum Quotes
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index 88ad2dbab11..3c6efbb97fe 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -1,18 +1,19 @@
-/* Copyright (C) 2009 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
/* ScriptData
SDName: Boss_Felmyst
@@ -20,7 +21,7 @@ SD%Complete: 0
SDComment:
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
enum Yells
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 146771325eb..e72e49c47b3 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Sunwell_Plateau
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
enum Yells
@@ -260,7 +262,7 @@ struct boss_kalecgosAI : public ScriptedAI
}
else
{
- error_log("TSCR: Didn't find Shathrowar. Kalecgos event reseted.");
+ sLog.outError("TSCR: Didn't find Shathrowar. Kalecgos event reseted.");
EnterEvadeMode();
return;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index f1c3a769b28..4bd5164bf9c 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -1,17 +1,18 @@
-/* Copyright (C) 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -23,7 +24,7 @@ EndScriptData */
//TODO rewrite Armageddon
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
#include <math.h>
@@ -727,7 +728,7 @@ struct boss_kiljaedenAI : public Scripted_NoMovementAI
if (pRandomPlayer)
DoCast(pRandomPlayer, SPELL_LEGION_LIGHTNING, false);
else
- error_log("try to cast SPELL_LEGION_LIGHTNING on invalid target");
+ sLog.outError("try to cast SPELL_LEGION_LIGHTNING on invalid target");
Timer[TIMER_LEGION_LIGHTNING] = (Phase == PHASE_SACRIFICE) ? 18000 : 30000; // 18 seconds in PHASE_SACRIFICE
Timer[TIMER_SOUL_FLAY] = 2500;
@@ -1341,7 +1342,7 @@ struct mob_sinster_reflectionAI : public ScriptedAI
DoMeleeAttackIfReady();
break;
}
- debug_log("Sinister-Timer");
+ sLog.outDebug("Sinister-Timer");
for (uint8 i = 0; i < 3; ++i)
uiTimer[i] -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
index 9dca453ade6..ca25828c484 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -1,18 +1,19 @@
-/* Copyright (C) 2009 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
/* ScriptData
SDName: Boss_Muru
@@ -20,7 +21,7 @@ SD%Complete: 80
SDComment: all sounds, black hole effect triggers to often (46228)
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
// Muru & Entropius's spells
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
index 94b7bf4b735..12a0bdfffff 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Instance_Sunwell_Plateau
@@ -9,7 +23,7 @@ SDComment: VERIFY SCRIPT
SDCategory: Sunwell_Plateau
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
#define MAX_ENCOUNTER 6
@@ -110,7 +124,7 @@ struct instance_sunwell_plateau : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("TSCR: Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp
index dbf67d5f26e..bb3a1b16a20 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp
@@ -1,17 +1,18 @@
-/* Copyright (C) 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +26,7 @@ npc_prophet_velen
npc_captain_selana
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sunwell_plateau.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
index 9f1a2480c96..bebee8f0f99 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SUNWELLPLATEAU_H
#define DEF_SUNWELLPLATEAU_H
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
index cd3bc5fc219..ba7fbd9ca8f 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
@@ -1,18 +1,20 @@
-/* Copyright (C) 2006,2007 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2007 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_archaedas
@@ -24,7 +26,7 @@ At 33%, he will awaken the Vault Walkers
On his death the vault door opens.
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO "Who dares awaken Archaedas? Who dares the wrath of the makers!"
#define SOUND_AGGRO 5855
@@ -348,7 +350,7 @@ SDComment: After activating the altar of the keepers, the stone keepers will
wake up one by one.
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SELF_DESTRUCT 9874
@@ -436,7 +438,7 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* /*pGo*/)
//if (altarOfTheKeeperCounter < NUMBER_NEEDED_TO_ACTIVATE)
//{
- //error_log("not enough people yet, altarOfTheKeeperCounter = %d", altarOfTheKeeperCounter);
+ //sLog.outError("not enough people yet, altarOfTheKeeperCounter = %d", altarOfTheKeeperCounter);
// return false; // not enough people yet
//}
/*
@@ -446,7 +448,7 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* /*pGo*/)
for (uint8 x = 0; x < 5; ++x)
{
pTarget = Unit::GetUnit(*pPlayer, altarOfTheKeeperCount[x]);
- //error_log("number of people currently activating it: %d", x+1);
+ //sLog.outError("number of people currently activating it: %d", x+1);
if (!pTarget)
continue;
if (pTarget->IsNonMeleeSpellCasted(true))
@@ -457,11 +459,11 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* /*pGo*/)
if (count < NUMBER_NEEDED_TO_ACTIVATE)
{
- //error_log("still not enough people");
+ //sLog.outError("still not enough people");
return true; // not enough people
}
*/
- //error_log ("activating stone keepers");
+ //sLog.outError ("activating stone keepers");
pInstance->SetData(NULL,1); // activate the Stone Keepers
return true;
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
index 9b6d5dba642..71e1bf9d877 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Uldaman
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1070000
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
index a519ad678b7..579c01e7286 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
@@ -1,20 +1,22 @@
-/* Copyright (C) 2006,2007 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2007 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#define SPELL_ARCHAEDAS_AWAKEN 10347
#define SPELL_AWAKEN_VAULT_WALKER 10258
@@ -215,7 +217,7 @@ struct instance_uldaman : public ScriptedInstance
void SetData (uint32 /*type*/, uint32 data)
{
- //error_log ("SetData: data = %d", data);
+ //sLog.outError ("SetData: data = %d", data);
if (data == 0) OpenDoor (altarOfTheKeeperTempleDoor);
if (data == 0) OpenDoor (archaedasTempleDoor);
if (data == 3) OpenDoor (ancientVaultDoor);
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
index 2bd8387efa5..34cf68d0d21 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ mob_jadespine_basilisk
npc_lore_keeper_of_norgannon
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## mob_jadespine_basilisk
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index f516065cc03..2be5b6caacb 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -1,18 +1,20 @@
-/* Copyright ?2006 - 2008 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_Akilzon
@@ -23,7 +25,7 @@ SQLUpdate:
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
#include "Weather.h"
@@ -94,7 +96,7 @@ struct boss_akilzonAI : public ScriptedAI
GustOfWind_Timer = urand(20000,30000); //20 to 30 seconds(bosskillers)
CallLighting_Timer = urand(10000,20000); //totaly random timer. can't find any info on this
ElectricalStorm_Timer = 60000; //60 seconds(bosskillers)
- Enrage_Timer = 10*MINUTE*IN_MILISECONDS; //10 minutes till enrage(bosskillers)
+ Enrage_Timer = 10*MINUTE*IN_MILLISECONDS; //10 minutes till enrage(bosskillers)
SummonEagles_Timer = 99999;
TargetGUID = 0;
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
index aee0a8a59ea..a846e3f8779 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_Halazzi
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Aman
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
//#include "spell.h"
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index 7baa9292142..5fa14fb56ab 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -1,18 +1,20 @@
-/* Copyright ?2006,2007 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2007 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Hex_Lord_Malacrass
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Aman
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
#define YELL_AGGRO "Da shadow gonna fall on you... "
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
index 9ac54976241..073fff60456 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
@@ -1,18 +1,20 @@
- /* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Janalai
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Aman
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
#include "GridNotifiers.h"
@@ -141,7 +143,7 @@ struct boss_janalaiAI : public ScriptedAI
BombSequenceTimer = 1000;
BombCount = 0;
HatcherTimer = 10000;
- EnrageTimer = MINUTE*5*IN_MILISECONDS;
+ EnrageTimer = MINUTE*5*IN_MILLISECONDS;
noeggs = false;
isBombing =false;
@@ -242,7 +244,7 @@ struct boss_janalaiAI : public ScriptedAI
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
- //error_log("Eggs %d at middle", templist.size());
+ //sLog.outError("Eggs %d at middle", templist.size());
if (!templist.size())
return false;
@@ -508,7 +510,7 @@ struct mob_amanishi_hatcherAI : public ScriptedAI
cell.Visit(pair, cSearcher, *(me->GetMap()));
}
- //error_log("Eggs %d at %d", templist.size(), side);
+ //sLog.outError("Eggs %d at %d", templist.size(), side);
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end() && num > 0; ++i)
if ((*i)->GetDisplayId() != 11686)
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
index ae5c6596d2d..42762fe7baa 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
@@ -1,18 +1,20 @@
- /* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ /*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Nalorakk
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Aman
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
#include "GridNotifiers.h"
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
index 91cfa728f89..fbd34c34228 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
@@ -1,18 +1,20 @@
-/* Copyright (C) 2006,2007,2008 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_ZulJin
@@ -20,7 +22,7 @@ SD%Complete: 85%
SDComment:
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
//Speech
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
index 897330691a6..4a3096b302e 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
@@ -1,18 +1,20 @@
- /* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ /*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: instance_zulaman
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Aman
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
#define MAX_ENCOUNTER 6
@@ -172,7 +174,7 @@ struct instance_zulaman : public ScriptedInstance
ss << "S " << BossKilled << " " << ChestLooted << " " << QuestMinute;
char* data = new char[ss.str().length()+1];
strcpy(data, ss.str().c_str());
- //error_log("TSCR: Zul'aman saved, %s.", data);
+ //sLog.outError("TSCR: Zul'aman saved, %s.", data);
return data;
}
@@ -180,17 +182,17 @@ struct instance_zulaman : public ScriptedInstance
{
if (!load) return;
std::istringstream ss(load);
- //error_log("TSCR: Zul'aman loaded, %s.", ss.str().c_str());
+ //sLog.outError("TSCR: Zul'aman loaded, %s.", ss.str().c_str());
char dataHead; // S
uint16 data1, data2, data3;
ss >> dataHead >> data1 >> data2 >> data3;
- //error_log("TSCR: Zul'aman loaded, %d %d %d.", data1, data2, data3);
+ //sLog.outError("TSCR: Zul'aman loaded, %d %d %d.", data1, data2, data3);
if (dataHead == 'S')
{
BossKilled = data1;
ChestLooted = data2;
QuestMinute = data3;
- } else error_log("TSCR: Zul'aman: corrupted save data.");
+ } else sLog.outError("TSCR: Zul'aman: corrupted save data.");
}
void SetData(uint32 type, uint32 data)
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
index 067ae687644..a27ae768dba 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Zulaman
@@ -25,7 +27,7 @@ EndScriptData */
npc_forest_frog
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulaman.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
index 6fb0ef173bd..ad2d83f659f 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
-* This program is free software licensed under GPL version 2
-* Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_ZULAMAN_H
#define DEF_ZULAMAN_H
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index cbbe6c4dc4c..80d6d76da4d 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Wrong cleave and red aura is missing.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
bool GOHello_go_gong_of_bethekk(Player* /*pPlayer*/, GameObject* pGo)
@@ -170,7 +172,7 @@ struct boss_arlokkAI : public ScriptedAI
MarkedTargetGUID = pMarkedTarget->GetGUID();
}
else
- error_log("TSCR: boss_arlokk could not accuire pMarkedTarget.");
+ sLog.outError("TSCR: boss_arlokk could not accuire pMarkedTarget.");
m_uiMark_Timer = 15000;
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
index 0201235be70..ee65b4f5e61 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Massive Geyser with knockback not working. Spell buggy.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_FROSTBREATH 16099
#define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon...
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
index 67de135674a..e2914b1e8e0 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SPELL_AVARTAR 24646 //The Enrage Spell
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
index d7dd5020b74..8ed073c56d3 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Blood siphon spell buggy cause of Core Issue.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SAY_AGGRO -1309020
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
index ca67d0842c3..a079a451f43 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SPELL_MANABURN 26046
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index fae05fcf384..3642ffa6a1b 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Problem in finding the right flying batriders for spawning and making
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SAY_AGGRO -1309002
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
index 58f91f85a95..a192a1fcbf3 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Mind Control not working because of core bug. Shades visible for all.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SAY_AGGRO -1309014
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index 4609605f3c1..2fdae639e46 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Ohgan function needs improvements.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SAY_AGGRO -1309015
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index 77e9f9b929f..76f89ebf6ca 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Charging healers and casters not working. Perhaps wrong Spell Timers.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SAY_AGGRO -1309005
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
index f7b01b26e19..3d1d19bed40 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SPELL_AMBUSH 24337
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index 179700d36e7..7e1aa2db350 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Almost finished.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SAY_AGGRO -1309009
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
index ec1a7a142b5..f7e1ae27296 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SAY_TRANSFORM -1309000
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
index a71d7e0504a..051e556b698 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
#define SPELL_LIGHTNINGCLOUD 25033
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
index aaed1c6df3a..89f30ff134e 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing reset function after killing a boss for Ohgan, Thekal.
SDCategory: Zul'Gurub
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "zulgurub.h"
struct instance_zulgurub : public ScriptedInstance
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
index bf55a54c1d5..9ca8d3e9fa1 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_ZULGURUB_H
#define DEF_ZULGURUB_H
diff --git a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp
index 8695a73131c..e54f0840988 100644
--- a/src/server/scripts/EasternKingdoms/alterac_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/alterac_mountains.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -24,7 +26,7 @@ EndScriptData */
/* ContentData
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*void AddSC_alterac_mountains()
{
diff --git a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
index 86edbc2ed9d..5a5d229a109 100644
--- a/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
+++ b/src/server/scripts/EasternKingdoms/arathi_highlands.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_professor_phizzlethorpe
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/blasted_lands.cpp b/src/server/scripts/EasternKingdoms/blasted_lands.cpp
index 768242fcd22..cbeb8d45ffe 100644
--- a/src/server/scripts/EasternKingdoms/blasted_lands.cpp
+++ b/src/server/scripts/EasternKingdoms/blasted_lands.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ npc_deathly_usher
npc_fallen_hero_of_horde
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_deathly_usher
diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp
index 44a6431f9ea..d6a6cb76d59 100644
--- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp
+++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Highlord Kruul are presumably no longer in-game on regular bases, how
SDCategory: Bosses
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_SHADOWVOLLEY 21341
#define SPELL_CLEAVE 20677
diff --git a/src/server/scripts/EasternKingdoms/burning_steppes.cpp b/src/server/scripts/EasternKingdoms/burning_steppes.cpp
index 5a1e338b70f..de543258b40 100644
--- a/src/server/scripts/EasternKingdoms/burning_steppes.cpp
+++ b/src/server/scripts/EasternKingdoms/burning_steppes.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_ragged_john
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_ragged_john
diff --git a/src/server/scripts/EasternKingdoms/dun_morogh.cpp b/src/server/scripts/EasternKingdoms/dun_morogh.cpp
index 4c47cc8bbb8..c170529aa45 100644
--- a/src/server/scripts/EasternKingdoms/dun_morogh.cpp
+++ b/src/server/scripts/EasternKingdoms/dun_morogh.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_narm_faulk
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_narm_faulk
diff --git a/src/server/scripts/EasternKingdoms/duskwood.cpp b/src/server/scripts/EasternKingdoms/duskwood.cpp
index 89c0ebe4213..3dcf9a01f6a 100644
--- a/src/server/scripts/EasternKingdoms/duskwood.cpp
+++ b/src/server/scripts/EasternKingdoms/duskwood.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 kb_z
- * 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Quest Support:8735
SDCategory: Duskwood
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
# at_twilight_grove
diff --git a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp
index 0c1d3e9072c..32091439b1f 100644
--- a/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/eastern_plaguelands.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -28,7 +30,7 @@ npc_darrowshire_spirit
npc_tirion_fordring
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
//id8530 - cannibal ghoul
//id8531 - gibbering ghoul
diff --git a/src/server/scripts/EasternKingdoms/elwynn_forest.cpp b/src/server/scripts/EasternKingdoms/elwynn_forest.cpp
index b978507c557..8b56c16f8fa 100644
--- a/src/server/scripts/EasternKingdoms/elwynn_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/elwynn_forest.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_henze_faulk
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_henze_faulk
diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
index d1c7b9a6bfe..beb7acb3217 100644
--- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -29,7 +31,7 @@ npc_kelerun_bloodmourn
go_harbinger_second_trial
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/ghostlands.cpp b/src/server/scripts/EasternKingdoms/ghostlands.cpp
index 67e4e764959..b429bd03ec7 100644
--- a/src/server/scripts/EasternKingdoms/ghostlands.cpp
+++ b/src/server/scripts/EasternKingdoms/ghostlands.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -28,7 +30,7 @@ npc_rathis_tomber
npc_ranger_lilatha
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/hinterlands.cpp b/src/server/scripts/EasternKingdoms/hinterlands.cpp
index 59002936e14..12c5a3acda3 100644
--- a/src/server/scripts/EasternKingdoms/hinterlands.cpp
+++ b/src/server/scripts/EasternKingdoms/hinterlands.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ npc_00x09hl
npc_rinji
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
@@ -99,7 +101,7 @@ struct npc_00x09hlAI : public npc_escortAI
}
}
- void Aggro(Unit* pWho)
+ void EnterCombat(Unit* pWho)
{
if (pWho->GetEntry() == NPC_MARAUDING_OWL || pWho->GetEntry() == NPC_VILE_AMBUSHER)
return;
diff --git a/src/server/scripts/EasternKingdoms/ironforge.cpp b/src/server/scripts/EasternKingdoms/ironforge.cpp
index 5be56cc6c9c..da215065c6d 100644
--- a/src/server/scripts/EasternKingdoms/ironforge.cpp
+++ b/src/server/scripts/EasternKingdoms/ironforge.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_royal_historian_archesonus
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_royal_historian_archesonus
diff --git a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
index e5a70fcb1af..2bb7a723b06 100644
--- a/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
+++ b/src/server/scripts/EasternKingdoms/isle_of_queldanas.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ npc_converted_sentry
npc_greengill_slave
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_converted_sentry
diff --git a/src/server/scripts/EasternKingdoms/loch_modan.cpp b/src/server/scripts/EasternKingdoms/loch_modan.cpp
index e99a13fb675..1a5dafb8b17 100644
--- a/src/server/scripts/EasternKingdoms/loch_modan.cpp
+++ b/src/server/scripts/EasternKingdoms/loch_modan.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_mountaineer_pebblebitty
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_mountaineer_pebblebitty
diff --git a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
index 2f0b5821e86..ac02be30aa7 100644
--- a/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/redridge_mountains.cpp
@@ -1,18 +1,18 @@
-/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+/*
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* Script Data Start
@@ -21,7 +21,7 @@ SD%Complete: 100%
SDComment: Support for quest 219.
Script Data End */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
enum eCorporalKeeshan
diff --git a/src/server/scripts/EasternKingdoms/searing_gorge.cpp b/src/server/scripts/EasternKingdoms/searing_gorge.cpp
index 3ad51d033da..602fdeb2b59 100644
--- a/src/server/scripts/EasternKingdoms/searing_gorge.cpp
+++ b/src/server/scripts/EasternKingdoms/searing_gorge.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_lothos_riftwaker
npc_zamael_lunthistle
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_kalaran_windblade
diff --git a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp
index 390f083be48..b636f20bb44 100644
--- a/src/server/scripts/EasternKingdoms/silvermoon_city.cpp
+++ b/src/server/scripts/EasternKingdoms/silvermoon_city.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_blood_knight_stillblade
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*#######
# npc_blood_knight_stillblade
diff --git a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
index dd67f048f32..cd88974788e 100644
--- a/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/silverpine_forest.cpp
@@ -1,17 +1,19 @@
- /* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ /*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_deathstalker_erland
pyrewood_ambush
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
@@ -231,7 +233,7 @@ struct pyrewood_ambushAI : public ScriptedAI
}
}
- void Aggro(Unit * /*who*/){}
+ void EnterCombat(Unit * /*who*/){}
void JustSummoned(Creature *pSummoned)
{
diff --git a/src/server/scripts/EasternKingdoms/stormwind_city.cpp b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
index 36a7d116c3b..72d1a3b693b 100644
--- a/src/server/scripts/EasternKingdoms/stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/stormwind_city.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -32,7 +34,7 @@ npc_marzon_silent_blade
npc_lord_gregor_lescovar
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp
index 08d364d1808..503e27f993c 100644
--- a/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp
+++ b/src/server/scripts/EasternKingdoms/stranglethorn_vale.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
mob_yenniku
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## mob_yenniku
diff --git a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
index 8b6d73df704..94fb836ca35 100644
--- a/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/tirisfal_glades.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ go_mausoleum_door
go_mausoleum_trigger
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_calvin_montague
diff --git a/src/server/scripts/EasternKingdoms/undercity.cpp b/src/server/scripts/EasternKingdoms/undercity.cpp
index 22eb3241874..017dab5b63d 100644
--- a/src/server/scripts/EasternKingdoms/undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/undercity.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_highborne_lamenter
npc_parqual_fintallas
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_lady_sylvanas_windrunner
diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
index 778bcea0b1e..3dddf3a3f80 100644
--- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -28,7 +30,7 @@ npc_the_scourge_cauldron
npc_andorhal_tower
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/westfall.cpp b/src/server/scripts/EasternKingdoms/westfall.cpp
index 6f2f439f7fb..e706594dcf5 100644
--- a/src/server/scripts/EasternKingdoms/westfall.cpp
+++ b/src/server/scripts/EasternKingdoms/westfall.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ npc_daphne_stilwell
npc_defias_traitor
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/EasternKingdoms/wetlands.cpp b/src/server/scripts/EasternKingdoms/wetlands.cpp
index 02f7abdf4c2..084b673dacd 100644
--- a/src/server/scripts/EasternKingdoms/wetlands.cpp
+++ b/src/server/scripts/EasternKingdoms/wetlands.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ npc_mikhail
npc_tapoke_slim_jahn
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
@@ -61,7 +63,7 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI
{
case 2:
if (me->HasStealthAura())
- me->RemoveAurasDueToSpell(SPELL_AURA_MOD_STEALTH);
+ me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
SetRun();
me->setFaction(FACTION_ENEMY);
@@ -69,7 +71,7 @@ struct npc_tapoke_slim_jahnAI : public npc_escortAI
}
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* /*pWho*/)
{
Player* pPlayer = GetPlayerForEscort();
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp
index 856b680e2e6..6c10644564d 100644
--- a/src/server/scripts/Examples/example_creature.cpp
+++ b/src/server/scripts/Examples/example_creature.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Short custom scripting example
SDCategory: Script Examples
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
// **** This script is designed as an example for others to build on ****
// **** Please modify whatever you'd like to as this script is only for developement ****
diff --git a/src/server/scripts/Examples/example_escort.cpp b/src/server/scripts/Examples/example_escort.cpp
index bf2b454bf8e..2b381c53451 100644
--- a/src/server/scripts/Examples/example_escort.cpp
+++ b/src/server/scripts/Examples/example_escort.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Script used for testing escortAI
SDCategory: Script Examples
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
enum eEnums
diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp
index e208722784a..b86f1ffacdb 100644
--- a/src/server/scripts/Examples/example_gossip_codebox.cpp
+++ b/src/server/scripts/Examples/example_gossip_codebox.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Show a codebox in gossip option
SDCategory: Script Examples
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include <cstring>
enum eEnums
diff --git a/src/server/scripts/Examples/example_misc.cpp b/src/server/scripts/Examples/example_misc.cpp
index 3c96cc0bae7..af17b922602 100644
--- a/src/server/scripts/Examples/example_misc.cpp
+++ b/src/server/scripts/Examples/example_misc.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Item, Areatrigger and other small code examples
SDCategory: Script Examples
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptMgr.h"
enum eSay
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
index a3fd42a0fe7..f217661871c 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "blackfathom_deeps.h"
#include "ScriptedEscortAI.h"
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h
index e8bbab9f105..25e3806c624 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/blackfathom_deeps.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_BFD_H
#define DEF_BFD_H
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp
index a4b7a160be8..9037fe25ff3 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_aku_mai.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blackfathom_deeps.h"
enum Spells
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp
index 374a526f098..2525f949f89 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_gelihast.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blackfathom_deeps.h"
enum Spells
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
index bd7e1014d1a..a8183971a98 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/boss_kelris.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "blackfathom_deeps.h"
enum Spells
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
index a485684e699..99ddd5cdd82 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Blackfathom Deeps
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blackfathom_deeps.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index 14ce4a59b37..e70eefe62d5 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -1,5 +1,21 @@
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "hyjal.h"
#include "hyjal_trash.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index 8e1fa378e07..04a838d9adb 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Doomfires not completely offlike due to core limitations for random m
SDCategory: Caverns of Time, Mount Hyjal
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "hyjal.h"
#include "SpellAuras.h"
#include "hyjal_trash.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
index 69e37f7f740..50b86c7fa30 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
@@ -1,5 +1,21 @@
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "hyjal.h"
#include "hyjal_trash.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
index b52d22842e3..2e9228b2f75 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
@@ -1,5 +1,21 @@
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "hyjal.h"
#include "hyjal_trash.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
index 7465b997117..28b32e19063 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
@@ -1,5 +1,21 @@
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "hyjal.h"
#include "hyjal_trash.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index 16a050939cc..4f524587525 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -1,17 +1,19 @@
- /* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ /*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_thrall
npc_tyrande_whisperwind
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "hyjalAI.h"
#define GOSSIP_ITEM_BEGIN_ALLY "My companions and I are with you, Lady Proudmoore."
@@ -105,7 +107,7 @@ bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uin
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- debug_log("TSCR: HyjalAI - Debug mode has been toggled");
+ sLog.outDebug("TSCR: HyjalAI - Debug mode has been toggled");
break;
}
return true;
@@ -175,7 +177,7 @@ bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 /*uiSe
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- debug_log("TSCR: HyjalAI - Debug mode has been toggled");
+ sLog.outDebug("TSCR: HyjalAI - Debug mode has been toggled");
break;
}
return true;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
index bfc9a54dfd9..6a57dc550fa 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_HYJAL_H
#define DEF_HYJAL_H
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 3c12b54f3f4..dbd0696631e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Caverns of Time, Mount Hyjal
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "hyjalAI.h"
#include "hyjal_trash.h"
#include "MapManager.h"
@@ -400,7 +402,7 @@ void hyjalAI::Reset()
pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
pInstance->SetData(DATA_RESET_TRASH_COUNT, 0);
}
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(ERROR_INST_DATA);
//Visibility
DoHide = true;
@@ -531,7 +533,7 @@ void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
if (!pInstance)
{
- error_log(ERROR_INST_DATA);
+ sLog.outError(ERROR_INST_DATA);
return;
}
InfernalCount = 0;//reset infernal count every new wave
@@ -561,7 +563,7 @@ void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
else
{
NextWaveTimer = 15000;
- debug_log("TSCR: HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
+ sLog.outDebug("TSCR: HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
}
}
else
@@ -605,7 +607,7 @@ uint32 hyjalAI::GetInstanceData(uint32 Event)
{
if (pInstance)
return pInstance->GetData(Event);
- else error_log(ERROR_INST_DATA);
+ else sLog.outError(ERROR_INST_DATA);
return 0;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
index 5c75465b7b4..245e719295a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef SC_HYJALAI_H
#define SC_HYJALAI_H
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index c4cf9ede397..dd889b9fee6 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -1,5 +1,21 @@
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "hyjal.h"
#include "hyjal_trash.h"
#include "hyjalAI.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h
index 21ee4bc06cc..b18fa74e6a4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.h
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef SC_HYJAL_TRASH_AI_H
#define SC_HYJAL_TRASH_AI_H
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index e89d518c5bc..65579498210 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -1,17 +1,19 @@
- /* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ /*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter
SDCategory: Caverns of Time, Mount Hyjal
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "hyjal.h"
#include "hyjal_trash.h"
@@ -248,7 +250,7 @@ struct instance_mount_hyjal : public ScriptedInstance
break;
}
- debug_log("TSCR: Instance Hyjal: Instance data updated for event %u (Data=%u)",type,data);
+ sLog.outDebug("TSCR: Instance Hyjal: Instance data updated for event %u (Data=%u)",type,data);
if (data == DONE)
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
index 287d3cf8e9b..7aa4b04a750 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_epoch.cpp
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/* Script Data Start
@@ -25,7 +24,7 @@ SDComment: TODO: Intro, consecutive attacks to a random target durin time wrap,
SDCategory:
Script Data End */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "culling_of_stratholme.h"
enum Spells
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
index 12cdf00f2a5..60a46159fa7 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "culling_of_stratholme.h"
enum Spells
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 a39f3289a5a..deabd11961f 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/* Script Data Start
SDName: Boss mal_ganis
@@ -27,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_mal_ganis' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "culling_of_stratholme.h"
enum Spells
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
index eba9733c745..4ab1c3023e6 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_meathook.cpp
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/* Script Data Start
SDName: Boss meathook
@@ -24,7 +23,7 @@ SDComment: It may need timer adjustment
SDCategory:
Script Data End */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "culling_of_stratholme.h"
enum Spells
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
index da1c8098517..98c8d34bb8a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/* Script Data Start
SDName: Boss salramm
@@ -27,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_salramm' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "culling_of_stratholme.h"
enum Spells
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 faaed2eb6db..4e340d13ea4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "culling_of_stratholme.h"
#include "ScriptedEscortAI.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
index 4278ad46500..2f1816e5221 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.h
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_CULLING_OF_STRATHOLME_H
#define DEF_CULLING_OF_STRATHOLME_H
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
index 73742a1e748..a64a0a03976 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "culling_of_stratholme.h"
#define MAX_ENCOUNTER 5
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
index 49cf7cd4433..e95c440a7aa 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_aeonus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Some spells not implemented
SDCategory: Caverns of Time, The Dark Portal
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "dark_portal.h"
enum eEnums
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 1f2b4a80612..4845a39f2fe 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: All abilities not implemented
SDCategory: Caverns of Time, The Dark Portal
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "dark_portal.h"
enum eEnums
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
index 04b4b020ead..61888422d60 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/boss_temporus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: More abilities need to be implemented
SDCategory: Caverns of Time, The Dark Portal
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "dark_portal.h"
enum eEnums
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
index b0432a9b57c..d0387eb5a34 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Dark_Portal
@@ -27,7 +29,7 @@ npc_time_rift
npc_saat
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "dark_portal.h"
#define SAY_ENTER -1269020 //where does this belong?
@@ -305,7 +307,7 @@ struct npc_time_riftAI : public ScriptedAI
mRiftWaveCount = 0;
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
- debug_log("TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
+ sLog.outDebug("TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
++mRiftWaveCount;
@@ -330,7 +332,7 @@ struct npc_time_riftAI : public ScriptedAI
if (me->IsNonMeleeSpellCasted(false))
return;
- debug_log("TSCR: npc_time_rift: not casting anylonger, i need to die.");
+ sLog.outDebug("TSCR: npc_time_rift: not casting anylonger, i need to die.");
me->setDeathState(JUST_DIED);
if (pInstance->GetData(TYPE_RIFT) == IN_PROGRESS)
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h
index 7bfd8c917d7..301c174accf 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
-* This program is free software licensed under GPL version 2
-* Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_DARKPORTAL_H
#define DEF_DARKPORTAL_H
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
index d1280230808..b68310b4a18 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/instance_dark_portal.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Instance_Dark_Portal
@@ -21,7 +23,7 @@ SDComment: Quest support: 9836, 10297. Currently in progress.
SDCategory: Caverns of Time, The Dark Portal
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "dark_portal.h"
#define MAX_ENCOUNTER 2
@@ -178,7 +180,7 @@ struct instance_dark_portal : public ScriptedInstance
{
if (data == IN_PROGRESS)
{
- debug_log("TSCR: Instance Dark Portal: Starting event.");
+ sLog.outDebug("TSCR: Instance Dark Portal: Starting event.");
InitWorldState();
m_auiEncounter[1] = IN_PROGRESS;
NextPortal_Timer = 15000;
@@ -187,7 +189,7 @@ struct instance_dark_portal : public ScriptedInstance
if (data == DONE)
{
//this may be completed further out in the post-event
- debug_log("TSCR: Instance Dark Portal: Event completed.");
+ sLog.outDebug("TSCR: Instance Dark Portal: Event completed.");
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
@@ -252,7 +254,7 @@ struct instance_dark_portal : public ScriptedInstance
if (entry == RIFT_BOSS)
entry = RandRiftBoss();
- debug_log("TSCR: Instance Dark Portal: Summoning rift boss entry %u.",entry);
+ sLog.outDebug("TSCR: Instance Dark Portal: Summoning rift boss entry %u.",entry);
Position pos;
me->GetRandomNearPosition(pos, 10.0f);
@@ -263,7 +265,7 @@ struct instance_dark_portal : public ScriptedInstance
if (Creature *summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000))
return summon;
- debug_log("TSCR: Instance Dark Portal: What just happened there? No boss, no loot, no fun...");
+ sLog.outDebug("TSCR: Instance Dark Portal: What just happened there? No boss, no loot, no fun...");
return NULL;
}
@@ -276,7 +278,7 @@ struct instance_dark_portal : public ScriptedInstance
if (tmp >= CurrentRiftId)
++tmp;
- debug_log("TSCR: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).",tmp,CurrentRiftId);
+ sLog.outDebug("TSCR: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).",tmp,CurrentRiftId);
CurrentRiftId = tmp;
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 91c9e274b83..013846e576a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_captain_skarloc.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing adds, missing waypoints to move up to Thrall once spawned + s
SDCategory: Caverns of Time, Old Hillsbrad Foothills
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "old_hillsbrad.h"
#define SAY_ENTER -1560000
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 2c2ad96ddb7..92e0ac31a2b 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing spawns pre-event, missing speech to be coordinated with rest
SDCategory: Caverns of Time, Old Hillsbrad Foothills
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "old_hillsbrad.h"
#define SAY_ENTER1 -1560013
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 dae0f5390b1..6fc67249925 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing proper code for patrolling area after being spawned. Script f
SDCategory: Caverns of Time, Old Hillsbrad Foothills
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "old_hillsbrad.h"
#include "ScriptedEscortAI.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
index fa0b7c14595..85536bacd7e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: If thrall escort fail, all parts will reset. In future, save sub-part
SDCategory: Caverns of Time, Old Hillsbrad Foothills
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "old_hillsbrad.h"
#define MAX_ENCOUNTER 6
@@ -71,7 +73,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
@@ -111,7 +113,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
if (!pPlayer)
{
- debug_log("TSCR: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
return;
}
@@ -127,7 +129,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
++mBarrelCount;
DoUpdateWorldState(WORLD_STATE_OH, mBarrelCount);
- debug_log("TSCR: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u",mBarrelCount);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u",mBarrelCount);
m_auiEncounter[0] = IN_PROGRESS;
@@ -148,7 +150,7 @@ struct instance_old_hillsbrad : public ScriptedInstance
{
++mThrallEventCount;
m_auiEncounter[1] = NOT_STARTED;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
m_auiEncounter[2] = NOT_STARTED;
m_auiEncounter[3] = NOT_STARTED;
m_auiEncounter[4] = NOT_STARTED;
@@ -161,29 +163,29 @@ struct instance_old_hillsbrad : public ScriptedInstance
m_auiEncounter[3] = data;
m_auiEncounter[4] = data;
m_auiEncounter[5] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
}
}
else
m_auiEncounter[1] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall escort event adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall escort event adjusted to data %u.",data);
break;
}
case TYPE_THRALL_PART1:
m_auiEncounter[2] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part I adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event part I adjusted to data %u.",data);
break;
case TYPE_THRALL_PART2:
m_auiEncounter[3] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part II adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event part II adjusted to data %u.",data);
break;
case TYPE_THRALL_PART3:
m_auiEncounter[4] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part III adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event part III adjusted to data %u.",data);
break;
case TYPE_THRALL_PART4:
m_auiEncounter[5] = data;
- debug_log("TSCR: Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.",data);
+ sLog.outDebug("TSCR: Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.",data);
break;
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index 08c63954db5..400fca670e2 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -1,17 +1,19 @@
- /* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ /*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_thrall_old_hillsbrad
npc_taretha
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "old_hillsbrad.h"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h
index 5c398cc2647..c775d5243f9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_OLD_HILLSBRAD_H
#define DEF_OLD_HILLSBRAD_H
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
index 6f6b9d1baa9..61cd06f0f1c 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Maraudon
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_WRATH 21807
#define SPELL_ENTANGLINGROOTS 12747
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
index d5b03ff218f..b7d89607857 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Maraudon
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_KNOCKAWAY 18670
#define SPELL_TRAMPLE 5568
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
index b49b1a5d71f..f2856e89fd1 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Maraudon
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_TOXICVOLLEY 21687
#define SPELL_UPPERCUT 22916
@@ -94,7 +96,7 @@ struct boss_noxxionAI : public ScriptedAI
//Adds_Timer
if (!Invisible && Adds_Timer <= diff)
{
- //Inturrupt any spell casting
+ //Interrupt any spell casting
//me->m_canMove = true;
me->InterruptNonMeleeSpells(false);
me->setFaction(35);
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
index 963863e89c8..9bd8735f4d2 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Maraudon
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_DUSTFIELD 21909
#define SPELL_BOULDER 21832
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
index 2d351d6c6a2..b346f848510 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
@@ -1,17 +1,18 @@
-/* Copyright (C) 2008 - 2010 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +26,7 @@ SDComment: <Known bugs>
SDCategory: Onyxia's Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "onyxias_lair.h"
enum eYells
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
index cfd66bf80f4..36a2712fe6d 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
@@ -1,17 +1,18 @@
-/* Copyright (C) 2008 - 2010 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +22,7 @@ SDComment:
SDCategory: Onyxia's Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "onyxias_lair.h"
struct instance_onyxias_lair : public ScriptedInstance
@@ -136,7 +137,7 @@ struct instance_onyxias_lair : public ScriptedInstance
{
m_bAchievManyWhelpsHandleIt = false;
m_uiManyWhelpsCounter = 0;
- m_uiOnyxiaLiftoffTimer = 10*IN_MILISECONDS;
+ m_uiOnyxiaLiftoffTimer = 10*IN_MILLISECONDS;
}
break;
case DATA_SHE_DEEP_BREATH_MORE:
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
index cadd5b5a2d5..9eccc6c42d1 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
@@ -1,17 +1,18 @@
-/* Copyright (C) 2008 - 2010 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_ONYXIAS_LAIR_H
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 711c4f0b2c1..4157903bf75 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Razorfen Downs
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1129000
#define SAY_SUMMON60 -1129001
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
index 04904f08a57..6e67569f6d8 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "razorfen_downs.h"
#define MAX_ENCOUNTER 1
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
index 3e8f4049a37..3eed9ee07f9 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_henry_stern
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "razorfen_downs.h"
/*###
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h
index a67b4223c4a..53f33eb5cea 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.h
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 DEF_RAZORFEN_DOWNS_H
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
index 8a92d3d4d89..691462e595d 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Razorfen Kraul
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "razorfen_kraul.h"
#define WARD_KEEPERS_NR 2
@@ -53,7 +55,7 @@ struct instance_razorfen_kraul : public ScriptedInstance
return plr;
}
}
- debug_log("TSCR: Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("TSCR: Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index 8470fa6c7ac..a2aa56fb2d2 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_willix
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "razorfen_kraul.h"
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h
index e2219986f63..3944a3300be 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.h
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_RAZORFEN_KRAUL_H
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp
index f6dc75558c8..9e1c4e1af53 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: VERIFY SCRIPT
SDCategory: Ruins of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ruins_of_ahnqiraj.h"
/*
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
index 86a2c559543..d8f6bece646 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Place Holder
SDCategory: Ruins of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ruins_of_ahnqiraj.h"
enum Yells
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
index 44f11bf4b60..c1dba225462 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_kurinnaxx.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: VERIFY SCRIPT AND SQL
SDCategory: Ruins of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ruins_of_ahnqiraj.h"
enum Spells
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
index 1882adc8fbb..361bb149ce7 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: TODO: Adjust timer, correct Stone phase buff
SDCategory: Ruins of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ruins_of_ahnqiraj.h"
enum Emotes
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
index 57ba8d9da7f..9b4f0430c4a 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Place holder
SDCategory: Ruins of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ruins_of_ahnqiraj.h"
enum Yells
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
index 5be60dc0ca0..3346e57685f 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Place Holder
SDCategory: Ruins of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ruins_of_ahnqiraj.h"
enum Yells
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
index ba7471bdbd2..26ac218e298 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Place holder
SDCategory: Ruins of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ruins_of_ahnqiraj.h"
#define MAX_ENCOUNTER 6
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
index 33fd75d557a..89fc66e686d 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_RUINS_OF_AHNQIRAJ_H
#define DEF_RUINS_OF_AHNQIRAJ_H
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
index f6e3b0c741b..fe7a66ddb1f 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_bug_trio.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "temple_of_ahnqiraj.h"
#define SPELL_CLEAVE 26350
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 3e42d16be3a..40314e012e8 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Darkglare tracking issue
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "temple_of_ahnqiraj.h"
/*
@@ -168,7 +170,7 @@ struct eye_of_cthunAI : public Scripted_NoMovementAI
{
pInst = c->GetInstanceData();
if (!pInst)
- error_log("TSCR: No Instance eye_of_cthunAI");
+ sLog.outError("TSCR: No Instance eye_of_cthunAI");
}
ScriptedInstance* pInst;
@@ -460,7 +462,7 @@ struct cthunAI : public Scripted_NoMovementAI
pInst = c->GetInstanceData();
if (!pInst)
- error_log("TSCR: No Instance eye_of_cthunAI");
+ sLog.outError("TSCR: No Instance eye_of_cthunAI");
}
ScriptedInstance* pInst;
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
index 32d5ec1c3df..5bcc9598ebf 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: sound not implemented
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SOUND_SENTENCE_YOU 8588
#define SOUND_SERVE_TO 8589
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
index f0e3a425edd..468d535c48a 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define EMOTE_GENERIC_FRENZY_KILL -1000001
#define EMOTE_GENERIC_BERSERK -1000004
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
index 1dd642c38f4..7a07c8f81a3 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: No model for submerging. Currently just invisible.
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "temple_of_ahnqiraj.h"
#define SPELL_SWEEP 26103
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
index 282a25b7215..18bd1af71a5 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1531008
#define SAY_SLAY -1531009
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index 7e52bed750c..06b753bd5f5 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Mind Control buggy.
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "temple_of_ahnqiraj.h"
#include "Group.h"
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
index 73f17485f7f..39938d64dc5 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "temple_of_ahnqiraj.h"
#include "WorldPacket.h"
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
index f5e71a35bae..a6cb13c5348 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: place holder
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_POISON_SHOCK 25993
#define SPELL_POISONBOLT_VOLLEY 25991
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 1125a0c8623..9f105e27a1d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "temple_of_ahnqiraj.h"
struct instance_temple_of_ahnqiraj : public ScriptedInstance
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
index 074f9ed68ae..e0ce8834b6d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/mob_anubisath_sentinel.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Shadow storm is not properly implemented in core it should only pTarg
SDCategory: Temple of Ahn'Qiraj
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "WorldPacket.h"
#include "Item.h"
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
index 5d545ed7c74..143747e5b9d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_TEMPLE_OF_AHNQIRAJ_H
#define DEF_TEMPLE_OF_AHNQIRAJ_H
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
index 287b5db6d57..6edcf9b72cf 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Everything seems to work, still need some checking
SDCategory: Wailing Caverns
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "wailing_caverns.h"
#define MAX_ENCOUNTER 9
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index 544c119fc93..18efcbfdd04 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Wailing Caverns
@@ -24,7 +26,7 @@ EndScriptData */
/* ContentData
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "wailing_caverns.h"
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h
index 6ef1a673c59..9d69bf6947c 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_WAILING_CAVERNS_H
#define DEF_WAILING_CAVERNS_H
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
index 530ef30f44c..458111e464e 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define NPC_GAHZRILLA 7273
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index 2ca053c23b6..2b02146a6dc 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ npc_sergeant_bly
npc_weegli_blastfuse
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_sergeant_bly
diff --git a/src/server/scripts/Kalimdor/ashenvale.cpp b/src/server/scripts/Kalimdor/ashenvale.cpp
index 13e8f442048..2d1b39de980 100644
--- a/src/server/scripts/Kalimdor/ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/ashenvale.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Ashenvale
@@ -26,7 +28,7 @@ npc_torek
npc_ruul_snowhoof
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*####
@@ -323,7 +325,7 @@ struct npc_muglashAI : public npc_escortAI
}
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* /*pWho*/)
{
if (HasEscortState(STATE_ESCORT_PAUSED))
{
diff --git a/src/server/scripts/Kalimdor/azshara.cpp b/src/server/scripts/Kalimdor/azshara.cpp
index 937afe0ae5d..656730f687f 100644
--- a/src/server/scripts/Kalimdor/azshara.cpp
+++ b/src/server/scripts/Kalimdor/azshara.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -28,7 +30,7 @@ mob_rizzle_sprysprocket
mob_depth_charge
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "World.h"
#include "WorldPacket.h"
diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
index d31eaa9e84b..ca35b48b970 100644
--- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
@@ -1,17 +1,19 @@
- /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ /*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -32,7 +34,7 @@ go_ravager_cage
npc_death_ravager
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include <cmath>
@@ -512,7 +514,7 @@ struct npc_geezleAI : public ScriptedAI
else
(*itr)->Respawn();
}
- } else error_log("SD2 ERROR: FlagList is empty!");
+ } else sLog.outError("SD2 ERROR: FlagList is empty!");
}
void UpdateAI(const uint32 diff)
@@ -667,6 +669,67 @@ CreatureAI* GetAI_npc_death_ravagerAI(Creature* pCreature)
return new npc_death_ravagerAI(pCreature);
}
+/*########
+## Quest: The Prophecy of Akida
+########*/
+enum BristlelimbCage
+{
+ QUEST_THE_PROPHECY_OF_AKIDA = 9544,
+ NPC_STILLPINE_CAPITIVE = 17375,
+ GO_BRISTELIMB_CAGE = 181714,
+ CAPITIVE_SAY_1 = -1000474,
+ CAPITIVE_SAY_2 = -1000475,
+ CAPITIVE_SAY_3 = -1000476
+};
+
+
+struct npc_stillpine_capitiveAI : public ScriptedAI
+{
+ npc_stillpine_capitiveAI(Creature *c) : ScriptedAI(c){}
+
+ uint32 FleeTimer;
+
+ void Reset()
+ {
+ FleeTimer = 0;
+ GameObject* cage = me->FindNearestGameObject(GO_BRISTELIMB_CAGE, 5.0f);
+ if(cage)
+ cage->ResetDoorOrButton();
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(FleeTimer)
+ {
+ if(FleeTimer <= diff)
+ me->ForcedDespawn();
+ else FleeTimer -= diff;
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_stillpine_capitiveAI(Creature* pCreature)
+{
+ return new npc_stillpine_capitiveAI(pCreature);
+}
+
+bool go_bristlelimb_cage(Player* pPlayer, GameObject* pGo)
+{
+ if(pPlayer->GetQuestStatus(QUEST_THE_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE)
+ {
+ Creature* pCreature = pGo->FindNearestCreature(NPC_STILLPINE_CAPITIVE, 5.0f, true);
+ if(pCreature)
+ {
+ DoScriptText(RAND(CAPITIVE_SAY_1, CAPITIVE_SAY_2, CAPITIVE_SAY_3), pCreature, pPlayer);
+ pCreature->GetMotionMaster()->MoveFleeing(pPlayer, 3500);
+ pPlayer->KilledMonsterCredit(pCreature->GetEntry(), pCreature->GetGUID());
+ CAST_AI(npc_stillpine_capitiveAI, pCreature->AI())->FleeTimer = 3500;
+ return false;
+ }
+ }
+ return true;
+}
+
void AddSC_azuremyst_isle()
{
Script *newscript;
@@ -714,5 +777,15 @@ void AddSC_azuremyst_isle()
newscript->Name="go_ravager_cage";
newscript->pGOHello = &go_ravager_cage;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_stillpine_capitive";
+ newscript->GetAI = &GetAI_npc_stillpine_capitiveAI;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="go_bristlelimb_cage";
+ newscript->pGOHello = &go_bristlelimb_cage;
+ newscript->RegisterSelf();
}
diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
index 108d03b8976..9e8c7bbe563 100644
--- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ mob_webbed_creature
npc_captured_sunhawk_agent
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## mob_webbed_creature
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
index 8aeedfa199e..b8b40e3c510 100644
--- a/src/server/scripts/Kalimdor/boss_azuregos.cpp
+++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Teleport not included, spell reflect not effecting dots (Core problem
SDCategory: Azshara
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_TELEPORT -1000100
diff --git a/src/server/scripts/Kalimdor/darkshore.cpp b/src/server/scripts/Kalimdor/darkshore.cpp
index 26b42a86422..8cdb8990dbd 100644
--- a/src/server/scripts/Kalimdor/darkshore.cpp
+++ b/src/server/scripts/Kalimdor/darkshore.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_prospector_remtravel
npc_threshwackonator
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp
index 6b3ec8071dd..f9f79ffc917 100644
--- a/src/server/scripts/Kalimdor/desolace.cpp
+++ b/src/server/scripts/Kalimdor/desolace.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_aged_dying_ancient_kodo
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
enum eDyingKodo
diff --git a/src/server/scripts/Kalimdor/durotar.cpp b/src/server/scripts/Kalimdor/durotar.cpp
index 9ca6074cad3..fd2ed655f05 100644
--- a/src/server/scripts/Kalimdor/durotar.cpp
+++ b/src/server/scripts/Kalimdor/durotar.cpp
@@ -1,22 +1,23 @@
-/* Copyright (C) 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
##Quest 5441: Lazy Peons
diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
index a80c514eed7..a5190cbdd30 100644
--- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -31,7 +33,7 @@ npc_private_hendel
npc_cassa_crimsonwing - handled by npc_taxi
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## mobs_risen_husk_spirit
diff --git a/src/server/scripts/Kalimdor/felwood.cpp b/src/server/scripts/Kalimdor/felwood.cpp
index 01da356a63e..66757e0de36 100644
--- a/src/server/scripts/Kalimdor/felwood.cpp
+++ b/src/server/scripts/Kalimdor/felwood.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npcs_riverbreeze_and_silversky
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npcs_riverbreeze_and_silversky
diff --git a/src/server/scripts/Kalimdor/feralas.cpp b/src/server/scripts/Kalimdor/feralas.cpp
index 2a87de1a67c..86117e80616 100644
--- a/src/server/scripts/Kalimdor/feralas.cpp
+++ b/src/server/scripts/Kalimdor/feralas.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Quest support: 3520, 2767, Special vendor Gregan Brewspewer
SDCategory: Feralas
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index 16c78f20812..4fe0b3a5333 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -29,7 +31,7 @@ npc_clintar_spirit
npc_clintar_dreamwalker
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Kalimdor/mulgore.cpp b/src/server/scripts/Kalimdor/mulgore.cpp
index c87e5e36dad..ff06012cbf6 100644
--- a/src/server/scripts/Kalimdor/mulgore.cpp
+++ b/src/server/scripts/Kalimdor/mulgore.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_kyle_frenzied
npc_plains_vision
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Kalimdor/orgrimmar.cpp b/src/server/scripts/Kalimdor/orgrimmar.cpp
index 71fa4381e9d..5dd273d9be4 100644
--- a/src/server/scripts/Kalimdor/orgrimmar.cpp
+++ b/src/server/scripts/Kalimdor/orgrimmar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_shenthul
npc_thrall_warchief
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_neeru_fireblade
diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp
index 6383284011f..75c4e8d1158 100644
--- a/src/server/scripts/Kalimdor/silithus.cpp
+++ b/src/server/scripts/Kalimdor/silithus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npcs_rutgar_and_frankal
quest_a_pawn_on_the_eternal_pawn
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*###
## npc_highlord_demitrian
diff --git a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
index 6e627948788..17ad95c2cee 100644
--- a/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/stonetalon_mountains.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ npc_braug_dimspirit
npc_kaya_flathoof
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Kalimdor/tanaris.cpp b/src/server/scripts/Kalimdor/tanaris.cpp
index bb82dea64cf..7ef9e5039d9 100644
--- a/src/server/scripts/Kalimdor/tanaris.cpp
+++ b/src/server/scripts/Kalimdor/tanaris.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -31,7 +33,7 @@ npc_OOX17
npc_tooga
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
diff --git a/src/server/scripts/Kalimdor/teldrassil.cpp b/src/server/scripts/Kalimdor/teldrassil.cpp
index 1607ab904a8..a6659dcd6d9 100644
--- a/src/server/scripts/Kalimdor/teldrassil.cpp
+++ b/src/server/scripts/Kalimdor/teldrassil.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_mist
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedFollowerAI.h"
/*####
diff --git a/src/server/scripts/Kalimdor/the_barrens.cpp b/src/server/scripts/Kalimdor/the_barrens.cpp
index 04daac96877..901e3b8b923 100644
--- a/src/server/scripts/Kalimdor/the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/the_barrens.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -30,7 +32,7 @@ npc_twiggy_flathead
npc_wizzlecrank_shredder
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
@@ -123,7 +125,7 @@ struct npc_giltharesAI : public npc_escortAI
}
}
- void Aggro(Unit* pWho)
+ void EnterCombat(Unit* pWho)
{
//not always use
if (rand()%4)
diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp
index 3f54a62dd0b..6aded229ddd 100644
--- a/src/server/scripts/Kalimdor/thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/thousand_needles.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -30,7 +32,7 @@ go_panther_cage
npc_enraged_panther
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*#####
diff --git a/src/server/scripts/Kalimdor/thunder_bluff.cpp b/src/server/scripts/Kalimdor/thunder_bluff.cpp
index 288f00946f0..71c2c174fc7 100644
--- a/src/server/scripts/Kalimdor/thunder_bluff.cpp
+++ b/src/server/scripts/Kalimdor/thunder_bluff.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Quest support: 925
SDCategory: Thunder Bluff
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*#####
# npc_cairne_bloodhoof
diff --git a/src/server/scripts/Kalimdor/ungoro_crater.cpp b/src/server/scripts/Kalimdor/ungoro_crater.cpp
index 2be4a95eb4b..19181ba570f 100644
--- a/src/server/scripts/Kalimdor/ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/ungoro_crater.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Ungoro Crater
@@ -26,7 +28,7 @@ npc_a-me
npc_ringo
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
diff --git a/src/server/scripts/Kalimdor/winterspring.cpp b/src/server/scripts/Kalimdor/winterspring.cpp
index a284f32aeaa..c07f80b7c91 100644
--- a/src/server/scripts/Kalimdor/winterspring.cpp
+++ b/src/server/scripts/Kalimdor/winterspring.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_rivern_frostwind
npc_witch_doctor_mauari
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_lorax
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
index 4113885b6f4..d936d6a8c90 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 DEF_AZJOL_NERUB_H
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index 6de6578f7bb..65c649c4225 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "azjol_nerub.h"
//SQL: UPDATE creature_template SET mechanic_immune_mask = 1073741823 WHERE name like "anub'arak%";
@@ -118,10 +117,10 @@ struct boss_anub_arakAI : public ScriptedAI
void Reset()
{
- uiCarrionBeetlesTimer = 8*IN_MILISECONDS;
- uiLeechingSwarmTimer = 20*IN_MILISECONDS;
- uiImpaleTimer = 9*IN_MILISECONDS;
- uiPoundTimer = 15*IN_MILISECONDS;
+ uiCarrionBeetlesTimer = 8*IN_MILLISECONDS;
+ uiLeechingSwarmTimer = 20*IN_MILLISECONDS;
+ uiImpaleTimer = 9*IN_MILLISECONDS;
+ uiPoundTimer = 15*IN_MILLISECONDS;
uiPhase = PHASE_MELEE;
uiUndergroundPhase = 0;
@@ -145,7 +144,7 @@ struct boss_anub_arakAI : public ScriptedAI
Position targetPos;
pTarget->GetPosition(&targetPos);
- if (TempSummon* pImpaleTarget = me->SummonCreature(CREATURE_IMPALE_TARGET, targetPos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 6*IN_MILISECONDS))
+ if (TempSummon* pImpaleTarget = me->SummonCreature(CREATURE_IMPALE_TARGET, targetPos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 6*IN_MILLISECONDS))
{
uiImpaleTarget = pImpaleTarget->GetGUID();
pImpaleTarget->SetReactState(REACT_PASSIVE);
@@ -184,7 +183,7 @@ struct boss_anub_arakAI : public ScriptedAI
{
if (Creature *pImpaleTarget = DoSummonImpaleTarget(target))
pImpaleTarget->CastSpell(pImpaleTarget, SPELL_IMPALE_SHAKEGROUND, true);
- uiImpaleTimer = 3*IN_MILISECONDS;
+ uiImpaleTimer = 3*IN_MILLISECONDS;
uiImpalePhase = IMPALE_PHASE_ATTACK;
}
break;
@@ -195,13 +194,13 @@ struct boss_anub_arakAI : public ScriptedAI
pImpaleTarget->RemoveAurasDueToSpell(SPELL_IMPALE_SHAKEGROUND);
}
uiImpalePhase = IMPALE_PHASE_DMG;
- uiImpaleTimer = 1*IN_MILISECONDS;
+ uiImpaleTimer = 1*IN_MILLISECONDS;
break;
case IMPALE_PHASE_DMG:
if (Creature* pImpaleTarget = Unit::GetCreature(*me, uiImpaleTarget))
me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_IMPALE_DMG, SPELL_IMPALE_DMG_H), true);
uiImpalePhase = IMPALE_PHASE_TARGET;
- uiImpaleTimer = 9*IN_MILISECONDS;
+ uiImpaleTimer = 9*IN_MILLISECONDS;
break;
}
} else uiImpaleTimer -= diff;
@@ -275,12 +274,12 @@ struct boss_anub_arakAI : public ScriptedAI
bVenomancerSummoned = false;
bDatterSummoned = false;
- uiUndergroundTimer = 40*IN_MILISECONDS;
- uiVenomancerTimer = 25*IN_MILISECONDS;
- uiDatterTimer = 32*IN_MILISECONDS;
+ uiUndergroundTimer = 40*IN_MILLISECONDS;
+ uiVenomancerTimer = 25*IN_MILLISECONDS;
+ uiDatterTimer = 32*IN_MILLISECONDS;
uiImpalePhase = 0;
- uiImpaleTimer = 9*IN_MILISECONDS;
+ uiImpaleTimer = 9*IN_MILLISECONDS;
DoCast(me, SPELL_SUBMERGE, false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
@@ -299,13 +298,13 @@ struct boss_anub_arakAI : public ScriptedAI
{
bChanneling = true;
DoCastVictim(SPELL_CARRION_BEETLES);
- uiCarrionBeetlesTimer = 25*IN_MILISECONDS;
+ uiCarrionBeetlesTimer = 25*IN_MILLISECONDS;
} else uiCarrionBeetlesTimer -= diff;
if (uiLeechingSwarmTimer <= diff)
{
DoCast(me, SPELL_LEECHING_SWARM, true);
- uiLeechingSwarmTimer = 19*IN_MILISECONDS;
+ uiLeechingSwarmTimer = 19*IN_MILLISECONDS;
} else uiLeechingSwarmTimer -= diff;
if (uiPoundTimer <= diff)
@@ -315,7 +314,7 @@ struct boss_anub_arakAI : public ScriptedAI
if (Creature *pImpaleTarget = DoSummonImpaleTarget(target))
me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false);
}
- uiPoundTimer = 16.5*IN_MILISECONDS;
+ uiPoundTimer = 16.5*IN_MILLISECONDS;
} else uiPoundTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
index 0fc4e87d7c5..7b8a81013be 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@@ -29,7 +28,7 @@
* Hadronox to make his way to you. When Hadronox enters the main room, she will web the doors, and no more non-elites will spawn.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "azjol_nerub.h"
enum Spells
@@ -72,12 +71,12 @@ struct boss_hadronoxAI : public ScriptedAI
me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 9.0f);
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 9.0f);
- uiAcidTimer = urand(10*IN_MILISECONDS,14*IN_MILISECONDS);
- uiLeechTimer = urand(3*IN_MILISECONDS,9*IN_MILISECONDS);
- uiPierceTimer = urand(1*IN_MILISECONDS,3*IN_MILISECONDS);
- uiGrabTimer = urand(15*IN_MILISECONDS,19*IN_MILISECONDS);
- uiDoorsTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
- uiCheckDistanceTimer = 2*IN_MILISECONDS;
+ uiAcidTimer = urand(10*IN_MILLISECONDS,14*IN_MILLISECONDS);
+ uiLeechTimer = urand(3*IN_MILLISECONDS,9*IN_MILLISECONDS);
+ uiPierceTimer = urand(1*IN_MILLISECONDS,3*IN_MILLISECONDS);
+ uiGrabTimer = urand(15*IN_MILLISECONDS,19*IN_MILLISECONDS);
+ uiDoorsTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
+ uiCheckDistanceTimer = 2*IN_MILLISECONDS;
if (pInstance && (pInstance->GetData(DATA_HADRONOX_EVENT) != DONE && !bFirstTime))
pInstance->SetData(DATA_HADRONOX_EVENT, FAIL);
@@ -122,7 +121,7 @@ struct boss_hadronoxAI : public ScriptedAI
me->GetRespawnCoord(x,y,z);
if (uiCheckDistanceTimer <= uiDiff)
- uiCheckDistanceTimer = 5*IN_MILISECONDS;
+ uiCheckDistanceTimer = 5*IN_MILLISECONDS;
else
{
uiCheckDistanceTimer -= uiDiff;
@@ -153,7 +152,7 @@ struct boss_hadronoxAI : public ScriptedAI
if (uiPierceTimer <= diff)
{
DoCast(me->getVictim(), SPELL_PIERCE_ARMOR);
- uiPierceTimer = 8*IN_MILISECONDS;
+ uiPierceTimer = 8*IN_MILLISECONDS;
} else uiPierceTimer -= diff;
if (uiAcidTimer <= diff)
@@ -161,7 +160,7 @@ struct boss_hadronoxAI : public ScriptedAI
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_ACID_CLOUD);
- uiAcidTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiAcidTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiAcidTimer -= diff;
if (uiLeechTimer <= diff)
@@ -169,7 +168,7 @@ struct boss_hadronoxAI : public ScriptedAI
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_LEECH_POISON);
- uiLeechTimer = urand(11*IN_MILISECONDS,14*IN_MILISECONDS);
+ uiLeechTimer = urand(11*IN_MILLISECONDS,14*IN_MILLISECONDS);
} else uiLeechTimer -= diff;
if (uiGrabTimer <= diff)
@@ -177,13 +176,13 @@ struct boss_hadronoxAI : public ScriptedAI
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself.
DoCast(pTarget, SPELL_WEB_GRAB);
- uiGrabTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiGrabTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiGrabTimer -= diff;
if (uiDoorsTimer <= diff)
{
//DoCast(me, RAND(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS));
- uiDoorsTimer = urand(30*IN_MILISECONDS,60*IN_MILISECONDS);
+ uiDoorsTimer = urand(30*IN_MILLISECONDS,60*IN_MILLISECONDS);
} else uiDoorsTimer -= diff;
DoMeleeAttackIfReady();
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 4863bdcb032..9680863acad 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
@@ -1,26 +1,25 @@
/*
- * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Comment: Find in the future best timers and the event is not implemented.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "azjol_nerub.h"
enum Spells
@@ -107,8 +106,8 @@ struct boss_krik_thirAI : public ScriptedAI
void Reset()
{
- uiMindFlayTimer = 15*IN_MILISECONDS;
- uiCurseFatigueTimer = 12*IN_MILISECONDS;
+ uiMindFlayTimer = 15*IN_MILLISECONDS;
+ uiCurseFatigueTimer = 12*IN_MILLISECONDS;
if (pInstance)
pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, NOT_STARTED);
@@ -118,7 +117,7 @@ struct boss_krik_thirAI : public ScriptedAI
{
DoScriptText(SAY_AGGRO, me);
Summon();
- uiSummonTimer = 15*IN_MILISECONDS;
+ uiSummonTimer = 15*IN_MILLISECONDS;
if (pInstance)
pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, IN_PROGRESS);
@@ -126,22 +125,22 @@ struct boss_krik_thirAI : public ScriptedAI
void Summon()
{
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
- me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[4],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[5],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[6],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
+ me->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7],TEMPSUMMON_TIMED_DESPAWN,25*IN_MILLISECONDS);
}
void UpdateAI(const uint32 diff)
@@ -152,13 +151,13 @@ struct boss_krik_thirAI : public ScriptedAI
if (uiSummonTimer <= diff)
{
Summon();
- uiSummonTimer = 15*IN_MILISECONDS;
+ uiSummonTimer = 15*IN_MILLISECONDS;
} else uiSummonTimer -= diff;
if (uiMindFlayTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MIND_FLAY);
- uiMindFlayTimer = 15*IN_MILISECONDS;
+ uiMindFlayTimer = 15*IN_MILLISECONDS;
} else uiMindFlayTimer -= diff;
if (uiCurseFatigueTimer <= diff)
@@ -170,7 +169,7 @@ struct boss_krik_thirAI : public ScriptedAI
DoCast(pTarget, SPELL_CURSE_OF_FATIGUE);
DoCast(pTarget_1, SPELL_CURSE_OF_FATIGUE);
- uiCurseFatigueTimer = 10*IN_MILISECONDS;
+ uiCurseFatigueTimer = 10*IN_MILLISECONDS;
} else uiCurseFatigueTimer -= diff;
if (!me->HasAura(SPELL_FRENZY) && HealthBelowPct(10))
@@ -237,8 +236,8 @@ struct npc_anub_ar_skirmisherAI : public ScriptedAI
void Reset()
{
- uiChargeTimer = 11*IN_MILISECONDS;
- uiBackstabTimer = 7*IN_MILISECONDS;
+ uiChargeTimer = 11*IN_MILLISECONDS;
+ uiBackstabTimer = 7*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -254,13 +253,13 @@ struct npc_anub_ar_skirmisherAI : public ScriptedAI
me->AddThreat(pTarget,1.0f);
DoCast(pTarget, SPELL_CHARGE, true);
}
- uiChargeTimer = 15*IN_MILISECONDS;
+ uiChargeTimer = 15*IN_MILLISECONDS;
} else uiChargeTimer -= diff;
if (uiBackstabTimer <= diff)
{
DoCast(me->getVictim(), SPELL_BACKSTAB);
- uiBackstabTimer = 12*IN_MILISECONDS;
+ uiBackstabTimer = 12*IN_MILLISECONDS;
} else uiBackstabTimer -= diff;
DoMeleeAttackIfReady();
@@ -277,8 +276,8 @@ struct npc_anub_ar_shadowcasterAI : public ScriptedAI
void Reset()
{
- uiShadowBoltTimer = 6*IN_MILISECONDS;
- uiShadowNovaTimer = 15*IN_MILISECONDS;
+ uiShadowBoltTimer = 6*IN_MILLISECONDS;
+ uiShadowNovaTimer = 15*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -290,13 +289,13 @@ struct npc_anub_ar_shadowcasterAI : public ScriptedAI
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_SHADOW_BOLT, true);
- uiShadowBoltTimer = 15*IN_MILISECONDS;
+ uiShadowBoltTimer = 15*IN_MILLISECONDS;
} else uiShadowBoltTimer -= diff;
if (uiShadowNovaTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOW_NOVA, true);
- uiShadowNovaTimer = 17*IN_MILISECONDS;
+ uiShadowNovaTimer = 17*IN_MILLISECONDS;
} else uiShadowNovaTimer -= diff;
DoMeleeAttackIfReady();
@@ -312,8 +311,8 @@ struct npc_anub_ar_warriorAI : public ScriptedAI
void Reset()
{
- uiCleaveTimer = 11*IN_MILISECONDS;
- uiStrikeTimer = 6*IN_MILISECONDS;
+ uiCleaveTimer = 11*IN_MILLISECONDS;
+ uiStrikeTimer = 6*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -324,13 +323,13 @@ struct npc_anub_ar_warriorAI : public ScriptedAI
if (uiStrikeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_STRIKE, true);
- uiStrikeTimer = 15*IN_MILISECONDS;
+ uiStrikeTimer = 15*IN_MILLISECONDS;
} else uiStrikeTimer -= diff;
if (uiCleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE, true);
- uiCleaveTimer = 17*IN_MILISECONDS;
+ uiCleaveTimer = 17*IN_MILLISECONDS;
} else uiCleaveTimer -= diff;
DoMeleeAttackIfReady();
@@ -348,8 +347,8 @@ struct npc_watcher_gashraAI : public ScriptedAI
void Reset()
{
- uiWebWrapTimer = 11*IN_MILISECONDS;
- uiInfectedBiteTimer = 4*IN_MILISECONDS;
+ uiWebWrapTimer = 11*IN_MILLISECONDS;
+ uiInfectedBiteTimer = 4*IN_MILLISECONDS;
}
void EnterCombat(Unit* /*who*/)
@@ -366,13 +365,13 @@ struct npc_watcher_gashraAI : public ScriptedAI
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_WEB_WRAP, true);
- uiWebWrapTimer = 17*IN_MILISECONDS;
+ uiWebWrapTimer = 17*IN_MILLISECONDS;
} else uiWebWrapTimer -= diff;
if (uiInfectedBiteTimer <= diff)
{
DoCast(me->getVictim(), SPELL_INFECTED_BITE, true);
- uiInfectedBiteTimer = 15*IN_MILISECONDS;
+ uiInfectedBiteTimer = 15*IN_MILLISECONDS;
} else uiInfectedBiteTimer -= diff;
DoMeleeAttackIfReady();
@@ -389,9 +388,9 @@ struct npc_watcher_narjilAI : public ScriptedAI
void Reset()
{
- uiWebWrapTimer = 11*IN_MILISECONDS;
- uiInfectedBiteTimer = 4*IN_MILISECONDS;
- uiBindingWebsTimer = 17*IN_MILISECONDS;
+ uiWebWrapTimer = 11*IN_MILLISECONDS;
+ uiInfectedBiteTimer = 4*IN_MILLISECONDS;
+ uiBindingWebsTimer = 17*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -403,19 +402,19 @@ struct npc_watcher_narjilAI : public ScriptedAI
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_WEB_WRAP, true);
- uiWebWrapTimer = 15*IN_MILISECONDS;
+ uiWebWrapTimer = 15*IN_MILLISECONDS;
} else uiWebWrapTimer -= diff;
if (uiInfectedBiteTimer <= diff)
{
DoCast(me->getVictim(), SPELL_INFECTED_BITE, true);
- uiInfectedBiteTimer = 11*IN_MILISECONDS;
+ uiInfectedBiteTimer = 11*IN_MILLISECONDS;
} else uiInfectedBiteTimer -= diff;
if (uiBindingWebsTimer <= diff)
{
DoCast(me->getVictim(), SPELL_BLINDING_WEBS, true);
- uiBindingWebsTimer = 17*IN_MILISECONDS;
+ uiBindingWebsTimer = 17*IN_MILLISECONDS;
} else uiBindingWebsTimer -= diff;
DoMeleeAttackIfReady();
@@ -432,9 +431,9 @@ struct npc_watcher_silthikAI : public ScriptedAI
void Reset()
{
- uiWebWrapTimer = 11*IN_MILISECONDS;
- uiInfectedBiteTimer = 4*IN_MILISECONDS;
- uiPoisonSprayTimer = 15*IN_MILISECONDS;
+ uiWebWrapTimer = 11*IN_MILLISECONDS;
+ uiInfectedBiteTimer = 4*IN_MILLISECONDS;
+ uiPoisonSprayTimer = 15*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -447,19 +446,19 @@ struct npc_watcher_silthikAI : public ScriptedAI
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_WEB_WRAP, true);
- uiWebWrapTimer = 15*IN_MILISECONDS;
+ uiWebWrapTimer = 15*IN_MILLISECONDS;
} else uiWebWrapTimer -= diff;
if (uiInfectedBiteTimer <= diff)
{
DoCast(me->getVictim(), SPELL_INFECTED_BITE, true);
- uiInfectedBiteTimer = 15*IN_MILISECONDS;
+ uiInfectedBiteTimer = 15*IN_MILLISECONDS;
} else uiInfectedBiteTimer -= diff;
if (uiPoisonSprayTimer <= diff)
{
DoCast(me->getVictim(), SPELL_POSION_SPRAY, true);
- uiPoisonSprayTimer = 17*IN_MILISECONDS;
+ uiPoisonSprayTimer = 17*IN_MILLISECONDS;
} else uiPoisonSprayTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp
index d12dbd604ba..90f96b21af3 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "azjol_nerub.h"
#define MAX_ENCOUNTER 3
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h
index 240ad77c74d..f324344228a 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/ahnkahet.h
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 DEF_AHNKAHET_H
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
index 51c4bce0c2d..ee5dc6b297f 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp
@@ -1,26 +1,25 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/*
* Comment: Find correct mushrooms spell to make them visible - buffs of the mushrooms not ever applied to the users...
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ahnkahet.h"
enum Spells
@@ -61,9 +60,9 @@ struct boss_amanitarAI : public ScriptedAI
void Reset()
{
- uiRootTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS);
- uiBashTimer = urand(10*IN_MILISECONDS,14*IN_MILISECONDS);
- uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiRootTimer = urand(5*IN_MILLISECONDS,9*IN_MILLISECONDS);
+ uiBashTimer = urand(10*IN_MILLISECONDS,14*IN_MILLISECONDS);
+ uiBoltTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
uiSpawnTimer = 0;
me->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
@@ -107,9 +106,9 @@ struct boss_amanitarAI : public ScriptedAI
Position pos;
victim->GetPosition(&pos);
me->GetRandomNearPosition(pos, float(urand(5,80)));
- me->SummonCreature(NPC_POISONOUS_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILISECONDS);
+ me->SummonCreature(NPC_POISONOUS_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILLISECONDS);
me->GetRandomNearPosition(pos, float(urand(5,80)));
- me->SummonCreature(NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILISECONDS);
+ me->SummonCreature(NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILLISECONDS);
}
}
}
@@ -123,27 +122,27 @@ struct boss_amanitarAI : public ScriptedAI
if (uiSpawnTimer <= diff)
{
SpawnAdds();
- uiSpawnTimer = urand(35*IN_MILISECONDS,40*IN_MILISECONDS);
+ uiSpawnTimer = urand(35*IN_MILLISECONDS,40*IN_MILLISECONDS);
} else uiSpawnTimer -= diff;
if (uiRootTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_ENTANGLING_ROOTS);
- uiRootTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiRootTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiRootTimer -= diff;
if (uiBashTimer <= diff)
{
DoCastVictim(SPELL_BASH);
- uiBashTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiBashTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiBashTimer -= diff;
if (uiBoltTimer <= diff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_VENOM_BOLT_VOLLEY);
- uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiBoltTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiBoltTimer -= diff;
DoMeleeAttackIfReady();
@@ -165,7 +164,7 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AURA, true);
uiAuraTimer = 0;
- uiDeathTimer = 30*IN_MILISECONDS;
+ uiDeathTimer = 30*IN_MILLISECONDS;
}
void JustDied(Unit *killer)
@@ -191,7 +190,7 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
{
DoCast(me, SPELL_POISONOUS_MUSHROOM_VISUAL_AREA, true);
DoCast(me, SPELL_POISONOUS_MUSHROOM_POISON_CLOUD, false);
- uiAuraTimer = 7*IN_MILISECONDS;
+ uiAuraTimer = 7*IN_MILLISECONDS;
} else uiAuraTimer -= diff;
}
if (uiDeathTimer <= diff)
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
index 2215d91c749..05c868708f2 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_elder_nadox.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "ahnkahet.h"
bool DeadAhnkaharGuardian; // needed for achievement: Respect Your Elders(2038)
@@ -76,13 +75,13 @@ struct boss_elder_nadoxAI : public ScriptedAI
void Reset()
{
- uiPlagueTimer = 13*IN_MILISECONDS;
- uiRagueTimer = 20*IN_MILISECONDS;
+ uiPlagueTimer = 13*IN_MILLISECONDS;
+ uiRagueTimer = 20*IN_MILLISECONDS;
- uiSwarmerSpawnTimer = 10*IN_MILISECONDS;
- uiGuardSpawnTimer = 25*IN_MILISECONDS;
+ uiSwarmerSpawnTimer = 10*IN_MILLISECONDS;
+ uiGuardSpawnTimer = 25*IN_MILLISECONDS;
- uiEnragueTimer = 5*IN_MILISECONDS;
+ uiEnragueTimer = 5*IN_MILLISECONDS;
DeadAhnkaharGuardian = false;
bGuardSpawned = false;
@@ -124,7 +123,7 @@ struct boss_elder_nadoxAI : public ScriptedAI
if (uiPlagueTimer <= diff)
{
DoCast(me->getVictim(), SPELL_BROOD_PLAGUE);
- uiPlagueTimer = 15*IN_MILISECONDS;
+ uiPlagueTimer = 15*IN_MILLISECONDS;
} else uiPlagueTimer -= diff;
if (IsHeroic())
@@ -133,7 +132,7 @@ struct boss_elder_nadoxAI : public ScriptedAI
if (Creature *pSwarmer = me->FindNearestCreature(MOB_AHNKAHAR_SWARMER, 35))
{
DoCast(pSwarmer, H_SPELL_BROOD_RAGE, true);
- uiRagueTimer = 15*IN_MILISECONDS;
+ uiRagueTimer = 15*IN_MILLISECONDS;
}
} else uiRagueTimer -= diff;
@@ -144,7 +143,7 @@ struct boss_elder_nadoxAI : public ScriptedAI
if (urand(1,3) == 3) // 33% chance of dialog
DoScriptText(RAND(SAY_EGG_SAC_1,SAY_EGG_SAC_2), me);
- uiSwarmerSpawnTimer = 10*IN_MILISECONDS;
+ uiSwarmerSpawnTimer = 10*IN_MILLISECONDS;
} else uiSwarmerSpawnTimer -= diff;
if (!bGuardSpawned && uiGuardSpawnTimer <= diff)
@@ -165,7 +164,7 @@ struct boss_elder_nadoxAI : public ScriptedAI
if (!me->IsNonMeleeSpellCasted(false))
DoCast(me, SPELL_ENRAGE, true);
- uiEnragueTimer = 5*IN_MILISECONDS;
+ uiEnragueTimer = 5*IN_MILLISECONDS;
} else uiEnragueTimer -= diff;
DoMeleeAttackIfReady();
@@ -197,7 +196,7 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI
{
if (me->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY) //magic numbers are bad!
DoCast(me, SPELL_GUARDIAN_AURA, true);
- uiSprintTimer = 10*IN_MILISECONDS;
+ uiSprintTimer = 10*IN_MILLISECONDS;
}
void JustDied(Unit * /*killer*/)
@@ -230,7 +229,7 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI
if (uiSprintTimer <= diff)
{
DoCast(me, SPELL_SPRINT);
- uiSprintTimer = 25*IN_MILISECONDS;
+ uiSprintTimer = 25*IN_MILLISECONDS;
} else uiSprintTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
index 16c291d6484..0e58217c584 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_herald_volazj.cpp
@@ -1,26 +1,25 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/*
* Comment: Missing AI for Twisted Visages
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ahnkahet.h"
enum Spells
@@ -125,9 +124,6 @@ struct boss_volazjAI : public ScriptedAI
// Summon clone
if (Unit *summon = me->SummonCreature(MOB_TWISTED_VISAGE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,0))
{
- // required for correct visual
- // Fixme: allow mirror image query to send other guid to get rid of minion status
- summon->SetUInt64Value(UNIT_FIELD_CREATEDBY, plr->GetGUID());
// clone
plr->CastSpell(summon, SPELL_CLONE_PLAYER, true);
// set phase
@@ -150,9 +146,9 @@ struct boss_volazjAI : public ScriptedAI
void Reset()
{
- uiMindFlayTimer = 8*IN_MILISECONDS;
- uiShadowBoltVolleyTimer = 5*IN_MILISECONDS;
- uiShiverTimer = 15*IN_MILISECONDS;
+ uiMindFlayTimer = 8*IN_MILLISECONDS;
+ uiShadowBoltVolleyTimer = 5*IN_MILLISECONDS;
+ uiShiverTimer = 15*IN_MILLISECONDS;
if (pInstance)
{
@@ -276,20 +272,20 @@ struct boss_volazjAI : public ScriptedAI
if (uiMindFlayTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MIND_FLAY);
- uiMindFlayTimer = 20*IN_MILISECONDS;
+ uiMindFlayTimer = 20*IN_MILLISECONDS;
} else uiMindFlayTimer -= diff;
if (uiShadowBoltVolleyTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SHADOW_BOLT_VOLLEY);
- uiShadowBoltVolleyTimer = 5*IN_MILISECONDS;
+ uiShadowBoltVolleyTimer = 5*IN_MILLISECONDS;
} else uiShadowBoltVolleyTimer -= diff;
if (uiShiverTimer <= diff)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_SHIVER);
- uiShiverTimer = 15*IN_MILISECONDS;
+ uiShiverTimer = 15*IN_MILLISECONDS;
} else uiShiverTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
index eb8046f63cd..3ea1c0bda4f 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -1,26 +1,25 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 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/>.
+ */
/*
* Comment: Complete - BUT THE TRIGGER NEEDS DATA WHETHER THE PRISON OF TALDARAM IS OFFLINE !
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ahnkahet.h"
enum Yells
@@ -90,11 +89,11 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
void Reset()
{
- uiOpFerTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS);
+ uiOpFerTimer = urand(15*IN_MILLISECONDS,20*IN_MILLISECONDS);
- uiCycloneTimer = 3*IN_MILISECONDS;
- uiBoltTimer = 7*IN_MILISECONDS;
- uiThunderTimer = 12*IN_MILISECONDS;
+ uiCycloneTimer = 3*IN_MILLISECONDS;
+ uiBoltTimer = 7*IN_MILLISECONDS;
+ uiThunderTimer = 12*IN_MILLISECONDS;
bOpFerok = false;
bOpFerokFail = false;
@@ -248,7 +247,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) == IN_PROGRESS) OpferRufen();
bOnGround = false;
- uiOpFerTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiOpFerTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
}
void OpferRufen()
@@ -304,7 +303,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
if (uiCycloneTimer <= diff)
{
DoCast(me, SPELL_CYCLONE_STRIKE, false);
- uiCycloneTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiCycloneTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiCycloneTimer -= diff;
if (uiBoltTimer <= diff)
@@ -312,7 +311,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
me->CastSpell(pTarget, DUNGEON_MODE(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false);
- uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiBoltTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiBoltTimer -= diff;
if (uiThunderTimer <= diff)
@@ -320,7 +319,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
me->CastSpell(pTarget, DUNGEON_MODE(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false);
- uiThunderTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiThunderTimer = urand(15*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiThunderTimer -= diff;
if (uiOpFerTimer <= diff)
@@ -352,7 +351,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI
return;
bWalking = false;
- bCheckTimer = 2*IN_MILISECONDS;
+ bCheckTimer = 2*IN_MILLISECONDS;
if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS)
{
@@ -467,7 +466,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
}
}
- bCheckTimer = 2*IN_MILISECONDS;
+ bCheckTimer = 2*IN_MILLISECONDS;
} else bCheckTimer -= diff;
//Return since we have no target
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
index 93a66ccfbca..995fccd8611 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_prince_taldaram.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ahnkahet.h"
enum Spells
@@ -98,10 +97,10 @@ struct boss_taldaramAI : public ScriptedAI
void Reset()
{
- uiBloodthirstTimer = 10*IN_MILISECONDS;
- uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS);
- uiEmbraceTimer = 20*IN_MILISECONDS;
- uiFlamesphereTimer = 5*IN_MILISECONDS;
+ uiBloodthirstTimer = 10*IN_MILLISECONDS;
+ uiVanishTimer = urand(25*IN_MILLISECONDS,35*IN_MILLISECONDS);
+ uiEmbraceTimer = 20*IN_MILLISECONDS;
+ uiFlamesphereTimer = 5*IN_MILLISECONDS;
uiEmbraceTakenDamage = 0;
Phase = NORMAL;
uiPhaseTimer = 0;
@@ -130,7 +129,7 @@ struct boss_taldaramAI : public ScriptedAI
Creature* pSpheres[3];
//DoCast(me, SPELL_FLAME_SPHERE_SUMMON_1);
- pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS);
+ pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS);
Unit *pSphereTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
if (pSphereTarget && pSpheres[0])
{
@@ -143,9 +142,9 @@ struct boss_taldaramAI : public ScriptedAI
if (IsHeroic())
{
//DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_1);
- pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS);
+ pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS);
//DoCast(me, H_SPELL_FLAME_SPHERE_SUMMON_2);
- pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS);
+ pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILLISECONDS);
if (pSphereTarget && pSpheres[1] && pSpheres[2])
{
float angle,x,y;
@@ -181,7 +180,7 @@ struct boss_taldaramAI : public ScriptedAI
me->SetSpeed(MOVE_WALK, 1.0f, true);
me->GetMotionMaster()->MoveChase(me->getVictim());
Phase = FEEDING;
- uiPhaseTimer = 20*IN_MILISECONDS;
+ uiPhaseTimer = 20*IN_MILLISECONDS;
break;
case FEEDING:
Phase = NORMAL;
@@ -192,15 +191,15 @@ struct boss_taldaramAI : public ScriptedAI
if (uiBloodthirstTimer <= diff)
{
DoCast(me->getVictim(), SPELL_BLOODTHIRST);
- uiBloodthirstTimer = 10*IN_MILISECONDS;
+ uiBloodthirstTimer = 10*IN_MILLISECONDS;
} else uiBloodthirstTimer -= diff;
if (uiFlamesphereTimer <= diff)
{
DoCast(me, SPELL_CONJURE_FLAME_SPHERE);
Phase = CASTING_FLAME_SPHERES;
- uiPhaseTimer = 3*IN_MILISECONDS + diff;
- uiFlamesphereTimer = 15*IN_MILISECONDS;
+ uiPhaseTimer = 3*IN_MILLISECONDS + diff;
+ uiFlamesphereTimer = 15*IN_MILLISECONDS;
} else uiFlamesphereTimer -= diff;
if (uiVanishTimer <= diff)
@@ -228,7 +227,7 @@ struct boss_taldaramAI : public ScriptedAI
uiEmbraceTarget = pEmbraceTarget->GetGUID();
}
- uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS);
+ uiVanishTimer = urand(25*IN_MILLISECONDS,35*IN_MILLISECONDS);
} else uiVanishTimer -= diff;
DoMeleeAttackIfReady();
@@ -339,7 +338,7 @@ struct mob_taldaram_flamesphereAI : public ScriptedAI
DoCast(me, SPELL_FLAME_SPHERE_VISUAL);
DoCast(me, SPELL_FLAME_SPHERE_SPAWN_EFFECT);
DoCast(me, SPELL_FLAME_SPHERE_PERIODIC);
- uiDespawnTimer = 10*IN_MILISECONDS;
+ uiDespawnTimer = 10*IN_MILLISECONDS;
}
void EnterCombat(Unit * /*who*/) {}
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
index 4e6e3ec8c9f..7d3fa8d5fba 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "ahnkahet.h"
/* Ahn'kahet encounters:
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 c33ea69fa2d..adc3449862b 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -23,7 +22,7 @@ SDComment: AI for Argent Soldiers are not implemented. AI from bosses need more
SDCategory: Trial of the Champion
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "trial_of_the_champion.h"
#include "ScriptedEscortAI.h"
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 e1f4586ca6c..14b44079719 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -23,7 +22,7 @@ SDComment: missing yells. not sure about timers.
SDCategory: Trial of the Champion
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "trial_of_the_champion.h"
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
index 4bf8143a210..53b71a5760e 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_grand_champions.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Is missing the ai to make the npcs look for a new mount and use it.
SDCategory: Trial Of the Champion
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "Vehicle.h"
#include "trial_of_the_champion.h"
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
index 04b671ec11c..45cab67c0f4 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -23,7 +22,7 @@ SDComment:
SDCategory: Trial Of the Champion
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "trial_of_the_champion.h"
#define MAX_ENCOUNTER 4
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 090b64b96cc..0ebe340a691 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
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -27,7 +26,7 @@ EndScriptData */
npc_announcer_toc5
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "trial_of_the_champion.h"
#include "Vehicle.h"
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 221c7c0412f..5533a4a8690 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
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
-* This program is free software licensed under GPL version 2
-* Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_TOC_H
#define DEF_TOC_H
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp
index ba64a4748dd..c03d3df15d8 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_dred.cpp
@@ -1,26 +1,25 @@
/*
- * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Comment: MAYBE need more improve the "Raptor Call".
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "drak_tharon_keep.h"
enum eSpells
@@ -71,12 +70,12 @@ struct boss_dredAI : public ScriptedAI
pInstance->SetData(DATA_KING_DRED_ACHIEV, 0);
}
- uiBellowingRoarTimer = 33*IN_MILISECONDS;
- uiGrievousBiteTimer = 20*IN_MILISECONDS;
- uiManglingSlashTimer = 18.5*IN_MILISECONDS;
- uiFearsomeRoarTimer = urand(10*IN_MILISECONDS,20*IN_MILISECONDS);
- uiPiercingSlashTimer = 17*IN_MILISECONDS;
- uiRaptorCallTimer = urand(20*IN_MILISECONDS,25*IN_MILISECONDS);
+ uiBellowingRoarTimer = 33*IN_MILLISECONDS;
+ uiGrievousBiteTimer = 20*IN_MILLISECONDS;
+ uiManglingSlashTimer = 18.5*IN_MILLISECONDS;
+ uiFearsomeRoarTimer = urand(10*IN_MILLISECONDS,20*IN_MILLISECONDS);
+ uiPiercingSlashTimer = 17*IN_MILLISECONDS;
+ uiRaptorCallTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS);
}
void EnterCombat(Unit* /*who*/)
@@ -94,31 +93,31 @@ struct boss_dredAI : public ScriptedAI
if (uiBellowingRoarTimer < diff)
{
DoCastAOE(SPELL_BELLOWING_ROAR, false);
- uiBellowingRoarTimer = 40*IN_MILISECONDS;
+ uiBellowingRoarTimer = 40*IN_MILLISECONDS;
} else uiBellowingRoarTimer -=diff;
if (uiGrievousBiteTimer < diff)
{
DoCastVictim(SPELL_GRIEVOUS_BITE ,false);
- uiGrievousBiteTimer = 20*IN_MILISECONDS;
+ uiGrievousBiteTimer = 20*IN_MILLISECONDS;
} else uiGrievousBiteTimer -=diff;
if (uiManglingSlashTimer < diff)
{
DoCastVictim(SPELL_MANGLING_SLASH,false);
- uiManglingSlashTimer = 20*IN_MILISECONDS;
+ uiManglingSlashTimer = 20*IN_MILLISECONDS;
} else uiManglingSlashTimer -=diff;
if (uiFearsomeRoarTimer < diff)
{
DoCastAOE(SPELL_FEARSOME_ROAR,false);
- uiFearsomeRoarTimer = urand(16*IN_MILISECONDS,18*IN_MILISECONDS);
+ uiFearsomeRoarTimer = urand(16*IN_MILLISECONDS,18*IN_MILLISECONDS);
} else uiFearsomeRoarTimer -=diff;
if (uiPiercingSlashTimer < diff)
{
DoCastVictim(SPELL_PIERCING_SLASH,false);
- uiPiercingSlashTimer = 20*IN_MILISECONDS;
+ uiPiercingSlashTimer = 20*IN_MILLISECONDS;
} else uiPiercingSlashTimer -=diff;
if (uiRaptorCallTimer < diff)
@@ -128,9 +127,9 @@ struct boss_dredAI : public ScriptedAI
float x,y,z;
me->GetClosePoint(x,y,z,me->GetObjectSize()/3,10.0f);
- me->SummonCreature(RAND(NPC_RAPTOR_1,NPC_RAPTOR_2),x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1*IN_MILISECONDS);
+ me->SummonCreature(RAND(NPC_RAPTOR_1,NPC_RAPTOR_2),x,y,z,0,TEMPSUMMON_DEAD_DESPAWN,1*IN_MILLISECONDS);
- uiRaptorCallTimer = urand(20*IN_MILISECONDS,25*IN_MILISECONDS);
+ uiRaptorCallTimer = urand(20*IN_MILLISECONDS,25*IN_MILLISECONDS);
} else uiRaptorCallTimer -=diff;
DoMeleeAttackIfReady();
@@ -214,7 +213,7 @@ struct npc_drakkari_scytheclawAI : public ScriptedAI
void Reset()
{
- uiRendTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiRendTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
}
void UpdateAI(const uint32 diff)
@@ -226,7 +225,7 @@ struct npc_drakkari_scytheclawAI : public ScriptedAI
if (uiRendTimer < diff)
{
DoCastVictim(SPELL_REND,false);
- uiRendTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiRendTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
}else uiRendTimer -=diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index 5e8792c352d..e8abb804417 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "drak_tharon_keep.h"
enum Spells
@@ -118,8 +117,8 @@ struct boss_novosAI : public Scripted_NoMovementAI
{
DoScriptText(SAY_AGGRO, me);
Phase = PHASE_1;
- uiCrystalHandlerTimer = 30*IN_MILISECONDS;
- uiTimer = 1*IN_MILISECONDS;
+ uiCrystalHandlerTimer = 30*IN_MILLISECONDS;
+ uiTimer = 1*IN_MILLISECONDS;
DoCast(SPELL_ARCANE_FIELD);
if (pInstance)
{
@@ -142,18 +141,18 @@ struct boss_novosAI : public Scripted_NoMovementAI
case PHASE_1:
if (uiTimer <= diff)
{
- Creature *pSummon = me->SummonCreature(RAND(CREATURE_FETID_TROLL_CORPSE,CREATURE_HULKING_CORPSE,CREATURE_RISEN_SHADOWCASTER), AddSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS);
+ Creature *pSummon = me->SummonCreature(RAND(CREATURE_FETID_TROLL_CORPSE,CREATURE_HULKING_CORPSE,CREATURE_RISEN_SHADOWCASTER), AddSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS);
pSummon->GetMotionMaster()->MovePoint(0, AddDestinyPoint);
//If spell is casted stops casting arcane field so no spell casting
//DoCast(me, SPELL_SUMMON_MINIONS);
- uiTimer = 3*IN_MILISECONDS;
+ uiTimer = 3*IN_MILLISECONDS;
} else uiTimer -= diff;
if (uiCrystalHandlerTimer <= diff)
{
DoScriptText(SAY_NECRO_ADD, me);
- Creature *pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS);
+ Creature *pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS);
pCrystalHandler->GetMotionMaster()->MovePoint(0, AddDestinyPoint);
- uiCrystalHandlerTimer = urand(20*IN_MILISECONDS,30*IN_MILISECONDS);
+ uiCrystalHandlerTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiCrystalHandlerTimer -= diff;
break;
case PHASE_2:
@@ -162,7 +161,7 @@ struct boss_novosAI : public Scripted_NoMovementAI
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, DUNGEON_MODE(RAND(SPELL_ARCANE_BLAST,SPELL_BLIZZARD,SPELL_FROSTBOLT,SPELL_WRATH_OF_MISERY),
RAND(H_SPELL_ARCANE_BLAST,H_SPELL_BLIZZARD,H_SPELL_FROSTBOLT,H_SPELL_WRATH_OF_MISERY)));
- uiTimer = urand(1*IN_MILISECONDS,3*IN_MILISECONDS);
+ uiTimer = urand(1*IN_MILLISECONDS,3*IN_MILLISECONDS);
} else uiTimer -= diff;
break;
}
@@ -208,7 +207,7 @@ struct boss_novosAI : public Scripted_NoMovementAI
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Phase = PHASE_2;
- uiTimer = 1*IN_MILISECONDS;
+ uiTimer = 1*IN_MILLISECONDS;
}
}
@@ -237,7 +236,7 @@ struct mob_crystal_handlerAI : public ScriptedAI
void Reset()
{
- uiFlashOfDarknessTimer = 5*IN_MILISECONDS;
+ uiFlashOfDarknessTimer = 5*IN_MILLISECONDS;
}
void JustDied(Unit* /*killer*/)
@@ -254,7 +253,7 @@ struct mob_crystal_handlerAI : public ScriptedAI
if (uiFlashOfDarknessTimer <= diff)
{
DoCast(me->getVictim(), DUNGEON_MODE(SPELL_FLASH_OF_DARKNESS,H_SPELL_FLASH_OF_DARKNESS));
- uiFlashOfDarknessTimer = 5*IN_MILISECONDS;
+ uiFlashOfDarknessTimer = 5*IN_MILLISECONDS;
} else uiFlashOfDarknessTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
index 1e60dfc6135..46121f49849 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_tharon_ja.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2008-2010 Trinity <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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "drak_tharon_keep.h"
enum Spells
@@ -86,10 +85,10 @@ struct boss_tharon_jaAI : public ScriptedAI
void Reset()
{
- uiPhaseTimer = 20*IN_MILISECONDS;
- uiCurseOfLifeTimer = 1*IN_MILISECONDS;
- uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS);
- uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS);
+ uiPhaseTimer = 20*IN_MILLISECONDS;
+ uiCurseOfLifeTimer = 1*IN_MILLISECONDS;
+ uiRainOfFireTimer = urand(14*IN_MILLISECONDS,18*IN_MILLISECONDS);
+ uiShadowVolleyTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS);
Phase = SKELETAL;
me->SetDisplayId(me->GetNativeDisplayId());
if (pInstance)
@@ -117,26 +116,26 @@ struct boss_tharon_jaAI : public ScriptedAI
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_CURSE_OF_LIFE);
- uiCurseOfLifeTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiCurseOfLifeTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else uiCurseOfLifeTimer -= diff;
if (uiShadowVolleyTimer < diff)
{
DoCastVictim(SPELL_SHADOW_VOLLEY);
- uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS);
+ uiShadowVolleyTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS);
} else uiShadowVolleyTimer -= diff;
if (uiRainOfFireTimer < diff)
{
DoCastAOE(SPELL_RAIN_OF_FIRE);
- uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS);
+ uiRainOfFireTimer = urand(14*IN_MILLISECONDS,18*IN_MILLISECONDS);
} else uiRainOfFireTimer -= diff;
if (uiPhaseTimer < diff)
{
DoCast(SPELL_DECAY_FLESH);
Phase = GOING_FLESH;
- uiPhaseTimer = 6*IN_MILISECONDS;
+ uiPhaseTimer = 6*IN_MILLISECONDS;
} else uiPhaseTimer -= diff;
DoMeleeAttackIfReady();
@@ -156,10 +155,10 @@ struct boss_tharon_jaAI : public ScriptedAI
pTemp->SetDisplayId(MODEL_SKELETON);
}
}
- uiPhaseTimer = 20*IN_MILISECONDS;
- uiLightningBreathTimer = urand(3*IN_MILISECONDS,4*IN_MILISECONDS);
- uiEyeBeamTimer = urand(4*IN_MILISECONDS,8*IN_MILISECONDS);
- uiPoisonCloudTimer = urand(6*IN_MILISECONDS,7*IN_MILISECONDS);
+ uiPhaseTimer = 20*IN_MILLISECONDS;
+ uiLightningBreathTimer = urand(3*IN_MILLISECONDS,4*IN_MILLISECONDS);
+ uiEyeBeamTimer = urand(4*IN_MILLISECONDS,8*IN_MILLISECONDS);
+ uiPoisonCloudTimer = urand(6*IN_MILLISECONDS,7*IN_MILLISECONDS);
Phase = FLESH;
} else uiPhaseTimer -= diff;
break;
@@ -168,27 +167,27 @@ struct boss_tharon_jaAI : public ScriptedAI
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_LIGHTNING_BREATH);
- uiLightningBreathTimer = urand(6*IN_MILISECONDS,7*IN_MILISECONDS);
+ uiLightningBreathTimer = urand(6*IN_MILLISECONDS,7*IN_MILLISECONDS);
} else uiLightningBreathTimer -= diff;
if (uiEyeBeamTimer < diff)
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_EYE_BEAM);
- uiEyeBeamTimer = urand(4*IN_MILISECONDS,6*IN_MILISECONDS);
+ uiEyeBeamTimer = urand(4*IN_MILLISECONDS,6*IN_MILLISECONDS);
} else uiEyeBeamTimer -= diff;
if (uiPoisonCloudTimer < diff)
{
DoCastAOE(SPELL_POISON_CLOUD);
- uiPoisonCloudTimer = urand(10*IN_MILISECONDS,12*IN_MILISECONDS);
+ uiPoisonCloudTimer = urand(10*IN_MILLISECONDS,12*IN_MILLISECONDS);
} else uiPoisonCloudTimer -= diff;
if (uiPhaseTimer < diff)
{
DoCast(SPELL_RETURN_FLESH);
Phase = GOING_SKELETAL;
- uiPhaseTimer = 6*IN_MILISECONDS;
+ uiPhaseTimer = 6*IN_MILLISECONDS;
} else uiPhaseTimer -= diff;
DoMeleeAttackIfReady();
break;
@@ -198,10 +197,10 @@ struct boss_tharon_jaAI : public ScriptedAI
DoScriptText(RAND(SAY_SKELETON_1,SAY_SKELETON_2), me);
me->DeMorph();
Phase = SKELETAL;
- uiPhaseTimer = 20*IN_MILISECONDS;
- uiCurseOfLifeTimer = 1*IN_MILISECONDS;
- uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS);
- uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS);
+ uiPhaseTimer = 20*IN_MILLISECONDS;
+ uiCurseOfLifeTimer = 1*IN_MILLISECONDS;
+ uiRainOfFireTimer = urand(14*IN_MILLISECONDS,18*IN_MILLISECONDS);
+ uiShadowVolleyTimer = urand(8*IN_MILLISECONDS,10*IN_MILLISECONDS);
std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList();
for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index 03eac73385d..4281ab53463 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -1,26 +1,25 @@
/*
- * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Comment: TODO: spawn troll waves
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "drak_tharon_keep.h"
enum Spells
@@ -77,12 +76,12 @@ struct boss_trollgoreAI : public ScriptedAI
void Reset()
{
- uiConsumeTimer = 15*IN_MILISECONDS;
- uiAuraCountTimer = 15.5*IN_MILISECONDS;
- uiCrushTimer = urand(1*IN_MILISECONDS,5*IN_MILISECONDS);
- uiInfectedWoundTimer = urand(60*IN_MILISECONDS,10*IN_MILISECONDS);
- uiExplodeCorpseTimer = 3*IN_MILISECONDS;
- uiSpawnTimer = urand(30*IN_MILISECONDS,40*IN_MILISECONDS);
+ uiConsumeTimer = 15*IN_MILLISECONDS;
+ uiAuraCountTimer = 15.5*IN_MILLISECONDS;
+ uiCrushTimer = urand(1*IN_MILLISECONDS,5*IN_MILLISECONDS);
+ uiInfectedWoundTimer = urand(60*IN_MILLISECONDS,10*IN_MILLISECONDS);
+ uiExplodeCorpseTimer = 3*IN_MILLISECONDS;
+ uiSpawnTimer = urand(30*IN_MILLISECONDS,40*IN_MILLISECONDS);
bAchiev = IsHeroic();
@@ -113,14 +112,14 @@ struct boss_trollgoreAI : public ScriptedAI
uint32 spawnNumber = urand(2,DUNGEON_MODE(3,5));
for (uint8 i = 0; i < spawnNumber; ++i)
DoSummon(RAND(NPC_DRAKKARI_INVADER_1,NPC_DRAKKARI_INVADER_2), AddSpawnPoint, 0, TEMPSUMMON_DEAD_DESPAWN);
- uiSpawnTimer = urand(30*IN_MILISECONDS,40*IN_MILISECONDS);
+ uiSpawnTimer = urand(30*IN_MILLISECONDS,40*IN_MILLISECONDS);
} else uiSpawnTimer -= diff;
if (uiConsumeTimer <= diff)
{
DoScriptText(SAY_CONSUME, me);
DoCast(SPELL_CONSUME);
- uiConsumeTimer = 15*IN_MILISECONDS;
+ uiConsumeTimer = 15*IN_MILLISECONDS;
} else uiConsumeTimer -= diff;
if (bAchiev)
@@ -133,20 +132,20 @@ struct boss_trollgoreAI : public ScriptedAI
if (uiCrushTimer <= diff)
{
DoCastVictim(SPELL_CRUSH);
- uiCrushTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
+ uiCrushTimer = urand(10*IN_MILLISECONDS,15*IN_MILLISECONDS);
} else uiCrushTimer -= diff;
if (uiInfectedWoundTimer <= diff)
{
DoCastVictim(SPELL_INFECTED_WOUND);
- uiInfectedWoundTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS);
+ uiInfectedWoundTimer = urand(25*IN_MILLISECONDS,35*IN_MILLISECONDS);
} else uiInfectedWoundTimer -= diff;
if (uiExplodeCorpseTimer <= diff)
{
DoCast(SPELL_CORPSE_EXPLODE);
DoScriptText(SAY_EXPLODE, me);
- uiExplodeCorpseTimer = urand(15*IN_MILISECONDS,19*IN_MILISECONDS);
+ uiExplodeCorpseTimer = urand(15*IN_MILLISECONDS,19*IN_MILLISECONDS);
} else uiExplodeCorpseTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
index 597971d17dd..11e6f1557db 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
+++ b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_DRAK_THARON_H
#define DEF_DRAK_THARON_H
diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
index 9f4d2ee52a2..2c36217755d 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "drak_tharon_keep.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
index 59db2842735..6ac11c81e2d 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_bronjahm.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "forge_of_souls.h"
/*
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 6811ba953e2..13d65619a13 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
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "forge_of_souls.h"
/*
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 5c85da69898..0e0c22c9b10 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "forge_of_souls.h"
enum Spells
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
index e0479eb4d2b..df2c682eaa1 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/forge_of_souls.h
@@ -1,17 +1,18 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_FORGE_OF_SOULS_H
diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
index 67a6cdb4579..074a9d40915 100644
--- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "forge_of_souls.h"
#define MAX_ENCOUNTER 2
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
index c9978faca6e..ddb6191c999 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_reflection.h"
enum Yells
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
index 95fb2737ce9..47af8fd19c0 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_reflection.h"
enum Yells
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 fb3d3d5d752..65f326e924f 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_reflection.h"
enum Yells
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
index 46ae0cb283c..0e4dc94b826 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
@@ -1,17 +1,18 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_HALLS_OF_REFLECTION_H
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
index 7a5d2479b7c..8a6ffb82fc2 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_reflection.h"
#define MAX_ENCOUNTER 3
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 25c78c4a0d3..e854c767f63 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_forgemaster_garfrost.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "pit_of_saron.h"
enum Yells
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
index 8b8b03a3d4e..961451051a7 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "pit_of_saron.h"
/*
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 55ffa0b4e4b..6f45c3ef76f 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "pit_of_saron.h"
/*
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
index 8512eca24c1..595b5d01228 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/instance_pit_of_saron.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "pit_of_saron.h"
#define MAX_ENCOUNTER 3
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
index bc53efc7033..b9b8504fcf0 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "pit_of_saron.h"
/***************************************SPELLS*************************************/
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
index 4a221d17518..98ee73a6fe8 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/pit_of_saron.h
@@ -1,17 +1,18 @@
-/* Copyright (C) 2006 - 2010 TrinityCore <https://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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_PIT_OF_SARON_H
diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
index 04603c68813..3bb998c7096 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp
@@ -1,26 +1,25 @@
/*
- * Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Comment: The event with the Living Mojos is not implemented, just is done that when one of the mojos around the boss take damage will make the boss enter in combat!
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "gundrak.h"
enum Spells
@@ -59,7 +58,7 @@ struct boss_drakkari_colossusAI : public ScriptedAI
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->clearUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT);
me->SetReactState(REACT_PASSIVE);
- MightyBlowTimer = 10*IN_MILISECONDS;
+ MightyBlowTimer = 10*IN_MILLISECONDS;
bHealth = false;
bHealth1 = false;
}
@@ -115,7 +114,7 @@ struct boss_drakkari_colossusAI : public ScriptedAI
if (MightyBlowTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MIGHTY_BLOW, true);
- MightyBlowTimer = 10*IN_MILISECONDS;
+ MightyBlowTimer = 10*IN_MILLISECONDS;
} else MightyBlowTimer -= diff;
if (!me->hasUnitState(UNIT_STAT_STUNNED))
@@ -153,7 +152,7 @@ struct boss_drakkari_elementalAI : public ScriptedAI
{
if (Creature *pColossus = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_DRAKKARI_COLOSSUS) : 0))
CAST_AI(boss_drakkari_colossusAI, pColossus->AI())->CreatureState(me, true);
- uiSurgeTimer = 7*IN_MILISECONDS;
+ uiSurgeTimer = 7*IN_MILLISECONDS;
bGoToColossus = false;
}
@@ -196,7 +195,7 @@ struct boss_drakkari_elementalAI : public ScriptedAI
if (uiSurgeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SURGE);
- uiSurgeTimer = 7*IN_MILISECONDS;
+ uiSurgeTimer = 7*IN_MILLISECONDS;
} else uiSurgeTimer -= diff;
DoMeleeAttackIfReady();
@@ -223,8 +222,8 @@ struct npc_living_mojoAI : public ScriptedAI
void Reset()
{
- uiMojoWaveTimer = 2*IN_MILISECONDS;
- uiMojoPuddleTimer = 7*IN_MILISECONDS;
+ uiMojoWaveTimer = 2*IN_MILLISECONDS;
+ uiMojoPuddleTimer = 7*IN_MILLISECONDS;
}
void EnterCombat(Unit* /*who*/)
@@ -268,13 +267,13 @@ struct npc_living_mojoAI : public ScriptedAI
if (uiMojoWaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MOJO_WAVE);
- uiMojoWaveTimer = 15*IN_MILISECONDS;
+ uiMojoWaveTimer = 15*IN_MILLISECONDS;
} else uiMojoWaveTimer -= diff;
if (uiMojoPuddleTimer <= diff)
{
DoCast(me->getVictim(), SPELL_MOJO_PUDDLE);
- uiMojoPuddleTimer = 18*IN_MILISECONDS;
+ uiMojoPuddleTimer = 18*IN_MILLISECONDS;
} else uiMojoPuddleTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp
index 3bf1a33da5a..8ddcc12ae49 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "gundrak.h"
enum Spells
@@ -48,10 +47,10 @@ struct boss_eckAI : public ScriptedAI
void Reset()
{
- uiBerserkTimer = urand(60*IN_MILISECONDS,90*IN_MILISECONDS); //60-90 secs according to wowwiki
- uiBiteTimer = 5*IN_MILISECONDS;
- uiSpitTimer = 10*IN_MILISECONDS;
- uiSpringTimer = 8*IN_MILISECONDS;
+ uiBerserkTimer = urand(60*IN_MILLISECONDS,90*IN_MILLISECONDS); //60-90 secs according to wowwiki
+ uiBiteTimer = 5*IN_MILLISECONDS;
+ uiSpitTimer = 10*IN_MILLISECONDS;
+ uiSpringTimer = 8*IN_MILLISECONDS;
bBerserk = false;
@@ -74,13 +73,13 @@ struct boss_eckAI : public ScriptedAI
if (uiBiteTimer <= diff)
{
DoCast(me->getVictim(), SPELL_ECK_BITE);
- uiBiteTimer = urand(8*IN_MILISECONDS,12*IN_MILISECONDS);
+ uiBiteTimer = urand(8*IN_MILLISECONDS,12*IN_MILLISECONDS);
} else uiBiteTimer -= diff;
if (uiSpitTimer <= diff)
{
DoCast(me->getVictim(), SPELL_ECK_SPIT);
- uiSpitTimer = urand(6*IN_MILISECONDS,14*IN_MILISECONDS);
+ uiSpitTimer = urand(6*IN_MILLISECONDS,14*IN_MILLISECONDS);
} else uiSpitTimer -= diff;
if (uiSpringTimer <= diff)
@@ -89,7 +88,7 @@ struct boss_eckAI : public ScriptedAI
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
{
DoCast(pTarget, RAND(SPELL_ECK_SPRING_1, SPELL_ECK_SPRING_2));
- uiSpringTimer = urand(5*IN_MILISECONDS,10*IN_MILISECONDS);
+ uiSpringTimer = urand(5*IN_MILLISECONDS,10*IN_MILLISECONDS);
}
} else uiSpringTimer -= diff;
@@ -142,7 +141,7 @@ struct npc_ruins_dwellerAI : public ScriptedAI
{
pInstance->SetData64(DATA_RUIN_DWELLER_DIED,me->GetGUID());
if (pInstance->GetData(DATA_ALIVE_RUIN_DWELLERS) == 0)
- me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILISECONDS);
+ me->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300*IN_MILLISECONDS);
}
}
};
diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
index c87a6600783..e90b244b118 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "gundrak.h"
//Spells
@@ -95,13 +94,13 @@ struct boss_gal_darahAI : public ScriptedAI
void Reset()
{
- uiStampedeTimer = 10*IN_MILISECONDS;
- uiWhirlingSlashTimer = 21*IN_MILISECONDS;
- uiPunctureTimer = 10*IN_MILISECONDS;
- uiEnrageTimer = 15*IN_MILISECONDS;
- uiImpalingChargeTimer = 21*IN_MILISECONDS;
- uiStompTimer = 25*IN_MILISECONDS;
- uiTransformationTimer = 9*IN_MILISECONDS;
+ uiStampedeTimer = 10*IN_MILLISECONDS;
+ uiWhirlingSlashTimer = 21*IN_MILLISECONDS;
+ uiPunctureTimer = 10*IN_MILLISECONDS;
+ uiEnrageTimer = 15*IN_MILLISECONDS;
+ uiImpalingChargeTimer = 21*IN_MILLISECONDS;
+ uiStompTimer = 25*IN_MILLISECONDS;
+ uiTransformationTimer = 9*IN_MILLISECONDS;
uiPhaseCounter = 0;
lImpaledPlayers.clear();
@@ -141,7 +140,7 @@ struct boss_gal_darahAI : public ScriptedAI
Phase = RHINO;
uiPhaseCounter = 0;
DoScriptText(SAY_TRANSFORM_1, me);
- uiTransformationTimer = 5*IN_MILISECONDS;
+ uiTransformationTimer = 5*IN_MILLISECONDS;
bStartOfTransformation = true;
me->clearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
me->SetReactState(REACT_AGGRESSIVE);
@@ -164,13 +163,13 @@ struct boss_gal_darahAI : public ScriptedAI
{
DoCast(me, SPELL_STAMPEDE);
DoScriptText(RAND(SAY_SUMMON_RHINO_1,SAY_SUMMON_RHINO_2,SAY_SUMMON_RHINO_3),me);
- uiStampedeTimer = 15*IN_MILISECONDS;
+ uiStampedeTimer = 15*IN_MILLISECONDS;
} else uiStampedeTimer -= diff;
if (uiWhirlingSlashTimer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLING_SLASH);
- uiWhirlingSlashTimer = 21*IN_MILISECONDS;
+ uiWhirlingSlashTimer = 21*IN_MILLISECONDS;
++uiPhaseCounter;
} else uiWhirlingSlashTimer -= diff;
}
@@ -184,7 +183,7 @@ struct boss_gal_darahAI : public ScriptedAI
Phase = TROLL;
uiPhaseCounter = 0;
DoScriptText(SAY_TRANSFORM_2, me);
- uiTransformationTimer = 9*IN_MILISECONDS;
+ uiTransformationTimer = 9*IN_MILLISECONDS;
bStartOfTransformation = true;
me->clearUnitState(UNIT_STAT_STUNNED|UNIT_STAT_ROOT);
me->SetReactState(REACT_AGGRESSIVE);
@@ -206,19 +205,19 @@ struct boss_gal_darahAI : public ScriptedAI
if (uiPunctureTimer <= diff)
{
DoCast(me->getVictim(), SPELL_PUNCTURE);
- uiPunctureTimer = 8*IN_MILISECONDS;
+ uiPunctureTimer = 8*IN_MILLISECONDS;
} else uiPunctureTimer -= diff;
if (uiEnrageTimer <= diff)
{
DoCast(me->getVictim(), SPELL_ENRAGE);
- uiEnrageTimer = 20*IN_MILISECONDS;
+ uiEnrageTimer = 20*IN_MILLISECONDS;
} else uiEnrageTimer -= diff;
if (uiStompTimer <= diff)
{
DoCast(me->getVictim(), SPELL_STOMP);
- uiStompTimer = 20*IN_MILISECONDS;
+ uiStompTimer = 20*IN_MILLISECONDS;
} else uiStompTimer -= diff;
if (uiImpalingChargeTimer <= diff)
@@ -228,7 +227,7 @@ struct boss_gal_darahAI : public ScriptedAI
DoCast(pTarget, SPELL_IMPALING_CHARGE);
lImpaledPlayers.insert(pTarget->GetGUID());
}
- uiImpalingChargeTimer = 31*IN_MILISECONDS;
+ uiImpalingChargeTimer = 31*IN_MILLISECONDS;
++uiPhaseCounter;
} else uiImpalingChargeTimer -= diff;
}
diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
index 84a7d8bc654..7a9278b2fde 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "gundrak.h"
enum eSpells
@@ -67,10 +66,10 @@ struct boss_moorabiAI : public ScriptedAI
void Reset()
{
- uiGroundTremorTimer = 18*IN_MILISECONDS;
- uiNumblingShoutTimer = 10*IN_MILISECONDS;
- uiDeterminedStabTimer = 20*IN_MILISECONDS;
- uiTransformationTImer = 12*IN_MILISECONDS;
+ uiGroundTremorTimer = 18*IN_MILLISECONDS;
+ uiNumblingShoutTimer = 10*IN_MILLISECONDS;
+ uiDeterminedStabTimer = 20*IN_MILLISECONDS;
+ uiTransformationTImer = 12*IN_MILLISECONDS;
bPhase = false;
if (pInstance)
@@ -105,7 +104,7 @@ struct boss_moorabiAI : public ScriptedAI
DoCast(me->getVictim(), SPELL_QUAKE, true);
else
DoCast(me->getVictim(), SPELL_GROUND_TREMOR, true);
- uiGroundTremorTimer = 10*IN_MILISECONDS;
+ uiGroundTremorTimer = 10*IN_MILLISECONDS;
} else uiGroundTremorTimer -= uiDiff;
if (uiNumblingShoutTimer <= uiDiff)
@@ -114,7 +113,7 @@ struct boss_moorabiAI : public ScriptedAI
DoCast(me->getVictim(), SPELL_NUMBING_ROAR, true);
else
DoCast(me->getVictim(), SPELL_NUMBING_SHOUT, true);
- uiNumblingShoutTimer = 10*IN_MILISECONDS;
+ uiNumblingShoutTimer = 10*IN_MILLISECONDS;
} else uiNumblingShoutTimer -=uiDiff;
if (uiDeterminedStabTimer <= uiDiff)
@@ -123,7 +122,7 @@ struct boss_moorabiAI : public ScriptedAI
DoCast(me->getVictim(), SPELL_DETERMINED_GORE);
else
DoCast(me->getVictim(), SPELL_DETERMINED_STAB, true);
- uiDeterminedStabTimer = 8*IN_MILISECONDS;
+ uiDeterminedStabTimer = 8*IN_MILLISECONDS;
} else uiDeterminedStabTimer -=uiDiff;
if (!bPhase && uiTransformationTImer <= uiDiff)
@@ -131,7 +130,7 @@ struct boss_moorabiAI : public ScriptedAI
DoScriptText(EMOTE_TRANSFORM, me);
DoScriptText(SAY_TRANSFORM, me);
DoCast(me, SPELL_TRANSFORMATION, false);
- uiTransformationTImer = 10*IN_MILISECONDS;
+ uiTransformationTImer = 10*IN_MILLISECONDS;
} else uiTransformationTImer -= uiDiff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index 1014beaeddd..47a55440b92 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "gundrak.h"
//Spells
@@ -86,10 +85,10 @@ struct boss_slad_ranAI : public ScriptedAI
void Reset()
{
- uiPoisonNovaTimer = 10*IN_MILISECONDS;
- uiPowerfullBiteTimer = 3*IN_MILISECONDS;
- uiVenomBoltTimer = 15*IN_MILISECONDS;
- uiSpawnTimer = 5*IN_MILISECONDS;
+ uiPoisonNovaTimer = 10*IN_MILLISECONDS;
+ uiPowerfullBiteTimer = 3*IN_MILLISECONDS;
+ uiVenomBoltTimer = 15*IN_MILLISECONDS;
+ uiSpawnTimer = 5*IN_MILLISECONDS;
uiPhase = 0;
lSummons.DespawnAll();
@@ -115,19 +114,19 @@ struct boss_slad_ranAI : public ScriptedAI
if (uiPoisonNovaTimer <= diff)
{
DoCast(me->getVictim(), SPELL_POISON_NOVA);
- uiPoisonNovaTimer = 15*IN_MILISECONDS;
+ uiPoisonNovaTimer = 15*IN_MILLISECONDS;
} else uiPoisonNovaTimer -= diff;
if (uiPowerfullBiteTimer <= diff)
{
DoCast(me->getVictim(), SPELL_POWERFULL_BITE);
- uiPowerfullBiteTimer = 10*IN_MILISECONDS;
+ uiPowerfullBiteTimer = 10*IN_MILLISECONDS;
} else uiPowerfullBiteTimer -= diff;
if (uiVenomBoltTimer <= diff)
{
DoCast(me->getVictim(), SPELL_VENOM_BOLT);
- uiVenomBoltTimer = 10*IN_MILISECONDS;
+ uiVenomBoltTimer = 10*IN_MILLISECONDS;
} else uiVenomBoltTimer -= diff;
if (uiPhase)
@@ -136,11 +135,11 @@ struct boss_slad_ranAI : public ScriptedAI
{
if (uiPhase == 1)
for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i)
- me->SummonCreature(CREATURE_SNAKE, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS);
+ me->SummonCreature(CREATURE_SNAKE, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS);
if (uiPhase == 2)
for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i)
- me->SummonCreature(CREATURE_CONSTRICTORS, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILISECONDS);
- uiSpawnTimer = 5*IN_MILISECONDS;
+ me->SummonCreature(CREATURE_CONSTRICTORS, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS);
+ uiSpawnTimer = 5*IN_MILLISECONDS;
} else uiSpawnTimer -= diff;
}
@@ -187,7 +186,7 @@ struct mob_slad_ran_constrictorAI : public ScriptedAI
void Reset()
{
- uiGripOfSladRanTimer = 1*IN_MILISECONDS;
+ uiGripOfSladRanTimer = 1*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -197,7 +196,7 @@ struct mob_slad_ran_constrictorAI : public ScriptedAI
if (uiGripOfSladRanTimer <= diff)
{
DoCast(me->getVictim(), SPELL_GRIP_OF_SLAD_RAN);
- uiGripOfSladRanTimer = 5*IN_MILISECONDS;
+ uiGripOfSladRanTimer = 5*IN_MILLISECONDS;
} else uiGripOfSladRanTimer -= diff;
}
@@ -214,7 +213,7 @@ struct mob_slad_ran_viperAI : public ScriptedAI
void Reset()
{
- uiVenomousBiteTimer = 2*IN_MILISECONDS;
+ uiVenomousBiteTimer = 2*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -225,7 +224,7 @@ struct mob_slad_ran_viperAI : public ScriptedAI
if (uiVenomousBiteTimer <= diff)
{
DoCast(me->getVictim(), SPELL_VENOMOUS_BITE);
- uiVenomousBiteTimer = 10*IN_MILISECONDS;
+ uiVenomousBiteTimer = 10*IN_MILLISECONDS;
} else uiVenomousBiteTimer -= diff;
}
};
diff --git a/src/server/scripts/Northrend/Gundrak/gundrak.h b/src/server/scripts/Northrend/Gundrak/gundrak.h
index a443aa4e698..c6858b8930c 100644
--- a/src/server/scripts/Northrend/Gundrak/gundrak.h
+++ b/src/server/scripts/Northrend/Gundrak/gundrak.h
@@ -1,20 +1,19 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_GUNDRAK_H
#define DEF_GUNDRAK_H
diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
index 4dd896f74f2..6ca2e0886c6 100644
--- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
+++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp
@@ -1,22 +1,21 @@
/*
-* Copyright (C) 2009 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "gundrak.h"
#define MAX_ENCOUNTER 5
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
index 896eb068eb6..567f1f01c4d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
#define SAY_GREET RAND(-1533000,-1533004,-1533005,-1533006,-1533007)
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
index aa5a940eb8f..b6a3760e6b6 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_faerlina.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
enum Yells
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
index f04b39040db..d04180aa037 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
enum Horsemen
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp
index ab6fa6c46d3..a91fa207df7 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
#define SPELL_MORTAL_WOUND 25646
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index d958ff24951..4fcf902714c 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
enum Yells
@@ -182,7 +183,7 @@ struct boss_gothikAI : public BossAI
if (LiveTriggerGUID.size() < POS_LIVE || DeadTriggerGUID.size() < POS_DEAD)
{
- error_log("Script Gothik: cannot summon triggers!");
+ sLog.outError("Script Gothik: cannot summon triggers!");
EnterEvadeMode();
return;
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
index 7df01e18483..1d96a2d70ab 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
#define SPELL_BOMBARD_SLIME 28280
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index 1de9c0e00c8..00b6f498ce0 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
#define SAY_AGGRO RAND(-1533109,-1533110,-1533111)
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_highlord_mograine.cpp b/src/server/scripts/Northrend/Naxxramas/boss_highlord_mograine.cpp
deleted file mode 100644
index 4eb72a3780e..00000000000
--- a/src/server/scripts/Northrend/Naxxramas/boss_highlord_mograine.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Copyright (C) 2006 - 2008 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 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/* ScriptData
-SDName: Boss_Highlord_Mograine
-SD%Complete: 100
-SDComment: SCRIPT OBSOLETE
-SDCategory: Naxxramas
-EndScriptData */
-
-#include "precompiled.h"
-
-//All horsemen
-#define SPELL_SHIELDWALL 29061
-#define SPELL_BESERK 26662
-
-// highlord mograine
-#define SPELL_MARK_OF_MOGRAINE 28834
-#define SPELL_RIGHTEOUS_FIRE 28882 // Applied as a 25% chance on melee hit to proc. me->GetVictim()
-
-#define SAY_TAUNT1 "Enough prattling. Let them come! We shall grind their bones to dust."
-#define SAY_TAUNT2 "Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough."
-#define SAY_TAUNT3 "Life is meaningless. It is in death that we are truly tested."
-#define SAY_AGGRO1 "You seek death?"
-#define SAY_AGGRO2 "None shall pass!"
-#define SAY_AGGRO3 "Be still!"
-#define SAY_SLAY1 "You will find no peace in death."
-#define SAY_SLAY2 "The master's will is done."
-#define SAY_SPECIAL "Bow to the might of the Highlord!"
-#define SAY_DEATH "I... am... released! Perhaps it's not too late to - noo! I need... more time..."
-
-#define SOUND_TAUNT1 8842
-#define SOUND_TAUNT2 8843
-#define SOUND_TAUNT3 8844
-#define SOUND_AGGRO1 8835
-#define SOUND_AGGRO2 8836
-#define SOUND_AGGRO3 8837
-#define SOUND_SLAY1 8839
-#define SOUND_SLAY2 8840
-#define SOUND_SPECIAL 8841
-#define SOUND_DEATH 8838
-
-#define SPIRIT_OF_MOGRAINE 16775
-
-struct TRINITY_DLL_DECL boss_highlord_mograineAI : public ScriptedAI
-{
- boss_highlord_mograineAI(Creature *c) : ScriptedAI(c) {}
-
- uint32 Mark_Timer;
- uint32 RighteousFire_Timer;
- bool ShieldWall1;
- bool ShieldWall2;
-
- void Reset()
- {
- Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec.
- RighteousFire_Timer = 2000; // applied approx 1 out of 4 attacks
- ShieldWall1 = true;
- ShieldWall2 = true;
- }
-
- void InitialYell()
- {
- if (!me->isInCombat())
- {
- switch(rand()%3)
- {
- case 0:
- DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL);
- DoPlaySoundToSet(me,SOUND_AGGRO1);
- break;
- case 1:
- DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL);
- DoPlaySoundToSet(me,SOUND_AGGRO2);
- break;
- case 2:
- DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL);
- DoPlaySoundToSet(me,SOUND_AGGRO3);
- break;
- }
- }
- }
-
- void KilledUnit()
- {
- switch(rand()%2)
- {
- case 0:
- DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL);
- DoPlaySoundToSet(me,SOUND_SLAY1);
- break;
- case 1:
- DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL);
- DoPlaySoundToSet(me,SOUND_SLAY2);
- break;
- }
- }
-
- void JustDied(Unit* Killer)
- {
- DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL);
- DoPlaySoundToSet(me, SOUND_DEATH);
- }
-
- void Aggro(Unit *who)
- {
- InitialYell();
- }
-
- void UpdateAI(const uint32 diff)
- {
- if (!UpdateVictim())
- return;
-
- // Mark of Mograine
- if (Mark_Timer < diff)
- {
- DoCast(me->getVictim(),SPELL_MARK_OF_MOGRAINE);
- Mark_Timer = 12000;
- }else Mark_Timer -= diff;
-
- // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds
- if (ShieldWall1 && (me->GetHealth()*100 / me->GetMaxHealth()) < 50)
- {
- if (ShieldWall1)
- {
- DoCast(me,SPELL_SHIELDWALL);
- ShieldWall1 = false;
- }
- }
- if (ShieldWall2 && (me->GetHealth()*100 / me->GetMaxHealth()) < 20)
- {
- if (ShieldWall2)
- {
- DoCast(me,SPELL_SHIELDWALL);
- ShieldWall2 = false;
- }
- }
-
- // Righteous Fire
- if (RighteousFire_Timer < diff)
- {
- if (rand()%4 == 1) // 1/4
- {
- DoCast(me->getVictim(),SPELL_RIGHTEOUS_FIRE);
- }
- RighteousFire_Timer = 2000;
- }else RighteousFire_Timer -= diff;
-
- DoMeleeAttackIfReady();
- }
-};
-CreatureAI* GetAI_boss_highlord_mograine(Creature* pCreature)
-{
- return new boss_highlord_mograineAI (pCreature);
-}
-
-void AddSC_boss_highlord_mograine()
-{
- Script *newscript;
- newscript = new Script;
- newscript->Name="boss_highlord_mograine";
- newscript->GetAI = &GetAI_boss_highlord_mograine;
- newscript->RegisterSelf();
-}
-
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index bfcd0636298..5188ab14d2f 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: VERIFY SCRIPT
SDCategory: Naxxramas
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
enum Yells
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
index 0b0c8f5e4c5..c22bf236ec3 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_loatheb.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
enum Spells
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
index 71d9cb86102..b7a61ad0aca 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
enum Spells
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
index b0cd4018955..6b93e5ea19d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
#define SAY_AGGRO RAND(-1533075,-1533076,-1533077)
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
index e4472b299ce..bd30cb20471 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2009 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
enum Spells
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
index d507df86e83..12d5b3057f5 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
//Razuvious - NO TEXT sound only
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
index d75b3ab78b0..a646e6d8412 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
#define EMOTE_BREATH -1533082
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
index 350cd450510..9d224f01022 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
//Stalagg
diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
index 706789a73f1..6ece32054ae 100644
--- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "naxxramas.h"
const DoorData doorData[] =
@@ -128,6 +129,8 @@ struct instance_naxxramas : public InstanceData
uint64 uiKelthuzadTrigger;
uint64 uiPortals[4];
+ GOState gothikDoorState;
+
time_t minHorsemenDiedTime;
time_t maxHorsemenDiedTime;
@@ -171,7 +174,10 @@ struct instance_naxxramas : public InstanceData
pSapphiron->AI()->DoAction(DATA_SAPPHIRON_BIRTH);
return;
}
- case GO_GOTHIK_GATE: GothikGateGUID = add ? pGo->GetGUID() : 0; break;
+ case GO_GOTHIK_GATE:
+ GothikGateGUID = add ? pGo->GetGUID() : 0;
+ pGo->SetGoState(gothikDoorState);
+ break;
case GO_HORSEMEN_CHEST: HorsemenChestGUID = add ? pGo->GetGUID() : 0; break;
case GO_HORSEMEN_CHEST_HERO: HorsemenChestGUID = add ? pGo->GetGUID() : 0; break;
case GO_KELTHUZAD_PORTAL01: uiPortals[0] = pGo->GetGUID(); break;
@@ -194,6 +200,7 @@ struct instance_naxxramas : public InstanceData
case DATA_GOTHIK_GATE:
if (GameObject *pGothikGate = instance->GetGameObject(GothikGateGUID))
pGothikGate->SetGoState(GOState(value));
+ gothikDoorState = GOState(value);
break;
case DATA_HORSEMEN0:
@@ -307,6 +314,21 @@ struct instance_naxxramas : public InstanceData
}
return false;
}
+
+ std::string GetSaveData()
+ {
+ std::ostringstream saveStream;
+ saveStream << GetBossSaveData() << " " << gothikDoorState;
+ return saveStream.str();
+ }
+
+ void Load(const char * data)
+ {
+ std::istringstream loadStream(LoadBossState(data));
+ uint32 buff;
+ loadStream >> buff;
+ gothikDoorState = GOState(buff);
+ }
};
InstanceData* GetInstanceData_instance_naxxramas(Map* pMap)
diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h
index 9b1fac2ff5b..d4e67ce1b81 100644
--- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h
+++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 DEF_NAXXRAMAS_H
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index bbb1df2731d..71e8ad69ff4 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss malygos
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = '' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
//Spells
#define SPELL_ARCANE_BREATH_N 56272
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h
index caa82a92e95..e56f760cb83 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/eye_of_eternity.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_EYE_OF_ETERNITY_H
#define DEF_EYE_OF_ETERNITY_H
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
index d93ec415b42..e8ba3c89a67 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "eye_of_eternity.h"
struct instance_eye_of_eternity : public ScriptedInstance
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
index 02c39dc1232..767aeabcc42 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
@@ -1,21 +1,22 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "nexus.h"
enum Spells
@@ -77,7 +78,7 @@ struct boss_anomalusAI : public ScriptedAI
void Reset()
{
Phase = 0;
- uiSparkTimer = 5*IN_MILISECONDS;
+ uiSparkTimer = 5*IN_MILLISECONDS;
uiChaoticRiftGUID = 0;
bDeadChaoticRift = false;
@@ -138,7 +139,7 @@ struct boss_anomalusAI : public ScriptedAI
Phase = 1;
DoScriptText(SAY_SHIELD, me);
DoCast(me, SPELL_RIFT_SHIELD);
- Creature* Rift = me->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[urand(0,5)], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS);
+ Creature* Rift = me->SummonCreature(MOB_CHAOTIC_RIFT, RiftLocation[urand(0,5)], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILLISECONDS);
if (Rift)
{
//DoCast(Rift, SPELL_CHARGE_RIFT);
@@ -154,7 +155,7 @@ struct boss_anomalusAI : public ScriptedAI
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_SPARK);
- uiSparkTimer = 5*IN_MILISECONDS;
+ uiSparkTimer = 5*IN_MILLISECONDS;
} else uiSparkTimer -= diff;
DoMeleeAttackIfReady();
@@ -187,8 +188,8 @@ struct mob_chaotic_riftAI : public Scripted_NoMovementAI
void Reset()
{
- uiChaoticEnergyBurstTimer = 1*IN_MILISECONDS;
- uiSummonCrazedManaWraithTimer = 5*IN_MILISECONDS;
+ uiChaoticEnergyBurstTimer = 1*IN_MILLISECONDS;
+ uiSummonCrazedManaWraithTimer = 5*IN_MILLISECONDS;
//me->SetDisplayId(25206); //For some reason in DB models for ally and horde are different.
//Model for ally (1126) does not show auras. Horde model works perfect.
//Set model to horde number
@@ -214,20 +215,20 @@ struct mob_chaotic_riftAI : public Scripted_NoMovementAI
DoCast(pTarget, SPELL_CHARGED_CHAOTIC_ENERGY_BURST);
else
DoCast(pTarget, SPELL_CHAOTIC_ENERGY_BURST);
- uiChaoticEnergyBurstTimer = 1*IN_MILISECONDS;
+ uiChaoticEnergyBurstTimer = 1*IN_MILLISECONDS;
} else uiChaoticEnergyBurstTimer -= diff;
if (uiSummonCrazedManaWraithTimer <= diff)
{
- Creature* Wraith = me->SummonCreature(MOB_CRAZED_MANA_WRAITH, me->GetPositionX()+1, me->GetPositionY()+1, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS);
+ Creature* Wraith = me->SummonCreature(MOB_CRAZED_MANA_WRAITH, me->GetPositionX()+1, me->GetPositionY()+1, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILLISECONDS);
if (Wraith)
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
Wraith->AI()->AttackStart(pTarget);
Unit* Anomalus = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0);
if (Anomalus && Anomalus->HasAura(SPELL_RIFT_SHIELD))
- uiSummonCrazedManaWraithTimer = 5*IN_MILISECONDS;
+ uiSummonCrazedManaWraithTimer = 5*IN_MILLISECONDS;
else
- uiSummonCrazedManaWraithTimer = 10*IN_MILISECONDS;
+ uiSummonCrazedManaWraithTimer = 10*IN_MILLISECONDS;
} else uiSummonCrazedManaWraithTimer -= diff;
}
};
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index ff633c55eac..befa9fb068d 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -1,21 +1,22 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "nexus.h"
enum Spells
@@ -70,12 +71,12 @@ struct boss_keristraszaAI : public ScriptedAI
void Reset()
{
- uiCrystalfireBreathTimer = 14*IN_MILISECONDS;
- uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILISECONDS,11*IN_MILISECONDS);
- uiTailSweepTimer = 5*IN_MILISECONDS;
+ uiCrystalfireBreathTimer = 14*IN_MILLISECONDS;
+ uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILLISECONDS,11*IN_MILLISECONDS);
+ uiTailSweepTimer = 5*IN_MILLISECONDS;
bEnrage = false;
- uiCheckIntenseColdTimer = 2*IN_MILISECONDS;
+ uiCheckIntenseColdTimer = 2*IN_MILLISECONDS;
bMoreThanTwoIntenseCold = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
@@ -174,7 +175,7 @@ struct boss_keristraszaAI : public ScriptedAI
break;
}
}
- uiCheckIntenseColdTimer = 2*IN_MILISECONDS;
+ uiCheckIntenseColdTimer = 2*IN_MILLISECONDS;
} else uiCheckIntenseColdTimer -= diff;
if (!bEnrage && HealthBelowPct(25))
@@ -187,13 +188,13 @@ struct boss_keristraszaAI : public ScriptedAI
if (uiCrystalfireBreathTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CRYSTALFIRE_BREATH);
- uiCrystalfireBreathTimer = 14*IN_MILISECONDS;
+ uiCrystalfireBreathTimer = 14*IN_MILLISECONDS;
} else uiCrystalfireBreathTimer -= diff;
if (uiTailSweepTimer <= diff)
{
DoCast(me, SPELL_TAIL_SWEEP);
- uiTailSweepTimer = 5*IN_MILISECONDS;
+ uiTailSweepTimer = 5*IN_MILLISECONDS;
} else uiTailSweepTimer -= diff;
if (uiCrystalChainsCrystalizeTimer <= diff)
@@ -203,7 +204,7 @@ struct boss_keristraszaAI : public ScriptedAI
DoCast(me, SPELL_CRYSTALIZE);
else if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_CRYSTAL_CHAINS);
- uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILISECONDS,11*IN_MILISECONDS);
+ uiCrystalChainsCrystalizeTimer = DUNGEON_MODE(30*IN_MILLISECONDS,11*IN_MILLISECONDS);
} else uiCrystalChainsCrystalizeTimer -= diff;
DoMeleeAttackIfReady();
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 0bf9fb07bb7..77dd3025451 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
@@ -1,21 +1,22 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "nexus.h"
enum Spells
@@ -49,7 +50,7 @@ enum Yells
enum Achievements
{
ACHIEV_SPLIT_PERSONALITY = 2150,
- ACHIEV_TIMER = 5*IN_MILISECONDS
+ ACHIEV_TIMER = 5*IN_MILLISECONDS
};
const Position CenterOfRoom = {504.80, 89.07, -16.12, 6.27};
@@ -87,9 +88,9 @@ struct boss_magus_telestraAI : public ScriptedAI
{
Phase = 0;
//These times are probably wrong
- uiIceNovaTimer = 7*IN_MILISECONDS;
+ uiIceNovaTimer = 7*IN_MILLISECONDS;
uiFireBombTimer = 0;
- uiGravityWellTimer = 15*IN_MILISECONDS;
+ uiGravityWellTimer = 15*IN_MILLISECONDS;
uiCooldown = 0;
uiFireMagusGUID = 0;
@@ -136,7 +137,7 @@ struct boss_magus_telestraAI : public ScriptedAI
uint64 SplitPersonality(uint32 entry)
{
- if (Creature* Summoned = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILISECONDS))
+ if (Creature* Summoned = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILLISECONDS))
{
switch (entry)
{
@@ -223,7 +224,7 @@ struct boss_magus_telestraAI : public ScriptedAI
uiFrostMagusGUID = 0;
uiArcaneMagusGUID = 0;
bIsWaitingToAppear = true;
- uiIsWaitingToAppearTimer = 4*IN_MILISECONDS;
+ uiIsWaitingToAppearTimer = 4*IN_MILLISECONDS;
DoScriptText(SAY_MERGE, me);
bIsAchievementTimerRunning = false;
uiAchievementTimer = 0;
@@ -282,9 +283,9 @@ struct boss_magus_telestraAI : public ScriptedAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_ICE_NOVA, false);
- uiCooldown = 1.5*IN_MILISECONDS;
+ uiCooldown = 1.5*IN_MILLISECONDS;
}
- uiIceNovaTimer = 15*IN_MILISECONDS;
+ uiIceNovaTimer = 15*IN_MILLISECONDS;
} else uiIceNovaTimer -= diff;
if (uiGravityWellTimer <= diff)
@@ -292,9 +293,9 @@ struct boss_magus_telestraAI : public ScriptedAI
if (Unit *pTarget = me->getVictim())
{
DoCast(pTarget, SPELL_GRAVITY_WELL);
- uiCooldown = 6*IN_MILISECONDS;
+ uiCooldown = 6*IN_MILLISECONDS;
}
- uiGravityWellTimer = 15*IN_MILISECONDS;
+ uiGravityWellTimer = 15*IN_MILLISECONDS;
} else uiGravityWellTimer -= diff;
if (uiFireBombTimer <= diff)
@@ -302,9 +303,9 @@ struct boss_magus_telestraAI : public ScriptedAI
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_FIREBOMB, false);
- uiCooldown = 2*IN_MILISECONDS;
+ uiCooldown = 2*IN_MILLISECONDS;
}
- uiFireBombTimer = 2*IN_MILISECONDS;
+ uiFireBombTimer = 2*IN_MILLISECONDS;
} else uiFireBombTimer -=diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index 1304f95c7ac..c28aff66ed1 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -1,21 +1,22 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "nexus.h"
enum Spells
@@ -75,10 +76,10 @@ struct boss_ormorokAI : public ScriptedAI
void Reset()
{
- uiCrystalSpikesTimer = 12*IN_MILISECONDS;
- uiTrampleTimer = 10*IN_MILISECONDS;
- uiSpellReflectionTimer = 30*IN_MILISECONDS;
- uiSummonCrystallineTanglerTimer = 17*IN_MILISECONDS;
+ uiCrystalSpikesTimer = 12*IN_MILLISECONDS;
+ uiTrampleTimer = 10*IN_MILLISECONDS;
+ uiSpellReflectionTimer = 30*IN_MILLISECONDS;
+ uiSummonCrystallineTanglerTimer = 17*IN_MILLISECONDS;
bFrenzy = false;
bCrystalSpikes = false;
@@ -125,7 +126,7 @@ struct boss_ormorokAI : public ScriptedAI
fSpikeXY[3][0] = fBaseX-(SPIKE_DISTANCE*uiCrystalSpikesCount*cos(fBaseO-(M_PI/2)));
fSpikeXY[3][1] = fBaseY-(SPIKE_DISTANCE*uiCrystalSpikesCount*sin(fBaseO-(M_PI/2)));
for (uint8 i = 0; i < 4; ++i)
- me->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILISECONDS);
+ me->SummonCreature(MOB_CRYSTAL_SPIKE, fSpikeXY[i][0], fSpikeXY[i][1], fBaseZ, 0, TEMPSUMMON_TIMED_DESPAWN, 7*IN_MILLISECONDS);
if (++uiCrystalSpikesCount >= 13)
bCrystalSpikes = false;
uiCrystalSpikesTimer2 = 200;
@@ -140,14 +141,14 @@ struct boss_ormorokAI : public ScriptedAI
if (uiTrampleTimer <= diff)
{
DoCast(me, SPELL_TRAMPLE);
- uiTrampleTimer = 10*IN_MILISECONDS;
+ uiTrampleTimer = 10*IN_MILLISECONDS;
} else uiTrampleTimer -= diff;
if (uiSpellReflectionTimer <= diff)
{
DoScriptText(SAY_REFLECT, me);
DoCast(me, SPELL_SPELL_REFLECTION);
- uiSpellReflectionTimer = 30*IN_MILISECONDS;
+ uiSpellReflectionTimer = 30*IN_MILLISECONDS;
} else uiSpellReflectionTimer -= diff;
if (uiCrystalSpikesTimer <= diff)
@@ -160,7 +161,7 @@ struct boss_ormorokAI : public ScriptedAI
fBaseY = me->GetPositionY();
fBaseZ = me->GetPositionZ();
fBaseO = me->GetOrientation();
- uiCrystalSpikesTimer = 20*IN_MILISECONDS;
+ uiCrystalSpikesTimer = 20*IN_MILLISECONDS;
} else uiCrystalSpikesTimer -= diff;
if (IsHeroic() && (uiSummonCrystallineTanglerTimer <= diff))
@@ -200,7 +201,7 @@ struct boss_ormorokAI : public ScriptedAI
Crystalline_Tangler->getThreatManager().addThreat(pTarget, 1000000000.0f);
}
}
- uiSummonCrystallineTanglerTimer = 17*IN_MILISECONDS;
+ uiSummonCrystallineTanglerTimer = 17*IN_MILLISECONDS;
} else uiSummonCrystallineTanglerTimer -= diff;
DoMeleeAttackIfReady();
@@ -218,8 +219,8 @@ struct mob_crystal_spikeAI : public Scripted_NoMovementAI
void Reset()
{
- SpellCrystalSpikeDamageTimer = 3.7*IN_MILISECONDS;
- SpellCrystalSpikePrevisualTimer = 1*IN_MILISECONDS;
+ SpellCrystalSpikeDamageTimer = 3.7*IN_MILLISECONDS;
+ SpellCrystalSpikePrevisualTimer = 1*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -227,13 +228,13 @@ struct mob_crystal_spikeAI : public Scripted_NoMovementAI
if (SpellCrystalSpikePrevisualTimer <= diff)
{
DoCast(me, SPELL_CRYSTAL_SPIKE_PREVISUAL);
- SpellCrystalSpikePrevisualTimer = 10*IN_MILISECONDS;
+ SpellCrystalSpikePrevisualTimer = 10*IN_MILLISECONDS;
} else SpellCrystalSpikePrevisualTimer -= diff;
if (SpellCrystalSpikeDamageTimer <= diff)
{
DoCast(me, SPELL_CRYSTALL_SPIKE_DAMAGE);
- SpellCrystalSpikeDamageTimer = 10*IN_MILISECONDS;
+ SpellCrystalSpikeDamageTimer = 10*IN_MILLISECONDS;
} else SpellCrystalSpikeDamageTimer -= diff;
}
};
@@ -246,7 +247,7 @@ struct mob_crystalline_tanglerAI : public ScriptedAI
void Reset()
{
- uiRootsTimer = 1*IN_MILISECONDS;
+ uiRootsTimer = 1*IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
@@ -256,7 +257,7 @@ struct mob_crystalline_tanglerAI : public ScriptedAI
if (me->IsWithinDist(me->getVictim(), 5.0f, false))
{
DoCast(me->getVictim(), SPELL_ROOTS);
- uiRootsTimer = 15*IN_MILISECONDS;
+ uiRootsTimer = 15*IN_MILLISECONDS;
}
} else uiRootsTimer -= diff;
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp
index 4bd9f55a013..2a95007a477 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss Commander Kolurg
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_commander_kolurg' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_BATTLE_SHOUT 31403
#define SPELL_CHARGE 60067
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
index ef02baa38e6..a4e8f9559ce 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss Commander Stoutbeard
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_commander_stoutbeard' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_BATTLE_SHOUT 31403
#define SPELL_CHARGE 60067
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
index db70245e3a4..356a7eab12f 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
@@ -1,21 +1,22 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "nexus.h"
#define NUMBER_OF_ENCOUNTERS 4
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h
index 66902bece30..237f5db46f5 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/nexus.h
+++ b/src/server/scripts/Northrend/Nexus/Nexus/nexus.h
@@ -1,17 +1,18 @@
-/* Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_NEXUS_H
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
index 7d276206339..a1201b838c5 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "oculus.h"
enum Spells
@@ -188,7 +189,7 @@ struct npc_unstable_sphereAI : public ScriptedAI
if (uiPulseTimer <= uiDiff)
{
DoCast(SPELL_UNSTABLE_SPHERE_PULSE);
- uiPulseTimer = 3*IN_MILISECONDS;
+ uiPulseTimer = 3*IN_MILLISECONDS;
} else uiPulseTimer -= uiDiff;
if (uiDeathTimer <= uiDiff)
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
index 94fb90ab206..cde22d0268c 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "oculus.h"
//Types of drake mounts: Ruby(Tank), Amber(DPS), Emerald(Healer)
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
index 29435441d00..4333102c540 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -1,18 +1,19 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
/* ScriptData
SDName: Urom
@@ -21,7 +22,7 @@ SDComment: Is not working SPELL_ARCANE_SHIELD. SPELL_FROSTBOMB has some issues,
SDCategory: Instance Script
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "oculus.h"
enum Spells
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
index 79034250a43..1a67d07dcb0 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "oculus.h"
enum Spells
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
index 49be2385a3c..bc1ce7f58dd 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "oculus.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index 685583532d5..b3572bd92ff 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2006 - 2010 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "oculus.h"
#define GOSSIP_ITEM_DRAKES "So where do we go from here?"
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
index b212c9b8b6a..8228cd10754 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_OCULUS_H
#define DEF_OCULUS_H
diff --git a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
index 3e24aaeb6c0..65d870afc0d 100644
--- a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
@@ -1,21 +1,21 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * Copyright (C) 2006 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "obsidian_sanctum.h"
enum eEnums
@@ -53,6 +53,7 @@ enum eEnums
SPELL_WILL_OF_SARTHARION = 61254, // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%.
SPELL_LAVA_STRIKE = 57571, // (Real spell casted should be 57578) 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572)
SPELL_TWILIGHT_REVENGE = 60639,
+ NPC_FIRE_CYCLONE = 30648,
SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes
SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x Creature entry 30494)
@@ -101,6 +102,7 @@ enum eEnums
SPELL_HATCH_EGGS_EFFECT = 58685,
NPC_TWILIHT_WHELP = 31214,
NPC_TWILIGHT_EGG = 30882,
+ NPC_SARTHARION_TWILIGHT_EGG = 31204,
//Whelps
NPC_TWILIGHT_WHELP = 30890,
@@ -110,7 +112,10 @@ enum eEnums
//flame tsunami
SPELL_FLAME_TSUNAMI = 57494, // the visual dummy
SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction
- SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura
+
+ SPELL_FLAME_TSUNAMI_DMG_AURA = 57491, // periodic damage, npc has this aura
+ SPELL_FLAME_TSUNAMI_BUFF = 60430,
+
NPC_FLAME_TSUNAMI = 30616, // for the flame waves
NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike
@@ -132,6 +137,7 @@ struct Waypoint
{
float m_fX, m_fY, m_fZ;
};
+
struct Location
{
float x,y,z;
@@ -171,20 +177,22 @@ Waypoint m_aDragonCommon[MAX_WAYPOINT]=
{3250.479, 585.827, 98.652},
{3209.969, 566.523, 98.652}
};
-static Location FlameRight1Spawn = { 3197.59, 495.336, 57.8462 };
-static Location FlameRight1Direction = { 3289.28, 521.569, 55.1526 };
-static Location FlameRight2Spawn = { 3201.94, 543.324, 56.7209 };
-static Location FlameRight2Direction = { 3288.98, 549.291, 55.1232 };
-static Location FlameLeft1Spawn = { 3290.24, 521.725, 55.1238 };
-static Location FlameLeft1Direction = { 3199.94, 516.891, 57.5112 };
-static Location FlameLeft2Spawn = { 3290.33, 586.51, 55.063 };
-static Location FlameLeft2Direction = { 3195.03, 479.135, 55.6331 };
-
-static Location AcolyteofShadron = { 3363.92, 534.703, 97.2683 };
-static Location AcolyteofShadron2 = { 3246.57, 551.263, 58.6164 };
-static Location AcolyteofVesperon = { 3145.68, 520.71, 89.7 };
-static Location AcolyteofVesperon2 = { 3246.57, 551.263, 58.6164 };
+static Location FlameRight1Spawn = { 3200.00, 573.211, 57.1551 };
+static Location FlameRight1Direction = { 3289.28, 573.211, 57.1551 };
+static Location FlameRight2Spawn = { 3200.00, 532.211, 57.1551 };
+static Location FlameRight2Direction = { 3289.28, 532.211, 57.1551 };
+static Location FlameRight3Spawn = { 3200.00, 491.211, 57.1551 };
+static Location FlameRight3Direction = { 3289.28, 491.211, 57.1551 };
+static Location FlameLeft1Spawn = { 3289.28, 511.711, 57.1551 };
+static Location FlameLeft1Direction = { 3200.00, 511.711, 57.1551 };
+static Location FlameLeft2Spawn = { 3289.28, 552.711, 57.1551 };
+static Location FlameLeft2Direction = { 3200.00, 552.711, 57.1551 };
+
+static Location AcolyteofShadron = { 3363.92, 534.703, 97.2683 };
+static Location AcolyteofShadron2 = { 3246.57, 551.263, 58.6164 };
+static Location AcolyteofVesperon = { 3145.68, 520.71, 89.7 };
+static Location AcolyteofVesperon2 = { 3246.57, 551.263, 58.6164 };
Locations TwilightEggs[] =
{
{3219.28, 669.121 , 88.5549},
@@ -196,9 +204,12 @@ Locations TwilightEggs[] =
};
Locations TwilightEggsSarth[] =
{
- {3261.75, 539.14 , 58.6082},
- {3257.41, 512.939 , 58.5432},
- {3231.04, 498.281 , 58.6439}
+ {3252.73, 515.762 , 58.5501},
+ {3256.56, 521.119 , 58.6061},
+ {3255.63, 527.513 , 58.7568},
+ {3264.90, 525.865 , 58.6436},
+ {3264.26, 516.364 , 58.8011},
+ {3257.54, 502.285 , 58.2077}
};
/*######
@@ -241,7 +252,7 @@ struct boss_sartharionAI : public ScriptedAI
m_bIsBerserk = false;
m_bIsSoftEnraged = false;
- m_uiEnrageTimer = 15*MINUTE*IN_MILISECONDS;
+ m_uiEnrageTimer = 15*MINUTE*IN_MILLISECONDS;
m_bIsHardEnraged = false;
m_uiTenebronTimer = 30000;
@@ -262,8 +273,68 @@ struct boss_sartharionAI : public ScriptedAI
me->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE);
me->ResetLootMode();
+ me->SetHomePosition(3246.57, 551.263, 58.6164, 4.66003);
achievProgress = 0;
+
+ // Drakes respawning system
+ if (pInstance)
+ {
+ Creature* pTenebron = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON));
+ Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON));
+ Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON));
+ if (pTenebron)
+ {
+ pTenebron->SetHomePosition(3239.07, 657.235, 86.8775, 4.74729);
+ if(pTenebron->isAlive())
+ {
+ if (pTenebron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ pTenebron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ pTenebron->GetMotionMaster()->MoveTargetedHome();
+ }else
+ {
+ if(pInstance->GetData(TYPE_TENEBRON_PREKILLED) == false)
+ {
+ pTenebron->Respawn();
+ pTenebron->GetMotionMaster()->MoveTargetedHome();
+ }
+ }
+ }
+ if (pShadron)
+ {
+ pShadron->SetHomePosition(3363.06, 525.28, 98.362, 4.76475);
+ if(pShadron->isAlive())
+ {
+ if (pShadron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ pShadron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ pShadron->GetMotionMaster()->MoveTargetedHome();
+ }else
+ {
+ if(pInstance->GetData(TYPE_SHADRON_PREKILLED) == false)
+ {
+ pShadron->Respawn();
+ pShadron->GetMotionMaster()->MoveTargetedHome();
+ }
+ }
+ }
+ if (pVesperon)
+ {
+ pVesperon->SetHomePosition(3145.68, 520.71, 89.7, 4.64258);
+ if(pVesperon->isAlive())
+ {
+ if (pVesperon->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
+ pVesperon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ pVesperon->GetMotionMaster()->MoveTargetedHome();
+ }else
+ {
+ if(pInstance->GetData(TYPE_VESPERON_PREKILLED) == false)
+ {
+ pVesperon->Respawn();
+ pVesperon->GetMotionMaster()->MoveTargetedHome();
+ }
+ }
+ }
+ }
}
void JustReachedHome()
@@ -272,7 +343,7 @@ struct boss_sartharionAI : public ScriptedAI
pInstance->SetData(TYPE_SARTHARION_EVENT, NOT_STARTED);
}
- void EnterCombat(Unit* /*pWho*/)
+ void EnterCombat(Unit* pWho)
{
DoScriptText(SAY_SARTHARION_AGGRO,me);
DoZoneInCombat();
@@ -284,24 +355,41 @@ struct boss_sartharionAI : public ScriptedAI
}
}
- void JustDied(Unit* /*pKiller*/)
+ void JustDied(Unit* pKiller)
{
DoScriptText(SAY_SARTHARION_DEATH,me);
if (pInstance)
{
- if (achievProgress >= 1)
- pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST));
- else if (achievProgress >= 2)
- pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO));
+ Creature* pTenebron = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON));
+ Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON));
+ Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON));
+ if (pTenebron && pTenebron->isAlive())
+ pTenebron->DisappearAndDie();
+ if (pShadron && pShadron->isAlive())
+ pShadron->DisappearAndDie();
+ if (pVesperon && pVesperon->isAlive())
+ pVesperon->DisappearAndDie();
+
+ if (achievProgress == 1)
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST));
+ else if (achievProgress == 2)
+ {
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST));
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO));
+ }
else if (achievProgress == 3)
- pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ZONE,H_ACHIEV_TWILIGHT_ZONE));
-
+ {
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ASSIST,H_ACHIEV_TWILIGHT_ASSIST));
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO));
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ZONE,H_ACHIEV_TWILIGHT_ZONE));
+ }
+
pInstance->SetData(TYPE_SARTHARION_EVENT, DONE);
}
}
- void KilledUnit(Unit* /*pVictim*/)
+ void KilledUnit(Unit* pVictim)
{
DoScriptText(RAND(SAY_SARTHARION_SLAY_1,SAY_SARTHARION_SLAY_2,SAY_SARTHARION_SLAY_3), me);
}
@@ -314,14 +402,18 @@ struct boss_sartharionAI : public ScriptedAI
me->AddLootMode(LOOT_MODE_HARD_MODE_3); // Add 3rd Drake loot mode
else if (me->HasLootMode(LOOT_MODE_HARD_MODE_1)) // Has one Drake loot mode
me->AddLootMode(LOOT_MODE_HARD_MODE_2); // Add 2nd Drake loot mode
- else // Has no Drake loot modes
+ else // Has no Drake loot modes
me->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode
}
void FetchDragons()
{
- if (!pInstance)
+ if(!pInstance)
return;
+
+ me->ResetLootMode();
+ achievProgress = 0;
+
Creature* pFetchTene = Unit::GetCreature(*me, pInstance->GetData64(DATA_TENEBRON));
Creature* pFetchShad = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON));
Creature* pFetchVesp = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON));
@@ -332,6 +424,11 @@ struct boss_sartharionAI : public ScriptedAI
if (pFetchTene && pFetchTene->isAlive() && !pFetchTene->getVictim())
{
bCanUseWill = true;
+ if(!pFetchTene->isInCombat())
+ {
+ AddDrakeLootMode();
+ achievProgress++;
+ }
pFetchTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aTene[0].m_fX, m_aTene[0].m_fY, m_aTene[0].m_fZ);
if (!pFetchTene->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
@@ -341,6 +438,11 @@ struct boss_sartharionAI : public ScriptedAI
if (pFetchShad && pFetchShad->isAlive() && !pFetchShad->getVictim())
{
bCanUseWill = true;
+ if(!pFetchShad->isInCombat())
+ {
+ AddDrakeLootMode();
+ achievProgress++;
+ }
pFetchShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aShad[0].m_fX, m_aShad[0].m_fY, m_aShad[0].m_fZ);
if (!pFetchShad->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
@@ -350,6 +452,11 @@ struct boss_sartharionAI : public ScriptedAI
if (pFetchVesp && pFetchVesp->isAlive() && !pFetchVesp->getVictim())
{
bCanUseWill = true;
+ if(!pFetchVesp->isInCombat())
+ {
+ AddDrakeLootMode();
+ achievProgress++;
+ }
pFetchVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aVesp[0].m_fX, m_aVesp[0].m_fY, m_aVesp[0].m_fZ);
if (!pFetchVesp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
@@ -375,22 +482,22 @@ struct boss_sartharionAI : public ScriptedAI
pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
int32 iTextId = 0;
- AddDrakeLootMode();
-
- achievProgress++;
switch(pTemp->GetEntry())
{
case NPC_TENEBRON:
iTextId = SAY_SARTHARION_CALL_TENEBRON;
+ pTemp->AddAura(SPELL_POWER_OF_TENEBRON, pTemp);
pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aTene[1].m_fX, m_aTene[1].m_fY, m_aTene[1].m_fZ);
break;
case NPC_SHADRON:
iTextId = SAY_SARTHARION_CALL_SHADRON;
+ pTemp->AddAura(SPELL_POWER_OF_SHADRON, pTemp);
pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aShad[1].m_fX, m_aShad[1].m_fY, m_aShad[1].m_fZ);
break;
case NPC_VESPERON:
iTextId = SAY_SARTHARION_CALL_VESPERON;
+ pTemp->AddAura(SPELL_POWER_OF_VESPERON, pTemp);
pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ);
break;
}
@@ -415,6 +522,27 @@ struct boss_sartharionAI : public ScriptedAI
}
}
+ // Selects a random Fire Cyclone and makes it cast Lava Strike.
+ // FIXME: Frequency of the casts reduced to compensate 100% chance of spawning a Lava Blaze add
+ void CastLavaStrikeOnTarget(Unit* target)
+ {
+ std::list<Creature*> pFireCyclonesList;
+ Trinity::AllCreaturesOfEntryInRange checker(me, NPC_FIRE_CYCLONE, 200.0f);
+ Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, pFireCyclonesList, checker);
+ me->VisitNearbyObject(200.0f, searcher);
+
+ if(pFireCyclonesList.empty())
+ return;
+
+ std::list<Creature*>::iterator itr = pFireCyclonesList.begin();
+ uint32 rnd = rand()%pFireCyclonesList.size();
+
+ for(uint32 i = 0; i < rnd; ++i)
+ ++itr;
+
+ (*itr)->CastSpell(target, SPELL_LAVA_STRIKE, true);
+ }
+
void UpdateAI(const uint32 uiDiff)
{
//Return since we have no target
@@ -435,9 +563,9 @@ struct boss_sartharionAI : public ScriptedAI
}
//soft enrage
- if (!m_bIsSoftEnraged && (me->GetHealth()*100 / me->GetMaxHealth()) <= 10)
+ if (!m_bIsSoftEnraged && HealthBelowPct(10))
{
- // TODO
+ // m_bIsSoftEnraged is used while determining Lava Strike cooldown.
m_bIsSoftEnraged = true;
}
@@ -461,18 +589,20 @@ struct boss_sartharionAI : public ScriptedAI
{
case 0:
{
- if (Creature *Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y , FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000))
- Right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction.x, FlameRight1Direction.y, FlameRight1Direction.z);
- if (Creature *Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y , FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000))
- Right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction.x, FlameRight2Direction.y, FlameRight2Direction.z);
+ Creature *Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y , FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000);
+ Creature *Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y , FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000);
+ Creature *Right3 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight3Spawn.x, FlameRight3Spawn.y , FlameRight3Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000);
+ Right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction.x, FlameRight1Direction.y, FlameRight1Direction.z);
+ Right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction.x, FlameRight2Direction.y, FlameRight2Direction.z);
+ Right3->GetMotionMaster()->MovePoint(0, FlameRight3Direction.x, FlameRight3Direction.y, FlameRight3Direction.z);
break;
}
case 1:
{
- if (Creature *Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y , FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000))
- Left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction.x, FlameLeft1Direction.y, FlameLeft1Direction.z);
- if (Creature *Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y , FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000))
- Left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction.x, FlameLeft2Direction.y, FlameLeft2Direction.z);
+ Creature *Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y , FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000);
+ Creature *Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y , FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN,12000);
+ Left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction.x, FlameLeft1Direction.y, FlameLeft1Direction.z);
+ Left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction.x, FlameLeft2Direction.y, FlameLeft2Direction.z);
break;
}
}
@@ -515,12 +645,12 @@ struct boss_sartharionAI : public ScriptedAI
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
- DoCast(pTarget, SPELL_LAVA_STRIKE);
+ CastLavaStrikeOnTarget(pTarget);
- if (urand(0,4) == 4)
+ if(urand(0,5) == 0)
DoScriptText(RAND(SAY_SARTHARION_SPECIAL_1,SAY_SARTHARION_SPECIAL_2,SAY_SARTHARION_SPECIAL_3), me);
}
- m_uiLavaStrikeTimer = urand(5000,20000);
+ m_uiLavaStrikeTimer = (m_bIsSoftEnraged ? urand(1400, 2000) : urand(5000,20000));
}
else
m_uiLavaStrikeTimer -= uiDiff;
@@ -552,6 +682,10 @@ struct boss_sartharionAI : public ScriptedAI
else
m_uiVesperonTimer -= uiDiff;
+ // Don't attack current target if he's not visible for us.
+ if(me->getVictim() && me->getVictim()->HasAura(57874, 0))
+ me->getThreatManager().modifyThreatPercent(me->getVictim(), -100);
+
DoMeleeAttackIfReady();
EnterEvadeIfOutOfCombatArea(uiDiff);
@@ -619,9 +753,6 @@ struct dummy_dragonAI : public ScriptedAI
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- if (GameObject* TwilightPortal = GameObject::GetGameObject((*me), pInstance->GetData64(GO_TWILIGHT_PORTAL)))
- TwilightPortal->SetGoState(GO_STATE_READY);
-
m_uiWaypointId = 0;
m_uiMoveNextTimer = 500;
m_iPortalRespawnTime = 30000;
@@ -633,7 +764,7 @@ struct dummy_dragonAI : public ScriptedAI
if (!pInstance || uiType != POINT_MOTION_TYPE)
return;
- debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId);
+// debug_log("dummy_dragonAI: %s reached point %u", me->GetName(), uiPointId);
//if healers messed up the raid and we was already initialized
if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
@@ -646,6 +777,14 @@ struct dummy_dragonAI : public ScriptedAI
if (uiPointId == POINT_ID_LAND)
{
me->GetMotionMaster()->Clear();
+ me->SetInCombatWithZone();
+ if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
+ {
+ me->AddThreat(target, 1.0f);
+ me->Attack(target, true);
+ me->GetMotionMaster()->MoveChase(target);
+ }
+
m_bCanMoveFree = false;
return;
}
@@ -695,39 +834,57 @@ struct dummy_dragonAI : public ScriptedAI
//using a grid search here seem to be more efficient than caching all four guids
//in instance script and calculate range to each.
GameObject* pPortal = me->FindNearestGameObject(GO_TWILIGHT_PORTAL,50.0f);
- if (GameObject* TwilightPortal = GameObject::GetGameObject((*me), pInstance->GetData64(GO_TWILIGHT_PORTAL)))
- TwilightPortal->SetGoState(GO_STATE_ACTIVE);
switch(me->GetEntry())
{
case NPC_TENEBRON:
{
iTextId = WHISPER_HATCH_EGGS;
- if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[0].x, TwilightEggs[0].y, TwilightEggs[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
+ {
+ for(uint32 i = 0; i < 6; ++i)
+ me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[i].x, TwilightEggs[i].y, TwilightEggs[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ }
else
- me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggsSarth[0].x, TwilightEggsSarth[0].y, TwilightEggsSarth[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ {
+ for(uint32 i = 0; i < 6; ++i)
+ me->SummonCreature(NPC_SARTHARION_TWILIGHT_EGG, TwilightEggsSarth[i].x, TwilightEggsSarth[i].y, TwilightEggsSarth[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ }
break;
}
case NPC_SHADRON:
{
iTextId = WHISPER_OPEN_PORTAL;
- if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ if(pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
+ me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
else
- me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
break;
}
case NPC_VESPERON:
{
+ iTextId = WHISPER_OPEN_PORTAL;
if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ {
+ if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000))
+ {
+ me->InterruptNonMeleeSpells(true);
+ Acolyte->InterruptNonMeleeSpells(true);
+ me->CastSpell(me, 32747, false);
+ }
+ }
else
- me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
+ {
+ if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000))
+ {
+ me->InterruptNonMeleeSpells(true);
+ Acolyte->InterruptNonMeleeSpells(true);
+ me->CastSpell(me, 32747, false);
+ }
+ }
- iTextId = WHISPER_OPEN_PORTAL;
- break;
+ break;
}
}
@@ -742,7 +899,7 @@ struct dummy_dragonAI : public ScriptedAI
//Refresh respawnTime so time again are set to 30secs?
}
- void JustDied(Unit* /*pKiller*/)
+ void JustDied(Unit* pKiller)
{
int32 iTextId = 0;
uint32 uiSpellId = 0;
@@ -752,23 +909,39 @@ struct dummy_dragonAI : public ScriptedAI
case NPC_TENEBRON:
iTextId = SAY_TENEBRON_DEATH;
uiSpellId = SPELL_POWER_OF_TENEBRON;
+ if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
+ pInstance->SetData(TYPE_TENEBRON_PREKILLED, 1);
break;
case NPC_SHADRON:
iTextId = SAY_SHADRON_DEATH;
uiSpellId = SPELL_POWER_OF_SHADRON;
+ if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
+ pInstance->SetData(TYPE_SHADRON_PREKILLED, 1);
+ if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f))
+ {
+ pAcolyte->Kill(pAcolyte);
+ }
break;
case NPC_VESPERON:
iTextId = SAY_VESPERON_DEATH;
uiSpellId = SPELL_POWER_OF_VESPERON;
+ if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
+ pInstance->SetData(TYPE_VESPERON_PREKILLED, 1);
+ if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f))
+ {
+ pAcolyte->Kill(pAcolyte);
+ }
break;
}
DoScriptText(iTextId, me);
- me->RemoveOwnedAura(uiSpellId);
+ me->RemoveAurasDueToSpell(uiSpellId);
if (pInstance)
{
+ pInstance->DoRemoveAurasDueToSpellOnPlayers(uiSpellId);
+
// not if solo mini-boss fight
if (pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
return;
@@ -776,7 +949,10 @@ struct dummy_dragonAI : public ScriptedAI
// Twilight Revenge to main boss
if (Unit* pSartharion = Unit::GetUnit((*me), pInstance->GetData64(DATA_SARTHARION)))
if (pSartharion->isAlive())
+ {
+ pSartharion->RemoveAurasDueToSpell(uiSpellId);
DoCast(pSartharion, SPELL_TWILIGHT_REVENGE, true);
+ }
}
}
@@ -786,11 +962,11 @@ struct dummy_dragonAI : public ScriptedAI
{
if (m_uiMoveNextTimer <= uiDiff)
{
- if (m_uiWaypointId < MAX_WAYPOINT)
+ if(m_uiWaypointId < MAX_WAYPOINT)
me->GetMotionMaster()->MovePoint(m_uiWaypointId,
m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ);
- debug_log("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId);
+// debug_log("dummy_dragonAI: %s moving to point %u", me->GetName(), m_uiWaypointId);
m_uiMoveNextTimer = 0;
}
else
@@ -811,25 +987,27 @@ struct mob_tenebronAI : public dummy_dragonAI
uint32 m_uiShadowFissureTimer;
uint32 m_uiHatchEggTimer;
+ bool m_bHasPortalOpen;
+
void Reset()
{
m_uiShadowBreathTimer = 20000;
m_uiShadowFissureTimer = 5000;
m_uiHatchEggTimer = 30000;
+
+ m_bHasPortalOpen = false;
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* pWho)
{
DoScriptText(SAY_TENEBRON_AGGRO, me);
DoZoneInCombat();
DoCast(me, SPELL_POWER_OF_TENEBRON);
}
- void KilledUnit(Unit* /*pVictim*/)
+ void KilledUnit(Unit* pVictim)
{
DoScriptText(RAND(SAY_TENEBRON_SLAY_1,SAY_TENEBRON_SLAY_2), me);
- /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- achievProgress = 1;*/
}
void UpdateAI(const uint32 uiDiff)
@@ -852,7 +1030,7 @@ struct mob_tenebronAI : public dummy_dragonAI
else
m_uiShadowFissureTimer -= uiDiff;
- // Hach Egg
+ // Hatch Egg
if (m_uiHatchEggTimer <= uiDiff)
{
OpenPortal();
@@ -871,6 +1049,10 @@ struct mob_tenebronAI : public dummy_dragonAI
else
m_uiShadowBreathTimer -= uiDiff;
+ // Don't attack current target if he's not visible for us.
+ if(me->getVictim() && me->getVictim()->HasAura(57874, 0))
+ me->getThreatManager().modifyThreatPercent(me->getVictim(), -100);
+
DoMeleeAttackIfReady();
}
};
@@ -892,6 +1074,8 @@ struct mob_shadronAI : public dummy_dragonAI
uint32 m_uiShadowFissureTimer;
uint32 m_uiAcolyteShadronTimer;
+ bool m_bHasPortalOpen;
+
void Reset()
{
m_uiShadowBreathTimer = 20000;
@@ -903,20 +1087,20 @@ struct mob_shadronAI : public dummy_dragonAI
if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
me->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA);
+
+ m_bHasPortalOpen = false;
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* pWho)
{
DoScriptText(SAY_SHADRON_AGGRO,me);
DoZoneInCombat();
DoCast(me, SPELL_POWER_OF_SHADRON);
}
- void KilledUnit(Unit* /*pVictim*/)
+ void KilledUnit(Unit* pVictim)
{
DoScriptText(RAND(SAY_SHADRON_SLAY_1,SAY_SHADRON_SLAY_2), me);
- /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- achievProgress = 2;*/
}
void UpdateAI(const uint32 uiDiff)
@@ -942,11 +1126,17 @@ struct mob_shadronAI : public dummy_dragonAI
// Portal Event
if (m_uiAcolyteShadronTimer <= uiDiff)
{
- if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
- return;
+ if(m_bHasPortalOpen)
+ m_uiAcolyteShadronTimer = 10000;
+ else
+ {
+ if (me->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
+ return;
- OpenPortal();
- m_uiAcolyteShadronTimer = urand(60000,65000);
+ OpenPortal();
+ m_bHasPortalOpen = true;
+ m_uiAcolyteShadronTimer = urand(60000,65000);
+ }
}
else
m_uiAcolyteShadronTimer -= uiDiff;
@@ -961,6 +1151,10 @@ struct mob_shadronAI : public dummy_dragonAI
else
m_uiShadowBreathTimer -= uiDiff;
+ // Don't attack current target if he's not visible for us.
+ if(me->getVictim() && me->getVictim() && me->getVictim()->HasAura(57874, 0))
+ me->getThreatManager().modifyThreatPercent(me->getVictim(), -100);
+
DoMeleeAttackIfReady();
}
};
@@ -982,25 +1176,27 @@ struct mob_vesperonAI : public dummy_dragonAI
uint32 m_uiShadowFissureTimer;
uint32 m_uiAcolyteVesperonTimer;
+ bool m_bHasPortalOpen;
+
void Reset()
{
m_uiShadowBreathTimer = 20000;
m_uiShadowFissureTimer = 5000;
m_uiAcolyteVesperonTimer = 60000;
+
+ m_bHasPortalOpen = false;
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* pWho)
{
DoScriptText(SAY_VESPERON_AGGRO,me);
DoZoneInCombat();
DoCast(me, SPELL_POWER_OF_VESPERON);
}
- void KilledUnit(Unit* /*pVictim*/)
+ void KilledUnit(Unit* pVictim)
{
DoScriptText(RAND(SAY_VESPERON_SLAY_1,SAY_VESPERON_SLAY_2), me);
- /*if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- achievProgress = 3;*/
}
void UpdateAI(const uint32 uiDiff)
@@ -1026,9 +1222,14 @@ struct mob_vesperonAI : public dummy_dragonAI
// Portal Event
if (m_uiAcolyteVesperonTimer <= uiDiff)
{
- OpenPortal();
- DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP);
- m_uiAcolyteVesperonTimer = urand(60000,70000);
+ if(m_bHasPortalOpen)
+ m_uiAcolyteVesperonTimer = 10000;
+ else
+ {
+ OpenPortal();
+ DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP);
+ m_uiAcolyteVesperonTimer = urand(60000,70000);
+ }
}
else
m_uiAcolyteVesperonTimer -= uiDiff;
@@ -1043,6 +1244,10 @@ struct mob_vesperonAI : public dummy_dragonAI
else
m_uiShadowBreathTimer -= uiDiff;
+ // Don't attack current target if he's not visible for us.
+ if(me->getVictim() && me->getVictim()->HasAura(57874, 0))
+ me->getThreatManager().modifyThreatPercent(me->getVictim(), -100);
+
DoMeleeAttackIfReady();
}
};
@@ -1061,43 +1266,49 @@ struct mob_acolyte_of_shadronAI : public ScriptedAI
mob_acolyte_of_shadronAI(Creature* pCreature) : ScriptedAI(pCreature)
{
pInstance = pCreature->GetInstanceData();
+ Reset();
}
ScriptedInstance* pInstance;
- uint32 uiShiftEffectTimer;
-
+ uint32 uiDespawnTimer;
+
void Reset()
{
- uiShiftEffectTimer = 1000;
+ uiDespawnTimer = 28000;
if (pInstance)
{
- Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 999, true);
-
- Creature* pSartharion = Unit::GetCreature(*me, pInstance->GetData64(DATA_SARTHARION));
- if (Creature* pShadron = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON)))
+ Creature* pTarget = NULL;
//if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT
if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- pSartharion->CastSpell(me, SPELL_GIFT_OF_TWILIGTH_SAR, true);
+ {
+ if(pTarget = ((Creature*)Unit::GetUnit((*me), pInstance->GetData64(DATA_SARTHARION))))
+ pTarget->AddAura(SPELL_GIFT_OF_TWILIGTH_SAR, pTarget);
+ }
else
{
- pShadron->CastSpell(me, SPELL_GIFT_OF_TWILIGTH_SHA,true);
- pShadron->AddThreat(pTarget, 100.0f);
- AttackStart(pShadron->getVictim());
+ if(pTarget = ((Creature*)Unit::GetUnit((*me), pInstance->GetData64(DATA_SHADRON))))
+ pTarget->AddAura(SPELL_GIFT_OF_TWILIGTH_SHA, pTarget);
}
- }
- me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me);
+ }
+ me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* killer)
{
if (pInstance)
{
- //Creature* pDebuffTarget = NULL;
+ Creature* Shadron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SHADRON));
+ if(Shadron)
+ {
+ ((mob_shadronAI*)Shadron->AI())->m_bHasPortalOpen = false;
+ }
+
+ Creature* pDebuffTarget = NULL;
Map *map = me->GetMap();
if (map->IsDungeon())
{
Map::PlayerList const &PlayerList = map->GetPlayers();
-
+
if (PlayerList.isEmpty())
return;
@@ -1110,28 +1321,31 @@ struct mob_acolyte_of_shadronAI : public ScriptedAI
i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
}
- }
+ }
}
- if (pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
- {
- //not solo fight, so main boss has deduff
- Creature* pDebuffTarget = Unit::GetCreature(*me, pInstance->GetData64(DATA_SARTHARION));
- if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR))
- pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR);
- }
- else
- {
- //event not in progress, then solo fight and must remove debuff mini-boss
- Creature* pDebuffTarget = Unit::GetCreature(*me, pInstance->GetData64(DATA_SHADRON));
- if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
- pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA);
- }
+ //not solo fight, so main boss has deduff
+ pDebuffTarget = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SARTHARION));
+ if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR))
+ pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR);
+
+ //event not in progress, then solo fight and must remove debuff mini-boss
+ pDebuffTarget = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SHADRON));
+ if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA))
+ pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA);
}
}
- void UpdateAI(const uint32 /*uiDiff*/)
+ void UpdateAI(const uint32 uiDiff)
{
+ if(uiDespawnTimer < uiDiff)
+ {
+ me->SetVisibility(VISIBILITY_OFF);
+ me->Kill(me);
+ uiDespawnTimer = 28000;
+ return;
+ }else uiDespawnTimer -= uiDiff;
+
if (!UpdateVictim())
return;
@@ -1156,26 +1370,32 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI
}
ScriptedInstance* pInstance;
+ uint32 uiDespawnTimer;
void Reset()
{
+ uiDespawnTimer = 28000;
if (pInstance)
{
- me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me);
+ me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me);
}
DoCast(me, SPELL_TWILIGHT_TORMENT_VESP_ACO);
}
- void JustDied(Unit* /*pKiller*/)
+ void JustDied(Unit* pKiller)
{
+ me->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP_ACO);
+
// remove twilight torment on Vesperon
if (pInstance)
{
- Creature* pVesperon = Unit::GetCreature(*me, pInstance->GetData64(DATA_VESPERON));
+ Creature* pVesperon = pInstance->instance->GetCreature(pInstance->GetData64(DATA_VESPERON));
+ if (pVesperon)
+ ((mob_vesperonAI*)pVesperon->AI())->m_bHasPortalOpen = false;
if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP))
pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
-
+
Map *map = me->GetMap();
if (map->IsDungeon())
{
@@ -1194,15 +1414,26 @@ struct mob_acolyte_of_vesperonAI : public ScriptedAI
i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT_ENTER);
}
if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_TWILIGHT_TORMENT_VESP,0) && !i->getSource()->getVictim())
- i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_SHIFT);
+ i->getSource()->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP);
}
}
+ pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_TWILIGHT_TORMENT_VESP_ACO);
+ pInstance->DoRemoveAurasDueToSpellOnPlayers(57935);
+ pInstance->DoRemoveAurasDueToSpellOnPlayers(58835); // Components of spell Twilight Torment
}
}
- void UpdateAI(const uint32 /*uiDiff*/)
+ void UpdateAI(const uint32 uiDiff)
{
+ if(uiDespawnTimer < uiDiff)
+ {
+ me->SetVisibility(VISIBILITY_OFF);
+ me->Kill(me);
+ uiDespawnTimer = 28000;
+ return;
+ }else uiDespawnTimer -= uiDiff;
+
if (!UpdateVictim())
return;
@@ -1222,9 +1453,10 @@ CreatureAI* GetAI_mob_acolyte_of_vesperon(Creature* pCreature)
struct mob_twilight_eggsAI : public Scripted_NoMovementAI
{
mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature)
- {
+ {
pInstance = pCreature->GetInstanceData();
}
+
uint32 m_uiFadeArmorTimer;
uint32 m_uiHatchEggTimer;
@@ -1232,28 +1464,46 @@ struct mob_twilight_eggsAI : public Scripted_NoMovementAI
void Reset()
{
- m_uiHatchEggTimer = 20000;
+ if(pInstance)
+ {
+ me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me);
+ }
m_uiFadeArmorTimer = 1000;
+ m_uiHatchEggTimer = 20000;
}
+
void SpawnWhelps()
{
+ me->RemoveAllAuras();
+
if (!pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
me->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
- else
+ else
me->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
me->DealDamage(me, me->GetHealth());
}
+
+ void JustSummoned(Creature* pWho)
+ {
+ pWho->SetInCombatWithZone();
+ }
+
void UpdateAI(const uint32 uiDiff)
{
if (m_uiHatchEggTimer <= uiDiff)
{
+ Creature* Tenebron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_TENEBRON));
+ if(Tenebron)
+ ((mob_tenebronAI*)Tenebron->AI())->m_bHasPortalOpen = false;
SpawnWhelps();
}
else
- m_uiHatchEggTimer -= uiDiff;
+ m_uiHatchEggTimer -= uiDiff;
}
- void AttackStart(Unit* /*pWho*/) {}
- void MoveInLineOfSight(Unit* /*pWho*/) {}
+
+
+ void AttackStart(Unit* pWho) {}
+ void MoveInLineOfSight(Unit* pWho) {}
};
CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature)
@@ -1262,33 +1512,46 @@ CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature)
}
/*######
-## Flame Tzunami
+## Mob Flame Tsunami
######*/
struct npc_flame_tsunamiAI : public ScriptedAI
{
npc_flame_tsunamiAI(Creature* pCreature) : ScriptedAI(pCreature)
{
- me->HasAura(SPELL_FLAME_TSUNAMI_DMG_AURA);
- DoCast(me, SPELL_FLAME_TSUNAMI);
+ me->SetDisplayId(11686);
+ me->AddAura(SPELL_FLAME_TSUNAMI, me);
}
uint32 Tsunami_Timer;
+ uint32 TsunamiBuff_timer;
+ uint32 entry;
void Reset()
{
Tsunami_Timer = 100;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ TsunamiBuff_timer = 1000;
+ entry = 0;
}
-
+
void UpdateAI(const uint32 diff)
{
if (Tsunami_Timer <= diff)
{
- DoCast(me, SPELL_FLAME_TSUNAMI_DMG_AURA);
- Tsunami_Timer = 1000;
- } else Tsunami_Timer -= diff;
+ DoCast(me,SPELL_FLAME_TSUNAMI_DMG_AURA);
+ Tsunami_Timer = 500;
+ }else Tsunami_Timer -= diff;
+
+ if(TsunamiBuff_timer <= diff)
+ {
+ if (Unit* LavaBlaze = GetClosestCreatureWithEntry(me,NPC_LAVA_BLAZE, 10.0f, true))
+ LavaBlaze->CastSpell(LavaBlaze, SPELL_FLAME_TSUNAMI_BUFF, true);
+ TsunamiBuff_timer = 1000;
+ }else TsunamiBuff_timer -= diff;
}
};
+
// Twilight Fissure
struct npc_twilight_fissureAI : public Scripted_NoMovementAI
{
@@ -1301,6 +1564,10 @@ struct npc_twilight_fissureAI : public Scripted_NoMovementAI
void Reset()
{
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddAura( 46265 , me ); // Wrong, can't find proper visual
+ me->AddAura( 69422 , me );
VoidBlast_Timer = 5000;
}
@@ -1308,8 +1575,12 @@ struct npc_twilight_fissureAI : public Scripted_NoMovementAI
{
if (VoidBlast_Timer <= diff)
{
- DoCast(me->getVictim(), RAID_MODE(SPELL_VOID_BLAST, SPELL_VOID_BLAST_H));
+ DoCastAOE(RAID_MODE(SPELL_VOID_BLAST, SPELL_VOID_BLAST_H));
+ ////twilight realm
+ //DoCast(me->getVictim(), 57620, true);
+ //DoCast(me->getVictim(), 57874, true);
VoidBlast_Timer = 9000;
+ me->RemoveAllAuras();
me->Kill(me);
} else VoidBlast_Timer -= diff;
}
@@ -1332,12 +1603,17 @@ CreatureAI* GetAI_npc_twilight_fissure(Creature* pCreature)
struct mob_twilight_whelpAI : public ScriptedAI
{
- mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) {}
+ mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ Reset();
+ }
uint32 m_uiFadeArmorTimer;
void Reset()
{
+ me->RemoveAllAuras();
+ me->SetInCombatWithZone();
m_uiFadeArmorTimer = 1000;
}
diff --git a/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp
index 7ef8e03c779..4cb38db3a28 100644
--- a/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp
+++ b/src/server/scripts/Northrend/ObsidianSanctum/instance_obsidian_sanctum.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "obsidian_sanctum.h"
#define MAX_ENCOUNTER 1
@@ -17,6 +34,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance
uint64 m_uiShadronGUID;
uint64 m_uiVesperonGUID;
+ bool m_bTenebronKilled;
+ bool m_bShadronKilled;
+ bool m_bVesperonKilled;
+
void Initialize()
{
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
@@ -25,6 +46,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance
m_uiTenebronGUID = 0;
m_uiShadronGUID = 0;
m_uiVesperonGUID = 0;
+
+ m_bTenebronKilled = false;
+ m_bShadronKilled = false;
+ m_bVesperonKilled = false;
}
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
@@ -55,12 +80,24 @@ struct instance_obsidian_sanctum : public ScriptedInstance
{
if (uiType == TYPE_SARTHARION_EVENT)
m_auiEncounter[0] = uiData;
+ else if(uiType == TYPE_TENEBRON_PREKILLED)
+ m_bTenebronKilled = true;
+ else if(uiType == TYPE_SHADRON_PREKILLED)
+ m_bShadronKilled = true;
+ else if(uiType == TYPE_VESPERON_PREKILLED)
+ m_bVesperonKilled = true;
}
uint32 GetData(uint32 uiType)
{
if (uiType == TYPE_SARTHARION_EVENT)
return m_auiEncounter[0];
+ else if(uiType == TYPE_TENEBRON_PREKILLED)
+ return m_bTenebronKilled;
+ else if(uiType == TYPE_SHADRON_PREKILLED)
+ return m_bShadronKilled;
+ else if(uiType == TYPE_VESPERON_PREKILLED)
+ return m_bVesperonKilled;
return 0;
}
diff --git a/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h b/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h
index 59013174795..43825d04f47 100644
--- a/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h
+++ b/src/server/scripts/Northrend/ObsidianSanctum/obsidian_sanctum.h
@@ -1,9 +1,29 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_OBSIDIAN_SANCTUM_H
#define DEF_OBSIDIAN_SANCTUM_H
enum eTypes
{
TYPE_SARTHARION_EVENT = 1,
+ TYPE_TENEBRON_PREKILLED = 2,
+ TYPE_SHADRON_PREKILLED = 3,
+ TYPE_VESPERON_PREKILLED = 4,
DATA_SARTHARION = 10,
DATA_TENEBRON = 11,
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
index c2da2a24e71..aa0be07d7bd 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_bjarngrim.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Waypoint needed, we expect boss to always have 2x Stormforged Lieuten
SDCategory: Halls of Lightning
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_lightning.h"
enum eEnums
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
index ecf61188b3e..88c240b49bd 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
@@ -1,25 +1,26 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Comment: Timer check pending
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_lightning.h"
enum Spells
@@ -93,10 +94,10 @@ struct boss_ionarAI : public ScriptedAI
bIsSplitPhase = true;
bHasDispersed = false;
- uiSplitTimer = 25*IN_MILISECONDS;
+ uiSplitTimer = 25*IN_MILLISECONDS;
- uiStaticOverloadTimer = urand(5*IN_MILISECONDS, 6*IN_MILISECONDS);
- uiBallLightningTimer = urand(10*IN_MILISECONDS, 11*IN_MILISECONDS);
+ uiStaticOverloadTimer = urand(5*IN_MILLISECONDS, 6*IN_MILLISECONDS);
+ uiBallLightningTimer = urand(10*IN_MILLISECONDS, 11*IN_MILLISECONDS);
uiDisperseHealth = 45 + urand(0,10);
@@ -199,7 +200,7 @@ struct boss_ionarAI : public ScriptedAI
{
if (uiSplitTimer <= uiDiff)
{
- uiSplitTimer = 2.5*IN_MILISECONDS;
+ uiSplitTimer = 2.5*IN_MILLISECONDS;
// Return sparks to where Ionar splitted
if (bIsSplitPhase)
@@ -215,7 +216,7 @@ struct boss_ionarAI : public ScriptedAI
DoCast(me, SPELL_SPARK_DESPAWN, false);
- uiSplitTimer = 25*IN_MILISECONDS;
+ uiSplitTimer = 25*IN_MILLISECONDS;
bIsSplitPhase = true;
if (me->getVictim())
@@ -233,7 +234,7 @@ struct boss_ionarAI : public ScriptedAI
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_STATIC_OVERLOAD);
- uiStaticOverloadTimer = urand(5*IN_MILISECONDS, 6*IN_MILISECONDS);
+ uiStaticOverloadTimer = urand(5*IN_MILLISECONDS, 6*IN_MILLISECONDS);
}
else
uiStaticOverloadTimer -= uiDiff;
@@ -241,7 +242,7 @@ struct boss_ionarAI : public ScriptedAI
if (uiBallLightningTimer <= uiDiff)
{
DoCast(me->getVictim(), SPELL_BALL_LIGHTNING);
- uiBallLightningTimer = urand(10*IN_MILISECONDS, 11*IN_MILISECONDS);
+ uiBallLightningTimer = urand(10*IN_MILLISECONDS, 11*IN_MILLISECONDS);
}
else
uiBallLightningTimer -= uiDiff;
@@ -309,7 +310,7 @@ struct mob_spark_of_ionarAI : public ScriptedAI
void Reset()
{
- uiCheckTimer = 2*IN_MILISECONDS;
+ uiCheckTimer = 2*IN_MILLISECONDS;
me->SetReactState(REACT_PASSIVE);
}
@@ -357,7 +358,7 @@ struct mob_spark_of_ionarAI : public ScriptedAI
else
me->ForcedDespawn();
}
- uiCheckTimer = 2*IN_MILISECONDS;
+ uiCheckTimer = 2*IN_MILLISECONDS;
}
else
uiCheckTimer -= uiDiff;
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
index f08c19efca2..e0a55a79ccd 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_loken.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing intro. Remove hack of Pulsing Shockwave when core supports. A
SDCategory: Halls of Lightning
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_lightning.h"
enum eEnums
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
index 184050e3103..cb5878defb3 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_volkhan.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Not considered complete. Some events may fail and need further develo
SDCategory: Halls of Lightning
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_lightning.h"
enum eEnums
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h
index d9739fdf888..2c270d5796e 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/halls_of_lightning.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_HALLS_OF_LIGHTNING_H
#define DEF_HALLS_OF_LIGHTNING_H
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp
index 46cd5c9cccc..8dbcf8da23f 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/instance_halls_of_lightning.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: All ready.
SDCategory: Halls of Lightning
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_lightning.h"
/* Halls of Lightning encounters:
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index 0674b7c79eb..63b1de56c38 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss krystallus
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_krystallus' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_stone.h"
enum Spells
@@ -20,6 +37,9 @@ enum Spells
SPELL_GROUND_SLAM = 50827,
SPELL_SHATTER = 50810,
H_SPELL_SHATTER = 61546,
+ SPELL_SHATTER_EFFECT = 50811,
+ H_SPELL_SHATTER_EFFECT = 61547,
+ SPELL_STONED = 50812,
SPELL_STOMP = 48131,
H_SPELL_STOMP = 59744
};
@@ -108,8 +128,7 @@ struct boss_krystallusAI : public ScriptedAI
{
if (uiShatterTimer <= diff)
{
- DoCast(me, SPELL_SHATTER);
- bIsSlam = false;
+ DoCast(me, DUNGEON_MODE(SPELL_SHATTER, H_SPELL_SHATTER));
} else uiShatterTimer -= diff;
}
@@ -130,6 +149,32 @@ struct boss_krystallusAI : public ScriptedAI
return;
DoScriptText(SAY_KILL, me);
}
+
+ void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell)
+ {
+ //this part should be in the core
+ if (pSpell->Id == SPELL_SHATTER || pSpell->Id == H_SPELL_SHATTER)
+ {
+ //this spell must have custom handling in the core, dealing damage based on distance
+ pTarget->CastSpell(pTarget, DUNGEON_MODE(SPELL_SHATTER_EFFECT, H_SPELL_SHATTER_EFFECT), true);
+
+ if (pTarget->HasAura(SPELL_STONED))
+ pTarget->RemoveAurasDueToSpell(SPELL_STONED);
+
+ //clear this, if we are still performing
+ if (bIsSlam)
+ {
+ bIsSlam = false;
+
+ //and correct movement, if not already
+ if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE)
+ {
+ if (me->getVictim())
+ me->GetMotionMaster()->MoveChase(me->getVictim());
+ }
+ }
+ }
+ }
};
CreatureAI* GetAI_boss_krystallus(Creature* pCreature)
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 b3c3c675347..e7fde3dcea7 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
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss maiden_of_grief
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_maiden_of_grief' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_stone.h"
enum Spells
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
index 68c3e34e6bf..1cab83db949 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss sjonnir
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_sjonnir' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "halls_of_stone.h"
enum Spells
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 8febdaab879..d7e7f495cfb 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "halls_of_stone.h"
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h
index b61e7057ddc..06a405390d2 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_HALLS_OF_STONE_H
#define DEF_HALLS_OF_STONE_H
enum Data
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp
index 69bb3779e70..e4bbcdd9690 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "halls_of_stone.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp
index e944543fb9e..5019bb29d21 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_algalon.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
#define GAMEOBJECT_GIVE_OF_THE_OBSERVER 194821
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 8d3ae4d3431..98fac4f80d2 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
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -23,7 +22,7 @@ SDComment: Runes need DB support, chain lightning won't cast, supercharge won't
SDCategory: Ulduar - Ulduar
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
// Any boss
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp
index 41c0f317f4e..da3d671eb6d 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_auriaya.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
//boss_auriaya
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 b50f12805a4..0d462097213 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
@@ -1,29 +1,29 @@
/*
- * Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
- * Comment: Tower Event support is not finished, there is missing code on triggers and
- * Lore Keeper and Brann Bronzebeard are not scripted yet. Lore Keeper's script
- * should activate the hard mode so is not possible to play hard-mode yet. Add a call to
- * Leviathan's DoAction(0) from Lore Keeper's script to activate hard-mode
+ * Comment: there is missing code on triggers,
+ * brann bronzebeard needs correct gossip info.
+ * requires more work involving area triggers.
+ * if reached brann speaks through his radio..
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
+#include "ScriptedEscortAI.h"
#include "ulduar.h"
#include "Vehicle.h"
@@ -36,19 +36,32 @@ enum Spells
SPELL_MISSILE_BARRAGE = 62400,
SPELL_SYSTEMS_SHUTDOWN = 62475,
- SPELL_FLAME_CANNON = 62395,
-// SPELL_FLAME_CANNON = 64692, trigger the same spell
-
SPELL_OVERLOAD_CIRCUIT = 62399,
+ SPELL_START_THE_ENGINE = 62472,
SPELL_SEARING_FLAME = 62402,
SPELL_BLAZE = 62292,
SPELL_SMOKE_TRAIL = 63575,
SPELL_ELECTROSHOCK = 62522,
- //TOWER BUFF SPELLS
- SPELL_THORIM_S_HAMMER = 62912, // Tower of Storms
- SPELL_MIMIRON_S_INFERNO = 62910, // Tower of Flames
- SPELL_HODIR_S_FURY = 62297, // Tower of Frost
- SPELL_FREYA_S_WARD = 62906 // Tower of Nature
+ //TOWER Additional SPELLS
+ SPELL_THORIM_S_HAMMER = 62911, // Tower of Storms
+ SPELL_MIMIRON_S_INFERNO = 62909, // Tower of Flames
+ SPELL_HODIR_S_FURY = 62533, // Tower of Frost
+ SPELL_FREYA_S_WARD = 62906, // Tower of Nature
+ SPELL_FREYA_SUMMONS = 62947, // Tower of Nature
+ //TOWER ap & health spells
+ SPELL_BUFF_TOWER_OF_STORMS = 65076,
+ SPELL_BUFF_TOWER_OF_FLAMES = 65075,
+ SPELL_BUFF_TOWER_OF_FR0ST = 65077,
+ SPELL_BUFF_TOWER_OF_LIFE = 64482,
+ //Additional Spells
+ SPELL_LASH = 65062,
+ SPELL_FREYA_S_WARD_EFFECT_1 = 62947,
+ SPELL_FREYA_S_WARD_EFFECT_2 = 62907,
+ SPELL_AUTO_REPAIR = 62705,
+ AURA_DUMMY_BLUE = 63294,
+ AURA_DUMMY_GREEN = 63295,
+ AURA_DUMMY_YELLOW = 63292,
+ SPELL_LIQUID_PYRITE = 62494,
};
enum Creatures
@@ -56,6 +69,25 @@ enum Creatures
MOB_MECHANOLIFT = 33214,
MOB_LIQUID = 33189,
MOB_CONTAINER = 33218,
+ MOB_THORIM_BEACON = 33365,
+ MOB_MIMIRON_BEACON = 33370,
+ MOB_HODIR_BEACON = 33212,
+ MOB_FREYA_BEACON = 33367,
+ NPC_THORIM_TARGET_BEACON = 33364,
+ NPC_MIMIRON_TARGET_BEACON = 33369,
+ NPC_HODIR_TARGET_BEACON = 33108,
+ NPC_FREYA_TARGET_BEACON = 33366,
+ NPC_LOREKEEPER = 33686, //Hard mode starter
+ NPC_BRANZ_BRONZBEARD = 33579,
+ NPC_DELORAH = 33701,
+};
+
+enum Towers
+{
+ GO_TOWER_OF_STORMS = 194377,
+ GO_TOWER_OF_FLAMES = 194371,
+ GO_TOWER_OF_FROST = 194370,
+ GO_TOWER_OF_LIFE = 194375,
};
enum Events
@@ -66,10 +98,11 @@ enum Events
EVENT_VENT,
EVENT_SPEED,
EVENT_SUMMON,
+ EVENT_SHUTDOWN,
EVENT_THORIM_S_HAMMER, // Tower of Storms
EVENT_MIMIRON_S_INFERNO, // Tower of Flames
EVENT_HODIR_S_FURY, // Tower of Frost
- EVENT_FREYA_S_WARD // Tower of Nature
+ EVENT_FREYA_S_WARD, // Tower of Nature
};
enum Seats
@@ -79,6 +112,17 @@ enum Seats
SEAT_DEVICE = 2,
};
+enum Vehicles
+{
+ VEHICLE_SIEGE = 33060,
+ VEHICLE_CHOPPER = 33062,
+ 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."
+
enum Yells
{
SAY_AGGRO = -1603060,
@@ -101,24 +145,24 @@ enum Yells
enum eAchievementData
{
- //ACHIEV_CHAMPION_OF_ULDUAR = 10042,
- //ACHIEV_CONQUEROR_OF_ULDUAR = 10352,
- ACHIEV_10_NUKED_FROM_ORBIT = 10058,
- ACHIEV_25_NUKED_FROM_ORBIT = 10060,
- ACHIEV_10_ORBITAL_BOMBARDMENT = 10056,
- ACHIEV_25_ORBITAL_BOMBARDMENT = 10061,
- ACHIEV_10_ORBITAL_DEVASTATION = 10057,
- ACHIEV_25_ORBITAL_DEVASTATION = 10059,
- ACHIEV_10_ORBIT_UARY = 10218,
- ACHIEV_25_ORBIT_UARY = 10219,
- ACHIEV_10_SHUTOUT = 10054,
- ACHIEV_25_SHUTOUT = 10055,
- ACHIEV_10_SIEGE_OF_ULDUAR = 9999,
- ACHIEV_25_SIEGE_OF_ULDUAR = 10003,
- //ACHIEV_10_THREE_CAR_GARAGE = 10046, 10047, 10048,
- //ACHIEV_25_THREE_CAR_GARAGE = 10049, 10050, 10051,
- ACHIEV_10_UNBROKEN = 10044,
- ACHIEV_25_UNBROKEN = 10045,
+ //ACHIEV_CHAMPION_OF_ULDUAR = 2903,
+ //ACHIEV_CONQUEROR_OF_ULDUAR = 2904,
+ ACHIEV_10_NUKED_FROM_ORBIT = 2915,
+ ACHIEV_25_NUKED_FROM_ORBIT = 2917,
+ ACHIEV_10_ORBITAL_BOMBARDMENT = 2913,
+ ACHIEV_25_ORBITAL_BOMBARDMENT = 2918,
+ ACHIEV_10_ORBITAL_DEVASTATION = 2914,
+ ACHIEV_25_ORBITAL_DEVASTATION = 2916,
+ ACHIEV_10_ORBIT_UARY = 3056,
+ ACHIEV_25_ORBIT_UARY = 3057,
+ ACHIEV_10_SHUTOUT = 2911,
+ ACHIEV_25_SHUTOUT = 2912,
+ ACHIEV_10_SIEGE_OF_ULDUAR = 2886,
+ ACHIEV_25_SIEGE_OF_ULDUAR = 2887,
+ ACHIEV_10_THREE_CAR_GARAGE = 2907, //no core support for using a vehicle
+ ACHIEV_25_THREE_CAR_GARAGE = 2908, //no core support for using a vehicle
+ ACHIEV_10_UNBROKEN = 2905,
+ ACHIEV_25_UNBROKEN = 2906,
};
static Position Center[]=
@@ -126,38 +170,119 @@ static Position Center[]=
{354.8771, -12.90240, 409.803650},
};
+const Position PosSiege[5] =
+{
+ {-814.59,-64.54,429.92,5.969},
+ {-784.37,-33.31,429.92,5.096},
+ {-808.99,-52.10,429.92,5.668},
+ {-798.59,-44.00,429.92,5.663},
+ {-812.83,-77.71,429.92,0.046},
+};
+
+const Position PosChopper[5] =
+{
+ {-717.83,-106.56,430.02,0.122},
+ {-717.83,-114.23,430.44,0.122},
+ {-717.83,-109.70,430.22,0.122},
+ {-718.45,-118.24,430.26,0.052},
+ {-718.45,-123.58,430.41,0.085},
+};
+
+const Position PosDemolisher[5] =
+{
+ {-724.12,-176.64,430.03,2.543},
+ {-766.70,-225.03,430.50,1.710},
+ {-729.54,-186.26,430.12,1.902},
+ {-756.01,-219.23,430.50,2.369},
+ {-798.01,-227.24,429.84,1.446},
+};
+
struct boss_flame_leviathanAI : public BossAI
{
boss_flame_leviathanAI(Creature* pCreature) : BossAI(pCreature, TYPE_LEVIATHAN), vehicle(pCreature->GetVehicleKit())
{
assert(vehicle);
-
- pInstance = pCreature->GetInstanceData();
+ pInstance = me->GetInstanceData();
+ uiActiveTowers = 4;
+ ActiveTowers = false;
+ towerOfStorms = false;
+ towerOfLife = false;
+ towerOfFlames = false;
+ towerOfFrost = false;
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
+ me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); //deathgrip
+
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
+ me->SetReactState(REACT_PASSIVE);
}
ScriptedInstance* pInstance;
Vehicle* vehicle;
uint8 uiActiveTowers;
+ bool ActiveTowers;
+ bool towerOfStorms;
+ bool towerOfLife;
+ bool towerOfFlames;
+ bool towerOfFrost;
void Reset()
{
_Reset();
+ /*me->SetLootMode(LOOT_MODE_HARD_MODE_4);
+ me->SetLootMode(LOOT_MODE_HARD_MODE_3);
+ me->SetLootMode(LOOT_MODE_HARD_MODE_2);
+ me->SetLootMode(LOOT_MODE_HARD_MODE_1);*/
+ if (pInstance)
+ pInstance->SetData(TYPE_LEVIATHAN, NOT_STARTED);
assert(vehicle);
- uiActiveTowers = 0;
- me->SetReactState(REACT_AGGRESSIVE);
+ me->GetVehicleKit();
+ me->SetReactState(REACT_DEFENSIVE);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
- DoScriptText(SAY_AGGRO, me);
- me->SetReactState(REACT_DEFENSIVE);
+ pInstance->SetData(TYPE_LEVIATHAN, IN_PROGRESS); //_Reset doesnt do this correctly
+ me->SetReactState(REACT_AGGRESSIVE);
events.ScheduleEvent(EVENT_PURSUE, 0);
events.ScheduleEvent(EVENT_MISSILE, 1500);
events.ScheduleEvent(EVENT_VENT, 20000);
events.ScheduleEvent(EVENT_SPEED, 15000);
events.ScheduleEvent(EVENT_SUMMON, 0);
+ if (ActiveTowers)
+ {
+ if (towerOfStorms)
+ {
+ me->AddAura(SPELL_BUFF_TOWER_OF_STORMS, me);
+ events.ScheduleEvent(EVENT_THORIM_S_HAMMER, 35000);
+ }
+
+ if (towerOfFlames)
+ {
+ me->AddAura(SPELL_BUFF_TOWER_OF_FLAMES, me);
+ events.ScheduleEvent(EVENT_MIMIRON_S_INFERNO,70000);
+ }
+
+ if (towerOfFrost)
+ {
+ me->AddAura(SPELL_BUFF_TOWER_OF_FR0ST, me);
+ events.ScheduleEvent(EVENT_HODIR_S_FURY, 105000);
+ }
+
+ if (towerOfLife)
+ {
+ me->AddAura(SPELL_BUFF_TOWER_OF_LIFE, me);
+ events.ScheduleEvent(EVENT_FREYA_S_WARD, 140000);
+ }
+
+ if (!towerOfLife && !towerOfFrost && !towerOfFlames && !towerOfStorms)
+ DoScriptText(SAY_TOWER_NONE, me);
+ else
+ DoScriptText(SAY_HARDMODE, me);
+ }
+ else
+ DoScriptText(SAY_AGGRO, me);
if (Creature *turret = CAST_CRE(vehicle->GetPassenger(SEAT_TURRET)))
turret->AI()->DoZoneInCombat();
@@ -170,39 +295,40 @@ struct boss_flame_leviathanAI : public BossAI
AttackStart(pTarget);
}
+
void JustDied(Unit* /*victim*/)
{
_JustDied();
+ pInstance->SetData(TYPE_LEVIATHAN, DONE); //_Reset doesnt do this correctly
DoScriptText(SAY_DEATH, me);
- if (pInstance)
+
+ if (ActiveTowers)
{
- if (uiActiveTowers)
+ switch (uiActiveTowers)
{
- switch (uiActiveTowers)
- {
- case 4:
- pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBIT_UARY, ACHIEV_25_ORBIT_UARY));
- break;
- case 3:
- pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_NUKED_FROM_ORBIT, ACHIEV_25_NUKED_FROM_ORBIT));
- break;
- case 2:
- pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_DEVASTATION, ACHIEV_25_ORBITAL_DEVASTATION));
- break;
- case 1:
- pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_BOMBARDMENT, ACHIEV_25_ORBITAL_BOMBARDMENT));
- break;
- }
+ case 4:
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBIT_UARY, ACHIEV_25_ORBIT_UARY));
+ break;
+ case 3:
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_NUKED_FROM_ORBIT, ACHIEV_25_NUKED_FROM_ORBIT));
+ break;
+ case 2:
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_DEVASTATION, ACHIEV_25_ORBITAL_DEVASTATION));
+ break;
+ case 1:
+ pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_10_ORBITAL_BOMBARDMENT, ACHIEV_25_ORBITAL_BOMBARDMENT));
+ break;
}
}
}
void SpellHit(Unit* /*caster*/, const SpellEntry* pSpell)
{
- if (pSpell->Id == 62472)
+ if (pSpell->Id == SPELL_START_THE_ENGINE)
vehicle->InstallAllAccessories();
- else if (pSpell->Id == SPELL_ELECTROSHOCK)
- me->InterruptSpell(CURRENT_CHANNELED_SPELL);
+ else
+ if (pSpell->Id == SPELL_ELECTROSHOCK)
+ me->InterruptSpell(CURRENT_CHANNELED_SPELL);
}
void UpdateAI(const uint32 diff)
@@ -221,60 +347,104 @@ struct boss_flame_leviathanAI : public BossAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
+ if (me->HasAura(SPELL_SYSTEMS_SHUTDOWN))
+ {
+ me->SetReactState(REACT_PASSIVE);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+ return;
+ }
+ else
+ {
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+ }
+
uint32 eventId = events.GetEvent();
if (!me->getVictim())
eventId = EVENT_PURSUE;
switch(eventId)
{
- case 0: break; // this is a must
- case EVENT_PURSUE:
- DoCastAOE(SPELL_PURSUED, true);
- //events.RepeatEvent(35000); // this should not be used because eventId may be overriden
- events.RescheduleEvent(EVENT_PURSUE, 35000);
- if (!me->getVictim()) // all siege engines and demolishers are dead
- UpdateVictim(); // begin to kill other things
- return;
- case EVENT_MISSILE:
- if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM))
- DoCast(pTarget, SPELL_MISSILE_BARRAGE);
- events.RepeatEvent(1500);
- return;
- case EVENT_VENT:
- DoCastAOE(SPELL_FLAME_VENTS);
- events.RepeatEvent(20000);
- return;
- case EVENT_SPEED:
- DoCastAOE(SPELL_GATHERING_SPEED);
- events.RepeatEvent(15000);
- return;
- case EVENT_SUMMON:
- if (summons.size() < 15) // 4seat+1turret+10lift
- if (Creature* pLift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0))
- pLift->GetMotionMaster()->MoveRandom(100);
- events.RepeatEvent(2000);
- return;
- case EVENT_THORIM_S_HAMMER: // Tower of Storms
- DoCast(me, SPELL_THORIM_S_HAMMER);
- events.RepeatEvent(urand(60000, 120000));
- return;
- case EVENT_MIMIRON_S_INFERNO: // Tower of Flames
- DoCast(me->getVictim(), SPELL_MIMIRON_S_INFERNO);
- events.RepeatEvent(urand(60000, 120000));
- return;
- case EVENT_HODIR_S_FURY: // Tower of Frost
- DoCast(me->getVictim(), SPELL_HODIR_S_FURY);
- events.RepeatEvent(urand(60000, 120000));
- return;
- case EVENT_FREYA_S_WARD: // Tower of Nature
- DoCast(me, SPELL_FREYA_S_WARD);
- events.RepeatEvent(urand(60000, 120000));
- return;
- default:
- events.PopEvent();
- break;
+ case 0: break; // this is a must
+ case EVENT_PURSUE:
+ DoCastAOE(SPELL_PURSUED, true);
+ DoScriptText(RAND(SAY_TARGET_1, SAY_TARGET_2, SAY_TARGET_3), me);
+ events.RescheduleEvent(EVENT_PURSUE, 30000);
+ UpdateVictim(); // begin to kill other things
+ if (me->getVictim())
+ me->MonsterTextEmote(EMOTE_PURSUE, me->getVictim()->GetGUID(), true);
+ return;
+ case EVENT_MISSILE:
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM))
+ DoCast(pTarget, SPELL_MISSILE_BARRAGE);
+ events.RepeatEvent(1500);
+ return;
+ case EVENT_VENT:
+ DoCastAOE(SPELL_FLAME_VENTS);
+ events.RepeatEvent(20000);
+ return;
+ case EVENT_SPEED:
+ DoCastAOE(SPELL_GATHERING_SPEED);
+ events.RepeatEvent(15000);
+ return;
+ case EVENT_SUMMON:
+ if (summons.size() < 15) // 4seat+1turret+10lift
+ if (Creature* pLift = DoSummonFlyer(MOB_MECHANOLIFT, me, urand(20,40), 50, 0))
+ pLift->GetMotionMaster()->MoveRandom(100);
+ events.RepeatEvent(2000);
+ return;
+ case EVENT_SHUTDOWN:
+ DoScriptText(RAND(SAY_OVERLOAD_1, SAY_OVERLOAD_2, SAY_OVERLOAD_3), me);
+ me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true);
+ DoCast(SPELL_SYSTEMS_SHUTDOWN);
+ me->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED);
+ me->MonsterTextEmote(EMOTE_REPAIR, 0, true);
+ events.CancelEvent(EVENT_SHUTDOWN);
+ return;
+ case EVENT_THORIM_S_HAMMER: // Tower of Storms
+ for (uint8 i = 0; i < 7; ++i)
+ {
+ if (Creature* pThorim = DoSummon(MOB_THORIM_BEACON, me, urand(20,60), 20000, TEMPSUMMON_TIMED_DESPAWN))
+ pThorim->GetMotionMaster()->MoveRandom(100);
+ }
+ DoScriptText(SAY_TOWER_STORM, me);
+ events.CancelEvent(EVENT_THORIM_S_HAMMER);
+ return;
+ case EVENT_MIMIRON_S_INFERNO: // Tower of Flames
+ me->SummonCreature(MOB_MIMIRON_BEACON, 390.93, -13.91, 409.81);
+ DoScriptText(SAY_TOWER_FLAME, me);
+ events.CancelEvent(EVENT_MIMIRON_S_INFERNO);
+ return;
+ case EVENT_HODIR_S_FURY: // Tower of Frost
+ for (uint8 i = 0; i < 7; ++i)
+ {
+ if (Creature* pHodir = DoSummon(MOB_HODIR_BEACON, me, 50, 0))
+ pHodir->GetMotionMaster()->MoveRandom(100);
+ }
+ DoScriptText(SAY_TOWER_FROST, me);
+ events.CancelEvent(EVENT_HODIR_S_FURY);
+ return;
+ case EVENT_FREYA_S_WARD: // Tower of Nature
+ DoScriptText(SAY_TOWER_NATURE, me);
+ StartFreyaEvent();
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM))
+ DoCast(pTarget, SPELL_FREYA_S_WARD);
+ events.CancelEvent(EVENT_FREYA_S_WARD);
+ return;
+ default:
+ events.PopEvent();
+ break;
}
- DoSpellAttackIfReady(SPELL_BATTERING_RAM);
+ if (me->IsWithinMeleeRange(me->getVictim()))
+ DoSpellAttackIfReady(SPELL_BATTERING_RAM);
+ }
+
+ void StartFreyaEvent()//summon these 4 on each corner wich wil spawn additional hostile mobs
+ {
+ me->SummonCreature(MOB_FREYA_BEACON, 377.02, -119.10, 409.81);
+ me->SummonCreature(MOB_FREYA_BEACON, 377.02, 54.78, 409.81);
+ me->SummonCreature(MOB_FREYA_BEACON, 185.62, 54.78, 409.81);
+ me->SummonCreature(MOB_FREYA_BEACON, 185.62, -119.10, 409.81);
}
void DoAction(const int32 uiAction)
@@ -282,51 +452,62 @@ struct boss_flame_leviathanAI : public BossAI
// Start encounter
if (uiAction == 10)
{
- me->GetMotionMaster()->MovePoint(0, Center[0]);
+ me->SetHomePosition(354.8771, -12.90240, 409.803, 0);
+ me->GetMotionMaster()->MoveCharge(354.8771, -12.90240, 409.803); //position center
me->SetReactState(REACT_AGGRESSIVE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
+ DoZoneInCombat();
return;
}
- /*
- Tower event triggers
- General TODO:
- Yells
-
- Actions:
- DoAction(0): Activate hard-mode. Buff up leviathan's AP & health, schedule all the tower spells.
- Should be triggered on Lore Keeper's script
- DoAction(1-4): A tower have been destroyed, debuff leviathan's AP & health
- DoAction(1); Tower of Storms has been destroyed, deschedule spell Thorim's Hammer
- DoAction(2): Tower of Flames has been destroyed, deschedule spell Mimiron's Inferno
- DoAction(3): Tower of Frost has been destroyed, deschedule spell Hodir's Fury
- DoAction(4): Tower of Nature has been destroyed, deschedule spell Freya's Ward
- */
-
- if (uiAction) // Tower destruction, debuff leviathan AP & health
+
+ if (uiAction && uiAction <= 4) // Tower destruction, debuff leviathan loot and reduce active tower
{
- --uiActiveTowers;
+ if (me->HasLootMode(31) && uiActiveTowers == 4)
+ {
+ me->RemoveLootMode(LOOT_MODE_HARD_MODE_4);
+ --uiActiveTowers;
+ }
+ if (me->HasLootMode(15) && uiActiveTowers == 3)
+ {
+ me->RemoveLootMode(LOOT_MODE_HARD_MODE_3);
+ --uiActiveTowers;
+ }
+ if (me->HasLootMode(7) && uiActiveTowers == 2)
+ {
+ me->RemoveLootMode(LOOT_MODE_HARD_MODE_2);
+ --uiActiveTowers;
+ }
+ if (me->HasLootMode(3) && uiActiveTowers == 1)
+ {
+ me->RemoveLootMode(LOOT_MODE_HARD_MODE_1);
+ --uiActiveTowers;
+ }
}
switch (uiAction)
{
- case 0: // Activate hard-mode
- events.ScheduleEvent(EVENT_THORIM_S_HAMMER, urand(30000,60000));
- events.ScheduleEvent(EVENT_MIMIRON_S_INFERNO, urand(30000,60000));
- events.ScheduleEvent(EVENT_HODIR_S_FURY, urand(30000,60000));
- events.ScheduleEvent(EVENT_FREYA_S_WARD, urand(30000,60000));
- uiActiveTowers=4;
+ case 0: // Activate hard-mode setting counter to 4 towers, enable all towers apply buffs on levithian
+ ActiveTowers = true;
+ towerOfStorms = true;
+ towerOfLife = true;
+ towerOfFlames = true;
+ towerOfFrost = true;
+ me->SetLootMode(31);
break;
case 1: // Tower of Storms destroyed
- events.CancelEvent(EVENT_THORIM_S_HAMMER);
+ towerOfStorms = false;
break;
case 2: // Tower of Flames destroyed
- events.CancelEvent(EVENT_MIMIRON_S_INFERNO);
+ towerOfFlames = false;
break;
case 3: // Tower of Frost destroyed
- events.CancelEvent(EVENT_HODIR_S_FURY);
+ towerOfFrost = false;
break;
case 4: // Tower of Nature destroyed
- events.CancelEvent(EVENT_FREYA_S_WARD);
+ towerOfLife = false;
+ break;
+ case 9: // Schedule event
+ events.ScheduleEvent(EVENT_SHUTDOWN, 0);
break;
}
}
@@ -336,7 +517,7 @@ struct boss_flame_leviathanAI : public BossAI
struct boss_flame_leviathan_seatAI : public PassiveAI
{
- boss_flame_leviathan_seatAI(Creature *c) : PassiveAI(c), vehicle(c->GetVehicleKit())
+ boss_flame_leviathan_seatAI(Creature* pCreature) : PassiveAI(pCreature), vehicle(pCreature->GetVehicleKit())
{
assert(vehicle);
#ifdef BOSS_DEBUG
@@ -377,17 +558,17 @@ struct boss_flame_leviathan_seatAI : public PassiveAI
device->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
}
- else if (seatId == SEAT_TURRET)
- {
- if (apply)
- return;
-
- if (Unit* device = vehicle->GetPassenger(SEAT_DEVICE))
+ else
+ if (seatId == SEAT_TURRET)
{
- device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
- device->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable
+ if (apply)
+ return;
+ if (Unit* device = vehicle->GetPassenger(SEAT_DEVICE))
+ {
+ device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
+ device->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable
+ }
}
- }
}
};
@@ -411,7 +592,12 @@ struct boss_flame_leviathan_defense_turretAI : public TurretAI
struct boss_flame_leviathan_overload_deviceAI : public PassiveAI
{
- boss_flame_leviathan_overload_deviceAI(Creature* pCreature) : PassiveAI(pCreature) {}
+ boss_flame_leviathan_overload_deviceAI(Creature* pCreature) : PassiveAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
+ }
+
+ ScriptedInstance *pInstance;
void DoAction(const int32 param)
{
@@ -419,6 +605,7 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI
{
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ pInstance->instance->GetCreature(TYPE_LEVIATHAN)->AI()->DoAction(9); //should be called if all 3 overload devices are active
if (me->GetVehicle())
{
if (Unit* pPlayer = me->GetVehicle()->GetPassenger(SEAT_PLAYER))
@@ -435,28 +622,83 @@ struct boss_flame_leviathan_overload_deviceAI : public PassiveAI
struct boss_flame_leviathan_safety_containerAI : public PassiveAI
{
- boss_flame_leviathan_safety_containerAI(Creature *c) : PassiveAI(c) {}
+ boss_flame_leviathan_safety_containerAI(Creature* pCreature) : PassiveAI(pCreature)
+ {
+ }
+
+ void JustDied()
+ {
+ float x,y,z;
+ me->GetPosition(x,y,z);
+ z = me->GetMap()->GetHeight(x, y, z);
+ me->GetMotionMaster()->MovePoint(0,x,y,z);
+ me->GetMap()->CreatureRelocation(me, x,y,z,0);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ }
+};
+struct npc_mechanoliftAI : public PassiveAI
+{
+ npc_mechanoliftAI(Creature* pCreature) : PassiveAI(pCreature), vehicle(pCreature->GetVehicleKit())
+ {
+ assert(vehicle);
+ }
+
+ Vehicle* vehicle;
+
+ uint32 MoveTimer;
+
+ void Reset ()
+ {
+ MoveTimer = 0;
+ me->GetMotionMaster()->MoveRandom(50);
+ }
+
+ void JustDied(Unit* pKiller)
+ {
+ me->GetMotionMaster()->MoveTargetedHome();
+ Creature* pLiquid = DoSummon(MOB_LIQUID, me, 0);
+ if (pLiquid)
+ {
+ pLiquid->CastSpell(pLiquid, SPELL_LIQUID_PYRITE, true);
+ pLiquid->GetMotionMaster()->MoveFall(pKiller->GetPositionZ());
+ }
+
+ }
- void MovementInform(uint32 /*type*/, uint32 id)
+ void MovementInform(uint32 type, uint32 id)
{
- if (id == me->GetEntry())
+ if (id == 1)
{
- if (Creature* pLiquid = DoSummon(MOB_LIQUID, me, 0))
- pLiquid->CastSpell(pLiquid, 62494, true);
- me->DisappearAndDie(); // this will relocate creature to sky
+ Creature* pContainer = me->FindNearestCreature(MOB_CONTAINER, 5, true);
+ if (pContainer)
+ pContainer->EnterVehicle(me);
}
}
- void UpdateAI(const uint32 /*diff*/)
+ void UpdateAI(const uint32 diff)
{
- if (!me->GetVehicle() && me->isSummon() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)
- me->GetMotionMaster()->MoveFall(409.8f, me->GetEntry());
+ if (MoveTimer <= diff)
+ {
+ if (me->GetVehicleKit()->HasEmptySeat(-1))
+ {
+ Creature* pContainer = me->FindNearestCreature(MOB_CONTAINER, 50, true);
+ if (pContainer && !pContainer->GetVehicle())
+ me->GetMotionMaster()->MovePoint(1,pContainer->GetPositionX(),pContainer->GetPositionY(),pContainer->GetPositionZ());
+ }
+ MoveTimer = 30000; //check next 30 seconds
+ }
+ else
+ MoveTimer-=diff;
}
};
-struct spell_pool_of_tarAI : public TriggerAI
+
+struct spell_pool_of_tarAI : public PassiveAI
{
- spell_pool_of_tarAI(Creature *c) : TriggerAI(c)
+ spell_pool_of_tarAI(Creature* pCreature) : PassiveAI(pCreature)
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -466,9 +708,9 @@ struct spell_pool_of_tarAI : public TriggerAI
damage = 0;
}
- void SpellHit(Unit* /*caster*/, const SpellEntry *spell)
+ void SpellHit(Unit* /*caster*/, const SpellEntry* pSpell)
{
- if (spell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE))
+ if (pSpell->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE))
me->CastSpell(me, SPELL_BLAZE, true);
}
};
@@ -481,7 +723,6 @@ struct npc_colossusAI : public ScriptedAI
}
ScriptedInstance *pInstance;
- Position pPos;
void JustDied(Unit* /*Who*/)
{
@@ -496,9 +737,339 @@ struct npc_colossusAI : public ScriptedAI
{
if (!UpdateVictim())
return;
+ DoMeleeAttackIfReady() ;
+ }
+};
+
+struct npc_thorims_hammerAI : public ScriptedAI
+{
+ npc_thorims_hammerAI(Creature* pCreature) : ScriptedAI (pCreature)
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddAura(AURA_DUMMY_BLUE, me);
+ }
+
+ void MoveInLineOfSight(Unit* who)
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER && who->IsVehicle() && me->IsInRange(who,0,10,false))
+ {
+ if (Creature* pTrigger = DoSummonFlyer(NPC_THORIM_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN))
+ pTrigger->CastSpell(who, SPELL_THORIM_S_HAMMER, true);
+ }
+ }
+
+ void Reset ()
+ {
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!me->HasAura(AURA_DUMMY_BLUE))
+ me->AddAura(AURA_DUMMY_BLUE, me);
+
+ if (!UpdateVictim())
+ return;
+ }
+};
+
+struct npc_mimirons_infernoAI : public npc_escortAI
+{
+ npc_mimirons_infernoAI(Creature* pCreature) : npc_escortAI(pCreature)
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->AddAura(AURA_DUMMY_YELLOW, me);
+ me->SetReactState(REACT_PASSIVE);
+ }
+
+ void WaypointReached(uint32 i)
+ {
+ }
+
+ void Reset()
+ {
+ infernoTimer = 2000;
+ }
+
+ uint32 infernoTimer;
+
+ void UpdateAI(const uint32 diff)
+ {
+ npc_escortAI::UpdateAI(diff);
+
+ if (!HasEscortState(STATE_ESCORT_ESCORTING))
+ {
+ Start(false,true,0,NULL,false,true);
+ }
+ else
+ {
+ if(infernoTimer <= diff)
+ {
+ if (Creature* pTrigger = DoSummonFlyer(NPC_MIMIRON_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN))
+ {
+ pTrigger->CastSpell(me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(), SPELL_MIMIRON_S_INFERNO, true);
+ infernoTimer = 2000;
+ }
+ }
+ else
+ infernoTimer -= diff;
+
+ if (!me->HasAura(AURA_DUMMY_YELLOW))
+ me->AddAura(AURA_DUMMY_YELLOW, me);
+ }
+ }
+};
+
+
+struct npc_hodirs_furyAI : public ScriptedAI
+{
+ npc_hodirs_furyAI(Creature* pCreature) : ScriptedAI (pCreature)
+ {
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ me->AddAura(AURA_DUMMY_GREEN, me);
+ }
+
+ void MoveInLineOfSight(Unit* who)
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER && who->IsVehicle() && me->IsInRange(who,0,5,false))
+ {
+ if (Creature* pTrigger = DoSummonFlyer(NPC_HODIR_TARGET_BEACON, me, 20, 0, 1000, TEMPSUMMON_TIMED_DESPAWN))
+ pTrigger->CastSpell(who, SPELL_HODIR_S_FURY, true);
+ }
+ }
+
+ void Reset()
+ {
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!me->HasAura(AURA_DUMMY_GREEN))
+ me->AddAura(AURA_DUMMY_GREEN, me);
+
+ if (!UpdateVictim())
+ return;
}
};
+struct npc_freyas_wardAI : public ScriptedAI
+{
+ npc_freyas_wardAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ me->AddAura(AURA_DUMMY_GREEN, me);
+ }
+
+ uint32 summonTimer ;
+
+ void Reset()
+ {
+ summonTimer = 5000 ;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(summonTimer <= diff)
+ {
+ DoCast(SPELL_FREYA_S_WARD_EFFECT_1) ;
+ DoCast(SPELL_FREYA_S_WARD_EFFECT_2) ;
+ summonTimer = 20000 ;
+ }
+ else
+ summonTimer -= diff ;
+
+ if (!me->HasAura(AURA_DUMMY_GREEN))
+ me->AddAura(AURA_DUMMY_GREEN, me);
+
+ if (!UpdateVictim())
+ return;
+ }
+};
+
+struct npc_freya_ward_summonAI : public ScriptedAI
+{
+ npc_freya_ward_summonAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ pCreature->GetMotionMaster()->MoveRandom(100);
+ }
+
+ uint32 lashTimer ;
+
+ void Reset()
+ {
+ lashTimer = 5000 ;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+
+ if(lashTimer <= diff)
+ {
+ DoCast(SPELL_LASH);
+ lashTimer = 20000;
+ }
+ else
+ lashTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+//npc lore keeper
+#define GOSSIP_ITEM_1 "Activate secondary defensive systems"
+#define GOSSIP_ITEM_2 "Confirmed"
+struct npc_lorekeeperAI : public ScriptedAI
+{
+ npc_lorekeeperAI(Creature* pCreature) : ScriptedAI(pCreature)
+ {
+ pInstance = pCreature->GetInstanceData();
+ }
+
+ ScriptedInstance* pInstance;
+
+ void DoAction(const int32 uiAction)
+ {
+ // Start encounter
+ if (uiAction == 0)
+ {
+ for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i)
+ DoSummon(VEHICLE_SIEGE, PosSiege[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN);
+ for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i)
+ DoSummon(VEHICLE_CHOPPER, PosChopper[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN);
+ for(uint32 i = 0; i < (RAID_MODE(2,5)); ++i)
+ DoSummon(VEHICLE_DEMOLISHER,PosDemolisher[i],3000,TEMPSUMMON_CORPSE_TIMED_DESPAWN);
+ return;
+ }
+ }
+};
+
+bool GossipHello_npc_lorekeeper(Player* pPlayer, Creature* pCreature)
+{
+ ScriptedInstance* pInstance = pCreature->GetInstanceData();
+ if (pInstance && pInstance->GetData(TYPE_LEVIATHAN) !=DONE && pPlayer)
+ {
+ pPlayer->PrepareGossipMenu(pCreature);
+
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1);
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ }
+ return true;
+}
+//enable hardmode
+bool GossipSelect_npc_lorekeeper(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
+{
+ ScriptedInstance* pInstance = pCreature->GetInstanceData();
+ switch(uiAction)
+ {
+ case GOSSIP_ACTION_INFO_DEF+1:
+ if (pPlayer)
+ {
+ pPlayer->PrepareGossipMenu(pCreature);
+ pInstance->instance->LoadGrid(364,-16); //make sure leviathan is loaded
+
+
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_2,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2);
+ pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+ }
+ break;
+ case GOSSIP_ACTION_INFO_DEF+2:
+ if (pPlayer)
+ pPlayer->CLOSE_GOSSIP_MENU();
+
+ if (Creature* pLeviathan = pInstance->instance->GetCreature(pInstance->GetData64(TYPE_LEVIATHAN)))
+ {
+ CAST_AI(boss_flame_leviathanAI, (pLeviathan->AI()))->DoAction(0); //enable hard mode activating the 4 additional events spawning additional vehicles
+ pCreature->SetVisibility(VISIBILITY_OFF);
+ pCreature->AI()->DoAction(0); // spawn the vehicles
+ pCreature->SetVisibility(VISIBILITY_OFF);
+ if (Creature* Delorah = pCreature->FindNearestCreature(NPC_DELORAH, 1000, true))
+ {
+ if (Creature* Branz = pCreature->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
+ }
+ }
+ }
+ break;
+ }
+ return true;
+}
+////npc_brann_bronzebeard this requires more work involving area triggers. if reached this guy speaks through his radio..
+//#define GOSSIP_ITEM_1 "xxxxx"
+//#define GOSSIP_ITEM_2 "xxxxx"
+//
+//bool GossipHello_npc_brann_bronzebeard(Player* pPlayer, Creature* pCreature)
+//{
+// ScriptedInstance* pInstance = pCreature->GetInstanceData();
+// if (pInstance && pInstance->GetData(TYPE_LEVIATHAN) !=DONE)
+// {
+// pPlayer->PrepareGossipMenu(pCreature);
+//
+// pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1);
+// pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+// }
+// return true;
+//}
+//
+//bool GossipSelect_npc_brann_bronzebeard(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
+//{
+// switch(uiAction)
+// {
+// case GOSSIP_ACTION_INFO_DEF+1:
+// if (pPlayer)
+// {
+// pPlayer->PrepareGossipMenu(pCreature);
+//
+// pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_2,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2);
+// pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
+// }
+// break;
+// case GOSSIP_ACTION_INFO_DEF+2:
+// if (pPlayer)
+// pPlayer->CLOSE_GOSSIP_MENU();
+// if (Creature* Lorekeeper = pCreature->FindNearestCreature(NPC_LOREKEEPER, 1000, true)) //lore keeper of lorgannon
+// Lorekeeper->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+// break;
+// }
+// return true;
+//}
+
+void GODestroyed_go_ulduar_tower(Player* pPlayer, GameObject* pGO, uint32 value)
+{
+ ScriptedInstance* pInstance = pGO->GetInstanceData();
+ if (pGO->GetGOValue()->building.health == 0)
+ {
+ switch(pGO->GetEntry())
+ {
+ case GO_TOWER_OF_STORMS:
+ pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_STORM_DESTROYED);
+ break;
+ case GO_TOWER_OF_FLAMES:
+ pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_FLAMES_DESTROYED);
+ break;
+ case GO_TOWER_OF_FROST:
+ pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_FROST_DESTROYED);
+ break;
+ case GO_TOWER_OF_LIFE:
+ pInstance->ProcessEvent(pGO, EVENT_TOWER_OF_LIFE_DESTROYED);
+ break;
+ }
+ }
+}
+
+bool AreaTrigger_at_RX_214_repair_o_matic_station(Player* pPlayer, const AreaTriggerEntry* pAt)
+{
+ if(Creature* vehicle = pPlayer->GetVehicleCreatureBase())
+ {
+ if(!vehicle->HasAura(SPELL_AUTO_REPAIR))
+ {
+ pPlayer->MonsterTextEmote(EMOTE_REPAIR, pPlayer->GetGUID(), true);
+ pPlayer->CastSpell(vehicle, SPELL_AUTO_REPAIR, true);
+ }
+ }
+ return true;
+}
+
CreatureAI* GetAI_boss_flame_leviathan(Creature* pCreature)
{
return new boss_flame_leviathanAI (pCreature);
@@ -519,11 +1090,16 @@ CreatureAI* GetAI_boss_flame_leviathan_overload_device(Creature* pCreature)
return new boss_flame_leviathan_overload_deviceAI (pCreature);
}
-CreatureAI* GetAI_boss_flame_leviathan_safety_containerAI(Creature* pCreature)
+CreatureAI* GetAI_boss_flame_leviathan_safety_container(Creature* pCreature)
{
return new boss_flame_leviathan_safety_containerAI(pCreature);
}
+CreatureAI* GetAI_npc_mechanolift(Creature* pCreature)
+{
+ return new npc_mechanoliftAI(pCreature);
+}
+
CreatureAI* GetAI_spell_pool_of_tar(Creature* pCreature)
{
return new spell_pool_of_tarAI (pCreature);
@@ -534,6 +1110,35 @@ CreatureAI* GetAI_npc_colossus(Creature* pCreature)
return new npc_colossusAI(pCreature);
}
+CreatureAI* GetAI_npc_thorims_hammer(Creature* pCreature)
+{
+ return new npc_thorims_hammerAI(pCreature);
+}
+
+CreatureAI* GetAI_npc_mimirons_inferno(Creature* pCreature)
+{
+ return new npc_mimirons_infernoAI(pCreature);
+}
+
+CreatureAI* GetAI_npc_hodirs_fury(Creature* pCreature)
+{
+ return new npc_hodirs_furyAI(pCreature);
+}
+
+CreatureAI* GetAI_npc_freyas_ward(Creature* pCreature)
+{
+ return new npc_freyas_wardAI(pCreature);
+}
+
+CreatureAI* GetAI_npc_freya_ward_summon(Creature* pCreature)
+{
+ return new npc_freya_ward_summonAI (pCreature);
+}
+CreatureAI* GetAI_npc_lorekeeper(Creature* pCreature)
+{
+ return new npc_lorekeeperAI (pCreature);
+}
+
void AddSC_boss_flame_leviathan()
{
Script *newscript;
@@ -559,7 +1164,12 @@ void AddSC_boss_flame_leviathan()
newscript = new Script;
newscript->Name = "boss_flame_leviathan_safety_container";
- newscript->GetAI = &GetAI_boss_flame_leviathan_safety_containerAI;
+ newscript->GetAI = &GetAI_boss_flame_leviathan_safety_container;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_mechanolift";
+ newscript->GetAI = &GetAI_npc_mechanolift;
newscript->RegisterSelf();
newscript = new Script;
@@ -571,4 +1181,52 @@ void AddSC_boss_flame_leviathan()
newscript->Name = "npc_colossus";
newscript->GetAI = &GetAI_npc_colossus;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_thorims_hammer";
+ newscript->GetAI = &GetAI_npc_thorims_hammer;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_mimirons_inferno";
+ newscript->GetAI = &GetAI_npc_mimirons_inferno;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_hodirs_fury";
+ newscript->GetAI = &GetAI_npc_hodirs_fury;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_freyas_ward";
+ newscript->GetAI = &GetAI_npc_freyas_ward;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_freya_ward_summon";
+ newscript->GetAI = &GetAI_npc_freya_ward_summon;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_lorekeeper";
+ newscript->GetAI = &GetAI_npc_lorekeeper;
+ newscript->pGossipHello = &GossipHello_npc_lorekeeper;
+ newscript->pGossipSelect = &GossipSelect_npc_lorekeeper;
+ newscript->RegisterSelf();
+
+ /*newscript = new Script;
+ newscript->Name = "npc_brann_bronzebeard";
+ newscript->pGossipHello = &GossipHello_npc_brann_bronzebeard;
+ newscript->pGossipSelect = &GossipSelect_npc_brann_bronzebeard;
+ newscript->RegisterSelf();*/
+
+ newscript = new Script;
+ newscript->Name = "go_ulduar_tower";
+ newscript->pGODestroyed = &GODestroyed_go_ulduar_tower;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "at_RX_214_repair_o_matic_station";
+ newscript->pAreaTrigger = &AreaTrigger_at_RX_214_repair_o_matic_station;
+ newscript->RegisterSelf();
}
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp
index ee995878a0e..df1298eb3b7 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_freya.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum Yells
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 f84c638d3e3..7b573864ee0 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum Yells
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp
index 6facd8ac639..b43dbe82b60 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_hodir.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum Yells
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp
index 05f9ecd3c66..ac5414eaedf 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_ignis.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
#define SPELL_FLAME_JETS 62680
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp
index 2080b458a1b..710484de42c 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_kologarn.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
#include "Vehicle.h"
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp
index 2b9994d5d9b..85fab4d67db 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_mimiron.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum Yells
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
index c61f1046474..bf4ddae9e99 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -22,7 +21,7 @@ SDAuthor: MaXiMiUS
SD%Complete: 65
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
//not in db
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp
index bbab077e10e..a508457e62a 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_thorim.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum Yells
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp
index 58123951d2f..600bb41a469 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_xt002.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@@ -28,7 +27,7 @@
make the life sparks visible...
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum Spells
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp
index 8f42f289204..57c0008536b 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_yoggsaron.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum Sara_Yells
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp
index 692dbf72473..27f59ebb835 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ulduar.h"
enum eGameObjects
@@ -64,8 +63,7 @@ struct instance_ulduar : public ScriptedInstance
uint64 uiFreyaChestGUID;
void Initialize()
- {
- uiLeviathanGUID = 0;
+ {
uiIgnisGUID = 0;
uiRazorscaleGUID = 0;
uiXT002GUID = 0;
@@ -106,7 +104,7 @@ struct instance_ulduar : public ScriptedInstance
switch(pCreature->GetEntry())
{
case NPC_LEVIATHAN:
- uiLeviathanGUID = pCreature->GetGUID();
+ uiLeviathanGUID = pCreature->GetGUID();
break;
case NPC_IGNIS:
uiIgnisGUID = pCreature->GetGUID();
@@ -187,22 +185,24 @@ struct instance_ulduar : public ScriptedInstance
if (flag == 7)
flag =0;
break;
- case GO_LEVIATHAN_GATE:
- uiLeviathanGateGUID = pGO->GetGUID();
- HandleGameObject(NULL, false, pGO);
- break;
+ case GO_LEVIATHAN_GATE:
+ uiLeviathanGateGUID = add ? pGO->GetGUID() : NULL;
+ HandleGameObject(NULL, false, pGO);
+ break;
}
}
void ProcessEvent(GameObject* pGO, uint32 uiEventId)
{
// Flame Leviathan's Tower Event triggers
- Creature* pFlameLeviathan = instance->GetCreature(NPC_LEVIATHAN);
+ Creature* pFlameLeviathan = instance->GetCreature(uiLeviathanGUID);
+
if (pFlameLeviathan && pFlameLeviathan->isAlive()) //No leviathan, no event triggering ;)
switch(uiEventId)
{
case EVENT_TOWER_OF_STORM_DESTROYED:
- pFlameLeviathan->AI()->DoAction(1);
+ //pGO->GetInstanceData()->SetData(DATA_TOWER_STORMS,DESTROYED);
+ pFlameLeviathan->AI()->DoAction(1);
break;
case EVENT_TOWER_OF_FROST_DESTROYED:
pFlameLeviathan->AI()->DoAction(2);
@@ -210,7 +210,7 @@ struct instance_ulduar : public ScriptedInstance
case EVENT_TOWER_OF_FLAMES_DESTROYED:
pFlameLeviathan->AI()->DoAction(3);
break;
- case EVENT_TOWER_OF_NATURE_DESTROYED:
+ case EVENT_TOWER_OF_LIFE_DESTROYED:
pFlameLeviathan->AI()->DoAction(4);
break;
}
@@ -218,9 +218,6 @@ struct instance_ulduar : public ScriptedInstance
void SetData(uint32 type, uint32 data)
{
- if (type != TYPE_COLOSSUS)
- uiEncounter[type] = data;
-
switch(type)
{
/*case TYPE_IGNIS:
@@ -235,12 +232,12 @@ struct instance_ulduar : public ScriptedInstance
case TYPE_LEVIATHAN:
if (data == IN_PROGRESS)
{
- for (uint8 uiI = 0; uiI < 7; uiI++)
+ for (uint8 uiI = 0; uiI < 7; ++uiI)
HandleGameObject(uiLeviathanDoor[uiI],false);
}
else
{
- for (uint8 uiI = 0; uiI < 7; uiI++)
+ for (uint8 uiI = 0; uiI < 7; ++uiI)
HandleGameObject(uiLeviathanDoor[uiI],true);
}
break;
@@ -265,32 +262,21 @@ struct instance_ulduar : public ScriptedInstance
pGO->SetRespawnTime(pGO->GetRespawnDelay());
break;
case TYPE_COLOSSUS:
+ uiEncounter[TYPE_COLOSSUS] = data;
if (data == 2)
{
if (Creature* pBoss = instance->GetCreature(uiLeviathanGUID))
pBoss->AI()->DoAction(10);
if (GameObject* pGate = instance->GetGameObject(uiLeviathanGateGUID))
- pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
+ pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
}
- break;
+ break;
default:
break;
}
if (data == DONE)
- {
- OUT_SAVE_INST_DATA;
-
- std::ostringstream saveStream;
-
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- saveStream << uiEncounter[i] << " ";
-
- m_strInstData = saveStream.str();
-
SaveToDB();
- OUT_SAVE_INST_DATA_COMPLETE;
- }
}
uint64 GetData64(uint32 data)
@@ -351,9 +337,9 @@ struct instance_ulduar : public ScriptedInstance
std::ostringstream saveStream;
saveStream << "U U " << uiEncounter[0] << " " << uiEncounter[1] << " " << uiEncounter[2] << " " << uiEncounter[3]
- << uiEncounter[4] << " " << uiEncounter[5] << " " << uiEncounter[6] << " " << uiEncounter[7]
- << uiEncounter[8] << " " << uiEncounter[9] << " " << uiEncounter[10] << " " << uiEncounter[11]
- << uiEncounter[12] << " " << uiEncounter[13] << " " << uiEncounter[14];
+ << " " << uiEncounter[4] << " " << uiEncounter[5] << " " << uiEncounter[6] << " " << uiEncounter[7]
+ << " " << uiEncounter[8] << " " << uiEncounter[9] << " " << uiEncounter[10] << " " << uiEncounter[11]
+ << " " << uiEncounter[12] << " " << uiEncounter[13] << " " << uiEncounter[14];
m_strInstData = saveStream.str();
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h
index cb11bcb579c..a6d1271ce0e 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 DEF_ULDUAR_H
@@ -43,7 +42,7 @@ enum eTypes
DATA_MOLGEIM = 21,
DATA_BRUNDIR = 22,
DATA_RUNEMASTER_MOLGEIM = 23,
- DATA_STORMCALLER_BRUNDIR = 24,
+ DATA_STORMCALLER_BRUNDIR = 24,
NPC_LEVIATHAN = 33113,
NPC_IGNIS = 33118,
@@ -65,7 +64,7 @@ enum eTypes
EVENT_TOWER_OF_STORM_DESTROYED = 21031,
EVENT_TOWER_OF_FROST_DESTROYED = 21032,
EVENT_TOWER_OF_FLAMES_DESTROYED = 21033,
- EVENT_TOWER_OF_NATURE_DESTROYED = 21030
+ EVENT_TOWER_OF_LIFE_DESTROYED = 21030
};
#endif
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp
index 44f9e86b69c..102cb69a3b1 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar_teleporter.cpp
@@ -1,4 +1,22 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "ulduar.h"
/*
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 77f824c48d5..bc2270cf79f 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
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -23,7 +22,7 @@ SDComment: Some Problems with Annhylde Movement, Blizzlike Timers
SDCategory: Udgarde Keep
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_keep.h"
enum Yells
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
index d69f0eee846..31274403c0e 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -23,7 +22,7 @@ SDComment: Needs Prince Movements, Needs adjustments to blizzlike timers, Needs
SDCategory: Utgarde Keep
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_keep.h"
enum eEnums
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 2146d37635b..02fc594b74a 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -23,7 +22,7 @@ SDComment: Needs adjustments to blizzlike timers, Yell Text + Sound to DB
SDCategory: Utgarde Keep
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_keep.h"
enum eEnums
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
index 03f97b1d27e..1a45b18326c 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/instance_utgarde_keep.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -23,7 +22,7 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter
SDCategory: Utgarde Keep
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_keep.h"
#define MAX_ENCOUNTER 3
@@ -109,7 +108,7 @@ struct instance_utgarde_keep : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("TSCR: Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
index 95825aa49b6..4ee2059712d 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_keep.h"
uint32 entry_search[3] =
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h
index b630e156564..f65c54f540c 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.h
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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 DEF_UTGARDE_KEEP_H
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
index 297fe37b7d8..af20d156c15 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss palehoof
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_palehoof' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_pinnacle.h"
enum Spells
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index a75eb3465be..964f30adb91 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -1,17 +1,18 @@
-/* Copyright (C) 2008 - 2010 Trinity <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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* Script Data Start
@@ -24,7 +25,7 @@ SDComment: <Known Bugs>
SDCategory: Utgarde Pinnacle
Script Data End */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_pinnacle.h"
//Yell
@@ -252,7 +253,7 @@ struct boss_skadiAI : public ScriptedAI
break;
case CREATURE_TRIGGER:
pSummoned->CastSpell((Unit*)NULL, SPELL_FREEZING_CLOUD, true);
- pSummoned->ForcedDespawn(10*IN_MILISECONDS);
+ pSummoned->ForcedDespawn(10*IN_MILLISECONDS);
break;
}
Summons.Summon(pSummoned);
@@ -275,7 +276,7 @@ struct boss_skadiAI : public ScriptedAI
Phase = SKADI;
me->SetFlying(false);
me->Unmount();
- if(Creature* pGrauf = me->SummonCreature(CREATURE_GRAUF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3*IN_MILISECONDS))
+ if(Creature* pGrauf = me->SummonCreature(CREATURE_GRAUF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3*IN_MILLISECONDS))
{
pGrauf->GetMotionMaster()->MoveFall(0);
pGrauf->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
index aae1015ddab..bd3cf42c502 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
@@ -1,20 +1,21 @@
-/* Copyright (C) 2008 - 2010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_pinnacle.h"
enum Spells
@@ -104,7 +105,7 @@ struct boss_svalaAI : public ScriptedAI
void Reset()
{
Phase = IDLE;
- uiIntroTimer = 1*IN_MILISECONDS;
+ uiIntroTimer = 1*IN_MILLISECONDS;
uiIntroPhase = 0;
uiArthasGUID = 0;
@@ -149,28 +150,28 @@ struct boss_svalaAI : public ScriptedAI
case 0:
DoScriptText(SAY_DIALOG_WITH_ARTHAS_1, me);
++uiIntroPhase;
- uiIntroTimer = 3.5*IN_MILISECONDS;
+ uiIntroTimer = 3.5*IN_MILLISECONDS;
break;
case 1:
DoScriptText(SAY_DIALOG_OF_ARTHAS_1, pArthas);
++uiIntroPhase;
- uiIntroTimer = 3.5*IN_MILISECONDS;
+ uiIntroTimer = 3.5*IN_MILLISECONDS;
break;
case 2:
DoScriptText(SAY_DIALOG_WITH_ARTHAS_2, me);
++uiIntroPhase;
- uiIntroTimer = 3.5*IN_MILISECONDS;
+ uiIntroTimer = 3.5*IN_MILLISECONDS;
break;
case 3:
DoScriptText(SAY_DIALOG_OF_ARTHAS_2, pArthas);
++uiIntroPhase;
- uiIntroTimer = 3.5*IN_MILISECONDS;
+ uiIntroTimer = 3.5*IN_MILLISECONDS;
break;
case 4:
DoScriptText(SAY_DIALOG_WITH_ARTHAS_3, me);
DoCast(me, SPELL_SVALA_TRANSFORMING1);
++uiIntroPhase;
- uiIntroTimer = 2.8*IN_MILISECONDS;
+ uiIntroTimer = 2.8*IN_MILLISECONDS;
break;
case 5:
DoCast(me, SPELL_SVALA_TRANSFORMING2);
@@ -178,7 +179,7 @@ struct boss_svalaAI : public ScriptedAI
uiIntroTimer = 200;
break;
case 6:
- if (Creature* pSvalaSorrowgrave = me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILISECONDS))
+ if (Creature* pSvalaSorrowgrave = me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS))
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(DATA_SVALA_DISPLAY_ID);
@@ -243,10 +244,10 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI
void Reset()
{
- uiSinsterStrikeTimer = 7*IN_MILISECONDS;
- uiCallFlamesTimer = 10*IN_MILISECONDS;
- uiRitualOfSwordTimer = 20*IN_MILISECONDS;
- uiSacrificeTimer = 8*IN_MILISECONDS;
+ uiSinsterStrikeTimer = 7*IN_MILLISECONDS;
+ uiCallFlamesTimer = 10*IN_MILLISECONDS;
+ uiRitualOfSwordTimer = 20*IN_MILLISECONDS;
+ uiSacrificeTimer = 8*IN_MILLISECONDS;
bSacrificed = false;
@@ -293,7 +294,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI
if (uiSinsterStrikeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_SINSTER_STRIKE);
- uiSinsterStrikeTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS);
+ uiSinsterStrikeTimer = urand(5*IN_MILLISECONDS,9*IN_MILLISECONDS);
} else uiSinsterStrikeTimer -= diff;
if (uiCallFlamesTimer <= diff)
@@ -301,7 +302,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoCast(pTarget, SPELL_CALL_FLAMES);
- uiCallFlamesTimer = urand(8*IN_MILISECONDS,12*IN_MILISECONDS);
+ uiCallFlamesTimer = urand(8*IN_MILLISECONDS,12*IN_MILLISECONDS);
}
} else uiCallFlamesTimer -= diff;
@@ -347,7 +348,7 @@ struct boss_svala_sorrowgraveAI : public ScriptedAI
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
me->GetMotionMaster()->MoveChase(pTarget);
- uiSacrificeTimer = 8*IN_MILISECONDS;
+ uiSacrificeTimer = 8*IN_MILLISECONDS;
}
else uiSacrificeTimer -= diff;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
index 1a650f94101..62d297396ac 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 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/>.
+ */
+
/* Script Data Start
SDName: Boss ymiron
SDAuthor: LordVanMartin
@@ -9,7 +26,7 @@ Script Data End */
/*** SQL START ***
update creature_template set scriptname = 'boss_ymiron' where entry = '';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "utgarde_pinnacle.h"
enum Spells
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp
index cf042867707..dbbd7b058f2 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "utgarde_pinnacle.h"
#define MAX_ENCOUNTER 4
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
index a51d7aceda0..4592cb2f335 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_PINNACLE_H
#define DEF_PINNACLE_H
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
index 11d432e94c6..124a8f0b8b8 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*** SQL START ***
@@ -21,7 +20,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_archavon' WHERE `entry`='31125
UPDATE `creature_template` SET `ScriptName`='mob_archavon_warder' WHERE `entry`='32353';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "vault_of_archavon.h"
#define EMOTE_BERSERK -1590002
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
index 92a0331708e..6757d28a208 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_emalon.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "vault_of_archavon.h"
//Emalon spells
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
index 61843647136..f8bc8295f21 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*** SQL START ***
@@ -21,7 +20,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_koralon' WHERE `entry`='35013'
UPDATE `creature_template` SET `ScriptName`='mob_flame_warder' WHERE `entry`='35143';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "vault_of_archavon.h"
enum Events
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
index 2e16f9211d2..eddf62700fe 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009-2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*** SQL START ***
@@ -23,7 +22,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_frozen_orb_stalker' WHERE `entr
UPDATE `creature_template` SET `ScriptName`='mob_frozen_orb' WHERE `entry`='38456';
*** SQL END ***/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "vault_of_archavon.h"
// Spells Toravon
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp
index a7183921cce..e7449acafb4 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/instance_vault_of_archavon.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "vault_of_archavon.h"
#define ENCOUNTERS 4
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h
index 6aa642ff701..1885235359e 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h
+++ b/src/server/scripts/Northrend/VaultOfArchavon/vault_of_archavon.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_ARCHAVON_H
#define DEF_ARCHAVON_H
diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
index 589e69a6f18..8e760ba00c6 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
@@ -1,15 +1,21 @@
-/* Script Data Start
-SDName: Boss cyanigosa
-SDAuthor: LordVanMartin
-SD%Complete:
-SDComment:
-SDCategory:
-Script Data End */
-
-/*** SQL START ***
-update creature_template set scriptname = '' where entry = '';
-*** SQL END ***/
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "violet_hold.h"
enum Spells
@@ -68,7 +74,6 @@ struct boss_cyanigosaAI : public ScriptedAI
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
- DoCast(me, SPELL_TRANSFORM);
if (pInstance)
pInstance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS);
diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
index a9cc7393af4..d25f87ca230 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
@@ -1,15 +1,21 @@
-/* Script Data Start
-SDName: Boss erekem
-SDAuthor: LordVanMartin
-SD%Complete:
-SDComment:
-SDCategory:
-Script Data End */
-
-/*** SQL START ***
-update creature_template set scriptname = '' where entry = '';
-*** SQL END ***/
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "violet_hold.h"
enum Spells
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index a28bfdffb7c..fe216d8db4e 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -1,28 +1,21 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
-/* Script Data Start
-SDName: Boss ichoron
-SDAuthor: ckegg
-SD%Complete: 80%
-SDComment: TODO: better spawn location for adds
-SDCategory:
-Script Data End */
-
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "violet_hold.h"
enum Spells
@@ -298,15 +291,23 @@ struct boss_ichoronAI : public ScriptedAI
void JustSummoned(Creature* pSummoned)
{
- pSummoned->SetSpeed(MOVE_RUN, 0.3f);
- pSummoned->GetMotionMaster()->MoveFollow(me, 0, 0);
- m_waterElements.push_back(pSummoned->GetGUID());
+ if (pSummoned)
+ {
+ pSummoned->SetSpeed(MOVE_RUN, 0.3f);
+ pSummoned->GetMotionMaster()->MoveFollow(me, 0, 0);
+ m_waterElements.push_back(pSummoned->GetGUID());
+ pInstance->SetData64(DATA_ADD_TRASH_MOB,pSummoned->GetGUID());
+ }
}
void SummonedCreatureDespawn(Creature *pSummoned)
{
- m_waterElements.remove(pSummoned->GetGUID());
+ if (pSummoned)
+ {
+ m_waterElements.remove(pSummoned->GetGUID());
+ pInstance->SetData64(DATA_DEL_TRASH_MOB,pSummoned->GetGUID());
+ }
}
void KilledUnit(Unit * victim)
diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
index d8cd3a4962f..7a86fedf849 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
@@ -1,15 +1,21 @@
-/* Script Data Start
-SDName: Boss lavanthor
-SDAuthor: LordVanMartin
-SD%Complete:
-SDComment:
-SDCategory:
-Script Data End */
-
-/*** SQL START ***
-update creature_template set scriptname = '' where entry = '';
-*** SQL END ***/
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "violet_hold.h"
enum Spells
diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
index 6d283c7bfb4..0abcbbf720c 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
@@ -1,15 +1,21 @@
-/* Script Data Start
-SDName: Boss moragg
-SDAuthor: LordVanMartin
-SD%Complete:
-SDComment:
-SDCategory:
-Script Data End */
-
-/*** SQL START ***
-update creature_template set scriptname = '' where entry = '';
-*** SQL END ***/
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "violet_hold.h"
//Spells
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index 2633705c1b7..8fb3f200852 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -1,27 +1,21 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
-/* Script Data Start
-SDName: Boss xevozz
-SD%Complete:
-SDComment:
-SDCategory:
-Script Data End */
-
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "violet_hold.h"
enum Spells
diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
index da75ed94fc2..ebe703aae38 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
@@ -1,11 +1,21 @@
-/* Script Data Start
-SDName: Boss zuramat
-SD%Complete:
-SDComment: The phasemask for the voids dosen't work.
-SDCategory:
-Script Data End */
-
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "violet_hold.h"
enum Spells
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index 781511f940b..80051ace614 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -1,4 +1,21 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
#include "violet_hold.h"
#define MAX_ENCOUNTER 3
@@ -32,14 +49,58 @@ enum GameObjects
GO_ACTIVATION_CRYSTAL = 193611
};
+enum AzureSaboteurSpells
+{
+ SABOTEUR_SHIELD_DISRUPTION = 58291,
+ SABOTEUR_SHIELD_EFFECT = 45775
+};
+
+enum CrystalSpells
+{
+ SPELL_ARCANE_LIGHTNING = 57912
+};
+
+enum Events
+{
+ EVENT_ACTIVATE_CRYSTAL = 20001
+};
+
const Position PortalLocation[] =
{
- {1936.07, 803.198, 53.3749, 3.12414},
- {1877.51, 850.104, 44.6599, 4.7822 },
- {1890.64, 753.471, 48.7224, 1.71042},
- {1908.31, 809.657, 38.7037, 3.08701},
- {1918.37, 853.437, 47.1624, 4.12294},
- {1927.61, 758.436, 51.4533, 2.20891}
+ {1877.51, 850.104, 44.6599, 4.7822 }, // WP 1
+ {1918.37, 853.437, 47.1624, 4.12294}, // WP 2
+ {1936.07, 803.198, 53.3749, 3.12414}, // WP 3
+ {1927.61, 758.436, 51.4533, 2.20891}, // WP 4
+ {1890.64, 753.471, 48.7224, 1.71042}, // WP 5
+ {1908.31, 809.657, 38.7037, 3.08701} // WP 6
+};
+
+const Position BossStartMove1 = {1894.684448, 739.390503, 47.668003};
+const Position BossStartMove2 = {1875.173950, 860.832703, 43.333565};
+const Position BossStartMove21 = {1858.854614, 855.071411, 43.333565};
+const Position BossStartMove22 = {1891.926636, 863.388977, 43.333565};
+const Position BossStartMove3 = {1916.138062, 778.152222, 35.772308};
+const Position BossStartMove4 = {1853.618286, 758.557617, 38.657505};
+const Position BossStartMove5 = {1906.683960, 842.348022, 38.637459};
+const Position BossStartMove6 = {1928.207031, 852.864441, 47.200813};
+
+const Position CyanigosasSpawnLocation = {1930.281250, 804.407715, 52.410946, 3.139621};
+const Position MiddleRoomLocation = {1892.291260, 805.696838, 38.438862, 3.139621};
+const Position MiddleRoomPortalSaboLocation = {1896.622925, 804.854126, 38.504772, 3.139621};
+
+//Cyanigosa's prefight event data
+enum Yells
+{
+ CYANIGOSA_SAY_SPAWN = -1608005
+};
+enum Spells
+{
+ CYANIGOSA_SPELL_TRANSFORM = 58668,
+ CYANIGOSA_BLUE_AURA = 47759,
+};
+enum Achievements
+{
+ ACHIEV_DEFENSELESS = 1816
};
struct instance_violet_hold : public ScriptedInstance
@@ -65,10 +126,16 @@ struct instance_violet_hold : public ScriptedInstance
uint64 uiXevozzCell;
uint64 uiZuramatCell;
uint64 uiMainDoor;
+ uint64 uiTeleportationPortal;
+ uint64 uiSaboteurPortal;
uint64 uiActivationCrystal[3];
uint32 uiActivationTimer;
+ uint32 uiCyanigosaEventTimer;
+ uint32 uiDoorSpellTimer;
+
+ std::set<uint64> trashMobs; // to kill with crystal
uint8 uiWaveCount;
uint8 uiLocation;
@@ -76,12 +143,20 @@ struct instance_violet_hold : public ScriptedInstance
uint8 uiSecondBoss;
uint8 uiRemoveNpc;
+ uint8 uiDoorIntegrity;
+
uint8 m_auiEncounter[MAX_ENCOUNTER];
uint8 uiCountErekemGuards;
uint8 uiCountActivationCrystals;
+ uint8 uiCyanigosaEventPhase;
+ uint8 uiMainEventPhase; // SPECIAL: pre event animations, IN_PROGRESS: event itself
bool bActive;
bool bWiped;
+ bool bIsDoorSpellCasted;
+ bool bCrystalActivated;
+
+ std::list<uint8> NpcAtDoorCastingList;
std::string str_data;
@@ -105,19 +180,30 @@ struct instance_violet_hold : public ScriptedInstance
uiXevozzCell = 0;
uiZuramatCell = 0;
uiMainDoor = 0;
+ uiTeleportationPortal = 0;
+ uiSaboteurPortal = 0;
+
+ trashMobs.clear();
+
uiRemoveNpc = 0;
+ uiDoorIntegrity = 100;
+
uiWaveCount = 0;
uiLocation = urand(0,5);
uiFirstBoss = 0;
uiSecondBoss = 0;
uiCountErekemGuards = 0;
uiCountActivationCrystals = 0;
+ uiCyanigosaEventPhase = 1;
uiActivationTimer = 5000;
+ uiDoorSpellTimer = 2000;
+ uiCyanigosaEventTimer = 3*IN_MILLISECONDS;
bActive = false;
- bWiped = false;
+ bIsDoorSpellCasted = false;
+ bCrystalActivated = false;
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
}
@@ -161,6 +247,7 @@ struct instance_violet_hold : public ScriptedInstance
break;
case CREATURE_CYANIGOSA:
uiCyanigosa = pCreature->GetGUID();
+ pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
break;
case CREATURE_SINCLARI:
uiSinclari = pCreature->GetGUID();
@@ -231,8 +318,11 @@ struct instance_violet_hold : public ScriptedInstance
if (data == DONE)
{
SaveToDB();
+ uiMainEventPhase = DONE;
if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor))
pMainDoor->SetGoState(GO_STATE_ACTIVE);
+ if (!bCrystalActivated && uiDoorIntegrity == 100)
+ DoCompleteAchievement(ACHIEV_DEFENSELESS);
}
break;
case DATA_WAVE_COUNT:
@@ -242,6 +332,75 @@ struct instance_violet_hold : public ScriptedInstance
case DATA_REMOVE_NPC:
uiRemoveNpc = data;
break;
+ case DATA_PORTAL_LOCATION:
+ uiLocation = (uint8)data;
+ break;
+ case DATA_DOOR_INTEGRITY:
+ uiDoorIntegrity = data;
+ DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, uiDoorIntegrity);
+ break;
+ case DATA_NPC_PRESENCE_AT_DOOR_ADD:
+ NpcAtDoorCastingList.push_back(data);
+ break;
+ case DATA_NPC_PRESENCE_AT_DOOR_REMOVE:
+ if(!NpcAtDoorCastingList.empty())
+ NpcAtDoorCastingList.pop_back();
+ break;
+ case DATA_MAIN_DOOR:
+ if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor))
+ {
+ switch(data)
+ {
+ case GO_STATE_ACTIVE:
+ pMainDoor->SetGoState(GO_STATE_ACTIVE);
+ break;
+ case GO_STATE_READY:
+ pMainDoor->SetGoState(GO_STATE_READY);
+ break;
+ case GO_STATE_ACTIVE_ALTERNATIVE:
+ pMainDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
+ break;
+ }
+ }
+ break;
+ case DATA_START_BOSS_ENCOUNTER:
+ switch(uiWaveCount)
+ {
+ case 6:
+ StartBossEncounter(uiFirstBoss);
+ break;
+ case 12:
+ StartBossEncounter(uiSecondBoss);
+ break;
+ }
+ break;
+ case DATA_ACTIVATE_CRYSTAL:
+ ActivateCrystal();
+ break;
+ case DATA_MAIN_EVENT_PHASE:
+ uiMainEventPhase = data;
+ if (data == IN_PROGRESS) // Start event
+ {
+ if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor))
+ pMainDoor->SetGoState(GO_STATE_READY);
+ uiWaveCount = 1;
+ bActive = true;
+ uiRemoveNpc = 0; // might not have been reset after a wipe on a boss.
+ }
+ break;
+ }
+ }
+
+ void SetData64(uint32 type, uint64 data)
+ {
+ switch(type)
+ {
+ case DATA_ADD_TRASH_MOB:
+ trashMobs.insert(data);
+ break;
+ case DATA_DEL_TRASH_MOB:
+ trashMobs.erase(data);
+ break;
}
}
@@ -254,6 +413,42 @@ struct instance_violet_hold : public ScriptedInstance
case DATA_CYANIGOSA_EVENT: return m_auiEncounter[2];
case DATA_WAVE_COUNT: return uiWaveCount;
case DATA_REMOVE_NPC: return uiRemoveNpc;
+ case DATA_PORTAL_LOCATION: return uiLocation;
+ case DATA_DOOR_INTEGRITY: return uiDoorIntegrity;
+ case DATA_NPC_PRESENCE_AT_DOOR: return NpcAtDoorCastingList.size();
+ case DATA_FIRST_BOSS: return uiFirstBoss;
+ case DATA_SECOND_BOSS: return uiSecondBoss;
+ case DATA_MAIN_EVENT_PHASE: return uiMainEventPhase;
+ }
+
+ return 0;
+ }
+
+ uint64 GetData64(uint32 identifier)
+ {
+ switch(identifier)
+ {
+ case DATA_MORAGG: return uiMoragg;
+ case DATA_EREKEM: return uiErekem;
+ case DATA_EREKEM_GUARD_1: return uiErekemGuard[0];
+ case DATA_EREKEM_GUARD_2: return uiErekemGuard[1];
+ case DATA_ICHORON: return uiIchoron;
+ case DATA_LAVANTHOR: return uiLavanthor;
+ case DATA_XEVOZZ: return uiXevozz;
+ case DATA_ZURAMAT: return uiZuramat;
+ case DATA_CYANIGOSA: return uiCyanigosa;
+ case DATA_MORAGG_CELL: return uiMoraggCell;
+ case DATA_EREKEM_CELL: return uiErekemCell;
+ case DATA_EREKEM_RIGHT_GUARD_CELL: return uiErekemRightGuardCell;
+ case DATA_EREKEM_LEFT_GUARD_CELL: return uiErekemLeftGuardCell;
+ case DATA_ICHORON_CELL: return uiIchoronCell;
+ case DATA_LAVANTHOR_CELL: return uiLavanthorCell;
+ case DATA_XEVOZZ_CELL: return uiXevozzCell;
+ case DATA_ZURAMAT_CELL: return uiZuramatCell;
+ case DATA_MAIN_DOOR: return uiMainDoor;
+ case DATA_SINCLARI: return uiSinclari;
+ case DATA_TELEPORTATION_PORTAL: return uiTeleportationPortal;
+ case DATA_SABOTEUR_PORTAL: return uiSaboteurPortal;
}
return 0;
@@ -261,9 +456,10 @@ struct instance_violet_hold : public ScriptedInstance
void SpawnPortal()
{
+ SetData(DATA_PORTAL_LOCATION, (GetData(DATA_PORTAL_LOCATION) + urand(1,5))%6);
if (Creature *pSinclari = instance->GetCreature(uiSinclari))
- if (Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL,PortalLocation[uiLocation],TEMPSUMMON_CORPSE_DESPAWN))
- uiLocation = (uiLocation+urand(1,5))%6;
+ if(Creature *portal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL,PortalLocation[GetData(DATA_PORTAL_LOCATION)],TEMPSUMMON_CORPSE_DESPAWN))
+ uiTeleportationPortal = portal->GetGUID();
}
void StartBossEncounter(uint8 uiBoss, bool bForceRespawn = true)
@@ -276,7 +472,7 @@ struct instance_violet_hold : public ScriptedInstance
HandleGameObject(uiMoraggCell,bForceRespawn);
pBoss = instance->GetCreature(uiMoragg);
if (pBoss)
- pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->GetMotionMaster()->MovePoint(0, BossStartMove1);
break;
case BOSS_EREKEM:
HandleGameObject(uiErekemCell, bForceRespawn);
@@ -284,8 +480,9 @@ struct instance_violet_hold : public ScriptedInstance
HandleGameObject(uiErekemLeftGuardCell, bForceRespawn);
pBoss = instance->GetCreature(uiErekem);
+
if (pBoss)
- pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->GetMotionMaster()->MovePoint(0, BossStartMove2);
if (Creature* pGuard1 = instance->GetCreature(uiErekemGuard[0]))
{
@@ -293,6 +490,7 @@ struct instance_violet_hold : public ScriptedInstance
pGuard1->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
else
pGuard1->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard1->GetMotionMaster()->MovePoint(0, BossStartMove21);
}
if (Creature* pGuard2 = instance->GetCreature(uiErekemGuard[1]))
@@ -301,45 +499,52 @@ struct instance_violet_hold : public ScriptedInstance
pGuard2->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
else
pGuard2->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pGuard2->GetMotionMaster()->MovePoint(0, BossStartMove22);
}
break;
case BOSS_ICHORON:
HandleGameObject(uiIchoronCell,bForceRespawn);
pBoss = instance->GetCreature(uiIchoron);
if (pBoss)
- pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->GetMotionMaster()->MovePoint(0, BossStartMove3);
break;
case BOSS_LAVANTHOR:
HandleGameObject(uiLavanthorCell,bForceRespawn);
pBoss = instance->GetCreature(uiLavanthor);
if (pBoss)
- pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->GetMotionMaster()->MovePoint(0, BossStartMove4);
break;
case BOSS_XEVOZZ:
HandleGameObject(uiXevozzCell,bForceRespawn);
pBoss = instance->GetCreature(uiXevozz);
if (pBoss)
- pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->GetMotionMaster()->MovePoint(0, BossStartMove5);
break;
case BOSS_ZURAMAT:
HandleGameObject(uiZuramatCell,bForceRespawn);
pBoss = instance->GetCreature(uiZuramat);
if (pBoss)
- pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->GetMotionMaster()->MovePoint(0, BossStartMove6);
break;
}
- if (!bForceRespawn && pBoss)
+ // generic boss state changes
+ if (pBoss)
{
- if (pBoss->isDead())
+ pBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pBoss->SetReactState(REACT_AGGRESSIVE);
+
+ if (!bForceRespawn)
{
- // respawn but avoid to be looted again
- pBoss->Respawn();
- pBoss->RemoveLootMode(1);
+ if (pBoss->isDead())
+ {
+ // respawn but avoid to be looted again
+ pBoss->Respawn();
+ pBoss->RemoveLootMode(1);
+ }
+ pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ uiWaveCount = 0;
}
- pBoss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
- SetData(DATA_WAVE_COUNT,0);
- uiWaveCount = 0;
}
}
@@ -347,14 +552,19 @@ struct instance_violet_hold : public ScriptedInstance
{
DoUpdateWorldState(WORLD_STATE_VH, 1);
DoUpdateWorldState(WORLD_STATE_VH_WAVE_COUNT, uiWaveCount);
- DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, 100); // TODO
switch(uiWaveCount)
{
case 6:
if (uiFirstBoss == 0)
uiFirstBoss = urand(1,6);
- StartBossEncounter(uiFirstBoss);
+ if (Creature *pSinclari = instance->GetCreature(uiSinclari))
+ {
+ if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN))
+ uiSaboteurPortal = pPortal->GetGUID();
+ if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN))
+ pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false);
+ }
break;
case 12:
if (uiSecondBoss == 0)
@@ -362,56 +572,33 @@ struct instance_violet_hold : public ScriptedInstance
{
uiSecondBoss = urand(1,6);
} while (uiSecondBoss == uiFirstBoss);
- StartBossEncounter(uiSecondBoss);
+ if (Creature *pSinclari = instance->GetCreature(uiSinclari))
+ {
+ if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN))
+ uiSaboteurPortal = pPortal->GetGUID();
+ if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN))
+ pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false);
+ }
break;
case 18:
{
Creature *pSinclari = instance->GetCreature(uiSinclari);
if (pSinclari)
- pSinclari->SummonCreature(CREATURE_CYANIGOSA,PortalLocation[0],TEMPSUMMON_DEAD_DESPAWN);
+ pSinclari->SummonCreature(CREATURE_CYANIGOSA,CyanigosasSpawnLocation,TEMPSUMMON_DEAD_DESPAWN);
break;
}
case 1:
{
if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor))
pMainDoor->SetGoState(GO_STATE_READY);
+ DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, 100);
}
default:
- if (!bWiped)
- SpawnPortal();
- bWiped = false;
+ SpawnPortal();
break;
}
}
- uint64 GetData64(uint32 identifier)
- {
- switch(identifier)
- {
- case DATA_MORAGG: return uiMoragg;
- case DATA_EREKEM: return uiErekem;
- case DATA_EREKEM_GUARD_1: return uiErekemGuard[0];
- case DATA_EREKEM_GUARD_2: return uiErekemGuard[1];
- case DATA_ICHORON: return uiIchoron;
- case DATA_LAVANTHOR: return uiLavanthor;
- case DATA_XEVOZZ: return uiXevozz;
- case DATA_ZURAMAT: return uiZuramat;
- case DATA_CYANIGOSA: return uiCyanigosa;
- case DATA_MORAGG_CELL: return uiMoraggCell;
- case DATA_EREKEM_CELL: return uiErekemCell;
- case DATA_EREKEM_RIGHT_GUARD_CELL: return uiErekemRightGuardCell;
- case DATA_EREKEM_LEFT_GUARD_CELL: return uiErekemLeftGuardCell;
- case DATA_ICHORON_CELL: return uiIchoronCell;
- case DATA_LAVANTHOR_CELL: return uiLavanthorCell;
- case DATA_XEVOZZ_CELL: return uiXevozzCell;
- case DATA_ZURAMAT_CELL: return uiZuramatCell;
- case DATA_MAIN_DOOR: return uiMainDoor;
- case DATA_SINCLARI: return uiSinclari;
- }
-
- return 0;
- }
-
std::string GetSaveData()
{
OUT_SAVE_INST_DATA;
@@ -483,7 +670,8 @@ struct instance_violet_hold : public ScriptedInstance
if (!instance->HavePlayers())
return;
- if (bActive)
+ // portals should spawn if other portal is dead and doors are closed
+ if (bActive && uiMainEventPhase == IN_PROGRESS)
{
if (uiActivationTimer < diff)
{
@@ -493,24 +681,118 @@ struct instance_violet_hold : public ScriptedInstance
} else uiActivationTimer -= diff;
}
- if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor))
- if (pMainDoor->GetGoState() != GO_STATE_ACTIVE && CheckWipe())
+ // if main event is in progress and players have wiped then reset instance
+ if ( uiMainEventPhase == IN_PROGRESS && CheckWipe())
+ {
+ SetData(DATA_REMOVE_NPC, 1);
+ StartBossEncounter(uiFirstBoss, false);
+ StartBossEncounter(uiSecondBoss, false);
+
+ SetData(DATA_MAIN_DOOR,GO_STATE_ACTIVE);
+ SetData(DATA_WAVE_COUNT, 0);
+ uiMainEventPhase = NOT_STARTED;
+
+ if (Creature* pSinclari = instance->GetCreature(uiSinclari))
+ {
+ pSinclari->SetVisibility(VISIBILITY_ON);
+
+ std::list<Creature*> GuardList;
+ pSinclari->GetCreatureListWithEntryInGrid(GuardList, NPC_VIOLET_HOLD_GUARD, 40.0f);
+ if (!GuardList.empty())
+ {
+ for (std::list<Creature*>::const_iterator itr = GuardList.begin(); itr != GuardList.end(); ++itr)
+ {
+ if (Creature* pGuard = *itr)
+ {
+ pGuard->SetVisibility(VISIBILITY_ON);
+ pGuard->SetReactState(REACT_AGGRESSIVE);
+ pGuard->GetMotionMaster()->MovePoint(1,pGuard->GetHomePosition());
+ }
+ }
+ }
+ pSinclari->GetMotionMaster()->MovePoint(1,pSinclari->GetHomePosition());
+ pSinclari->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE);
+ }
+ }
+
+ // Cyanigosa is spawned but not tranformed, prefight event
+ Creature *pCyanigosa = instance->GetCreature(uiCyanigosa);
+ if (pCyanigosa && !pCyanigosa->HasAura(CYANIGOSA_SPELL_TRANSFORM))
+ {
+ if (uiCyanigosaEventTimer <= diff)
{
- SetData(DATA_REMOVE_NPC, 1);
- StartBossEncounter(uiFirstBoss, false);
- StartBossEncounter(uiSecondBoss, false);
- bWiped = true;
- if (Creature* pSinclari = instance->GetCreature(uiSinclari))
+ switch(uiCyanigosaEventPhase)
{
- pSinclari->DisappearAndDie();
- pSinclari->Respawn(true);
+ case 1:
+ pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_BLUE_AURA, false);
+ DoScriptText(CYANIGOSA_SAY_SPAWN, pCyanigosa);
+ uiCyanigosaEventTimer = 7*IN_MILLISECONDS;
+ ++uiCyanigosaEventPhase;
+ break;
+ case 2:
+ pCyanigosa->GetMotionMaster()->MoveJump(MiddleRoomLocation.GetPositionX(), MiddleRoomLocation.GetPositionY(), MiddleRoomLocation.GetPositionZ(), 10.0f, 20.0f);
+ pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_BLUE_AURA, false);
+ uiCyanigosaEventTimer = 7*IN_MILLISECONDS;
+ ++uiCyanigosaEventPhase;
+ break;
+ case 3:
+ pCyanigosa->RemoveAurasDueToSpell(CYANIGOSA_BLUE_AURA);
+ pCyanigosa->CastSpell(pCyanigosa, CYANIGOSA_SPELL_TRANSFORM, 0);
+ pCyanigosa->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE|UNIT_FLAG_NON_ATTACKABLE);
+ pCyanigosa->SetReactState(REACT_AGGRESSIVE);
+ uiCyanigosaEventTimer = 2*IN_MILLISECONDS;
+ ++uiCyanigosaEventPhase;
+ break;
+ case 4:
+ uiCyanigosaEventPhase = 0;
+ break;
}
+ } else uiCyanigosaEventTimer -= diff;
+ }
- if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor))
- pMainDoor->SetGoState(GO_STATE_ACTIVE);
- SetData(DATA_WAVE_COUNT, 0);
+ // if there are NPCs in front of the prison door, which are casting the door seal spell and doors are active
+ if (GetData(DATA_NPC_PRESENCE_AT_DOOR) && uiMainEventPhase == IN_PROGRESS)
+ {
+ // if door integrity is > 0 then decrase it's integrity state
+ if(GetData(DATA_DOOR_INTEGRITY))
+ {
+ if(uiDoorSpellTimer < diff)
+ {
+ SetData(DATA_DOOR_INTEGRITY,GetData(DATA_DOOR_INTEGRITY)-1);
+ uiDoorSpellTimer =2000;
+ } else uiDoorSpellTimer -= diff;
+ }
+ // else set door state to active (means door will open and group have failed to sustain mob invasion on the door)
+ else
+ {
+ SetData(DATA_MAIN_DOOR,GO_STATE_ACTIVE);
+ uiMainEventPhase = FAIL;
}
+ }
}
+
+ void ActivateCrystal()
+ {
+ // Kill all mobs registered with SetData64(ADD_TRASH_MOB)
+ // TODO: All visual, spells etc
+ for (std::set<uint64>::const_iterator itr = trashMobs.begin(); itr != trashMobs.end(); ++itr)
+ {
+ Creature* pCreature = instance->GetCreature(*itr);
+ if (pCreature && pCreature->isAlive())
+ pCreature->CastSpell(pCreature,SPELL_ARCANE_LIGHTNING,true); // Who should cast the spell?
+ }
+ }
+
+ void ProcessEvent(GameObject* pGO, uint32 uiEventId)
+ {
+ switch(uiEventId)
+ {
+ case EVENT_ACTIVATE_CRYSTAL:
+ bCrystalActivated = true; // Activation by player's will throw event signal
+ ActivateCrystal();
+ break;
+ }
+}
};
InstanceData* GetInstanceData_instance_violet_hold(Map* pMap)
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index 49883b5dbf3..1267ede8be6 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -1,36 +1,252 @@
-#include "ScriptedPch.h"
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptPCH.h"
+#include "ScriptedEscortAI.h"
#include "violet_hold.h"
#define GOSSIP_START_EVENT "Get your people to safety, we'll keep the Blue Dragonflight's forces at bay."
#define GOSSIP_ITEM_1 "Activate the crystals when we get in trouble, right"
+#define GOSSIP_I_WANT_IN "Sorry, I'm late! Can I get in to help my friends?"
#define SPAWN_TIME 20000
enum PortalCreatures
{
- CREATURE_AZURE_INVADER = 30661,
- CREATURE_AZURE_SPELLBREAKER = 30662,
- CREATURE_AZURE_BINDER = 30663,
- CREATURE_AZURE_MAGE_SLAYER = 30664,
+ CREATURE_AZURE_INVADER_1 = 30661,
+ CREATURE_AZURE_INVADER_2 = 30961,
+ CREATURE_AZURE_SPELLBREAKER_1 = 30662,
+ CREATURE_AZURE_SPELLBREAKER_2 = 30962,
+ CREATURE_AZURE_BINDER_1 = 30663,
+ CREATURE_AZURE_BINDER_2 = 30918,
+ CREATURE_AZURE_MAGE_SLAYER_1 = 30664,
+ CREATURE_AZURE_MAGE_SLAYER_2 = 30963,
CREATURE_AZURE_CAPTAIN = 30666,
CREATURE_AZURE_SORCEROR = 30667,
CREATURE_AZURE_RAIDER = 30668,
CREATURE_AZURE_STALKER = 32191
};
+enum AzureInvaderSpells
+{
+ SPELL_CLEAVE = 15496,
+ SPELL_IMPALE = 58459,
+ H_SPELL_IMPALE = 59256,
+ SPELL_BRUTAL_STRIKE = 58460,
+ SPELL_SUNDER_ARMOR = 58461
+};
+
+enum AzureSellbreakerSpells
+{
+ SPELL_ARCANE_BLAST = 58462,
+ H_SPELL_ARCANE_BLAST = 59257,
+ SPELL_SLOW = 25603,
+ SPELL_CHAINS_OF_ICE = 58464,
+ SPELL_CONE_OF_COLD = 58463,
+ H_SPELL_CONE_OF_COLD = 59258
+};
+
+enum AzureBinderSpells
+{
+ SPELL_ARCANE_BARRAGE = 58456,
+ H_SPELL_ARCANE_BARRAGE = 59248,
+ SPELL_ARCANE_EXPLOSION = 58455,
+ H_SPELL_ARCANE_EXPLOSION = 59245,
+ SPELL_FROST_NOVA = 58458,
+ H_SPELL_FROST_NOVA = 59253,
+ SPELL_FROSTBOLT = 58457,
+ H_SPELL_FROSTBOLT = 59251,
+};
+
+enum AzureMageSlayerSpells
+{
+ SPELL_ARCANE_EMPOWERMENT = 58469,
+ SPELL_SPELL_LOCK = 30849
+};
+
+enum AzureCaptainSpells
+{
+ SPELL_MORTAL_STRIKE = 32736,
+ SPELL_WHIRLWIND_OF_STEEL = 41057
+};
+
+enum AzureSorcerorSpells
+{
+ SPELL_ARCANE_STREAM = 60181,
+ H_SPELL_ARCANE_STREAM = 60204,
+ SPELL_MANA_DETONATION = 60182,
+ H_SPELL_MANA_DETONATION = 60205
+};
+
+enum AzureRaiderSpells
+{
+ SPELL_CONCUSSION_BLOW = 52719,
+ SPELL_MAGIC_REFLECTION = 60158
+};
+
+enum AzureStalkerSpells
+{
+ SPELL_BACKSTAB = 58471,
+ SPELL_TACTICAL_BLINK = 58470
+};
+
+enum AzureSaboteurSpells
+{
+ SABOTEUR_SHIELD_DISRUPTION = 58291,
+ SABOTEUR_SHIELD_EFFECT = 45775
+};
+
+enum TrashDoorSpell
+{
+ SPELL_DESTROY_DOOR_SEAL = 58040
+};
+
enum Spells
{
- SPELL_PORTAL_CHANNEL = 58012
+ SPELL_PORTAL_CHANNEL = 58012,
+ SPELL_CRYSTALL_ACTIVATION = 57804
};
enum eSinclari
{
- NPC_VIOLET_HOLD_GUARD = 30659,
+ SAY_SINCLARI_1 = -1608045
+};
+
+float FirstPortalWPs [6][3] =
+{
+ {1877.670288, 842.280273, 43.333591},
+ {1877.338867, 834.615356, 38.762287},
+ {1872.161011, 823.854309, 38.645401},
+ {1864.860474, 815.787170, 38.784843},
+ {1858.953735, 810.048950, 44.008759},
+ {1843.707153, 805.807739, 44.135197}
+ //{1825.736084, 807.305847, 44.363785}
+};
+
+float SecondPortalFirstWPs [9][3] =
+{
+ {1902.561401, 853.334656, 47.106117},
+ {1895.486084, 855.376404, 44.334591},
+ {1882.805176, 854.993286, 43.333591},
+ {1877.670288, 842.280273, 43.333591},
+ {1877.338867, 834.615356, 38.762287},
+ {1872.161011, 823.854309, 38.645401},
+ {1864.860474, 815.787170, 38.784843},
+ {1858.953735, 810.048950, 44.008759},
+ {1843.707153, 805.807739, 44.135197}
+ //{1825.736084, 807.305847, 44.363785}
+};
- SAY_SINCLARI_1 = -1608045,
+float SecondPortalSecondWPs [8][3] =
+{
+ {1929.392212, 837.614990, 47.136166},
+ {1928.290649, 824.750427, 45.474411},
+ {1915.544922, 826.919373, 38.642811},
+ {1900.933960, 818.855652, 38.801647},
+ {1886.810547, 813.536621, 38.490490},
+ {1869.079712, 808.701538, 38.689003},
+ {1860.843384, 806.645020, 44.008789},
+ {1843.707153, 805.807739, 44.135197}
+ //{1825.736084, 807.305847, 44.363785}
+};
+
+float ThirdPortalWPs [8][3] =
+{
+ {1934.049438, 815.778503, 52.408699},
+ {1928.290649, 824.750427, 45.474411},
+ {1915.544922, 826.919373, 38.642811},
+ {1900.933960, 818.855652, 38.801647},
+ {1886.810547, 813.536621, 38.490490},
+ {1869.079712, 808.701538, 38.689003},
+ {1860.843384, 806.645020, 44.008789},
+ {1843.707153, 805.807739, 44.135197}
+ //{1825.736084, 807.305847, 44.363785}
+};
+
+float FourthPortalWPs [9][3] =
+{
+ {1921.658447, 761.657043, 50.866741},
+ {1910.559814, 755.780457, 47.701447},
+ {1896.664673, 752.920898, 47.667004},
+ {1887.398804, 763.633240, 47.666851},
+ {1879.020386, 775.396973, 38.705990},
+ {1872.439087, 782.568604, 38.808292},
+ {1863.573364, 791.173584, 38.743660},
+ {1857.811890, 796.765564, 43.950329},
+ {1845.577759, 800.681152, 44.104248}
+ //{1827.100342, 801.605957, 44.363358}
+};
+
+float FifthPortalWPs [6][3] =
+{
+ {1887.398804, 763.633240, 47.666851},
+ {1879.020386, 775.396973, 38.705990},
+ {1872.439087, 782.568604, 38.808292},
+ {1863.573364, 791.173584, 38.743660},
+ {1857.811890, 796.765564, 43.950329},
+ {1845.577759, 800.681152, 44.104248}
+ //{1827.100342, 801.605957, 44.363358}
+};
+
+float SixthPoralWPs [4][3] =
+{
+ {1888.861084, 805.074768, 38.375790},
+ {1869.793823, 804.135804, 38.647018},
+ {1861.541504, 804.149780, 43.968292},
+ {1843.567017, 804.288208, 44.139091}
+ //{1826.889648, 803.929993, 44.363239}
+};
+
+const float SaboteurFinalPos1[3][3] =
+{
+ {1892.502319, 777.410767, 38.630402},
+ {1891.165161, 762.969421, 47.666920},
+ {1893.168091, 740.919189, 47.666920}
+};
+const float SaboteurFinalPos2[3][3] =
+{
+ {1882.242676, 834.818726, 38.646786},
+ {1879.220825, 842.224854, 43.333641},
+ {1873.842896, 863.892456, 43.333641}
+};
+const float SaboteurFinalPos3[2][3] =
+{
+ {1904.298340, 792.400391, 38.646782},
+ {1935.716919, 758.437073, 30.627895}
+};
+const float SaboteurFinalPos4[3] =
+{
+ 1855.006104, 760.641724, 38.655266
+};
+const float SaboteurFinalPos5[3] =
+{
+ 1906.667358, 841.705566, 38.637894
};
+const float SaboteurFinalPos6[5][3] =
+{
+ {1911.437012, 821.289246, 38.684128},
+ {1920.734009, 822.978027, 41.525414},
+ {1928.262939, 830.836609, 44.668266},
+ {1929.338989, 837.593933, 47.137596},
+ {1931.063354, 848.468445, 47.190434}
+ };
-const Position DoorPosition = { 1828.300049, 797.309021, 46.135502, 1.48353};
-const Position MovePosition = { 1806.955566, 803.851807, 44.363323};
+const Position MovePosition = {1806.955566, 803.851807, 44.363323};
+const Position playerTeleportPosition = {1830.531006, 803.939758, 44.340508, 6.281611};
+const Position sinclariOutsidePosition = {1817.315674, 804.060608, 44.363998};
struct npc_sinclariAI : public ScriptedAI
{
@@ -49,7 +265,6 @@ struct npc_sinclariAI : public ScriptedAI
uiPhase = 0;
uiTimer = 0;
- me->SetVisibility(VISIBILITY_ON);
me->SetReactState(REACT_AGGRESSIVE);
std::list<Creature*> GuardList;
@@ -69,22 +284,6 @@ struct npc_sinclariAI : public ScriptedAI
}
}
- void MovementInform(uint32 uiType, uint32 /*uiId*/)
- {
- if (uiType != POINT_MOTION_TYPE)
- return;
-
- if (pInstance)
- {
- pInstance->SetData(DATA_WAVE_COUNT,1);
- pInstance->SetData(DATA_REMOVE_NPC,0); // might not have been reset after a wipe on a boss.
- }
-
- //She should not be despawned, she will be used by the instance to summon some npcs
- me->SetVisibility(VISIBILITY_OFF);
- me->SetReactState(REACT_PASSIVE);
- }
-
void UpdateAI(const uint32 uiDiff)
{
ScriptedAI::UpdateAI(uiDiff);
@@ -96,10 +295,10 @@ struct npc_sinclariAI : public ScriptedAI
switch(uiPhase)
{
case 1:
- DoScriptText(SAY_SINCLARI_1, me);
- uiTimer = 4000;
- uiPhase = 2;
- break;
+ DoScriptText(SAY_SINCLARI_1, me);
+ uiTimer = 4000;
+ uiPhase = 2;
+ break;
case 2:
{
std::list<Creature*> GuardList;
@@ -135,7 +334,14 @@ struct npc_sinclariAI : public ScriptedAI
break;
}
case 4:
- me->GetMotionMaster()->MovePoint(0, MovePosition);
+ me->GetMotionMaster()->MovePoint(0, sinclariOutsidePosition);
+ uiTimer = 4000;
+ uiPhase = 5;
+ break;
+ case 5:
+ if (pInstance)
+ pInstance->SetData(DATA_MAIN_EVENT_PHASE,IN_PROGRESS);
+ me->SetReactState(REACT_PASSIVE);
uiTimer = 0;
uiPhase = 0;
break;
@@ -158,14 +364,24 @@ CreatureAI* GetAI_npc_sinclari(Creature* pCreature)
bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature)
{
- ScriptedInstance* pInstance = pCreature->GetInstanceData();
- if (pInstance && pInstance->GetData(DATA_CYANIGOSA_EVENT) != DONE && pInstance->GetData(DATA_WAVE_COUNT) == 0 && pPlayer)
+ if (ScriptedInstance* pInstance = pCreature->GetInstanceData())
{
- pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2);
- pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_START_EVENT,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1);
- pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID());
- }else
- pPlayer->SEND_GOSSIP_MENU(13910, pCreature->GetGUID());
+ switch (pInstance->GetData(DATA_MAIN_EVENT_PHASE))
+ {
+ case NOT_STARTED:
+ case FAIL: // Allow to start event if not started or wiped
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_1,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2);
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_START_EVENT,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1);
+ pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID());
+ break;
+ case IN_PROGRESS: // Allow to teleport inside if event is in progress
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_I_WANT_IN,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+3);
+ pPlayer->SEND_GOSSIP_MENU(13853, pCreature->GetGUID());
+ break;
+ default:
+ pPlayer->SEND_GOSSIP_MENU(13910, pCreature->GetGUID());
+ }
+ }
return true;
}
@@ -174,73 +390,235 @@ bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 /*ui
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
- if (pPlayer)
- pPlayer->CLOSE_GOSSIP_MENU();
+ pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_sinclariAI, (pCreature->AI()))->uiPhase = 1;
+ if (ScriptedInstance *pInstance = pCreature->GetInstanceData())
+ pInstance->SetData(DATA_MAIN_EVENT_PHASE,SPECIAL);
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->SEND_GOSSIP_MENU(13854, pCreature->GetGUID());
break;
+ case GOSSIP_ACTION_INFO_DEF+3:
+ pPlayer->NearTeleportTo(playerTeleportPosition.GetPositionX(),playerTeleportPosition.GetPositionY(),playerTeleportPosition.GetPositionZ(),playerTeleportPosition.GetOrientation(),true);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ break;
}
return true;
}
+struct mob_azure_saboteurAI : public npc_escortAI
+{
+ mob_azure_saboteurAI(Creature *c):npc_escortAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ bHasGotMovingPoints = false;
+ uiBoss = 0;
+ Reset();
+ }
+
+ ScriptedInstance* pInstance;
+ bool bHasGotMovingPoints;
+ uint32 uiBoss;
+
+ void Reset()
+ {
+ if (pInstance && !uiBoss)
+ uiBoss = pInstance->GetData(DATA_WAVE_COUNT) == 6 ? pInstance->GetData(DATA_FIRST_BOSS) : pInstance->GetData(DATA_SECOND_BOSS);
+ }
+
+ void WaypointReached(uint32 uiWPointId)
+ {
+ switch(uiBoss)
+ {
+ case 1:
+ if(uiWPointId == 2)
+ FinishPointReached();
+ break;
+ case 2:
+ if(uiWPointId == 2)
+ FinishPointReached();
+ break;
+ case 3:
+ if(uiWPointId == 1)
+ FinishPointReached();
+ break;
+ case 4:
+ if(uiWPointId == 0)
+ FinishPointReached();
+ break;
+ case 5:
+ if(uiWPointId == 0)
+ FinishPointReached();
+ break;
+ case 6:
+ if(uiWPointId == 4)
+ FinishPointReached();
+ break;
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (pInstance && pInstance->GetData(DATA_MAIN_EVENT_PHASE != IN_PROGRESS))
+ me->CastStop();
+
+ npc_escortAI::UpdateAI(diff);
+
+ if(!bHasGotMovingPoints)
+ {
+ bHasGotMovingPoints = true;
+ switch(uiBoss)
+ {
+ case 1:
+ for(int i=0;i<3;i++)
+ AddWaypoint(i,SaboteurFinalPos1[i][0],SaboteurFinalPos1[i][1],SaboteurFinalPos1[i][2],0);
+ me->SetHomePosition(SaboteurFinalPos1[2][0],SaboteurFinalPos1[2][1],SaboteurFinalPos1[2][2],4.762346);
+ break;
+ case 2:
+ for(int i=0;i<3;i++)
+ AddWaypoint(i,SaboteurFinalPos2[i][0],SaboteurFinalPos2[i][1],SaboteurFinalPos2[i][2],0);
+ me->SetHomePosition(SaboteurFinalPos2[2][0],SaboteurFinalPos2[2][1],SaboteurFinalPos2[2][2],1.862674);
+ break;
+ case 3:
+ for(int i=0;i<2;i++)
+ AddWaypoint(i,SaboteurFinalPos3[i][0],SaboteurFinalPos3[i][1],SaboteurFinalPos3[i][2],0);
+ me->SetHomePosition(SaboteurFinalPos3[1][0],SaboteurFinalPos3[1][1],SaboteurFinalPos3[1][2],5.500638);
+ break;
+ case 4:
+ AddWaypoint(0,SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],0);
+ me->SetHomePosition(SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],3.991108);
+ break;
+ case 5:
+ AddWaypoint(0,SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],0);
+ me->SetHomePosition(SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],1.100841);
+ break;
+ case 6:
+ for(int i=0;i<5;i++)
+ AddWaypoint(i,SaboteurFinalPos6[i][0],SaboteurFinalPos6[i][1],SaboteurFinalPos6[i][2],0);
+ me->SetHomePosition(SaboteurFinalPos6[4][0],SaboteurFinalPos6[4][1],SaboteurFinalPos6[4][2],0.983031);
+ break;
+ }
+
+ SetDespawnAtEnd(false);
+ Start(true,true);
+ }
+ }
+
+ void FinishPointReached()
+ {
+ me->CastSpell(me, SABOTEUR_SHIELD_DISRUPTION, false);
+ me->DisappearAndDie();
+ Creature* pSaboPort = Unit::GetCreature((*me),pInstance->GetData64(DATA_SABOTEUR_PORTAL));
+ if (pSaboPort)
+ pSaboPort->DisappearAndDie();
+ pInstance->SetData(DATA_START_BOSS_ENCOUNTER, 1);
+ }
+};
+
+CreatureAI* GetAI_mob_azure_saboteur(Creature* pCreature)
+{
+ return new mob_azure_saboteurAI (pCreature);
+}
+
struct npc_teleportation_portalAI : public ScriptedAI
{
- npc_teleportation_portalAI(Creature *c) : ScriptedAI(c)
+ npc_teleportation_portalAI(Creature *c) : ScriptedAI(c), listOfMobs(me)
{
pInstance = c->GetInstanceData();
+ uiTypeOfMobsPortal = urand(0,1); // 0 - elite mobs 1 - portal guardian or portal keeper with regular mobs
+ bPortalGuardianOrKeeperOrEliteSpawn = false;
}
uint32 uiSpawnTimer;
- bool bPortalGuardianOrKeeperSpawn;
+ bool bPortalGuardianOrKeeperOrEliteSpawn;
+ uint8 uiTypeOfMobsPortal;
+
+ SummonList listOfMobs;
ScriptedInstance *pInstance;
void Reset()
{
uiSpawnTimer = 10000;
- bPortalGuardianOrKeeperSpawn = false;
+ bPortalGuardianOrKeeperOrEliteSpawn = false;
}
void EnterCombat(Unit * /*who*/) {}
+
void MoveInLineOfSight(Unit * /*who*/) {}
void UpdateAI(const uint32 diff)
{
- if (pInstance && pInstance->GetData(DATA_REMOVE_NPC) == 1)
+ if (!pInstance) //Massive usage of pInstance, global check
+ return;
+
+ if (pInstance->GetData(DATA_REMOVE_NPC) == 1)
{
me->ForcedDespawn();
pInstance->SetData(DATA_REMOVE_NPC, 0);
}
- if (uiSpawnTimer <= diff)
+ uint8 uiWaveCount = pInstance->GetData(DATA_WAVE_COUNT);
+ if ((uiWaveCount == 6) || (uiWaveCount == 12)) //Don't spawn mobs on boss encounters
+ return;
+
+ switch(uiTypeOfMobsPortal)
{
- if (bPortalGuardianOrKeeperSpawn)
- {
- uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 2 : 3;
- for (uint8 i = 0; i < k; ++i)
+ // spawn elite mobs and then set portals visibility to make it look like it dissapeard
+ case 0:
+ if (!bPortalGuardianOrKeeperOrEliteSpawn)
{
- uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR);
- if (Creature* pSummon = DoSummon(entry, me, 2.0f, 30000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT))
- pSummon->GetMotionMaster()->MovePoint(0, DoorPosition);
+ if (uiSpawnTimer <= diff)
+ {
+ bPortalGuardianOrKeeperOrEliteSpawn = true;
+ uint8 k = uiWaveCount < 12 ? 2 : 3;
+ for (uint8 i = 0; i < k; ++i)
+ {
+ uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR);
+ DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN);
+ }
+ me->SetVisibility(VISIBILITY_OFF);
+ } else uiSpawnTimer -= diff;
}
- }
- else
- {
- bPortalGuardianOrKeeperSpawn = true;
- uint32 entry = RAND(CREATURE_PORTAL_GUARDIAN, CREATURE_PORTAL_KEEPER);
- if (Creature *pPortalKeeper = DoSummon(entry, me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN))
- me->CastSpell(pPortalKeeper, SPELL_PORTAL_CHANNEL, false);
- }
- uiSpawnTimer = SPAWN_TIME;
- } else uiSpawnTimer -= diff;
+ else
+ {
+ // if all spawned elites have died kill portal
+ if (listOfMobs.empty())
+ {
+ me->Kill(me, false);
+ me->RemoveCorpse();
+ }
+ }
+ break;
+ // spawn portal guardian or portal keeper with regular mobs
+ case 1:
+ if (uiSpawnTimer <= diff)
+ {
+ if (bPortalGuardianOrKeeperOrEliteSpawn)
+ {
+ uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 3 : 4;
+ for (uint8 i = 0; i < k; ++i)
+ {
+ uint32 entry = RAND(CREATURE_AZURE_INVADER_1,CREATURE_AZURE_INVADER_2,CREATURE_AZURE_SPELLBREAKER_1,CREATURE_AZURE_SPELLBREAKER_2,CREATURE_AZURE_MAGE_SLAYER_1,CREATURE_AZURE_MAGE_SLAYER_2,CREATURE_AZURE_BINDER_1,CREATURE_AZURE_BINDER_2);
+ DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN);
+ }
+ }
+ else
+ {
+ bPortalGuardianOrKeeperOrEliteSpawn = true;
+ uint32 entry = RAND(CREATURE_PORTAL_GUARDIAN, CREATURE_PORTAL_KEEPER);
+ if (Creature *pPortalKeeper = DoSummon(entry, me, 2.0f, 0, TEMPSUMMON_DEAD_DESPAWN))
+ me->CastSpell(pPortalKeeper, SPELL_PORTAL_CHANNEL, false);
+ }
+ uiSpawnTimer = SPAWN_TIME;
+ } else uiSpawnTimer -= diff;
- if (bPortalGuardianOrKeeperSpawn && !me->IsNonMeleeSpellCasted(false))
- {
- me->Kill(me, false);
- me->RemoveCorpse();
- return;
+ if (bPortalGuardianOrKeeperOrEliteSpawn && !me->IsNonMeleeSpellCasted(false))
+ {
+ me->Kill(me, false);
+ me->RemoveCorpse();
+ }
+ break;
}
}
@@ -249,6 +627,20 @@ struct npc_teleportation_portalAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_WAVE_COUNT,pInstance->GetData(DATA_WAVE_COUNT)+1);
}
+
+ void JustSummoned(Creature *pSummoned)
+ {
+ listOfMobs.Summon(pSummoned);
+ if (pSummoned)
+ pInstance->SetData64(DATA_ADD_TRASH_MOB,pSummoned->GetGUID());
+ }
+
+ void SummonedMobDied(Creature *pSummoned)
+ {
+ listOfMobs.Despawn(pSummoned);
+ if (pSummoned)
+ pInstance->SetData64(DATA_DEL_TRASH_MOB,pSummoned->GetGUID());
+ }
};
CreatureAI* GetAI_npc_teleportation_portal(Creature *pCreature)
@@ -256,6 +648,596 @@ CreatureAI* GetAI_npc_teleportation_portal(Creature *pCreature)
return new npc_teleportation_portalAI(pCreature);
}
+struct violet_hold_trashAI : public npc_escortAI
+{
+ violet_hold_trashAI(Creature *c):npc_escortAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ bHasGotMovingPoints = false;
+ if (pInstance)
+ portalLocationID = pInstance->GetData(DATA_PORTAL_LOCATION);
+ Reset();
+ }
+
+ public:
+ ScriptedInstance* pInstance;
+ bool bHasGotMovingPoints;
+ uint32 portalLocationID;
+ uint32 secondPortalRouteID;
+
+ void WaypointReached(uint32 uiPointId)
+ {
+ switch(portalLocationID)
+ {
+ case 0:
+ if (uiPointId == 5)
+ CreatureStartAttackDoor(me->GetGUID());
+ break;
+ case 1:
+ if ((uiPointId == 8 && secondPortalRouteID == 0) || (uiPointId == 7 && secondPortalRouteID == 1))
+ CreatureStartAttackDoor(me->GetGUID());
+ break;
+ case 2:
+ if (uiPointId == 7)
+ CreatureStartAttackDoor(me->GetGUID());
+ break;
+ case 3:
+ if (uiPointId == 8)
+ CreatureStartAttackDoor(me->GetGUID());
+ break;
+ case 4:
+ if (uiPointId == 5)
+ CreatureStartAttackDoor(me->GetGUID());
+ break;
+ case 5:
+ if (uiPointId == 3)
+ CreatureStartAttackDoor(me->GetGUID());
+ break;
+ }
+ }
+
+ void UpdateAI(const uint32)
+ {
+ if (pInstance && pInstance->GetData(DATA_MAIN_EVENT_PHASE != IN_PROGRESS))
+ me->CastStop();
+
+ if (!bHasGotMovingPoints)
+ {
+ bHasGotMovingPoints = true;
+ switch(portalLocationID)
+ {
+ case 0:
+ for(int i=0;i<6;i++)
+ AddWaypoint(i,FirstPortalWPs[i][0]+irand(-1,1),FirstPortalWPs[i][1]+irand(-1,1),FirstPortalWPs[i][2]+irand(-1,1),0);
+ me->SetHomePosition(FirstPortalWPs[5][0],FirstPortalWPs[5][1],FirstPortalWPs[5][2],3.149439);
+ break;
+ case 1:
+ secondPortalRouteID = urand(0,1);
+ switch(secondPortalRouteID)
+ {
+ case 0:
+ for(int i=0;i<9;i++)
+ AddWaypoint(i,SecondPortalFirstWPs[i][0]+irand(-1,1),SecondPortalFirstWPs[i][1]+irand(-1,1),SecondPortalFirstWPs[i][2],0);
+ me->SetHomePosition(SecondPortalFirstWPs[8][0]+irand(-1,1),SecondPortalFirstWPs[8][1]+irand(-1,1),SecondPortalFirstWPs[8][2]+irand(-1,1),3.149439);
+ break;
+ case 1:
+ for(int i=0;i<8;i++)
+ AddWaypoint(i,SecondPortalSecondWPs[i][0]+irand(-1,1),SecondPortalSecondWPs[i][1]+irand(-1,1),SecondPortalSecondWPs[i][2],0);
+ me->SetHomePosition(SecondPortalSecondWPs[7][0],SecondPortalSecondWPs[7][1],SecondPortalSecondWPs[7][2],3.149439);
+ break;
+ }
+ break;
+ case 2:
+ for(int i=0;i<8;i++)
+ AddWaypoint(i,ThirdPortalWPs[i][0]+irand(-1,1),ThirdPortalWPs[i][1]+irand(-1,1),ThirdPortalWPs[i][2],0);
+ me->SetHomePosition(ThirdPortalWPs[7][0],ThirdPortalWPs[7][1],ThirdPortalWPs[7][2],3.149439);
+ break;
+ case 3:
+ for(int i=0;i<9;i++)
+ AddWaypoint(i,FourthPortalWPs[i][0]+irand(-1,1),FourthPortalWPs[i][1]+irand(-1,1),FourthPortalWPs[i][2],0);
+ me->SetHomePosition(FourthPortalWPs[8][0],FourthPortalWPs[8][1],FourthPortalWPs[8][2],3.149439);
+ break;
+ case 4:
+ for(int i=0;i<6;i++)
+ AddWaypoint(i,FifthPortalWPs[i][0]+irand(-1,1),FifthPortalWPs[i][1]+irand(-1,1),FifthPortalWPs[i][2],0);
+ me->SetHomePosition(FifthPortalWPs[5][0],FifthPortalWPs[5][1],FifthPortalWPs[5][2],3.149439);
+ break;
+ case 5:
+ for(int i=0;i<4;i++)
+ AddWaypoint(i,SixthPoralWPs[i][0]+irand(-1,1),SixthPoralWPs[i][1]+irand(-1,1),SixthPoralWPs[i][2],0);
+ me->SetHomePosition(SixthPoralWPs[3][0],SixthPoralWPs[3][1],SixthPoralWPs[3][2],3.149439);
+ break;
+ }
+ SetDespawnAtEnd(false);
+ Start(true,true);
+ }
+ }
+
+ void JustDied(Unit *unit)
+ {
+ if (Creature* portal = Unit::GetCreature((*me),pInstance->GetData64(DATA_TELEPORTATION_PORTAL)))
+ CAST_AI(npc_teleportation_portalAI,portal->AI())->SummonedMobDied(me);
+ if (pInstance)
+ pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE,1);
+ }
+
+ void CreatureStartAttackDoor(uint32 creature_guid)
+ {
+ me->SetReactState(REACT_PASSIVE);
+ DoCast(SPELL_DESTROY_DOOR_SEAL);
+ if (pInstance)
+ pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_ADD,1);
+ }
+
+};
+
+struct mob_azure_invaderAI : public violet_hold_trashAI
+{
+ mob_azure_invaderAI(Creature *c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ uint32 uiCleaveTimer;
+ uint32 uiImpaleTimer;
+ uint32 uiBrutalStrikeTimer;
+ uint32 uiSunderArmorTimer;
+
+ void Reset()
+ {
+ uiCleaveTimer = 5000;
+ uiImpaleTimer = 4000;
+ uiBrutalStrikeTimer = 5000;
+ uiSunderArmorTimer = 4000;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (me->GetEntry() == CREATURE_AZURE_INVADER_1)
+ {
+ if (uiCleaveTimer <= diff)
+ {
+ DoCast(me->getVictim(),SPELL_CLEAVE);
+ uiCleaveTimer = 5000;
+ } else uiCleaveTimer -= diff;
+
+ if (uiImpaleTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,SPELL_IMPALE);
+ uiImpaleTimer = 4000;
+ } else uiImpaleTimer -= diff;
+ }
+
+ if (me->GetEntry() == CREATURE_AZURE_INVADER_2)
+ {
+ if (uiBrutalStrikeTimer <= diff)
+ {
+ DoCast(me->getVictim(),SPELL_BRUTAL_STRIKE);
+ uiBrutalStrikeTimer = 5000;
+ } else uiBrutalStrikeTimer -= diff;
+
+ if (uiSunderArmorTimer <= diff)
+ {
+ DoCast(me->getVictim(),SPELL_SUNDER_ARMOR);
+ uiSunderArmorTimer = urand(8000,10000);
+ } else uiSunderArmorTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+};
+
+struct mob_azure_spellbreakerAI : public violet_hold_trashAI
+{
+ mob_azure_spellbreakerAI(Creature* c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ uint32 uiArcaneBlastTimer;
+ uint32 uiSlowTimer;
+ uint32 uiChainsOfIceTimer;
+ uint32 uiConeOfColdTimer;
+
+ void Reset()
+ {
+ uiArcaneBlastTimer = 5000;
+ uiSlowTimer = 4000;
+ uiChainsOfIceTimer = 5000;
+ uiConeOfColdTimer = 4000;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (me->GetEntry() == CREATURE_AZURE_SPELLBREAKER_1)
+ {
+ if (uiArcaneBlastTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_BLAST,H_SPELL_ARCANE_BLAST));
+ uiArcaneBlastTimer = 6000;
+ } else uiArcaneBlastTimer -= diff;
+
+ if (uiSlowTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,SPELL_SLOW);
+ uiSlowTimer = 5000;
+ } else uiSlowTimer -= diff;
+ }
+
+ if (me->GetEntry() == CREATURE_AZURE_SPELLBREAKER_2)
+ {
+ if (uiChainsOfIceTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,SPELL_CHAINS_OF_ICE);
+ uiChainsOfIceTimer = 7000;
+ } else uiChainsOfIceTimer -= diff;
+
+ if (uiConeOfColdTimer <= diff)
+ {
+ DoCast(DUNGEON_MODE(SPELL_CONE_OF_COLD,H_SPELL_CONE_OF_COLD));
+ uiConeOfColdTimer = 5000;
+ } else uiConeOfColdTimer -= diff;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+struct mob_azure_binderAI : public violet_hold_trashAI
+{
+ mob_azure_binderAI(Creature *c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ uint32 uiArcaneExplosionTimer;
+ uint32 uiArcainBarrageTimer;
+ uint32 uiFrostNovaTimer;
+ uint32 uiFrostboltTimer;
+
+ void Reset()
+ {
+ uiArcaneExplosionTimer = 5000;
+ uiArcainBarrageTimer = 4000;
+ uiFrostNovaTimer = 5000;
+ uiFrostboltTimer = 4000;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (me->GetEntry() == CREATURE_AZURE_BINDER_1)
+ {
+ if (uiArcaneExplosionTimer <= diff)
+ {
+ DoCast(DUNGEON_MODE(SPELL_ARCANE_EXPLOSION,H_SPELL_ARCANE_EXPLOSION));
+ uiArcaneExplosionTimer = 5000;
+ } else uiArcaneExplosionTimer -= diff;
+
+ if (uiArcainBarrageTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_BARRAGE,H_SPELL_ARCANE_BARRAGE));
+ uiArcainBarrageTimer = 6000;
+ } else uiArcainBarrageTimer -= diff;
+ }
+
+ if (me->GetEntry() == CREATURE_AZURE_BINDER_2)
+ {
+ if (uiFrostNovaTimer <= diff)
+ {
+ DoCast(DUNGEON_MODE(SPELL_FROST_NOVA,H_SPELL_FROST_NOVA));
+ uiFrostNovaTimer = 5000;
+ } else uiFrostNovaTimer -= diff;
+
+ if (uiFrostboltTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,DUNGEON_MODE(SPELL_FROSTBOLT,H_SPELL_FROSTBOLT));
+ uiFrostboltTimer = 6000;
+ } else uiFrostboltTimer -= diff;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+struct mob_azure_mage_slayerAI : public violet_hold_trashAI
+{
+ mob_azure_mage_slayerAI(Creature *c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ uint32 uiArcaneEmpowermentTimer;
+ uint32 uiSpellLockTimer;
+
+ void Reset()
+ {
+ uiArcaneEmpowermentTimer = 5000;
+ uiSpellLockTimer = 5000;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (me->GetEntry() == CREATURE_AZURE_MAGE_SLAYER_1)
+ {
+ if (uiArcaneEmpowermentTimer <= diff)
+ {
+ DoCast(me,SPELL_ARCANE_EMPOWERMENT);
+ uiArcaneEmpowermentTimer = 14000;
+ } else uiArcaneEmpowermentTimer -= diff;
+ }
+
+ if (me->GetEntry() == CREATURE_AZURE_MAGE_SLAYER_2)
+ {
+ if (uiSpellLockTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,SPELL_SPELL_LOCK);
+ uiSpellLockTimer = 9000;
+ } else uiSpellLockTimer -= diff;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+struct mob_azure_captainAI : public violet_hold_trashAI
+{
+ mob_azure_captainAI(Creature *c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ uint32 uiMortalStrikeTimer;
+ uint32 uiWhirlwindTimer;
+
+ void Reset()
+ {
+ uiMortalStrikeTimer = 5000;
+ uiWhirlwindTimer = 8000;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (uiMortalStrikeTimer <= diff)
+ {
+ DoCast(me->getVictim(),SPELL_MORTAL_STRIKE);
+ uiMortalStrikeTimer = 5000;
+ } else uiMortalStrikeTimer -= diff;
+
+ if (uiWhirlwindTimer <= diff)
+ {
+ DoCast(me,SPELL_WHIRLWIND_OF_STEEL);
+ uiWhirlwindTimer = 8000;
+ } else uiWhirlwindTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+struct mob_azure_sorcerorAI : public violet_hold_trashAI
+{
+ mob_azure_sorcerorAI(Creature *c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ uint32 uiArcaneStreamTimer;
+ uint32 uiArcaneStreamTimerStartingValueHolder;
+ uint32 uiManaDetonationTimer;
+
+ void Reset()
+ {
+ uiArcaneStreamTimer = 4000;
+ uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer;
+ uiManaDetonationTimer = 5000;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (uiArcaneStreamTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
+ if (pTarget)
+ DoCast(pTarget,DUNGEON_MODE(SPELL_ARCANE_STREAM,H_SPELL_ARCANE_STREAM));
+ uiArcaneStreamTimer = urand(0,5000)+5000;
+ uiArcaneStreamTimerStartingValueHolder = uiArcaneStreamTimer;
+ } else uiArcaneStreamTimer -= diff;
+
+ if (uiManaDetonationTimer <= diff && uiArcaneStreamTimer >=1500 && uiArcaneStreamTimer <= uiArcaneStreamTimerStartingValueHolder/2)
+ {
+ DoCast(DUNGEON_MODE(SPELL_MANA_DETONATION,H_SPELL_MANA_DETONATION));
+ uiManaDetonationTimer = urand(2000,6000);
+ } else uiManaDetonationTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+struct mob_azure_raiderAI : public violet_hold_trashAI
+{
+ mob_azure_raiderAI(Creature *c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+
+ uint32 uiConcussionBlowTimer;
+ uint32 uiMagicReflectionTimer;
+
+ void Reset()
+ {
+ uiConcussionBlowTimer = 5000;
+ uiMagicReflectionTimer = 8000;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (uiConcussionBlowTimer <= diff)
+ {
+ DoCast(me->getVictim(),SPELL_CONCUSSION_BLOW);
+ uiConcussionBlowTimer = 5000;
+ } else uiConcussionBlowTimer -= diff;
+
+ if (uiMagicReflectionTimer <= diff)
+ {
+ DoCast(SPELL_MAGIC_REFLECTION);
+ uiMagicReflectionTimer = urand(10000,15000);
+ } else uiMagicReflectionTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+struct mob_azure_stalkerAI : public violet_hold_trashAI
+{
+ mob_azure_stalkerAI(Creature *c) : violet_hold_trashAI(c)
+ {
+ pInstance = c->GetInstanceData();
+ }
+ uint32 uiBackstabTimer;
+ uint32 uiTacticalBlinkTimer;
+ bool TacticalBlinkCasted;
+
+ void Reset()
+ {
+ uiBackstabTimer = 1300;
+ uiTacticalBlinkTimer = 8000;
+ TacticalBlinkCasted =false;
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ violet_hold_trashAI::UpdateAI(diff);
+ npc_escortAI::UpdateAI(diff);
+
+ if (!UpdateVictim())
+ return;
+
+ if (!TacticalBlinkCasted)
+ {
+ if (uiTacticalBlinkTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true);
+ if (pTarget)
+ DoCast(pTarget,SPELL_TACTICAL_BLINK);
+ uiTacticalBlinkTimer = 6000;
+ TacticalBlinkCasted = true;
+ } else uiTacticalBlinkTimer -= diff;
+ }
+
+ else
+ {
+ if (uiBackstabTimer <= diff)
+ {
+ Unit* pTarget = SelectTarget(SELECT_TARGET_NEAREST, 0, 10, true);
+ DoCast(pTarget,SPELL_BACKSTAB);
+ TacticalBlinkCasted = false;
+ uiBackstabTimer =1300;
+ } else uiBackstabTimer -= diff;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+
+CreatureAI* GetAI_mob_azure_invader(Creature* pCreature)
+{
+ return new mob_azure_invaderAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_azure_spellbreaker(Creature* pCreature)
+{
+ return new mob_azure_spellbreakerAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_azure_binder(Creature* pCreature)
+{
+ return new mob_azure_binderAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_azure_mage_slayer(Creature* pCreature)
+{
+ return new mob_azure_mage_slayerAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_azure_captain(Creature* pCreature)
+{
+ return new mob_azure_captainAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_azure_sorceror(Creature* pCreature)
+{
+ return new mob_azure_sorcerorAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_azure_raider(Creature* pCreature)
+{
+ return new mob_azure_raiderAI (pCreature);
+}
+
+CreatureAI* GetAI_mob_azure_stalker(Creature* pCreature)
+{
+ return new mob_azure_stalkerAI (pCreature);
+}
+
void AddSC_violet_hold()
{
Script *newscript;
@@ -271,4 +1253,49 @@ void AddSC_violet_hold()
newscript->Name = "npc_teleportation_portal_vh";
newscript->GetAI = &GetAI_npc_teleportation_portal;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_invader";
+ newscript->GetAI = &GetAI_mob_azure_invader;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_spellbreaker";
+ newscript->GetAI = &GetAI_mob_azure_invader;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_binder";
+ newscript->GetAI = &GetAI_mob_azure_binder;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_mage_slayer";
+ newscript->GetAI = &GetAI_mob_azure_mage_slayer;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_captain";
+ newscript->GetAI = &GetAI_mob_azure_captain;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_sorceror";
+ newscript->GetAI = &GetAI_mob_azure_sorceror;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_raider";
+ newscript->GetAI = &GetAI_mob_azure_raider;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_stalker";
+ newscript->GetAI = &GetAI_mob_azure_stalker;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "mob_azure_saboteur";
+ newscript->GetAI = &GetAI_mob_azure_saboteur;
+ newscript->RegisterSelf();
}
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.h b/src/server/scripts/Northrend/VioletHold/violet_hold.h
index 4476d5e823a..0d55b9bfae8 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.h
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_VIOLET_HOLD_H
#define DEF_VIOLET_HOLD_H
@@ -14,7 +31,9 @@ enum Creatures
CREATURE_EREKEM_GUARD = 29395,
CREATURE_MORAGG = 29316,
CREATURE_CYANIGOSA = 31134,
- CREATURE_SINCLARI = 30658
+ CREATURE_SINCLARI = 30658,
+ CREATURE_SABOTEOUR = 31079,
+ NPC_VIOLET_HOLD_GUARD = 30659
};
enum Data
@@ -23,7 +42,17 @@ enum Data
DATA_2ND_BOSS_EVENT,
DATA_CYANIGOSA_EVENT,
DATA_WAVE_COUNT,
- DATA_REMOVE_NPC
+ DATA_REMOVE_NPC,
+ DATA_PORTAL_LOCATION,
+ DATA_DOOR_INTEGRITY,
+ DATA_NPC_PRESENCE_AT_DOOR,
+ DATA_NPC_PRESENCE_AT_DOOR_ADD,
+ DATA_NPC_PRESENCE_AT_DOOR_REMOVE,
+ DATA_START_BOSS_ENCOUNTER,
+ DATA_FIRST_BOSS,
+ DATA_SECOND_BOSS,
+ DATA_ACTIVATE_CRYSTAL,
+ DATA_MAIN_EVENT_PHASE
};
enum Data64
@@ -46,7 +75,11 @@ enum Data64
DATA_XEVOZZ_CELL,
DATA_ZURAMAT_CELL,
DATA_MAIN_DOOR,
- DATA_SINCLARI
+ DATA_SINCLARI,
+ DATA_TELEPORTATION_PORTAL,
+ DATA_SABOTEUR_PORTAL,
+ DATA_ADD_TRASH_MOB,
+ DATA_DEL_TRASH_MOB
};
enum Bosses
diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp
index 19d82dc9044..b2b975f54ab 100644
--- a/src/server/scripts/Northrend/borean_tundra.cpp
+++ b/src/server/scripts/Northrend/borean_tundra.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -35,7 +37,7 @@ npc_lurgglbr
npc_nexus_drake_hatchling
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "ScriptedFollowerAI.h"
@@ -2108,7 +2110,7 @@ struct npc_warmage_coldarraAI : public Scripted_NoMovementAI
m_uiTimer = 0;
}
- void Aggro(Unit* /*pWho*/) {}
+ void EnterCombat(Unit* /*pWho*/) {}
void AttackStart(Unit* /*pWho*/) {}
diff --git a/src/server/scripts/Northrend/crystalsong_forest.cpp b/src/server/scripts/Northrend/crystalsong_forest.cpp
index 208e9dea5b5..e8743b92db4 100644
--- a/src/server/scripts/Northrend/crystalsong_forest.cpp
+++ b/src/server/scripts/Northrend/crystalsong_forest.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2010 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* Script Data Start
@@ -24,7 +23,7 @@ SDComment:
SDCategory: CrystalsongForest
Script Data End */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*******************************************************
* npc_warmage_violetstand
diff --git a/src/server/scripts/Northrend/dalaran.cpp b/src/server/scripts/Northrend/dalaran.cpp
index 7d5e76ffe35..a602b84fcf0 100644
--- a/src/server/scripts/Northrend/dalaran.cpp
+++ b/src/server/scripts/Northrend/dalaran.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* Script Data Start
@@ -24,7 +23,7 @@ SDComment: For what is 63990+63991? Same function but don't work correct...
SDCategory: Dalaran
Script Data End */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*******************************************************
* npc_mageguard_dalaran
@@ -53,7 +52,7 @@ struct npc_mageguard_dalaranAI : public Scripted_NoMovementAI
void Reset(){}
- void Aggro(Unit* /*pWho*/){}
+ void EnterCombat(Unit* /*pWho*/){}
void AttackStart(Unit* /*pWho*/){}
diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp
index 4f26ec1de1a..f79deb594b0 100644
--- a/src/server/scripts/Northrend/dragonblight.cpp
+++ b/src/server/scripts/Northrend/dragonblight.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_alexstrasza_wr_gate
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
enum eEnums
diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp
index 4b6d65a9764..bb0971c8904 100644
--- a/src/server/scripts/Northrend/grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/grizzly_hills.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_orsonn_and_kodian
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#define GOSSIP_ITEM1 "You're free to go Orsonn, but first tell me what's wrong with the furbolg."
diff --git a/src/server/scripts/Northrend/howling_fjord.cpp b/src/server/scripts/Northrend/howling_fjord.cpp
index 172501e2faa..7b2fb06986e 100644
--- a/src/server/scripts/Northrend/howling_fjord.cpp
+++ b/src/server/scripts/Northrend/howling_fjord.cpp
@@ -1,18 +1,18 @@
-/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+/*
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -27,7 +27,7 @@ npc_plaguehound_tracker
npc_apothecary_hanes
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 76608bdb73d..a40d363eeb8 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_arete
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## npc_arete
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index b5df8998b4a..cae5012eb3a 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -1,18 +1,18 @@
-/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+/*
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -28,7 +28,7 @@ npc_vekjik
avatar_of_freya
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp
index 9275e24bd2f..bcc846be1dc 100644
--- a/src/server/scripts/Northrend/storm_peaks.cpp
+++ b/src/server/scripts/Northrend/storm_peaks.cpp
@@ -1,21 +1,21 @@
-/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+/*
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp
index a821ea4ffae..b1574b21f6b 100644
--- a/src/server/scripts/Northrend/zuldrak.cpp
+++ b/src/server/scripts/Northrend/zuldrak.cpp
@@ -1,22 +1,21 @@
/*
- * Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.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 bfde95ffcb0..353da092dba 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ boss_exarch_maladaar
mob_avatar_of_martyred
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_MOONFIRE 37328
#define SPELL_FIREBALL 37329
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
index c13e2905171..6c584e16744 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ Comment: InhibitMagic should stack slower far from the boss, proper Visual for F
Category: Auchindoun, Auchenai Crypts
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_INHIBITMAGIC 32264
#define SPELL_ATTRACTMAGIC 32265
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 5b15178c33e..d38c6d03662 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ boss_nexusprince_shaffar
mob_ethereal_beacon
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum ePrince
{
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
index 51ec2e83b46..da9c0c4a520 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Not known how void blast is done (amount of rapid cast seems to be re
SDCategory: Auchindoun, Mana Tombs
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO_1 -1557008
#define SAY_AGGRO_2 -1557009
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 9628fa1a98f..4a76d46904d 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Shock spells/times need more work. Heroic partly implemented.
SDCategory: Auchindoun, Sethekk Halls
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_SUMMON -1556000
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 32b97293ca3..83cf669824f 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Heroic supported. Some details missing, but most are spell related.
SDCategory: Auchindoun, Sethekk Halls
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sethekk_halls.h"
#define SAY_INTRO -1556007
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
index ee27da3cff5..61b891c7535 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Instance Data for Sethekk Halls instance
SDCategory: Auchindoun, Sethekk Halls
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "sethekk_halls.h"
enum eEnums
@@ -66,7 +68,7 @@ struct instance_sethekk_halls : public ScriptedInstance
{
case DATA_IKISSDOOREVENT:
if (data == DONE)
- DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILISECONDS);
+ DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILLISECONDS);
break;
case TYPE_ANZU_ENCOUNTER:
AnzuEncounter = data;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
index 79a6cd4952d..a1cbc7ce61f 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SETHEKK_HALLS_H
#define DEF_SETHEKK_HALLS_H
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 2bb6a717a5a..f039b7c7fab 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Enrage spell missing/not known
SDCategory: Auchindoun, Shadow Labyrinth
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "shadow_labyrinth.h"
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 52c60ae0d0e..817b71200f0 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Incite Chaos not functional since core lacks Mind Control support
SDCategory: Auchindoun, Shadow Labyrinth
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shadow_labyrinth.h"
#define SPELL_INCITE_CHAOS 33676
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 8b63b765b47..4234c0c1271 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Auchindoun, Shadow Labyrinth
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shadow_labyrinth.h"
#define SAY_INTRO -1555028
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index 14bf249c3b5..ef6565bb7cf 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Timers may be incorrect
SDCategory: Auchindoun, Shadow Labyrinth
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shadow_labyrinth.h"
#define EMOTE_SONIC_BOOM -1555036
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
index 78340e5e132..b5b917547a6 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Some cleanup left along with save
SDCategory: Auchindoun, Shadow Labyrinth
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shadow_labyrinth.h"
#define MAX_ENCOUNTER 5
@@ -96,7 +98,7 @@ struct instance_shadow_labyrinth : public ScriptedInstance
if (pCreature->isAlive())
{
++m_uiFelOverseerCount;
- debug_log("TSCR: Shadow Labyrinth: counting %u Fel Overseers.",m_uiFelOverseerCount);
+ sLog.outDebug("TSCR: Shadow Labyrinth: counting %u Fel Overseers.",m_uiFelOverseerCount);
}
break;
}
@@ -113,7 +115,7 @@ struct instance_shadow_labyrinth : public ScriptedInstance
case TYPE_OVERSEER:
if (uiData != DONE)
{
- error_log("TSCR: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE");
+ sLog.outError("TSCR: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE");
return;
}
if (m_uiFelOverseerCount)
@@ -121,11 +123,11 @@ struct instance_shadow_labyrinth : public ScriptedInstance
--m_uiFelOverseerCount;
if (m_uiFelOverseerCount)
- debug_log("TSCR: Shadow Labyrinth: %u Fel Overseers left to kill.",m_uiFelOverseerCount);
+ sLog.outDebug("TSCR: Shadow Labyrinth: %u Fel Overseers left to kill.",m_uiFelOverseerCount);
else
{
m_auiEncounter[1] = DONE;
- debug_log("TSCR: Shadow Labyrinth: TYPE_OVERSEER == DONE");
+ sLog.outDebug("TSCR: Shadow Labyrinth: TYPE_OVERSEER == DONE");
}
}
break;
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h
index a78955368bf..4bbdbd76c59 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SHADOW_LABYRINTH_H
#define DEF_SHADOW_LABYRINTH_H
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index c1e7f19fbb1..bae84641086 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
npc_spirit_of_olum
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
/*###
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h
index b7432cd5b20..52ee510efd0 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.h
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_BLACK_TEMPLE_H
#define DEF_BLACK_TEMPLE_H
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
index 1093ce06cb8..b7fee842206 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Bloodboil not working correctly, missing enrage
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
//Speech'n'Sound
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index b8e09c0e08e..7af3aba92f9 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_illidan_stormrage
@@ -21,7 +23,7 @@ SDComment: Somewhat of a workaround for Parasitic Shadowfiend, unable to summon
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
#define GETGO(obj, guid) GameObject* obj = pInstance->instance->GetGameObject(guid)
@@ -2065,7 +2067,7 @@ void boss_illidan_stormrageAI::SummonMaiev()
{
EnterEvadeMode();
me->MonsterTextEmote(EMOTE_UNABLE_TO_SUMMON, 0);
- error_log("SD2 ERROR: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)");
+ sLog.outError("SD2 ERROR: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)");
}
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index 5949fc46511..cb72486972b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Saber Lash missing, Fatal Attraction slightly incorrect; need to dama
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
//Speech'n'Sounds
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 3e019a8dc35..1482cb84bd2 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Reliquary_of_Souls
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
#include "Spell.h"
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 94f88d5715c..539b347e6fd 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Seems to be complete.
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
#define SAY_DEATH -1564013
@@ -276,7 +278,7 @@ struct boss_shade_of_akamaAI : public ScriptedAI
GridSearcherSucceeded = true;
}
}
- } else error_log("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
+ } else sLog.outError("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
}
}
@@ -293,13 +295,13 @@ struct boss_shade_of_akamaAI : public ScriptedAI
if (reseting)
return;
- debug_log("TSCR: Increasing Death Count for Shade of Akama encounter");
+ sLog.outDebug("TSCR: Increasing Death Count for Shade of Akama encounter");
++DeathCount;
me->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2);
if (guid)
{
if (Sorcerers.empty())
- error_log("SD2 ERROR: Shade of Akama - attempt to remove guid %u from Sorcerers list but list is already empty", guid);
+ sLog.outError("SD2 ERROR: Shade of Akama - attempt to remove guid %u from Sorcerers list but list is already empty", guid);
else Sorcerers.remove(guid);
}
}
@@ -351,17 +353,17 @@ struct boss_shade_of_akamaAI : public ScriptedAI
{
CAST_AI(mob_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = me->GetGUID();
Channelers.push_back((*itr)->GetGUID());
- debug_log("TSCR: Shade of Akama Grid Search found channeler %u. Adding to list", (*itr)->GetGUID());
+ sLog.outDebug("TSCR: Shade of Akama Grid Search found channeler %u. Adding to list", (*itr)->GetGUID());
}
}
- else error_log("SD2 ERROR: Grid Search was unable to find any channelers. Shade of Akama encounter will be buggy");
+ else sLog.outError("SD2 ERROR: Grid Search was unable to find any channelers. Shade of Akama encounter will be buggy");
}
void SetSelectableChannelers()
{
if (Channelers.empty())
{
- error_log("SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy");
+ sLog.outError("SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy");
return;
}
@@ -485,7 +487,7 @@ void mob_ashtongue_channelerAI::JustDied(Unit* /*killer*/)
Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade && Shade->isAlive())
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount();
- else error_log("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
+ else sLog.outError("SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
}
void mob_ashtongue_sorcererAI::JustDied(Unit* /*killer*/)
@@ -493,7 +495,7 @@ void mob_ashtongue_sorcererAI::JustDied(Unit* /*killer*/)
Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
if (Shade && Shade->isAlive())
CAST_AI(boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(me->GetGUID());
- else error_log("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
+ else sLog.outError("SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
}
struct npc_akamaAI : public ScriptedAI
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index bc1ea3ec673..7dc197994fe 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2008 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Need to implement molten punch
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
#define EMOTE_NEW_TARGET -1564010
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 670edc4d869..92b5a0a6134 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Requires Mind Control support for Ghosts.
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
//Speech'n'sound
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index 7d94b4b36a0..3f39cb0aea7 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
enum eEnums
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 82cc2876b5a..c5fb8159a41 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Circle of Healing not working properly.
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
//Speech'n'Sounds
@@ -143,7 +145,7 @@ struct mob_blood_elf_council_voice_triggerAI : public ScriptedAI
Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW);
Council[2] = pInstance->GetData64(DATA_LADYMALANDE);
Council[3] = pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR);
- } else error_log(ERROR_INST_DATA);
+ } else sLog.outError(ERROR_INST_DATA);
}
void EnterCombat(Unit* /*who*/) {}
@@ -375,7 +377,7 @@ struct boss_illidari_councilAI : public ScriptedAI
}
else
{
- error_log(ERROR_INST_DATA);
+ sLog.outError(ERROR_INST_DATA);
EnterEvadeMode();
return;
}
@@ -423,7 +425,7 @@ struct boss_illidari_councilAI : public ScriptedAI
{
if (!pInstance)
{
- error_log(ERROR_INST_DATA);
+ sLog.outError(ERROR_INST_DATA);
return;
}
diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
index 88e25026a13..7d5c5a9a3af 100644
--- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Instance_Black_Temple
@@ -21,7 +23,7 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter
SDCategory: Black Temple
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "black_temple.h"
#define MAX_ENCOUNTER 9
@@ -124,7 +126,7 @@ struct instance_black_temple : public ScriptedInstance
}
}
- debug_log("TSCR: Instance Black Temple: GetPlayerInMap, but PlayerList is empty!");
+ sLog.outDebug("TSCR: Instance Black Temple: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
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 69a969adda0..a99aa661c97 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Cyclone workaround
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "serpent_shrine.h"
#include "ScriptedEscortAI.h"
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 923fdf55f80..1e75a4e65fd 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Some details and adjustments left to do, probably nothing major. Spaw
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "serpent_shrine.h"
#define SAY_AGGRO -1548000
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 2f0485d0e6c..ed3af2453d1 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing blizzlike Shield Generators coords
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "serpent_shrine.h"
#include "ScriptedSimpleAI.h"
#include "Spell.h"
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 61c9ed9d527..0392ebaaad8 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Possesion Support
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "serpent_shrine.h"
// --- Spells used by Leotheras The Blind
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
index b1c0c10bcce..7bfd50407a6 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Coilfang Frenzy, find out how could we fishing in the strangepool
SDCategory: The Lurker Below
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "serpent_shrine.h"
#include "ScriptedSimpleAI.h"
#include "Spell.h"
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 14c87aee141..b040730f1a2 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Morogrim_Tidewalker
@@ -21,7 +23,7 @@ SDComment: Water globules don't explode properly, remove hacks
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "serpent_shrine.h"
#define SAY_AGGRO -1548030
@@ -221,9 +223,8 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
{
//Teleport 4 players under the waterfalls
Unit *pTarget;
- using std::set;
- set<int>list;
- set<int>::const_iterator itr;
+ std::set<uint64> list;
+ std::set<uint64>::const_iterator itr;
for (uint8 i = 0; i < 4; ++i)
{
counter = 0;
@@ -251,7 +252,7 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
} else WateryGrave_Timer -= diff;
//Start Phase2
- if ((me->GetHealth()*100 / me->GetMaxHealth()) < 25)
+ if (HealthBelowPct(25))
Phase2 = true;
}
else
@@ -260,13 +261,13 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI
if (WateryGlobules_Timer <= diff)
{
Unit* pGlobuleTarget;
- using std::set;
- set<int>globulelist;
- set<int>::const_iterator itr;
+ std::set<uint64> globulelist;
+ std::set<uint64>::const_iterator itr;
for (uint8 g = 0; g < 4; g++) //one unit can't cast more than one spell per update, so some players have to cast for us XD
{
counter = 0;
- do {
+ do
+ {
pGlobuleTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true);
if (pGlobuleTarget)
itr = globulelist.find(pGlobuleTarget->GetGUID());
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
index c80afae15c7..05944c1954e 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "serpent_shrine.h"
#define MAX_ENCOUNTER 6
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h
index adfa39dc7e0..953e1f48eea 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SERPENT_SHRINE_H
#define DEF_SERPENT_SHRINE_H
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 8e1b438bdc5..a8969d18b8b 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ boss_hydromancer_thespia
mob_coilfang_waterelemental
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "steam_vault.h"
#define SAY_SUMMON -1545000
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 f2da4058e44..1c25800e2e6 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ boss_mekgineer_steamrigger
mob_steamrigger_mechanic
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "steam_vault.h"
#define SAY_MECHANICS -1545007
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 f46956dda81..b6a9d628f06 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Contains workarounds regarding warlord's rage spells not acting as ex
SDCategory: Coilfang Resevoir, The Steamvault
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "steam_vault.h"
#define SAY_INTRO -1545016
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
index 188a23738f5..3d089a3ecda 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Instance script and access panel GO
SDCategory: Coilfang Resevoir, The Steamvault
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "steam_vault.h"
#define MAX_ENCOUNTER 4
@@ -119,7 +121,7 @@ struct instance_steam_vault : public ScriptedInstance
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
HandleGameObject(MainChambersDoor, true);
- debug_log("TSCR: Instance Steamvault: Access panel used.");
+ sLog.outDebug("TSCR: Instance Steamvault: Access panel used.");
}
m_auiEncounter[0] = data;
break;
@@ -131,7 +133,7 @@ struct instance_steam_vault : public ScriptedInstance
if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
HandleGameObject(MainChambersDoor, true);
- debug_log("TSCR: Instance Steamvault: Access panel used.");
+ sLog.outDebug("TSCR: Instance Steamvault: Access panel used.");
}
m_auiEncounter[1] = data;
break;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
index 4b407ac4816..c15582c5b03 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_STEAM_VAULT_H
#define DEF_STEAM_VAULT_H
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
index fcfcc1b1a90..2fd078bc5ba 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Need confirmation if spell data are same in both modes. Summons shoul
SDCategory: Coilfang Resevoir, Underbog
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_FOUL_SPORES 31673
#define SPELL_ACID_GEYSER 38739
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
index 3a78660389b..a005d52cd84 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Timers may be incorrect
SDCategory: Coilfang Resevoir, Underbog
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SPELL_LEVITATE 31704
#define SPELL_SUSPENSION 31719
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index a07ac910598..8d25155f14a 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Ground Slam need further development (knock back effect and shatter e
SDCategory: Gruul's Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "gruuls_lair.h"
enum eEnums
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 482af86225c..a2824a6fd16 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Correct timers, after whirlwind melee attack bug, prayer of healing
SDCategory: Gruul's Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "gruuls_lair.h"
#define SAY_AGGRO -1565000
diff --git a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
index 7003dcb1e26..8dc06e35666 100644
--- a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
+++ b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_GRUULS_LAIR_H
#define DEF_GRUULS_LAIR_H
diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
index bb790a5d4ea..2df6ad896da 100644
--- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
+++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Gruul's Lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "gruuls_lair.h"
#define MAX_ENCOUNTER 2
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
index b845c66823f..e6d1bd14efd 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_BLOOD_FURNACE_H
#define DEF_BLOOD_FURNACE_H
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
index d5fb9bdba49..3a8fcee2975 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: pre-event not made
SDCategory: Hellfire Citadel, Blood Furnace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blood_furnace.h"
enum eEnums
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 a44ad9cc3c8..5b705708e9b 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ boss_kelidan_the_breaker
mob_shadowmoon_channeler
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blood_furnace.h"
enum eKelidan
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 45219b6509b..1c3ad6bf3f1 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Mind control no support
SDCategory: Hellfire Citadel, Blood Furnace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blood_furnace.h"
enum eEnums
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
index 3a2eb8ba5ee..1b0f3f8aa25 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Hellfire Citadel, Blood Furnace
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "blood_furnace.h"
#define ENTRY_SEWER1 181823
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 d6c0b2fd401..9cdab2399a7 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Temporary solution for orbital/shadow whip-ability. Needs more core s
SDCategory: Hellfire Citadel, Hellfire Ramparts
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO_1 -1543009
#define SAY_AGGRO_2 -1543010
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 181911f77a4..8dd705d3b3f 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,34 +23,45 @@ Comment:
Category: Hellfire Citadel, Hellfire Ramparts
EndScriptData */
-#include "ScriptedPch.h"
-
-#define SPELL_FIREBALL DUNGEON_MODE(34653, 36920)
-#define SPELL_CONE_OF_FIRE DUNGEON_MODE(30926, 36921)
-#define SPELL_SUMMON_LIQUID_FIRE DUNGEON_MODE(23971, 30928)
-#define SPELL_BELLOWING_ROAR 39427
-#define SPELL_REVENGE DUNGEON_MODE(19130, 40392)
-#define SPELL_KIDNEY_SHOT 30621
-#define SPELL_FIRE_NOVA_VISUAL 19823
-
-#define ENTRY_HELLFIRE_SENTRY 17517
-#define ENTRY_VAZRUDEN_HERALD 17307
-#define ENTRY_VAZRUDEN 17537
-#define ENTRY_NAZAN 17536
-#define ENTRY_LIQUID_FIRE 22515
-#define ENTRY_REINFORCED_FEL_IRON_CHEST DUNGEON_MODE(185168, 185169)
-
-#define SAY_INTRO -1543017
-#define SAY_WIPE -1543018
-#define SAY_AGGRO_1 -1543019
-#define SAY_AGGRO_2 -1543020
-#define SAY_AGGRO_3 -1543021
-#define SAY_KILL_1 -1543022
-#define SAY_KILL_2 -1543023
-#define SAY_DIE -1543024
-#define EMOTE -1543025
-
-#define PATH_ENTRY 2081
+#include "ScriptPCH.h"
+
+enum eSpells
+{
+ SPELL_FIREBALL = 34653,
+ SPELL_FIREBALL_H = 36920,
+ SPELL_CONE_OF_FIRE = 30926,
+ SPELL_CONE_OF_FIRE_H = 36921,
+ SPELL_SUMMON_LIQUID_FIRE = 23971,
+ SPELL_SUMMON_LIQUID_FIRE_H = 30928,
+ SPELL_BELLOWING_ROAR = 39427,
+ SPELL_REVENGE = 19130,
+ SPELL_REVENGE_H = 40392,
+ SPELL_KIDNEY_SHOT = 30621,
+ SPELL_FIRE_NOVA_VISUAL = 19823,
+};
+
+enum eUnits
+{
+ ENTRY_HELLFIRE_SENTRY = 17517,
+ ENTRY_VAZRUDEN_HERALD = 17307,
+ ENTRY_VAZRUDEN = 17537,
+ ENTRY_NAZAN = 17536,
+ ENTRY_LIQUID_FIRE = 22515,
+ ENTRY_REINFORCED_FEL_IRON_CHEST = 185168,
+ ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169,
+};
+enum eSays
+{
+ 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,
+};
const float VazrudenMiddle[3] = {-1406.5, 1746.5, 81.2};
const float VazrudenRing[2][3] =
@@ -59,10 +72,10 @@ const float VazrudenRing[2][3] =
struct boss_nazanAI : public ScriptedAI
{
- boss_nazanAI(Creature *c) : ScriptedAI(c)
+ boss_nazanAI(Creature* pCreature) : ScriptedAI(pCreature)
{
VazrudenGUID = 0;
- flight = true;
+ flight = true;
}
uint32 Fireball_Timer;
@@ -70,7 +83,6 @@ struct boss_nazanAI : public ScriptedAI
uint32 BellowingRoar_Timer;
uint32 Fly_Timer;
uint32 Turn_Timer;
- uint32 UnsummonCheck;
bool flight;
uint64 VazrudenGUID;
SpellEntry *liquid_fire;
@@ -80,8 +92,7 @@ struct boss_nazanAI : public ScriptedAI
Fireball_Timer = 4000;
Fly_Timer = 45000;
Turn_Timer = 0;
- UnsummonCheck = 5000;
- }
+ }
void EnterCombat(Unit* /*who*/) {}
@@ -91,7 +102,7 @@ struct boss_nazanAI : public ScriptedAI
{
summoned->SetLevel(me->getLevel());
summoned->setFaction(me->getFaction());
- summoned->CastSpell(summoned,SPELL_SUMMON_LIQUID_FIRE,true);
+ summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_SUMMON_LIQUID_FIRE,SPELL_SUMMON_LIQUID_FIRE_H),true);
summoned->CastSpell(summoned,SPELL_FIRE_NOVA_VISUAL,true);
}
}
@@ -105,18 +116,12 @@ struct boss_nazanAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
- {
- if (UnsummonCheck < diff && me->isAlive())
- me->DisappearAndDie();
- else
- UnsummonCheck -= diff;
return;
- }
if (Fireball_Timer <= diff)
{
- if (Unit *victim = SelectUnit(SELECT_TARGET_RANDOM,0))
- DoCast(victim, SPELL_FIREBALL, true);
+ if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM,0))
+ DoCast(pVictim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true);
Fireball_Timer = urand(4000,7000);
} else Fireball_Timer -= diff;
@@ -127,12 +132,12 @@ struct boss_nazanAI : public ScriptedAI
{
flight = false;
BellowingRoar_Timer = 6000;
- ConeOfFire_Timer = 12000;
+ ConeOfFire_Timer = 12000;
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
me->GetMotionMaster()->Clear();
- if (Unit *victim = SelectUnit(SELECT_TARGET_NEAREST,0))
- me->AI()->AttackStart(victim);
+ if (Unit* pVictim = SelectUnit(SELECT_TARGET_NEAREST,0))
+ me->AI()->AttackStart(pVictim);
DoStartMovement(me->getVictim());
DoScriptText(EMOTE, me);
return;
@@ -141,7 +146,7 @@ struct boss_nazanAI : public ScriptedAI
if (Turn_Timer <= diff)
{
uint32 waypoint = (Fly_Timer/10000)%2;
- if (me->IsWithinDist3d(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2], 5))
+ if (!me->IsWithinDist3d(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2], 5))
me->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]);
Turn_Timer = 10000;
} else Turn_Timer -= diff;
@@ -150,7 +155,7 @@ struct boss_nazanAI : public ScriptedAI
{
if (ConeOfFire_Timer <= diff)
{
- DoCast(me, SPELL_CONE_OF_FIRE);
+ DoCast(me, DUNGEON_MODE(SPELL_CONE_OF_FIRE, SPELL_CONE_OF_FIRE_H));
ConeOfFire_Timer = 12000;
Fireball_Timer = 4000;
} else ConeOfFire_Timer -= diff;
@@ -169,7 +174,7 @@ struct boss_nazanAI : public ScriptedAI
struct boss_vazrudenAI : public ScriptedAI
{
- boss_vazrudenAI(Creature *c) : ScriptedAI(c)
+ boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature)
{
}
@@ -220,7 +225,7 @@ struct boss_vazrudenAI : public ScriptedAI
if (Revenge_Timer <= diff)
{
if (Unit *victim = me->getVictim())
- DoCast(victim, SPELL_REVENGE);
+ DoCast(victim, DUNGEON_MODE(SPELL_REVENGE,SPELL_REVENGE_H));
Revenge_Timer = 5000;
} else Revenge_Timer -= diff;
@@ -230,7 +235,7 @@ struct boss_vazrudenAI : public ScriptedAI
struct boss_vazruden_the_heraldAI : public ScriptedAI
{
- boss_vazruden_the_heraldAI(Creature *c) : ScriptedAI(c)
+ boss_vazruden_the_heraldAI(Creature* pCreature) : ScriptedAI(pCreature)
{
summoned = false;
sentryDown = false;
@@ -251,8 +256,7 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
phase = 0;
waypoint = 0;
check = 0;
- UnsummonAdds();
- me->GetMotionMaster()->MovePath(PATH_ENTRY, true);
+ UnsummonAdds();
}
void UnsummonAdds()
@@ -288,15 +292,15 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
{
if (Creature* Vazruden = me->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
VazrudenGUID = Vazruden->GetGUID();
- if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
- NazanGUID = Nazan->GetGUID();
+ if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
+ NazanGUID = Nazan->GetGUID();
summoned = true;
me->SetVisibility(VISIBILITY_OFF);
me->addUnitState(UNIT_STAT_ROOT);
}
}
- void EnterCombat(Unit * /*who*/)
+ void EnterCombat(Unit* /*who*/)
{
if (phase == 0)
{
@@ -306,27 +310,29 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
}
}
- void JustSummoned(Creature *summoned)
+ void JustSummoned(Creature* pSummoned)
{
- if (!summoned) return;
- Unit *victim = me->getVictim();
- if (summoned->GetEntry() == ENTRY_NAZAN)
+ if (!pSummoned)
+ return;
+ Unit* pVictim = me->getVictim();
+ if (pSummoned->GetEntry() == ENTRY_NAZAN)
{
- CAST_AI(boss_nazanAI, summoned->AI())->VazrudenGUID = VazrudenGUID;
- summoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- summoned->SetSpeed(MOVE_FLIGHT, 2.5);
- if (victim)
- AttackStartNoMove(victim);
+ CAST_AI(boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID;
+ pSummoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
+ pSummoned->SetSpeed(MOVE_FLIGHT, 2.5);
+ if (pVictim)
+ AttackStartNoMove(pVictim);
}
- else if (victim)
- summoned->AI()->AttackStart(victim);
+ else
+ if (pVictim)
+ pSummoned->AI()->AttackStart(pVictim);
}
- void SentryDownBy(Unit* killer)
+ void SentryDownBy(Unit* pKiller)
{
if (sentryDown)
{
- AttackStartNoMove(killer);
+ AttackStartNoMove(pKiller);
sentryDown = false;
}
else
@@ -375,9 +381,9 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
}
else
{
- me->SummonGameObject(ENTRY_REINFORCED_FEL_IRON_CHEST,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,0,0,0,0,0);
+ me->SummonGameObject(DUNGEON_MODE(ENTRY_REINFORCED_FEL_IRON_CHEST, ENTRY_REINFORCED_FEL_IRON_CHEST_H),VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,0,0,0,0,0);
me->SetLootRecipient(NULL); // don't think this is necessary..
- me->Kill(me);
+ //me->Kill(me);
}
check = 2000;
} else check -= diff;
@@ -388,7 +394,7 @@ struct boss_vazruden_the_heraldAI : public ScriptedAI
struct mob_hellfire_sentryAI : public ScriptedAI
{
- mob_hellfire_sentryAI(Creature *c) : ScriptedAI(c) {}
+ mob_hellfire_sentryAI(Creature* pCreature) : ScriptedAI(pCreature) {}
uint32 KidneyShot_Timer;
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 f0e813d3890..4feb83ec9cd 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Missing adds to heal him. Surge should be used on pTarget furthest aw
SDCategory: Hellfire Citadel, Hellfire Ramparts
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_TAUNT -1543000
#define SAY_HEAL -1543001
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
index 599aa237774..bbf61b4c45c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_RAMPARTS_H
#define DEF_RAMPARTS_H
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
index 29c58675e9c..56cbf1cabcb 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Hellfire Ramparts
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "hellfire_ramparts.h"
struct instance_ramparts : public ScriptedInstance
@@ -51,18 +53,18 @@ struct instance_ramparts : public ScriptedInstance
void SetData(uint32 uiType, uint32 uiData)
{
- debug_log("TSCR: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData);
+ sLog.outDebug("TSCR: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData);
switch(uiType)
{
case TYPE_VAZRUDEN:
if (uiData == DONE && m_auiEncounter[1] == DONE)
- DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS);
+ DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS);
m_auiEncounter[0] = uiData;
break;
case TYPE_NAZAN:
if (uiData == DONE && m_auiEncounter[0] == DONE)
- DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS);
+ DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS);
m_auiEncounter[1] = uiData;
break;
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index 5fb381f4065..123636a503c 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -1,18 +1,20 @@
-/* Copyright(C) 2006 - 2008 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Magtheridon
@@ -21,7 +23,7 @@ SDComment: In Development
SDCategory: Hellfire Citadel, Magtheridon's lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "magtheridons_lair.h"
struct Yell
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
index d5b459a1fa1..aa655588d3b 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Hellfire Citadel, Magtheridon's lair
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "magtheridons_lair.h"
#define SPELL_SOUL_TRANSFER 30531 // core bug, does not support target 7
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
index 1b3e525fc54..f2c5d97277a 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_MAGTHERIDONS_LAIR_H
#define DEF_MAGTHERIDONS_LAIR_H
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index e3ded52edc9..64ad5c7b130 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ mob_fel_orc_convert
mob_lesser_shadow_fissure
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shattered_halls.h"
struct Say
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 6fa1c9efe33..29119eb4015 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ mob_omrogg_heads
boss_warbringer_omrogg
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shattered_halls.h"
enum eEnums
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 b108077518a..3478f3b0434 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
boss_warchief_kargath_bladefist
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO1 -1540042
#define SAY_AGGRO2 -1540043
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
index c29df4d6411..c7107cdb244 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: currently missing info about door. instance not complete
SDCategory: Hellfire Citadel, Shattered Halls
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "shattered_halls.h"
#define MAX_ENCOUNTER 2
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
index cbfa23ec4e0..bfde60a86e4 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_SHATTERED_H
#define DEF_SHATTERED_H
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index af5f1bd95c1..6230ec1a7fa 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -1,18 +1,20 @@
-/* Copyright(C) 2006 - 2008 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: boss_alar
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Tempest Keep, The Eye
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "the_eye.h"
#define SPELL_FLAME_BUFFET 34121 // Flame Buffet - every 1,5 secs in phase 1 if there is no victim in melee range and after Dive Bomb in phase 2 with same conditions
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index e9e217a5c62..af311f7f5c2 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Tempest Keep, The Eye
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "the_eye.h"
enum eEnums
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 05681fb7539..b6cfca4940a 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: SQL, weapon scripts, mind control, need correct spells(interruptible/
SDCategory: Tempest Keep, The Eye
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "the_eye.h"
#include "WorldPacket.h"
@@ -356,7 +358,7 @@ struct boss_kaelthasAI : public ScriptedAI
if (!m_auiAdvisorGuid[0] || !m_auiAdvisorGuid[1] || !m_auiAdvisorGuid[2] || !m_auiAdvisorGuid[3])
{
- error_log("TSCR: Kael'Thas One or more advisors missing, Skipping Phases 1-3");
+ sLog.outError("TSCR: Kael'Thas One or more advisors missing, Skipping Phases 1-3");
DoScriptText(SAY_PHASE4_INTRO2, me);
@@ -399,7 +401,7 @@ struct boss_kaelthasAI : public ScriptedAI
{
if (!me->getVictim() && Phase >= 4)
{
- who->RemoveAurasDueToSpell(SPELL_AURA_MOD_STEALTH);
+ who->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
}
else if (me->GetMap()->IsDungeon())
@@ -414,7 +416,7 @@ struct boss_kaelthasAI : public ScriptedAI
}
}
- void Aggro(Unit * /*who*/)
+ void EnterCombat(Unit * /*who*/)
{
if (m_pInstance && !m_pInstance->GetData(DATA_KAELTHASEVENT) && !Phase)
StartEvent();
@@ -678,7 +680,7 @@ struct boss_kaelthasAI : public ScriptedAI
Advisor = Unit::GetCreature((*me), m_auiAdvisorGuid[i]);
if (!Advisor)
- error_log("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
+ sLog.outError("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
else
CAST_AI(advisorbase_ai, Advisor->AI())->Revive(pTarget);
}
@@ -763,7 +765,7 @@ struct boss_kaelthasAI : public ScriptedAI
if (me->getThreatManager().getThreatList().size() >= 2)
for (uint32 i = 0; i < 3; ++i)
{
- debug_log("SD2: Kael'Thas mind control not supported.");
+ sLog.outDebug("SD2: Kael'Thas mind control not supported.");
//DoCast(pUnit, SPELL_MIND_CONTROL);
}
@@ -983,7 +985,7 @@ struct boss_thaladred_the_darkenerAI : public advisorbase_ai
advisorbase_ai::Reset();
}
- void Aggro(Unit *who)
+ void EnterCombat(Unit *who)
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1056,7 +1058,7 @@ struct boss_lord_sanguinarAI : public advisorbase_ai
advisorbase_ai::Reset();
}
- void Aggro(Unit *who)
+ void EnterCombat(Unit *who)
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1139,7 +1141,7 @@ struct boss_grand_astromancer_capernianAI : public advisorbase_ai
}
}
- void Aggro(Unit *who)
+ void EnterCombat(Unit *who)
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1241,7 +1243,7 @@ struct boss_master_engineer_telonicusAI : public advisorbase_ai
DoScriptText(SAY_TELONICUS_DEATH, me);
}
- void Aggro(Unit *who)
+ void EnterCombat(Unit *who)
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
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 e1b60b20948..c22c9787a76 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Should reset if raid are out of room.
SDCategory: Tempest Keep, The Eye
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "the_eye.h"
enum eEnums
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
index 59c72071238..04c80a0a430 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Tempest Keep, The Eye
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "the_eye.h"
#define MAX_ENCOUNTER 5
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
index 97021fdc031..eb5e90bba90 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -25,7 +27,7 @@ EndScriptData */
mob_crystalcore_devastator
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "the_eye.h"
#define SPELL_COUNTERCHARGE 35035
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
index d0d3ea09061..44f9072917c 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
+++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_THE_EYE_H
#define DEF_THE_EYE_H
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
index b9c365eda65..72f8a821aba 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Place Holder
SDCategory: Tempest Keep, The Mechanar
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
//not used
#define SAY_AGGRO -1554000
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 50c3a6171ce..97dd2253081 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Gatewatcher_Ironhand
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Tempest Keep, The Mechanar
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO_1 -1554006
#define SAY_HAMMER_1 -1554007
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 ededec0196d..9e3b35c2590 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Nethermancer_Sepethrea
@@ -21,7 +23,7 @@ SDComment: Need adjustments to initial summons
SDCategory: Tempest Keep, The Mechanar
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "mechanar.h"
#define SAY_AGGRO -1554013
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 c0c06704db7..f6af93c9acc 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
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss Pathaleon the Calculator
@@ -21,7 +23,7 @@ SDComment: Event missing. Script for himself 99% blizzlike.
SDCategory: Tempest Keep, The Mechanar
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1554020
#define SAY_DOMINATION_1 -1554021
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
index c70da24ea3f..38c30c52ae5 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Mechanar
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "mechanar.h"
#define MAX_ENCOUNTER 1
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
index d1b53eebf53..a89335bf51b 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/mechanar.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DEF_MECHANAR_H
#define DEF_MECHANAR_H
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
index 69dbc877d89..fa9576f476b 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -27,7 +29,7 @@ npc_warden_mellichar
mob_zerekethvoidzone
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "arcatraz.h"
/*#####
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
index 3f8dee8bbd0..b861099be3d 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
@@ -1,6 +1,20 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
- * This program is free software licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+/*
+ * Copyright (C) 2008-2010 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
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef DEF_ARCATRAZ_H
#define DEF_ARCATRAZ_H
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 6576974f3ff..5821e7e4f77 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -26,7 +28,7 @@ boss_harbinger_skyriss
boss_harbinger_skyriss_illusion
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "arcatraz.h"
#define SAY_INTRO -1552000
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
index d16975e2af6..4d257d4b4c2 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Mainly Harbringer Skyriss event
SDCategory: Tempest Keep, The Arcatraz
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "arcatraz.h"
#define MAX_ENCOUNTER 9
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 1a077036298..cf9346e1ce4 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
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: some strange visual related to tree form(if aura lost before normal d
SDCategory: Tempest Keep, The Botanica
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1553000
#define SAY_KILL_1 -1553001
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
index cbf21c2f992..8fc44da614c 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Immunities are wrong, must be adjusted to use resistance from creatur
SDCategory: Tempest Keep, The Botanica
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define EMOTE_SUMMON -1553006
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 48eb03c16d3..d844b931a79 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Warp_Splinter
@@ -21,7 +23,7 @@ SDComment: Includes Sapling (need some better control with these).
SDCategory: Tempest Keep, The Botanica
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*#####
# mob_treant (Sapling)
diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp
index f5b4539edaf..6744045b896 100644
--- a/src/server/scripts/Outland/blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/blades_edge_mountains.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -30,7 +32,7 @@ npc_saikkal_the_elder
go_legion_obelisk
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
//Support for quest: You're Fired! (10821)
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index 9e9538f2d23..b158a1a6fd1 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Using incorrect spell for Mark of Kazzak
SDCategory: Hellfire Peninsula
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_INTRO -1000147
#define SAY_AGGRO1 -1000148
diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp
index 60bcd7ee373..a51cab3426b 100644
--- a/src/server/scripts/Outland/boss_doomwalker.cpp
+++ b/src/server/scripts/Outland/boss_doomwalker.cpp
@@ -1,18 +1,20 @@
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Boss_Doomwalker
@@ -21,7 +23,7 @@ SDComment:
SDCategory: Shadowmoon Valley
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define SAY_AGGRO -1000159
#define SAY_EARTHQUAKE_1 -1000160
diff --git a/src/server/scripts/Outland/hellfire_peninsula.cpp b/src/server/scripts/Outland/hellfire_peninsula.cpp
index fce8ac6f59e..c3710739926 100644
--- a/src/server/scripts/Outland/hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/hellfire_peninsula.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -31,7 +33,7 @@ npc_trollbane
npc_wounded_blood_elf
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
@@ -140,7 +142,7 @@ struct npc_ancestral_wolfAI : public npc_escortAI
if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
Start(false, false, pCreature->GetOwner()->GetGUID());
else
- error_log("TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player.");
+ sLog.outError("TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player.");
pCreature->SetSpeed(MOVE_WALK, 1.5f);
Reset();
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index 700ba2cc120..c2d76b0e9bb 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -33,7 +35,7 @@ npc_creditmarker_visit_with_ancestors
mob_sparrowhawk
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
@@ -564,7 +566,7 @@ struct npc_maghar_captiveAI : public npc_escortAI
m_uiFrostShockTimer = 6000;
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* /*pWho*/)
{
DoCast(me, SPELL_EARTHBIND_TOTEM, false);
}
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index efe18ad1908..05481f84aa3 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -28,7 +30,7 @@ npc_commander_dawnforge
npc_bessy
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
@@ -463,7 +465,7 @@ struct npc_commander_dawnforgeAI : public ScriptedAI
return true;
}
- debug_log("TSCR: npc_commander_dawnforge event already in progress, need to wait.");
+ sLog.outDebug("TSCR: npc_commander_dawnforge event already in progress, need to wait.");
return false;
}
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index 0e2eb34f0fe..b85959b34c8 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -39,7 +41,7 @@ go_crystal_prison
npc_enraged_spirit
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*#####
@@ -970,7 +972,7 @@ struct npc_earthmender_wildaAI : public npc_escortAI
DoSummon(NPC_COILSKAR_ASSASSIN, me, 15.0f, 5000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
}
- void Aggro(Unit* pWho)
+ void EnterCombat(Unit* pWho)
{
//don't always use
if (rand()%5)
diff --git a/src/server/scripts/Outland/shattrath_city.cpp b/src/server/scripts/Outland/shattrath_city.cpp
index 6acc050db48..74105af6428 100644
--- a/src/server/scripts/Outland/shattrath_city.cpp
+++ b/src/server/scripts/Outland/shattrath_city.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -32,7 +34,7 @@ npc_ishanah
npc_khadgar
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Outland/terokkar_forest.cpp b/src/server/scripts/Outland/terokkar_forest.cpp
index d593fdd8ca9..bb7e25de5a0 100644
--- a/src/server/scripts/Outland/terokkar_forest.cpp
+++ b/src/server/scripts/Outland/terokkar_forest.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -31,7 +33,7 @@ npc_isla_starmane
npc_slim
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/Outland/zangarmarsh.cpp b/src/server/scripts/Outland/zangarmarsh.cpp
index 5a07165595b..db50e255118 100644
--- a/src/server/scripts/Outland/zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zangarmarsh.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -30,7 +32,7 @@ npc_kayra_longmane
npc_timothy_daniels
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
/*######
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index 9a75263d35c..3d6f1a4e8d6 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -33,7 +35,7 @@ at_warsong_farms q11686
at_stormwright_shelf q12741
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## AreaTrigger_at_aldurthar_gate
diff --git a/src/server/scripts/World/boss_emeriss.cpp b/src/server/scripts/World/boss_emeriss.cpp
index 3dc14969786..dc36e189f95 100644
--- a/src/server/scripts/World/boss_emeriss.cpp
+++ b/src/server/scripts/World/boss_emeriss.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Teleport function & Mark of Nature missing
SDCategory: Bosses
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
@@ -57,7 +59,7 @@ struct boss_emerissAI : public ScriptedAI
m_uiCorruptionsCasted = 0;
}
- void Aggro(Unit* /*pWho*/)
+ void EnterCombat(Unit* /*pWho*/)
{
DoScriptText(SAY_AGGRO, me);
}
diff --git a/src/server/scripts/World/boss_lethon.cpp b/src/server/scripts/World/boss_lethon.cpp
index cc316223a2f..b16060b43a7 100644
--- a/src/server/scripts/World/boss_lethon.cpp
+++ b/src/server/scripts/World/boss_lethon.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,5 +23,5 @@ SDComment: Place Holder
SDCategory: Bosses
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
diff --git a/src/server/scripts/World/boss_taerar.cpp b/src/server/scripts/World/boss_taerar.cpp
index 079f7b387a8..e23400feda7 100644
--- a/src/server/scripts/World/boss_taerar.cpp
+++ b/src/server/scripts/World/boss_taerar.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Mark of Nature & Teleport NYI. Fix the way to be banished.
SDCategory: Bosses
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
@@ -171,7 +173,7 @@ struct boss_taerarAI : public ScriptedAI
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
- //Inturrupt any spell casting
+ //Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
//horrible workaround, need to fix
diff --git a/src/server/scripts/World/boss_ysondre.cpp b/src/server/scripts/World/boss_ysondre.cpp
index 50b8f724e68..e9d7efc9d88 100644
--- a/src/server/scripts/World/boss_ysondre.cpp
+++ b/src/server/scripts/World/boss_ysondre.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Mark of Nature & Teleport missing
SDCategory: Bosses
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
enum eEnums
{
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 6f06ac78fd7..ca7a136c2fb 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -1,18 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>>
-* Copyright (C) 2006 - 20010 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.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -48,7 +49,7 @@ go_soulwell
go_bashir_crystalforge
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*######
## go_cat_figurine
@@ -259,7 +260,7 @@ bool GOHello_go_ethereum_prison(Player *pPlayer, GameObject *pGO)
if (Spell)
pCreature->CastSpell(pPlayer, Spell, false);
else
- error_log("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
+ sLog.outError("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
}
}
}
@@ -943,28 +944,6 @@ bool GOSelect_go_amberpine_outhouse(Player *pPlayer, GameObject *pGO, uint32 /*u
}
/*######
-## Quest 9544: The Prophecy of Akida
-######*/
-
-enum eProphecy
-{
- QUEST_PROPHECY_OF_AKIDA = 9544,
- NPC_STILLPINE_CAPTIVE = 17375
-};
-
-bool GOHello_go_stillpine_cage(Player *pPlayer, GameObject *pGO)
-{
- if (pPlayer->GetQuestStatus(QUEST_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE)
- if (Creature *pPrisoner = pGO->FindNearestCreature(NPC_STILLPINE_CAPTIVE,1.0f))
- {
- pGO->UseDoorOrButton();
- pPrisoner->DisappearAndDie();
- pPlayer->KilledMonsterCredit(pPrisoner->GetEntry(),0);
- }
- return true;
-}
-
-/*######
## Quest 1126: Hive in the Tower
######*/
@@ -1160,11 +1139,6 @@ void AddSC_go_scripts()
newscript->RegisterSelf();
newscript = new Script;
- newscript->Name = "go_stillpine_cage";
- newscript->pGOHello = &GOHello_go_stillpine_cage;
- newscript->RegisterSelf();
-
- newscript = new Script;
newscript->Name = "go_amberpine_outhouse";
newscript->pGOHello = &GOHello_go_amberpine_outhouse;
newscript->pGOSelect = &GOSelect_go_amberpine_outhouse;
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index 5faf9c73f7d..f475c276558 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -29,7 +31,7 @@ guard_shattrath_scryer
guard_stormwind
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedGuardAI.h"
/*******************************************************
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index dbf5f3c1a84..f7c6af53e44 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -29,7 +31,7 @@ item_gor_dreks_ointment(i30175) Protecting Our Own(q10488)
item_only_for_flight Items which should only useable while flying
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "Spell.h"
/*#####
@@ -139,7 +141,7 @@ bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, SpellCastTargets
if (pPlayer->GetBaseSkillValue(SKILL_RIDING) == 300)
return false;
- debug_log("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
+ sLog.outDebug("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
pPlayer->SendEquipError(EQUIP_ERR_ERR_CANT_EQUIP_SKILL,pItem,NULL);
return true;
}
diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp
index 3ab515d8206..9493d4e033a 100644
--- a/src/server/scripts/World/mob_generic_creature.cpp
+++ b/src/server/scripts/World/mob_generic_creature.cpp
@@ -1,19 +1,20 @@
-
-/* 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 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+/*
+ * Copyright (C) 2008-2010 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
+ * 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/>.
+ */
/* ScriptData
SDName: Generic_Creature
@@ -22,7 +23,7 @@ SDComment: Should be replaced with core based AI
SDCategory: Creatures
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define GENERIC_CREATURE_COOLDOWN 5000
diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp
index 9bda7a53516..29b27484fc8 100644
--- a/src/server/scripts/World/npc_innkeeper.cpp
+++ b/src/server/scripts/World/npc_innkeeper.cpp
@@ -1,19 +1,18 @@
/*
- * Copyright (C) 2008 - 2009 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2010 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 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -24,7 +23,7 @@ SDComment: Complete
SDCategory: NPCs
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define HALLOWEEN_EVENTID 12
#define SPELL_TRICK_OR_TREATED 24755
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index ed22225d0d4..9a11c5773a0 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -21,7 +23,7 @@ SDComment: Provides learn/unlearn/relearn-options for professions. Not supported
SDCategory: NPCs
EndScriptData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
/*
A few notes for future developement:
@@ -238,7 +240,7 @@ bool EquippedOk(Player* pPlayer, uint32 spellId)
if (pItem->GetProto()->RequiredSpell == reqSpell)
{
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
- debug_log("TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
+ sLog.outDebug("TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
return false;
}
}
diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp
index 2a8efd4e0cb..1a296735b38 100644
--- a/src/server/scripts/World/npc_taxi.cpp
+++ b/src/server/scripts/World/npc_taxi.cpp
@@ -1,17 +1,19 @@
-/* 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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * 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.
+ * 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.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * 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/>.
*/
/* ScriptData
@@ -22,7 +24,7 @@ SDCategory: NPCs
EndScriptData
*/
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#define GOSSIP_SUSURRUS "I am ready."
#define GOSSIP_NETHER_DRAKE "I'm ready to fly! Take me up, dragon!"
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index cfd1b7698fc..f6fa8f04258 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1,17 +1,19 @@
-/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.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 Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+/*
+ * Copyright (C) 2008-2010 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
+ * 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.
+ * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
@@ -40,7 +42,7 @@ npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die f
npc_locksmith 75% list of keys needs to be confirmed
EndContentData */
-#include "ScriptedPch.h"
+#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
#include "ObjectMgr.h"
#include "ScriptMgr.h"
@@ -123,7 +125,7 @@ struct npc_air_force_botsAI : public ScriptedAI
}
if (!m_pSpawnAssoc)
- error_db_log("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
+ sLog.outErrorDb("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
else
{
CreatureInfo const* spawnedTemplate = GetCreatureTemplateStore(m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
@@ -131,7 +133,7 @@ struct npc_air_force_botsAI : public ScriptedAI
if (!spawnedTemplate)
{
m_pSpawnAssoc = NULL;
- error_db_log("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
+ sLog.outErrorDb("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
return;
}
}
@@ -150,7 +152,7 @@ struct npc_air_force_botsAI : public ScriptedAI
m_uiSpawnedGUID = pSummoned->GetGUID();
else
{
- error_db_log("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
+ sLog.outErrorDb("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
m_pSpawnAssoc = NULL;
}
@@ -787,7 +789,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[rand()%3]; break;
case DOCTOR_HORDE: patientEntry = HordeSoldierId[rand()%3]; break;
default:
- error_log("TSCR: Invalid entry for Triage doctor. Please check your database");
+ sLog.outError("TSCR: Invalid entry for Triage doctor. Please check your database");
return;
}
@@ -1689,7 +1691,7 @@ struct mob_mojoAI : public ScriptedAI
if (Unit* own = me->GetOwner())
me->GetMotionMaster()->MoveFollow(own,0,0);
}
- void Aggro(Unit * /*who*/){}
+ void EnterCombat(Unit * /*who*/){}
void UpdateAI(const uint32 diff)
{
if (me->HasAura(20372))
@@ -1848,7 +1850,7 @@ struct npc_ebon_gargoyleAI : CasterAI
me->GetMotionMaster()->MovePoint(0, x, y, z);
// Despawn as soon as possible
- despawnTimer = 4 * IN_MILISECONDS;
+ despawnTimer = 4 * IN_MILLISECONDS;
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt
index ed43a4eb6cd..2c474e61693 100644
--- a/src/server/shared/CMakeLists.txt
+++ b/src/server/shared/CMakeLists.txt
@@ -1,42 +1,125 @@
-add_subdirectory(vmap)
-add_subdirectory(Auth)
-add_subdirectory(Config)
-add_subdirectory(Database)
-
-########### next target ###############
-
-SET(shared_STAT_SRCS
- ByteBuffer.h
- Common.cpp
- Common.h
- DelayExecutor.cpp
- DelayExecutor.h
- Errors.h
- Log.cpp
- Log.h
- ProgressBar.cpp
- ProgressBar.h
- SignalHandler.h
- Threading.cpp
- Timer.h
- Util.cpp
- Util.h
- WorldPacket.h
- SystemConfig.h
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+########### shared ###############
+
+set(shared_STAT_SRCS
+ Logging/Log.cpp
+ Threading/DelayExecutor.cpp
+ Threading/Threading.cpp
+ Utilities/ProgressBar.cpp
+ Utilities/Util.cpp
+ Utilities/EventProcessor.cpp
+ Common.cpp
)
+# Windows specific files
+if(WIN32)
+ set(shared_STAT_SRCS
+ ${shared_STAT_SRCS}
+ Debugging/WheatyExceptionReport.cpp
+ Utilities/ServiceWin32.cpp
+ )
+endif()
+
include_directories(
${ACE_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/dep/include
- ${CMAKE_SOURCE_DIR}/dep/include/sockets
- ${CMAKE_SOURCE_DIR}/src/server/framework
+ ${CMAKE_SOURCE_DIR}/externals/mersennetwister
+ ${CMAKE_SOURCE_DIR}/externals/SFMT
+ ${CMAKE_SOURCE_DIR}/externals/sockets/include
+ ${CMAKE_SOURCE_DIR}/externals/utf8cpp
${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Database
+ ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Logging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Threading
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
${MYSQL_INCLUDE_DIR}
)
add_library(shared STATIC ${shared_STAT_SRCS})
+
+if(WIN32)
+target_link_libraries(
+ shared
+ ace
+)
+else()
target_link_libraries(
-shared
-${ACE_LIBRARY}
+ shared
+ ${ACE_LIBRARY}
+)
+endif()
+
+########### trinityconfig ###############
+
+set(trinityconfig_STAT_SRCS
+ Configuration/dotconfpp/dotconfpp.cpp
+ Configuration/dotconfpp/mempool.cpp
+ Configuration/Config.cpp
+)
+
+include_directories(
+ ${ACE_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+)
+
+add_library(trinityconfig STATIC ${trinityconfig_STAT_SRCS})
+
+########### trinityauth ###############
+
+set(trinityauth_STAT_SRCS
+ Cryptography/Authentication/AuthCrypt.cpp
+ Cryptography/BigNumber.cpp
+ Cryptography/HMACSHA1.cpp
+ Cryptography/SHA1.cpp
+ Cryptography/MD5.c
+ Cryptography/ARC4.cpp
)
+
+include_directories(
+ ${ACE_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${MYSQL_INCLUDE_DIR}
+)
+
+add_library(trinityauth STATIC ${trinityauth_STAT_SRCS})
+
+########### trinitydatabase ###############
+
+set(trinitydatabase_STAT_SRCS
+ DataStores/DBCFileLoader.cpp
+ Database/Database.cpp
+ Database/Field.cpp
+ Database/QueryResult.cpp
+ Database/SQLStorage.cpp
+ Database/SqlDelayThread.cpp
+ Database/SqlOperations.cpp
+ Database/PreparedStatements.cpp
+)
+
+include_directories(
+ ${ACE_INCLUDE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Database
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
+ ${MYSQL_INCLUDE_DIR}
+)
+
+add_library(trinitydatabase STATIC ${trinitydatabase_STAT_SRCS})
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h
index 4a6aac43390..f7407e78aac 100644
--- a/src/server/shared/Common.h
+++ b/src/server/shared/Common.h
@@ -59,7 +59,7 @@
#undef VERSION
#endif //HAVE_CONFIG_H
-#include "Platform/Define.h"
+#include "Define.h"
#if COMPILER == COMPILER_MICROSOFT
# pragma warning(disable:4996) // 'function': was declared deprecated
@@ -76,7 +76,7 @@
#endif // __SHOW_STUPID_WARNINGS__
#endif // __GNUC__
-#include "Utilities/UnorderedMap.h"
+#include "Dynamic/UnorderedMap.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -100,8 +100,8 @@
#include <sstream>
#include <algorithm>
-#include "LockedQueue.h"
-#include "Threading.h"
+#include "Threading/LockedQueue.h"
+#include "Threading/Threading.h"
#include <ace/Basic_Types.h>
#include <ace/Guard_T.h>
@@ -168,7 +168,7 @@ enum TimeConstants
WEEK = DAY*7,
MONTH = DAY*30,
YEAR = MONTH*12,
- IN_MILISECONDS = 1000
+ IN_MILLISECONDS = 1000
};
enum AccountTypes
diff --git a/src/server/shared/CompilerDefs.h b/src/server/shared/CompilerDefs.h
index fb7dbfe4caa..d2d470e2097 100644
--- a/src/server/shared/CompilerDefs.h
+++ b/src/server/shared/CompilerDefs.h
@@ -26,7 +26,7 @@
#define PLATFORM_APPLE 2
#define PLATFORM_INTEL 3
-// must be first (win 64 also define WIN32)
+// must be first (win 64 also define _WIN32)
#if defined( _WIN64 )
# define PLATFORM PLATFORM_WINDOWS
#elif defined( __WIN32__ ) || defined( WIN32 ) || defined( _WIN32 )
diff --git a/src/server/shared/Configuration/CMakeLists.txt b/src/server/shared/Configuration/CMakeLists.txt
deleted file mode 100644
index da1c2e8aa3b..00000000000
--- a/src/server/shared/Configuration/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-
-########### next target ###############
-
-SET(trinityconfig_STAT_SRCS
- dotconfpp/dotconfpp.cpp
- dotconfpp/dotconfpp.h
- dotconfpp/mempool.cpp
- dotconfpp/mempool.h
- Config.cpp
- Config.h
- ConfigEnv.h
-)
-
-include_directories(
- ${ACE_INCLUDE_DIR}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/src/server/shared
- ${CMAKE_SOURCE_DIR}/src/server/framework
-)
-
-add_library(trinityconfig STATIC ${trinityconfig_STAT_SRCS})
-
diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp
index 39830104a7c..3979cbc36aa 100644
--- a/src/server/shared/Configuration/Config.cpp
+++ b/src/server/shared/Configuration/Config.cpp
@@ -19,9 +19,6 @@
*/
#include "ConfigEnv.h"
-#include "Policies/SingletonImp.h"
-
-INSTANTIATE_SINGLETON_1(Config);
Config::Config() : mIgnoreCase(true), mConf(NULL)
{
diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h
index ccc76073e46..50cd4609b25 100644
--- a/src/server/shared/Configuration/Config.h
+++ b/src/server/shared/Configuration/Config.h
@@ -21,15 +21,16 @@
#ifndef CONFIG_H
#define CONFIG_H
-#include <Policies/Singleton.h>
-#include "Platform/Define.h"
+#include <ace/Singleton.h>
+#include "Define.h"
class DOTCONFDocument;
class Config
{
+ friend class ACE_Singleton<Config, ACE_Null_Mutex>;
+ Config();
public:
- Config();
~Config();
bool SetSource(const char *file, bool ignorecase = true);
@@ -47,7 +48,7 @@ class Config
DOTCONFDocument *mConf;
};
-#define sConfig Trinity::Singleton<Config>::Instance()
+#define sConfig (*ACE_Singleton<Config, ACE_Null_Mutex>::instance())
#endif
diff --git a/src/server/shared/Cryptography/ARC4.cpp b/src/server/shared/Cryptography/ARC4.cpp
index 80cad4991e9..8427640ba2a 100644
--- a/src/server/shared/Cryptography/ARC4.cpp
+++ b/src/server/shared/Cryptography/ARC4.cpp
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Auth/SARC4.h"
+#include "ARC4.h"
#include <openssl/sha.h>
SARC4::SARC4(uint8 len)
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
index b34b922b16a..2dfcebfa932 100644
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.cpp
@@ -19,9 +19,9 @@
*/
#include "AuthCrypt.h"
-#include "Hmac.h"
-#include "Log.h"
-#include "BigNumber.h"
+#include "Cryptography/HMACSHA1.h"
+#include "Logging/Log.h"
+#include "Cryptography/BigNumber.h"
AuthCrypt::AuthCrypt() : _clientDecrypt(SHA_DIGEST_LENGTH), _serverEncrypt(SHA_DIGEST_LENGTH)
{
diff --git a/src/server/shared/Cryptography/Authentication/AuthCrypt.h b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
index 6695dc580cc..5a2430611a4 100644
--- a/src/server/shared/Cryptography/Authentication/AuthCrypt.h
+++ b/src/server/shared/Cryptography/Authentication/AuthCrypt.h
@@ -22,7 +22,7 @@
#define _AUTHCRYPT_H
#include <Common.h>
-#include "SARC4.h"
+#include "Cryptography/ARC4.h"
class BigNumber;
diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp
index 64e9ef21ccc..c05258c73a0 100644
--- a/src/server/shared/Cryptography/BigNumber.cpp
+++ b/src/server/shared/Cryptography/BigNumber.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Auth/BigNumber.h"
+#include "Cryptography/BigNumber.h"
#include <openssl/bn.h>
#include <algorithm>
diff --git a/src/server/shared/Cryptography/CMakeLists.txt b/src/server/shared/Cryptography/CMakeLists.txt
deleted file mode 100644
index 6e5d10d40e5..00000000000
--- a/src/server/shared/Cryptography/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-
-########### next target ###############
-
-SET(trinityauth_STAT_SRCS
- AuthCrypt.cpp
- AuthCrypt.h
- BigNumber.cpp
- BigNumber.h
- Hmac.cpp
- Hmac.h
- Sha1.cpp
- Sha1.h
- md5.c
- md5.h
- SARC4.cpp
- SARC4.h
-)
-
-include_directories(
- ${ACE_INCLUDE_DIR}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/src/server/shared
- ${CMAKE_SOURCE_DIR}/src/server/framework
- ${MYSQL_INCLUDE_DIR}
-)
-
-add_library(trinityauth STATIC ${trinityauth_STAT_SRCS})
diff --git a/src/server/shared/Cryptography/HMACSHA1.cpp b/src/server/shared/Cryptography/HMACSHA1.cpp
index a30f1b2d1e2..aed8940372b 100644
--- a/src/server/shared/Cryptography/HMACSHA1.cpp
+++ b/src/server/shared/Cryptography/HMACSHA1.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Auth/Hmac.h"
+#include "HMACSHA1.h"
#include "BigNumber.h"
HmacHash::HmacHash(uint32 len, uint8 *seed)
diff --git a/src/server/shared/Cryptography/MD5.c b/src/server/shared/Cryptography/MD5.c
index 3e9735e2dbb..45897503455 100644
--- a/src/server/shared/Cryptography/MD5.c
+++ b/src/server/shared/Cryptography/MD5.c
@@ -51,7 +51,7 @@ self-checking.
1999-05-03 lpd Original version.
*/
-#include "md5.h"
+#include "MD5.h"
#include <string.h>
#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
diff --git a/src/server/shared/Cryptography/SHA1.cpp b/src/server/shared/Cryptography/SHA1.cpp
index b63deb2c5f3..b50f72af4d3 100644
--- a/src/server/shared/Cryptography/SHA1.cpp
+++ b/src/server/shared/Cryptography/SHA1.cpp
@@ -18,8 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "Auth/Sha1.h"
-#include "Auth/BigNumber.h"
+#include "SHA1.h"
+#include "BigNumber.h"
#include <stdarg.h>
Sha1Hash::Sha1Hash()
diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h
index a97ab4d60fa..f59ad038ce0 100644
--- a/src/server/shared/DataStores/DBCFileLoader.h
+++ b/src/server/shared/DataStores/DBCFileLoader.h
@@ -18,7 +18,7 @@
#ifndef DBC_FILE_LOADER_H
#define DBC_FILE_LOADER_H
-#include "Platform/Define.h"
+#include "Define.h"
#include "Utilities/ByteConverter.h"
#include <cassert>
diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h
index 61e2f7a6d06..cd1d1881d68 100644
--- a/src/server/shared/DataStores/DBCStore.h
+++ b/src/server/shared/DataStores/DBCStore.h
@@ -20,7 +20,7 @@
#define DBCSTORE_H
#include "DBCFileLoader.h"
-#include "Log.h"
+#include "Logging/Log.h"
struct SqlDbc
{
diff --git a/src/server/shared/Database/CMakeLists.txt b/src/server/shared/Database/CMakeLists.txt
deleted file mode 100644
index e30c8ae3ca2..00000000000
--- a/src/server/shared/Database/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-SET(trinitydatabase_STAT_SRCS
- DBCFileLoader.cpp
- DBCFileLoader.h
- DBCStore.h
- Database.cpp
- Database.h
- DatabaseEnv.h
- DatabaseImpl.h
- Field.cpp
- Field.h
- QueryResult.cpp
- QueryResult.h
- SQLStorage.cpp
- SQLStorage.h
- SqlDelayThread.cpp
- SqlDelayThread.h
- SqlOperations.cpp
- SqlOperations.h
-)
-
-include_directories(
- ${ACE_INCLUDE_DIR}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/src/server/shared
- ${CMAKE_SOURCE_DIR}/src/server/shared/Database
- ${CMAKE_SOURCE_DIR}/src/server/framework
- ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
- ${MYSQL_INCLUDE_DIR}
-)
-
-add_library(trinitydatabase STATIC ${trinitydatabase_STAT_SRCS})
diff --git a/src/server/shared/Database/Database.cpp b/src/server/shared/Database/Database.cpp
index 7646a451eb4..1fb2f831a9f 100644
--- a/src/server/shared/Database/Database.cpp
+++ b/src/server/shared/Database/Database.cpp
@@ -19,18 +19,17 @@
*/
#include "DatabaseEnv.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "Common.h"
-#include "UpdateFields.h"
+#include "Updates/UpdateFields.h"
-#include "Util.h"
-#include "Policies/SingletonImp.h"
-#include "Platform/Define.h"
-#include "Threading.h"
+#include "Utilities/Util.h"
+#include "Define.h"
+#include "Threading/Threading.h"
#include "Database/SqlDelayThread.h"
#include "Database/SqlOperations.h"
-#include "Timer.h"
+#include "Utilities/Timer.h"
#include <ctime>
@@ -113,7 +112,7 @@ bool Database::Initialize(const char *infoString)
database = *iter++;
mysql_options(mysqlInit, MYSQL_SET_CHARSET_NAME, "utf8");
- #ifdef WIN32
+ #ifdef _WIN32
if (host==".") // named pipe use option (Windows)
{
unsigned int opt = MYSQL_PROTOCOL_PIPE;
diff --git a/src/server/shared/Database/Database.h b/src/server/shared/Database/Database.h
index 4ad5d29c993..762abfd2ede 100644
--- a/src/server/shared/Database/Database.h
+++ b/src/server/shared/Database/Database.h
@@ -21,14 +21,13 @@
#ifndef DATABASE_H
#define DATABASE_H
-#include "Threading.h"
-#include "Utilities/UnorderedMap.h"
+#include "Threading/Threading.h"
+#include "Dynamic/UnorderedMap.h"
#include "Database/SqlDelayThread.h"
-#include "Policies/Singleton.h"
#include "ace/Thread_Mutex.h"
#include "ace/Guard_T.h"
-#ifdef WIN32
+#ifdef _WIN32
#define FD_SETSIZE 1024
#include <winsock2.h>
#include <mysql/mysql.h>
@@ -117,7 +116,7 @@ class Database
bool _UpdateDataBlobValue(const uint32 guid, const uint32 field, const int32 value);
bool _SetDataBlobValue(const uint32 guid, const uint32 field, const uint32 value);
- // Writes SQL commands to a LOG file (see Trinityd.conf "LogSQL")
+ // Writes SQL commands to a LOG file (see worldserver.conf "LogSQL")
bool PExecuteLog(const char *format,...) ATTR_PRINTF(2,3);
bool BeginTransaction();
diff --git a/src/server/shared/Database/DatabaseEnv.h b/src/server/shared/Database/DatabaseEnv.h
index 69236b076e9..15c1b1c599e 100644
--- a/src/server/shared/Database/DatabaseEnv.h
+++ b/src/server/shared/Database/DatabaseEnv.h
@@ -22,8 +22,8 @@
#define DATABASEENV_H
#include "Common.h"
-#include "Log.h"
-#include "Errors.h"
+#include "Logging/Log.h"
+#include "Debugging/Errors.h"
#include "Database/Field.h"
#include "Database/QueryResult.h"
diff --git a/src/server/shared/Database/PreparedStatements.cpp b/src/server/shared/Database/PreparedStatements.cpp
new file mode 100644
index 00000000000..40a910acf9e
--- /dev/null
+++ b/src/server/shared/Database/PreparedStatements.cpp
@@ -0,0 +1,93 @@
+#include "PreparedStatements.h"
+
+void PreparedStatementHolder::_prepareStatement(const char* name, const char* sql, Database *db, uint32 &count)
+{
+ const char prefix[] = "PREPARE ";
+ size_t querySize = 8 + strlen(name) + 6 + strlen(sql) + 2 + 1;
+ char* query = new char[querySize];
+ strcpy(query, prefix);
+ strcat(query, name);
+ strcat(query, " FROM ");
+ strcat(query, "'");
+ strcat(query, sql);
+ strcat(query, "'");
+
+ DEBUG_LOG("Preparing statement: %s", query);
+ db->Execute(query);
+
+ delete[] query;
+ ++count;
+}
+
+void PreparedStatementHolder::LoadAuthserver(Database *db, uint32 &count)
+{
+ _prepareStatement("auth_ping", "SELECT 1 FROM realmlist LIMIT 1", db, count);
+};
+
+void PreparedStatementHolder::Execute(Database *db, const char *name)
+{
+ const char prefix[] = "EXECUTE ";
+ size_t querySize = 8 + strlen(name) + 1;
+ char* query = new char[querySize];
+ strcpy(query, prefix);
+ strcat(query, name);
+
+ DEBUG_LOG("Prepared statement: %s", query);
+ db->Execute(query);
+ delete[] query;
+}
+
+void PreparedStatementHolder::PExecute(Database *db, const char *name, const char* args)
+{
+ // NOTE: if args == NULL, we're crashing here. No need to waste performance on checking;
+ // devs must make sure they use PExecute for args and Execute for no args.
+
+ const char prefix[] = "EXECUTE ";
+ size_t querySize = 8 + strlen(name) + 7 + strlen(args) + 1;
+ char* query = new char[querySize];
+ strcpy(query, prefix);
+ strcat(query, name);
+ strcat(query, " USING ");
+ strcat(query, args);
+
+ DEBUG_LOG("Prepared statement (parsed args): %s", query);
+ db->Execute(query);
+ delete[] query;
+}
+
+QueryResult_AutoPtr PreparedStatementHolder::Query(Database *db, const char *name)
+{
+ QueryResult_AutoPtr _return = QueryResult_AutoPtr(NULL);
+
+ const char prefix[] = "EXECUTE ";
+ size_t querySize = 8 + strlen(name) + 1;
+ char* query = new char[querySize];
+ strcpy(query, prefix);
+ strcat(query, name);
+
+ DEBUG_LOG("Prepared statement with resultset: %s", query);
+ _return = db->Query(query);
+ delete[] query;
+ return _return;
+}
+
+QueryResult_AutoPtr PreparedStatementHolder::PQuery(Database *db, const char *name, const char *args)
+{
+ // NOTE: if args == NULL, we're crashing here. No need to waste performance on checking;
+ // devs must make sure they use PQuery for args and Query for no args.
+
+ QueryResult_AutoPtr _return = QueryResult_AutoPtr(NULL);
+
+ const char prefix[] = "EXECUTE ";
+ size_t querySize = 8 + strlen(name) + 7 + strlen(args) + 1;
+ char* query = new char[querySize];
+ strcpy(query, prefix);
+ strcat(query, name);
+ strcat(query, " USING ");
+ strcat(query, args);
+
+ DEBUG_LOG("Prepared statement with resultset (parsed args): %s", query);
+ _return = db->Query(query);
+ delete[] query;
+ return _return;
+} \ No newline at end of file
diff --git a/src/server/shared/Database/PreparedStatements.h b/src/server/shared/Database/PreparedStatements.h
new file mode 100644
index 00000000000..c19119dcb3d
--- /dev/null
+++ b/src/server/shared/Database/PreparedStatements.h
@@ -0,0 +1,30 @@
+#ifndef sPreparedStatement
+
+#include "ace/Singleton.h"
+#include "Database/DatabaseEnv.h"
+
+class PreparedStatementHolder
+{
+ public:
+ ///- Load prepare statements on database $db and increase $count for every statement
+ void LoadCharacters(Database *db, uint32 &count);
+ void LoadAuthserver(Database *db, uint32 &count);
+ void LoadWorldserver(Database *db, uint32 &count);
+
+ ///- Executes prepared statement that doesn't require feedback with name $name on database $db
+ void Execute(Database *db, const char* name);
+ ///- Executes prepared statement that doesn't require feedback with name $name and args $args
+ ///- on database $db
+ void PExecute(Database *db, const char* name, const char* args);
+
+ ///- Executes a prepared statement without args on db $db with name $name and puts the result set in a pointer.
+ QueryResult_AutoPtr Query(Database* db, const char* name);
+ ///- Executes a prepared statement with args $args on db $db with name $name and put the result set in a pointer.
+ QueryResult_AutoPtr PQuery(Database* db, const char* name, const char* args);
+
+ private:
+ void _prepareStatement(const char* name, const char* sql, Database *db, uint32 &count);
+
+};
+#define sPreparedStatement (*ACE_Singleton<PreparedStatementHolder, ACE_Null_Mutex>::instance())
+#endif \ No newline at end of file
diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h
index 4eec9915362..5562a9abfa4 100644
--- a/src/server/shared/Database/QueryResult.h
+++ b/src/server/shared/Database/QueryResult.h
@@ -26,7 +26,7 @@
#include "Field.h"
-#ifdef WIN32
+#ifdef _WIN32
#define FD_SETSIZE 1024
#include <winsock2.h>
#include <mysql/mysql.h>
diff --git a/src/server/shared/Database/SQLStorageImpl.h b/src/server/shared/Database/SQLStorageImpl.h
index c74be48c34c..b3d06484e2e 100644
--- a/src/server/shared/Database/SQLStorageImpl.h
+++ b/src/server/shared/Database/SQLStorageImpl.h
@@ -16,9 +16,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "ProgressBar.h"
-#include "Log.h"
-#include "DBCFileLoader.h"
+#include "Utilities/ProgressBar.h"
+#include "Logging/Log.h"
+#include "DataStores/DBCFileLoader.h"
template<class T>
template<class S, class D>
diff --git a/src/server/shared/Database/SqlDelayThread.h b/src/server/shared/Database/SqlDelayThread.h
index d603813c8fa..4ef9c67aa5b 100644
--- a/src/server/shared/Database/SqlDelayThread.h
+++ b/src/server/shared/Database/SqlDelayThread.h
@@ -23,7 +23,7 @@
#include "ace/Thread_Mutex.h"
#include "ace/Activation_Queue.h"
-#include "Threading.h"
+#include "Threading/Threading.h"
class Database;
class SqlOperation;
diff --git a/src/server/shared/Database/SqlOperations.h b/src/server/shared/Database/SqlOperations.h
index f2e09c0c921..eb28a2c0790 100644
--- a/src/server/shared/Database/SqlOperations.h
+++ b/src/server/shared/Database/SqlOperations.h
@@ -25,9 +25,9 @@
#include "ace/Thread_Mutex.h"
#include "ace/Method_Request.h"
-#include "LockedQueue.h"
+#include "Threading/LockedQueue.h"
#include <queue>
-#include "Utilities/Callback.h"
+#include "Threading/Callback.h"
#include "QueryResult.h"
/// ---- BASE ---
diff --git a/src/server/shared/Debugging/MemoryLeaks.cpp b/src/server/shared/Debugging/MemoryLeaks.cpp
index ef7e36c3b57..c591dabb866 100644
--- a/src/server/shared/Debugging/MemoryLeaks.cpp
+++ b/src/server/shared/Debugging/MemoryLeaks.cpp
@@ -17,9 +17,6 @@
*/
#include "MemoryLeaks.h"
-#include "Policies/SingletonImp.h"
-
-INSTANTIATE_SINGLETON_1( MemoryManager ) ;
MemoryManager::MemoryManager( )
{
diff --git a/src/server/shared/Debugging/MemoryLeaks.h b/src/server/shared/Debugging/MemoryLeaks.h
index c8b8fb8e1b1..4b13e4d3d90 100644
--- a/src/server/shared/Debugging/MemoryLeaks.h
+++ b/src/server/shared/Debugging/MemoryLeaks.h
@@ -19,7 +19,7 @@
#ifndef TRINITYSERVER_MEMORY_H
#define TRINITYSERVER_MEMORY_H
-#include "Platform/CompilerDefs.h"
+#include "shared/CompilerDefs.h"
#if COMPILER == COMPILER_MICROSOFT
@@ -39,10 +39,11 @@
#endif
-#include "Policies/Singleton.h"
+#include "ace/Singleton.h"
-struct MemoryManager : public Trinity::Singleton < MemoryManager >
+struct MemoryManager
{
MemoryManager();
};
+#define sMemoryManager ACE_Singleton<MemoryManager, ACE_Null_Mutex>::instance()
#endif
diff --git a/src/server/shared/Define.h b/src/server/shared/Define.h
index 9285bf289f9..980cf9023e1 100644
--- a/src/server/shared/Define.h
+++ b/src/server/shared/Define.h
@@ -26,7 +26,7 @@
#include <ace/Basic_Types.h>
#include <ace/ACE_export.h>
-#include "Platform/CompilerDefs.h"
+#include "CompilerDefs.h"
#define TRINITY_LITTLEENDIAN 0
#define TRINITY_BIGENDIAN 1
diff --git a/src/server/shared/Dynamic/CountedReference/Reference.h b/src/server/shared/Dynamic/CountedReference/Reference.h
deleted file mode 100644
index d3cfe55ffc0..00000000000
--- a/src/server/shared/Dynamic/CountedReference/Reference.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_REFERENCE_H
-#define TRINITY_REFERENCE_H
-
-/**
- * Referencer<T>
- * Referencer is an object that holds a reference holder that hold a reference
- * counted object. When an object's reference count drop to zero, it removes
- * the object. This is a non intrusive mechanism and any object at any point
- * in time can be referenced. When and object is reference counted, do not
- * pass the object directly to other methods but rather, pass its
- * reference around. Objects can be reference counted in both single threaded
- * model and multi-threaded model
- */
-
-#include <stdexcept>
-#include "Platform/Define.h"
-#include "Policies/ThreadingModel.h"
-#include "ReferenceHolder.h"
-
-template
-<
-typename T,
-class THREADING_MODEL = Trinity::SingleThreaded<T>
->
-class Referencer
-{
- typedef typename THREADING_MODEL::Lock Lock;
- typedef ReferenceHolder<T, THREADING_MODEL> ReferenceeHolder;
- public:
-
- /// Constructs a referencer.
- Referencer(T *ref = NULL);
-
- /// Copy constructor
- Referencer(const Referencer &obj) : i_holder(NULL) { *this = obj; }
-
- /// Destructor
- ~Referencer();
-
- /// Referencee accessor
- T* referencee(void) { return (i_holder == NULL ? NULL : i_holder->i_referencee); }
- const T* referencee(void) const { return (i_holder == NULL ? NULL : i_holder->i_referencee); }
-
- //T& referencee(void){ return _referencee(); }
- //const T& referencee(void) const { return const_cast<Referencer *>(this)->_referencee(); }
- operator T&(void) { return _referencee(); }
- operator const T&(void) const { return *const_cast<Referencer *>(this)->_referencee(); }
-
- /// cast operators
- T* operator*() { return (i_holder == NULL ? NULL : i_holder->i_referencee); }
- T const * operator*() const { return (i_holder == NULL ? NULL : i_holder->i_referencee); }
-
- /// overload operators
- T* operator->() { return (i_holder == NULL ? NULL : i_holder->i_referencee); }
- const T * operator->() const { return (i_holder == NULL ? NULL : i_holder->i_referencee); }
-
- /// operator =
- Referencer& operator=(const Referencer &obj);
- Referencer& operator=(T *);
-
- /// returns true if i_referencee is null
- bool isNull(void) const { return i_holder == NULL; }
-
- private:
-
- T& _referencee(void)
- {
- if( i_holder == NULL )
- throw std::runtime_error("Invalid access to null pointer");
- return *i_holder->i_referencee;
- }
-
- void deReference(ReferenceeHolder *);
- void addReference(ReferenceeHolder *);
-
- // private data
- ReferenceeHolder *i_holder;
-};
-#endif
-
diff --git a/src/server/shared/Dynamic/CountedReference/ReferenceHolder.h b/src/server/shared/Dynamic/CountedReference/ReferenceHolder.h
deleted file mode 100644
index 597e9854be0..00000000000
--- a/src/server/shared/Dynamic/CountedReference/ReferenceHolder.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_REFERENCEHOLDER_H
-#define TRINITY_REFERENCEHOLDER_H
-
-/** ReferenceHolder holds the actualy referenced obejct as well the refence
- count. The ReferenecHolder implements as a policy base object and
- will decided by the Reference class to be consnsitent.
- */
-
-template
-<
-typename T,
-class THREADING_MODEL
->
-struct ReferenceHolder : public THREADING_MODEL
-{
- explicit ReferenceHolder(T *ref) : i_referencee(ref), i_referenceCount(0) {}
- T *i_referencee;
- unsigned int i_referenceCount;
- typedef typename THREADING_MODEL::Lock Lock;
-};
-#endif
-
diff --git a/src/server/shared/Dynamic/CountedReference/ReferenceImpl.h b/src/server/shared/Dynamic/CountedReference/ReferenceImpl.h
deleted file mode 100644
index cde330179e3..00000000000
--- a/src/server/shared/Dynamic/CountedReference/ReferenceImpl.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_REFERENCEIMPL_H
-#define TRINITY_REFERENCEIMPL_H
-
-#include "Reference.h"
-
-template
-<
-typename T,
-class THREADING_MODEL
->
-Referencer<T, THREADING_MODEL>::Referencer(T *ref)
-: i_holder(NULL)
-{
- if( ref != NULL )
- {
- i_holder = new ReferenceeHolder(ref);
- ++i_holder->i_referenceCount;
- }
-}
-
-template
-<
-typename T,
-class THREADING_MODEL
->
-Referencer<T, THREADING_MODEL>::~Referencer()
-{
- if( i_holder != NULL )
- deReference(i_holder);
- i_holder = NULL;
-}
-
-template
-<
-typename T,
-class THREADING_MODEL
->
-Referencer<T, THREADING_MODEL>&
-Referencer<T, THREADING_MODEL>::operator=(const Referencer<T, THREADING_MODEL> &obj)
-{
- if( i_holder != NULL )
- deReference(i_holder);
- if( obj.i_holder != NULL )
- addReference(obj.i_holder);
- i_holder = obj.i_holder;
- return *this;
-}
-
-template
-<
-typename T,
-class THREADING_MODEL
->
-Referencer<T, THREADING_MODEL>&
-Referencer<T, THREADING_MODEL>::operator=(T *ref)
-{
- if( i_holder != NULL )
- deReference(i_holder);
- i_holder = NULL;
- if( ref != NULL )
- {
- i_holder = new ReferenceeHolder(ref);
- ++i_holder->i_referenceCount;
- }
-
- return *this;
-}
-
-template
-<
-typename T,
-class THREADING_MODEL
->
-void
-Referencer<T, THREADING_MODEL>::deReference(ReferenceHolder<T, THREADING_MODEL> *holder)
-{
- assert( holder != NULL && holder->i_referenceCount > 0);
- bool delete_object = false;
-
- {
- // The guard is within the scope due to the guard
- // must release earlier than expected.
- Lock guard(*holder);
- Guard(&guard);
-
- --holder->i_referenceCount;
- if( holder->i_referenceCount == 0 )
- delete_object = true;
- }
-
- if( delete_object )
- {
- delete holder->i_referencee;
- delete holder;
- }
-}
-
-template
-<
-typename T,
-class THREADING_MODEL
->
-void
-Referencer<T, THREADING_MODEL>::addReference(ReferenceHolder<T, THREADING_MODEL> *holder)
-{
- assert( i_holder != NULL );
- Lock guard(*holder);
- Guard(&guard);
-
- ++holder->i_referenceCount;
-}
-#endif
-
diff --git a/src/server/shared/Dynamic/FactoryHolder.h b/src/server/shared/Dynamic/FactoryHolder.h
index 282968d6097..096bdad1783 100644
--- a/src/server/shared/Dynamic/FactoryHolder.h
+++ b/src/server/shared/Dynamic/FactoryHolder.h
@@ -21,10 +21,9 @@
#ifndef TRINITY_FACTORY_HOLDER
#define TRINITY_FACTORY_HOLDER
-#include "Platform/Define.h"
-#include "Utilities/TypeList.h"
+#include "Define.h"
+#include "Dynamic/TypeList.h"
#include "ObjectRegistry.h"
-#include "Policies/SingletonImp.h"
/** FactoryHolder holds a factory object of a specific type
*/
@@ -33,14 +32,15 @@ class FactoryHolder
{
public:
typedef ObjectRegistry<FactoryHolder<T, Key >, Key > FactoryHolderRegistry;
- typedef Trinity::Singleton<FactoryHolderRegistry > FactoryHolderRepository;
+ friend class ACE_Singleton<FactoryHolderRegistry, ACE_Null_Mutex>;
+ typedef ACE_Singleton<FactoryHolderRegistry, ACE_Null_Mutex> FactoryHolderRepository;
FactoryHolder(Key k) : i_key(k) {}
virtual ~FactoryHolder() {}
inline Key key() const { return i_key; }
- void RegisterSelf(void) { FactoryHolderRepository::Instance().InsertItem(this, i_key); }
- void DeregisterSelf(void) { FactoryHolderRepository::Instance().RemoveItem(this, false); }
+ void RegisterSelf(void) { FactoryHolderRepository::instance()->InsertItem(this, i_key); }
+ void DeregisterSelf(void) { FactoryHolderRepository::instance()->RemoveItem(this, false); }
/// Abstract Factory create method
virtual T* Create(void *data = NULL) const = 0;
diff --git a/src/server/shared/Dynamic/LinkedReference/RefManager.h b/src/server/shared/Dynamic/LinkedReference/RefManager.h
index 7e294b4f5f0..ea79d5e1784 100644
--- a/src/server/shared/Dynamic/LinkedReference/RefManager.h
+++ b/src/server/shared/Dynamic/LinkedReference/RefManager.h
@@ -22,8 +22,8 @@
#define _REFMANAGER_H
//=====================================================
-#include "Utilities/LinkedList.h"
-#include "Utilities/LinkedReference/Reference.h"
+#include "Dynamic/LinkedList.h"
+#include "Dynamic/LinkedReference/Reference.h"
template <class TO, class FROM> class RefManager : public LinkedListHead
{
diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h
index 4a1545f8f12..8891199a5eb 100644
--- a/src/server/shared/Dynamic/LinkedReference/Reference.h
+++ b/src/server/shared/Dynamic/LinkedReference/Reference.h
@@ -21,7 +21,7 @@
#ifndef _REFERENCE_H
#define _REFERENCE_H
-#include "Utilities/LinkedList.h"
+#include "Dynamic/LinkedList.h"
//=====================================================
diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h
index e6619427885..11052a9f0a7 100644
--- a/src/server/shared/Dynamic/ObjectRegistry.h
+++ b/src/server/shared/Dynamic/ObjectRegistry.h
@@ -21,9 +21,9 @@
#ifndef TRINITY_OBJECTREGISTRY_H
#define TRINITY_OBJECTREGISTRY_H
-#include "Platform/Define.h"
-#include "Utilities/UnorderedMap.h"
-#include "Policies/Singleton.h"
+#include "Define.h"
+#include "Dynamic/UnorderedMap.h"
+#include "ace/Singleton.h"
#include <string>
#include <vector>
@@ -94,11 +94,6 @@ class ObjectRegistry
return i_registeredObjects;
}
- private:
- RegistryMapType i_registeredObjects;
- friend class Trinity::OperatorNew<ObjectRegistry<T, Key> >;
-
- // protected for friend use since it should be a singleton
ObjectRegistry() {}
~ObjectRegistry()
{
@@ -106,6 +101,9 @@ class ObjectRegistry
delete iter->second;
i_registeredObjects.clear();
}
+ private:
+ RegistryMapType i_registeredObjects;
+
};
#endif
diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h
index c2c9b4fcdea..4ed07431ee3 100644
--- a/src/server/shared/Dynamic/TypeContainer.h
+++ b/src/server/shared/Dynamic/TypeContainer.h
@@ -28,9 +28,9 @@
#include <map>
#include <vector>
-#include "Platform/Define.h"
-#include "Utilities/TypeList.h"
-#include "GameSystem/GridRefManager.h"
+#include "Define.h"
+#include "Dynamic/TypeList.h"
+#include "GridRefManager.h"
/*
* @class ContainerMapList is a mulit-type container for map elements
diff --git a/src/server/shared/Dynamic/TypeContainerFunctions.h b/src/server/shared/Dynamic/TypeContainerFunctions.h
index edfbb40e659..7ab2151461e 100644
--- a/src/server/shared/Dynamic/TypeContainerFunctions.h
+++ b/src/server/shared/Dynamic/TypeContainerFunctions.h
@@ -27,8 +27,8 @@
* to access or mutate the container.
*/
-#include "Platform/Define.h"
-#include "Utilities/TypeList.h"
+#include "Define.h"
+#include "Dynamic/TypeList.h"
#include <map>
namespace Trinity
diff --git a/src/server/shared/Dynamic/TypeContainerVisitor.h b/src/server/shared/Dynamic/TypeContainerVisitor.h
index f15075e5afd..6057eb32fc3 100644
--- a/src/server/shared/Dynamic/TypeContainerVisitor.h
+++ b/src/server/shared/Dynamic/TypeContainerVisitor.h
@@ -27,8 +27,8 @@
* to overload its types as a visit method is called.
*/
-#include "Platform/Define.h"
-#include "TypeContainer.h"
+#include "Define.h"
+#include "Dynamic/TypeContainer.h"
// forward declaration
template<class T, class Y> class TypeContainerVisitor;
diff --git a/src/server/shared/Dynamic/UnorderedMap.h b/src/server/shared/Dynamic/UnorderedMap.h
index fce5ec82bfc..d9f41fe4ab8 100644
--- a/src/server/shared/Dynamic/UnorderedMap.h
+++ b/src/server/shared/Dynamic/UnorderedMap.h
@@ -21,8 +21,8 @@
#ifndef TRINITY_UNORDERED_MAP_H
#define TRINITY_UNORDERED_MAP_H
-#include "Platform/CompilerDefs.h"
-#include "Platform/Define.h"
+#include "CompilerDefs.h"
+#include "Define.h"
#if COMPILER == COMPILER_INTEL
#include <ext/hash_map>
@@ -62,7 +62,13 @@ namespace __gnu_cxx
{
size_t operator()(T * const &__x) const { return (size_t)__x; }
};
-
+ template<> struct hash<std::string>
+ {
+ size_t operator()(const std::string &__x) const
+ {
+ return hash<const char *>()(__x.c_str());
+ }
+ };
};
#else
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index 187b9eaa79b..7a34eaa0c0d 100644
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
@@ -20,15 +20,12 @@
#include "Common.h"
#include "Log.h"
-#include "Policies/SingletonImp.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "Util.h"
#include <stdarg.h>
#include <stdio.h>
-INSTANTIATE_SINGLETON_1( Log );
-
Log::Log() :
raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL),
dberLogfile(NULL), chatLogfile(NULL), m_gmlog_per_account(false),
@@ -450,7 +447,7 @@ void Log::outCrash(const char * err, ...)
va_list ap;
va_start(ap, err);
- vutf8printf(stdout, err, &ap);
+ vutf8printf(stderr, err, &ap);
va_end(ap);
if (m_colored)
@@ -530,7 +527,6 @@ void Log::outArena(const char * str, ...)
va_end(ap);
fflush(arenaLogFile);
}
- fflush(stdout);
}
void Log::outErrorDb(const char * err, ...)
@@ -902,7 +898,6 @@ void Log::outRemote(const char * str, ...)
va_end(ap);
fflush(raLogfile);
}
- fflush(stdout);
}
void Log::outChat(const char * str, ...)
@@ -930,76 +925,4 @@ void Log::outChat(const char * str, ...)
fflush(chatLogfile);
va_end(ap);
}
- fflush(stdout);
-}
-
-void outstring_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outString(buf);
-}
-
-void detail_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outDetail(buf);
-}
-
-void debug_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outDebug(buf);
-}
-
-void error_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outError(buf);
-}
-
-void error_db_log(const char * str, ...)
-{
- if (!str)
- return;
-
- char buf[256];
- va_list ap;
- va_start(ap, str);
- vsnprintf(buf,256, str, ap);
- va_end(ap);
-
- Trinity::Singleton<Log>::Instance().outErrorDb(buf);
}
-
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index deb6c55e4e0..fb584d42c27 100644
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
@@ -22,7 +22,7 @@
#define TRINITYCORE_LOG_H
#include "Common.h"
-#include "Policies/Singleton.h"
+#include <ace/Singleton.h>
#include "Database/DatabaseEnv.h"
class Config;
@@ -82,9 +82,9 @@ enum ColorTypes
const int Colors = int(WHITE)+1;
-class Log : public Trinity::Singleton<Log, Trinity::ClassLevelLockable<Log, ACE_Thread_Mutex> >
+class Log
{
- friend class Trinity::OperatorNew<Log>;
+ friend class ACE_Singleton<Log, ACE_Thread_Mutex>;
Log();
~Log();
@@ -172,19 +172,13 @@ class Log : public Trinity::Singleton<Log, Trinity::ClassLevelLockable<Log, ACE_
std::string m_dumpsDir;
};
-#define sLog Trinity::Singleton<Log>::Instance()
+#define sLog (*ACE_Singleton<Log, ACE_Thread_Mutex>::instance())
#ifdef TRINITY_DEBUG
-#define DEBUG_LOG Trinity::Singleton<Log>::Instance().outDebug
+#define DEBUG_LOG sLog.outDebug
#else
#define DEBUG_LOG
#endif
-// primary for script library
-void outstring_log(const char * str, ...) ATTR_PRINTF(1,2);
-void detail_log(const char * str, ...) ATTR_PRINTF(1,2);
-void debug_log(const char * str, ...) ATTR_PRINTF(1,2);
-void error_log(const char * str, ...) ATTR_PRINTF(1,2);
-void error_db_log(const char * str, ...) ATTR_PRINTF(1,2);
#endif
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h
index ba0240fb58b..98709a5b0e0 100644
--- a/src/server/shared/Packets/ByteBuffer.h
+++ b/src/server/shared/Packets/ByteBuffer.h
@@ -22,8 +22,8 @@
#define _BYTEBUFFER_H
#include "Common.h"
-#include "Errors.h"
-#include "Log.h"
+#include "Debugging/Errors.h"
+#include "Logging/Log.h"
#include "Utilities/ByteConverter.h"
class ByteBufferException
diff --git a/src/server/shared/Policies/CreationPolicy.h b/src/server/shared/Policies/CreationPolicy.h
deleted file mode 100644
index 8552ce7da52..00000000000
--- a/src/server/shared/Policies/CreationPolicy.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_CREATIONPOLICY_H
-#define TRINITY_CREATIONPOLICY_H
-
-#include <stdlib.h>
-#include "Platform/Define.h"
-
-namespace Trinity
-{
- /**
- * OperatorNew policy creates an object on the heap using new.
- */
- template <class T>
- class OperatorNew
- {
- public:
- static T* Create(void) { return (new T); }
- static void Destroy(T *obj) { delete obj; }
- };
-
- /**
- * LocalStaticCreation policy creates an object on the stack
- * the first time call Create.
- */
- template <class T>
- class LocalStaticCreation
- {
- union MaxAlign
- {
- char t_[sizeof(T)];
- short int shortInt_;
- int int_;
- long int longInt_;
- float float_;
- double double_;
- long double longDouble_;
- struct Test;
- int Test::* pMember_;
- int (Test::*pMemberFn_)(int);
- };
- public:
- static T* Create(void)
- {
- static MaxAlign si_localStatic;
- return new(&si_localStatic) T;
- }
-
- static void Destroy(T *obj) { obj->~T(); }
- };
-
- /**
- * CreateUsingMalloc by pass the memory manger.
- */
- template<class T>
- class CreateUsingMalloc
- {
- public:
- static T* Create()
- {
- void* p = ::malloc(sizeof(T));
- if (!p) return 0;
- return new(p) T;
- }
-
- static void Destroy(T* p)
- {
- p->~T();
- ::free(p);
- }
- };
-
- /**
- * CreateOnCallBack creates the object base on the call back.
- */
- template<class T, class CALL_BACK>
- class CreateOnCallBack
- {
- public:
- static T* Create()
- {
- return CALL_BACK::createCallBack();
- }
-
- static void Destroy(T *p)
- {
- CALL_BACK::destroyCallBack(p);
- }
- };
-}
-#endif
-
diff --git a/src/server/shared/Policies/ObjectLifeTime.cpp b/src/server/shared/Policies/ObjectLifeTime.cpp
deleted file mode 100644
index fd16873ae92..00000000000
--- a/src/server/shared/Policies/ObjectLifeTime.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <cstdlib>
-#include "ObjectLifeTime.h"
-
-namespace Trinity
-{
- extern "C" void external_wrapper(void *p)
- {
- std::atexit( (void (*)())p );
- }
-
- void at_exit( void (*func)() )
- {
- external_wrapper((void*)func);
- }
-}
-
diff --git a/src/server/shared/Policies/ObjectLifeTime.h b/src/server/shared/Policies/ObjectLifeTime.h
deleted file mode 100644
index 61b90b59f6e..00000000000
--- a/src/server/shared/Policies/ObjectLifeTime.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_OBJECTLIFETIME_H
-#define TRINITY_OBJECTLIFETIME_H
-
-#include <stdexcept>
-#include "Platform/Define.h"
-
-typedef void (* Destroyer)(void);
-
-namespace Trinity
-{
- void at_exit( void (*func)() );
-
- template <class T>
- class ObjectLifeTime
- {
- public:
- static void ScheduleCall(void (*destroyer)() )
- {
- at_exit( destroyer );
- }
-
- DECLSPEC_NORETURN static void OnDeadReference(void) ATTR_NORETURN;
-
- };
-
- template <class T>
- void ObjectLifeTime<T>::OnDeadReference(void) // We don't handle Dead Reference for now
- {
- throw std::runtime_error("Dead Reference");
- }
-}
-#endif
-
diff --git a/src/server/shared/Policies/Singleton.h b/src/server/shared/Policies/Singleton.h
deleted file mode 100644
index da898558ca5..00000000000
--- a/src/server/shared/Policies/Singleton.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_SINGLETON_H
-#define TRINITY_SINGLETON_H
-
-/**
- * @brief class Singleton
- */
-
-#include "CreationPolicy.h"
-#include "ThreadingModel.h"
-#include "ObjectLifeTime.h"
-
-namespace Trinity
-{
- template
- <
- typename T,
- class ThreadingModel = Trinity::SingleThreaded<T>,
- class CreatePolicy = Trinity::OperatorNew<T>,
- class LifeTimePolicy = Trinity::ObjectLifeTime<T>
- >
- class Singleton
- {
- public:
- static T& Instance();
-
- protected:
- Singleton() {};
-
- private:
-
- // Prohibited actions...this does not prevent hijacking.
- Singleton(const Singleton &);
- Singleton& operator=(const Singleton &);
-
- // Singleton Helpers
- static void DestroySingleton();
-
- // data structure
- typedef typename ThreadingModel::Lock Guard;
- static T *si_instance;
- static bool si_destroyed;
- };
-}
-#endif
-
diff --git a/src/server/shared/Policies/SingletonImp.h b/src/server/shared/Policies/SingletonImp.h
deleted file mode 100644
index 3e985cd5c64..00000000000
--- a/src/server/shared/Policies/SingletonImp.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_SINGLETONIMPL_H
-#define TRINITY_SINGLETONIMPL_H
-
-#include "Singleton.h"
-
-// avoid the using namespace here cuz
-// its a .h file afterall
-
-template
-<
-typename T,
-class ThreadingModel,
-class CreatePolicy,
-class LifeTimePolicy
->
-T&
-Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy >::Instance()
-{
- if( !si_instance )
- {
- // double-checked Locking pattern
- Guard();
- if( !si_instance )
- {
- if( si_destroyed )
- {
- si_destroyed = false;
- LifeTimePolicy::OnDeadReference();
- }
- si_instance = CreatePolicy::Create();
- LifeTimePolicy::ScheduleCall(&DestroySingleton);
- }
- }
-
- return *si_instance;
-}
-
-template
-<
-typename T,
-class ThreadingModel,
-class CreatePolicy,
-class LifeTimePolicy
->
-void
-Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingleton()
-{
- CreatePolicy::Destroy(si_instance);
- si_instance = NULL;
- si_destroyed = true;
-}
-
-#define INSTANTIATE_SINGLETON_1(TYPE) \
- template class Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \
- template<> TYPE* Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
- template<> bool Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false
-
-#define INSTANTIATE_SINGLETON_2(TYPE, THREADINGMODEL) \
- template class Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \
- template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
- template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false
-
-#define INSTANTIATE_SINGLETON_3(TYPE, THREADINGMODEL, CREATIONPOLICY ) \
- template class Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >; \
- template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
- template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeType<TYPE> >::si_destroyed = false
-
-#define INSTANTIATE_SINGLETON_4(TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME) \
- template class Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >; \
- template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_instance = 0; \
- template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_destroyed = false
-#endif
-
diff --git a/src/server/shared/Policies/ThreadingModel.h b/src/server/shared/Policies/ThreadingModel.h
deleted file mode 100644
index d4c5e9a2333..00000000000
--- a/src/server/shared/Policies/ThreadingModel.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
- *
- * Copyright (C) 2008-2010 Trinity <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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef TRINITY_THREADINGMODEL_H
-#define TRINITY_THREADINGMODEL_H
-
-/**
- * @class ThreadingModel<T>
- *
- */
-
-#include "Platform/Define.h"
-
-namespace Trinity
-{
- inline void Guard(void *) {}
-
- template<typename MUTEX> class GeneralLock
- {
- public:
- GeneralLock(MUTEX &m) : i_mutex(m)
- {
- i_mutex.acquire();
- }
-
- ~GeneralLock()
- {
- i_mutex.release();
- }
- private:
- GeneralLock(const GeneralLock &);
- GeneralLock& operator=(const GeneralLock &);
- MUTEX &i_mutex;
- };
-
- template <class T>
- class SingleThreaded
- {
- public:
-
- struct Lock // empty object
- {
- Lock() {}
- Lock(const T &) {}
- Lock(const SingleThreaded<T> &) // for single threaded we ignore this
- {
- }
- };
-
- typedef T VolatileType;
- };
-
- // object level lockable
- template<class T, class MUTEX>
- class ObjectLevelLockable
- {
- public:
- ObjectLevelLockable() : i_mtx() {}
-
- friend class Lock;
-
- class Lock
- {
- public:
- Lock(ObjectLevelLockable<T, MUTEX> &host) : i_lock(host.i_mtx)
- {
- }
-
- private:
- GeneralLock<MUTEX> i_lock;
- };
-
- typedef volatile T VolatileType;
-
- private:
- // prevent the compiler creating a copy construct
- ObjectLevelLockable(const ObjectLevelLockable<T, MUTEX> &);
- ObjectLevelLockable<T, MUTEX>& operator=(const ObjectLevelLockable<T, MUTEX> &);
-
- MUTEX i_mtx;
- };
-
- template<class T, class MUTEX>
- class ClassLevelLockable
- {
- public:
- class Lock;
- friend class Lock;
- typedef volatile T VolatileType;
-
- ClassLevelLockable() {}
-
- class Lock
- {
- public:
- Lock(T& /*host*/) { ClassLevelLockable<T, MUTEX>::si_mtx.acquire(); }
- Lock(ClassLevelLockable<T, MUTEX> &) { ClassLevelLockable<T, MUTEX>::si_mtx.acquire(); }
- Lock() { ClassLevelLockable<T, MUTEX>::si_mtx.acquire(); }
- ~Lock() { ClassLevelLockable<T, MUTEX>::si_mtx.release(); }
- };
-
- private:
- static MUTEX si_mtx;
- };
-
-}
-
-template<class T, class MUTEX> MUTEX Trinity::ClassLevelLockable<T, MUTEX>::si_mtx;
-
-#define INSTANTIATE_CLASS_MUTEX(CTYPE,MUTEX) \
- template class Trinity::ClassLevelLockable<CTYPE, MUTEX >
-#endif
-
diff --git a/src/server/shared/SystemConfig.h b/src/server/shared/SystemConfig.h
index ac531cbbc94..fd380d72b79 100644
--- a/src/server/shared/SystemConfig.h
+++ b/src/server/shared/SystemConfig.h
@@ -24,7 +24,7 @@
#ifndef TRINITY_SYSTEMCONFIG_H
#define TRINITY_SYSTEMCONFIG_H
-#include "Platform/Define.h"
+#include "Define.h"
#include "revision.h"
#define _PACKAGENAME "TrinityCore "
diff --git a/src/server/shared/Threading/LockedQueue.h b/src/server/shared/Threading/LockedQueue.h
index 9f8afae6c14..ff6056350f3 100644
--- a/src/server/shared/Threading/LockedQueue.h
+++ b/src/server/shared/Threading/LockedQueue.h
@@ -23,7 +23,7 @@
#include <ace/Thread_Mutex.h>
#include <deque>
#include <assert.h>
-#include "Errors.h"
+#include "Debugging/Errors.h"
namespace ACE_Based
{
diff --git a/src/server/shared/Utilities/ByteConverter.h b/src/server/shared/Utilities/ByteConverter.h
index f8b6bd72498..24a89f464b8 100644
--- a/src/server/shared/Utilities/ByteConverter.h
+++ b/src/server/shared/Utilities/ByteConverter.h
@@ -25,7 +25,7 @@
for cross platform where they have different endians.
*/
-#include<Platform/Define.h>
+#include "Define.h"
#include<algorithm>
namespace ByteConverter
diff --git a/src/server/shared/Utilities/EventProcessor.h b/src/server/shared/Utilities/EventProcessor.h
index 2712967e1b7..421f88b659a 100644
--- a/src/server/shared/Utilities/EventProcessor.h
+++ b/src/server/shared/Utilities/EventProcessor.h
@@ -21,7 +21,7 @@
#ifndef __EVENTPROCESSOR_H
#define __EVENTPROCESSOR_H
-#include "Platform/Define.h"
+#include "Define.h"
#include<map>
diff --git a/src/server/shared/Utilities/ProgressBar.h b/src/server/shared/Utilities/ProgressBar.h
index e7565590278..cae23254f30 100644
--- a/src/server/shared/Utilities/ProgressBar.h
+++ b/src/server/shared/Utilities/ProgressBar.h
@@ -20,7 +20,7 @@
#ifndef TRINITYCORE_PROGRESSBAR_H
#define TRINITYCORE_PROGRESSBAR_H
-#include "Platform/Define.h"
+#include "Define.h"
class barGoLink
{
diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp
index 2c1df2ff483..a50a4f9d039 100644
--- a/src/server/shared/Utilities/ServiceWin32.cpp
+++ b/src/server/shared/Utilities/ServiceWin32.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include "Common.h"
#include "Log.h"
@@ -26,6 +26,11 @@
#include <windows.h>
#include <winsvc.h>
+// stupid ACE define
+#ifdef main
+#undef main
+#endif //main
+
#if !defined(WINADVAPI)
#if !defined(_ADVAPI32_)
#define WINADVAPI DECLSPEC_IMPORT
diff --git a/src/server/shared/Utilities/ServiceWin32.h b/src/server/shared/Utilities/ServiceWin32.h
index ddac785a0fb..4dbd329a5fa 100644
--- a/src/server/shared/Utilities/ServiceWin32.h
+++ b/src/server/shared/Utilities/ServiceWin32.h
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef WIN32
+#ifdef _WIN32
#ifndef _WIN32_SERVICE_
#define _WIN32_SERVICE_
@@ -27,5 +27,5 @@ bool WinServiceUninstall();
bool WinServiceRun();
#endif // _WIN32_SERVICE_
-#endif // WIN32
+#endif // _WIN32
diff --git a/src/server/shared/Utilities/Timer.h b/src/server/shared/Utilities/Timer.h
index 3e0a369b655..326df71bf50 100644
--- a/src/server/shared/Utilities/Timer.h
+++ b/src/server/shared/Utilities/Timer.h
@@ -21,7 +21,7 @@
#ifndef TRINITY_TIMER_H
#define TRINITY_TIMER_H
-#include "Platform/CompilerDefs.h"
+#include "CompilerDefs.h"
#if PLATFORM == PLATFORM_WINDOWS
# include <ace/config-all.h>
diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp
index a3c017fdbfd..97dfde6c92b 100644
--- a/src/server/shared/Utilities/Util.cpp
+++ b/src/server/shared/Utilities/Util.cpp
@@ -20,9 +20,10 @@
#include "Util.h"
-#include "sockets/socket_include.h"
-#include "utf8cpp/utf8.h"
-#include "mersennetwister/MersenneTwister.h"
+#include "socket_include.h"
+#include "utf8.h"
+//#include "SFMT.h"
+#include "MersenneTwister.h"
#include <ace/TSS_T.h>
typedef ACE_TSS<MTRand> MTRandTSS;
@@ -194,7 +195,7 @@ uint32 CreatePIDFile(const std::string& filename)
if (pid_file == NULL)
return 0;
-#ifdef WIN32
+#ifdef _WIN32
DWORD pid = GetCurrentProcessId();
#else
pid_t pid = getpid();
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index 3adfbf0339f..e86422e2ce1 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -1,130 +1,189 @@
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-########### next target ###############
+########### worldserver ###############
-SET(trinity-core_SRCS
-CliRunnable.cpp
-CliRunnable.h
-Main.cpp
-Master.cpp
-Master.h
-RASocket.cpp
-RASocket.h
-WorldRunnable.cpp
-WorldRunnable.h
+set(worldserver_SRCS
+ CommandLine/CliRunnable.cpp
+ RemoteAccess/RASocket.cpp
+ WorldThread/WorldRunnable.cpp
+ Main.cpp
+ Master.cpp
)
include_directories(
${ACE_INCLUDE_DIR}
+ ${MYSQL_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/externals/sockets/include
+ ${CMAKE_SOURCE_DIR}/externals/mersennetwister
${CMAKE_SOURCE_DIR}/dep/include
+ ${CMAKE_SOURCE_DIR}/src/server/collision
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Management
${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography/Authentication
${CMAKE_SOURCE_DIR}/src/server/shared/Database
- ${CMAKE_SOURCE_DIR}/src/server/shared/vmap
- ${CMAKE_SOURCE_DIR}/src/server/framework
+ ${CMAKE_SOURCE_DIR}/src/server/shared/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/CountedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic/LinkedReference
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Dynamic
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Logging
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Packets
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Policies
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Threading
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
${CMAKE_SOURCE_DIR}/src/server/game
- ${CMAKE_SOURCE_DIR}/src/server/game/Account
+ ${CMAKE_SOURCE_DIR}/src/server/game/Accounts
${CMAKE_SOURCE_DIR}/src/server/game/Achievements
${CMAKE_SOURCE_DIR}/src/server/game/Addons
${CMAKE_SOURCE_DIR}/src/server/game/AI
- ${CMAKE_SOURCE_DIR}/src/server/game/AI/AuctionHouseBot
+ ${CMAKE_SOURCE_DIR}/src/server/game/AI/CoreAI
${CMAKE_SOURCE_DIR}/src/server/game/AI/EventAI
${CMAKE_SOURCE_DIR}/src/server/game/AI/ScriptedAI
${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse
+ ${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse/AuctionHouseBot
${CMAKE_SOURCE_DIR}/src/server/game/BattleGrounds
+ ${CMAKE_SOURCE_DIR}/src/server/game/BattleGrounds/Zones
${CMAKE_SOURCE_DIR}/src/server/game/Calendar
${CMAKE_SOURCE_DIR}/src/server/game/Chat
+ ${CMAKE_SOURCE_DIR}/src/server/game/Chat/Channels
+ ${CMAKE_SOURCE_DIR}/src/server/game/Chat/Commands
${CMAKE_SOURCE_DIR}/src/server/game/Combat
- ${CMAKE_SOURCE_DIR}/src/server/game/ConditionMgr
+ ${CMAKE_SOURCE_DIR}/src/server/game/Conditions
${CMAKE_SOURCE_DIR}/src/server/game/DataStores
+ ${CMAKE_SOURCE_DIR}/src/server/game/DungeonFinding
${CMAKE_SOURCE_DIR}/src/server/game/Entities
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Creature
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Corpse
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/DynamicObject
${CMAKE_SOURCE_DIR}/src/server/game/Entities/GameObject
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item/Container
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object/Updates
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Pet
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Player
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Totem
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Unit
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Vehicle
+ ${CMAKE_SOURCE_DIR}/src/server/game/Entities/Transport
${CMAKE_SOURCE_DIR}/src/server/game/Events
${CMAKE_SOURCE_DIR}/src/server/game/Globals
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Cells
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers
+ ${CMAKE_SOURCE_DIR}/src/server/game/Grids
${CMAKE_SOURCE_DIR}/src/server/game/Groups
${CMAKE_SOURCE_DIR}/src/server/game/Guilds
${CMAKE_SOURCE_DIR}/src/server/game/Instances
- ${CMAKE_SOURCE_DIR}/src/server/game/LookingForGroup
${CMAKE_SOURCE_DIR}/src/server/game/Loot
${CMAKE_SOURCE_DIR}/src/server/game/Mails
- ${CMAKE_SOURCE_DIR}/src/server/game/Map
- ${CMAKE_SOURCE_DIR}/src/server/game/Map/Cell
- ${CMAKE_SOURCE_DIR}/src/server/game/Map/Grid
+ ${CMAKE_SOURCE_DIR}/src/server/game/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/game/Miscellaneous
${CMAKE_SOURCE_DIR}/src/server/game/Movement
${CMAKE_SOURCE_DIR}/src/server/game/Movement/MovementGenerators
- ${CMAKE_SOURCE_DIR}/src/server/game/Opcodes
+ ${CMAKE_SOURCE_DIR}/src/server/game/Movement/Waypoints
${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP
+ ${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP/Zones
${CMAKE_SOURCE_DIR}/src/server/game/Pools
${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders
${CMAKE_SOURCE_DIR}/src/server/game/Quests
${CMAKE_SOURCE_DIR}/src/server/game/Reputation
- ${CMAKE_SOURCE_DIR}/src/server/game/ScriptMgr
+ ${CMAKE_SOURCE_DIR}/src/server/game/Scripting
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol/Handlers
+ ${CMAKE_SOURCE_DIR}/src/server/game/Server
${CMAKE_SOURCE_DIR}/src/server/game/Skills
${CMAKE_SOURCE_DIR}/src/server/game/Spells
${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
${CMAKE_SOURCE_DIR}/src/server/game/Tools
${CMAKE_SOURCE_DIR}/src/server/game/Weather
${CMAKE_SOURCE_DIR}/src/server/game/World
- ${MYSQL_INCLUDE_DIR}
+ ${CMAKE_SOURCE_DIR}/src/server/worldserver
+ ${CMAKE_SOURCE_DIR}/src/server/worldserver/CommandLine
+ ${CMAKE_SOURCE_DIR}/src/server/worldserver/RemoteAccess
+ ${CMAKE_SOURCE_DIR}/src/server/worldserver/WorldThread
)
-SET(trinity-core_LINK_FLAGS "")
+set(worldserver_LINK_FLAGS "")
-add_executable(trinity-core ${trinity-core_SRCS})
-add_definitions(
--D_TRINITY_CORE_CONFIG='"${CONF_DIR}/trinitycore.conf"'
-)
-IF (DO_MYSQL)
- SET(trinity-core_LINK_FLAGS "-pthread ${trinity-core_LINK_FLAGS}")
-ENDIF(DO_MYSQL)
+add_executable(worldserver ${worldserver_SRCS})
-IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
- SET(trinity-core_LINK_FLAGS "-framework Carbon ${trinity-core_LINK_FLAGS}")
- SET(SCRIPT_LIB "")
-ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
+if( NOT WIN32 )
+ add_definitions(-D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"')
+endif()
-SET_TARGET_PROPERTIES(trinity-core PROPERTIES LINK_FLAGS "${trinity-core_LINK_FLAGS}")
+add_dependencies(worldserver revision.h)
-if(DO_SCRIPTS)
- SET(SCRIPT_LIB "scripts")
-else(DO_SCRIPTS)
- SET(SCRIPT_LIB "")
-endif(DO_SCRIPTS)
-
-target_link_libraries(
-trinity-core
-game
-shared
-zlib
-trinityframework
-trinitysockets
-trinitydatabase
-trinityauth
-trinityconfig
-vmaps
-g3dlite
-jmalloc
-${SCRIPT_LIB}
-${READLINE_LIBRARY}
-${TERMCAP_LIBRARY}
-${MYSQL_LIBRARIES}
-${SSLLIB}
-${ACE_LIBRARY}
-${ZLIB}
-${OSX_LIBS}
-)
+if( UNIX )
+ set(worldserver_LINK_FLAGS "-pthread ${worldserver_LINK_FLAGS}")
+endif()
-install(TARGETS trinity-core DESTINATION bin)
+if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+ set(worldserver_LINK_FLAGS "-framework Carbon ${worldserver_LINK_FLAGS}")
+ set(SCRIPT_LIB "")
+endif()
+set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAGS}")
-########### install files ###############
+if( DO_SCRIPTS )
+ set(SCRIPT_LIB "scripts")
+else()
+ set(SCRIPT_LIB "")
+endif()
-install(FILES trinitycore.conf.dist DESTINATION etc)
+if( WIN32 )
+ target_link_libraries(
+ worldserver
+ game
+ shared
+ zlib
+ trinitysockets
+ trinitydatabase
+ trinityauth
+ trinityconfig
+ collision
+ g3dlib
+ ${SCRIPT_LIB}
+ ace
+ ${MYSQL_LIBRARY}
+ ${OPENSSL_LIBRARIES}
+ ${OPENSSL_EXTRA_LIBRARIES}
+ )
+else()
+ target_link_libraries(
+ worldserver
+ game
+ shared
+ trinitysockets
+ trinitydatabase
+ trinityauth
+ trinityconfig
+ collision
+ g3dlib
+ jemalloc
+ ${SCRIPT_LIB}
+ ${READLINE_LIBRARY}
+ ${TERMCAP_LIBRARY}
+ ${ACE_LIBRARY}
+ ${MYSQL_LIBRARY}
+ ${OPENSSL_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ ${OSX_LIBS}
+ )
+endif()
+if( UNIX )
+ install(TARGETS worldserver DESTINATION bin)
+ install(FILES worldserver.conf.dist DESTINATION etc)
+endif()
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index b39faf694db..c72e454700c 100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -26,7 +26,7 @@
#include "ObjectMgr.h"
#include "World.h"
#include "WorldSession.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "AccountMgr.h"
#include "Chat.h"
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index 95bb39eca91..5166ca741df 100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
@@ -28,16 +28,16 @@
#include "Common.h"
#include "Database/DatabaseEnv.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "Log.h"
#include "Master.h"
#ifndef _TRINITY_CORE_CONFIG
-# define _TRINITY_CORE_CONFIG "TrinityCore.conf"
+# define _TRINITY_CORE_CONFIG "worldserver.conf"
#endif //_TRINITY_CORE_CONFIG
-#ifdef WIN32
+#ifdef _WIN32
#include "ServiceWin32.h"
char serviceName[] = "TrinityCore";
char serviceLongName[] = "Trinity core service";
@@ -62,7 +62,7 @@ void usage(const char *prog)
{
sLog.outString("Usage: \n %s [<options>]\n"
" -c config_file use config_file as configuration file\n\r"
- #ifdef WIN32
+ #ifdef _WIN32
" Running as service functions:\n\r"
" --service run as service\n\r"
" -s install install service\n\r"
@@ -91,7 +91,7 @@ extern int main(int argc, char **argv)
cfg_file = argv[c];
}
- #ifdef WIN32
+ #ifdef _WIN32
////////////
//Services//
////////////
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index 8b34b512f57..f6f4260e303 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -31,9 +31,8 @@
#include "WorldRunnable.h"
#include "WorldSocket.h"
#include "WorldSocketMgr.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "Database/DatabaseEnv.h"
-#include "Policies/SingletonImp.h"
#include "CliRunnable.h"
#include "Log.h"
@@ -42,26 +41,19 @@
#include "Timer.h"
#include "Util.h"
-#include "sockets/TcpSocket.h"
-#include "sockets/Utility.h"
-#include "sockets/Parse.h"
-#include "sockets/Socket.h"
-#include "sockets/SocketHandler.h"
-#include "sockets/ListenSocket.h"
-#include "Auth/BigNumber.h"
+#include "TcpSocket.h"
+#include "Utility.h"
+#include "Parse.h"
+#include "Socket.h"
+#include "SocketHandler.h"
+#include "ListenSocket.h"
+#include "BigNumber.h"
-#ifdef WIN32
+#ifdef _WIN32
#include "ServiceWin32.h"
extern int m_ServiceStatus;
#endif
-/// \todo Warning disabling not useful under VC++2005. Can somebody say on which compiler it is useful?
-#pragma warning(disable:4305)
-
-INSTANTIATE_SINGLETON_1( Master );
-
-volatile uint32 Master::m_masterLoopCounter = 0;
-
/// Handle cored's termination signals
class CoredSignalHandler : public Trinity::SignalHandler
{
@@ -94,42 +86,25 @@ public:
void SetDelayTime(uint32 t) { _delaytime = t; }
void run(void)
{
- if(!_delaytime)
+ if (!_delaytime)
return;
sLog.outString("Starting up anti-freeze thread (%u seconds max stuck time)...",_delaytime/1000);
m_loops = 0;
w_loops = 0;
m_lastchange = 0;
w_lastchange = 0;
- while(!World::IsStopped())
+ while (!World::IsStopped())
{
ACE_Based::Thread::Sleep(1000);
uint32 curtime = getMSTime();
- //DEBUG_LOG("anti-freeze: time=%u, counters=[%u; %u]",curtime,Master::m_masterLoopCounter,World::m_worldLoopCounter);
-
- // There is no Master anymore
- // TODO: clear the rest of the code
-// // normal work
-// if(m_loops != Master::m_masterLoopCounter)
-// {
-// m_lastchange = curtime;
-// m_loops = Master::m_masterLoopCounter;
-// }
-// // possible freeze
-// else if(getMSTimeDiff(m_lastchange,curtime) > _delaytime)
-// {
-// sLog.outError("Main/Sockets Thread hangs, kicking out server!");
-// *((uint32 volatile*)NULL) = 0; // bang crash
-// }
-
// normal work
- if(w_loops != World::m_worldLoopCounter)
+ if (w_loops != World::m_worldLoopCounter)
{
w_lastchange = curtime;
w_loops = World::m_worldLoopCounter;
}
// possible freeze
- else if(getMSTimeDiff(w_lastchange,curtime) > _delaytime)
+ else if (getMSTimeDiff(w_lastchange,curtime) > _delaytime)
{
sLog.outError("World Thread hangs, kicking out server!");
*((uint32 volatile*)NULL) = 0; // bang crash
@@ -285,7 +260,7 @@ int Master::Run()
ACE_Based::Thread* cliThread = NULL;
-#ifdef WIN32
+#ifdef _WIN32
if (sConfig.GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/)
#else
if (sConfig.GetBoolDefault("Console.Enable", true))
@@ -298,7 +273,7 @@ int Master::Run()
ACE_Based::Thread rar_thread(new RARunnable);
///- Handle affinity for multiple processors and process priority on Windows
- #ifdef WIN32
+ #ifdef _WIN32
{
HANDLE hProcess = GetCurrentProcess();
@@ -386,7 +361,7 @@ int Master::Run()
if (cliThread)
{
- #ifdef WIN32
+ #ifdef _WIN32
// this only way to terminate CLI thread exist at Win32 (alt. way exist only in Windows Vista API)
//_exit(1);
@@ -450,14 +425,14 @@ bool Master::_StartDB()
///- Get world database info from configuration file
dbstring = sConfig.GetStringDefault("WorldDatabaseInfo", "");
- if(dbstring.empty())
+ if (dbstring.empty())
{
- sLog.outError("Database not specified in configuration file");
+ sLog.outError("World database not specified in configuration file");
return false;
}
///- Initialise the world database
- if(!WorldDatabase.Initialize(dbstring.c_str()))
+ if( !WorldDatabase.Initialize(dbstring.c_str()))
{
sLog.outError("Cannot connect to world database %s",dbstring.c_str());
return false;
@@ -465,14 +440,14 @@ bool Master::_StartDB()
///- Get character database info from configuration file
dbstring = sConfig.GetStringDefault("CharacterDatabaseInfo", "");
- if(dbstring.empty())
+ if (dbstring.empty())
{
- sLog.outError("Character Database not specified in configuration file");
+ sLog.outError("Character database not specified in configuration file");
return false;
}
///- Initialise the Character database
- if(!CharacterDatabase.Initialize(dbstring.c_str()))
+ if (!CharacterDatabase.Initialize(dbstring.c_str()))
{
sLog.outError("Cannot connect to Character database %s",dbstring.c_str());
return false;
@@ -480,14 +455,14 @@ bool Master::_StartDB()
///- Get login database info from configuration file
dbstring = sConfig.GetStringDefault("LoginDatabaseInfo", "");
- if(dbstring.empty())
+ if (dbstring.empty())
{
sLog.outError("Login database not specified in configuration file");
return false;
}
///- Initialise the login database
- if(!LoginDatabase.Initialize(dbstring.c_str()))
+ if (!LoginDatabase.Initialize(dbstring.c_str()))
{
sLog.outError("Cannot connect to login database %s",dbstring.c_str());
return false;
@@ -495,7 +470,7 @@ bool Master::_StartDB()
///- Get the realm Id from the configuration file
realmID = sConfig.GetIntDefault("RealmID", 0);
- if(!realmID)
+ if (!realmID)
{
sLog.outError("Realm ID not defined in configuration file");
return false;
diff --git a/src/server/worldserver/Master.h b/src/server/worldserver/Master.h
index 76ff2af1457..e8105705435 100644
--- a/src/server/worldserver/Master.h
+++ b/src/server/worldserver/Master.h
@@ -26,7 +26,6 @@
#define _MASTER_H
#include "Common.h"
-#include "Policies/Singleton.h"
/// Start the server
class Master
@@ -35,7 +34,6 @@ class Master
Master();
~Master();
int Run();
- static volatile uint32 m_masterLoopCounter;
private:
bool _StartDB();
@@ -43,6 +41,6 @@ class Master
void clearOnlineAccounts();
};
-#define sMaster Trinity::Singleton<Master>::Instance()
+#define sMaster (*ACE_Singleton<Master, ACE_Null_Mutex>::instance())
#endif
/// @}
diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp
index 32c16d9980f..35c2514b377 100644
--- a/src/server/worldserver/RemoteAccess/RASocket.cpp
+++ b/src/server/worldserver/RemoteAccess/RASocket.cpp
@@ -23,7 +23,7 @@
*/
#include "Common.h"
-#include "Config/ConfigEnv.h"
+#include "Configuration/ConfigEnv.h"
#include "Database/DatabaseEnv.h"
#include "AccountMgr.h"
#include "Log.h"
@@ -254,7 +254,7 @@ void RASocket::zprint( const char * szText )
unsigned int sz=strlen(megabuffer);
Encrypt(megabuffer,sz);
send(r,megabuffer,sz,0);
- delete [] megabuffer;
+ free(megabuffer);
#else
diff --git a/src/server/worldserver/RemoteAccess/RASocket.h b/src/server/worldserver/RemoteAccess/RASocket.h
index 5c13724f90d..25a21d52044 100644
--- a/src/server/worldserver/RemoteAccess/RASocket.h
+++ b/src/server/worldserver/RemoteAccess/RASocket.h
@@ -25,7 +25,7 @@
#ifndef _RASOCKET_H
#define _RASOCKET_H
-#include "sockets/TcpSocket.h"
+#include "TcpSocket.h"
#include "Common.h"
diff --git a/src/server/worldserver/WorldThread/WorldRunnable.cpp b/src/server/worldserver/WorldThread/WorldRunnable.cpp
index c674ddbc06f..69639da62fa 100644
--- a/src/server/worldserver/WorldThread/WorldRunnable.cpp
+++ b/src/server/worldserver/WorldThread/WorldRunnable.cpp
@@ -35,7 +35,7 @@
#define WORLD_SLEEP_CONST 50
-#ifdef WIN32
+#ifdef _WIN32
#include "ServiceWin32.h"
extern int m_ServiceStatus;
#endif
@@ -76,7 +76,7 @@ void WorldRunnable::run()
else
prevSleepTime = 0;
- #ifdef WIN32
+ #ifdef _WIN32
if (m_ServiceStatus == 0) World::StopNow(SHUTDOWN_EXIT_CODE);
while (m_ServiceStatus == 2) Sleep(1000);
#endif
@@ -90,7 +90,7 @@ void WorldRunnable::run()
sWorldSocketMgr->StopNetwork();
- MapManager::Instance().UnloadAll(); // unload all grids (including locked in memory)
+ sMapMgr.UnloadAll(); // unload all grids (including locked in memory)
///- End the database thread
WorldDatabase.ThreadEnd(); // free mySQL thread resources
diff --git a/src/server/worldserver/trinitycore.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 3b6d20e093d..8c53993d3f0 100644
--- a/src/server/worldserver/trinitycore.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -48,7 +48,7 @@
RealmID = 1
DataDir = "."
LogsDir = ""
-LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;realmd"
+LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"
WorldDatabaseInfo = "127.0.0.1;3306;trinity;trinity;world"
CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity;characters"
MaxPingTime = 30
@@ -177,7 +177,7 @@ EAIErrorLevel = 2
#
# vmap.enableIndoorCheck
# Enable/Disable VMap based indoor check to remove outdoor-only auras (mounts etc.)
-# Default: 0 (disabled)
+# Default: 1 (enabled)
#
# DetectPosCollision
# Check final move position, summon position, etc for visible collision
@@ -244,10 +244,10 @@ PlayerSave.Stats.MinLevel = 0
PlayerSave.Stats.SaveOnlyOnLogout = 1
vmap.enableLOS = 0
vmap.enableHeight = 0
-vmap.ignoreMapIds = "369"
+vmap.ignoreMapIds = ""
vmap.ignoreSpellIds = "7720"
vmap.petLOS = 0
-vmap.enableIndoorCheck = 0
+vmap.enableIndoorCheck = 1
DetectPosCollision = 1
TargetPosRecalculateRange = 1.5
UpdateUptimeInterval = 10
@@ -811,6 +811,11 @@ ChatLogTimestamp = 0
# Default: 7
# -1 (show all available quests marks)
#
+# Quests.IgnoreRaid
+# Allow non-raid quests to be completed when in raid group
+# Default: 0 (false)
+# 1 (true)
+#
# Guild.EventLogRecordsCount
# Count of guild event log records stored in guild_eventlog table
# Increase to store more guild events in table, minimum is 100
@@ -928,6 +933,7 @@ Instance.ResetTimeHour = 4
Instance.UnloadDelay = 1800000
Quests.LowLevelHideDiff = 4
Quests.HighLevelHideDiff = 7
+Quests.IgnoreRaid = 0
Guild.EventLogRecordsCount = 100
Guild.BankEventLogRecordsCount = 25
MaxPrimaryTradeSkill = 2
diff --git a/src/server/worldserver/TrinityCore.ico b/src/server/worldserver/worldserver.ico
index 6f0a5721957..6f0a5721957 100644
--- a/src/server/worldserver/TrinityCore.ico
+++ b/src/server/worldserver/worldserver.ico
Binary files differ
diff --git a/src/server/worldserver/TrinityCore.rc b/src/server/worldserver/worldserver.rc
index 151185f3cec..939d6bdd355 100644
--- a/src/server/worldserver/TrinityCore.rc
+++ b/src/server/worldserver/worldserver.rc
@@ -36,7 +36,7 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_APPICON ICON "TrinityCore.ico"
+IDI_APPICON ICON "worldserver.ico"
/////////////////////////////////////////////////////////////////////////////
// Neutre (Par défaut système) resources
@@ -69,12 +69,12 @@ BEGIN
BEGIN
BLOCK "080004b0"
BEGIN
- VALUE "FileDescription", "TrinityCore"
+ VALUE "FileDescription", "worldserver"
VALUE "FileVersion", STRFILEVER
- VALUE "InternalName", "TrinityCore"
- VALUE "LegalCopyright", "Copyright (C) 2008-2009"
- VALUE "OriginalFilename", "TrinityCore.exe"
- VALUE "ProductName", "TrinityCore"
+ VALUE "InternalName", "worldserver"
+ VALUE "LegalCopyright", "Copyright (C) 2008-2010"
+ VALUE "OriginalFilename", "worldserver.exe"
+ VALUE "ProductName", "worldserver"
VALUE "ProductVersion", STRPRODUCTVER
END
END
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 1d891d39182..4121a9579ec 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -1,3 +1,13 @@
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
add_subdirectory(map_extractor)
add_subdirectory(vmap3_assembler)
add_subdirectory(vmap3_extractor)
diff --git a/src/tools/ExtractorToolsVC90.sln b/src/tools/ExtractorToolsVC90.sln
new file mode 100644
index 00000000000..7881797979a
--- /dev/null
+++ b/src/tools/ExtractorToolsVC90.sln
@@ -0,0 +1,80 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpq", "..\..\externals\libmpq\win\VC90\libmpq.vcproj", "{03AB0F44-628E-4855-99A0-C98A1EB52C50}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CE773400-763E-4B71-B5E2-C9B60A752EB1} = {CE773400-763E-4B71-B5E2-C9B60A752EB1}
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bzip2", "..\..\externals\bzip2\win\VC90\bzip2.vcproj", "{CE773400-763E-4B71-B5E2-C9B60A752EB1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\externals\zlib\win\VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\externals\g3dlite\win\VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{69F789A6-BD04-454A-AC8E-A57AAE7FCF77}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapextractor", "map_extractor\VC90\VC90_mapextractor.vcproj", "{D7552D4F-408F-4F8E-859B-366659150CF4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {03AB0F44-628E-4855-99A0-C98A1EB52C50} = {03AB0F44-628E-4855-99A0-C98A1EB52C50}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap3assembler", "vmap3_assembler\VC90\VC90_vmap3assembler.vcproj", "{572FFF74-480C-4472-8ABF-81733BB4049D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap3extractor", "vmap3_extractor\VC90\VC90_vmap3extractor.vcproj", "{502602CC-98EA-4335-B922-C5C1DBF37604}"
+ ProjectSection(ProjectDependencies) = postProject
+ {03AB0F44-628E-4855-99A0-C98A1EB52C50} = {03AB0F44-628E-4855-99A0-C98A1EB52C50}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.ActiveCfg = Debug|Win32
+ {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Debug|Win32.Build.0 = Debug|Win32
+ {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.ActiveCfg = Release|Win32
+ {03AB0F44-628E-4855-99A0-C98A1EB52C50}.Release|Win32.Build.0 = Release|Win32
+ {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Debug|Win32.Build.0 = Debug|Win32
+ {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|Win32.ActiveCfg = Release|Win32
+ {CE773400-763E-4B71-B5E2-C9B60A752EB1}.Release|Win32.Build.0 = Release|Win32
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
+ {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
+ {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
+ {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
+ {D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.Build.0 = Debug|Win32
+ {D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.ActiveCfg = Release|Win32
+ {D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.Build.0 = Release|Win32
+ {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.Build.0 = Debug|Win32
+ {572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.ActiveCfg = Release|Win32
+ {572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.Build.0 = Release|Win32
+ {502602CC-98EA-4335-B922-C5C1DBF37604}.Debug|Win32.ActiveCfg = Debug|Win32
+ {502602CC-98EA-4335-B922-C5C1DBF37604}.Debug|Win32.Build.0 = Debug|Win32
+ {502602CC-98EA-4335-B922-C5C1DBF37604}.Release|Win32.ActiveCfg = Release|Win32
+ {502602CC-98EA-4335-B922-C5C1DBF37604}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {CE773400-763E-4B71-B5E2-C9B60A752EB1} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77}
+ {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77}
+ {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77}
+ {03AB0F44-628E-4855-99A0-C98A1EB52C50} = {69F789A6-BD04-454A-AC8E-A57AAE7FCF77}
+ EndGlobalSection
+EndGlobal
diff --git a/src/tools/map_extractor/CMakeLists.txt b/src/tools/map_extractor/CMakeLists.txt
index 9052903b1ed..cb3778c7c6a 100644
--- a/src/tools/map_extractor/CMakeLists.txt
+++ b/src/tools/map_extractor/CMakeLists.txt
@@ -1,4 +1,5 @@
# Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/>
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -8,19 +9,30 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-cmake_minimum_required (VERSION 2.6)
-project (MANGOS_MAP_EXTRACTOR)
+file(GLOB sources *.cpp)
-add_subdirectory (libmpq)
-add_subdirectory (loadlib)
+include_directories (
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/loadlib
+)
-include_directories (${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/libmpq)
-include_directories (${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/loadlib)
+add_executable(mapextractor
+ ${sources}
+)
-link_directories (${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/libmpq)
-link_directories (${MANGOS_MAP_EXTRACTOR_SOURCE_DIR}/loadlib)
+if(WIN32)
+ target_link_libraries(mapextractor
+ mpq
+ bzip2
+ )
+else()
+ target_link_libraries(mapextractor
+ mpq
+ ${BZIP2_LIBRARIES}
+ )
+endif()
-add_executable (ad dbcfile.cpp mpq_libmpq.cpp System.cpp)
-
-target_link_libraries (ad libmpq)
-target_link_libraries (ad loadlib)
+if( UNIX )
+ install(TARGETS mapextractor DESTINATION bin)
+endif()
diff --git a/src/tools/map_extractor/README.linux b/src/tools/map_extractor/README.linux
deleted file mode 100644
index 1986831e751..00000000000
--- a/src/tools/map_extractor/README.linux
+++ /dev/null
@@ -1,7 +0,0 @@
-Linux instructions
-------------------
-
-1. install cmake
-2. cmake -i
-3. make
-4. ./ad
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index 683f89ac11e..2640b65d8b1 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -5,17 +5,17 @@
#include <set>
#include <cstdlib>
-#ifdef WIN32
+#ifdef _WIN32
#include "direct.h"
#else
#include <sys/stat.h>
#endif
#include "dbcfile.h"
-#include "mpq_libmpq.h"
+#include "mpq_libmpq04.h"
-#include "loadlib/adt.h"
-#include "loadlib/wdt.h"
+#include "adt.h"
+#include "wdt.h"
#include <fcntl.h>
#if defined( __GNUC__ )
@@ -88,7 +88,7 @@ static char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "z
void CreateDir( const std::string& Path )
{
- #ifdef WIN32
+ #ifdef _WIN32
_mkdir( Path.c_str());
#else
mkdir( Path.c_str(), 0777 );
@@ -166,6 +166,43 @@ void HandleArgs(int argc, char * arg[])
}
}
+uint32 ReadBuild(int locale)
+{
+ // include build info file also
+ std::string filename = std::string("component.wow-")+langs[locale]+".txt";
+ //printf("Read %s file... ", filename.c_str());
+
+ MPQFile m(filename.c_str());
+ if(m.isEof())
+ {
+ printf("Fatal error: Not found %s file!\n", filename.c_str());
+ exit(1);
+ }
+
+ std::string text = m.getPointer();
+ m.close();
+
+ size_t pos = text.find("version=\"");
+ size_t pos1 = pos + strlen("version=\"");
+ size_t pos2 = text.find("\"",pos1);
+ if (pos == text.npos || pos2 == text.npos || pos1 >= pos2)
+ {
+ printf("Fatal error: Invalid %s file format!\n", filename.c_str());
+ exit(1);
+ }
+
+ std::string build_str = text.substr(pos1,pos2-pos1);
+
+ int build = atoi(build_str.c_str());
+ if (build <= 0)
+ {
+ printf("Fatal error: Invalid %s file format!\n", filename.c_str());
+ exit(1);
+ }
+
+ return build;
+}
+
uint32 ReadMapDBC()
{
printf("Read Map.dbc file... ");
@@ -238,16 +275,17 @@ void ReadLiquidTypeTableDBC()
//
// Map file format data
-#define MAP_MAGIC 'SPAM'
-#define MAP_VERSION_MAGIC '0.1w'
-#define MAP_AREA_MAGIC 'AERA'
-#define MAP_HEIGHT_MAGIC 'TGHM'
-#define MAP_LIQUID_MAGIC 'QILM'
+static char const* MAP_MAGIC = "MAPS";
+static char const* MAP_VERSION_MAGIC = "v1.1";
+static char const* MAP_AREA_MAGIC = "AREA";
+static char const* MAP_HEIGHT_MAGIC = "MHGT";
+static char const* MAP_LIQUID_MAGIC = "MLIQ";
struct map_fileheader
{
uint32 mapMagic;
uint32 versionMagic;
+ uint32 buildMagic;
uint32 areaMapOffset;
uint32 areaMapSize;
uint32 heightMapOffset;
@@ -325,7 +363,7 @@ uint8 liquid_type[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE];
float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1];
-bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
+bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32 build)
{
ADT_file adt;
@@ -344,8 +382,9 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
// Prepare map header
map_fileheader map;
- map.mapMagic = MAP_MAGIC;
- map.versionMagic = MAP_VERSION_MAGIC;
+ map.mapMagic = *(uint32 const*)MAP_MAGIC;
+ map.versionMagic = *(uint32 const*)MAP_VERSION_MAGIC;
+ map.buildMagic = build;
// Get area flags data
for (int i=0;i<ADT_CELLS_PER_GRID;i++)
@@ -387,7 +426,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
map.areaMapSize = sizeof(map_areaHeader);
map_areaHeader areaHeader;
- areaHeader.fourcc = MAP_AREA_MAGIC;
+ areaHeader.fourcc = *(uint32 const*)MAP_AREA_MAGIC;
areaHeader.flags = 0;
if (fullAreaData)
{
@@ -516,7 +555,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
map.heightMapSize = sizeof(map_heightHeader);
map_heightHeader heightHeader;
- heightHeader.fourcc = MAP_HEIGHT_MAGIC;
+ heightHeader.fourcc = *(uint32 const*)MAP_HEIGHT_MAGIC;
heightHeader.flags = 0;
heightHeader.gridHeight = minHeight;
heightHeader.gridMaxHeight = maxHeight;
@@ -751,7 +790,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
}
map.liquidMapOffset = map.heightMapOffset + map.heightMapSize;
map.liquidMapSize = sizeof(map_liquidHeader);
- liquidHeader.fourcc = MAP_LIQUID_MAGIC;
+ liquidHeader.fourcc = *(uint32 const*)MAP_LIQUID_MAGIC;
liquidHeader.flags = 0;
liquidHeader.liquidType = 0;
liquidHeader.offsetX = minX;
@@ -830,7 +869,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x)
return true;
}
-void ExtractMapsFromMpq()
+void ExtractMapsFromMpq(uint32 build)
{
char mpq_filename[1024];
char output_filename[1024];
@@ -868,7 +907,7 @@ void ExtractMapsFromMpq()
continue;
sprintf(mpq_filename, "World\\Maps\\%s\\%s_%u_%u.adt", map_ids[z].name, map_ids[z].name, x, y);
sprintf(output_filename, "%s/maps/%03u%02u%02u.map", output_path, map_ids[z].id, y, x);
- ConvertADT(mpq_filename, output_filename, y, x);
+ ConvertADT(mpq_filename, output_filename, y, x, build);
}
// draw progress bar
printf("Processing........................%d%%\r", (100 * (y+1)) / WDT_MAP_SIZE);
@@ -878,11 +917,27 @@ void ExtractMapsFromMpq()
delete [] map_ids;
}
+bool ExtractFile( char const* mpq_name, std::string const& filename )
+{
+ FILE *output = fopen(filename.c_str(), "wb");
+ if(!output)
+ {
+ printf("Can't create the output file '%s'\n", filename.c_str());
+ return false;
+ }
+ MPQFile m(mpq_name);
+ if(!m.isEof())
+ fwrite(m.getPointer(), 1, m.getSize(), output);
+
+ fclose(output);
+ return true;
+}
+
void ExtractDBCFiles(int locale, bool basicLocale)
{
printf("Extracting dbc files...\n");
- set<string> dbcfiles;
+ std::set<std::string> dbcfiles;
// get DBC file list
for(ArchiveSet::iterator i = gOpenArchives.begin(); i != gOpenArchives.end();++i)
@@ -894,7 +949,7 @@ void ExtractDBCFiles(int locale, bool basicLocale)
dbcfiles.insert(*iter);
}
- string path = output_path;
+ std::string path = output_path;
path += "/dbc/";
CreateDir(path);
if(!basicLocale)
@@ -904,6 +959,14 @@ void ExtractDBCFiles(int locale, bool basicLocale)
CreateDir(path);
}
+ // extract Build info file
+ {
+ string mpq_name = std::string("component.wow-") + langs[locale] + ".txt";
+ string filename = path + mpq_name;
+
+ ExtractFile(mpq_name.c_str(), filename);
+ }
+
// extract DBCs
int count = 0;
for (set<string>::iterator iter = dbcfiles.begin(); iter != dbcfiles.end(); ++iter)
@@ -911,18 +974,8 @@ void ExtractDBCFiles(int locale, bool basicLocale)
string filename = path;
filename += (iter->c_str() + strlen("DBFilesClient\\"));
- FILE *output = fopen(filename.c_str(), "wb");
- if(!output)
- {
- printf("Can't create the output file '%s'\n", filename.c_str());
- continue;
- }
- MPQFile m(iter->c_str());
- if(!m.isEof())
- fwrite(m.getPointer(), 1, m.getSize(), output);
-
- fclose(output);
- ++count;
+ if(ExtractFile(iter->c_str(), filename))
+ ++count;
}
printf("Extracted %u DBC files\n\n", count);
}
@@ -972,6 +1025,7 @@ int main(int argc, char * arg[])
HandleArgs(argc, arg);
int FirstLocale = -1;
+ uint32 build = 0;
for (int i = 0; i < LANG_COUNT; i++)
{
@@ -987,14 +1041,18 @@ int main(int argc, char * arg[])
if((CONF_extract & EXTRACT_DBC) == 0)
{
FirstLocale = i;
+ build = ReadBuild(FirstLocale);
+ printf("Detected client build: %u\n", build);
break;
}
//Extract DBC files
if(FirstLocale < 0)
{
- ExtractDBCFiles(i, true);
FirstLocale = i;
+ build = ReadBuild(FirstLocale);
+ printf("Detected client build: %u\n", build);
+ ExtractDBCFiles(i, true);
}
else
ExtractDBCFiles(i, false);
@@ -1019,7 +1077,7 @@ int main(int argc, char * arg[])
LoadCommonMPQFiles();
// Extract maps
- ExtractMapsFromMpq();
+ ExtractMapsFromMpq(build);
// Close MPQs
CloseMPQFiles();
@@ -1027,4 +1085,3 @@ int main(int argc, char * arg[])
return 0;
}
-
diff --git a/src/tools/map_extractor/VC90_ad.vcproj b/src/tools/map_extractor/VC90/VC90_mapextractor.vcproj
index 9a039a0fbb0..3cc367f0fc8 100644
--- a/src/tools/map_extractor/VC90_ad.vcproj
+++ b/src/tools/map_extractor/VC90/VC90_mapextractor.vcproj
@@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
- Name="ad"
+ Name="mapextractor"
ProjectGUID="{D7552D4F-408F-4F8E-859B-366659150CF4}"
RootNamespace="ad"
TargetFrameworkVersion="131072"
@@ -17,10 +17,9 @@
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="."
- IntermediateDirectory=".\debug\"
+ OutputDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@@ -49,21 +48,22 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="libmpq"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+ AdditionalIncludeDirectories="..\loadlib;..\..\..\..\externals;..\..\..\..\externals\libmpq;..\..\..\..\externals\libmpq\win;..\server\shared"
+ MinimalRebuild="false"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(IntDir)ad.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(IntDir)\"
+ PrecompiledHeaderFile="$(IntDir)\ad.pch"
+ AssemblerListingLocation=""
+ ObjectFile=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ ProgramDataBaseFileName=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
XMLDocumentationFileName="$(IntDir)\"
- BrowseInformation="1"
- BrowseInformationFile="$(IntDir)"
+ BrowseInformation="0"
+ BrowseInformationFile=""
WarningLevel="3"
SuppressStartupBanner="true"
- DebugInformationFormat="4"
+ DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -78,14 +78,13 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="zlib.lib"
- OutputFile="ad debug.exe"
- LinkIncremental="0"
+ OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\$(ProjectName)_d.exe"
+ LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories="./debug/"
- IgnoreDefaultLibraryNames="LIBCD.lib"
+ AdditionalLibraryDirectories=""
+ IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
- ProgramDatabaseFile="./ad debug.pdb"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
@@ -102,6 +101,7 @@
/>
<Tool
Name="VCBscMakeTool"
+ OutputFile="$(OutDir)\$(ProjectName).bsc"
/>
<Tool
Name="VCFxCopTool"
@@ -115,10 +115,9 @@
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="."
- IntermediateDirectory=".\release"
+ OutputDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@@ -146,19 +145,23 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="3"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="libmpq"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
- RuntimeLibrary="0"
+ Optimization="2"
+ InlineFunctionExpansion="0"
+ AdditionalIncludeDirectories="..\loadlib;..\..\..\..\externals;..\..\..\..\externals\libmpq;..\..\..\..\externals\libmpq\win;..\server\shared"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(IntDir)ad.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(IntDir)\"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation=""
+ ObjectFile=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ ProgramDataBaseFileName=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
XMLDocumentationFileName="$(IntDir)\"
+ BrowseInformation="0"
WarningLevel="3"
SuppressStartupBanner="true"
+ DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -173,14 +176,16 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="zlib.lib"
- OutputFile="./ad.exe"
- LinkIncremental="0"
+ OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\$(ProjectName).exe"
+ LinkIncremental="1"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories="./release/"
- IgnoreDefaultLibraryNames="LIBC.lib"
- ProgramDatabaseFile="./ad.pdb"
+ AdditionalLibraryDirectories=""
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
@@ -216,75 +221,27 @@
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
- RelativePath=".\loadlib\loadlib.cpp"
- >
- </File>
- <File
- RelativePath=".\loadlib\adt.cpp"
- >
- </File>
- <File
- RelativePath=".\loadlib\wdt.cpp"
- >
- </File>
- <File
- RelativePath=".\libmpq\common.cpp"
- >
- </File>
- <File
- RelativePath=".\dbcfile.cpp"
- >
- </File>
- <File
- RelativePath=".\libmpq\explode.cpp"
+ RelativePath="..\adt.cpp"
>
</File>
<File
- RelativePath=".\libmpq\extract.cpp"
+ RelativePath="..\dbcfile.cpp"
>
</File>
<File
- RelativePath=".\libmpq\huffman.cpp"
+ RelativePath="..\loadlib.cpp"
>
</File>
<File
- RelativePath=".\libmpq\mpq.cpp"
+ RelativePath="..\mpq_libmpq.cpp"
>
</File>
<File
- RelativePath=".\mpq_libmpq.cpp"
+ RelativePath="..\System.cpp"
>
</File>
<File
- RelativePath=".\libmpq\parser.cpp"
- >
- </File>
- <File
- RelativePath="system.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- BrowseInformation="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\libmpq\wave.cpp"
+ RelativePath="..\wdt.cpp"
>
</File>
</Filter>
@@ -293,7 +250,7 @@
Filter="h;hpp;hxx;hm;inl"
>
<File
- RelativePath=".\libmpq\common.h"
+ RelativePath="..\adt.h"
>
</File>
<File
@@ -301,23 +258,11 @@
>
</File>
<File
- RelativePath=".\libmpq\explode.h"
- >
- </File>
- <File
- RelativePath=".\libmpq\huffman.h"
- >
- </File>
- <File
- RelativePath=".\libmpq\mpq.h"
- >
- </File>
- <File
RelativePath=".\mpq_libmpq.h"
>
</File>
<File
- RelativePath=".\libmpq\wave.h"
+ RelativePath="..\wdt.h"
>
</File>
</Filter>
diff --git a/src/tools/map_extractor/VC90_AD.sln b/src/tools/map_extractor/VC90_AD.sln
deleted file mode 100644
index 68dd66e1f7f..00000000000
--- a/src/tools/map_extractor/VC90_AD.sln
+++ /dev/null
@@ -1,19 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ad", "VC90_ad.vcproj", "{D7552D4F-408F-4F8E-859B-366659150CF4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.ActiveCfg = Debug|Win32
- {D7552D4F-408F-4F8E-859B-366659150CF4}.Debug|Win32.Build.0 = Debug|Win32
- {D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.ActiveCfg = Release|Win32
- {D7552D4F-408F-4F8E-859B-366659150CF4}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/src/tools/map_extractor/adt.cpp b/src/tools/map_extractor/adt.cpp
index fcbfc95a072..fde70681113 100644
--- a/src/tools/map_extractor/adt.cpp
+++ b/src/tools/map_extractor/adt.cpp
@@ -1,176 +1,11 @@
#define _CRT_SECURE_NO_DEPRECATE
-#ifdef WIN32
-#include <windows.h>
-#endif
-
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-#include <string>
-#include <map>
-#include <vector>
-#include <set>
-
#include "adt.h"
-#include "mpq_libmpq.h"
-
-extern uint16 *areas;
-extern uint16 *LiqType;
-extern uint32 maxAreaId;
-
-vec wmoc;
-Cell *cell;
-mcell *mcells;
+// Helper
int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888};
int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000};
-bool LoadADT(char* filename)
-{
- size_t size;
- MPQFile mf(filename);
-
- if(mf.isEof())
- {
- //printf("No such file %s\n", filename);
- return false;
- }
-
- MapLiqFlag = new uint8[256];
- for(uint32 j = 0; j < 256; ++j)
- MapLiqFlag[j] = 0; // no water
-
- MapLiqHeight = new float[16384];
- for(uint32 j = 0; j < 16384; ++j)
- MapLiqHeight[j] = -999999; // no water
-
- mcells = new mcell;
-
- wmoc.x = 65 * TILESIZE;
- wmoc.z = 65 * TILESIZE;
-
- size_t mcnk_offsets[256], mcnk_sizes[256];
-
- chunk_num = 0;
- k = 0;
- m = 0;
- while (!mf.isEof())
- {
- uint32 fourcc;
- mf.read(&fourcc, 4);
- mf.read(&size, 4);
-
- size_t nextpos = mf.getPos() + size;
-
- //if(fourcc==0x4d484452) // MHDR header
- //if(fourcc==0x4d564552) // MVER
- if(fourcc == 0x4d43494e) // MCIN
- {
- for (uint32 i = 0; i < 256; ++i)
- {
- mf.read(&mcnk_offsets[i], 4);
- mf.read(&mcnk_sizes[i], 4);
- mf.seekRelative(8);
- }
- }
- //if(fourcc == 0x4d544558) // MTEX textures (strings)
- //if(fourcc == 0x4d4d4458) // MMDX m2 models (strings)
- //if(fourcc == 0x4d4d4944) // MMID offsets for strings in MMDX
- //if(fourcc == 0x4d574d4f) // MWMO
- //if(fourcc == 0x4d574944) // MWID offsets for strings in MWMO
- //if(fourcc == 0x4d444446) // MDDF
- //if(fourcc == 0x4d4f4446) // MODF
- if(fourcc == 0x4d48324f) // MH2O new in WotLK
- {
- // çäåñ?íàäî çàïîìíèò?áàçîâó?ïîçèöè??ôàéë?òê âñ?ñìåùåí? áóäó?îò íåãî
- uint32 base_pos = mf.getPos();
- uint32 header_pos = 0;
- MH2O_offsData *LiqOffsData = new MH2O_offsData;
- MH2O_Data1 *LiqChunkData1 = new MH2O_Data1;
- float *ChunkLiqHeight = new float[81];
- for(chunk_num = 0; chunk_num < 256; ++chunk_num)
- {
- mf.read(LiqOffsData, 0x0C);
- header_pos = mf.getPos();
- if(LiqOffsData->offsData1 != 0) // åñëè äàííûå ?Data1 ?âîäå åñòü, òî èõ íàäî êîíâåðòèðîâàòü
- {
- // ïåðåõî?ïî ñìåùåíèþ èç offsData1 ÎÒ ×À?êóñê?
- mf.seek(base_pos + LiqOffsData->offsData1);
- mf.read(LiqChunkData1, 0x18); // ñ÷èòûâàå?ñàìè äàííûå ?ñòðóêòóð?òèïà MH2O_Data1
- // çàíîñè?äàííûå ôëàã?äëÿ êóñê?
- if(LiqType[LiqChunkData1->LiquidTypeId] == 0xffff)
- printf("\nCan't find Liquid type for map %s\nchunk %d\n", filename, chunk_num);
- else if(LiqType[LiqChunkData1->LiquidTypeId] == LIQUID_TYPE_WATER || LiqType[LiqChunkData1->LiquidTypeId] == LIQUID_TYPE_OCEAN)
- MapLiqFlag[chunk_num] |= 1; // water/ocean
- else if(LiqType[LiqChunkData1->LiquidTypeId] == LIQUID_TYPE_MAGMA || LiqType[LiqChunkData1->LiquidTypeId] == LIQUID_TYPE_SLIME)
- MapLiqFlag[chunk_num] |= 2; // magma/slime
- // ïðåäâàðèòåëüíî çàïîëíÿåì âåñü êóñî?äàííûì?- íå?âîäû
- for(int j = 0; j < 81; ++j)
- {
- ChunkLiqHeight[j] = -999999; // no liquid/water
- }
- // òåïåðü âû÷èñëÿåì òå ÷ò??âîäî??ïåðåçàïèñûâàåì èõ ?êóñê?
- for(int b = 0; b <= LiqChunkData1->height; ++b)
- {
- for(int c = LiqChunkData1->xOffset; c <= (LiqChunkData1->xOffset + LiqChunkData1->width); ++c)
- {
- int n = (9 * (LiqChunkData1->yOffset + b)) + c;
- ChunkLiqHeight[n] = LiqChunkData1->heightLevel1;
- }
- }
- mf.seek(header_pos); // ?íå çàáûòü âåðíóòüñÿ íà èñõîäíóþ ïîçèöè?èìåííî ?ÕÈÄÅÐÅ
- }
- else // åñëè äàííûõ ?Data1 íå? òî íàäî çàïîëíèò?âåñü êóñî? íî äàííûì?- íå?âîäû
- {
- for(int j = 0; j < 81; ++j)
- ChunkLiqHeight[j] = -999999; // no liquid/water
- }
-
- if(!(chunk_num % 16))
- m = 1024 * (chunk_num / 16); // ñìåùåíèå ïî ?äà?êóñêîâ ?ïåðåêðûòèå?= 1024
- k = m + (chunk_num % 16) * 8; // óñòàíàâëèâàåìñÿ íà íà÷àëüíû?èíäåêñ äëÿ çàïîëíåí? ?äà
- // çàíîñè?äàííûå êóñê??ìàññèâ äëÿ êàðò? ?ïåðåêðûòèå??îáðåçàíèåì êóñêîâ òê äàííûõ 81
- // ýò?àíàëîã ñòàðîã?îáðåçàíèÿ ãðàíè÷íû?ïðàâûõ-áîêîâû??íèæíèõ äàííûõ
- for(int p = 0; p < 72; p += 9) // íèæíèå 8 íå çàíîñè?òê îí?äóáëèðóåòñÿ ñëåä êóñêîì
- {
- for(int s = 0; s < 8; ++s) // 9 çíà÷åíèå ?ñòðîêå íå çàíîñè?òê îí?äóáëèðóåòñÿ ñëåä êóñêîì, ??ïðâû?áîêîâû?îáðåçàåò? äëÿ 128?28
- {
- MapLiqHeight[k] = ChunkLiqHeight[p + s];
- ++k;
- }
- k = k + 120;
- }
- }
- delete LiqOffsData;
- delete LiqChunkData1;
- delete []ChunkLiqHeight;
-
- }
- //case 0x4d434e4b: // MCNK
- //case 0x4d46424f: // MFBO new in BC
- //case 0x4d545846: // MTXF new in WotLK
- mf.seek(nextpos);
- }
-
- //printf("Loading chunks info\n");
- // read individual map chunks
- chunk_num = 0;
- k = 0;
- m = 0;
- for (int j = 0; j < 16; ++j)
- {
- for (int i = 0; i < 16; ++i)
- {
- mf.seek((int)mcnk_offsets[j * 16 + i]);
- LoadMapChunk(mf, &(mcells->ch[i][j]));
- ++chunk_num;
- }
- }
- mf.close();
- return true;
-}
-
bool isHole(int holes, int i, int j)
{
int testi = i / 2;
@@ -180,202 +15,117 @@ bool isHole(int holes, int i, int j)
return (holes & holetab_h[testi] & holetab_v[testj]) != 0;
}
-inline void LoadMapChunk(MPQFile &mf, chunk *_chunk)
+//
+// Adt file loader class
+//
+ADT_file::ADT_file()
{
- float h;
- uint32 fourcc;
- uint32 size;
- MapChunkHeader header;
-
- mf.seekRelative(4);
- mf.read(&size, 4);
-
- size_t lastpos = mf.getPos() + size;
- mf.read(&header, 0x80); // what if header size got changed?
- _chunk->area_id = header.areaid;
+ a_grid = 0;
+}
- float xbase = header.xpos;
- float ybase = header.ypos;
- float zbase = header.zpos;
- zbase = TILESIZE * 32 - zbase;
- xbase = TILESIZE * 32 - xbase;
- if(wmoc.x > xbase) wmoc.x = xbase;
- if(wmoc.z > zbase) wmoc.z = zbase;
- int chunkflags = header.flags;
- //printf("LMC: flags %X\n", chunkflags);
- float zmin = 999999999.0f;
- float zmax = -999999999.0f;
- // must be there, bl!zz uses some crazy format
- while (mf.getPos() < lastpos)
- {
- mf.read(&fourcc, 4);
- mf.read(&size, 4);
- size_t nextpos = mf.getPos() + size;
- if(fourcc == 0x4d435654) // MCVT
- {
- for (int j = 0; j < 17; ++j)
- {
- for (int i = 0; i < ((j % 2) ? 8 : 9); ++i)
- {
- mf.read(&h, 4);
- float z = h + ybase;
- if (j % 2)
- {
- if(isHole(header.holes, i, j))
- _chunk->v8[i][j / 2] = -1000;
- else
- _chunk->v8[i][j / 2] = z;
- }
- else
- {
- if(isHole(header.holes, i, j))
- _chunk->v9[i][j / 2] = -1000;
- else
- _chunk->v9[i][j / 2] = z;
- }
+ADT_file::~ADT_file()
+{
+ free();
+}
- if(z > zmax) zmax = z;
- //if(z < zmin) zmin = z;
- }
- }
- }
- else if(fourcc == 0x4d434e52) // MCNR
- {
- nextpos = mf.getPos() + 0x1C0; // size fix
- }
- else if(fourcc == 0x4d434c51) // íå áóäå?ó÷èòûâàò?åñëè óæ?áûëè äàííûå ?MH2O, ïåðåñòðàõîâê?:) // MCLQ
- {
- // liquid / water level
- char fcc1[5];
- mf.read(fcc1, 4);
- flipcc(fcc1);
- fcc1[4] = 0;
- float *ChunkLiqHeight = new float[81];
+void ADT_file::free()
+{
+ a_grid = 0;
+ FileLoader::free();
+}
- if (!strcmp(fcc1, "MCSE"))
- {
- for(int j = 0; j < 81; ++j)
- {
- ChunkLiqHeight[j] = -999999; // no liquid/water
- }
- }
- else
- {
- float maxheight;
- mf.read(&maxheight, 4);
- for(int j = 0; j < 81; ++j)
- {
- LiqData liq;
- mf.read(&liq, 8);
+//
+// Adt file check function
+//
+bool ADT_file::prepareLoadedData()
+{
+ // Check parent
+ if (!FileLoader::prepareLoadedData())
+ return false;
- if(liq.height > maxheight)
- ChunkLiqHeight[j] = -999999;
- else
- ChunkLiqHeight[j] = h;
- }
+ // Check and prepare MHDR
+ a_grid = (adt_MHDR *)(GetData()+8+version->size);
+ if (!a_grid->prepareLoadedData())
+ return false;
- if(chunkflags & 4 || chunkflags & 8)
- MapLiqFlag[chunk_num] |= 1; // water
- if(chunkflags & 16)
- MapLiqFlag[chunk_num] |= 2; // magma/slime
- }
- // àïîëíå?òà?æå êà??MH2O
- if(!(chunk_num % 16))
- m = 1024 * (chunk_num / 16);
- k = m + (chunk_num % 16) * 8;
-
- for(int p = 0; p < 72; p += 9)
- {
- for(int s = 0; s < 8; ++s)
- {
- MapLiqHeight[k] = ChunkLiqHeight[p + s];
- ++k;
- }
- k = k + 120;
- }
- delete []ChunkLiqHeight;
- break;
- }
- mf.seek(nextpos);
- }
+ return true;
}
-inline void TransformData()
+bool adt_MHDR::prepareLoadedData()
{
- cell = new Cell;
+ if (fcc != 'MHDR')
+ return false;
- for(uint32 x = 0; x < 128; ++x)
- {
- for(uint32 y = 0; y < 128; ++y)
- {
- cell->v8[y][x] = (float)mcells->ch[x / 8][y / 8].v8[x % 8][y % 8];
- cell->v9[y][x] = (float)mcells->ch[x / 8][y / 8].v9[x % 8][y % 8];
- }
+ if (size!=sizeof(adt_MHDR)-8)
+ return false;
- // extra 1 point on bounds
- cell->v9[128][x] = (float)mcells->ch[x / 8][15].v9[x % 8][8];
- // x == y
- cell->v9[x][128] = (float)mcells->ch[15][x / 8].v9[8][x % 8];
- }
+ // Check and prepare MCIN
+ if (offsMCIN && !getMCIN()->prepareLoadedData())
+ return false;
- // and the last 1
- cell->v9[128][128] = (float)mcells->ch[15][15].v9[8][8];
+ // Check and prepare MH2O
+ if (offsMH2O && !getMH2O()->prepareLoadedData())
+ return false;
- delete mcells;
+ return true;
}
-const char MAP_MAGIC[] = "MAP_3.00";
-
-bool ConvertADT(char *filename, char *filename2)
+bool adt_MCIN::prepareLoadedData()
{
- if(!LoadADT(filename))
+ if (fcc != 'MCIN')
return false;
- FILE *output=fopen(filename2, "wb");
- if(!output)
- {
- printf("Can't create the output file '%s'\n", filename2);
- delete [] MapLiqHeight;
- delete [] MapLiqFlag;
+ // Check cells data
+ for (int i=0; i<ADT_CELLS_PER_GRID;i++)
+ for (int j=0; j<ADT_CELLS_PER_GRID;j++)
+ if (cells[i][j].offsMCNK && !getMCNK(i,j)->prepareLoadedData())
+ return false;
+
+ return true;
+}
+
+bool adt_MH2O::prepareLoadedData()
+{
+ if (fcc != 'MH2O')
return false;
- }
- // write magic header
- fwrite(MAP_MAGIC, 1, 8, output);
+ // Check liquid data
+// for (int i=0; i<ADT_CELLS_PER_GRID;i++)
+// for (int j=0; j<ADT_CELLS_PER_GRID;j++)
- for(uint32 x = 0; x < 16; ++x)
- {
- for(uint32 y = 0; y < 16; ++y)
- {
- if(mcells->ch[y][x].area_id && mcells->ch[y][x].area_id <= maxAreaId)
- {
- if(areas[mcells->ch[y][x].area_id] == 0xffff)
- printf("\nCan't find area flag for areaid %u.\n", mcells->ch[y][x].area_id);
+ return true;
+}
- fwrite(&areas[mcells->ch[y][x].area_id], 1, 2, output);
- }
- else
- {
- uint16 flag = 0xffff;
- fwrite(&flag, 1, 2, output);
- }
- }
- }
+bool adt_MCNK::prepareLoadedData()
+{
+ if (fcc != 'MCNK')
+ return false;
- fwrite(MapLiqFlag, 1, 256, output);
- delete [] MapLiqFlag;
+ // Check height map
+ if (offsMCVT && !getMCVT()->prepareLoadedData())
+ return false;
+ // Check liquid data
+ if (offsMCLQ && !getMCLQ()->prepareLoadedData())
+ return false;
- fwrite(MapLiqHeight, sizeof(float), 16384, output);
- delete [] MapLiqHeight;
+ return true;
+}
- TransformData();
+bool adt_MCVT::prepareLoadedData()
+{
+ if (fcc != 'MCVT')
+ return false;
+ if (size != sizeof(adt_MCVT)-8)
+ return false;
- fwrite(&cell->v9, 1, sizeof(cell->v9), output);
- fwrite(&cell->v8, 1, sizeof(cell->v8), output);
- fclose(output);
- delete cell;
-
return true;
}
+bool adt_MCLQ::prepareLoadedData()
+{
+ if (fcc != 'MCLQ')
+ return false;
+
+ return true;
+} \ No newline at end of file
diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h
index 516ed88a86e..725c5b994ee 100644
--- a/src/tools/map_extractor/adt.h
+++ b/src/tools/map_extractor/adt.h
@@ -1,130 +1,289 @@
#ifndef ADT_H
#define ADT_H
+#include "loadlib.h"
+
#define TILESIZE (533.33333f)
#define CHUNKSIZE ((TILESIZE) / 16.0f)
#define UNITSIZE (CHUNKSIZE / 8.0f)
-typedef unsigned char uint8;
-typedef unsigned short uint16;
-typedef unsigned int uint32;
-class Liquid;
-typedef struct
-{
- float x;
- float y;
- float z;
-} svec;
-
-typedef struct
+enum LiquidType
{
- double x;
- double y;
- double z;
-} vec;
+ LIQUID_TYPE_WATER = 0,
+ LIQUID_TYPE_OCEAN = 1,
+ LIQUID_TYPE_MAGMA = 2,
+ LIQUID_TYPE_SLIME = 3
+};
-typedef struct
-{
- vec v[3];
-} triangle;
+//**************************************************************************************
+// ADT file class
+//**************************************************************************************
+#define ADT_CELLS_PER_GRID 16
+#define ADT_CELL_SIZE 8
+#define ADT_GRID_SIZE (ADT_CELLS_PER_GRID*ADT_CELL_SIZE)
-typedef struct
+//
+// Adt file height map chunk
+//
+class adt_MCVT
{
- float v9[16 * 8 + 1][16 * 8 + 1];
- float v8[16 * 8][16 * 8];
-} Cell;
+ union{
+ uint32 fcc;
+ char fcc_txt[4];
+ };
+ uint32 size;
+public:
+ float height_map[(ADT_CELL_SIZE+1)*(ADT_CELL_SIZE+1)+ADT_CELL_SIZE*ADT_CELL_SIZE];
-typedef struct
-{
- double v9[9][9];
- double v8[8][8];
- uint16 area_id;
-} chunk;
+ bool prepareLoadedData();
+};
-typedef struct
+//
+// Adt file liquid map chunk (old)
+//
+class adt_MCLQ
{
- chunk ch[16][16];
-} mcell;
+ union{
+ uint32 fcc;
+ char fcc_txt[4];
+ };
+ uint32 size;
+public:
+ float height1;
+ float height2;
+ struct liquid_data{
+ uint32 light;
+ float height;
+ } liquid[ADT_CELL_SIZE+1][ADT_CELL_SIZE+1];
+
+ // 1<<0 - ochen
+ // 1<<1 - lava/slime
+ // 1<<2 - water
+ // 1<<6 - all water
+ // 1<<7 - dark water
+ // == 0x0F - not show liquid
+ uint8 flags[ADT_CELL_SIZE][ADT_CELL_SIZE];
+ uint8 data[84];
+ bool prepareLoadedData();
+};
-struct MapChunkHeader
+//
+// Adt file cell chunk
+//
+class adt_MCNK
{
+ union{
+ uint32 fcc;
+ char fcc_txt[4];
+ };
+ uint32 size;
+public:
uint32 flags;
uint32 ix;
uint32 iy;
uint32 nLayers;
uint32 nDoodadRefs;
- uint32 ofsHeight;
- uint32 ofsNormal;
- uint32 ofsLayer;
- uint32 ofsRefs;
- uint32 ofsAlpha;
- uint32 sizeAlpha;
- uint32 ofsShadow;
- uint32 sizeShadow;
+ uint32 offsMCVT; // height map
+ uint32 offsMCNR; // Normal vectors for each vertex
+ uint32 offsMCLY; // Texture layer definitions
+ uint32 offsMCRF; // A list of indices into the parent file's MDDF chunk
+ uint32 offsMCAL; // Alpha maps for additional texture layers
+ uint32 sizeMCAL;
+ uint32 offsMCSH; // Shadow map for static shadows on the terrain
+ uint32 sizeMCSH;
uint32 areaid;
uint32 nMapObjRefs;
uint32 holes;
- uint16 s1;
- uint16 s2;
- uint32 d1;
- uint32 d2;
- uint32 d3;
+ uint16 s[2];
+ uint32 data1;
+ uint32 data2;
+ uint32 data3;
uint32 predTex;
uint32 nEffectDoodad;
- uint32 ofsSndEmitters;
+ uint32 offsMCSE;
uint32 nSndEmitters;
- uint32 ofsLiquid; // not use in WotLK
- uint32 sizeLiquid; // not use in WotLK
+ uint32 offsMCLQ; // Liqid level (old)
+ uint32 sizeMCLQ; //
float zpos;
float xpos;
float ypos;
- uint32 textureId; // new offsColorValues in WotLK
+ uint32 offsMCCV; // offsColorValues in WotLK
uint32 props;
uint32 effectId;
+
+ bool prepareLoadedData();
+ adt_MCVT *getMCVT()
+ {
+ if (offsMCVT)
+ return (adt_MCVT *)((uint8 *)this + offsMCVT);
+ return 0;
+ }
+ adt_MCLQ *getMCLQ()
+ {
+ if (offsMCLQ)
+ return (adt_MCLQ *)((uint8 *)this + offsMCLQ);
+ return 0;
+ }
};
-typedef struct
+//
+// Adt file grid chunk
+//
+class adt_MCIN
{
- uint32 offsData1;
- uint32 used;
- uint32 offsData2;
-} MH2O_offsData;
+ union{
+ uint32 fcc;
+ char fcc_txt[4];
+ };
+ uint32 size;
+public:
+ struct adt_CELLS{
+ uint32 offsMCNK;
+ uint32 size;
+ uint32 flags;
+ uint32 asyncId;
+ } cells[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
-typedef struct
-{
- uint16 LiquidTypeId;
- uint16 type;
- float heightLevel1;
- float heightLevel2;
- uint8 xOffset;
- uint8 yOffset;
- uint8 width;
- uint8 height;
- uint32 ofsData2a;
- uint32 ofsData2b;
-} MH2O_Data1;
-
-typedef struct
-{
- uint16 unk1;
- uint16 unk2;
- float height;
-} LiqData;
+ bool prepareLoadedData();
+ // offset from begin file (used this-84)
+ adt_MCNK *getMCNK(int x, int y)
+ {
+ if (cells[x][y].offsMCNK)
+ return (adt_MCNK *)((uint8 *)this + cells[x][y].offsMCNK - 84);
+ return 0;
+ }
+};
-enum LiquidType
+#define ADT_LIQUID_HEADER_FULL_LIGHT 0x01
+#define ADT_LIQUID_HEADER_NO_HIGHT 0x02
+
+struct adt_liquid_header{
+ uint16 liquidType; // Index from LiquidType.dbc
+ uint16 formatFlags;
+ float heightLevel1;
+ float heightLevel2;
+ uint8 xOffset;
+ uint8 yOffset;
+ uint8 width;
+ uint8 height;
+ uint32 offsData2a;
+ uint32 offsData2b;
+};
+
+//
+// Adt file liquid data chunk (new)
+//
+class adt_MH2O
{
- LIQUID_TYPE_WATER = 0,
- LIQUID_TYPE_OCEAN = 1,
- LIQUID_TYPE_MAGMA = 2,
- LIQUID_TYPE_SLIME = 3
+public:
+ union{
+ uint32 fcc;
+ char fcc_txt[4];
+ };
+ uint32 size;
+
+ struct adt_LIQUID{
+ uint32 offsData1;
+ uint32 used;
+ uint32 offsData2;
+ } liquid[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
+
+ bool prepareLoadedData();
+
+ adt_liquid_header *getLiquidData(int x, int y)
+ {
+ if (liquid[x][y].used && liquid[x][y].offsData1)
+ return (adt_liquid_header *)((uint8*)this + 8 + liquid[x][y].offsData1);
+ return 0;
+ }
+
+ float *getLiquidHeightMap(adt_liquid_header *h)
+ {
+ if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
+ return 0;
+ if (h->offsData2b)
+ return (float *)((uint8*)this + 8 + h->offsData2b);
+ return 0;
+ }
+
+ uint8 *getLiquidLightMap(adt_liquid_header *h)
+ {
+ if (h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT)
+ return 0;
+ if (h->offsData2b)
+ {
+ if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
+ return (uint8 *)((uint8*)this + 8 + h->offsData2b);
+ return (uint8 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4);
+ }
+ return 0;
+ }
+
+ uint32 *getLiquidFullLightMap(adt_liquid_header *h)
+ {
+ if (!(h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT))
+ return 0;
+ if (h->offsData2b)
+ {
+ if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
+ return (uint32 *)((uint8*)this + 8 + h->offsData2b);
+ return (uint32 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4);
+ }
+ return 0;
+ }
+
+ uint64 getLiquidShowMap(adt_liquid_header *h)
+ {
+ if (h->offsData2a)
+ return *((uint64 *)((uint8*)this + 8 + h->offsData2a));
+ else
+ return 0xFFFFFFFFFFFFFFFFLL;
+ }
+
};
-class MPQFile;
+//
+// Adt file header chunk
+//
+class adt_MHDR
+{
+ union{
+ uint32 fcc;
+ char fcc_txt[4];
+ };
+ uint32 size;
-float *MapLiqHeight;
-uint8 *MapLiqFlag;
-uint32 k, m, chunk_num;
-void LoadMapChunk(MPQFile &, chunk*);
-#endif
+ uint32 pad;
+ uint32 offsMCIN; // MCIN
+ uint32 offsTex; // MTEX
+ uint32 offsModels; // MMDX
+ uint32 offsModelsIds; // MMID
+ uint32 offsMapObejcts; // MWMO
+ uint32 offsMapObejctsIds; // MWID
+ uint32 offsDoodsDef; // MDDF
+ uint32 offsObjectsDef; // MODF
+ uint32 offsMFBO; // MFBO
+ uint32 offsMH2O; // MH2O
+ uint32 data1;
+ uint32 data2;
+ uint32 data3;
+ uint32 data4;
+ uint32 data5;
+public:
+ bool prepareLoadedData();
+ adt_MCIN *getMCIN(){ return (adt_MCIN *)((uint8 *)&pad+offsMCIN);}
+ adt_MH2O *getMH2O(){ return offsMH2O ? (adt_MH2O *)((uint8 *)&pad+offsMH2O) : 0;}
+};
+
+class ADT_file : public FileLoader{
+public:
+ bool prepareLoadedData();
+ ADT_file();
+ ~ADT_file();
+ void free();
+ adt_MHDR *a_grid;
+};
+
+#endif
diff --git a/src/tools/map_extractor/dbcfile.cpp b/src/tools/map_extractor/dbcfile.cpp
index dd58ac1b4a6..927d3d62b7f 100644
--- a/src/tools/map_extractor/dbcfile.cpp
+++ b/src/tools/map_extractor/dbcfile.cpp
@@ -1,7 +1,7 @@
#define _CRT_SECURE_NO_DEPRECATE
#include "dbcfile.h"
-#include "mpq_libmpq.h"
+#include "mpq_libmpq04.h"
DBCFile::DBCFile(const std::string &filename):
filename(filename),
diff --git a/src/tools/map_extractor/loadlib/loadlib.cpp b/src/tools/map_extractor/loadlib.cpp
index ed5bd9acb71..465eb04083f 100644
--- a/src/tools/map_extractor/loadlib/loadlib.cpp
+++ b/src/tools/map_extractor/loadlib.cpp
@@ -1,7 +1,8 @@
#define _CRT_SECURE_NO_DEPRECATE
#include "loadlib.h"
-#include "../mpq_libmpq.h"
+#include "mpq_libmpq04.h"
+#include <cstdio>
class MPQFile;
@@ -61,4 +62,4 @@ void FileLoader::free()
data = 0;
data_size = 0;
version = 0;
-} \ No newline at end of file
+}
diff --git a/src/tools/map_extractor/loadlib/CMakeLists.txt b/src/tools/map_extractor/loadlib/CMakeLists.txt
deleted file mode 100644
index 5680c61d424..00000000000
--- a/src/tools/map_extractor/loadlib/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/>
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-add_library (loadlib loadlib.cpp adt.cpp wdt.cpp)
-# link loadlib with zlib
-target_link_libraries (loadlib z)
diff --git a/src/tools/map_extractor/loadlib/adt.cpp b/src/tools/map_extractor/loadlib/adt.cpp
deleted file mode 100644
index fde70681113..00000000000
--- a/src/tools/map_extractor/loadlib/adt.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-#define _CRT_SECURE_NO_DEPRECATE
-
-#include "adt.h"
-
-// Helper
-int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888};
-int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000};
-
-bool isHole(int holes, int i, int j)
-{
- int testi = i / 2;
- int testj = j / 4;
- if(testi > 3) testi = 3;
- if(testj > 3) testj = 3;
- return (holes & holetab_h[testi] & holetab_v[testj]) != 0;
-}
-
-//
-// Adt file loader class
-//
-ADT_file::ADT_file()
-{
- a_grid = 0;
-}
-
-ADT_file::~ADT_file()
-{
- free();
-}
-
-void ADT_file::free()
-{
- a_grid = 0;
- FileLoader::free();
-}
-
-//
-// Adt file check function
-//
-bool ADT_file::prepareLoadedData()
-{
- // Check parent
- if (!FileLoader::prepareLoadedData())
- return false;
-
- // Check and prepare MHDR
- a_grid = (adt_MHDR *)(GetData()+8+version->size);
- if (!a_grid->prepareLoadedData())
- return false;
-
- return true;
-}
-
-bool adt_MHDR::prepareLoadedData()
-{
- if (fcc != 'MHDR')
- return false;
-
- if (size!=sizeof(adt_MHDR)-8)
- return false;
-
- // Check and prepare MCIN
- if (offsMCIN && !getMCIN()->prepareLoadedData())
- return false;
-
- // Check and prepare MH2O
- if (offsMH2O && !getMH2O()->prepareLoadedData())
- return false;
-
- return true;
-}
-
-bool adt_MCIN::prepareLoadedData()
-{
- if (fcc != 'MCIN')
- return false;
-
- // Check cells data
- for (int i=0; i<ADT_CELLS_PER_GRID;i++)
- for (int j=0; j<ADT_CELLS_PER_GRID;j++)
- if (cells[i][j].offsMCNK && !getMCNK(i,j)->prepareLoadedData())
- return false;
-
- return true;
-}
-
-bool adt_MH2O::prepareLoadedData()
-{
- if (fcc != 'MH2O')
- return false;
-
- // Check liquid data
-// for (int i=0; i<ADT_CELLS_PER_GRID;i++)
-// for (int j=0; j<ADT_CELLS_PER_GRID;j++)
-
- return true;
-}
-
-bool adt_MCNK::prepareLoadedData()
-{
- if (fcc != 'MCNK')
- return false;
-
- // Check height map
- if (offsMCVT && !getMCVT()->prepareLoadedData())
- return false;
- // Check liquid data
- if (offsMCLQ && !getMCLQ()->prepareLoadedData())
- return false;
-
- return true;
-}
-
-bool adt_MCVT::prepareLoadedData()
-{
- if (fcc != 'MCVT')
- return false;
-
- if (size != sizeof(adt_MCVT)-8)
- return false;
-
- return true;
-}
-
-bool adt_MCLQ::prepareLoadedData()
-{
- if (fcc != 'MCLQ')
- return false;
-
- return true;
-} \ No newline at end of file
diff --git a/src/tools/map_extractor/loadlib/adt.h b/src/tools/map_extractor/loadlib/adt.h
deleted file mode 100644
index 725c5b994ee..00000000000
--- a/src/tools/map_extractor/loadlib/adt.h
+++ /dev/null
@@ -1,289 +0,0 @@
-#ifndef ADT_H
-#define ADT_H
-
-#include "loadlib.h"
-
-#define TILESIZE (533.33333f)
-#define CHUNKSIZE ((TILESIZE) / 16.0f)
-#define UNITSIZE (CHUNKSIZE / 8.0f)
-
-enum LiquidType
-{
- LIQUID_TYPE_WATER = 0,
- LIQUID_TYPE_OCEAN = 1,
- LIQUID_TYPE_MAGMA = 2,
- LIQUID_TYPE_SLIME = 3
-};
-
-//**************************************************************************************
-// ADT file class
-//**************************************************************************************
-#define ADT_CELLS_PER_GRID 16
-#define ADT_CELL_SIZE 8
-#define ADT_GRID_SIZE (ADT_CELLS_PER_GRID*ADT_CELL_SIZE)
-
-//
-// Adt file height map chunk
-//
-class adt_MCVT
-{
- union{
- uint32 fcc;
- char fcc_txt[4];
- };
- uint32 size;
-public:
- float height_map[(ADT_CELL_SIZE+1)*(ADT_CELL_SIZE+1)+ADT_CELL_SIZE*ADT_CELL_SIZE];
-
- bool prepareLoadedData();
-};
-
-//
-// Adt file liquid map chunk (old)
-//
-class adt_MCLQ
-{
- union{
- uint32 fcc;
- char fcc_txt[4];
- };
- uint32 size;
-public:
- float height1;
- float height2;
- struct liquid_data{
- uint32 light;
- float height;
- } liquid[ADT_CELL_SIZE+1][ADT_CELL_SIZE+1];
-
- // 1<<0 - ochen
- // 1<<1 - lava/slime
- // 1<<2 - water
- // 1<<6 - all water
- // 1<<7 - dark water
- // == 0x0F - not show liquid
- uint8 flags[ADT_CELL_SIZE][ADT_CELL_SIZE];
- uint8 data[84];
- bool prepareLoadedData();
-};
-
-//
-// Adt file cell chunk
-//
-class adt_MCNK
-{
- union{
- uint32 fcc;
- char fcc_txt[4];
- };
- uint32 size;
-public:
- uint32 flags;
- uint32 ix;
- uint32 iy;
- uint32 nLayers;
- uint32 nDoodadRefs;
- uint32 offsMCVT; // height map
- uint32 offsMCNR; // Normal vectors for each vertex
- uint32 offsMCLY; // Texture layer definitions
- uint32 offsMCRF; // A list of indices into the parent file's MDDF chunk
- uint32 offsMCAL; // Alpha maps for additional texture layers
- uint32 sizeMCAL;
- uint32 offsMCSH; // Shadow map for static shadows on the terrain
- uint32 sizeMCSH;
- uint32 areaid;
- uint32 nMapObjRefs;
- uint32 holes;
- uint16 s[2];
- uint32 data1;
- uint32 data2;
- uint32 data3;
- uint32 predTex;
- uint32 nEffectDoodad;
- uint32 offsMCSE;
- uint32 nSndEmitters;
- uint32 offsMCLQ; // Liqid level (old)
- uint32 sizeMCLQ; //
- float zpos;
- float xpos;
- float ypos;
- uint32 offsMCCV; // offsColorValues in WotLK
- uint32 props;
- uint32 effectId;
-
- bool prepareLoadedData();
- adt_MCVT *getMCVT()
- {
- if (offsMCVT)
- return (adt_MCVT *)((uint8 *)this + offsMCVT);
- return 0;
- }
- adt_MCLQ *getMCLQ()
- {
- if (offsMCLQ)
- return (adt_MCLQ *)((uint8 *)this + offsMCLQ);
- return 0;
- }
-};
-
-//
-// Adt file grid chunk
-//
-class adt_MCIN
-{
- union{
- uint32 fcc;
- char fcc_txt[4];
- };
- uint32 size;
-public:
- struct adt_CELLS{
- uint32 offsMCNK;
- uint32 size;
- uint32 flags;
- uint32 asyncId;
- } cells[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
-
- bool prepareLoadedData();
- // offset from begin file (used this-84)
- adt_MCNK *getMCNK(int x, int y)
- {
- if (cells[x][y].offsMCNK)
- return (adt_MCNK *)((uint8 *)this + cells[x][y].offsMCNK - 84);
- return 0;
- }
-};
-
-#define ADT_LIQUID_HEADER_FULL_LIGHT 0x01
-#define ADT_LIQUID_HEADER_NO_HIGHT 0x02
-
-struct adt_liquid_header{
- uint16 liquidType; // Index from LiquidType.dbc
- uint16 formatFlags;
- float heightLevel1;
- float heightLevel2;
- uint8 xOffset;
- uint8 yOffset;
- uint8 width;
- uint8 height;
- uint32 offsData2a;
- uint32 offsData2b;
-};
-
-//
-// Adt file liquid data chunk (new)
-//
-class adt_MH2O
-{
-public:
- union{
- uint32 fcc;
- char fcc_txt[4];
- };
- uint32 size;
-
- struct adt_LIQUID{
- uint32 offsData1;
- uint32 used;
- uint32 offsData2;
- } liquid[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
-
- bool prepareLoadedData();
-
- adt_liquid_header *getLiquidData(int x, int y)
- {
- if (liquid[x][y].used && liquid[x][y].offsData1)
- return (adt_liquid_header *)((uint8*)this + 8 + liquid[x][y].offsData1);
- return 0;
- }
-
- float *getLiquidHeightMap(adt_liquid_header *h)
- {
- if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
- return 0;
- if (h->offsData2b)
- return (float *)((uint8*)this + 8 + h->offsData2b);
- return 0;
- }
-
- uint8 *getLiquidLightMap(adt_liquid_header *h)
- {
- if (h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT)
- return 0;
- if (h->offsData2b)
- {
- if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
- return (uint8 *)((uint8*)this + 8 + h->offsData2b);
- return (uint8 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4);
- }
- return 0;
- }
-
- uint32 *getLiquidFullLightMap(adt_liquid_header *h)
- {
- if (!(h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT))
- return 0;
- if (h->offsData2b)
- {
- if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
- return (uint32 *)((uint8*)this + 8 + h->offsData2b);
- return (uint32 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4);
- }
- return 0;
- }
-
- uint64 getLiquidShowMap(adt_liquid_header *h)
- {
- if (h->offsData2a)
- return *((uint64 *)((uint8*)this + 8 + h->offsData2a));
- else
- return 0xFFFFFFFFFFFFFFFFLL;
- }
-
-};
-
-//
-// Adt file header chunk
-//
-class adt_MHDR
-{
- union{
- uint32 fcc;
- char fcc_txt[4];
- };
- uint32 size;
-
- uint32 pad;
- uint32 offsMCIN; // MCIN
- uint32 offsTex; // MTEX
- uint32 offsModels; // MMDX
- uint32 offsModelsIds; // MMID
- uint32 offsMapObejcts; // MWMO
- uint32 offsMapObejctsIds; // MWID
- uint32 offsDoodsDef; // MDDF
- uint32 offsObjectsDef; // MODF
- uint32 offsMFBO; // MFBO
- uint32 offsMH2O; // MH2O
- uint32 data1;
- uint32 data2;
- uint32 data3;
- uint32 data4;
- uint32 data5;
-public:
- bool prepareLoadedData();
- adt_MCIN *getMCIN(){ return (adt_MCIN *)((uint8 *)&pad+offsMCIN);}
- adt_MH2O *getMH2O(){ return offsMH2O ? (adt_MH2O *)((uint8 *)&pad+offsMH2O) : 0;}
-
-};
-
-class ADT_file : public FileLoader{
-public:
- bool prepareLoadedData();
- ADT_file();
- ~ADT_file();
- void free();
-
- adt_MHDR *a_grid;
-};
-
-#endif
diff --git a/src/tools/map_extractor/loadlib/loadlib.h b/src/tools/map_extractor/loadlib/loadlib.h
index 6acfd107ec7..49d5f590744 100644
--- a/src/tools/map_extractor/loadlib/loadlib.h
+++ b/src/tools/map_extractor/loadlib/loadlib.h
@@ -1,28 +1,30 @@
#ifndef LOAD_LIB_H
#define LOAD_LIB_H
-#ifdef WIN32
+#ifdef _WIN32
typedef __int64 int64;
-typedef long int32;
-typedef short int16;
-typedef char int8;
+typedef __int32 int32;
+typedef __int16 int16;
+typedef __int8 int8;
typedef unsigned __int64 uint64;
-typedef unsigned long uint32;
-typedef unsigned short uint16;
-typedef unsigned char uint8;
+typedef unsigned __int32 uint32;
+typedef unsigned __int16 uint16;
+typedef unsigned __int8 uint8;
#else
#include <stdint.h>
#ifndef uint64_t
+#ifdef __linux__
#include <linux/types.h>
#endif
+#endif
typedef int64_t int64;
-typedef long int32;
-typedef short int16;
-typedef char int8;
+typedef int32_t int32;
+typedef int16_t int16;
+typedef int8_t int8;
typedef uint64_t uint64;
-typedef unsigned long uint32;
-typedef unsigned short uint16;
-typedef unsigned char uint8;
+typedef uint32_t uint32;
+typedef uint16_t uint16;
+typedef uint8_t uint8;
#endif
#define FILE_FORMAT_VERSION 18
diff --git a/src/tools/map_extractor/mpq_libmpq.cpp b/src/tools/map_extractor/mpq_libmpq.cpp
index 2a066a83b34..81aa8cc2894 100644
--- a/src/tools/map_extractor/mpq_libmpq.cpp
+++ b/src/tools/map_extractor/mpq_libmpq.cpp
@@ -1,44 +1,30 @@
-#include "mpq_libmpq.h"
+#include "mpq_libmpq04.h"
#include <deque>
+#include <cstdio>
ArchiveSet gOpenArchives;
MPQArchive::MPQArchive(const char* filename)
{
- int result = libmpq_archive_open(&mpq_a, (unsigned char*)filename);
+ int result = libmpq__archive_open(&mpq_a, filename, -1);
printf("Opening %s\n", filename);
if(result) {
switch(result) {
- case LIBMPQ_EFILE : /* error on file operation */
- printf("Error opening archive '%s': File operation Error\n", filename);
+ case LIBMPQ_ERROR_OPEN :
+ printf("Error opening archive '%s': Does file really exist?\n", filename);
break;
- case LIBMPQ_EFILE_FORMAT : /* bad file format */
+ case LIBMPQ_ERROR_FORMAT : /* bad file format */
printf("Error opening archive '%s': Bad file format\n", filename);
break;
- case LIBMPQ_EFILE_CORRUPT : /* file corrupt */
- printf("Error opening archive '%s': File corrupt\n", filename);
+ case LIBMPQ_ERROR_SEEK : /* seeking in file failed */
+ printf("Error opening archive '%s': Seeking in file failed\n", filename);
break;
- case LIBMPQ_EFILE_NOT_FOUND : /* file in archive not found */
- printf("Error opening archive '%s': File in archive not found\n", filename);
- break;
- case LIBMPQ_EFILE_READ : /* Read error in archive */
+ case LIBMPQ_ERROR_READ : /* Read error in archive */
printf("Error opening archive '%s': Read error in archive\n", filename);
break;
- case LIBMPQ_EALLOCMEM : /* maybe not enough memory? :) */
+ case LIBMPQ_ERROR_MALLOC : /* maybe not enough memory? :) */
printf("Error opening archive '%s': Maybe not enough memory\n", filename);
break;
- case LIBMPQ_EFREEMEM : /* can not free memory */
- printf("Error opening archive '%s': Cannot free memory\n", filename);
- break;
- case LIBMPQ_EINV_RANGE : /* Given filenumber is out of range */
- printf("Error opening archive '%s': Given filenumber is out of range\n", filename);
- break;
- case LIBMPQ_EHASHTABLE : /* error in reading hashtable */
- printf("Error opening archive '%s': Error in reading hashtable\n", filename);
- break;
- case LIBMPQ_EBLOCKTABLE : /* error in reading blocktable */
- printf("Error opening archive '%s': Error in reading blocktable\n", filename);
- break;
default:
printf("Error opening archive '%s': Unknown error\n", filename);
break;
@@ -51,7 +37,7 @@ MPQArchive::MPQArchive(const char* filename)
void MPQArchive::close()
{
//gOpenArchives.erase(erase(&mpq_a);
- libmpq_archive_close(&mpq_a);
+ libmpq__archive_close(mpq_a);
}
MPQFile::MPQFile(const char* filename):
@@ -62,25 +48,16 @@ MPQFile::MPQFile(const char* filename):
{
for(ArchiveSet::iterator i=gOpenArchives.begin(); i!=gOpenArchives.end();++i)
{
- mpq_archive &mpq_a = (*i)->mpq_a;
+ mpq_archive *mpq_a = (*i)->mpq_a;
- mpq_hash hash = (*i)->GetHashEntry(filename);
- uint32 blockindex = hash.blockindex;
+ uint32_t filenum;
+ if(libmpq__file_number(mpq_a, filename, &filenum)) continue;
+ libmpq__off_t transferred;
+ libmpq__file_unpacked_size(mpq_a, filenum, &size);
- if ((blockindex == 0xFFFFFFFF) || (blockindex == 0)) {
- continue; //file not found
- }
-
- uint32 fileno = blockindex;
-
- //int fileno = libmpq_file_number(&mpq_a, filename);
- //if(fileno == LIBMPQ_EFILE_NOT_FOUND)
- // continue;
-
- // Found!
- size = libmpq_file_info(&mpq_a, LIBMPQ_FILE_UNCOMPRESSED_SIZE, fileno);
// HACK: in patch.mpq some files don't want to open and give 1 for filesize
if (size<=1) {
+// printf("warning: file %s has size %d; cannot read.\n", filename, size);
eof = true;
buffer = 0;
return;
@@ -88,7 +65,8 @@ MPQFile::MPQFile(const char* filename):
buffer = new char[size];
//libmpq_file_getdata
- libmpq_file_getdata(&mpq_a, hash, fileno, (unsigned char*)buffer);
+ libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
+ /*libmpq_file_getdata(&mpq_a, hash, fileno, (unsigned char*)buffer);*/
return;
}
@@ -131,4 +109,3 @@ void MPQFile::close()
buffer = 0;
eof = true;
}
-
diff --git a/src/tools/map_extractor/mpq_libmpq.h b/src/tools/map_extractor/mpq_libmpq04.h
index d61cda7f919..26008f5fba1 100644
--- a/src/tools/map_extractor/mpq_libmpq.h
+++ b/src/tools/map_extractor/mpq_libmpq04.h
@@ -18,50 +18,20 @@ class MPQArchive
{
public:
- mpq_archive mpq_a;
+ mpq_archive_s *mpq_a;
MPQArchive(const char* filename);
void close();
- uint32 HashString(const char* Input, uint32 Offset) {
- uint32 seed1 = 0x7fed7fed;
- uint32 seed2 = 0xeeeeeeee;
-
- for (uint32 i = 0; i < strlen(Input); i++) {
- uint32 val = toupper(Input[i]);
- seed1 = mpq_a.buf[Offset + val] ^ (seed1 + seed2);
- seed2 = val + seed1 + seed2 + (seed2 << 5) + 3;
- }
-
- return seed1;
- }
- mpq_hash GetHashEntry(const char* Filename) {
- uint32 index = HashString(Filename, 0);
- index &= mpq_a.header->hashtablesize - 1;
- uint32 name1 = HashString(Filename, 0x100);
- uint32 name2 = HashString(Filename, 0x200);
-
- for(uint32 i = index; i < mpq_a.header->hashtablesize; ++i) {
- mpq_hash hash = mpq_a.hashtable[i];
- if (hash.name1 == name1 && hash.name2 == name2) return hash;
- }
-
- mpq_hash nullhash;
- nullhash.blockindex = 0xFFFFFFFF;
- return nullhash;
- }
-
void GetFileListTo(vector<string>& filelist) {
- mpq_hash hash = GetHashEntry("(listfile)");
- uint32 blockindex = hash.blockindex;
-
- if ((blockindex == 0xFFFFFFFF) || (blockindex == 0))
- return;
+ uint32_t filenum;
+ if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return;
+ libmpq__off_t size, transferred;
+ libmpq__file_unpacked_size(mpq_a, filenum, &size);
- uint32 size = libmpq_file_info(&mpq_a, LIBMPQ_FILE_UNCOMPRESSED_SIZE, blockindex);
char *buffer = new char[size];
-
- libmpq_file_getdata(&mpq_a, hash, blockindex, (unsigned char*)buffer);
+
+ libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
char seps[] = "\n";
char *token;
@@ -87,7 +57,7 @@ class MPQFile
//MPQHANDLE handle;
bool eof;
char *buffer;
- size_t pointer,size;
+ libmpq__off_t pointer,size;
// disable copying
MPQFile(const MPQFile &f) {}
@@ -119,4 +89,3 @@ inline void flipcc(char *fcc)
}
#endif
-
diff --git a/src/tools/map_extractor/loadlib/wdt.cpp b/src/tools/map_extractor/wdt.cpp
index dedefbb64e5..dedefbb64e5 100644
--- a/src/tools/map_extractor/loadlib/wdt.cpp
+++ b/src/tools/map_extractor/wdt.cpp
diff --git a/src/tools/map_extractor/loadlib/wdt.h b/src/tools/map_extractor/wdt.h
index fcee8ac64f2..fcee8ac64f2 100644
--- a/src/tools/map_extractor/loadlib/wdt.h
+++ b/src/tools/map_extractor/wdt.h
diff --git a/src/tools/vmap3_assembler/CMakeLists.txt b/src/tools/vmap3_assembler/CMakeLists.txt
index fd4994b67ed..c920571c439 100644
--- a/src/tools/vmap3_assembler/CMakeLists.txt
+++ b/src/tools/vmap3_assembler/CMakeLists.txt
@@ -1,4 +1,5 @@
# Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/>
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -8,78 +9,34 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-cmake_minimum_required (VERSION 2.6)
-project (MANGOS_VMAP_ASSEMB_IO)
-
-set(CMAKE_VERBOSE_MAKEFILE true)
-
-# uncomment next line to disable debug mode
-ADD_DEFINITIONS("-DIOMAP_DEBUG")
-
-ADD_DEFINITIONS("-Wall")
-ADD_DEFINITIONS("-ggdb")
-ADD_DEFINITIONS("-O3")
-
-include_directories(../../src/server/shared/vmap/)
-include_directories(../../dep/include/g3dlite/)
-include_directories(../../dep/ACE_wrappers/)
-include_directories(../../objdir/dep/ACE_wrappers)
-include_directories(../../src/server/framework/)
-
-add_library(g3dlite ../../dep/src/g3dlite/AABox.cpp
- ../../dep/src/g3dlite/Box.cpp
- ../../dep/src/g3dlite/Crypto.cpp
- ../../dep/src/g3dlite/format.cpp
- ../../dep/src/g3dlite/Matrix3.cpp
- ../../dep/src/g3dlite/Plane.cpp
- ../../dep/src/g3dlite/System.cpp
- ../../dep/src/g3dlite/Triangle.cpp
- ../../dep/src/g3dlite/Vector3.cpp
- ../../dep/src/g3dlite/Vector4.cpp
- ../../dep/src/g3dlite/debugAssert.cpp
- ../../dep/src/g3dlite/fileutils.cpp
- ../../dep/src/g3dlite/g3dmath.cpp
- ../../dep/src/g3dlite/g3dfnmatch.cpp
- ../../dep/src/g3dlite/prompt.cpp
- ../../dep/src/g3dlite/stringutils.cpp
- ../../dep/src/g3dlite/Any.cpp
- ../../dep/src/g3dlite/BinaryFormat.cpp
- ../../dep/src/g3dlite/BinaryInput.cpp
- ../../dep/src/g3dlite/BinaryOutput.cpp
- ../../dep/src/g3dlite/Capsule.cpp
- ../../dep/src/g3dlite/CollisionDetection.cpp
- ../../dep/src/g3dlite/CoordinateFrame.cpp
- ../../dep/src/g3dlite/Cylinder.cpp
- ../../dep/src/g3dlite/Line.cpp
- ../../dep/src/g3dlite/LineSegment.cpp
- ../../dep/src/g3dlite/Log.cpp
- ../../dep/src/g3dlite/Matrix4.cpp
- ../../dep/src/g3dlite/MemoryManager.cpp
- ../../dep/src/g3dlite/Quat.cpp
- ../../dep/src/g3dlite/Random.cpp
- ../../dep/src/g3dlite/Ray.cpp
- ../../dep/src/g3dlite/ReferenceCount.cpp
- ../../dep/src/g3dlite/Sphere.cpp
- ../../dep/src/g3dlite/TextInput.cpp
- ../../dep/src/g3dlite/TextOutput.cpp
- ../../dep/src/g3dlite/UprightFrame.cpp
- ../../dep/src/g3dlite/Vector2.cpp
- )
-
-add_library(vmap
- ../../src/shared/vmap/BIH.cpp
- ../../src/shared/vmap/VMapManager2.cpp
- ../../src/shared/vmap/MapTree.cpp
- ../../src/shared/vmap/TileAssembler.cpp
- ../../src/shared/vmap/WorldModel.cpp
- ../../src/shared/vmap/ModelInstance.cpp
- )
-
-target_link_libraries(vmap g3dlite z)
-
-add_executable(vmap_assembler vmap_assembler.cpp)
-target_link_libraries(vmap_assembler vmap)
-
-# add_executable(vmap_test coordinate_test.cpp)
-# target_link_libraries(vmap_test vmap)
-
+include_directories(
+ ${ACE_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIR}
+ ${CMAKE_SOURCE_DIR}/externals/g3dlite
+ ${CMAKE_SOURCE_DIR}/src/server/shared
+ ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Maps
+ ${CMAKE_SOURCE_DIR}/src/server/collision/Models
+)
+
+add_definitions(-DNO_CORE_FUNCS)
+
+add_executable(vmap3assembler VMapAssembler.cpp)
+
+if(WIN32)
+ target_link_libraries(vmap3assembler
+ collision
+ g3dlib
+ zlib
+ )
+else()
+ target_link_libraries(vmap3assembler
+ collision
+ g3dlib
+ ${ZLIB_LIBRARIES}
+ )
+endif()
+
+if( UNIX )
+ install(TARGETS vmap3assembler DESTINATION bin)
+endif()
diff --git a/src/tools/vmap3_assembler/VC90/vmap_assembler.vcproj b/src/tools/vmap3_assembler/VC90/VC90_vmap3assembler.vcproj
index aff990d01cc..1f3376e71b7 100644
--- a/src/tools/vmap3_assembler/VC90/vmap_assembler.vcproj
+++ b/src/tools/vmap3_assembler/VC90/VC90_vmap3assembler.vcproj
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
- Name="vmap_assembler"
+ Version="9,00"
+ Name="vmap3assembler"
ProjectGUID="{572FFF74-480C-4472-8ABF-81733BB4049D}"
RootNamespace="vmap_assembler"
Keyword="Win32Proj"
@@ -18,8 +18,8 @@
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="..\bin\$(PlatformName)_$(ConfigurationName)\"
- IntermediateDirectory="bin\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ OutputDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
@@ -42,16 +42,18 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\dep\include\g3dlite;..\..\..\src\shared\vmap;"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
+ AdditionalIncludeDirectories="..\..\..\..\externals;..\..\..\..\externals\g3dlite;..\..\..\server\collision;..\..\..\server\collision\Management;..\..\..\server\collision\Maps;..\..\..\server\collision\Models;..\..\..\server\shared;..\..\..\server\shared\Debugging"
+ MinimalRebuild="false"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- EnableEnhancedInstructionSet="1"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
+ ObjectFile=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ ProgramDataBaseFileName=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -64,11 +66,13 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(OutDir)/vmap_assembler.exe"
- LinkIncremental="1"
+ OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\$(ProjectName)_d.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/vmap_assembler.pdb"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
@@ -98,8 +102,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="..\bin\$(PlatformName)_$(ConfigurationName)\"
- IntermediateDirectory="bin\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ OutputDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
@@ -121,13 +125,16 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\dep\include\g3dlite;..\..\..\src\shared\vmap;..\..\..\src\framework;..\..\..\dep\ACE_wrappers"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ AdditionalIncludeDirectories="..\..\..\..\externals;..\..\..\..\externals\g3dlite;..\..\..\server\collision;..\..\..\server\collision\Maps;..\..\..\server\collision\Models;..\..\..\server\shared;..\..\..\server\shared\Debugging"
+ StringPooling="true"
RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
+ ObjectFile=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ ProgramDataBaseFileName=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
WarningLevel="3"
- Detect64BitPortabilityProblems="true"
+ Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
@@ -141,9 +148,12 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(OutDir)/vmap_assembler.exe"
+ OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\$(ProjectName).exe"
LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -183,7 +193,7 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath=".\..\vmap_assembler.cpp"
+ RelativePath="..\VMapAssembler.cpp"
>
</File>
</Filter>
@@ -191,57 +201,45 @@
Name="vmaplib"
>
<File
- RelativePath="..\..\..\src\shared\vmap\BIH.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\BIH.h"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\MapTree.cpp"
+ RelativePath="..\..\..\server\collision\BoundingIntervalHierarchy.cpp"
>
</File>
<File
- RelativePath="..\..\..\src\shared\vmap\MapTree.h"
+ RelativePath="..\..\..\server\collision\BoundingIntervalHierarchy.h"
>
</File>
- <File
- RelativePath="..\..\..\src\shared\vmap\ModelInstance.cpp"
+ <Filter
+ Name="Maps"
>
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\ModelInstance.h"
+ <File
+ RelativePath="..\..\..\server\collision\Maps\TileAssembler.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\server\collision\Maps\TileAssembler.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Models"
>
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\TileAssembler.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\TileAssembler.h"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\VMapManager2.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\VMapManager2.h"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\VMapTools.h"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\WorldModel.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\shared\vmap\WorldModel.h"
- >
- </File>
+ <File
+ RelativePath="..\..\..\server\collision\Models\ModelInstance.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\server\collision\Models\ModelInstance.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\server\collision\Models\WorldModel.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\server\collision\Models\WorldModel.h"
+ >
+ </File>
+ </Filter>
</Filter>
</Files>
<Globals>
diff --git a/src/tools/vmap3_assembler/VMapAssembler.cpp b/src/tools/vmap3_assembler/VMapAssembler.cpp
index 6666b54356c..d714db5ae45 100644
--- a/src/tools/vmap3_assembler/VMapAssembler.cpp
+++ b/src/tools/vmap3_assembler/VMapAssembler.cpp
@@ -76,11 +76,13 @@ A '#' at the beginning of a line defines a comment
return(result);
} */
//=======================================================
+
int main(int argc, char* argv[])
{
if(argc != 3 && argc != 4)
{
- printf("\nusage: %s <raw data dir> <vmap dest dir> [config file name]\n", argv[0]);
+ //printf("\nusage: %s <raw data dir> <vmap dest dir> [config file name]\n", argv[0]);
+ printf("\nusage: %s <raw data dir> <vmap dest dir>\n", argv[0]);
return 1;
}
diff --git a/src/tools/vmap3_assembler/splitConfig.txt b/src/tools/vmap3_assembler/splitConfig.txt
deleted file mode 100644
index 8d217b8e967..00000000000
--- a/src/tools/vmap3_assembler/splitConfig.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# list of map names
-
-509 #AhnQiraj
-469 #BlackwingLair
-189 #MonasteryInstances
-030 #PVPZone01
-037 #PVPZone02
-033 #Shadowfang
-533 #Stratholme Raid
-209 #TanarisInstance
-309 #Zul'gurub
-560 #HillsbradPast
-534 #HyjalPast
-532 #Karazahn
-543 #HellfireRampart
-568 #ZulAman
-564 #BlackTemple
-574 #UtgardeKeep
-575 #UtgardePinnacle
-609 #EbonHold
-628 #IsleOfConquest \ No newline at end of file
diff --git a/src/tools/vmap3_assembler/vmap_assemblerVC90.sln b/src/tools/vmap3_assembler/vmap_assemblerVC90.sln
deleted file mode 100644
index 9e94e750661..00000000000
--- a/src/tools/vmap3_assembler/vmap_assemblerVC90.sln
+++ /dev/null
@@ -1,42 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap_assembler", "VC90\vmap_assembler.vcproj", "{572FFF74-480C-4472-8ABF-81733BB4049D}"
- ProjectSection(ProjectDependencies) = postProject
- {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}
- {8072769E-CF10-48BF-B9E1-12752A5DAC6E} = {8072769E-CF10-48BF-B9E1-12752A5DAC6E}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\win\VC90\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "..\..\win\VC90\g3dlite.vcproj", "{8072769E-CF10-48BF-B9E1-12752A5DAC6E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_NoPCH|Win32 = Debug_NoPCH|Win32
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.ActiveCfg = Debug|Win32
- {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug_NoPCH|Win32.Build.0 = Debug|Win32
- {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.ActiveCfg = Debug|Win32
- {572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.Build.0 = Debug|Win32
- {572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.ActiveCfg = Release|Win32
- {572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.Build.0 = Release|Win32
- {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
- {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
- {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.ActiveCfg = Debug|Win32
- {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug|Win32.Build.0 = Debug|Win32
- {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.ActiveCfg = Release|Win32
- {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release|Win32.Build.0 = Release|Win32
- {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.ActiveCfg = Debug_NoPCH|Win32
- {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug_NoPCH|Win32.Build.0 = Debug_NoPCH|Win32
- {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.ActiveCfg = Debug|Win32
- {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Debug|Win32.Build.0 = Debug|Win32
- {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.ActiveCfg = Release|Win32
- {8072769E-CF10-48BF-B9E1-12752A5DAC6E}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/src/tools/vmap3_extractor/CMakeLists.txt b/src/tools/vmap3_extractor/CMakeLists.txt
index 51e867ec07e..62604f7ad3d 100644
--- a/src/tools/vmap3_extractor/CMakeLists.txt
+++ b/src/tools/vmap3_extractor/CMakeLists.txt
@@ -1,4 +1,5 @@
# Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/>
+# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -8,9 +9,33 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-cmake_minimum_required (VERSION 2.6)
-project (MANGOS_IOMAP_EXTRACTOR)
+file(GLOB sources *.cpp)
-LINK_DIRECTORIES( ${LINK_DIRECTORIES} ../../libmpq/libmpq/.libs/ )
-add_executable(vmapextractor adtfile.cpp dbcfile.cpp model.cpp mpq_libmpq.cpp vmapexport.cpp wdtfile.cpp wmo.cpp)
-target_link_libraries(vmapextractor mpq)
+# uncomment next line to disable debug mode
+add_definitions("-DIOMAP_DEBUG")
+
+# build setup currently only supports libmpq 0.4.x
+add_definitions("-DUSE_LIBMPQ04")
+add_definitions("-Wall")
+add_definitions("-ggdb")
+add_definitions("-O3")
+
+add_executable(vmap3extractor ${sources})
+
+if(WIN32)
+ target_link_libraries(vmap3extractor
+ mpq
+ bzip2
+ zlib
+ )
+else()
+ target_link_libraries(vmap3extractor
+ mpq
+ ${BZIP2_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+ )
+endif()
+
+if( UNIX )
+ install(TARGETS vmap3extractor DESTINATION bin)
+endif()
diff --git a/src/tools/vmap3_extractor/VC90/VC90_vmap3extractor.vcproj b/src/tools/vmap3_extractor/VC90/VC90_vmap3extractor.vcproj
new file mode 100644
index 00000000000..3dd343f3845
--- /dev/null
+++ b/src/tools/vmap3_extractor/VC90/VC90_vmap3extractor.vcproj
@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="windows-1250"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vmap3extractor"
+ ProjectGUID="{502602CC-98EA-4335-B922-C5C1DBF37604}"
+ RootNamespace="vmap3_extractor"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\;..\..\..\..\externals\libmpq;..\..\..\..\externals\libmpq\win"
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ ObjectFile=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ ProgramDataBaseFileName=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\$(ProjectName)_d.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectName)__$(PlatformName)_$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="false"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\;..\..\..\..\externals\libmpq;..\..\..\..\externals\libmpq\win"
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ EnableEnhancedInstructionSet="1"
+ UsePrecompiledHeader="0"
+ ObjectFile=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ ProgramDataBaseFileName=".\$(ProjectName)__$(PlatformName)_$(ConfigurationName)\"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="0"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\adtfile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\dbcfile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\model.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\mpq_libmpq.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\vmapexport.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\wdtfile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\wmo.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\adtfile.h"
+ >
+ </File>
+ <File
+ RelativePath="..\dbcfile.h"
+ >
+ </File>
+ <File
+ RelativePath="..\model.h"
+ >
+ </File>
+ <File
+ RelativePath="..\modelheaders.h"
+ >
+ </File>
+ <File
+ RelativePath="..\mpq_libmpq04.h"
+ >
+ </File>
+ <File
+ RelativePath="..\vec3d.h"
+ >
+ </File>
+ <File
+ RelativePath="..\vmapexport.h"
+ >
+ </File>
+ <File
+ RelativePath="..\wdtfile.h"
+ >
+ </File>
+ <File
+ RelativePath="..\wmo.h"
+ >
+ </File>
+ <Filter
+ Name="loadlib"
+ >
+ <File
+ RelativePath="..\loadlib\loadlib.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/tools/vmap3_extractor/adtfile.cpp b/src/tools/vmap3_extractor/adtfile.cpp
index 055408edca6..58c1bb94b1c 100644
--- a/src/tools/vmap3_extractor/adtfile.cpp
+++ b/src/tools/vmap3_extractor/adtfile.cpp
@@ -1,9 +1,10 @@
+#include "vmapexport.h"
#include "adtfile.h"
#include <algorithm>
#include <cstdio>
-#ifdef WIN32
+#ifdef _WIN32
#define snprintf _snprintf
#endif
@@ -69,12 +70,12 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY)
//printf("xMap = %s\n", xMap.c_str());
//printf("yMap = %s\n", yMap.c_str());
- const char dirname[] = "Buildings/dir_bin";
+ std::string dirname = std::string(szWorkDirWmo) + "/dir_bin";
FILE *dirfile;
- dirfile = fopen(dirname, "ab");
+ dirfile = fopen(dirname.c_str(), "ab");
if(!dirfile)
{
- printf("Can't open dirfile!'%s'\n", dirname);
+ printf("Can't open dirfile!'%s'\n", dirname.c_str());
return false;
}
@@ -125,7 +126,7 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY)
// nothing do
char szLocalFile[1024];
- snprintf(szLocalFile, 1024, "./Buildings/%s", s);
+ snprintf(szLocalFile, 1024, "%s/%s", szWorkDirWmo, s);
FILE * output = fopen(szLocalFile,"rb");
if(!output)
{
diff --git a/src/tools/vmap3_extractor/dbcfile.h b/src/tools/vmap3_extractor/dbcfile.h
index 7381ab9f668..d405d6ffd60 100644
--- a/src/tools/vmap3_extractor/dbcfile.h
+++ b/src/tools/vmap3_extractor/dbcfile.h
@@ -1,13 +1,27 @@
+/*
+ * Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2010 MaNGOS <http://getmangos.com/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef DBCFILE_H
#define DBCFILE_H
-#define __STORMLIB_SELF__
#include <cassert>
#include <string>
-//#include "StormLib.h"
-#undef min
-#undef max
class DBCFile
{
public:
diff --git a/src/tools/vmap3_extractor/loadlib/loadlib.h b/src/tools/vmap3_extractor/loadlib/loadlib.h
index 53731753425..49d5f590744 100644
--- a/src/tools/vmap3_extractor/loadlib/loadlib.h
+++ b/src/tools/vmap3_extractor/loadlib/loadlib.h
@@ -1,7 +1,7 @@
#ifndef LOAD_LIB_H
#define LOAD_LIB_H
-#ifdef WIN32
+#ifdef _WIN32
typedef __int64 int64;
typedef __int32 int32;
typedef __int16 int16;
diff --git a/src/tools/vmap3_extractor/model.cpp b/src/tools/vmap3_extractor/model.cpp
index b914ed96406..a2493f7e571 100644
--- a/src/tools/vmap3_extractor/model.cpp
+++ b/src/tools/vmap3_extractor/model.cpp
@@ -134,7 +134,7 @@ ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID,
sc = scale / 1024.0f;
char tempname[512];
- sprintf(tempname, "./Buildings/%s", ModelInstName);
+ sprintf(tempname, "%s/%s", szWorkDirWmo, ModelInstName);
FILE *input;
input = fopen(tempname, "r+b");
diff --git a/src/tools/vmap3_extractor/mpq_libmpq.cpp b/src/tools/vmap3_extractor/mpq_libmpq.cpp
index 4aa59417f81..528b9679a58 100644
--- a/src/tools/vmap3_extractor/mpq_libmpq.cpp
+++ b/src/tools/vmap3_extractor/mpq_libmpq.cpp
@@ -57,7 +57,7 @@ MPQFile::MPQFile(const char* filename):
// HACK: in patch.mpq some files don't want to open and give 1 for filesize
if (size<=1) {
- printf("warning: file %s has size %d; cannot read.\n", filename, size);
+ // printf("info: file %s has size %d; considered dummy file.\n", filename, size);
eof = true;
buffer = 0;
return;
diff --git a/src/tools/vmap3_extractor/mpq_libmpq04.h b/src/tools/vmap3_extractor/mpq_libmpq04.h
index ccbfe37cba7..4fe80f2759c 100644
--- a/src/tools/vmap3_extractor/mpq_libmpq04.h
+++ b/src/tools/vmap3_extractor/mpq_libmpq04.h
@@ -1,6 +1,3 @@
-#define _CRT_SECURE_NO_DEPRECATE
-#define _CRT_SECURE_NO_WARNINGS
-
#ifndef MPQ_H
#define MPQ_H
diff --git a/src/tools/vmap3_extractor/vmapexport.cpp b/src/tools/vmap3_extractor/vmapexport.cpp
index 07d5d31d418..2be03d85d97 100644
--- a/src/tools/vmap3_extractor/vmapexport.cpp
+++ b/src/tools/vmap3_extractor/vmapexport.cpp
@@ -1,16 +1,3 @@
-/*****************************************************************************/
-/* StormLibTest.cpp Copyright (c) Ladislav Zezula 2003 */
-/*---------------------------------------------------------------------------*/
-/* This module uses very brutal test methods for StormLib. It extracts all */
-/* files from the archive with Storm.dll and with stormlib and compares them,*/
-/* then tries to build a copy of the entire archive, then removes a few files*/
-/* from the archive and adds them back, then compares the two archives, ... */
-/*---------------------------------------------------------------------------*/
-/* Date Ver Who Comment */
-/* -------- ---- --- ------- */
-/* 25.03.03 1.00 Lad The first version of StormLibTest.cpp */
-/*****************************************************************************/
-
#define _CRT_SECURE_NO_DEPRECATE
#include <cstdio>
#include <iostream>
@@ -18,7 +5,7 @@
#include <list>
#include <errno.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <Windows.h>
#include <sys/stat.h>
#include <direct.h>
@@ -68,7 +55,7 @@ bool preciseVectorData = false;
// Constants
//static const char * szWorkDirMaps = ".\\Maps";
-static const char * szWorkDirWmo = "./Buildings";
+const char * szWorkDirWmo = "./Buildings";
// Local testing functions
@@ -114,7 +101,7 @@ void ReadLiquidTypeTableDBC()
for(uint32 x = 0; x < LiqType_count; ++x)
LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
- printf("Done! (%u LiqTypes loaded)\n", LiqType_count);
+ printf("Done! (%u LiqTypes loaded)\n", (unsigned int)LiqType_count);
}
int ExtractWmo()
@@ -236,18 +223,22 @@ void ParsMapFiles()
WDTFile WDT(fn,map_ids[i].name);
if(WDT.init(id, map_ids[i].id))
{
+ printf("Processing Map %u\n[", map_ids[i].id);
for (int x=0; x<64; ++x)
{
for (int y=0; y<64; ++y)
{
- if (ADTFile*ADT = WDT.GetMap(x,y))
+ if (ADTFile *ADT = WDT.GetMap(x,y))
{
//sprintf(id_filename,"%02u %02u %03u",x,y,map_ids[i].id);//!!!!!!!!!
ADT->init(map_ids[i].id, x, y);
delete ADT;
}
}
+ printf("#");
+ fflush(stdout);
}
+ printf("]\n");
}
}
}
@@ -260,9 +251,8 @@ void getGamePath()
LONG l;
s = sizeof(input_path);
memset(input_path,0,s);
- l = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Blizzard Entertainment\\World of Warcraft",0,KEY_QUERY_VALUE,&key);
- //l = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Blizzard Entertainment\\Burning Crusade Closed Beta",0,KEY_QUERY_VALUE,&key);
- l = RegQueryValueEx(key,"InstallPath",0,&t,(LPBYTE)input_path,&s);
+ l = RegOpenKeyExA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Blizzard Entertainment\\World of Warcraft",0,KEY_QUERY_VALUE,&key);
+ l = RegQueryValueExA(key,"InstallPath",0,&t,(LPBYTE)input_path,&s);
RegCloseKey(key);
if (strlen(input_path) > 0)
{
@@ -321,6 +311,11 @@ bool fillArchiveNameVector(std::vector<std::string>& pArchiveNames)
searchLocales.push_back("esES");
searchLocales.push_back("frFR");
searchLocales.push_back("koKR");
+ searchLocales.push_back("zhCN");
+ searchLocales.push_back("zhTW");
+ searchLocales.push_back("enCN");
+ searchLocales.push_back("enTW");
+ searchLocales.push_back("esMX");
searchLocales.push_back("ruRU");
for (std::vector<std::string>::iterator i = searchLocales.begin(); i != searchLocales.end(); ++i)
@@ -445,17 +440,33 @@ bool processArgv(int argc, char ** argv, const char *versionString)
int main(int argc, char ** argv)
{
bool success=true;
- const char *versionString = "V2.90 2010_05";
+ const char *versionString = "V3.00 2010_07";
// Use command line arguments, when some
if(!processArgv(argc, argv, versionString))
return 1;
+ // some simple check if working dir is dirty
+ else
+ {
+ std::string sdir = std::string(szWorkDirWmo) + "/dir";
+ std::string sdir_bin = std::string(szWorkDirWmo) + "/dir_bin";
+ struct stat status;
+ if (!stat(sdir.c_str(), &status) || !stat(sdir_bin.c_str(), &status))
+ {
+ printf("Your output directory seems to be polluted, please use an empty directory!\n");
+ printf("<press return to exit>");
+ char garbage[2];
+ scanf("%c", garbage);
+ return 1;
+ }
+ }
+
printf("Extract %s. Beginning work ....\n",versionString);
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Create the working directory
if(mkdir(szWorkDirWmo
-#ifdef __linux__
+#ifdef _XOPEN_UNIX
, 0711
#endif
))
diff --git a/src/tools/vmap3_extractor/vmapexport.h b/src/tools/vmap3_extractor/vmapexport.h
index 625bc930882..fa9a609abf5 100644
--- a/src/tools/vmap3_extractor/vmapexport.h
+++ b/src/tools/vmap3_extractor/vmapexport.h
@@ -8,4 +8,6 @@ enum ModelFlags
MOD_HAS_BOUND = 1<<2
};
+extern const char * szWorkDirWmo;
+
#endif
diff --git a/src/tools/vmap3_extractor/wdtfile.cpp b/src/tools/vmap3_extractor/wdtfile.cpp
index 7f81af72931..cd24ef0346c 100644
--- a/src/tools/vmap3_extractor/wdtfile.cpp
+++ b/src/tools/vmap3_extractor/wdtfile.cpp
@@ -1,5 +1,4 @@
-#define __STORMLIB_SELF__
-
+#include "vmapexport.h"
#include "wdtfile.h"
#include "adtfile.h"
#include <cstdio>
@@ -29,12 +28,12 @@ bool WDTFile::init(char *map_id, unsigned int mapID)
char fourcc[5];
uint32 size;
- const char dirname[] = "Buildings/dir_bin";
+ std::string dirname = std::string(szWorkDirWmo) + "/dir_bin";
FILE *dirfile;
- dirfile = fopen(dirname, "ab");
+ dirfile = fopen(dirname.c_str(), "ab");
if(!dirfile)
{
- printf("Can't open dirfile!'%s'\n", dirname);
+ printf("Can't open dirfile!'%s'\n", dirname.c_str());
return false;
}
diff --git a/src/tools/vmap3_extractor/win/vmapExtractor3_VC90.sln b/src/tools/vmap3_extractor/win/vmapExtractor3_VC90.sln
deleted file mode 100644
index 0c42d1e90f0..00000000000
--- a/src/tools/vmap3_extractor/win/vmapExtractor3_VC90.sln
+++ /dev/null
@@ -1,19 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmapExtractor3", "VC90\vmapExtractor3.vcproj", "{D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Debug|Win32.ActiveCfg = Debug|Win32
- {D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Debug|Win32.Build.0 = Debug|Win32
- {D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Release|Win32.ActiveCfg = Release|Win32
- {D4624B20-AC1E-4EE9-8C9C-0FB65EEE3393}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/src/tools/vmap3_extractor/wmo.cpp b/src/tools/vmap3_extractor/wmo.cpp
index 508391be675..216a2248953 100644
--- a/src/tools/vmap3_extractor/wmo.cpp
+++ b/src/tools/vmap3_extractor/wmo.cpp
@@ -1,4 +1,3 @@
-
#include "vmapexport.h"
#include "wmo.h"
#include "vec3d.h"
@@ -387,7 +386,7 @@ int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool pPrecis
if (rootWMO->liquidType & 4)
liquidEntry = liquidType;
else if (liquidType == 15)
- liquidEntry = 0;
+ liquidEntry = 1; // first entry, generic "Water"
else
liquidEntry = liquidType + 1;
// overwrite material type in header...
@@ -443,7 +442,7 @@ WMOInstance::WMOInstance(MPQFile &f,const char* WmoInstName, uint32 mapID, uint3
//-----------add_in _dir_file----------------
char tempname[512];
- sprintf(tempname, "Buildings/%s", WmoInstName);
+ sprintf(tempname, "%s/%s", szWorkDirWmo, WmoInstName);
FILE *input;
input = fopen(tempname, "r+b");