aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/authserver/Main.cpp54
-rw-r--r--src/server/authserver/Realms/RealmList.cpp4
-rw-r--r--src/server/authserver/Realms/RealmList.h2
-rw-r--r--src/server/authserver/Server/AuthSocket.cpp102
-rw-r--r--src/server/authserver/Server/RealmAcceptor.h4
-rw-r--r--src/server/authserver/Server/RealmSocket.cpp4
-rw-r--r--src/server/authserver/authserver.conf.dist32
-rw-r--r--src/server/collision/BoundingIntervalHierarchyWrapper.h4
-rw-r--r--src/server/collision/DynamicTree.cpp12
-rw-r--r--src/server/collision/Management/IVMapManager.h4
-rw-r--r--src/server/collision/Management/MMapManager.cpp46
-rw-r--r--src/server/collision/Management/MMapManager.h4
-rw-r--r--src/server/collision/Management/VMapManager2.cpp8
-rw-r--r--src/server/collision/Management/VMapManager2.h2
-rw-r--r--src/server/collision/Maps/MapTree.cpp32
-rw-r--r--src/server/collision/Maps/MapTree.h4
-rw-r--r--src/server/collision/Maps/TileAssembler.h2
-rw-r--r--src/server/collision/Models/GameObjectModel.cpp10
-rw-r--r--src/server/collision/Models/GameObjectModel.h2
-rw-r--r--src/server/collision/Models/ModelInstance.h2
-rw-r--r--src/server/collision/Models/WorldModel.cpp8
-rw-r--r--src/server/collision/Models/WorldModel.h12
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.cpp34
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.h17
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.cpp4
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.h24
-rw-r--r--src/server/game/AI/CoreAI/GuardAI.cpp6
-rw-r--r--src/server/game/AI/CoreAI/PassiveAI.h22
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp4
-rw-r--r--src/server/game/AI/CoreAI/PetAI.h6
-rw-r--r--src/server/game/AI/CoreAI/ReactorAI.h4
-rw-r--r--src/server/game/AI/CoreAI/TotemAI.cpp6
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h45
-rw-r--r--src/server/game/AI/CreatureAI.cpp6
-rw-r--r--src/server/game/AI/CreatureAI.h42
-rw-r--r--src/server/game/AI/CreatureAIFactory.h9
-rw-r--r--src/server/game/AI/CreatureAIImpl.h4
-rw-r--r--src/server/game/AI/CreatureAISelector.cpp5
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAI.cpp46
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAI.h4
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAIMgr.cpp210
-rw-r--r--src/server/game/AI/EventAI/CreatureEventAIMgr.h4
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp35
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.h30
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp58
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.h24
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp42
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h22
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedGossip.h19
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp24
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h8
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp220
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h8
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp124
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h53
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp30
-rw-r--r--src/server/game/Accounts/RBAC.cpp32
-rw-r--r--src/server/game/Accounts/RBAC.h6
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp128
-rw-r--r--src/server/game/Achievements/AchievementMgr.h6
-rw-r--r--src/server/game/Addons/AddonMgr.cpp6
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp42
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp24
-rw-r--r--src/server/game/Battlefield/Battlefield.h8
-rw-r--r--src/server/game/Battlefield/BattlefieldMgr.cpp16
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp6
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h5
-rw-r--r--src/server/game/Battlegrounds/ArenaTeam.cpp26
-rw-r--r--src/server/game/Battlegrounds/ArenaTeamMgr.cpp6
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp58
-rw-r--r--src/server/game/Battlegrounds/Battleground.h24
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp46
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.cpp30
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.h6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp12
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp116
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp26
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.h6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp44
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp8
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp22
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp22
-rw-r--r--src/server/game/Calendar/CalendarMgr.cpp12
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp10
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.h4
-rw-r--r--src/server/game/Chat/Chat.cpp8
-rw-r--r--src/server/game/Chat/Chat.h8
-rw-r--r--src/server/game/Chat/ChatLink.cpp104
-rw-r--r--src/server/game/Combat/ThreatManager.cpp4
-rw-r--r--src/server/game/Combat/ThreatManager.h2
-rw-r--r--src/server/game/Combat/UnitEvents.h4
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp324
-rw-r--r--src/server/game/Conditions/DisableMgr.cpp64
-rw-r--r--src/server/game/DataStores/DBCEnums.h6
-rw-r--r--src/server/game/DataStores/DBCStores.cpp18
-rw-r--r--src/server/game/DataStores/DBCStores.h3
-rw-r--r--src/server/game/DataStores/DBCStructure.h22
-rw-r--r--src/server/game/DataStores/DBCfmt.h1
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp114
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.h4
-rw-r--r--src/server/game/DungeonFinding/LFGPlayerData.cpp6
-rw-r--r--src/server/game/DungeonFinding/LFGQueue.cpp42
-rw-r--r--src/server/game/DungeonFinding/LFGQueue.h2
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp24
-rw-r--r--src/server/game/Entities/Corpse/Corpse.cpp10
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp58
-rw-r--r--src/server/game/Entities/Creature/Creature.h19
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.cpp36
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.h6
-rw-r--r--src/server/game/Entities/Creature/GossipDef.cpp14
-rw-r--r--src/server/game/Entities/Creature/TemporarySummon.cpp4
-rw-r--r--src/server/game/Entities/Creature/TemporarySummon.h4
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.cpp2
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp28
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h2
-rw-r--r--src/server/game/Entities/Item/Container/Bag.cpp2
-rw-r--r--src/server/game/Entities/Item/Item.cpp18
-rw-r--r--src/server/game/Entities/Item/ItemEnchantmentMgr.cpp10
-rw-r--r--src/server/game/Entities/Object/Object.cpp74
-rw-r--r--src/server/game/Entities/Object/Object.h12
-rw-r--r--src/server/game/Entities/Object/ObjectPosSelector.h2
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateData.cpp14
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp63
-rw-r--r--src/server/game/Entities/Player/Player.cpp792
-rw-r--r--src/server/game/Entities/Player/Player.h24
-rw-r--r--src/server/game/Entities/Player/SocialMgr.cpp10
-rw-r--r--src/server/game/Entities/Totem/Totem.h14
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp123
-rw-r--r--src/server/game/Entities/Transport/Transport.h13
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp295
-rw-r--r--src/server/game/Entities/Unit/Unit.h23
-rwxr-xr-xsrc/server/game/Entities/Vehicle/Vehicle.cpp46
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.h16
-rw-r--r--src/server/game/Entities/Vehicle/VehicleDefines.h27
-rw-r--r--src/server/game/Events/GameEventMgr.cpp186
-rw-r--r--src/server/game/Events/GameEventMgr.h4
-rw-r--r--src/server/game/Globals/ObjectAccessor.cpp14
-rw-r--r--src/server/game/Globals/ObjectAccessor.h2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp1189
-rw-r--r--src/server/game/Globals/ObjectMgr.h23
-rw-r--r--src/server/game/Grids/Cells/Cell.h4
-rw-r--r--src/server/game/Grids/Grid.h2
-rw-r--r--src/server/game/Grids/GridDefines.h4
-rw-r--r--src/server/game/Grids/GridReference.h2
-rw-r--r--src/server/game/Grids/GridStates.cpp8
-rw-r--r--src/server/game/Grids/GridStates.h2
-rw-r--r--src/server/game/Grids/NGrid.h4
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h183
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiersImpl.h7
-rw-r--r--src/server/game/Grids/ObjectGridLoader.cpp10
-rw-r--r--src/server/game/Grids/ObjectGridLoader.h10
-rw-r--r--src/server/game/Groups/Group.cpp22
-rw-r--r--src/server/game/Groups/Group.h2
-rw-r--r--src/server/game/Groups/GroupMgr.cpp26
-rw-r--r--src/server/game/Groups/GroupReference.h2
-rw-r--r--src/server/game/Guilds/Guild.cpp96
-rw-r--r--src/server/game/Guilds/Guild.h7
-rw-r--r--src/server/game/Guilds/GuildMgr.cpp54
-rw-r--r--src/server/game/Handlers/AddonHandler.cpp14
-rw-r--r--src/server/game/Handlers/ArenaTeamHandler.cpp26
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp42
-rw-r--r--src/server/game/Handlers/BattleGroundHandler.cpp70
-rw-r--r--src/server/game/Handlers/BattlefieldHandler.cpp6
-rw-r--r--src/server/game/Handlers/CalendarHandler.cpp36
-rw-r--r--src/server/game/Handlers/ChannelHandler.cpp36
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp68
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp14
-rw-r--r--src/server/game/Handlers/CombatHandler.cpp6
-rw-r--r--src/server/game/Handlers/DuelHandler.cpp8
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp44
-rw-r--r--src/server/game/Handlers/GuildHandler.cpp68
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp88
-rw-r--r--src/server/game/Handlers/LFGHandler.cpp60
-rw-r--r--src/server/game/Handlers/LootHandler.cpp12
-rw-r--r--src/server/game/Handlers/MailHandler.cpp6
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp200
-rw-r--r--src/server/game/Handlers/MovementHandler.cpp43
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp58
-rw-r--r--src/server/game/Handlers/PetHandler.cpp62
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp60
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp32
-rw-r--r--src/server/game/Handlers/QuestHandler.cpp50
-rw-r--r--src/server/game/Handlers/ReferAFriendHandler.cpp4
-rw-r--r--src/server/game/Handlers/SkillHandler.cpp6
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp36
-rw-r--r--src/server/game/Handlers/TaxiHandler.cpp34
-rw-r--r--src/server/game/Handlers/TicketHandler.cpp2
-rw-r--r--src/server/game/Handlers/TradeHandler.cpp20
-rw-r--r--src/server/game/Handlers/VehicleHandler.cpp26
-rw-r--r--src/server/game/Handlers/VoiceChatHandler.cpp6
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp22
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.h6
-rw-r--r--src/server/game/Instances/InstanceScript.cpp16
-rw-r--r--src/server/game/Instances/InstanceScript.h28
-rw-r--r--src/server/game/Loot/LootMgr.cpp100
-rw-r--r--src/server/game/Loot/LootMgr.h20
-rw-r--r--src/server/game/Mails/Mail.cpp10
-rw-r--r--src/server/game/Mails/Mail.h6
-rw-r--r--src/server/game/Maps/Map.cpp184
-rw-r--r--src/server/game/Maps/MapInstanced.cpp8
-rw-r--r--src/server/game/Maps/MapInstanced.h2
-rw-r--r--src/server/game/Maps/MapManager.cpp20
-rw-r--r--src/server/game/Maps/MapReference.h2
-rw-r--r--src/server/game/Maps/MapUpdater.cpp4
-rw-r--r--src/server/game/Maps/TransportMgr.cpp62
-rw-r--r--src/server/game/Maps/ZoneScript.h10
-rw-r--r--src/server/game/Miscellaneous/Formulas.h2
-rw-r--r--src/server/game/Miscellaneous/SharedDefines.h2
-rw-r--r--src/server/game/Movement/MotionMaster.cpp64
-rw-r--r--src/server/game/Movement/MovementGenerator.cpp4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerator.h4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h2
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h4
-rw-r--r--src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp4
-rw-r--r--src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h4
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/IdleMovementGenerator.h6
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp4
-rw-r--r--src/server/game/Movement/MovementGenerators/PointMovementGenerator.h10
-rw-r--r--src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h2
-rw-r--r--src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp8
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h14
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp10
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h6
-rw-r--r--src/server/game/Movement/PathGenerator.cpp38
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp19
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.h8
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.cpp31
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.h4
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInitArgs.h6
-rw-r--r--src/server/game/Movement/Spline/MovementPacketBuilder.cpp14
-rw-r--r--src/server/game/Movement/Spline/MovementPacketBuilder.h14
-rw-r--r--src/server/game/Movement/Spline/MovementUtil.cpp2
-rw-r--r--src/server/game/Movement/Spline/Spline.h4
-rw-r--r--src/server/game/Movement/Waypoints/WaypointManager.cpp8
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp20
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.h16
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp20
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.h2
-rw-r--r--src/server/game/Pools/PoolMgr.cpp94
-rw-r--r--src/server/game/Pools/PoolMgr.h6
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp4
-rw-r--r--src/server/game/Reputation/ReputationMgr.h4
-rw-r--r--src/server/game/Scripting/MapScripts.cpp106
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp66
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp24
-rw-r--r--src/server/game/Scripting/ScriptMgr.h2
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp10
-rw-r--r--src/server/game/Scripting/ScriptSystem.h4
-rw-r--r--src/server/game/Server/WorldSession.cpp66
-rw-r--r--src/server/game/Server/WorldSession.h22
-rw-r--r--src/server/game/Server/WorldSocket.cpp60
-rw-r--r--src/server/game/Server/WorldSocketAcceptor.h4
-rw-r--r--src/server/game/Server/WorldSocketMgr.cpp22
-rw-r--r--src/server/game/Skills/SkillDiscovery.cpp20
-rw-r--r--src/server/game/Skills/SkillExtraItems.cpp16
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp56
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h8
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp24
-rw-r--r--src/server/game/Spells/Spell.cpp104
-rw-r--r--src/server/game/Spells/SpellEffects.cpp147
-rw-r--r--src/server/game/Spells/SpellInfo.cpp24
-rw-r--r--src/server/game/Spells/SpellInfo.h6
-rw-r--r--src/server/game/Spells/SpellMgr.cpp241
-rw-r--r--src/server/game/Spells/SpellScript.cpp104
-rw-r--r--src/server/game/Spells/SpellScript.h48
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp24
-rw-r--r--src/server/game/Texts/CreatureTextMgr.h4
-rw-r--r--src/server/game/Tickets/TicketMgr.cpp10
-rw-r--r--src/server/game/Tools/CharacterDatabaseCleaner.cpp6
-rw-r--r--src/server/game/Tools/PlayerDump.cpp8
-rw-r--r--src/server/game/Tools/PlayerDump.h6
-rw-r--r--src/server/game/Warden/Warden.cpp22
-rw-r--r--src/server/game/Warden/WardenCheckMgr.cpp20
-rw-r--r--src/server/game/Warden/WardenMac.cpp38
-rw-r--r--src/server/game/Warden/WardenWin.cpp80
-rw-r--r--src/server/game/Weather/Weather.cpp6
-rw-r--r--src/server/game/Weather/WeatherMgr.cpp10
-rw-r--r--src/server/game/World/World.cpp484
-rw-r--r--src/server/scripts/Commands/cs_account.cpp22
-rw-r--r--src/server/scripts/Commands/cs_arena.cpp12
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp6
-rw-r--r--src/server/scripts/Commands/cs_gobject.cpp2
-rw-r--r--src/server/scripts/Commands/cs_group.cpp1
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp6
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp6
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp8
-rw-r--r--src/server/scripts/Commands/cs_pet.cpp2
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp188
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp2
-rw-r--r--src/server/scripts/Commands/cs_tele.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/CMakeLists.txt1
-rw-r--r--src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.h2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp56
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp388
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp317
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp168
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp134
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp144
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp452
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h134
-rw-r--r--src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp5
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp30
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/boss_kruul.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/zone_duskwood.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp126
-rw-r--r--src/server/scripts/EasternKingdoms/zone_ghostlands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_hinterlands.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp115
-rw-r--r--src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_undercity.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp9
-rw-r--r--src/server/scripts/EasternKingdoms/zone_westfall.cpp4
-rw-r--r--src/server/scripts/Events/childrens_week.cpp30
-rw-r--r--src/server/scripts/Examples/example_creature.cpp2
-rw-r--r--src/server/scripts/Examples/example_spell.cpp50
-rw-r--r--src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp16
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp8
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp16
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp22
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp8
-rw-r--r--src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp2
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp4
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp2
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp4
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp4
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp2
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp6
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp2
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp2
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp2
-rw-r--r--src/server/scripts/Kalimdor/boss_azuregos.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_ashenvale.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_azshara.cpp14
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp26
-rw-r--r--src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp8
-rw-r--r--src/server/scripts/Kalimdor/zone_darkshore.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_desolace.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_durotar.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_moonglade.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_mulgore.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_orgrimmar.cpp8
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp8
-rw-r--r--src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_tanaris.cpp12
-rw-r--r--src/server/scripts/Kalimdor/zone_teldrassil.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_the_barrens.cpp10
-rw-r--r--src/server/scripts/Kalimdor/zone_thousand_needles.cpp8
-rw-r--r--src/server/scripts/Kalimdor/zone_thunder_bluff.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_ungoro_crater.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_winterspring.cpp4
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp6
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp12
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp8
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp14
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp10
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp10
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp32
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp6
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp6
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp14
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp6
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/instance_forge_of_souls.cpp17
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h8
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp27
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp6
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp4
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_noth.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp12
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp8
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp6
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp202
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp285
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp392
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp171
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp558
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp672
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.h76
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp12
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp8
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp12
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp322
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp6
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp625
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp49
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp383
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h84
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_erekem.cpp4
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_moragg.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp6
-rw-r--r--src/server/scripts/Northrend/isle_of_conquest.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp50
-rw-r--r--src/server/scripts/Northrend/zone_dalaran.cpp8
-rw-r--r--src/server/scripts/Northrend/zone_dragonblight.cpp101
-rw-r--r--src/server/scripts/Northrend/zone_grizzly_hills.cpp98
-rw-r--r--src/server/scripts/Northrend/zone_howling_fjord.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp10
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp6
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp65
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp999
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPZM.h2
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp4
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp6
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp8
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp26
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp8
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp14
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp26
-rw-r--r--src/server/scripts/Outland/CMakeLists.txt9
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp6
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp141
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp124
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp127
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp5
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h32
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp8
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp6
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp14
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp24
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp6
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp118
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h64
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp194
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp42
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp283
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp125
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp364
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp4
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp18
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp10
-rw-r--r--src/server/scripts/Outland/zone_nagrand.cpp8
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp14
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp30
-rw-r--r--src/server/scripts/Outland/zone_shattrath_city.cpp6
-rw-r--r--src/server/scripts/Outland/zone_terokkar_forest.cpp36
-rw-r--r--src/server/scripts/Outland/zone_zangarmarsh.cpp6
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp2
-rw-r--r--src/server/scripts/Spells/spell_holiday.cpp2
-rw-r--r--src/server/scripts/Spells/spell_item.cpp10
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp2
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp2
-rw-r--r--src/server/scripts/World/achievement_scripts.cpp2
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp8
-rw-r--r--src/server/scripts/World/chat_log.cpp42
-rw-r--r--src/server/scripts/World/go_scripts.cpp4
-rw-r--r--src/server/scripts/World/guards.cpp6
-rw-r--r--src/server/scripts/World/item_scripts.cpp2
-rw-r--r--src/server/scripts/World/mob_generic_creature.cpp4
-rw-r--r--src/server/scripts/World/npc_professions.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp54
-rw-r--r--src/server/shared/Configuration/Config.cpp32
-rw-r--r--src/server/shared/Configuration/Config.h3
-rw-r--r--src/server/shared/DataStores/DBCFileLoader.cpp4
-rw-r--r--src/server/shared/DataStores/DBCFileLoader.h2
-rw-r--r--src/server/shared/DataStores/DBCStore.h10
-rw-r--r--src/server/shared/Database/DatabaseWorker.h2
-rw-r--r--src/server/shared/Database/DatabaseWorkerPool.h16
-rw-r--r--src/server/shared/Database/Field.h24
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.cpp10
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h4
-rw-r--r--src/server/shared/Database/Implementation/LoginDatabase.cpp2
-rw-r--r--src/server/shared/Database/Implementation/LoginDatabase.h4
-rw-r--r--src/server/shared/Database/Implementation/WorldDatabase.h4
-rw-r--r--src/server/shared/Database/MySQLConnection.cpp64
-rw-r--r--src/server/shared/Database/MySQLConnection.h2
-rw-r--r--src/server/shared/Database/MySQLThreading.h4
-rw-r--r--src/server/shared/Database/PreparedStatement.cpp22
-rw-r--r--src/server/shared/Database/QueryHolder.cpp11
-rw-r--r--src/server/shared/Database/QueryHolder.h4
-rw-r--r--src/server/shared/Database/QueryResult.cpp4
-rw-r--r--src/server/shared/Database/SQLOperation.h2
-rw-r--r--src/server/shared/Database/Transaction.h6
-rw-r--r--src/server/shared/Dynamic/FactoryHolder.h6
-rw-r--r--src/server/shared/Dynamic/LinkedList.h2
-rw-r--r--src/server/shared/Dynamic/LinkedReference/Reference.h2
-rw-r--r--src/server/shared/Dynamic/ObjectRegistry.h2
-rw-r--r--src/server/shared/Dynamic/TypeContainer.h4
-rw-r--r--src/server/shared/Dynamic/TypeContainerVisitor.h14
-rw-r--r--src/server/shared/Logging/Appender.cpp117
-rw-r--r--src/server/shared/Logging/Appender.h58
-rw-r--r--src/server/shared/Logging/AppenderConsole.cpp6
-rw-r--r--src/server/shared/Logging/AppenderDB.cpp34
-rw-r--r--src/server/shared/Logging/AppenderFile.cpp7
-rw-r--r--src/server/shared/Logging/Log.cpp213
-rw-r--r--src/server/shared/Logging/Log.h107
-rw-r--r--src/server/shared/Logging/LogOperation.h6
-rw-r--r--src/server/shared/Logging/Logger.cpp32
-rw-r--r--src/server/shared/Logging/Logger.h7
-rw-r--r--src/server/shared/Packets/ByteBuffer.cpp12
-rw-r--r--src/server/shared/Threading/Callback.h4
-rw-r--r--src/server/shared/Threading/DelayExecutor.cpp4
-rw-r--r--src/server/shared/Threading/Threading.h4
-rw-r--r--src/server/shared/Utilities/ByteConverter.h4
-rw-r--r--src/server/shared/Utilities/EventProcessor.h4
-rw-r--r--src/server/shared/Utilities/ServiceWin32.cpp2
-rw-r--r--src/server/shared/Utilities/SignalHandler.h2
-rw-r--r--src/server/worldserver/CommandLine/CliRunnable.cpp2
-rw-r--r--src/server/worldserver/Main.cpp6
-rw-r--r--src/server/worldserver/Master.cpp80
-rw-r--r--src/server/worldserver/RemoteAccess/RARunnable.cpp6
-rw-r--r--src/server/worldserver/RemoteAccess/RASocket.cpp30
-rw-r--r--src/server/worldserver/TCSoap/TCSoap.cpp18
-rw-r--r--src/server/worldserver/worldserver.conf.dist140
-rw-r--r--src/tools/map_extractor/System.cpp27
-rw-r--r--src/tools/map_extractor/adt.cpp18
-rw-r--r--src/tools/map_extractor/adt.h18
-rw-r--r--src/tools/map_extractor/dbcfile.cpp18
-rw-r--r--src/tools/map_extractor/dbcfile.h18
-rw-r--r--src/tools/map_extractor/loadlib.cpp18
-rw-r--r--src/tools/map_extractor/loadlib/loadlib.h18
-rw-r--r--src/tools/map_extractor/mpq_libmpq.cpp18
-rw-r--r--src/tools/map_extractor/mpq_libmpq04.h18
-rw-r--r--src/tools/map_extractor/wdt.cpp18
-rw-r--r--src/tools/map_extractor/wdt.h18
-rw-r--r--src/tools/mesh_extractor/ADT.cpp17
-rw-r--r--src/tools/mesh_extractor/ADT.h17
-rw-r--r--src/tools/mesh_extractor/Cache.h17
-rw-r--r--src/tools/mesh_extractor/Chunk.cpp17
-rw-r--r--src/tools/mesh_extractor/Chunk.h17
-rw-r--r--src/tools/mesh_extractor/ChunkedData.cpp17
-rw-r--r--src/tools/mesh_extractor/ChunkedData.h17
-rw-r--r--src/tools/mesh_extractor/Constants.h17
-rw-r--r--src/tools/mesh_extractor/ContinentBuilder.cpp17
-rw-r--r--src/tools/mesh_extractor/ContinentBuilder.h17
-rw-r--r--src/tools/mesh_extractor/DBC.cpp17
-rw-r--r--src/tools/mesh_extractor/DBC.h17
-rw-r--r--src/tools/mesh_extractor/DoodadHandler.cpp17
-rw-r--r--src/tools/mesh_extractor/DoodadHandler.h17
-rw-r--r--src/tools/mesh_extractor/Geometry.cpp17
-rw-r--r--src/tools/mesh_extractor/Geometry.h17
-rw-r--r--src/tools/mesh_extractor/LiquidHandler.cpp17
-rw-r--r--src/tools/mesh_extractor/LiquidHandler.h17
-rw-r--r--src/tools/mesh_extractor/MPQ.cpp17
-rw-r--r--src/tools/mesh_extractor/MPQ.h17
-rw-r--r--src/tools/mesh_extractor/MPQManager.cpp17
-rw-r--r--src/tools/mesh_extractor/MPQManager.h17
-rw-r--r--src/tools/mesh_extractor/MapChunk.cpp17
-rw-r--r--src/tools/mesh_extractor/MapChunk.h17
-rw-r--r--src/tools/mesh_extractor/MeshExtractor.cpp17
-rw-r--r--src/tools/mesh_extractor/Model.cpp17
-rw-r--r--src/tools/mesh_extractor/Model.h17
-rw-r--r--src/tools/mesh_extractor/ObjectDataHandler.cpp17
-rw-r--r--src/tools/mesh_extractor/ObjectDataHandler.h17
-rw-r--r--src/tools/mesh_extractor/TileBuilder.cpp17
-rw-r--r--src/tools/mesh_extractor/TileBuilder.h17
-rw-r--r--src/tools/mesh_extractor/Utils.cpp17
-rw-r--r--src/tools/mesh_extractor/Utils.h17
-rw-r--r--src/tools/mesh_extractor/WDT.cpp17
-rw-r--r--src/tools/mesh_extractor/WDT.h17
-rw-r--r--src/tools/mesh_extractor/WorldModelGroup.cpp17
-rw-r--r--src/tools/mesh_extractor/WorldModelGroup.h17
-rw-r--r--src/tools/mesh_extractor/WorldModelHandler.cpp17
-rw-r--r--src/tools/mesh_extractor/WorldModelHandler.h17
-rw-r--r--src/tools/mesh_extractor/WorldModelRoot.cpp17
-rw-r--r--src/tools/mesh_extractor/WorldModelRoot.h17
-rw-r--r--src/tools/mmaps_generator/PathGenerator.cpp22
-rw-r--r--src/tools/vmap4_assembler/VMapAssembler.cpp18
-rw-r--r--src/tools/vmap4_extractor/adtfile.cpp22
-rw-r--r--src/tools/vmap4_extractor/adtfile.h22
-rw-r--r--src/tools/vmap4_extractor/dbcfile.cpp22
-rw-r--r--src/tools/vmap4_extractor/dbcfile.h22
-rw-r--r--src/tools/vmap4_extractor/gameobject_extract.cpp18
-rw-r--r--src/tools/vmap4_extractor/loadlib/loadlib.h22
-rw-r--r--src/tools/vmap4_extractor/model.cpp22
-rw-r--r--src/tools/vmap4_extractor/model.h22
-rw-r--r--src/tools/vmap4_extractor/modelheaders.h22
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq.cpp18
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq04.h18
-rw-r--r--src/tools/vmap4_extractor/vec3d.h18
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp22
-rw-r--r--src/tools/vmap4_extractor/vmapexport.h22
-rw-r--r--src/tools/vmap4_extractor/wdtfile.cpp22
-rw-r--r--src/tools/vmap4_extractor/wdtfile.h18
-rw-r--r--src/tools/vmap4_extractor/wmo.cpp22
-rw-r--r--src/tools/vmap4_extractor/wmo.h22
769 files changed, 12489 insertions, 11785 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index b16e86a7f9f..80a810e4ce1 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -77,7 +77,7 @@ public:
/// Print out the usage string for this program on the console.
void usage(const char* prog)
{
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Usage: \n %s [<options>]\n"
+ TC_LOG_INFO("server.authserver", "Usage: \n %s [<options>]\n"
" -c config_file use config_file as configuration file\n\r",
prog);
}
@@ -111,11 +111,11 @@ extern int main(int argc, char** argv)
return 1;
}
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "%s (authserver)", _FULLVERSION);
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "<Ctrl-C> to stop.\n");
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Using configuration file %s.", configFile);
+ TC_LOG_INFO("server.authserver", "%s (authserver)", _FULLVERSION);
+ TC_LOG_INFO("server.authserver", "<Ctrl-C> to stop.\n");
+ TC_LOG_INFO("server.authserver", "Using configuration file %s.", configFile);
- TC_LOG_WARN(LOG_FILTER_AUTHSERVER, "%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
+ TC_LOG_WARN("server.authserver", "%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
ACE_Reactor::instance(new ACE_Reactor(new ACE_Dev_Poll_Reactor(ACE::max_handles(), 1), 1), true);
@@ -123,17 +123,17 @@ extern int main(int argc, char** argv)
ACE_Reactor::instance(new ACE_Reactor(new ACE_TP_Reactor(), true), true);
#endif
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Max allowed open files is %d", ACE::max_handles());
+ TC_LOG_DEBUG("server.authserver", "Max allowed open files is %d", ACE::max_handles());
// authserver PID file creation
std::string pidFile = sConfigMgr->GetStringDefault("PidFile", "");
if (!pidFile.empty())
{
if (uint32 pid = CreatePIDFile(pidFile))
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Daemon PID: %u\n", pid);
+ TC_LOG_INFO("server.authserver", "Daemon PID: %u\n", pid);
else
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Cannot create PID file %s.\n", pidFile.c_str());
+ TC_LOG_ERROR("server.authserver", "Cannot create PID file %s.\n", pidFile.c_str());
return 1;
}
}
@@ -146,7 +146,7 @@ extern int main(int argc, char** argv)
sRealmList->Initialize(sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 20));
if (sRealmList->size() == 0)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "No valid realms specified.");
+ TC_LOG_ERROR("server.authserver", "No valid realms specified.");
return 1;
}
@@ -156,7 +156,7 @@ extern int main(int argc, char** argv)
int32 rmport = sConfigMgr->GetIntDefault("RealmServerPort", 3724);
if (rmport < 0 || rmport > 0xFFFF)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Specified port out of allowed range (1-65535)");
+ TC_LOG_ERROR("server.authserver", "Specified port out of allowed range (1-65535)");
return 1;
}
@@ -166,7 +166,7 @@ extern int main(int argc, char** argv)
if (acceptor.open(bind_addr, ACE_Reactor::instance(), ACE_NONBLOCK) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Auth server can not bind to %s:%d", bind_ip.c_str(), rmport);
+ TC_LOG_ERROR("server.authserver", "Auth server can not bind to %s:%d", bind_ip.c_str(), rmport);
return 1;
}
@@ -196,20 +196,20 @@ extern int main(int argc, char** argv)
ULONG_PTR currentAffinity = affinity & appAff; // remove non accessible processors
if (!currentAffinity)
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the authserver. Accessible processors bitmask (hex): %x", affinity, appAff);
+ TC_LOG_ERROR("server.authserver", "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the authserver. Accessible processors bitmask (hex): %x", affinity, appAff);
else if (SetProcessAffinityMask(hProcess, currentAffinity))
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Using processors (bitmask, hex): %x", currentAffinity);
+ TC_LOG_INFO("server.authserver", "Using processors (bitmask, hex): %x", currentAffinity);
else
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set used processors (hex): %x", currentAffinity);
+ TC_LOG_ERROR("server.authserver", "Can't set used processors (hex): %x", currentAffinity);
}
}
if (highPriority)
{
if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "authserver process priority class set to HIGH");
+ TC_LOG_INFO("server.authserver", "authserver process priority class set to HIGH");
else
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set authserver process priority class.");
+ TC_LOG_ERROR("server.authserver", "Can't set authserver process priority class.");
}
}
#elif __linux__ // Linux
@@ -224,21 +224,21 @@ extern int main(int argc, char** argv)
CPU_SET(i, &mask);
if (sched_setaffinity(0, sizeof(mask), &mask))
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
+ TC_LOG_ERROR("server.authserver", "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
else
{
CPU_ZERO(&mask);
sched_getaffinity(0, sizeof(mask), &mask);
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Using processors (bitmask, hex): %x", *(uint32*)(&mask));
+ TC_LOG_INFO("server.authserver", "Using processors (bitmask, hex): %x", *(uint32*)(&mask));
}
}
if (highPriority)
{
if (setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set authserver process priority class, error: %s", strerror(errno));
+ TC_LOG_ERROR("server.authserver", "Can't set authserver process priority class, error: %s", strerror(errno));
else
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "authserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
+ TC_LOG_INFO("server.authserver", "authserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
}
#endif
@@ -259,7 +259,7 @@ extern int main(int argc, char** argv)
if ((++loopCounter) == numLoops)
{
loopCounter = 0;
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Ping MySQL to keep connection alive");
+ TC_LOG_INFO("server.authserver", "Ping MySQL to keep connection alive");
LoginDatabase.KeepAlive();
}
}
@@ -267,7 +267,7 @@ extern int main(int argc, char** argv)
// Close the Database Pool and library
StopDB();
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Halting process...");
+ TC_LOG_INFO("server.authserver", "Halting process...");
return 0;
}
@@ -279,32 +279,32 @@ bool StartDB()
std::string dbstring = sConfigMgr->GetStringDefault("LoginDatabaseInfo", "");
if (dbstring.empty())
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Database not specified");
+ TC_LOG_ERROR("server.authserver", "Database not specified");
return false;
}
int32 worker_threads = sConfigMgr->GetIntDefault("LoginDatabase.WorkerThreads", 1);
if (worker_threads < 1 || worker_threads > 32)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1.");
+ TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1.");
worker_threads = 1;
}
int32 synch_threads = sConfigMgr->GetIntDefault("LoginDatabase.SynchThreads", 1);
if (synch_threads < 1 || synch_threads > 32)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1.");
+ TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1.");
synch_threads = 1;
}
// NOTE: While authserver is singlethreaded you should keep synch_threads == 1. Increasing it is just silly since only 1 will be used ever.
if (!LoginDatabase.Open(dbstring, uint8(worker_threads), uint8(synch_threads)))
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Cannot connect to database");
+ TC_LOG_ERROR("server.authserver", "Cannot connect to database");
return false;
}
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Started auth database connection pool.");
+ TC_LOG_INFO("server.authserver", "Started auth database connection pool.");
sLog->SetRealmId(0); // Enables DB appenders when realm is set.
return true;
}
diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp
index 0d8764a61c0..34120f75e88 100644
--- a/src/server/authserver/Realms/RealmList.cpp
+++ b/src/server/authserver/Realms/RealmList.cpp
@@ -68,7 +68,7 @@ void RealmList::UpdateIfNeed()
void RealmList::UpdateRealms(bool init)
{
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Updating Realm List...");
+ TC_LOG_INFO("server.authserver", "Updating Realm List...");
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST);
PreparedQueryResult result = LoginDatabase.Query(stmt);
@@ -99,7 +99,7 @@ void RealmList::UpdateRealms(bool init)
UpdateRealm(realmId, name, externalAddr, localAddr, submask, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
if (init)
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Added realm \"%s\" at %s:%u.", name.c_str(), m_realms[name].ExternalAddress.get_host_addr(), port);
+ TC_LOG_INFO("server.authserver", "Added realm \"%s\" at %s:%u.", name.c_str(), m_realms[name].ExternalAddress.get_host_addr(), port);
}
while (result->NextRow());
}
diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h
index d59990135f2..bf9493ad372 100644
--- a/src/server/authserver/Realms/RealmList.h
+++ b/src/server/authserver/Realms/RealmList.h
@@ -60,7 +60,7 @@ public:
typedef std::map<std::string, Realm> RealmMap;
RealmList();
- ~RealmList() {}
+ ~RealmList() { }
void Initialize(uint32 updateInterval);
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index 4a9d3ce7faf..6595b6238b2 100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -206,17 +206,17 @@ AuthSocket::AuthSocket(RealmSocket& socket) :
}
// Close patch file descriptor before leaving
-AuthSocket::~AuthSocket(void) {}
+AuthSocket::~AuthSocket(void) { }
// Accept the connection
void AuthSocket::OnAccept(void)
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
}
void AuthSocket::OnClose(void)
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "AuthSocket::OnClose");
+ TC_LOG_DEBUG("server.authserver", "AuthSocket::OnClose");
}
// Read the packet from the client
@@ -235,7 +235,7 @@ void AuthSocket::OnRead()
++challengesInARow;
if (challengesInARow == MAX_AUTH_LOGON_CHALLENGES_IN_A_ROW)
{
- TC_LOG_WARN(LOG_FILTER_AUTHSERVER, "Got %u AUTH_LOGON_CHALLENGE in a row from '%s', possible ongoing DoS", challengesInARow, socket().getRemoteAddress().c_str());
+ TC_LOG_WARN("server.authserver", "Got %u AUTH_LOGON_CHALLENGE in a row from '%s', possible ongoing DoS", challengesInARow, socket().getRemoteAddress().c_str());
socket().shutdown();
return;
}
@@ -248,11 +248,11 @@ void AuthSocket::OnRead()
{
if ((uint8)table[i].cmd == _cmd && (table[i].status == STATUS_CONNECTED || (_authed && table[i].status == STATUS_AUTHED)))
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
+ TC_LOG_DEBUG("server.authserver", "Got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
if (!(*this.*table[i].handler)())
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
+ TC_LOG_DEBUG("server.authserver", "Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
return;
}
break;
@@ -262,7 +262,7 @@ void AuthSocket::OnRead()
// Report unknown packets in the error log
if (i == AUTH_TOTAL_COMMANDS)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Got unknown packet from '%s'", socket().getRemoteAddress().c_str());
+ TC_LOG_ERROR("server.authserver", "Got unknown packet from '%s'", socket().getRemoteAddress().c_str());
socket().shutdown();
return;
}
@@ -311,7 +311,7 @@ void AuthSocket::_SetVSFields(const std::string& rI)
// Logon Challenge command handler
bool AuthSocket::_HandleLogonChallenge()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleLogonChallenge");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleLogonChallenge");
if (socket().recv_len() < sizeof(sAuthLogonChallenge_C))
return false;
@@ -326,7 +326,7 @@ bool AuthSocket::_HandleLogonChallenge()
#endif
uint16 remaining = ((sAuthLogonChallenge_C *)&buf[0])->size;
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] got header, body is %#04x bytes", remaining);
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got header, body is %#04x bytes", remaining);
if ((remaining < sizeof(sAuthLogonChallenge_C) - buf.size()) || (socket().recv_len() < remaining))
return false;
@@ -338,8 +338,8 @@ bool AuthSocket::_HandleLogonChallenge()
// Read the remaining of the packet
socket().recv((char *)&buf[4], remaining);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] got full packet, %#04x bytes", ch->size);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I);
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", ch->size);
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I);
// BigEndian code, nop in little endian case
// size already converted
@@ -379,7 +379,7 @@ bool AuthSocket::_HandleLogonChallenge()
if (result)
{
pkt << uint8(WOW_FAIL_BANNED);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned ip tries to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort());
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Banned ip tries to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort());
}
else
{
@@ -397,24 +397,24 @@ bool AuthSocket::_HandleLogonChallenge()
bool locked = false;
if (fields[2].GetUInt8() == 1) // if ip is locked
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[3].GetCString());
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Player address is '%s'", ip_address.c_str());
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[3].GetCString());
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Player address is '%s'", ip_address.c_str());
if (strcmp(fields[4].GetCString(), ip_address.c_str()) != 0)
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account IP differs");
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account IP differs");
pkt << uint8(WOW_FAIL_LOCKED_ENFORCED);
locked = true;
}
else
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account IP matches");
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account IP matches");
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is not locked to ip", _login.c_str());
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to ip", _login.c_str());
std::string accountCountry = fields[3].GetString();
if (accountCountry.empty() || accountCountry == "00")
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is not locked to country", _login.c_str());
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to country", _login.c_str());
else if (!accountCountry.empty())
{
uint32 ip = inet_addr(ip_address.c_str());
@@ -425,18 +425,18 @@ bool AuthSocket::_HandleLogonChallenge()
if (PreparedQueryResult sessionCountryQuery = LoginDatabase.Query(stmt))
{
std::string loginCountry = (*sessionCountryQuery)[0].GetString();
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _login.c_str(), accountCountry.c_str(), loginCountry.c_str());
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _login.c_str(), accountCountry.c_str(), loginCountry.c_str());
if (loginCountry != accountCountry)
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account country differs.");
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account country differs.");
pkt << uint8(WOW_FAIL_UNLOCKABLE_LOCK);
locked = true;
}
else
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account country matches");
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account country matches");
}
else
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[AuthChallenge] IP2NATION Table empty");
+ TC_LOG_DEBUG("server.authserver", "[AuthChallenge] IP2NATION Table empty");
}
}
@@ -454,12 +454,12 @@ bool AuthSocket::_HandleLogonChallenge()
if ((*banresult)[0].GetUInt32() == (*banresult)[1].GetUInt32())
{
pkt << uint8(WOW_FAIL_BANNED);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
}
else
{
pkt << uint8(WOW_FAIL_SUSPENDED);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
}
}
else
@@ -471,7 +471,7 @@ bool AuthSocket::_HandleLogonChallenge()
std::string databaseV = fields[6].GetString();
std::string databaseS = fields[7].GetString();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str());
+ TC_LOG_DEBUG("network", "database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str());
// multiply with 2 since bytes are stored as hexstring
if (databaseV.size() != s_BYTE_SIZE * 2 || databaseS.size() != s_BYTE_SIZE * 2)
@@ -539,7 +539,7 @@ bool AuthSocket::_HandleLogonChallenge()
for (int i = 0; i < 4; ++i)
_localizationName[i] = ch->country[4-i-1];
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(),
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(),
_login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName)
);
}
@@ -556,7 +556,7 @@ bool AuthSocket::_HandleLogonChallenge()
// Logon Proof command handler
bool AuthSocket::_HandleLogonProof()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleLogonProof");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleLogonProof");
// Read the packet
sAuthLogonProof_C lp;
@@ -567,7 +567,7 @@ bool AuthSocket::_HandleLogonProof()
if (_expversion == NO_VALID_EXP_FLAG)
{
// Check if we have the appropriate patch on the disk
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Client with invalid version, patching is not implemented");
+ TC_LOG_DEBUG("network", "Client with invalid version, patching is not implemented");
socket().shutdown();
return true;
}
@@ -651,7 +651,7 @@ bool AuthSocket::_HandleLogonProof()
// Check if SRP6 results match (password is correct), else send an error
if (!memcmp(M.AsByteArray().get(), lp.M1, 20))
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
// Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account
// No SQL injection (escaped user name) and IP address as received by socket
@@ -663,7 +663,7 @@ bool AuthSocket::_HandleLogonProof()
stmt->setUInt32(2, GetLocaleByName(_localizationName));
stmt->setString(3, _os);
stmt->setString(4, _login);
- LoginDatabase.Execute(stmt);
+ LoginDatabase.DirectExecute(stmt);
OPENSSL_free((void*)K_hex);
@@ -719,7 +719,7 @@ bool AuthSocket::_HandleLogonProof()
char data[4] = { AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0 };
socket().send(data, sizeof(data));
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
uint32 MaxWrongPassCount = sConfigMgr->GetIntDefault("WrongPass.MaxCount", 0);
if (MaxWrongPassCount > 0)
@@ -749,7 +749,7 @@ bool AuthSocket::_HandleLogonProof()
stmt->setUInt32(1, WrongPassBanTime);
LoginDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str(), WrongPassBanTime, failed_logins);
}
else
@@ -759,7 +759,7 @@ bool AuthSocket::_HandleLogonProof()
stmt->setUInt32(1, WrongPassBanTime);
LoginDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times",
+ TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times",
socket().getRemoteAddress().c_str(), socket().getRemotePort(), socket().getRemoteAddress().c_str(), WrongPassBanTime, _login.c_str(), failed_logins);
}
}
@@ -773,7 +773,7 @@ bool AuthSocket::_HandleLogonProof()
// Reconnect Challenge command handler
bool AuthSocket::_HandleReconnectChallenge()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleReconnectChallenge");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectChallenge");
if (socket().recv_len() < sizeof(sAuthLogonChallenge_C))
return false;
@@ -788,7 +788,7 @@ bool AuthSocket::_HandleReconnectChallenge()
#endif
uint16 remaining = ((sAuthLogonChallenge_C *)&buf[0])->size;
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] got header, body is %#04x bytes", remaining);
+ TC_LOG_DEBUG("server.authserver", "[ReconnectChallenge] got header, body is %#04x bytes", remaining);
if ((remaining < sizeof(sAuthLogonChallenge_C) - buf.size()) || (socket().recv_len() < remaining))
return false;
@@ -800,8 +800,8 @@ bool AuthSocket::_HandleReconnectChallenge()
// Read the remaining of the packet
socket().recv((char *)&buf[4], remaining);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] got full packet, %#04x bytes", ch->size);
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I);
+ TC_LOG_DEBUG("server.authserver", "[ReconnectChallenge] got full packet, %#04x bytes", ch->size);
+ TC_LOG_DEBUG("server.authserver", "[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I);
_login = (const char*)ch->I;
@@ -812,7 +812,7 @@ bool AuthSocket::_HandleReconnectChallenge()
// Stop if the account is not found
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
+ TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
socket().shutdown();
return false;
}
@@ -848,7 +848,7 @@ bool AuthSocket::_HandleReconnectChallenge()
// Reconnect Proof command handler
bool AuthSocket::_HandleReconnectProof()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleReconnectProof");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectProof");
// Read the packet
sAuthReconnectProof_C lp;
if (!socket().recv((char *)&lp, sizeof(sAuthReconnectProof_C)))
@@ -879,7 +879,7 @@ bool AuthSocket::_HandleReconnectProof()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
+ TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
socket().shutdown();
return false;
}
@@ -910,7 +910,7 @@ ACE_INET_Addr const& AuthSocket::GetAddressForClient(Realm const& realm, ACE_INE
// Realm List command handler
bool AuthSocket::_HandleRealmList()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleRealmList");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleRealmList");
if (socket().recv_len() < 5)
return false;
@@ -923,7 +923,7 @@ bool AuthSocket::_HandleRealmList()
PreparedQueryResult result = LoginDatabase.Query(stmt);
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
+ TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
socket().shutdown();
return false;
}
@@ -1040,11 +1040,11 @@ bool AuthSocket::_HandleRealmList()
// Resume patch transfer
bool AuthSocket::_HandleXferResume()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleXferResume");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleXferResume");
// Check packet length and patch existence
if (socket().recv_len() < 9 || !pPatch) // FIXME: pPatch is never used
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Error while resuming patch transfer (wrong packet)");
+ TC_LOG_ERROR("server.authserver", "Error while resuming patch transfer (wrong packet)");
return false;
}
@@ -1061,7 +1061,7 @@ bool AuthSocket::_HandleXferResume()
// Cancel patch transfer
bool AuthSocket::_HandleXferCancel()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleXferCancel");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleXferCancel");
// Close and delete the socket
socket().recv_skip(1); //clear input buffer
@@ -1073,12 +1073,12 @@ bool AuthSocket::_HandleXferCancel()
// Accept patch transfer
bool AuthSocket::_HandleXferAccept()
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Entering _HandleXferAccept");
+ TC_LOG_DEBUG("server.authserver", "Entering _HandleXferAccept");
// Check packet length and patch existence
if (!pPatch)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Error while accepting patch transfer (wrong packet)");
+ TC_LOG_ERROR("server.authserver", "Error while accepting patch transfer (wrong packet)");
return false;
}
@@ -1096,9 +1096,7 @@ PatcherRunnable::PatcherRunnable(class AuthSocket* as)
}
// Send content of patch file to the client
-void PatcherRunnable::run()
-{
-}
+void PatcherRunnable::run() { }
// Preload MD5 hashes of existing patch files on server
#ifndef _WIN32
@@ -1161,11 +1159,11 @@ void Patcher::LoadPatchMD5(char *szFileName)
std::string path = "./patches/";
path += szFileName;
FILE* pPatch = fopen(path.c_str(), "rb");
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Loading patch info from %s\n", path.c_str());
+ TC_LOG_DEBUG("network", "Loading patch info from %s\n", path.c_str());
if (!pPatch)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Error loading patch %s\n", path.c_str());
+ TC_LOG_ERROR("server.authserver", "Error loading patch %s\n", path.c_str());
return;
}
diff --git a/src/server/authserver/Server/RealmAcceptor.h b/src/server/authserver/Server/RealmAcceptor.h
index a982417c3d6..39877f71538 100644
--- a/src/server/authserver/Server/RealmAcceptor.h
+++ b/src/server/authserver/Server/RealmAcceptor.h
@@ -48,7 +48,7 @@ protected:
virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/)
{
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Resuming acceptor");
+ TC_LOG_DEBUG("server.authserver", "Resuming acceptor");
reactor()->cancel_timer(this, 1);
return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK);
}
@@ -58,7 +58,7 @@ protected:
#if defined(ENFILE) && defined(EMFILE)
if (errno == ENFILE || errno == EMFILE)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Out of file descriptors, suspending incoming connections for 10 seconds");
+ TC_LOG_ERROR("server.authserver", "Out of file descriptors, suspending incoming connections for 10 seconds");
reactor()->remove_handler(this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
reactor()->schedule_timer(this, NULL, ACE_Time_Value(10));
}
diff --git a/src/server/authserver/Server/RealmSocket.cpp b/src/server/authserver/Server/RealmSocket.cpp
index 88d81132306..13bc71f99a4 100644
--- a/src/server/authserver/Server/RealmSocket.cpp
+++ b/src/server/authserver/Server/RealmSocket.cpp
@@ -23,7 +23,7 @@
#include "RealmSocket.h"
#include "Log.h"
-RealmSocket::Session::Session(void) {}
+RealmSocket::Session::Session(void) { }
RealmSocket::Session::~Session(void) { }
@@ -56,7 +56,7 @@ int RealmSocket::open(void * arg)
if (peer().get_remote_addr(addr) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Error %s while opening realm socket!", ACE_OS::strerror(errno));
+ TC_LOG_ERROR("server.authserver", "Error %s while opening realm socket!", ACE_OS::strerror(errno));
return -1;
}
diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist
index 3c811eda3b3..83edf9669ac 100644
--- a/src/server/authserver/authserver.conf.dist
+++ b/src/server/authserver/authserver.conf.dist
@@ -219,6 +219,11 @@ LoginDatabase.WorkerThreads = 1
Appender.Console=1,2,0
Appender.Auth=2,2,0,Auth.log,w
+# Logger config values: Given a logger "name"
+# Logger.name
+# Description: Defines 'What to log'
+# Format: LogLevel,AppenderList
+#
# LogLevel
# 0 - (Disabled)
# 1 - (Trace)
@@ -231,33 +236,8 @@ Appender.Auth=2,2,0,Auth.log,w
# AppenderList: List of appenders linked to logger
# (Using spaces as separator).
#
-# Appenders
-# Description: List of Appenders to read from config
-# (Using spaces as separator).
-# Default: "Console Server"
-
-Appenders=Console Auth
-
-# Logger config values: Given a logger "name"
-# Logger.name
-# Description: Defines 'What to log'
-# Format: Type,LogLevel,AppenderList
-# Type
-# 0 - Default. Each type that has no config will
-# rely on this one. Core will create this logger
-# (disabled) if it's not configured
-# 7 - Network input/output,
-# 30 - Authserver
-
-Logger.Root=0,3,Console Auth
-
-#
-# Loggers
-# Description: List of Loggers to read from config
-# (Using spaces as separator).
-# Default: "root"
-Loggers=Root
+Logger.root=3,Console Auth
#
###################################################################################################
diff --git a/src/server/collision/BoundingIntervalHierarchyWrapper.h b/src/server/collision/BoundingIntervalHierarchyWrapper.h
index 8696a759fa8..8aafc023a20 100644
--- a/src/server/collision/BoundingIntervalHierarchyWrapper.h
+++ b/src/server/collision/BoundingIntervalHierarchyWrapper.h
@@ -35,7 +35,7 @@ class BIHWrap
RayCallback& _callback;
uint32 objects_size;
- MDLCallback(RayCallback& callback, const T* const* objects_array, uint32 objects_size ) : objects(objects_array), _callback(callback), objects_size(objects_size) {}
+ MDLCallback(RayCallback& callback, const T* const* objects_array, uint32 objects_size ) : objects(objects_array), _callback(callback), objects_size(objects_size) { }
/// Intersect ray
bool operator() (const G3D::Ray& ray, uint32 idx, float& maxDist, bool /*stopAtFirst*/)
@@ -66,7 +66,7 @@ class BIHWrap
int unbalanced_times;
public:
- BIHWrap() : unbalanced_times(0) {}
+ BIHWrap() : unbalanced_times(0) { }
void insert(const T& obj)
{
diff --git a/src/server/collision/DynamicTree.cpp b/src/server/collision/DynamicTree.cpp
index aebcee0d689..2f4985757db 100644
--- a/src/server/collision/DynamicTree.cpp
+++ b/src/server/collision/DynamicTree.cpp
@@ -107,9 +107,7 @@ struct DynTreeImpl : public ParentTree/*, public Intersectable*/
int unbalanced_times;
};
-DynamicMapTree::DynamicMapTree() : impl(new DynTreeImpl())
-{
-}
+DynamicMapTree::DynamicMapTree() : impl(new DynTreeImpl()) { }
DynamicMapTree::~DynamicMapTree()
{
@@ -150,7 +148,7 @@ struct DynamicTreeIntersectionCallback
{
bool did_hit;
uint32 phase_mask;
- DynamicTreeIntersectionCallback(uint32 phasemask) : did_hit(false), phase_mask(phasemask) {}
+ DynamicTreeIntersectionCallback(uint32 phasemask) : did_hit(false), phase_mask(phasemask) { }
bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
{
did_hit = obj.intersectRay(r, distance, true, phase_mask);
@@ -165,16 +163,16 @@ struct DynamicTreeIntersectionCallback_WithLogger
uint32 phase_mask;
DynamicTreeIntersectionCallback_WithLogger(uint32 phasemask) : did_hit(false), phase_mask(phasemask)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Dynamic Intersection log");
+ TC_LOG_DEBUG("maps", "Dynamic Intersection log");
}
bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "testing intersection with %s", obj.name.c_str());
+ TC_LOG_DEBUG("maps", "testing intersection with %s", obj.name.c_str());
bool hit = obj.intersectRay(r, distance, true, phase_mask);
if (hit)
{
did_hit = true;
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "result: intersects");
+ TC_LOG_DEBUG("maps", "result: intersects");
}
return hit;
}
diff --git a/src/server/collision/Management/IVMapManager.h b/src/server/collision/Management/IVMapManager.h
index 9289d820e5b..7269d2e05f4 100644
--- a/src/server/collision/Management/IVMapManager.h
+++ b/src/server/collision/Management/IVMapManager.h
@@ -49,9 +49,9 @@ namespace VMAP
bool iEnableHeightCalc;
public:
- IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) {}
+ IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) { }
- virtual ~IVMapManager(void) {}
+ virtual ~IVMapManager(void) { }
virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;
diff --git a/src/server/collision/Management/MMapManager.cpp b/src/server/collision/Management/MMapManager.cpp
index 65c13c07e66..4e6b3bb6d10 100644
--- a/src/server/collision/Management/MMapManager.cpp
+++ b/src/server/collision/Management/MMapManager.cpp
@@ -46,7 +46,7 @@ namespace MMAP
FILE* file = fopen(fileName, "rb");
if (!file)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:loadMapData: Error: Could not open mmap file '%s'", fileName);
+ TC_LOG_DEBUG("maps", "MMAP:loadMapData: Error: Could not open mmap file '%s'", fileName);
delete [] fileName;
return false;
}
@@ -56,7 +56,7 @@ namespace MMAP
fclose(file);
if (count != 1)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:loadMapData: Error: Could not read params from file '%s'", fileName);
+ TC_LOG_DEBUG("maps", "MMAP:loadMapData: Error: Could not read params from file '%s'", fileName);
delete [] fileName;
return false;
}
@@ -66,14 +66,14 @@ namespace MMAP
if (dtStatusFailed(mesh->init(&params)))
{
dtFreeNavMesh(mesh);
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMapData: Failed to initialize dtNavMesh for mmap %03u from file %s", mapId, fileName);
+ TC_LOG_ERROR("maps", "MMAP:loadMapData: Failed to initialize dtNavMesh for mmap %03u from file %s", mapId, fileName);
delete [] fileName;
return false;
}
delete [] fileName;
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:loadMapData: Loaded %03i.mmap", mapId);
+ TC_LOG_INFO("maps", "MMAP:loadMapData: Loaded %03i.mmap", mapId);
// store inside our map list
MMapData* mmap_data = new MMapData(mesh);
@@ -112,7 +112,7 @@ namespace MMAP
FILE* file = fopen(fileName, "rb");
if (!file)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:loadMap: Could not open mmtile file '%s'", fileName);
+ TC_LOG_DEBUG("maps", "MMAP:loadMap: Could not open mmtile file '%s'", fileName);
delete [] fileName;
return false;
}
@@ -122,14 +122,14 @@ namespace MMAP
MmapTileHeader fileHeader;
if (fread(&fileHeader, sizeof(MmapTileHeader), 1, file) != 1 || fileHeader.mmapMagic != MMAP_MAGIC)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMap: Bad header in mmap %03u%02i%02i.mmtile", mapId, x, y);
+ TC_LOG_ERROR("maps", "MMAP:loadMap: Bad header in mmap %03u%02i%02i.mmtile", mapId, x, y);
fclose(file);
return false;
}
if (fileHeader.mmapVersion != MMAP_VERSION)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMap: %03u%02i%02i.mmtile was built with generator v%i, expected v%i",
+ TC_LOG_ERROR("maps", "MMAP:loadMap: %03u%02i%02i.mmtile was built with generator v%i, expected v%i",
mapId, x, y, fileHeader.mmapVersion, MMAP_VERSION);
fclose(file);
return false;
@@ -141,7 +141,7 @@ namespace MMAP
size_t result = fread(data, fileHeader.size, 1, file);
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMap: Bad header or data in mmap %03u%02i%02i.mmtile", mapId, x, y);
+ TC_LOG_ERROR("maps", "MMAP:loadMap: Bad header or data in mmap %03u%02i%02i.mmtile", mapId, x, y);
fclose(file);
return false;
}
@@ -156,12 +156,12 @@ namespace MMAP
{
mmap->mmapLoadedTiles.insert(std::pair<uint32, dtTileRef>(packedGridPos, tileRef));
++loadedTiles;
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:loadMap: Loaded mmtile %03i[%02i, %02i] into %03i[%02i, %02i]", mapId, x, y, mapId, header->x, header->y);
+ TC_LOG_INFO("maps", "MMAP:loadMap: Loaded mmtile %03i[%02i, %02i] into %03i[%02i, %02i]", mapId, x, y, mapId, header->x, header->y);
return true;
}
else
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMap: Could not load %03u%02i%02i.mmtile into navmesh", mapId, x, y);
+ TC_LOG_ERROR("maps", "MMAP:loadMap: Could not load %03u%02i%02i.mmtile into navmesh", mapId, x, y);
dtFree(data);
return false;
}
@@ -175,7 +175,7 @@ namespace MMAP
if (loadedMMaps.find(mapId) == loadedMMaps.end())
{
// file may not exist, therefore not loaded
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:unloadMap: Asked to unload not loaded navmesh map. %03u%02i%02i.mmtile", mapId, x, y);
+ TC_LOG_DEBUG("maps", "MMAP:unloadMap: Asked to unload not loaded navmesh map. %03u%02i%02i.mmtile", mapId, x, y);
return false;
}
@@ -186,7 +186,7 @@ namespace MMAP
if (mmap->mmapLoadedTiles.find(packedGridPos) == mmap->mmapLoadedTiles.end())
{
// file may not exist, therefore not loaded
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:unloadMap: Asked to unload not loaded navmesh tile. %03u%02i%02i.mmtile", mapId, x, y);
+ TC_LOG_DEBUG("maps", "MMAP:unloadMap: Asked to unload not loaded navmesh tile. %03u%02i%02i.mmtile", mapId, x, y);
return false;
}
@@ -198,14 +198,14 @@ namespace MMAP
// this is technically a memory leak
// if the grid is later reloaded, dtNavMesh::addTile will return error but no extra memory is used
// we cannot recover from this error - assert out
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
+ TC_LOG_ERROR("maps", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
ASSERT(false);
}
else
{
mmap->mmapLoadedTiles.erase(packedGridPos);
--loadedTiles;
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId);
+ TC_LOG_INFO("maps", "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId);
return true;
}
@@ -217,7 +217,7 @@ namespace MMAP
if (loadedMMaps.find(mapId) == loadedMMaps.end())
{
// file may not exist, therefore not loaded
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:unloadMap: Asked to unload not loaded navmesh map %03u", mapId);
+ TC_LOG_DEBUG("maps", "MMAP:unloadMap: Asked to unload not loaded navmesh map %03u", mapId);
return false;
}
@@ -228,17 +228,17 @@ namespace MMAP
uint32 x = (i->first >> 16);
uint32 y = (i->first & 0x0000FFFF);
if (dtStatusFailed(mmap->navMesh->removeTile(i->second, NULL, NULL)))
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
+ TC_LOG_ERROR("maps", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
else
{
--loadedTiles;
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId);
+ TC_LOG_INFO("maps", "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId);
}
}
delete mmap;
loadedMMaps.erase(mapId);
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMap: Unloaded %03i.mmap", mapId);
+ TC_LOG_INFO("maps", "MMAP:unloadMap: Unloaded %03i.mmap", mapId);
return true;
}
@@ -249,14 +249,14 @@ namespace MMAP
if (loadedMMaps.find(mapId) == loadedMMaps.end())
{
// file may not exist, therefore not loaded
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:unloadMapInstance: Asked to unload not loaded navmesh map %03u", mapId);
+ TC_LOG_DEBUG("maps", "MMAP:unloadMapInstance: Asked to unload not loaded navmesh map %03u", mapId);
return false;
}
MMapData* mmap = loadedMMaps[mapId];
if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end())
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:unloadMapInstance: Asked to unload not loaded dtNavMeshQuery mapId %03u instanceId %u", mapId, instanceId);
+ TC_LOG_DEBUG("maps", "MMAP:unloadMapInstance: Asked to unload not loaded dtNavMeshQuery mapId %03u instanceId %u", mapId, instanceId);
return false;
}
@@ -264,7 +264,7 @@ namespace MMAP
dtFreeNavMeshQuery(query);
mmap->navMeshQueries.erase(instanceId);
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMapInstance: Unloaded mapId %03u instanceId %u", mapId, instanceId);
+ TC_LOG_INFO("maps", "MMAP:unloadMapInstance: Unloaded mapId %03u instanceId %u", mapId, instanceId);
return true;
}
@@ -291,11 +291,11 @@ namespace MMAP
if (dtStatusFailed(query->init(mmap->navMesh, 1024)))
{
dtFreeNavMeshQuery(query);
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
+ TC_LOG_ERROR("maps", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
return NULL;
}
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:GetNavMeshQuery: created dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
+ TC_LOG_INFO("maps", "MMAP:GetNavMeshQuery: created dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
mmap->navMeshQueries.insert(std::pair<uint32, dtNavMeshQuery*>(instanceId, query));
}
diff --git a/src/server/collision/Management/MMapManager.h b/src/server/collision/Management/MMapManager.h
index 56b1b856d65..9a04d638805 100644
--- a/src/server/collision/Management/MMapManager.h
+++ b/src/server/collision/Management/MMapManager.h
@@ -33,7 +33,7 @@ namespace MMAP
// dummy struct to hold map's mmap data
struct MMapData
{
- MMapData(dtNavMesh* mesh) : navMesh(mesh) {}
+ MMapData(dtNavMesh* mesh) : navMesh(mesh) { }
~MMapData()
{
for (NavMeshQuerySet::iterator i = navMeshQueries.begin(); i != navMeshQueries.end(); ++i)
@@ -58,7 +58,7 @@ namespace MMAP
class MMapManager
{
public:
- MMapManager() : loadedTiles(0) {}
+ MMapManager() : loadedTiles(0) { }
~MMapManager();
bool loadMap(const std::string& basePath, uint32 mapId, int32 x, int32 y);
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp
index 6355dbcf4ce..975c6777774 100644
--- a/src/server/collision/Management/VMapManager2.cpp
+++ b/src/server/collision/Management/VMapManager2.cpp
@@ -260,11 +260,11 @@ namespace VMAP
WorldModel* worldmodel = new WorldModel();
if (!worldmodel->readFile(basepath + filename + ".vmo"))
{
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
+ VMAP_ERROR_LOG("misc", "VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
delete worldmodel;
return NULL;
}
- VMAP_DEBUG_LOG(LOG_FILTER_MAPS, "VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str());
+ VMAP_DEBUG_LOG("maps", "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);
}
@@ -280,12 +280,12 @@ namespace VMAP
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
{
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
+ VMAP_ERROR_LOG("misc", "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
return;
}
if (model->second.decRefCount() == 0)
{
- VMAP_DEBUG_LOG(LOG_FILTER_MAPS, "VMapManager2: unloading file '%s'", filename.c_str());
+ VMAP_DEBUG_LOG("maps", "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 51f15f0fda4..644e6004201 100644
--- a/src/server/collision/Management/VMapManager2.h
+++ b/src/server/collision/Management/VMapManager2.h
@@ -53,7 +53,7 @@ namespace VMAP
class ManagedModel
{
public:
- ManagedModel() : iModel(0), iRefCount(0) {}
+ ManagedModel() : iModel(0), iRefCount(0) { }
void setModel(WorldModel* model) { iModel = model; }
WorldModel* getModel() { return iModel; }
void incRefCount() { ++iRefCount; }
diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index 436f30eed10..8cb1e3d7064 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -36,7 +36,7 @@ namespace VMAP
class MapRayCallback
{
public:
- MapRayCallback(ModelInstance* val): prims(val), hit(false) {}
+ MapRayCallback(ModelInstance* val): prims(val), hit(false) { }
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool pStopAtFirstHit=true)
{
bool result = prims[entry].intersectRay(ray, distance, pStopAtFirstHit);
@@ -53,11 +53,11 @@ namespace VMAP
class AreaInfoCallback
{
public:
- AreaInfoCallback(ModelInstance* val): prims(val) {}
+ AreaInfoCallback(ModelInstance* val): prims(val) { }
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "AreaInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
+ TC_LOG_DEBUG("maps", "AreaInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
#endif
prims[entry].intersectPoint(point, aInfo);
}
@@ -69,11 +69,11 @@ namespace VMAP
class LocationInfoCallback
{
public:
- LocationInfoCallback(ModelInstance* val, LocationInfo &info): prims(val), locInfo(info), result(false) {}
+ LocationInfoCallback(ModelInstance* val, LocationInfo &info): prims(val), locInfo(info), result(false) { }
void operator()(const Vector3& point, uint32 entry)
{
#ifdef VMAP_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "LocationInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
+ TC_LOG_DEBUG("maps", "LocationInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
#endif
if (prims[entry].GetLocationInfo(point, locInfo))
result = true;
@@ -278,7 +278,7 @@ namespace VMAP
bool StaticMapTree::InitMap(const std::string &fname, VMapManager2* vm)
{
- VMAP_DEBUG_LOG(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : initializing StaticMapTree '%s'", fname.c_str());
+ VMAP_DEBUG_LOG("maps", "StaticMapTree::InitMap() : initializing StaticMapTree '%s'", fname.c_str());
bool success = false;
std::string fullname = iBasePath + fname;
FILE* rf = fopen(fullname.c_str(), "rb");
@@ -302,12 +302,12 @@ namespace VMAP
// only non-tiled maps have them, and if so exactly one (so far at least...)
ModelSpawn spawn;
#ifdef VMAP_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : map isTiled: %u", static_cast<uint32>(iIsTiled));
+ TC_LOG_DEBUG("maps", "StaticMapTree::InitMap() : map isTiled: %u", static_cast<uint32>(iIsTiled));
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
- VMAP_DEBUG_LOG(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading %s", spawn.name.c_str());
+ VMAP_DEBUG_LOG("maps", "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...)
@@ -317,7 +317,7 @@ namespace VMAP
else
{
success = false;
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str());
+ VMAP_ERROR_LOG("misc", "StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str());
}
}
@@ -352,7 +352,7 @@ namespace VMAP
}
if (!iTreeValues)
{
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY);
+ VMAP_ERROR_LOG("misc", "StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY);
return false;
}
bool result = true;
@@ -378,7 +378,7 @@ namespace VMAP
// acquire model instance
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
if (!model)
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
+ VMAP_ERROR_LOG("misc", "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
// update tree
uint32 referencedVal;
@@ -390,7 +390,7 @@ namespace VMAP
#ifdef VMAP_DEBUG
if (referencedVal > iNTreeValues)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u)", referencedVal, iNTreeValues);
+ TC_LOG_DEBUG("maps", "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u)", referencedVal, iNTreeValues);
continue;
}
#endif
@@ -402,9 +402,9 @@ namespace VMAP
++iLoadedSpawns[referencedVal];
#ifdef VMAP_DEBUG
if (iTreeValues[referencedVal].ID != spawn.ID)
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "StaticMapTree::LoadMapTile() : trying to load wrong spawn in node");
+ TC_LOG_DEBUG("maps", "StaticMapTree::LoadMapTile() : trying to load wrong spawn in node");
else if (iTreeValues[referencedVal].name != spawn.name)
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "StaticMapTree::LoadMapTile() : name collision on GUID=%u", spawn.ID);
+ TC_LOG_DEBUG("maps", "StaticMapTree::LoadMapTile() : name collision on GUID=%u", spawn.ID);
#endif
}
}
@@ -428,7 +428,7 @@ namespace VMAP
loadedTileMap::iterator tile = iLoadedTiles.find(tileID);
if (tile == iLoadedTiles.end())
{
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY);
+ VMAP_ERROR_LOG("misc", "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
@@ -462,7 +462,7 @@ namespace VMAP
else
{
if (!iLoadedSpawns.count(referencedNode))
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
+ VMAP_ERROR_LOG("misc", "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
else if (--iLoadedSpawns[referencedNode] == 0)
{
iTreeValues[referencedNode].setUnloaded();
diff --git a/src/server/collision/Maps/MapTree.h b/src/server/collision/Maps/MapTree.h
index c66893da82f..1440ee0f250 100644
--- a/src/server/collision/Maps/MapTree.h
+++ b/src/server/collision/Maps/MapTree.h
@@ -31,7 +31,7 @@ namespace VMAP
struct LocationInfo
{
- LocationInfo(): hitInstance(0), hitModel(0), ground_Z(-G3D::inf()) {}
+ LocationInfo(): hitInstance(0), hitModel(0), ground_Z(-G3D::inf()) { }
const ModelInstance* hitInstance;
const GroupModel* hitModel;
float ground_Z;
@@ -86,7 +86,7 @@ namespace VMAP
struct AreaInfo
{
AreaInfo(): result(false), ground_Z(-G3D::inf()), flags(0), adtId(0),
- rootId(0), groupId(0) {}
+ rootId(0), groupId(0) { }
bool result;
float ground_Z;
uint32 flags;
diff --git a/src/server/collision/Maps/TileAssembler.h b/src/server/collision/Maps/TileAssembler.h
index 56cb7600e4f..715f228c3df 100644
--- a/src/server/collision/Maps/TileAssembler.h
+++ b/src/server/collision/Maps/TileAssembler.h
@@ -76,7 +76,7 @@ namespace VMAP
class WmoLiquid* liquid;
GroupModel_Raw() : mogpflags(0), GroupWMOID(0), liquidflags(0),
- liquid(NULL) {}
+ liquid(NULL) { }
~GroupModel_Raw();
bool Read(FILE* f);
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp
index a3af175a977..8bba2cf1b1b 100644
--- a/src/server/collision/Models/GameObjectModel.cpp
+++ b/src/server/collision/Models/GameObjectModel.cpp
@@ -37,7 +37,7 @@ using G3D::AABox;
struct GameobjectModelData
{
GameobjectModelData(const std::string& name_, const AABox& box) :
- bound(box), name(name_) {}
+ bound(box), name(name_) { }
AABox bound;
std::string name;
@@ -55,7 +55,7 @@ void LoadGameObjectModelList()
FILE* model_list_file = fopen((sWorld->GetDataPath() + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb");
if (!model_list_file)
{
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS);
+ VMAP_ERROR_LOG("misc", "Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS);
return;
}
@@ -74,7 +74,7 @@ void LoadGameObjectModelList()
|| fread(&v1, sizeof(Vector3), 1, model_list_file) != 1
|| fread(&v2, sizeof(Vector3), 1, model_list_file) != 1)
{
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS);
+ VMAP_ERROR_LOG("misc", "File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS);
break;
}
@@ -85,7 +85,7 @@ void LoadGameObjectModelList()
}
fclose(model_list_file);
- VMAP_INFO_LOG(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
+ VMAP_INFO_LOG("server.loading", ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
}
GameObjectModel::~GameObjectModel()
@@ -104,7 +104,7 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn
// ignore models with no bounds
if (mdl_box == G3D::AABox::zero())
{
- VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
+ VMAP_ERROR_LOG("misc", "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
return false;
}
diff --git a/src/server/collision/Models/GameObjectModel.h b/src/server/collision/Models/GameObjectModel.h
index 44abed55267..143337e88f9 100644
--- a/src/server/collision/Models/GameObjectModel.h
+++ b/src/server/collision/Models/GameObjectModel.h
@@ -45,7 +45,7 @@ class GameObjectModel /*, public Intersectable*/
float iScale;
VMAP::WorldModel* iModel;
- GameObjectModel() : phasemask(0), iModel(NULL) {}
+ GameObjectModel() : phasemask(0), iModel(NULL) { }
bool initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info);
public:
diff --git a/src/server/collision/Models/ModelInstance.h b/src/server/collision/Models/ModelInstance.h
index f26089bb46c..8ea2792393b 100644
--- a/src/server/collision/Models/ModelInstance.h
+++ b/src/server/collision/Models/ModelInstance.h
@@ -63,7 +63,7 @@ namespace VMAP
class ModelInstance: public ModelSpawn
{
public:
- ModelInstance(): iInvScale(0.0f), iModel(0) {}
+ ModelInstance(): iInvScale(0.0f), iModel(0) { }
ModelInstance(const ModelSpawn &spawn, WorldModel* model);
void setUnloaded() { iModel = 0; }
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool pStopAtFirstHit) const;
diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp
index 3c72cb80308..fcb28e5e331 100644
--- a/src/server/collision/Models/WorldModel.cpp
+++ b/src/server/collision/Models/WorldModel.cpp
@@ -84,7 +84,7 @@ namespace VMAP
class TriBoundFunc
{
public:
- TriBoundFunc(std::vector<Vector3> &vert): vertices(vert.begin()) {}
+ TriBoundFunc(std::vector<Vector3> &vert): vertices(vert.begin()) { }
void operator()(const MeshTriangle &tri, G3D::AABox &out) const
{
G3D::Vector3 lo = vertices[tri.idx0];
@@ -360,7 +360,7 @@ namespace VMAP
struct GModelRayCallback
{
GModelRayCallback(const std::vector<MeshTriangle> &tris, const std::vector<Vector3> &vert):
- vertices(vert.begin()), triangles(tris.begin()), hit(false) {}
+ vertices(vert.begin()), triangles(tris.begin()), hit(false) { }
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool /*pStopAtFirstHit*/)
{
bool result = IntersectTriangle(triangles[entry], vertices, ray, distance);
@@ -420,7 +420,7 @@ namespace VMAP
struct WModelRayCallBack
{
- WModelRayCallBack(const std::vector<GroupModel> &mod): models(mod.begin()), hit(false) {}
+ WModelRayCallBack(const std::vector<GroupModel> &mod): models(mod.begin()), hit(false) { }
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool pStopAtFirstHit)
{
bool result = models[entry].IntersectRay(ray, distance, pStopAtFirstHit);
@@ -446,7 +446,7 @@ namespace VMAP
class WModelAreaCallback {
public:
WModelAreaCallback(const std::vector<GroupModel> &vals, const Vector3 &down):
- prims(vals.begin()), hit(vals.end()), minVol(G3D::inf()), zDist(G3D::inf()), zVec(down) {}
+ prims(vals.begin()), hit(vals.end()), minVol(G3D::inf()), zDist(G3D::inf()), zVec(down) { }
std::vector<GroupModel>::const_iterator prims;
std::vector<GroupModel>::const_iterator hit;
float minVol;
diff --git a/src/server/collision/Models/WorldModel.h b/src/server/collision/Models/WorldModel.h
index 9d588316cce..23fb1cdb7b6 100644
--- a/src/server/collision/Models/WorldModel.h
+++ b/src/server/collision/Models/WorldModel.h
@@ -36,8 +36,8 @@ namespace VMAP
class MeshTriangle
{
public:
- MeshTriangle(){}
- MeshTriangle(uint32 na, uint32 nb, uint32 nc): idx0(na), idx1(nb), idx2(nc) {}
+ MeshTriangle(){ }
+ MeshTriangle(uint32 na, uint32 nb, uint32 nc): idx0(na), idx1(nb), idx2(nc) { }
uint32 idx0;
uint32 idx1;
@@ -59,7 +59,7 @@ namespace VMAP
bool writeToFile(FILE* wf);
static bool readFromFile(FILE* rf, WmoLiquid* &liquid);
private:
- WmoLiquid(): iHeight(0), iFlags(0) {}
+ WmoLiquid(): iHeight(0), iFlags(0) { }
uint32 iTilesX; //!< number of tiles in x direction, each
uint32 iTilesY;
G3D::Vector3 iCorner; //!< the lower corner
@@ -74,10 +74,10 @@ namespace VMAP
class GroupModel
{
public:
- GroupModel(): iLiquid(0) {}
+ GroupModel(): iLiquid(0) { }
GroupModel(const GroupModel &other);
GroupModel(uint32 mogpFlags, uint32 groupWMOID, const G3D::AABox &bound):
- iBound(bound), iMogpFlags(mogpFlags), iGroupWMOID(groupWMOID), iLiquid(0) {}
+ iBound(bound), iMogpFlags(mogpFlags), iGroupWMOID(groupWMOID), iLiquid(0) { }
~GroupModel() { delete iLiquid; }
//! pass mesh data to object and create BIH. Passed vectors get get swapped with old geometry!
@@ -107,7 +107,7 @@ namespace VMAP
class WorldModel
{
public:
- WorldModel(): RootWMOID(0) {}
+ WorldModel(): RootWMOID(0) { }
//! pass group models to WorldModel and create BIH. Passed vector is swapped with old geometry!
void setGroupModels(std::vector<GroupModel> &models);
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index 85088bbeff4..723f8262181 100644
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -188,7 +188,7 @@ void CasterAI::UpdateAI(uint32 diff)
ArcherAI::ArcherAI(Creature* c) : CreatureAI(c)
{
if (!me->m_spells[0])
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "ArcherAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
+ TC_LOG_ERROR("misc", "ArcherAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->m_spells[0]);
m_minRange = spellInfo ? spellInfo->GetMinRange(false) : 0;
@@ -237,7 +237,7 @@ void ArcherAI::UpdateAI(uint32 /*diff*/)
TurretAI::TurretAI(Creature* c) : CreatureAI(c)
{
if (!me->m_spells[0])
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
+ TC_LOG_ERROR("misc", "TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->m_spells[0]);
m_minRange = spellInfo ? spellInfo->GetMinRange(false) : 0;
@@ -272,7 +272,7 @@ void TurretAI::UpdateAI(uint32 /*diff*/)
//VehicleAI
//////////////
-VehicleAI::VehicleAI(Creature* c) : CreatureAI(c), m_vehicle(c->GetVehicleKit()), m_IsVehicleInUse(false), m_ConditionsTimer(VEHICLE_CONDITION_CHECK_TIME)
+VehicleAI::VehicleAI(Creature* c) : CreatureAI(c), m_IsVehicleInUse(false), m_ConditionsTimer(VEHICLE_CONDITION_CHECK_TIME)
{
LoadConditions();
m_DoDismiss = false;
@@ -291,7 +291,9 @@ void VehicleAI::UpdateAI(uint32 diff)
m_DoDismiss = false;
me->SetVisible(false);
me->DespawnOrUnsummon();
- }else m_DismissTimer -= diff;
+ }
+ else
+ m_DismissTimer -= diff;
}
}
@@ -310,6 +312,7 @@ void VehicleAI::OnCharmed(bool apply)
}
else if (apply)
m_DoDismiss = false;//in use again
+
m_DismissTimer = VEHICLE_DISMISS_TIME;//reset timer
m_IsVehicleInUse = apply;
}
@@ -318,7 +321,7 @@ void VehicleAI::LoadConditions()
{
conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE, me->GetEntry());
if (!conditions.empty())
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "VehicleAI::LoadConditions: loaded %u conditions", uint32(conditions.size()));
+ TC_LOG_DEBUG("condition", "VehicleAI::LoadConditions: loaded %u conditions", uint32(conditions.size()));
}
void VehicleAI::CheckConditions(const uint32 diff)
@@ -327,19 +330,22 @@ void VehicleAI::CheckConditions(const uint32 diff)
{
if (!conditions.empty())
{
- for (SeatMap::iterator itr = m_vehicle->Seats.begin(); itr != m_vehicle->Seats.end(); ++itr)
- if (Unit* passenger = ObjectAccessor::GetUnit(*m_vehicle->GetBase(), itr->second.Passenger.Guid))
- {
- if (Player* player = passenger->ToPlayer())
+ if( Vehicle* vehicleKit = me->GetVehicleKit())
+ for (SeatMap::iterator itr = vehicleKit->Seats.begin(); itr != vehicleKit->Seats.end(); ++itr)
+ if (Unit* passenger = ObjectAccessor::GetUnit(*me, itr->second.Passenger.Guid))
{
- if (!sConditionMgr->IsObjectMeetToConditions(player, me, conditions))
+ if (Player* player = passenger->ToPlayer())
{
- player->ExitVehicle();
- return;//check other pessanger in next tick
+ if (!sConditionMgr->IsObjectMeetToConditions(player, me, conditions))
+ {
+ player->ExitVehicle();
+ return;//check other pessanger in next tick
+ }
}
}
- }
}
m_ConditionsTimer = VEHICLE_CONDITION_CHECK_TIME;
- } else m_ConditionsTimer -= diff;
+ }
+ else
+ m_ConditionsTimer -= diff;
}
diff --git a/src/server/game/AI/CoreAI/CombatAI.h b/src/server/game/AI/CoreAI/CombatAI.h
index 315ff861da9..3fac2c78962 100644
--- a/src/server/game/AI/CoreAI/CombatAI.h
+++ b/src/server/game/AI/CoreAI/CombatAI.h
@@ -28,7 +28,7 @@ class Creature;
class AggressorAI : public CreatureAI
{
public:
- explicit AggressorAI(Creature* c) : CreatureAI(c) {}
+ explicit AggressorAI(Creature* c) : CreatureAI(c) { }
void UpdateAI(uint32);
static int Permissible(const Creature*);
@@ -39,7 +39,7 @@ typedef std::vector<uint32> SpellVct;
class CombatAI : public CreatureAI
{
public:
- explicit CombatAI(Creature* c) : CreatureAI(c) {}
+ explicit CombatAI(Creature* c) : CreatureAI(c) { }
void InitializeAI();
void Reset();
@@ -72,7 +72,7 @@ struct ArcherAI : public CreatureAI
void AttackStart(Unit* who);
void UpdateAI(uint32 diff);
- static int Permissible(const Creature*);
+ static int Permissible(Creature const*);
protected:
float m_minRange;
};
@@ -81,11 +81,11 @@ struct TurretAI : public CreatureAI
{
public:
explicit TurretAI(Creature* c);
- bool CanAIAttack(const Unit* who) const;
+ bool CanAIAttack(Unit const* who) const;
void AttackStart(Unit* who);
void UpdateAI(uint32 diff);
- static int Permissible(const Creature*);
+ static int Permissible(Creature const*);
protected:
float m_minRange;
};
@@ -98,14 +98,13 @@ struct VehicleAI : public CreatureAI
explicit VehicleAI(Creature* c);
void UpdateAI(uint32 diff);
- static int Permissible(const Creature*);
+ static int Permissible(Creature const*);
void Reset();
- void MoveInLineOfSight(Unit*) {}
- void AttackStart(Unit*) {}
+ void MoveInLineOfSight(Unit*) { }
+ void AttackStart(Unit*) { }
void OnCharmed(bool apply);
private:
- Vehicle* m_vehicle;
bool m_IsVehicleInUse;
void LoadConditions();
void CheckConditions(const uint32 diff);
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.cpp b/src/server/game/AI/CoreAI/GameObjectAI.cpp
index 06e3a4b9ec4..adc82d7b018 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.cpp
+++ b/src/server/game/AI/CoreAI/GameObjectAI.cpp
@@ -18,7 +18,7 @@
#include "GameObjectAI.h"
-//GameObjectAI::GameObjectAI(GameObject* g) : go(g) {}
+//GameObjectAI::GameObjectAI(GameObject* g) : go(g) { }
int GameObjectAI::Permissible(const GameObject* go)
{
if (go->GetAIName() == "GameObjectAI")
@@ -26,4 +26,4 @@ int GameObjectAI::Permissible(const GameObject* go)
return PERMIT_BASE_NO;
}
-NullGameObjectAI::NullGameObjectAI(GameObject* g) : GameObjectAI(g) {}
+NullGameObjectAI::NullGameObjectAI(GameObject* g) : GameObjectAI(g) { }
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h
index 32a6e9a670c..0d5af4f8802 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.h
+++ b/src/server/game/AI/CoreAI/GameObjectAI.h
@@ -30,18 +30,18 @@ class GameObjectAI
protected:
GameObject* const go;
public:
- explicit GameObjectAI(GameObject* g) : go(g) {}
- virtual ~GameObjectAI() {}
+ explicit GameObjectAI(GameObject* g) : go(g) { }
+ virtual ~GameObjectAI() { }
- virtual void UpdateAI(uint32 /*diff*/) {}
+ virtual void UpdateAI(uint32 /*diff*/) { }
virtual void InitializeAI() { Reset(); }
virtual void Reset() { }
// Pass parameters between AI
- virtual void DoAction(int32 /*param = 0 */) {}
- virtual void SetGUID(uint64 /*guid*/, int32 /*id = 0 */) {}
+ virtual void DoAction(int32 /*param = 0 */) { }
+ virtual void SetGUID(uint64 /*guid*/, int32 /*id = 0 */) { }
virtual uint64 GetGUID(int32 /*id = 0 */) const { return 0; }
static int Permissible(GameObject const* go);
@@ -52,14 +52,14 @@ class GameObjectAI
virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) { return false; }
virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
virtual uint32 GetDialogStatus(Player* /*player*/) { return 100; }
- virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {}
+ virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) { }
virtual uint32 GetData(uint32 /*id*/) const { return 0; }
- virtual void SetData64(uint32 /*id*/, uint64 /*value*/) {}
+ virtual void SetData64(uint32 /*id*/, uint64 /*value*/) { }
virtual uint64 GetData64(uint32 /*id*/) const { return 0; }
- virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
- virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
- virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) {}
- virtual void EventInform(uint32 /*eventId*/) {}
+ virtual void SetData(uint32 /*id*/, uint32 /*value*/) { }
+ virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) { }
+ virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) { }
+ virtual void EventInform(uint32 /*eventId*/) { }
};
class NullGameObjectAI : public GameObjectAI
@@ -67,7 +67,7 @@ class NullGameObjectAI : public GameObjectAI
public:
explicit NullGameObjectAI(GameObject* g);
- void UpdateAI(uint32 /*diff*/) {}
+ void UpdateAI(uint32 /*diff*/) { }
static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; }
};
diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp
index 220d53a20e0..c38be3aa22a 100644
--- a/src/server/game/AI/CoreAI/GuardAI.cpp
+++ b/src/server/game/AI/CoreAI/GuardAI.cpp
@@ -31,9 +31,7 @@ int GuardAI::Permissible(Creature const* creature)
return PERMIT_BASE_NO;
}
-GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature)
-{
-}
+GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature) { }
bool GuardAI::CanSeeAlways(WorldObject const* obj)
{
@@ -58,7 +56,7 @@ void GuardAI::EnterEvadeMode()
return;
}
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Guard entry: %u enters evade mode.", me->GetEntry());
+ TC_LOG_DEBUG("entities.unit", "Guard entry: %u enters evade mode.", me->GetEntry());
me->RemoveAllAuras();
me->DeleteThreatList();
diff --git a/src/server/game/AI/CoreAI/PassiveAI.h b/src/server/game/AI/CoreAI/PassiveAI.h
index cb047ff364b..58c9a348fe9 100644
--- a/src/server/game/AI/CoreAI/PassiveAI.h
+++ b/src/server/game/AI/CoreAI/PassiveAI.h
@@ -26,8 +26,8 @@ class PassiveAI : public CreatureAI
public:
explicit PassiveAI(Creature* c);
- void MoveInLineOfSight(Unit*) {}
- void AttackStart(Unit*) {}
+ void MoveInLineOfSight(Unit*) { }
+ void AttackStart(Unit*) { }
void UpdateAI(uint32);
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
@@ -38,10 +38,10 @@ class PossessedAI : public CreatureAI
public:
explicit PossessedAI(Creature* c);
- void MoveInLineOfSight(Unit*) {}
+ void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit* target);
void UpdateAI(uint32);
- void EnterEvadeMode() {}
+ void EnterEvadeMode() { }
void JustDied(Unit*);
void KilledUnit(Unit* victim);
@@ -54,11 +54,11 @@ class NullCreatureAI : public CreatureAI
public:
explicit NullCreatureAI(Creature* c);
- void MoveInLineOfSight(Unit*) {}
- void AttackStart(Unit*) {}
- void UpdateAI(uint32) {}
- void EnterEvadeMode() {}
- void OnCharmed(bool /*apply*/) {}
+ void MoveInLineOfSight(Unit*) { }
+ void AttackStart(Unit*) { }
+ void UpdateAI(uint32) { }
+ void EnterEvadeMode() { }
+ void OnCharmed(bool /*apply*/) { }
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -66,7 +66,7 @@ class NullCreatureAI : public CreatureAI
class CritterAI : public PassiveAI
{
public:
- explicit CritterAI(Creature* c) : PassiveAI(c) {}
+ explicit CritterAI(Creature* c) : PassiveAI(c) { }
void DamageTaken(Unit* done_by, uint32& /*damage*/);
void EnterEvadeMode();
@@ -75,7 +75,7 @@ class CritterAI : public PassiveAI
class TriggerAI : public NullCreatureAI
{
public:
- explicit TriggerAI(Creature* c) : NullCreatureAI(c) {}
+ explicit TriggerAI(Creature* c) : NullCreatureAI(c) { }
void IsSummonedBy(Unit* summoner);
};
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index 4d657ec2b2b..1f312de73f6 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -56,7 +56,7 @@ void PetAI::_stopAttack()
{
if (!me->IsAlive())
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature stoped attacking cuz his dead [guid=%u]", me->GetGUIDLow());
+ TC_LOG_DEBUG("misc", "Creature stoped attacking cuz his dead [guid=%u]", me->GetGUIDLow());
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
me->CombatStop();
@@ -97,7 +97,7 @@ void PetAI::UpdateAI(uint32 diff)
if (_needToStop())
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
+ TC_LOG_DEBUG("misc", "Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
_stopAttack();
return;
}
diff --git a/src/server/game/AI/CoreAI/PetAI.h b/src/server/game/AI/CoreAI/PetAI.h
index efb088160f3..9cce00440e1 100644
--- a/src/server/game/AI/CoreAI/PetAI.h
+++ b/src/server/game/AI/CoreAI/PetAI.h
@@ -45,9 +45,9 @@ class PetAI : public CreatureAI
// The following aren't used by the PetAI but need to be defined to override
// default CreatureAI functions which interfere with the PetAI
//
- void MoveInLineOfSight(Unit* /*who*/) {} // CreatureAI interferes with returning pets
- void MoveInLineOfSight_Safe(Unit* /*who*/) {} // CreatureAI interferes with returning pets
- void EnterEvadeMode() {} // For fleeing, pets don't use this type of Evade mechanic
+ void MoveInLineOfSight(Unit* /*who*/) { } // CreatureAI interferes with returning pets
+ void MoveInLineOfSight_Safe(Unit* /*who*/) { } // CreatureAI interferes with returning pets
+ void EnterEvadeMode() { } // For fleeing, pets don't use this type of Evade mechanic
private:
bool _isVisible(Unit*) const;
diff --git a/src/server/game/AI/CoreAI/ReactorAI.h b/src/server/game/AI/CoreAI/ReactorAI.h
index 449458f39be..42f9c425ceb 100644
--- a/src/server/game/AI/CoreAI/ReactorAI.h
+++ b/src/server/game/AI/CoreAI/ReactorAI.h
@@ -27,9 +27,9 @@ class ReactorAI : public CreatureAI
{
public:
- explicit ReactorAI(Creature* c) : CreatureAI(c) {}
+ explicit ReactorAI(Creature* c) : CreatureAI(c) { }
- void MoveInLineOfSight(Unit*) {}
+ void MoveInLineOfSight(Unit*) { }
void UpdateAI(uint32 diff);
static int Permissible(const Creature*);
diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp
index bc865b8b6aa..6f8452176e5 100644
--- a/src/server/game/AI/CoreAI/TotemAI.cpp
+++ b/src/server/game/AI/CoreAI/TotemAI.cpp
@@ -40,9 +40,7 @@ TotemAI::TotemAI(Creature* c) : CreatureAI(c), i_victimGuid(0)
ASSERT(c->IsTotem());
}
-void TotemAI::MoveInLineOfSight(Unit* /*who*/)
-{
-}
+void TotemAI::MoveInLineOfSight(Unit* /*who*/) { }
void TotemAI::EnterEvadeMode()
{
@@ -106,6 +104,6 @@ void TotemAI::AttackStart(Unit* /*victim*/)
data << me->GetGUID();
data << me->GetPositionX();
data << me->GetPositionY();
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
}
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index f048c049b34..33a09fd03b0 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -26,7 +26,6 @@
class Player;
class Quest;
-class Unit;
struct AISpellInfoType;
//Selection method used by SelectTarget
@@ -120,8 +119,8 @@ class UnitAI
protected:
Unit* const me;
public:
- explicit UnitAI(Unit* unit) : me(unit) {}
- virtual ~UnitAI() {}
+ explicit UnitAI(Unit* unit) : me(unit) { }
+ virtual ~UnitAI() { }
virtual bool CanAIAttack(Unit const* /*target*/) const { return true; }
virtual void AttackStart(Unit* /*target*/);
@@ -129,22 +128,22 @@ class UnitAI
virtual void InitializeAI() { if (!me->isDead()) Reset(); }
- virtual void Reset() {};
+ virtual void Reset() { };
// Called when unit is charmed
virtual void OnCharmed(bool apply) = 0;
// Pass parameters between AI
- virtual void DoAction(int32 /*param*/) {}
+ virtual void DoAction(int32 /*param*/) { }
virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
- virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
- virtual void SetGUID(uint64 /*guid*/, int32 /*id*/ = 0) {}
+ virtual void SetData(uint32 /*id*/, uint32 /*value*/) { }
+ virtual void SetGUID(uint64 /*guid*/, int32 /*id*/ = 0) { }
virtual uint64 GetGUID(int32 /*id*/ = 0) const { return 0; }
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
- // Select the targets satifying the predicate.
+ // Select the targets satisfying the predicate.
// predicate shall extend std::unary_function<Unit*, bool>
- template <class PREDICATE> Unit* SelectTarget(SelectAggroTarget targetType, uint32 position, PREDICATE const& predicate)
+ template<class PREDICATE> Unit* SelectTarget(SelectAggroTarget targetType, uint32 position, PREDICATE const& predicate)
{
ThreatContainer::StorageType const& threatlist = me->getThreatManager().getThreatList();
if (position >= threatlist.size())
@@ -225,17 +224,17 @@ class UnitAI
// Called at any Damage from any attacker (before damage apply)
// Note: it for recalculation damage or special reaction at damage
// for attack reaction use AttackedBy called for not DOT damage in Unit::DealDamage also
- virtual void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) {}
+ virtual void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) { }
// Called when the creature receives heal
- virtual void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) {}
+ virtual void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) { }
// Called when the unit heals
- virtual void HealDone(Unit* /*done_to*/, uint32& /*addhealth*/) {}
+ virtual void HealDone(Unit* /*done_to*/, uint32& /*addhealth*/) { }
/// Called when a spell is interrupted by Spell::EffectInterruptCast
/// Use to reschedule next planned cast of spell.
- virtual void SpellInterrupted(uint32 /*spellId*/, uint32 /*unTimeMs*/) {}
+ virtual void SpellInterrupted(uint32 /*spellId*/, uint32 /*unTimeMs*/) { }
void AttackStartCaster(Unit* victim, float dist);
@@ -254,15 +253,15 @@ class UnitAI
static AISpellInfoType* AISpellInfo;
static void FillAISpellInfo();
- virtual void sGossipHello(Player* /*player*/) {}
- virtual void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) {}
- virtual void sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) {}
- virtual void sQuestAccept(Player* /*player*/, Quest const* /*quest*/) {}
- virtual void sQuestSelect(Player* /*player*/, Quest const* /*quest*/) {}
- virtual void sQuestComplete(Player* /*player*/, Quest const* /*quest*/) {}
- virtual void sQuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) {}
+ virtual void sGossipHello(Player* /*player*/) { }
+ virtual void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) { }
+ virtual void sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) { }
+ virtual void sQuestAccept(Player* /*player*/, Quest const* /*quest*/) { }
+ virtual void sQuestSelect(Player* /*player*/, Quest const* /*quest*/) { }
+ virtual void sQuestComplete(Player* /*player*/, Quest const* /*quest*/) { }
+ virtual void sQuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { }
virtual bool sOnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/) { return false; }
- virtual void sOnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
+ virtual void sOnGameEvent(bool /*start*/, uint16 /*eventId*/) { }
};
class PlayerAI : public UnitAI
@@ -270,7 +269,7 @@ class PlayerAI : public UnitAI
protected:
Player* const me;
public:
- explicit PlayerAI(Player* player) : UnitAI((Unit*)player), me(player) {}
+ explicit PlayerAI(Player* player) : UnitAI((Unit*)player), me(player) { }
void OnCharmed(bool apply);
};
@@ -279,7 +278,7 @@ class SimpleCharmedAI : public PlayerAI
{
public:
void UpdateAI(uint32 diff);
- SimpleCharmedAI(Player* player): PlayerAI(player) {}
+ SimpleCharmedAI(Player* player): PlayerAI(player) { }
};
#endif
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 75a1488ed45..2ec0e4ff3ca 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -54,7 +54,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
Map* map = creature->GetMap();
if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0);
+ TC_LOG_ERROR("misc", "DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0);
return;
}
@@ -79,7 +79,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
// If it can't find a suitable attack target then we should error out.
if (!creature->HasReactState(REACT_PASSIVE) && !creature->GetVictim())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
+ TC_LOG_ERROR("misc", "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
return;
}
@@ -145,7 +145,7 @@ void CreatureAI::EnterEvadeMode()
if (!_EnterEvadeMode())
return;
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Creature %u enters evade mode.", me->GetEntry());
+ TC_LOG_DEBUG("entities.unit", "Creature %u enters evade mode.", me->GetEntry());
if (!me->GetVehicle()) // otherwise me will be in evade mode forever
{
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index 34339859a95..14cf0a05109 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -79,9 +79,9 @@ class CreatureAI : public UnitAI
public:
void Talk(uint8 id, uint64 WhisperGuid = 0);
- explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), m_MoveInLineOfSight_locked(false) {}
+ explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), m_MoveInLineOfSight_locked(false) { }
- virtual ~CreatureAI() {}
+ virtual ~CreatureAI() { }
/// == Reactions At =================================
@@ -95,61 +95,61 @@ class CreatureAI : public UnitAI
virtual void EnterEvadeMode();
// Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
- virtual void EnterCombat(Unit* /*victim*/) {}
+ virtual void EnterCombat(Unit* /*victim*/) { }
// Called when the creature is killed
- virtual void JustDied(Unit* /*killer*/) {}
+ virtual void JustDied(Unit* /*killer*/) { }
// Called when the creature kills a unit
- virtual void KilledUnit(Unit* /*victim*/) {}
+ virtual void KilledUnit(Unit* /*victim*/) { }
// Called when the creature summon successfully other creature
- virtual void JustSummoned(Creature* /*summon*/) {}
- virtual void IsSummonedBy(Unit* /*summoner*/) {}
+ virtual void JustSummoned(Creature* /*summon*/) { }
+ virtual void IsSummonedBy(Unit* /*summoner*/) { }
- virtual void SummonedCreatureDespawn(Creature* /*summon*/) {}
- virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) {}
+ virtual void SummonedCreatureDespawn(Creature* /*summon*/) { }
+ virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) { }
// Called when hit by a spell
- virtual void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) {}
+ virtual void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) { }
// Called when spell hits a target
- virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
+ virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) { }
// Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
- virtual void AttackedBy(Unit* /*attacker*/) {}
+ virtual void AttackedBy(Unit* /*attacker*/) { }
virtual bool IsEscorted() { return false; }
// Called when creature is spawned or respawned (for reseting variables)
virtual void JustRespawned() { Reset(); }
// Called at waypoint reached or point movement finished
- virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) {}
+ virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
void OnCharmed(bool apply);
// Called at reaching home after evade
- virtual void JustReachedHome() {}
+ virtual void JustReachedHome() { }
void DoZoneInCombat(Creature* creature = NULL, float maxRangeToNearestTarget = 50.0f);
// Called at text emote receive from player
- virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) {}
+ virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) { }
// Called when owner takes damage
- virtual void OwnerAttackedBy(Unit* /*attacker*/) {}
+ virtual void OwnerAttackedBy(Unit* /*attacker*/) { }
// Called when owner attacks something
- virtual void OwnerAttacked(Unit* /*target*/) {}
+ virtual void OwnerAttacked(Unit* /*target*/) { }
/// == Triggered Actions Requested ==================
// Called when creature attack expected (if creature can and no have current victim)
// Note: for reaction at hostile action must be called AttackedBy function.
- //virtual void AttackStart(Unit*) {}
+ //virtual void AttackStart(Unit*) { }
// Called at World update tick
- //virtual void UpdateAI(const uint32 /*diff*/) {}
+ //virtual void UpdateAI(const uint32 /*diff*/) { }
/// == State checks =================================
@@ -157,7 +157,7 @@ class CreatureAI : public UnitAI
//virtual bool IsVisible(Unit*) const { return false; }
// called when the corpse of this creature gets removed
- virtual void CorpseRemoved(uint32& /*respawnDelay*/) {}
+ virtual void CorpseRemoved(uint32& /*respawnDelay*/) { }
// Called when victim entered water and creature can not enter water
//virtual bool CanReachByRangeAttack(Unit*) { return false; }
@@ -167,7 +167,7 @@ class CreatureAI : public UnitAI
// Pointer to controlled by AI creature
//Creature* const me;
- virtual void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool /*apply*/) {}
+ virtual void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool /*apply*/) { }
virtual void OnSpellClick(Unit* /*clicker*/, bool& /*result*/) { }
diff --git a/src/server/game/AI/CreatureAIFactory.h b/src/server/game/AI/CreatureAIFactory.h
index b4e031fbe6f..809c17cadb8 100644
--- a/src/server/game/AI/CreatureAIFactory.h
+++ b/src/server/game/AI/CreatureAIFactory.h
@@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#ifndef TRINITY_CREATUREAIFACTORY_H
#define TRINITY_CREATUREAIFACTORY_H
@@ -25,13 +26,13 @@
struct SelectableAI : public FactoryHolder<CreatureAI>, public Permissible<Creature>
{
- SelectableAI(const char* id) : FactoryHolder<CreatureAI>(id) {}
+ SelectableAI(const char* id) : FactoryHolder<CreatureAI>(id) { }
};
template<class REAL_AI>
struct CreatureAIFactory : public SelectableAI
{
- CreatureAIFactory(const char* name) : SelectableAI(name) {}
+ CreatureAIFactory(const char* name) : SelectableAI(name) { }
CreatureAI* Create(void*) const;
@@ -53,13 +54,13 @@ typedef FactoryHolder<CreatureAI>::FactoryHolderRepository CreatureAIRepository;
//GO
struct SelectableGameObjectAI : public FactoryHolder<GameObjectAI>, public Permissible<GameObject>
{
- SelectableGameObjectAI(const char* id) : FactoryHolder<GameObjectAI>(id) {}
+ SelectableGameObjectAI(const char* id) : FactoryHolder<GameObjectAI>(id) { }
};
template<class REAL_GO_AI>
struct GameObjectAIFactory : public SelectableGameObjectAI
{
- GameObjectAIFactory(const char* name) : SelectableGameObjectAI(name) {}
+ GameObjectAIFactory(const char* name) : SelectableGameObjectAI(name) { }
GameObjectAI* Create(void*) const;
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index 6c5cb5622b3..6b190938596 100644
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
@@ -327,7 +327,7 @@ class EventMap
typedef std::multimap<uint32, uint32> EventStore;
public:
- EventMap() : _time(0), _phase(0) {}
+ EventMap() : _time(0), _phase(0) { }
/**
* @name Reset
@@ -686,7 +686,7 @@ enum AICondition
struct AISpellInfoType
{
AISpellInfoType() : target(AITARGET_SELF), condition(AICOND_COMBAT)
- , cooldown(AI_DEFAULT_COOLDOWN), realCooldown(0), maxRange(0.0f){}
+ , cooldown(AI_DEFAULT_COOLDOWN), realCooldown(0), maxRange(0.0f){ }
AITarget target;
AICondition condition;
uint32 cooldown;
diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index 203ee37edb3..597ad24d4e1 100644
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
@@ -95,7 +95,7 @@ namespace FactorySelector
// select NullCreatureAI if not another cases
ainame = (ai_factory == NULL) ? "NullCreatureAI" : ai_factory->key();
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Creature %s (Entry: %u GUID: %u DB GUID: %u) is using AI type: %s.", creature->GetName().c_str(), creature->GetEntry(), creature->GetGUIDLow(), creature->GetDBTableGUIDLow(), ainame.c_str());
+ TC_LOG_DEBUG("scripts", "Creature %s (Entry: %u GUID: %u DB GUID: %u) is using AI type: %s.", creature->GetName().c_str(), creature->GetEntry(), creature->GetGUIDLow(), creature->GetDBTableGUIDLow(), ainame.c_str());
return (ai_factory == NULL ? new NullCreatureAI(creature) : ai_factory->Create(creature));
}
@@ -142,9 +142,8 @@ namespace FactorySelector
std::string ainame = (ai_factory == NULL || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key();
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "GameObject %u used AI is %s.", go->GetGUIDLow(), ainame.c_str());
+ TC_LOG_DEBUG("scripts", "GameObject %u used AI is %s.", go->GetGUIDLow(), ainame.c_str());
return (ai_factory == NULL ? new NullGameObjectAI(go) : ai_factory->Create(go));
}
}
-
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index c7180836040..8e2e4e8dc2e 100644
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -40,7 +40,7 @@ bool CreatureEventAIHolder::UpdateRepeatTimer(Creature* creature, uint32 repeatM
Time = urand(repeatMin, repeatMax);
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", creature->GetEntry(), Event.event_id, Event.event_type);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", creature->GetEntry(), Event.event_id, Event.event_type);
Enabled = false;
return false;
}
@@ -82,10 +82,10 @@ CreatureEventAI::CreatureEventAI(Creature* c) : CreatureAI(c)
}
//EventMap had events but they were not added because they must be for instance
if (m_CreatureEventAIList.empty())
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "CreatureEventAI: Creature %u has events but no events added to list because of instance flags.", me->GetEntry());
+ TC_LOG_ERROR("misc", "CreatureEventAI: Creature %u has events but no events added to list because of instance flags.", me->GetEntry());
}
else
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "CreatureEventAI: EventMap for Creature %u is empty but creature is using CreatureEventAI.", me->GetEntry());
+ TC_LOG_ERROR("misc", "CreatureEventAI: EventMap for Creature %u is empty but creature is using CreatureEventAI.", me->GetEntry());
m_bEmptyList = m_CreatureEventAIList.empty();
m_Phase = 0;
@@ -318,7 +318,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& holder, Unit* actionIn
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", me->GetEntry(), holder.Event.event_id, holder.Event.event_type);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", me->GetEntry(), holder.Event.event_id, holder.Event.event_type);
break;
}
@@ -490,7 +490,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
}
}
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: event %d creature %d attempt to cast spell that doesn't exist %d", eventId, me->GetEntry(), action.cast.spellId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: event %d creature %d attempt to cast spell that doesn't exist %d", eventId, me->GetEntry(), action.cast.spellId);
}
break;
}
@@ -580,12 +580,12 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
int32 new_phase = int32(m_Phase)+action.set_inc_phase.step;
if (new_phase < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %d decrease m_Phase under 0. CreatureEntry = %d", eventId, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %d decrease m_Phase under 0. CreatureEntry = %d", eventId, me->GetEntry());
m_Phase = 0;
}
else if (new_phase >= MAX_PHASE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %d incremented m_Phase above %u. m_Phase mask cannot be used with phases past %u. CreatureEntry = %d", eventId, MAX_PHASE-1, MAX_PHASE-1, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %d incremented m_Phase above %u. m_Phase mask cannot be used with phases past %u. CreatureEntry = %d", eventId, MAX_PHASE-1, MAX_PHASE-1, me->GetEntry());
m_Phase = MAX_PHASE-1;
}
else
@@ -627,7 +627,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
if (action.random_phase_range.phaseMin <= action.random_phase_range.phaseMax)
m_Phase = urand(action.random_phase_range.phaseMin, action.random_phase_range.phaseMax);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 < Param1. Event = %d. CreatureEntry = %d", eventId, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 < Param1. Event = %d. CreatureEntry = %d", eventId, me->GetEntry());
break;
case ACTION_T_KILLED_MONSTER:
//first attempt player who tapped creature
@@ -646,7 +646,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
InstanceScript* instance = me->GetInstanceScript();
if (!instance)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data without instance script. Creature %d", eventId, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %d attempt to set instance data without instance script. Creature %d", eventId, me->GetEntry());
return;
}
@@ -658,14 +658,14 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
Unit* target = GetTargetByType(action.set_inst_data64.target, actionInvoker);
if (!target)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data64 but Target == NULL. Creature %d", eventId, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %d attempt to set instance data64 but Target == NULL. Creature %d", eventId, me->GetEntry());
return;
}
InstanceScript* instance = me->GetInstanceScript();
if (!instance)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data64 without instance script. Creature %d", eventId, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %d attempt to set instance data64 without instance script. Creature %d", eventId, me->GetEntry());
return;
}
@@ -675,7 +675,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
case ACTION_T_UPDATE_TEMPLATE:
if (me->GetEntry() == action.update_template.creatureId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %d ACTION_T_UPDATE_TEMPLATE call with param1 == current entry. Creature %d", eventId, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %d ACTION_T_UPDATE_TEMPLATE call with param1 == current entry. Creature %d", eventId, me->GetEntry());
return;
}
@@ -684,7 +684,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
case ACTION_T_DIE:
if (me->isDead())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %d ACTION_T_DIE on dead creature. Creature %d", eventId, me->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %d ACTION_T_DIE on dead creature. Creature %d", eventId, me->GetEntry());
return;
}
me->Kill(me);
@@ -733,7 +733,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
me->GetPosition(x, y, z);
GameObject* object = me->SummonGameObject(action.raw.param1, x, y, z, 0, 0, 0, 0, 0, action.raw.param2);
if (!object)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "EventAI failed to spawn object %u. Spawn event %d is on creature %d", action.raw.param1, eventId, me->GetEntry());
+ TC_LOG_ERROR("scripts", "EventAI failed to spawn object %u. Spawn event %d is on creature %d", action.raw.param1, eventId, me->GetEntry());
break;
}
@@ -1166,13 +1166,13 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
{
if (!source)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i, invalid Source pointer.", textEntry);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: DoScriptText entry %i, invalid Source pointer.", textEntry);
return;
}
if (textEntry >= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
return;
}
@@ -1180,18 +1180,18 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
if (i == sEventAIMgr->GetCreatureEventAITextMap().end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
return;
}
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "CreatureEventAI: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", textEntry, (*i).second.SoundId, (*i).second.Type, (*i).second.Language, (*i).second.Emote);
+ TC_LOG_DEBUG("scripts.ai", "CreatureEventAI: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", textEntry, (*i).second.SoundId, (*i).second.Type, (*i).second.Language, (*i).second.Emote);
if ((*i).second.SoundId)
{
if (sSoundEntriesStore.LookupEntry((*i).second.SoundId))
source->PlayDirectSound((*i).second.SoundId);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i tried to process invalid sound id %u.", textEntry, (*i).second.SoundId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: DoScriptText entry %i tried to process invalid sound id %u.", textEntry, (*i).second.SoundId);
}
if ((*i).second.Emote)
@@ -1201,7 +1201,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
((Unit*)source)->HandleEmoteCommand((*i).second.Emote);
}
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", textEntry, source->GetTypeId());
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", textEntry, source->GetTypeId());
}
switch ((*i).second.Type)
@@ -1222,13 +1222,13 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
{
if (target && target->GetTypeId() == TYPEID_PLAYER)
source->MonsterWhisper(textEntry, target->GetGUID());
- else TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
+ else TC_LOG_ERROR("sql.sql", "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
}break;
case CHAT_TYPE_BOSS_WHISPER:
{
if (target && target->GetTypeId() == TYPEID_PLAYER)
source->MonsterWhisper(textEntry, target->GetGUID(), true);
- else TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
+ else TC_LOG_ERROR("sql.sql", "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
}break;
case CHAT_TYPE_ZONE_YELL:
source->MonsterYellToZone(textEntry, (*i).second.Language, target ? target->GetGUID() : 0);
@@ -1281,7 +1281,7 @@ void CreatureEventAI::ReceiveEmote(Player* player, uint32 textEmote)
ConditionSourceInfo srcInfo = ConditionSourceInfo(player);
if (cond.Meets(srcInfo))
{
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing");
+ TC_LOG_DEBUG("scripts.ai", "CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing");
ProcessEvent(*itr, player);
}
}
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.h b/src/server/game/AI/EventAI/CreatureEventAI.h
index d98dbfdc234..c16f0901b05 100644
--- a/src/server/game/AI/EventAI/CreatureEventAI.h
+++ b/src/server/game/AI/EventAI/CreatureEventAI.h
@@ -564,7 +564,7 @@ typedef UNORDERED_MAP<uint32, CreatureEventAI_Summon> CreatureEventAI_Summon_Map
struct CreatureEventAIHolder
{
- CreatureEventAIHolder(CreatureEventAI_Event const& p) : Event(p), Time(0), Enabled(true){}
+ CreatureEventAIHolder(CreatureEventAI_Event const& p) : Event(p), Time(0), Enabled(true){ }
CreatureEventAI_Event Event;
uint32 Time;
@@ -592,7 +592,7 @@ class CreatureEventAI : public CreatureAI
void MoveInLineOfSight(Unit* who);
void SpellHit(Unit* unit, const SpellInfo* spell);
void DamageTaken(Unit* done_by, uint32& damage);
- void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) {}
+ void HealReceived(Unit* /*done_by*/, uint32& /*addhealth*/) { }
void UpdateAI(uint32 diff);
void ReceiveEmote(Player* player, uint32 textEmote);
static int Permissible(const Creature*);
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
index c6bfd33d57d..daaf531dbda 100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp
@@ -44,7 +44,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional CreatureEventAI Texts data. DB table `creature_ai_texts` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 additional CreatureEventAI Texts data. DB table `creature_ai_texts` is empty.");
return;
}
@@ -64,33 +64,33 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
// range negative
if (i > MIN_CREATURE_AI_TEXT_STRING_ID || i <= MAX_CREATURE_AI_TEXT_STRING_ID)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` is not in valid range(%d-%d)", i, MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Entry %i in table `creature_ai_texts` is not in valid range(%d-%d)", i, MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID);
continue;
}
// range negative (must not happen, loaded from same table)
if (!sObjectMgr->GetTrinityStringLocale(i))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` not found", i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Entry %i in table `creature_ai_texts` not found", i);
continue;
}
if (temp.SoundId)
{
if (!sSoundEntriesStore.LookupEntry(temp.SoundId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Sound %u but sound does not exist.", i, temp.SoundId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Entry %i in table `creature_ai_texts` has Sound %u but sound does not exist.", i, temp.SoundId);
}
if (!GetLanguageDescByID(temp.Language))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` using Language %u but Language does not exist.", i, temp.Language);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Entry %i in table `creature_ai_texts` using Language %u but Language does not exist.", i, temp.Language);
if (temp.Type > CHAT_TYPE_ZONE_YELL)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Type %u but this Chat Type does not exist.", i, temp.Type);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Entry %i in table `creature_ai_texts` has Type %u but this Chat Type does not exist.", i, temp.Type);
if (temp.Emote)
{
if (!sEmotesStore.LookupEntry(temp.Emote))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Emote %u but emote does not exist.", i, temp.Emote);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Entry %i in table `creature_ai_texts` has Emote %u but emote does not exist.", i, temp.Emote);
}
m_CreatureEventAI_TextMap[i] = temp;
@@ -98,7 +98,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional CreatureEventAI Texts data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u additional CreatureEventAI Texts data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
@@ -118,7 +118,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 CreatureEventAI scripts. DB table `creature_ai_scripts` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 CreatureEventAI scripts. DB table `creature_ai_scripts` is empty.");
return;
}
@@ -139,7 +139,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
//Report any errors in event
if (e_type >= EVENT_T_END)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u have wrong type (%u), skipping.", i, e_type);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u have wrong type (%u), skipping.", i, e_type);
continue;
}
temp.event_type = EventAI_Type(e_type);
@@ -156,21 +156,21 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
//Creature does not exist in database
if (!cInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id);
continue;
}
// Only on the first script
if (cInfo->AIName != "EventAI" && m_CreatureEventAI_Event_Map[creature_id].empty())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id);
+ TC_LOG_ERROR("sql.sql", "Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id);
//No chance of this event occuring
if (temp.event_chance == 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u has 0 percent chance. Event will never trigger!", i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u has 0 percent chance. Event will never trigger!", i);
//Chance above 100, force it to be 100
else if (temp.event_chance > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event %u with more than 100 percent chance. Adjusting to 100 percent.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using event %u with more than 100 percent chance. Adjusting to 100 percent.", temp.creature_id, i);
temp.event_chance = 100;
}
@@ -180,23 +180,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
case EVENT_T_TIMER:
case EVENT_T_TIMER_OOC:
if (temp.timer.initialMax < temp.timer.initialMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using timed event(%u) with param2 < param1 (InitialMax < InitialMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using timed event(%u) with param2 < param1 (InitialMax < InitialMin). Event will never repeat.", temp.creature_id, i);
if (temp.timer.repeatMax < temp.timer.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_HP:
case EVENT_T_MANA:
case EVENT_T_TARGET_HP:
case EVENT_T_TARGET_MANA:
if (temp.percent_range.percentMax > 100)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using percentage event(%u) with param2 (MinPercent) > 100. Event will never trigger! ", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using percentage event(%u) with param2 (MinPercent) > 100. Event will never trigger! ", temp.creature_id, i);
if (temp.percent_range.percentMax <= temp.percent_range.percentMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using percentage event(%u) with param1 <= param2 (MaxPercent <= MinPercent). Event will never trigger! ", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using percentage event(%u) with param1 <= param2 (MaxPercent <= MinPercent). Event will never trigger! ", temp.creature_id, i);
if (temp.event_flags & EFLAG_REPEATABLE && !temp.percent_range.repeatMin && !temp.percent_range.repeatMax)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has param3 and param4=0 (RepeatMin/RepeatMax) but cannot be repeatable without timers. Removing EFLAG_REPEATABLE for event %u.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u has param3 and param4=0 (RepeatMin/RepeatMax) but cannot be repeatable without timers. Removing EFLAG_REPEATABLE for event %u.", temp.creature_id, i);
temp.event_flags &= ~EFLAG_REPEATABLE;
}
break;
@@ -206,32 +206,32 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.spell_hit.spellId);
if (!spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
continue;
}
if ((temp.spell_hit.schoolMask & spell->SchoolMask) != spell->SchoolMask)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.",
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.",
temp.creature_id, temp.spell_hit.schoolMask, i);
}
}
if (!temp.spell_hit.schoolMask)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u is using invalid SpellSchoolMask(%u) defined in event %u.", temp.creature_id, temp.spell_hit.schoolMask, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u is using invalid SpellSchoolMask(%u) defined in event %u.", temp.creature_id, temp.spell_hit.schoolMask, i);
if (temp.spell_hit.repeatMax < temp.spell_hit.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_RANGE:
if (temp.range.maxDist < temp.range.minDist)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (MaxDist < MinDist). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (MaxDist < MinDist). Event will never repeat.", temp.creature_id, i);
if (temp.range.repeatMax < temp.range.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_OOC_LOS:
if (temp.ooc_los.repeatMax < temp.ooc_los.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_SPAWNED:
switch (temp.spawned.condition)
@@ -241,61 +241,61 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
case SPAWNED_EVENT_MAP:
if (!sMapStore.LookupEntry(temp.spawned.conditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.",
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.",
temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1);
}
break;
case SPAWNED_EVENT_ZONE:
if (!GetAreaEntryByAreaID(temp.spawned.conditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.",
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.",
temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1);
}
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition);
break;
}
break;
case EVENT_T_FRIENDLY_HP:
if (temp.friendly_hp.repeatMax < temp.friendly_hp.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_FRIENDLY_IS_CC:
if (temp.friendly_is_cc.repeatMax < temp.friendly_is_cc.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_FRIENDLY_MISSING_BUFF:
{
SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.spell_hit.spellId);
if (!spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
continue;
}
if (temp.friendly_buff.repeatMax < temp.friendly_buff.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
}
case EVENT_T_KILL:
if (temp.kill.repeatMax < temp.kill.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_TARGET_CASTING:
if (temp.target_casting.repeatMax < temp.target_casting.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_SUMMONED_UNIT:
if (!sObjectMgr->GetCreatureTemplate(temp.summon_unit.creatureId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with not existed creature template id (%u) in param1, skipped.", temp.creature_id, i, temp.summon_unit.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using event(%u) with not existed creature template id (%u) in param1, skipped.", temp.creature_id, i, temp.summon_unit.creatureId);
if (temp.summon_unit.repeatMax < temp.summon_unit.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
case EVENT_T_QUEST_ACCEPT:
case EVENT_T_QUEST_COMPLETE:
if (!sObjectMgr->GetQuestTemplate(temp.quest.questId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId);
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i);
continue;
case EVENT_T_AGGRO:
@@ -305,7 +305,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
if (temp.event_flags & EFLAG_REPEATABLE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has EFLAG_REPEATABLE set. Event can never be repeatable. Removing flag for event %u.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u has EFLAG_REPEATABLE set. Event can never be repeatable. Removing flag for event %u.", temp.creature_id, i);
temp.event_flags &= ~EFLAG_REPEATABLE;
}
@@ -316,7 +316,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
if (!sEmotesTextStore.LookupEntry(temp.receive_emote.emoteId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: param1 (EmoteTextId: %u) are not valid.", temp.creature_id, i, temp.receive_emote.emoteId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u using event %u: param1 (EmoteTextId: %u) are not valid.", temp.creature_id, i, temp.receive_emote.emoteId);
continue;
}
if (temp.receive_emote.condition)
@@ -327,14 +327,14 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
cond.ConditionValue2 = temp.receive_emote.conditionValue2;
if (!sConditionMgr->isConditionTypeValid(&cond))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition);
continue;
}
}
if (!(temp.event_flags & EFLAG_REPEATABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: EFLAG_REPEATABLE not set. Event must always be repeatable. Flag applied.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u using event %u: EFLAG_REPEATABLE not set. Event must always be repeatable. Flag applied.", temp.creature_id, i);
temp.event_flags |= EFLAG_REPEATABLE;
}
@@ -347,16 +347,16 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.buffed.spellId);
if (!spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
continue;
}
if (temp.buffed.repeatMax < temp.buffed.repeatMin)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using not checked at load event (%u) in event %u. Need check code update?", temp.creature_id, temp.event_id, i);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Creature %u using not checked at load event (%u) in event %u. Need check code update?", temp.creature_id, temp.event_id, i);
break;
}
@@ -365,7 +365,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
uint16 action_type = fields[10+(j*4)].GetUInt8();
if (action_type >= ACTION_T_END)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has incorrect action type (%u), replace by ACTION_T_NONE.", i, j+1, action_type);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u has incorrect action type (%u), replace by ACTION_T_NONE.", i, j+1, action_type);
temp.action[j].type = ACTION_T_NONE;
continue;
}
@@ -387,30 +387,30 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
if (action.text.TextId1 < 0)
{
if (m_CreatureEventAI_TextMap.find(action.text.TextId1) == m_CreatureEventAI_TextMap.end())
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 refrences non-existing entry in texts table.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param1 refrences non-existing entry in texts table.", i, j+1);
}
if (action.text.TextId2 < 0)
{
if (m_CreatureEventAI_TextMap.find(action.text.TextId2) == m_CreatureEventAI_TextMap.end())
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 refrences non-existing entry in texts table.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param2 refrences non-existing entry in texts table.", i, j+1);
if (!action.text.TextId1)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has param2, but param1 is not set. Required for randomized text.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u has param2, but param1 is not set. Required for randomized text.", i, j+1);
}
if (action.text.TextId3 < 0)
{
if (m_CreatureEventAI_TextMap.find(action.text.TextId3) == m_CreatureEventAI_TextMap.end())
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 refrences non-existing entry in texts table.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param3 refrences non-existing entry in texts table.", i, j+1);
if (!action.text.TextId1 || !action.text.TextId2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has param3, but param1 and/or param2 is not set. Required for randomized text.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u has param3, but param1 and/or param2 is not set. Required for randomized text.", i, j+1);
}
break;
}
case ACTION_T_SET_FACTION:
if (action.set_faction.factionId !=0 && !sFactionStore.LookupEntry(action.set_faction.factionId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent FactionId %u.", i, j+1, action.set_faction.factionId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existent FactionId %u.", i, j+1, action.set_faction.factionId);
action.set_faction.factionId = 0;
}
break;
@@ -419,7 +419,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
if (action.morph.creatureId && !sObjectMgr->GetCreatureTemplate(action.morph.creatureId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatureId);
action.morph.creatureId = 0;
}
@@ -427,12 +427,12 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
if (action.morph.creatureId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId, action.morph.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId, action.morph.creatureId);
action.morph.modelId = 0;
}
else if (!sCreatureDisplayInfoStore.LookupEntry(action.morph.modelId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant ModelId %u.", i, j+1, action.morph.modelId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existant ModelId %u.", i, j+1, action.morph.modelId);
action.morph.modelId = 0;
}
}
@@ -440,33 +440,33 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
break;
case ACTION_T_SOUND:
if (!sSoundEntriesStore.LookupEntry(action.sound.soundId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant SoundID %u.", i, j+1, action.sound.soundId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existant SoundID %u.", i, j+1, action.sound.soundId);
break;
case ACTION_T_EMOTE:
if (!sEmotesStore.LookupEntry(action.emote.emoteId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.emote.emoteId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.emote.emoteId);
break;
case ACTION_T_RANDOM_SOUND:
if (!sSoundEntriesStore.LookupEntry(action.random_sound.soundId1))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param1 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId1);
if (action.random_sound.soundId2 >= 0 && !sSoundEntriesStore.LookupEntry(action.random_sound.soundId2))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId2);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param2 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId2);
if (action.random_sound.soundId3 >= 0 && !sSoundEntriesStore.LookupEntry(action.random_sound.soundId3))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId3);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param3 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId3);
break;
case ACTION_T_RANDOM_EMOTE:
if (!sEmotesStore.LookupEntry(action.random_emote.emoteId1))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId1);
if (action.random_emote.emoteId2 >= 0 && !sEmotesStore.LookupEntry(action.random_emote.emoteId2))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId2);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param2 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId2);
if (action.random_emote.emoteId3 >= 0 && !sEmotesStore.LookupEntry(action.random_emote.emoteId3))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId3);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param3 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId3);
break;
case ACTION_T_CAST:
{
const SpellInfo* spell = sSpellMgr->GetSpellInfo(action.cast.spellId);
if (!spell)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast.spellId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast.spellId);
/* FIXME: temp.raw.param3 not have event tipes with recovery time in it....
else
{
@@ -484,121 +484,121 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
action.cast.castFlags |= CAST_TRIGGERED;
if (action.cast.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
}
case ACTION_T_SUMMON:
if (!sObjectMgr->GetCreatureTemplate(action.summon.creatureId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatureId);
if (action.summon.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_THREAT_SINGLE_PCT:
if (std::abs(action.threat_single_pct.percent) > 100)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_single_pct.percent);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_single_pct.percent);
if (action.threat_single_pct.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_THREAT_ALL_PCT:
if (std::abs(action.threat_all_pct.percent) > 100)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent);
break;
case ACTION_T_QUEST_EVENT:
if (Quest const* qid = sObjectMgr->GetQuestTemplate(action.quest_event.questId))
{
if (!qid->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
}
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event.questId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event.questId);
if (action.quest_event.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_SET_UNIT_FIELD:
if (action.set_unit_field.field < OBJECT_END || action.set_unit_field.field >= UNIT_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (UNIT_FIELD*). Index out of range for intended use.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u param1 (UNIT_FIELD*). Index out of range for intended use.", i, j+1);
if (action.set_unit_field.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_SET_UNIT_FLAG:
case ACTION_T_REMOVE_UNIT_FLAG:
if (action.unit_flag.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_SET_PHASE:
if (action.set_phase.phase >= MAX_PHASE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set phase >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
break;
case ACTION_T_INC_PHASE:
if (action.set_inc_phase.step == 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1);
else if (std::abs(action.set_inc_phase.step) > MAX_PHASE-1)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step);
break;
case ACTION_T_QUEST_EVENT_ALL:
if (Quest const* qid = sObjectMgr->GetQuestTemplate(action.quest_event_all.questId))
{
if (!qid->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
}
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event_all.questId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event_all.questId);
break;
case ACTION_T_REMOVEAURASFROMSPELL:
if (!sSpellMgr->GetSpellInfo(action.remove_aura.spellId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.remove_aura.spellId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.remove_aura.spellId);
if (action.remove_aura.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_RANDOM_PHASE: //PhaseId1, PhaseId2, PhaseId3
if (action.random_phase.phase1 >= MAX_PHASE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase1 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set phase1 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
if (action.random_phase.phase2 >= MAX_PHASE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase2 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set phase2 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
if (action.random_phase.phase3 >= MAX_PHASE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase3 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set phase3 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
break;
case ACTION_T_RANDOM_PHASE_RANGE: //PhaseMin, PhaseMax
if (action.random_phase_range.phaseMin >= MAX_PHASE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMin >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set phaseMin >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
if (action.random_phase_range.phaseMin >= MAX_PHASE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMax >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set phaseMax >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
if (action.random_phase_range.phaseMin >= action.random_phase_range.phaseMax)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMax <= phaseMin.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set phaseMax <= phaseMin.", i, j+1);
std::swap(action.random_phase_range.phaseMin, action.random_phase_range.phaseMax);
// equal case processed at call
}
break;
case ACTION_T_KILLED_MONSTER:
if (!sObjectMgr->GetCreatureTemplate(action.killed_monster.creatureId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.killed_monster.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.killed_monster.creatureId);
if (action.killed_monster.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_SET_INST_DATA:
if (!(temp.event_flags & EFLAG_DIFFICULTY_ALL))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
if (action.set_inst_data.value > 4/*SPECIAL*/)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set instance data above encounter state 4. Custom case?", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u attempts to set instance data above encounter state 4. Custom case?", i, j+1);
break;
case ACTION_T_SET_INST_DATA64:
if (!(temp.event_flags & EFLAG_DIFFICULTY_ALL))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
if (action.set_inst_data64.target >= TARGET_T_END)
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
break;
case ACTION_T_UPDATE_TEMPLATE:
if (!sObjectMgr->GetCreatureTemplate(action.update_template.creatureId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId);
break;
case ACTION_T_SET_SHEATH:
if (action.set_sheath.sheath >= MAX_SHEATH_STATE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses wrong sheath state %u.", i, j+1, action.set_sheath.sheath);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses wrong sheath state %u.", i, j+1, action.set_sheath.sheath);
action.set_sheath.sheath = SHEATH_STATE_UNARMED;
}
break;
@@ -607,7 +607,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
if (action.invincibility_hp_level.hp_level > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invincibility_hp_level.hp_level);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invincibility_hp_level.hp_level);
action.invincibility_hp_level.hp_level = 100;
}
}
@@ -617,7 +617,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
if (action.mount.creatureId && !sObjectMgr->GetCreatureTemplate(action.mount.creatureId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses nonexistent Creature entry %u.", i, j+1, action.mount.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses nonexistent Creature entry %u.", i, j+1, action.mount.creatureId);
action.morph.creatureId = 0;
}
@@ -625,12 +625,12 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
if (action.mount.creatureId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.mount.modelId, action.mount.creatureId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.mount.modelId, action.mount.creatureId);
action.mount.modelId = 0;
}
else if (!sCreatureDisplayInfoStore.LookupEntry(action.mount.modelId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses nonexistent ModelId %u.", i, j+1, action.mount.modelId);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u uses nonexistent ModelId %u.", i, j+1, action.mount.modelId);
action.mount.modelId = 0;
}
}
@@ -650,7 +650,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
case ACTION_T_RANDOM_SAY:
case ACTION_T_RANDOM_YELL:
case ACTION_T_RANDOM_TEXTEMOTE:
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u currently unused ACTION type. Did you forget to update database?", i, j+1);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u currently unused ACTION type. Did you forget to update database?", i, j+1);
break;
case ACTION_T_MOVE_RANDOM_POINT:
@@ -664,7 +664,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have currently not checked at load action type (%u). Need check code update?", i, j+1, action.type);
+ TC_LOG_ERROR("sql.sql", "CreatureEventAI: Event %u Action %u have currently not checked at load action type (%u). Need check code update?", i, j+1, action.type);
break;
}
}
@@ -676,5 +676,5 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u CreatureEventAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u CreatureEventAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.h b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
index 8e862a9279b..577958b6f5b 100644
--- a/src/server/game/AI/EventAI/CreatureEventAIMgr.h
+++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.h
@@ -27,8 +27,8 @@ class CreatureEventAIMgr
friend class ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>;
private:
- CreatureEventAIMgr(){}
- ~CreatureEventAIMgr(){}
+ CreatureEventAIMgr(){ }
+ ~CreatureEventAIMgr(){ }
public:
void LoadCreatureEventAI_Texts();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index f5d6932db00..68c7869f8b7 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -1,9 +1,20 @@
-/* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public 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 licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * 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 "ScriptedCreature.h"
#include "Item.h"
@@ -159,7 +170,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* source, uint32 soundId)
if (!sSoundEntriesStore.LookupEntry(soundId))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", soundId, source->GetTypeId(), source->GetGUIDLow());
+ TC_LOG_ERROR("scripts", "Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", soundId, source->GetTypeId(), source->GetGUIDLow());
return;
}
@@ -252,7 +263,7 @@ void ScriptedAI::DoResetThreat()
{
if (!me->CanHaveThreatList() || me->getThreatManager().isThreatListEmpty())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
+ TC_LOG_ERROR("scripts", "DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
return;
}
@@ -300,7 +311,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* unit, float x, float y, float z, float o
if (Player* player = unit->ToPlayer())
player->TeleportTo(unit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.",
+ TC_LOG_ERROR("scripts", "Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.",
me->GetGUID(), me->GetEntry(), unit->GetTypeId(), unit->GetGUID(), x, y, z, o);
}
@@ -433,7 +444,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(uint32 const diff)
return false;
break;
default: // For most of creatures that certain area is their home area.
- TC_LOG_INFO(LOG_FILTER_GENERAL, "TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition. Using the default one.", me->GetEntry());
+ TC_LOG_INFO("misc", "TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition. Using the default one.", me->GetEntry());
uint32 homeAreaId = me->GetMap()->GetAreaId(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ());
if (me->GetAreaId() == homeAreaId)
return false;
@@ -448,9 +459,7 @@ BossAI::BossAI(Creature* creature, uint32 bossId) : ScriptedAI(creature),
instance(creature->GetInstanceScript()),
summons(creature),
_boundary(instance ? instance->GetBossBoundary(bossId) : NULL),
- _bossId(bossId)
-{
-}
+ _bossId(bossId) { }
void BossAI::_Reset()
{
@@ -584,9 +593,7 @@ void BossAI::UpdateAI(uint32 diff)
WorldBossAI::WorldBossAI(Creature* creature) :
ScriptedAI(creature),
- summons(creature)
-{
-}
+ summons(creature) { }
void WorldBossAI::_Reset()
{
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
index 4523080adbd..a111898e3e1 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
@@ -116,7 +116,7 @@ private:
class EntryCheckPredicate
{
public:
- EntryCheckPredicate(uint32 entry) : _entry(entry) {}
+ EntryCheckPredicate(uint32 entry) : _entry(entry) { }
bool operator()(uint64 guid) { return GUID_ENPART(guid) == _entry; }
private:
@@ -132,7 +132,7 @@ class DummyEntryCheckPredicate
struct ScriptedAI : public CreatureAI
{
explicit ScriptedAI(Creature* creature);
- virtual ~ScriptedAI() {}
+ virtual ~ScriptedAI() { }
// *************
//CreatureAI Functions
@@ -141,34 +141,34 @@ struct ScriptedAI : public CreatureAI
void AttackStartNoMove(Unit* target);
// Called at any Damage from any attacker (before damage apply)
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) {}
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) { }
//Called at World update tick
virtual void UpdateAI(uint32 diff);
//Called at creature death
- void JustDied(Unit* /*killer*/) {}
+ void JustDied(Unit* /*killer*/) { }
//Called at creature killing another unit
- void KilledUnit(Unit* /*victim*/) {}
+ void KilledUnit(Unit* /*victim*/) { }
// Called when the creature summon successfully other creature
- void JustSummoned(Creature* /*summon*/) {}
+ void JustSummoned(Creature* /*summon*/) { }
// Called when a summoned creature is despawned
- void SummonedCreatureDespawn(Creature* /*summon*/) {}
+ void SummonedCreatureDespawn(Creature* /*summon*/) { }
// Called when hit by a spell
- void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) {}
+ void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) { }
// Called when spell hits a target
- void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
+ void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) { }
//Called at waypoint reached or PointMovement end
- void MovementInform(uint32 /*type*/, uint32 /*id*/) {}
+ void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
// Called when AI is temporarily replaced or put back when possess is applied or removed
- void OnPossess(bool /*apply*/) {}
+ void OnPossess(bool /*apply*/) { }
// *************
// Variables
@@ -185,10 +185,10 @@ struct ScriptedAI : public CreatureAI
// *************
//Called at creature reset either by death or evade
- void Reset() {}
+ void Reset() { }
//Called at creature aggro either by MoveInLOS or Attack Start
- void EnterCombat(Unit* /*victim*/) {}
+ void EnterCombat(Unit* /*victim*/) { }
// Called before EnterCombat even before the creature is in combat.
void AttackStart(Unit* /*target*/);
@@ -334,7 +334,7 @@ class BossAI : public ScriptedAI
{
public:
BossAI(Creature* creature, uint32 bossId);
- virtual ~BossAI() {}
+ virtual ~BossAI() { }
InstanceScript* const instance;
BossBoundaryMap const* GetBoundary() const { return _boundary; }
@@ -385,7 +385,7 @@ class WorldBossAI : public ScriptedAI
{
public:
WorldBossAI(Creature* creature);
- virtual ~WorldBossAI() {}
+ virtual ~WorldBossAI() { }
void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index ef15ef27ec4..dbc8989c530 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.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-2013 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: Npc_EscortAI
@@ -35,7 +49,7 @@ npc_escortAI::npc_escortAI(Creature* creature) : ScriptedAI(creature),
DespawnAtFar(true),
ScriptWP(false),
HasImmuneToNPCFlags(false)
-{}
+{ }
void npc_escortAI::AttackStart(Unit* who)
{
@@ -176,7 +190,7 @@ void npc_escortAI::EnterEvadeMode()
{
AddEscortState(STATE_ESCORT_RETURNING);
ReturnToLastPoint();
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI has left combat and is now returning to last point");
+ TC_LOG_DEBUG("scripts", "EscortAI has left combat and is now returning to last point");
}
else
{
@@ -217,7 +231,7 @@ void npc_escortAI::UpdateAI(uint32 diff)
{
if (DespawnAtEnd)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI reached end of waypoints");
+ TC_LOG_DEBUG("scripts", "EscortAI reached end of waypoints");
if (m_bCanReturnToStart)
{
@@ -228,7 +242,7 @@ void npc_escortAI::UpdateAI(uint32 diff)
m_uiWPWaitTimer = 0;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
+ TC_LOG_DEBUG("scripts", "EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
return;
}
@@ -244,7 +258,7 @@ void npc_escortAI::UpdateAI(uint32 diff)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI reached end of waypoints with Despawn off");
+ TC_LOG_DEBUG("scripts", "EscortAI reached end of waypoints with Despawn off");
return;
}
@@ -253,7 +267,7 @@ void npc_escortAI::UpdateAI(uint32 diff)
if (!HasEscortState(STATE_ESCORT_PAUSED))
{
me->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
+ TC_LOG_DEBUG("scripts", "EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
WaypointStart(CurrentWP->id);
@@ -271,7 +285,7 @@ void npc_escortAI::UpdateAI(uint32 diff)
{
if (DespawnAtFar && !IsPlayerOrGroupInRange())
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI failed because player/group was to far away or not found");
+ TC_LOG_DEBUG("scripts", "EscortAI failed because player/group was to far away or not found");
if (m_bCanInstantRespawn)
{
@@ -309,7 +323,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
//Combat start position reached, continue waypoint movement
if (pointId == POINT_LAST_POINT)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI has returned to original position before combat");
+ TC_LOG_DEBUG("scripts", "EscortAI has returned to original position before combat");
me->SetWalk(!m_bIsRunning);
RemoveEscortState(STATE_ESCORT_RETURNING);
@@ -319,7 +333,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
}
else if (pointId == POINT_HOME)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI has returned to original home location and will continue from beginning of waypoint list.");
+ TC_LOG_DEBUG("scripts", "EscortAI has returned to original home location and will continue from beginning of waypoint list.");
CurrentWP = WaypointList.begin();
m_uiWPWaitTimer = 1;
@@ -329,11 +343,11 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
//Make sure that we are still on the right waypoint
if (CurrentWP->id != pointId)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", pointId, CurrentWP->id, me->GetEntry());
+ TC_LOG_ERROR("misc", "TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", pointId, CurrentWP->id, me->GetEntry());
return;
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI Waypoint %u reached", CurrentWP->id);
+ TC_LOG_DEBUG("scripts", "EscortAI Waypoint %u reached", CurrentWP->id);
//Call WP function
WaypointReached(CurrentWP->id);
@@ -402,14 +416,14 @@ void npc_escortAI::SetRun(bool on)
if (!m_bIsRunning)
me->SetWalk(false);
else
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI attempt to set run mode, but is already running.");
+ TC_LOG_DEBUG("scripts", "EscortAI attempt to set run mode, but is already running.");
}
else
{
if (m_bIsRunning)
me->SetWalk(true);
else
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI attempt to set walk mode, but is already walking.");
+ TC_LOG_DEBUG("scripts", "EscortAI attempt to set walk mode, but is already walking.");
}
m_bIsRunning = on;
@@ -420,13 +434,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
{
if (me->GetVictim())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry());
+ TC_LOG_ERROR("misc", "TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry());
return;
}
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry());
+ TC_LOG_ERROR("scripts", "EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry());
return;
}
@@ -439,7 +453,7 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
if (WaypointList.empty())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "EscortAI (script: %s, creature entry: %u) starts with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).",
+ TC_LOG_ERROR("scripts", "EscortAI (script: %s, creature entry: %u) starts with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).",
me->GetScriptName().c_str(), me->GetEntry(), quest ? quest->GetQuestId() : 0);
return;
}
@@ -455,13 +469,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
m_bCanReturnToStart = canLoopPath;
if (m_bCanReturnToStart && m_bCanInstantRespawn)
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
+ TC_LOG_DEBUG("scripts", "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();
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
+ TC_LOG_DEBUG("scripts", "EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
}
//disable npcflags
@@ -472,7 +486,7 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
+ TC_LOG_DEBUG("scripts", "EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
CurrentWP = WaypointList.begin();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
index 919b24a916c..280990fd648 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.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-2013 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_ESCORTAI_H
#define SC_ESCORTAI_H
@@ -39,7 +53,7 @@ struct npc_escortAI : public ScriptedAI
{
public:
explicit npc_escortAI(Creature* creature);
- ~npc_escortAI() {}
+ ~npc_escortAI() { }
// CreatureAI functions
void AttackStart(Unit* who);
@@ -72,7 +86,7 @@ struct npc_escortAI : public ScriptedAI
bool GetWaypointPosition(uint32 pointId, float& x, float& y, float& z);
virtual void WaypointReached(uint32 pointId) = 0;
- virtual void WaypointStart(uint32 /*pointId*/) {}
+ virtual void WaypointStart(uint32 /*pointId*/) { }
void Start(bool isActiveAttacker = true, bool run = false, uint64 playerGUID = 0, Quest const* quest = NULL, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index befd6b9d16e..5cc128fda5f 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.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-2013 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: FollowerAI
@@ -26,7 +40,7 @@ FollowerAI::FollowerAI(Creature* creature) : ScriptedAI(creature),
m_uiUpdateFollowTimer(2500),
m_uiFollowState(STATE_FOLLOW_NONE),
m_pQuestForFollow(NULL)
-{}
+{ }
void FollowerAI::AttackStart(Unit* who)
{
@@ -166,7 +180,7 @@ void FollowerAI::EnterEvadeMode()
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI left combat, returning to CombatStartPosition.");
+ TC_LOG_DEBUG("scripts", "FollowerAI left combat, returning to CombatStartPosition.");
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
{
@@ -192,7 +206,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT))
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI is set completed, despawns.");
+ TC_LOG_DEBUG("scripts", "FollowerAI is set completed, despawns.");
me->DespawnOrUnsummon();
return;
}
@@ -203,7 +217,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_RETURNING))
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI is returning to leader.");
+ TC_LOG_DEBUG("scripts", "FollowerAI is returning to leader.");
RemoveFollowState(STATE_FOLLOW_RETURNING);
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
@@ -232,7 +246,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
if (bIsMaxRangeExceeded)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI failed because player/group was to far away or not found");
+ TC_LOG_DEBUG("scripts", "FollowerAI failed because player/group was to far away or not found");
me->DespawnOrUnsummon();
return;
}
@@ -275,13 +289,13 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
{
if (me->GetVictim())
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI attempt to StartFollow while in combat.");
+ TC_LOG_DEBUG("scripts", "FollowerAI attempt to StartFollow while in combat.");
return;
}
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "FollowerAI attempt to StartFollow while already following.");
+ TC_LOG_ERROR("scripts", "FollowerAI attempt to StartFollow while already following.");
return;
}
@@ -297,7 +311,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
+ TC_LOG_DEBUG("scripts", "FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
}
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
@@ -306,7 +320,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName().c_str(), m_uiLeaderGUID);
+ TC_LOG_DEBUG("scripts", "FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName().c_str(), m_uiLeaderGUID);
}
Player* FollowerAI::GetLeaderForFollower()
@@ -325,7 +339,7 @@ Player* FollowerAI::GetLeaderForFollower()
if (member && member->IsAlive() && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE))
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI GetLeader changed and returned new leader.");
+ TC_LOG_DEBUG("scripts", "FollowerAI GetLeader changed and returned new leader.");
m_uiLeaderGUID = member->GetGUID();
return member;
}
@@ -334,7 +348,7 @@ Player* FollowerAI::GetLeaderForFollower()
}
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "FollowerAI GetLeader can not find suitable leader.");
+ TC_LOG_DEBUG("scripts", "FollowerAI GetLeader can not find suitable leader.");
return NULL;
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
index ccc8af6197a..c1fa3275bb8 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.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-2013 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_FOLLOWERAI_H
#define SC_FOLLOWERAI_H
@@ -22,7 +36,7 @@ class FollowerAI : public ScriptedAI
{
public:
explicit FollowerAI(Creature* creature);
- ~FollowerAI() {}
+ ~FollowerAI() { }
//virtual void WaypointReached(uint32 uiPointId) = 0;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedGossip.h b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
index 93add2ae652..5e76c1f83f4 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedGossip.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedGossip.h
@@ -1,9 +1,20 @@
-/* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
- * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public 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 licensed under GPL version 2
- * Please see the included DOCS/LICENSE.TXT for more information */
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * 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_GOSSIP_H
#define SC_GOSSIP_H
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 57fd7ea2d73..ae3f7078f5c 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -107,7 +107,7 @@ WayPoint* SmartAI::GetNextWayPoint()
mLastWP = (*itr).second;
if (mLastWP->id != mCurrentWPID)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
+ TC_LOG_ERROR("misc", "SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
}
return (*itr).second;
}
@@ -118,7 +118,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/)
{
if (me->IsInCombat())// no wp movement in combat
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
+ TC_LOG_ERROR("misc", "SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
return;
}
if (HasEscortState(SMART_ESCORT_ESCORTING))
@@ -162,7 +162,7 @@ void SmartAI::PausePath(uint32 delay, bool forced)
return;
if (HasEscortState(SMART_ESCORT_PAUSED))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
+ TC_LOG_ERROR("misc", "SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
return;
}
mForcedPaused = forced;
@@ -674,9 +674,7 @@ void SmartAI::SummonedCreatureDespawn(Creature* unit)
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMON_DESPAWNED, unit);
}
-void SmartAI::UpdateAIWhileCharmed(const uint32 /*diff*/)
-{
-}
+void SmartAI::UpdateAIWhileCharmed(const uint32 /*diff*/) { }
void SmartAI::CorpseRemoved(uint32& respawnDelay)
{
@@ -720,9 +718,7 @@ void SmartAI::SetData(uint32 id, uint32 value)
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value);
}
-void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/)
-{
-}
+void SmartAI::SetGUID(uint64 /*guid*/, int32 /*id*/) { }
uint64 SmartAI::GetGUID(int32 /*id*/) const
{
@@ -755,9 +751,7 @@ void SmartAI::sGossipSelect(Player* player, uint32 sender, uint32 action)
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_SELECT, player, sender, action);
}
-void SmartAI::sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/)
-{
-}
+void SmartAI::sGossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { }
void SmartAI::sQuestAccept(Player* player, Quest const* quest)
{
@@ -861,7 +855,7 @@ void SmartGameObjectAI::Reset()
// Called when a player opens a gossip dialog with the gameobject.
bool SmartGameObjectAI::GossipHello(Player* player)
{
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartGameObjectAI::GossipHello");
+ TC_LOG_DEBUG("scripts.ai", "SmartGameObjectAI::GossipHello");
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, 0, 0, false, NULL, go);
return false;
}
@@ -933,14 +927,14 @@ class SmartTrigger : public AreaTriggerScript
{
public:
- SmartTrigger() : AreaTriggerScript("SmartTrigger") {}
+ SmartTrigger() : AreaTriggerScript("SmartTrigger") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
{
if (!player->IsAlive())
return false;
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->id);
+ TC_LOG_DEBUG("scripts.ai", "AreaTrigger %u is using SmartTrigger script", trigger->id);
SmartScript script;
script.OnInitialize(NULL, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id);
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 4b4909e9c6c..92637b17f25 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -45,7 +45,7 @@ enum SmartEscortVars
class SmartAI : public CreatureAI
{
public:
- ~SmartAI(){}
+ ~SmartAI(){ }
explicit SmartAI(Creature* c);
// Start moving to the desired MovePoint
@@ -56,7 +56,7 @@ class SmartAI : public CreatureAI
void EndPath(bool fail = false);
void ResumePath();
WayPoint* GetNextWayPoint();
- bool HasEscortState(uint32 uiEscortState) { return (mEscortState & uiEscortState); }
+ bool HasEscortState(uint32 uiEscortState) const { return (mEscortState & uiEscortState) != 0; }
void AddEscortState(uint32 uiEscortState) { mEscortState |= uiEscortState; }
void RemoveEscortState(uint32 uiEscortState) { mEscortState &= ~uiEscortState; }
void SetAutoAttack(bool on) { mCanAutoAttack = on; }
@@ -237,8 +237,8 @@ class SmartAI : public CreatureAI
class SmartGameObjectAI : public GameObjectAI
{
public:
- SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) {}
- ~SmartGameObjectAI() {}
+ SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) { }
+ ~SmartGameObjectAI() { }
void UpdateAI(uint32 diff);
void InitializeAI();
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 7ea6895d028..d2d5027ce7d 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -155,7 +155,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
mLastInvoker = unit->GetGUID();
if (Unit* tempInvoker = GetLastInvoker())
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: Invoker: %s (guidlow: %u)", tempInvoker->GetName().c_str(), tempInvoker->GetGUIDLow());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: Invoker: %s (guidlow: %u)", tempInvoker->GetName().c_str(), tempInvoker->GetGUIDLow());
switch (e.GetActionType())
{
@@ -168,12 +168,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
- if (IsCreature((*itr)) && !(*itr)->ToCreature()->IsPet()) // Prevented sending text to pets.
+ if (IsCreature(*itr) && !(*itr)->ToCreature()->IsPet()) // Prevented sending text to pets.
{
talker = (*itr)->ToCreature();
break;
}
- else if (IsPlayer((*itr)))
+ else if (IsPlayer(*itr))
{
targetPlayer = (*itr)->ToPlayer();
break;
@@ -198,7 +198,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
mUseTextTimer = true;
sCreatureTextMgr->SendChat(talker, uint8(e.action.talk.textGroupID), mTextGUID);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_TALK: talker: %s (GuidLow: %u), textGuid: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_TALK: talker: %s (GuidLow: %u), textGuid: %u",
talker->GetName().c_str(), talker->GetGUIDLow(), GUID_LOPART(mTextGUID));
break;
}
@@ -216,7 +216,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
Unit* templastInvoker = GetLastInvoker();
sCreatureTextMgr->SendChat(me, uint8(e.action.talk.textGroupID), IsPlayer(templastInvoker) ? templastInvoker->GetGUID() : 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, (*itr)->ToPlayer());
}
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: %s (GuidLow: %u), textGroupId: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: %s (GuidLow: %u), textGroupId: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), uint8(e.action.talk.textGroupID));
}
@@ -234,7 +234,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->ToUnit()->HandleEmoteCommand(e.action.emote.emote);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_PLAY_EMOTE: target: %s (GuidLow: %u), emote: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_PLAY_EMOTE: target: %s (GuidLow: %u), emote: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), e.action.emote.emote);
}
}
@@ -253,7 +253,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->SendPlaySound(e.action.sound.sound, e.action.sound.onlySelf > 0);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (GuidLow: %u), sound: %u, onlyself: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (GuidLow: %u), sound: %u, onlyself: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), e.action.sound.sound, e.action.sound.onlySelf);
}
}
@@ -274,7 +274,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.action.faction.factionID)
{
(*itr)->ToCreature()->setFaction(e.action.faction.factionID);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
(*itr)->GetEntry(), (*itr)->GetGUIDLow(), e.action.faction.factionID);
}
else
@@ -284,7 +284,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if ((*itr)->ToCreature()->getFaction() != ci->faction_A)
{
(*itr)->ToCreature()->setFaction(ci->faction_A);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
(*itr)->GetEntry(), (*itr)->GetGUIDLow(), ci->faction_A);
}
}
@@ -316,7 +316,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 displayId = ObjectMgr::ChooseDisplayId(ci);
(*itr)->ToCreature()->SetDisplayId(displayId);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
(*itr)->GetEntry(), (*itr)->GetGUIDLow(), displayId);
}
}
@@ -324,14 +324,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
else
{
(*itr)->ToCreature()->SetDisplayId(e.action.morphOrMount.model);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
(*itr)->GetEntry(), (*itr)->GetGUIDLow(), e.action.morphOrMount.model);
}
}
else
{
(*itr)->ToCreature()->DeMorph();
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u demorphs.",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u demorphs.",
(*itr)->GetEntry(), (*itr)->GetGUIDLow());
}
}
@@ -350,7 +350,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsPlayer(*itr))
{
(*itr)->ToPlayer()->FailQuest(e.action.quest.quest);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_FAIL_QUEST: Player guidLow %u fails quest %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_FAIL_QUEST: Player guidLow %u fails quest %u",
(*itr)->GetGUIDLow(), e.action.quest.quest);
}
}
@@ -370,7 +370,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Quest const* q = sObjectMgr->GetQuestTemplate(e.action.quest.quest))
{
(*itr)->ToPlayer()->AddQuest(q, NULL);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_ADD_QUEST: Player guidLow %u add quest %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_ADD_QUEST: Player guidLow %u add quest %u",
(*itr)->GetGUIDLow(), e.action.quest.quest);
}
}
@@ -384,7 +384,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
me->SetReactState(ReactStates(e.action.react.state));
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_REACT_STATE: Creature guidLow %u set reactstate %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_REACT_STATE: Creature guidLow %u set reactstate %u",
me->GetGUIDLow(), e.action.react.state);
break;
}
@@ -424,7 +424,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 emote = temp[urand(0, count - 1)];
(*itr)->ToUnit()->HandleEmoteCommand(emote);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_EMOTE: Creature guidLow %u handle random emote %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_EMOTE: Creature guidLow %u handle random emote %u",
(*itr)->GetGUIDLow(), emote);
}
}
@@ -443,7 +443,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Unit* target = Unit::GetUnit(*me, (*i)->getUnitGuid()))
{
me->getThreatManager().modifyThreatPercent(target, e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature guidLow %u modify threat for unit %u, value %i",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature guidLow %u modify threat for unit %u, value %i",
me->GetGUIDLow(), target->GetGUIDLow(), e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
}
}
@@ -463,7 +463,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
me->getThreatManager().modifyThreatPercent((*itr)->ToUnit(), e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_THREAT_SINGLE_PCT: Creature guidLow %u modify threat for unit %u, value %i",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_THREAT_SINGLE_PCT: Creature guidLow %u modify threat for unit %u, value %i",
me->GetGUIDLow(), (*itr)->GetGUIDLow(), e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
}
}
@@ -489,7 +489,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsPlayer(*itr))
{
(*itr)->ToPlayer()->AreaExploredOrEventHappens(e.action.quest.quest);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: Player guidLow %u credited quest %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: Player guidLow %u credited quest %u",
(*itr)->GetGUIDLow(), e.action.quest.quest);
}
}
@@ -517,11 +517,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
me->InterruptNonMeleeSpells(false);
me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED));
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_CAST:: Creature %u casts spell %u on target %u with castflags %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_CAST:: Creature %u casts spell %u on target %u with castflags %u",
me->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
}
else
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
+ TC_LOG_DEBUG("scripts.ai", "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
}
delete targets;
@@ -542,17 +542,17 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsUnit(*itr))
continue;
- if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
- {
- if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS)
- tempLastInvoker->InterruptNonMeleeSpells(false);
+ if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
+ {
+ if (e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS)
+ tempLastInvoker->InterruptNonMeleeSpells(false);
- tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED));
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u",
- tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
- }
- else
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
+ tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED));
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u",
+ tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
+ }
+ else
+ TC_LOG_DEBUG("scripts.ai", "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
}
delete targets;
@@ -569,7 +569,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->ToUnit()->AddAura(e.action.cast.spell, (*itr)->ToUnit());
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_ADD_AURA: Adding aura %u to unit %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_ADD_AURA: Adding aura %u to unit %u",
e.action.cast.spell, (*itr)->GetGUIDLow());
}
}
@@ -590,7 +590,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
// Activate
(*itr)->ToGameObject()->SetLootState(GO_READY);
(*itr)->ToGameObject()->UseDoorOrButton(0, false, unit);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject %u (entry: %u) activated",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject %u (entry: %u) activated",
(*itr)->GetGUIDLow(), (*itr)->GetEntry());
}
}
@@ -609,7 +609,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsGameObject(*itr))
{
(*itr)->ToGameObject()->ResetDoorOrButton();
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_RESET_GOBJECT. Gameobject %u (entry: %u) reset",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_RESET_GOBJECT. Gameobject %u (entry: %u) reset",
(*itr)->GetGUIDLow(), (*itr)->GetEntry());
}
}
@@ -628,7 +628,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->ToUnit()->SetUInt32Value(UNIT_NPC_EMOTESTATE, e.action.emote.emote);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_EMOTE_STATE. Unit %u set emotestate to %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_EMOTE_STATE. Unit %u set emotestate to %u",
(*itr)->GetGUIDLow(), e.action.emote.emote);
}
}
@@ -649,13 +649,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!e.action.unitFlag.type)
{
(*itr)->ToUnit()->SetFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit %u added flag %u to UNIT_FIELD_FLAGS",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit %u added flag %u to UNIT_FIELD_FLAGS",
(*itr)->GetGUIDLow(), e.action.unitFlag.flag);
}
else
{
(*itr)->ToUnit()->SetFlag(UNIT_FIELD_FLAGS_2, e.action.unitFlag.flag);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit %u added flag %u to UNIT_FIELD_FLAGS_2",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_UNIT_FLAG. Unit %u added flag %u to UNIT_FIELD_FLAGS_2",
(*itr)->GetGUIDLow(), e.action.unitFlag.flag);
}
}
@@ -677,13 +677,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!e.action.unitFlag.type)
{
(*itr)->ToUnit()->RemoveFlag(UNIT_FIELD_FLAGS, e.action.unitFlag.flag);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit %u removed flag %u to UNIT_FIELD_FLAGS",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit %u removed flag %u to UNIT_FIELD_FLAGS",
(*itr)->GetGUIDLow(), e.action.unitFlag.flag);
}
else
{
(*itr)->ToUnit()->RemoveFlag(UNIT_FIELD_FLAGS_2, e.action.unitFlag.flag);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit %u removed flag %u to UNIT_FIELD_FLAGS_2",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_REMOVE_UNIT_FLAG. Unit %u removed flag %u to UNIT_FIELD_FLAGS_2",
(*itr)->GetGUIDLow(), e.action.unitFlag.flag);
}
}
@@ -698,7 +698,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
CAST_AI(SmartAI, me->AI())->SetAutoAttack(e.action.autoAttack.attack);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: Creature: %u bool on = %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: Creature: %u bool on = %u",
me->GetGUIDLow(), e.action.autoAttack.attack);
break;
}
@@ -709,7 +709,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
bool move = e.action.combatMove.move;
CAST_AI(SmartAI, me->AI())->SetCombatMove(move);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: Creature %u bool on = %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: Creature %u bool on = %u",
me->GetGUIDLow(), e.action.combatMove.move);
break;
}
@@ -719,7 +719,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
SetPhase(e.action.setEventPhase.phase);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SET_EVENT_PHASE: Creature %u set event phase %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_EVENT_PHASE: Creature %u set event phase %u",
GetBaseObject()->GetGUIDLow(), e.action.setEventPhase.phase);
break;
}
@@ -730,7 +730,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
IncPhase(e.action.incEventPhase.inc);
DecPhase(e.action.incEventPhase.dec);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INC_EVENT_PHASE: Creature %u inc event phase by %u, "
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_INC_EVENT_PHASE: Creature %u inc event phase by %u, "
"decrease by %u", GetBaseObject()->GetGUIDLow(), e.action.incEventPhase.inc, e.action.incEventPhase.dec);
break;
}
@@ -740,7 +740,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
me->AI()->EnterEvadeMode();
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_EVADE: Creature %u EnterEvadeMode", me->GetGUIDLow());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_EVADE: Creature %u EnterEvadeMode", me->GetGUIDLow());
break;
}
case SMART_ACTION_FLEE_FOR_ASSIST:
@@ -754,7 +754,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
TrinityStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_FLEE, LANG_UNIVERSAL, 0);
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance", me->GetGUIDLow());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance", me->GetGUIDLow());
break;
}
case SMART_ACTION_CALL_GROUPEVENTHAPPENS:
@@ -765,7 +765,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsPlayer(unit) && GetBaseObject())
{
unit->ToPlayer()->GroupEventHappens(e.action.quest.quest, GetBaseObject());
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %u, group credit for quest %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %u, group credit for quest %u",
unit->GetGUIDLow(), e.action.quest.quest);
}
@@ -784,15 +784,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
- if (!IsUnit((*itr)))
+ if (!IsUnit(*itr))
continue;
- if (e.action.removeAura.spell == 0)
- (*itr)->ToUnit()->RemoveAllAuras();
- else
+ if (e.action.removeAura.spell)
(*itr)->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell);
+ else
+ (*itr)->ToUnit()->RemoveAllAuras();
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_REMOVEAURASFROMSPELL: Unit %u, spell %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_REMOVEAURASFROMSPELL: Unit %u, spell %u",
(*itr)->GetGUIDLow(), e.action.removeAura.spell);
}
@@ -810,10 +810,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
{
- if (IsUnit((*itr)))
+ if (IsUnit(*itr))
{
CAST_AI(SmartAI, me->AI())->SetFollow((*itr)->ToUnit(), (float)e.action.follow.dist, (float)e.action.follow.angle, e.action.follow.credit, e.action.follow.entry, e.action.follow.creditType);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature %u following target %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature %u following target %u",
me->GetGUIDLow(), (*itr)->GetGUIDLow());
break;
}
@@ -850,7 +850,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 phase = temp[urand(0, count - 1)];
SetPhase(phase);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE: Creature %u sets event phase to %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE: Creature %u sets event phase to %u",
GetBaseObject()->GetGUIDLow(), phase);
break;
}
@@ -861,7 +861,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 phase = urand(e.action.randomPhaseRange.phaseMin, e.action.randomPhaseRange.phaseMax);
SetPhase(phase);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE_RANGE: Creature %u sets event phase to %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE_RANGE: Creature %u sets event phase to %u",
GetBaseObject()->GetGUIDLow(), phase);
break;
}
@@ -875,7 +875,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Player* player = me->GetLootRecipient())
{
player->RewardPlayerAndGroupAtEvent(e.action.killedMonster.creature, player);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player %u, Killcredit: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player %u, Killcredit: %u",
player->GetGUIDLow(), e.action.killedMonster.creature);
}
}
@@ -890,7 +890,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsPlayer(*itr))
{
(*itr)->ToPlayer()->KilledMonsterCredit(e.action.killedMonster.creature);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player %u, Killcredit: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player %u, Killcredit: %u",
(*itr)->GetGUIDLow(), e.action.killedMonster.creature);
}
else if (IsUnit(*itr)) // Special handling for vehicles
@@ -916,12 +916,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
InstanceScript* instance = obj->GetInstanceScript();
if (!instance)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
+ TC_LOG_ERROR("sql.sql", "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
break;
}
instance->SetData(e.action.setInstanceData.field, e.action.setInstanceData.data);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: Field: %u, data: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: Field: %u, data: %u",
e.action.setInstanceData.field, e.action.setInstanceData.data);
break;
}
@@ -937,7 +937,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
InstanceScript* instance = obj->GetInstanceScript();
if (!instance)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
+ TC_LOG_ERROR("sql.sql", "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
break;
}
@@ -946,7 +946,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
instance->SetData64(e.action.setInstanceData64.field, targets->front()->GetGUID());
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: " UI64FMTD,
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: " UI64FMTD,
e.action.setInstanceData64.field, targets->front()->GetGUID());
delete targets;
@@ -958,7 +958,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
me->UpdateEntry(e.action.updateTemplate.creature, e.action.updateTemplate.team ? HORDE : ALLIANCE);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_UPDATE_TEMPLATE: Creature %u, Template: %u, Team: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_UPDATE_TEMPLATE: Creature %u, Template: %u, Team: %u",
me->GetGUIDLow(), me->GetEntry(), e.action.updateTemplate.team ? HORDE : ALLIANCE);
break;
}
@@ -967,7 +967,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me && !me->isDead())
{
me->Kill(me);
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_DIE: Creature %u", me->GetGUIDLow());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_DIE: Creature %u", me->GetGUIDLow());
}
break;
}
@@ -976,7 +976,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me)
{
me->SetInCombatWithZone();
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_SET_IN_COMBAT_WITH_ZONE: Creature %u", me->GetGUIDLow());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_IN_COMBAT_WITH_ZONE: Creature %u", me->GetGUIDLow());
}
break;
}
@@ -990,7 +990,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
TrinityStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_CALL_FOR_HELP, LANG_UNIVERSAL, 0);
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u", me->GetGUIDLow());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u", me->GetGUIDLow());
}
break;
}
@@ -999,7 +999,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me)
{
me->SetSheath(SheathState(e.action.setSheath.sheath));
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_SET_SHEATH: Creature %u, State: %u",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_SHEATH: Creature %u, State: %u",
me->GetGUIDLow(), e.action.setSheath.sheath);
}
break;
@@ -1467,7 +1467,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
EquipmentInfo const* einfo = sObjectMgr->GetEquipmentInfo(npc->GetEntry(), equipId);
if (!einfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry());
+ TC_LOG_ERROR("sql.sql", "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry());
break;
}
@@ -1593,7 +1593,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (e.GetTargetType() == SMART_TARGET_NONE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
break;
}
@@ -1674,6 +1674,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsUnit(*itr))
continue;
+ Unit* unit = (*itr)->ToUnit();
+
bool interruptedSpell = false;
for (ObjectList::const_iterator it = targets->begin(); it != targets->end(); ++it)
@@ -1685,14 +1687,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (!interruptedSpell && e.action.cast.flags & SMARTCAST_INTERRUPT_PREVIOUS)
{
- (*itr)->ToUnit()->InterruptNonMeleeSpells(false);
+ unit->InterruptNonMeleeSpells(false);
interruptedSpell = true;
}
- (*itr)->ToUnit()->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED));
+ unit->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED));
}
else
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId()));
+ TC_LOG_DEBUG("scripts.ai", "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId()));
}
}
@@ -1726,7 +1728,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 id = temp[urand(0, count - 1)];
if (e.GetTargetType() == SMART_TARGET_NONE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
break;
}
@@ -1756,7 +1758,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 id = urand(e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2);
if (e.GetTargetType() == SMART_TARGET_NONE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
break;
}
@@ -1969,14 +1971,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (SmartAI* ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI()))
ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
+ TC_LOG_ERROR("sql.sql", "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
}
else if (IsGameObject(*itr))
{
if (SmartGameObjectAI* ai = CAST_AI(SmartGameObjectAI, (*itr)->ToGameObject()->AI()))
ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
+ TC_LOG_ERROR("sql.sql", "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
}
}
@@ -1988,7 +1990,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!GetBaseObject())
break;
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId %d, gossipNpcTextId %d",
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId %d, gossipNpcTextId %d",
e.action.sendGossipMenu.gossipMenuId, e.action.sendGossipMenu.gossipNpcTextId);
ObjectList* targets = GetTargets(e, unit);
@@ -2035,7 +2037,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
(*itr)->ToCreature()->SetHomePosition((*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation());
}
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SET_HOME_POS is invalid, skipping");
+ TC_LOG_ERROR("sql.sql", "SmartScript: Action target for SMART_ACTION_SET_HOME_POS is invalid, skipping");
}
}
@@ -2159,7 +2161,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 eventId = e.action.gameEventStop.id;
if (!sGameEventMgr->IsActiveEvent(eventId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: %u)", eventId);
+ TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: %u)", eventId);
break;
}
sGameEventMgr->StopEvent(eventId, true);
@@ -2170,14 +2172,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 eventId = e.action.gameEventStart.id;
if (sGameEventMgr->IsActiveEvent(eventId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: %u)", eventId);
+ TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: %u)", eventId);
break;
}
sGameEventMgr->StartEvent(eventId, true);
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
break;
}
@@ -2187,7 +2189,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK)
ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
+ TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
}
}
@@ -2208,7 +2210,7 @@ void SmartScript::InstallTemplate(SmartScriptHolder const& e)
return;
if (mTemplate)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType());
+ TC_LOG_ERROR("sql.sql", "SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType());
return;
}
mTemplate = (SMARTAI_TEMPLATE)e.action.installTtemplate.id;
@@ -2461,7 +2463,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
Creature* target = NULL;
if (!scriptTrigger && !baseObject)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SMART_TARGET_CREATURE_GUID can not be used without invoker");
+ TC_LOG_ERROR("sql.sql", "SMART_TARGET_CREATURE_GUID can not be used without invoker");
break;
}
@@ -2476,7 +2478,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
GameObject* target = NULL;
if (!scriptTrigger && !baseObject)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker");
+ TC_LOG_ERROR("sql.sql", "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker");
break;
}
@@ -2985,7 +2987,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_GOSSIP_SELECT:
{
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript: Gossip Select: menu %u action %u", var0, var1);//little help for scripters
+ TC_LOG_DEBUG("scripts.ai", "SmartScript: Gossip Select: menu %u action %u", var0, var1);//little help for scripters
if (e.event.gossip.sender != var0 || e.event.gossip.action != var1)
return;
ProcessAction(e, unit, var0, var1);
@@ -3077,7 +3079,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType());
+ TC_LOG_ERROR("sql.sql", "SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType());
break;
}
}
@@ -3251,9 +3253,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn
if (e.empty())
{
if (obj)
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry());
if (at)
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id);
+ TC_LOG_DEBUG("scripts.ai", "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id);
return;
}
for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i)
@@ -3277,9 +3279,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn
mEvents.push_back((*i));//NOTE: 'world(0)' events still get processed in ANY instance mode
}
if (mEvents.empty() && obj)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry());
+ TC_LOG_ERROR("sql.sql", "SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry());
if (mEvents.empty() && at)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id);
+ TC_LOG_ERROR("sql.sql", "SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id);
}
void SmartScript::GetScript()
@@ -3315,26 +3317,26 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at)
case TYPEID_UNIT:
mScriptType = SMART_SCRIPT_TYPE_CREATURE;
me = obj->ToCreature();
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is Creature %u", me->GetEntry());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::OnInitialize: source is Creature %u", me->GetEntry());
break;
case TYPEID_GAMEOBJECT:
mScriptType = SMART_SCRIPT_TYPE_GAMEOBJECT;
go = obj->ToGameObject();
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is GameObject %u", go->GetEntry());
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::OnInitialize: source is GameObject %u", go->GetEntry());
break;
default:
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
+ TC_LOG_ERROR("misc", "SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
return;
}
} else if (at)
{
mScriptType = SMART_SCRIPT_TYPE_AREATRIGGER;
trigger = at;
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id);
+ TC_LOG_DEBUG("scripts.ai", "SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id);
}
else
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
+ TC_LOG_ERROR("misc", "SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
return;
}
@@ -3363,43 +3365,29 @@ void SmartScript::OnMoveInLineOfSight(Unit* who)
}
/*
-void SmartScript::UpdateAIWhileCharmed(const uint32 diff)
-{
-}
+void SmartScript::UpdateAIWhileCharmed(const uint32 diff) { }
-void SmartScript::DoAction(const int32 param)
-{
-}
+void SmartScript::DoAction(const int32 param) { }
uint32 SmartScript::GetData(uint32 id)
{
return 0;
}
-void SmartScript::SetData(uint32 id, uint32 value)
-{
-}
+void SmartScript::SetData(uint32 id, uint32 value) { }
-void SmartScript::SetGUID(uint64 guid, int32 id)
-{
-}
+void SmartScript::SetGUID(uint64 guid, int32 id) { }
uint64 SmartScript::GetGUID(int32 id)
{
return 0;
}
-void SmartScript::MovepointStart(uint32 id)
-{
-}
+void SmartScript::MovepointStart(uint32 id) { }
-void SmartScript::SetRun(bool run)
-{
-}
+void SmartScript::SetRun(bool run) { }
-void SmartScript::SetMovePathEndAction(SMART_ACTION action)
-{
-}
+void SmartScript::SetMovePathEndAction(SMART_ACTION action) { }
uint32 SmartScript::DoChat(int8 id, uint64 whisperGuid)
{
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index b1b9f4d6725..f9eff2ec96e 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -118,7 +118,7 @@ class SmartScript
smart = false;
if (!smart)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target Creature (GUID: %u Entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetDBTableGUIDLow() : (me ? me->GetDBTableGUIDLow() : 0), c ? c->GetEntry() : (me ? me->GetEntry() : 0));
+ TC_LOG_ERROR("sql.sql", "SmartScript: Action target Creature (GUID: %u Entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetDBTableGUIDLow() : (me ? me->GetDBTableGUIDLow() : 0), c ? c->GetEntry() : (me ? me->GetEntry() : 0));
return smart;
}
@@ -132,7 +132,7 @@ class SmartScript
if (!go || go->GetAIName() != "SmartGameObjectAI")
smart = false;
if (!smart)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target GameObject (GUID: %u Entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetDBTableGUIDLow() : (go ? go->GetDBTableGUIDLow() : 0), g ? g->GetEntry() : (go ? go->GetEntry() : 0));
+ TC_LOG_ERROR("sql.sql", "SmartScript: Action target GameObject (GUID: %u Entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetDBTableGUIDLow() : (go ? go->GetDBTableGUIDLow() : 0), g ? g->GetEntry() : (go ? go->GetEntry() : 0));
return smart;
}
@@ -244,7 +244,7 @@ class SmartScript
SMARTAI_TEMPLATE mTemplate;
void InstallEvents();
- void RemoveStoredEvent (uint32 id)
+ void RemoveStoredEvent(uint32 id)
{
if (!mStoredEvents.empty())
{
@@ -258,7 +258,7 @@ class SmartScript
}
}
}
- SmartScriptHolder FindLinkedEvent (uint32 link)
+ SmartScriptHolder FindLinkedEvent(uint32 link)
{
if (!mEvents.empty())
{
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 87c35d59cc0..74d2d5c49a1 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -52,7 +52,7 @@ void SmartWaypointMgr::LoadFromDB()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
return;
}
@@ -80,7 +80,7 @@ void SmartWaypointMgr::LoadFromDB()
}
if (last_id != id)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id);
+ TC_LOG_ERROR("sql.sql", "SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id);
last_id++;
(*waypoint_map[entry])[id] = new WayPoint(id, x, y, z);
@@ -90,7 +90,7 @@ void SmartWaypointMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
}
@@ -117,7 +117,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
return;
}
@@ -134,7 +134,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
SmartScriptType source_type = (SmartScriptType)fields[1].GetUInt8();
if (source_type >= SMART_SCRIPT_TYPE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type));
continue;
}
if (temp.entryOrGuid >= 0)
@@ -145,7 +145,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
{
if (!sObjectMgr->GetCreatureTemplate((uint32)temp.entryOrGuid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
continue;
}
break;
@@ -154,7 +154,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
{
if (!sObjectMgr->GetGameObjectTemplate((uint32)temp.entryOrGuid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
continue;
}
break;
@@ -163,7 +163,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
{
if (!sAreaTriggerStore.LookupEntry((uint32)temp.entryOrGuid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
continue;
}
break;
@@ -171,7 +171,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
case SMART_SCRIPT_TYPE_TIMED_ACTIONLIST:
break;//nothing to check, really
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type);
continue;
}
}
@@ -179,7 +179,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
{
if (!sObjectMgr->GetCreatureData(uint32(abs(temp.entryOrGuid))))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
continue;
}
}
@@ -234,7 +234,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
@@ -249,7 +249,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
{
if (e.target.unitDistance.creature && !sObjectMgr->GetCreatureTemplate(e.target.unitDistance.creature))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
return false;
}
break;
@@ -259,7 +259,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
{
if (e.target.goDistance.entry && !sObjectMgr->GetGameObjectTemplate(e.target.goDistance.entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
return false;
}
break;
@@ -281,7 +281,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
{
if (e.target.playerDistance.dist == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has maxDist 0 as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has maxDist 0 as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
break;
@@ -307,7 +307,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
case SMART_TARGET_STORED:
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
return true;
@@ -317,28 +317,28 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (e.event.type >= SMART_EVENT_END)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType());
return false;
}
// in SMART_SCRIPT_TYPE_TIMED_ACTIONLIST all event types are overriden by core
if (e.GetScriptType() != SMART_SCRIPT_TYPE_TIMED_ACTIONLIST && !(SmartAIEventMask[e.event.type][1] & SmartAITypeMask[e.GetScriptType()][1]))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType());
return false;
}
if (e.action.type <= 0 || e.action.type >= SMART_ACTION_END)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
return false;
}
if (e.event.event_phase_mask > SMART_EVENT_PHASE_ALL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
return false;
}
if (e.event.event_flags > SMART_EVENT_FLAGS_ALL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
return false;
}
if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST)
@@ -379,12 +379,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.event.spellHit.spell);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
return false;
}
if (e.event.spellHit.school && (e.event.spellHit.school & spellInfo->SchoolMask) != spellInfo->SchoolMask)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
return false;
}
}
@@ -399,12 +399,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_EVENT_RESPAWN:
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_MAP && !sMapStore.LookupEntry(e.event.respawn.map))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map);
return false;
}
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !GetAreaEntryByAreaID(e.event.respawn.area))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area);
return false;
}
break;
@@ -441,7 +441,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_EVENT_VICTIM_CASTING:
if (e.event.targetCasting.spellId > 0 && !sSpellMgr->GetSpellInfo(e.event.targetCasting.spellId))
{
- sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
return false;
}
@@ -495,7 +495,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (e.event.movementInform.type > NULL_MOTION_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type);
return false;
}
break;
@@ -519,7 +519,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (e.link && e.link == e.event_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
return false;
}
break;
@@ -551,7 +551,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (e.event.doAction.eventId > EVENT_CHARGE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid event id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.doAction.eventId);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid event id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.doAction.eventId);
return false;
}
break;
@@ -562,7 +562,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (e.event.friendlyHealthPct.maxHpPct > 100 || e.event.friendlyHealthPct.minHpPct > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has pct value above 100, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has pct value above 100, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
@@ -577,7 +577,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_TARGET_PLAYER_DISTANCE:
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid target_type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetTargetType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid target_type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetTargetType());
return false;
}
break;
@@ -616,7 +616,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_EVENT_ON_SPELLCLICK:
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
}
@@ -626,7 +626,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SET_FACTION:
if (e.action.faction.factionID && !sFactionTemplateStore.LookupEntry(e.action.faction.factionID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
return false;
}
break;
@@ -636,7 +636,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (e.action.morphOrMount.creature > 0 && !sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature);
return false;
}
@@ -644,12 +644,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (e.action.morphOrMount.creature)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
else if (!sCreatureDisplayInfoStore.LookupEntry(e.action.morphOrMount.model))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model);
return false;
}
}
@@ -673,7 +673,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (!sTaxiPathStore.LookupEntry(e.action.taxi.id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id);
return false;
}
break;
@@ -709,32 +709,32 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (!qid->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
return false;
}
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
return false;
}
break;
case SMART_ACTION_SET_EVENT_PHASE:
if (e.action.setEventPhase.phase >= SMART_EVENT_PHASE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1);
return false;
}
break;
case SMART_ACTION_INC_EVENT_PHASE:
if (!e.action.incEventPhase.inc && !e.action.incEventPhase.dec)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
else if (e.action.incEventPhase.inc > SMART_EVENT_PHASE_MAX || e.action.incEventPhase.dec > SMART_EVENT_PHASE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
break;
@@ -751,7 +751,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
e.action.randomPhase.phase5 >= SMART_EVENT_PHASE_MAX ||
e.action.randomPhase.phase6 >= SMART_EVENT_PHASE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
}
@@ -761,7 +761,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (e.action.randomPhaseRange.phaseMin >= SMART_EVENT_PHASE_MAX ||
e.action.randomPhaseRange.phaseMax >= SMART_EVENT_PHASE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
if (!IsMinMaxValid(e, e.action.randomPhaseRange.phaseMin, e.action.randomPhaseRange.phaseMax))
@@ -785,7 +785,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
uint32 creatureSummonEntry = spellInfo->Effects[j].MiscValue;
if (e.action.summonCreature.creature == creatureSummonEntry)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u creature summon: %u has already summon spell (SpellId: %u effect: %u)",
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u creature summon: There is a summon spell for creature entry %u (SpellId: %u, effect: %u)",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.creature, spellInfo->Id, j);
}
}
@@ -793,7 +793,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (e.action.summonCreature.type < TEMPSUMMON_TIMED_OR_DEAD_DESPAWN || e.action.summonCreature.type > TEMPSUMMON_MANUAL_DESPAWN)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type);
return false;
}
break;
@@ -814,14 +814,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
uint32 killCredit = spellInfo->Effects[j].MiscValue;
if (e.action.killedMonster.creature == killCredit)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Kill Credit: %u has already spell kill credit (SpellId: %u effect: %u)", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.killedMonster.creature, spellInfo->Id, j);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Kill Credit: %u has already spell kill credit (SpellId: %u effect: %u)", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.killedMonster.creature, spellInfo->Id, j);
}
}
}
if (e.GetTargetType() == SMART_TARGET_POSITION)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TargetType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetTargetType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TargetType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetTargetType());
return false;
}
break;
@@ -832,7 +832,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SET_SHEATH:
if (e.action.setSheath.sheath && e.action.setSheath.sheath >= MAX_SHEATH_STATE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath);
return false;
}
break;
@@ -840,7 +840,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (e.action.react.state > REACT_AGGRESSIVE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state);
return false;
}
break;
@@ -862,7 +862,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
uint32 goSummonEntry = spellInfo->Effects[j].MiscValue;
if (e.action.summonGO.entry == goSummonEntry)
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u gameobject summon: %u has already summon spell (SpellId: %u effect: %u)",
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u gameobject summon: There is a summon spell for gameobject entry %u (SpellId: %u, effect: %u)",
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonGO.entry, spellInfo->Id, j);
}
}
@@ -879,14 +879,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_TELEPORT:
if (!sMapStore.LookupEntry(e.action.teleport.mapID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID);
return false;
}
break;
case SMART_ACTION_INSTALL_AI_TEMPLATE:
if (e.action.installTtemplate.id >= SMARTAI_TEMPLATE_END)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id);
return false;
}
break;
@@ -898,14 +898,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (!sSmartWaypointMgr->GetPath(e.action.wpStart.pathID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID);
return false;
}
if (e.action.wpStart.quest && !IsQuestValid(e, e.action.wpStart.quest))
return false;
if (e.action.wpStart.reactState > REACT_AGGRESSIVE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
return false;
}
break;
@@ -924,7 +924,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_REMOVE_POWER:
if (e.action.power.powerType > MAX_POWERS)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Power %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.power.powerType);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Power %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.power.powerType);
return false;
}
break;
@@ -935,14 +935,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
return false;
}
GameEventData const& eventData = events[eventId];
if (!eventData.isValid())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStop.id);
return false;
}
break;
@@ -954,14 +954,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
return false;
}
GameEventData const& eventData = events[eventId];
if (!eventData.isValid())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %u SourceType %u Event %u Action %u uses non-existent event, eventId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.gameEventStart.id);
return false;
}
break;
@@ -1040,7 +1040,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SUMMON_CREATURE_GROUP:
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
return false;
}
@@ -1058,7 +1058,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
CreatureData const* data = sObjectMgr->GetCreatureData(entry);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
else
@@ -1068,7 +1068,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
error = true;
if (error)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id);
return false;
}
return true;
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 7ed8e60ed44..35abdcc47f0 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -735,7 +735,7 @@ struct SmartAction
} summonGO;
struct
- {
+ {
uint32 state;
} active;
@@ -1280,9 +1280,9 @@ enum SmartCastFlags
{
SMARTCAST_INTERRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
SMARTCAST_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
- //CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
+ //SMARTCAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
+ //SMARTCAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
+ //SMARTCAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
SMARTCAST_AURA_NOT_PRESENT = 0x20 //Only casts the spell if the target does not have an aura from the spell
};
@@ -1291,7 +1291,7 @@ struct SmartScriptHolder
{
SmartScriptHolder() : entryOrGuid(0), source_type(SMART_SCRIPT_TYPE_CREATURE)
, event_id(0), link(0), event(), action(), target(), timer(0), active(false), runOnce(false)
- , enableTimed(false) {}
+ , enableTimed(false) { }
int32 entryOrGuid;
SmartScriptType source_type;
@@ -1302,11 +1302,10 @@ struct SmartScriptHolder
SmartAction action;
SmartTarget target;
- public:
- uint32 GetScriptType() const { return (uint32)source_type; }
- uint32 GetEventType() const { return (uint32)event.type; }
- uint32 GetActionType() const { return (uint32)action.type; }
- uint32 GetTargetType() const { return (uint32)target.type; }
+ uint32 GetScriptType() const { return (uint32)source_type; }
+ uint32 GetEventType() const { return (uint32)event.type; }
+ uint32 GetActionType() const { return (uint32)action.type; }
+ uint32 GetTargetType() const { return (uint32)target.type; }
uint32 timer;
bool active;
@@ -1322,7 +1321,7 @@ typedef UNORDERED_MAP<uint32, ObjectList*> ObjectListMap;
class SmartWaypointMgr
{
friend class ACE_Singleton<SmartWaypointMgr, ACE_Null_Mutex>;
- SmartWaypointMgr() {}
+ SmartWaypointMgr() { }
public:
~SmartWaypointMgr();
@@ -1348,9 +1347,9 @@ typedef UNORDERED_MAP<int32, SmartAIEventList> SmartAIEventMap;
class SmartAIMgr
{
friend class ACE_Singleton<SmartAIMgr, ACE_Null_Mutex>;
- SmartAIMgr(){}
+ SmartAIMgr(){ }
public:
- ~SmartAIMgr(){}
+ ~SmartAIMgr(){ }
void LoadSmartAIFromDB();
@@ -1362,7 +1361,7 @@ class SmartAIMgr
else
{
if (entry > 0)//first search is for guid (negative), do not drop error if not found
- TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
+ TC_LOG_DEBUG("scripts.ai", "SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
return temp;
}
}
@@ -1378,7 +1377,7 @@ class SmartAIMgr
{
if (target < SMART_TARGET_NONE || target >= SMART_TARGET_END)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
return false;
}
return true;
@@ -1388,7 +1387,7 @@ class SmartAIMgr
{
if (max < min)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max);
return false;
}
return true;
@@ -1398,7 +1397,7 @@ class SmartAIMgr
{
if (pct < -100 || pct > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct);
return false;
}
return true;
@@ -1408,7 +1407,7 @@ class SmartAIMgr
{
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
return true;
@@ -1418,7 +1417,7 @@ class SmartAIMgr
{
if (!sObjectMgr->GetCreatureTemplate(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1428,7 +1427,7 @@ class SmartAIMgr
{
if (!sObjectMgr->GetQuestTemplate(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1438,7 +1437,7 @@ class SmartAIMgr
{
if (!sObjectMgr->GetGameObjectTemplate(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1448,7 +1447,7 @@ class SmartAIMgr
{
if (!sSpellMgr->GetSpellInfo(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1458,7 +1457,7 @@ class SmartAIMgr
{
if (!sItemStore.LookupEntry(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1468,7 +1467,7 @@ class SmartAIMgr
{
if (!sEmotesTextStore.LookupEntry(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1478,7 +1477,7 @@ class SmartAIMgr
{
if (!sEmotesStore.LookupEntry(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1488,7 +1487,7 @@ class SmartAIMgr
{
if (!sAreaTriggerStore.LookupEntry(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
@@ -1498,7 +1497,7 @@ class SmartAIMgr
{
if (!sSoundEntriesStore.LookupEntry(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
return false;
}
return true;
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index 1cff80ba10d..b80df5018e4 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -25,9 +25,7 @@
#include "SHA1.h"
#include "WorldSession.h"
-AccountMgr::AccountMgr()
-{
-}
+AccountMgr::AccountMgr() { }
AccountMgr::~AccountMgr()
{
@@ -392,17 +390,17 @@ void AccountMgr::LoadRBAC()
{
ClearRBAC();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "AccountMgr::LoadRBAC");
+ TC_LOG_DEBUG("rbac", "AccountMgr::LoadRBAC");
uint32 oldMSTime = getMSTime();
uint32 count1 = 0;
uint32 count2 = 0;
uint32 count3 = 0;
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading permissions");
+ TC_LOG_DEBUG("rbac", "AccountMgr::LoadRBAC: Loading permissions");
QueryResult result = LoginDatabase.Query("SELECT id, name FROM rbac_permissions");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 account permission definitions. DB table `rbac_permissions` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 account permission definitions. DB table `rbac_permissions` is empty.");
return;
}
@@ -415,11 +413,11 @@ void AccountMgr::LoadRBAC()
}
while (result->NextRow());
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading linked permissions");
+ TC_LOG_DEBUG("rbac", "AccountMgr::LoadRBAC: Loading linked permissions");
result = LoginDatabase.Query("SELECT id, linkedId FROM rbac_linked_permissions ORDER BY id ASC");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 linked permissions. DB table `rbac_linked_permissions` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 linked permissions. DB table `rbac_linked_permissions` is empty.");
return;
}
@@ -439,7 +437,7 @@ void AccountMgr::LoadRBAC()
uint32 linkedPermissionId = field[1].GetUInt32();
if (linkedPermissionId == permissionId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "RBAC Permission %u has itself as linked permission. Ignored", permissionId);
+ TC_LOG_ERROR("sql.sql", "RBAC Permission %u has itself as linked permission. Ignored", permissionId);
continue;
}
permission->AddLinkedPermission(linkedPermissionId);
@@ -447,11 +445,11 @@ void AccountMgr::LoadRBAC()
}
while (result->NextRow());
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading default permissions");
+ TC_LOG_DEBUG("rbac", "AccountMgr::LoadRBAC: Loading default permissions");
result = LoginDatabase.Query("SELECT secId, permissionId FROM rbac_default_permissions ORDER BY secId ASC");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 default permission definitions. DB table `rbac_default_permissions` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 default permission definitions. DB table `rbac_default_permissions` is empty.");
return;
}
@@ -472,7 +470,7 @@ void AccountMgr::LoadRBAC()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u permission definitions, %u linked permissions and %u default permissions in %u ms", count1, count2, count3, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u permission definitions, %u linked permissions and %u default permissions in %u ms", count1, count2, count3, GetMSTimeDiffToNow(oldMSTime));
}
void AccountMgr::UpdateAccountAccess(rbac::RBACData* rbac, uint32 accountId, uint8 securityLevel, int32 realmId)
@@ -508,7 +506,7 @@ void AccountMgr::UpdateAccountAccess(rbac::RBACData* rbac, uint32 accountId, uin
rbac::RBACPermission const* AccountMgr::GetRBACPermission(uint32 permissionId) const
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACPermission: %u", permissionId);
+ TC_LOG_TRACE("rbac", "AccountMgr::GetRBACPermission: %u", permissionId);
rbac::RBACPermissionsContainer::const_iterator it = _permissions.find(permissionId);
if (it != _permissions.end())
return it->second;
@@ -520,7 +518,7 @@ bool AccountMgr::HasPermission(uint32 accountId, uint32 permissionId, uint32 rea
{
if (!accountId)
{
- TC_LOG_ERROR(LOG_FILTER_RBAC, "AccountMgr::HasPermission: Wrong accountId 0");
+ TC_LOG_ERROR("rbac", "AccountMgr::HasPermission: Wrong accountId 0");
return false;
}
@@ -528,7 +526,7 @@ bool AccountMgr::HasPermission(uint32 accountId, uint32 permissionId, uint32 rea
rbac.LoadFromDB();
bool hasPermission = rbac.HasPermission(permissionId);
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::HasPermission [AccountId: %u, PermissionId: %u, realmId: %d]: %u",
+ TC_LOG_DEBUG("rbac", "AccountMgr::HasPermission [AccountId: %u, PermissionId: %u, realmId: %d]: %u",
accountId, permissionId, realmId, hasPermission);
return hasPermission;
}
@@ -544,6 +542,6 @@ void AccountMgr::ClearRBAC()
rbac::RBACPermissionContainer const& AccountMgr::GetRBACDefaultPermissions(uint8 secLevel)
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACDefaultPermissions: secLevel %u - size: %u", secLevel, uint32(_defaultPermissions[secLevel].size()));
+ TC_LOG_TRACE("rbac", "AccountMgr::GetRBACDefaultPermissions: secLevel %u - size: %u", secLevel, uint32(_defaultPermissions[secLevel].size()));
return _defaultPermissions[secLevel];
}
diff --git a/src/server/game/Accounts/RBAC.cpp b/src/server/game/Accounts/RBAC.cpp
index f7c9444cdb0..1d42ed819cd 100644
--- a/src/server/game/Accounts/RBAC.cpp
+++ b/src/server/game/Accounts/RBAC.cpp
@@ -45,7 +45,7 @@ RBACCommandResult RBACData::GrantPermission(uint32 permissionId, int32 realmId /
RBACPermission const* perm = sAccountMgr->GetRBACPermission(permissionId);
if (!perm)
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission does not exists",
+ TC_LOG_TRACE("rbac", "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission does not exists",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_ID_DOES_NOT_EXISTS;
}
@@ -53,7 +53,7 @@ RBACCommandResult RBACData::GrantPermission(uint32 permissionId, int32 realmId /
// Check if already added in denied list
if (HasDeniedPermission(permissionId))
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission in deny list",
+ TC_LOG_TRACE("rbac", "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission in deny list",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_IN_DENIED_LIST;
}
@@ -61,7 +61,7 @@ RBACCommandResult RBACData::GrantPermission(uint32 permissionId, int32 realmId /
// Already added?
if (HasGrantedPermission(permissionId))
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission already granted",
+ TC_LOG_TRACE("rbac", "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission already granted",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_CANT_ADD_ALREADY_ADDED;
}
@@ -71,13 +71,13 @@ RBACCommandResult RBACData::GrantPermission(uint32 permissionId, int32 realmId /
// Do not save to db when loading data from DB (realmId = 0)
if (realmId)
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok and DB updated",
+ TC_LOG_TRACE("rbac", "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok and DB updated",
GetId(), GetName().c_str(), permissionId, realmId);
SavePermission(permissionId, true, realmId);
CalculateNewPermissions();
}
else
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok",
+ TC_LOG_TRACE("rbac", "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_OK;
@@ -89,7 +89,7 @@ RBACCommandResult RBACData::DenyPermission(uint32 permissionId, int32 realmId /*
RBACPermission const* perm = sAccountMgr->GetRBACPermission(permissionId);
if (!perm)
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission does not exists",
+ TC_LOG_TRACE("rbac", "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission does not exists",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_ID_DOES_NOT_EXISTS;
}
@@ -97,7 +97,7 @@ RBACCommandResult RBACData::DenyPermission(uint32 permissionId, int32 realmId /*
// Check if already added in granted list
if (HasGrantedPermission(permissionId))
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission in grant list",
+ TC_LOG_TRACE("rbac", "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission in grant list",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_IN_GRANTED_LIST;
}
@@ -105,7 +105,7 @@ RBACCommandResult RBACData::DenyPermission(uint32 permissionId, int32 realmId /*
// Already added?
if (HasDeniedPermission(permissionId))
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission already denied",
+ TC_LOG_TRACE("rbac", "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission already denied",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_CANT_ADD_ALREADY_ADDED;
}
@@ -115,13 +115,13 @@ RBACCommandResult RBACData::DenyPermission(uint32 permissionId, int32 realmId /*
// Do not save to db when loading data from DB (realmId = 0)
if (realmId)
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok and DB updated",
+ TC_LOG_TRACE("rbac", "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok and DB updated",
GetId(), GetName().c_str(), permissionId, realmId);
SavePermission(permissionId, false, realmId);
CalculateNewPermissions();
}
else
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok",
+ TC_LOG_TRACE("rbac", "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_OK;
@@ -142,7 +142,7 @@ RBACCommandResult RBACData::RevokePermission(uint32 permissionId, int32 realmId
// Check if it's present in any list
if (!HasGrantedPermission(permissionId) && !HasDeniedPermission(permissionId))
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RevokePermission [Id: %u Name: %s] (Permission %u, RealmId %d). Not granted or revoked",
+ TC_LOG_TRACE("rbac", "RBACData::RevokePermission [Id: %u Name: %s] (Permission %u, RealmId %d). Not granted or revoked",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_CANT_REVOKE_NOT_IN_LIST;
}
@@ -153,7 +153,7 @@ RBACCommandResult RBACData::RevokePermission(uint32 permissionId, int32 realmId
// Do not save to db when loading data from DB (realmId = 0)
if (realmId)
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RevokePermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok and DB updated",
+ TC_LOG_TRACE("rbac", "RBACData::RevokePermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok and DB updated",
GetId(), GetName().c_str(), permissionId, realmId);
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_RBAC_ACCOUNT_PERMISSION);
stmt->setUInt32(0, GetId());
@@ -164,7 +164,7 @@ RBACCommandResult RBACData::RevokePermission(uint32 permissionId, int32 realmId
CalculateNewPermissions();
}
else
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RevokePermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok",
+ TC_LOG_TRACE("rbac", "RBACData::RevokePermission [Id: %u Name: %s] (Permission %u, RealmId %d). Ok",
GetId(), GetName().c_str(), permissionId, realmId);
return RBAC_OK;
@@ -174,7 +174,7 @@ void RBACData::LoadFromDB()
{
ClearData();
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]: Loading permissions", GetId(), GetName().c_str());
+ TC_LOG_DEBUG("rbac", "RBACData::LoadFromDB [Id: %u Name: %s]: Loading permissions", GetId(), GetName().c_str());
// Load account permissions (granted and denied) that affect current realm
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_RBAC_ACCOUNT_PERMISSIONS);
stmt->setUInt32(0, GetId());
@@ -205,7 +205,7 @@ void RBACData::LoadFromDB()
void RBACData::CalculateNewPermissions()
{
- TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::CalculateNewPermissions [Id: %u Name: %s]", GetId(), GetName().c_str());
+ TC_LOG_TRACE("rbac", "RBACData::CalculateNewPermissions [Id: %u Name: %s]", GetId(), GetName().c_str());
// Get the list of granted permissions
_globalPerms = GetGrantedPermissions();
@@ -252,7 +252,7 @@ void RBACData::ExpandPermissions(RBACPermissionContainer& permissions)
toCheck.insert(*itr);
}
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::ExpandPermissions: Expanded: %s", GetDebugPermissionString(permissions).c_str());
+ TC_LOG_DEBUG("rbac", "RBACData::ExpandPermissions: Expanded: %s", GetDebugPermissionString(permissions).c_str());
}
void RBACData::ClearData()
diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h
index bcc4122ea5b..1bc135bc8e0 100644
--- a/src/server/game/Accounts/RBAC.h
+++ b/src/server/game/Accounts/RBAC.h
@@ -788,7 +788,7 @@ class RBACData
* // previously defined "RBACData* rbac" with proper initialization
* uint32 permissionId = 2;
* if (rbac->GrantRole(permissionId) == RBAC_IN_DENIED_LIST)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Failed to grant permission %u, already denied", permissionId);
+ * TC_LOG_DEBUG("entities.player", "Failed to grant permission %u, already denied", permissionId);
* @endcode
*/
RBACCommandResult GrantPermission(uint32 permissionId, int32 realmId = 0);
@@ -811,7 +811,7 @@ class RBACData
* // previously defined "RBACData* rbac" with proper initialization
* uint32 permissionId = 2;
* if (rbac->DenyRole(permissionId) == RBAC_ID_DOES_NOT_EXISTS)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role Id %u does not exists", permissionId);
+ * TC_LOG_DEBUG("entities.player", "Role Id %u does not exists", permissionId);
* @endcode
*/
RBACCommandResult DenyPermission(uint32 permissionId, int32 realmId = 0);
@@ -835,7 +835,7 @@ class RBACData
* // previously defined "RBACData* rbac" with proper initialization
* uint32 permissionId = 2;
* if (rbac->RevokeRole(permissionId) == RBAC_OK)
- * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Permission %u succesfully removed", permissionId);
+ * TC_LOG_DEBUG("entities.player", "Permission %u succesfully removed", permissionId);
* @endcode
*/
RBACCommandResult RevokePermission(uint32 permissionId, int32 realmId = 0);
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index befe591c321..0f1dd1c53c6 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -47,7 +47,7 @@ namespace Trinity
{
public:
AchievementChatBuilder(Player const& player, ChatMsg msgtype, int32 textId, uint32 ach_id)
- : i_player(player), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {}
+ : i_player(player), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx);
@@ -75,7 +75,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
{
if (dataType >= MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` for criteria (Entry: %u) has wrong data type (%u), ignored.", criteria->ID, dataType);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` for criteria (Entry: %u) has wrong data type (%u), ignored.", criteria->ID, dataType);
return false;
}
@@ -108,7 +108,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
default:
if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` has data for non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->requiredType);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` has data for non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->requiredType);
return false;
}
break;
@@ -122,7 +122,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE:
if (!creature.id || !sObjectMgr->GetCreatureTemplate(creature.id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) has non-existing creature id in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) has non-existing creature id in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, creature.id);
return false;
}
@@ -130,13 +130,13 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE:
if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, classRace.class_id);
return false;
}
if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, classRace.race_id);
return false;
}
@@ -144,7 +144,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH:
if (health.percent < 1 || health.percent > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH (%u) has wrong percent value in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH (%u) has wrong percent value in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, health.percent);
return false;
}
@@ -152,7 +152,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD:
if (player_dead.own_team_flag > 1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD (%u) has wrong boolean value1 (%u).",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD (%u) has wrong boolean value1 (%u).",
criteria->ID, criteria->requiredType, dataType, player_dead.own_team_flag);
return false;
}
@@ -163,19 +163,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(aura.spell_id);
if (!spellEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell id in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell id in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id);
return false;
}
if (aura.effect_idx >= 3)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell effect index in value2 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell effect index in value2 (%u), ignored.",
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.effect_idx);
return false;
}
if (!spellEntry->Effects[aura.effect_idx].ApplyAuraName)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has non-aura spell effect (ID: %u Effect: %u), ignores.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has non-aura spell effect (ID: %u Effect: %u), ignores.",
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id, aura.effect_idx);
return false;
}
@@ -184,7 +184,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA:
if (!GetAreaEntryByAreaID(area.id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA (%u) has wrong area id in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA (%u) has wrong area id in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, area.id);
return false;
}
@@ -192,7 +192,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE:
if (value.compType >= COMP_TYPE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE (%u) has wrong ComparisionType in value2 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_VALUE (%u) has wrong ComparisionType in value2 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, value.compType);
return false;
}
@@ -200,7 +200,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL:
if (level.minlevel > STRONG_MAX_LEVEL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL (%u) has wrong minlevel in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL (%u) has wrong minlevel in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, level.minlevel);
return false;
}
@@ -208,7 +208,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER:
if (gender.gender > GENDER_NONE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER (%u) has wrong gender in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER (%u) has wrong gender in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, gender.gender);
return false;
}
@@ -216,7 +216,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT:
if (!ScriptId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT (%u) does not have ScriptName set, ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT (%u) does not have ScriptName set, ignored.",
criteria->ID, criteria->requiredType, dataType);
return false;
}
@@ -224,7 +224,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY:
if (difficulty.difficulty >= MAX_DIFFICULTY)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY (%u) has wrong difficulty in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY (%u) has wrong difficulty in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, difficulty.difficulty);
return false;
}
@@ -232,7 +232,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT:
if (map_players.maxcount <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT (%u) has wrong max players count in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT (%u) has wrong max players count in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, map_players.maxcount);
return false;
}
@@ -240,7 +240,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM:
if (team.team != ALLIANCE && team.team != HORDE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM (%u) has unknown team in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM (%u) has unknown team in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, team.team);
return false;
}
@@ -248,7 +248,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK:
if (drunk.state >= MAX_DRUNKEN)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK (%u) has unknown drunken state in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK (%u) has unknown drunken state in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, drunk.state);
return false;
}
@@ -256,7 +256,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY:
if (!sHolidaysStore.LookupEntry(holiday.id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY (%u) has unknown holiday in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY (%u) has unknown holiday in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, holiday.id);
return false;
}
@@ -266,7 +266,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM:
if (equipped_item.item_quality >= MAX_ITEM_QUALITY)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM (%u) has unknown quality state in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM (%u) has unknown quality state in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, equipped_item.item_quality);
return false;
}
@@ -274,7 +274,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID:
if (!sMapStore.LookupEntry(map_id.mapId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID (%u) has unknown map id in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_ID (%u) has unknown map id in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, map_id.mapId);
return false;
}
@@ -282,25 +282,25 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE:
if (!classRace.class_id && !classRace.race_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.",
criteria->ID, criteria->requiredType, dataType);
return false;
}
if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, classRace.class_id);
return false;
}
if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
criteria->ID, criteria->requiredType, dataType, classRace.race_id);
return false;
}
return true;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) has data for non-supported data type (%u), ignored.", criteria->ID, criteria->requiredType, dataType);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` (Entry: %u Type: %u) has data for non-supported data type (%u), ignored.", criteria->ID, criteria->requiredType, dataType);
return false;
}
}
@@ -395,14 +395,14 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
Map* map = source->GetMap();
if (!map->IsDungeon())
{
- TC_LOG_ERROR(LOG_FILTER_ACHIEVEMENTSYS, "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for non-dungeon/non-raid map %u",
+ TC_LOG_ERROR("achievement", "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for non-dungeon/non-raid map %u",
ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT, criteria_id, map->GetId());
return false;
}
InstanceScript* instance = ((InstanceMap*)map)->GetInstanceScript();
if (!instance)
{
- TC_LOG_ERROR(LOG_FILTER_ACHIEVEMENTSYS, "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for map %u but map does not have a instance script",
+ TC_LOG_ERROR("achievement", "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for map %u but map does not have a instance script",
ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT, criteria_id, map->GetId());
return false;
}
@@ -437,9 +437,7 @@ AchievementMgr::AchievementMgr(Player* player)
m_player = player;
}
-AchievementMgr::~AchievementMgr()
-{
-}
+AchievementMgr::~AchievementMgr() { }
void AchievementMgr::Reset()
{
@@ -467,7 +465,7 @@ void AchievementMgr::Reset()
void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2, bool evenIfCriteriaComplete)
{
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::ResetAchievementCriteria(%u, %u, %u)", type, miscvalue1, miscvalue2);
+ TC_LOG_DEBUG("achievement", "AchievementMgr::ResetAchievementCriteria(%u, %u, %u)", type, miscvalue1, miscvalue2);
// disable for gamemasters with GM-mode enabled
if (m_player->IsGameMaster())
@@ -603,7 +601,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ
if (!criteria)
{
// we will remove not existed criteria for all characters
- TC_LOG_ERROR(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement criteria %u data removed from table `character_achievement_progress`.", id);
+ TC_LOG_ERROR("achievement", "Non-existing achievement criteria %u data removed from table `character_achievement_progress`.", id);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEV_PROGRESS_CRITERIA);
@@ -635,7 +633,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
return;
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::SendAchievementEarned(%u)", achievement->ID);
+ TC_LOG_DEBUG("achievement", "AchievementMgr::SendAchievementEarned(%u)", achievement->ID);
#endif
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId()))
@@ -724,7 +722,7 @@ static const uint32 achievIdForDungeon[][4] =
*/
void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= NULL*/)
{
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::UpdateAchievementCriteria(%u, %u, %u)", type, miscValue1, miscValue2);
+ TC_LOG_DEBUG("achievement", "AchievementMgr::UpdateAchievementCriteria(%u, %u, %u)", type, miscValue1, miscValue2);
// disable for gamemasters with GM-mode enabled
if (m_player->IsGameMaster())
@@ -1860,7 +1858,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
if (entry->timeLimit && timedIter == m_timedAchievements.end())
return;
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::SetCriteriaProgress(%u, %u) for (GUID:%u)", entry->ID, changeValue, m_player->GetGUIDLow());
+ TC_LOG_DEBUG("achievement", "AchievementMgr::SetCriteriaProgress(%u, %u) for (GUID:%u)", entry->ID, changeValue, m_player->GetGUIDLow());
CriteriaProgress* progress = GetCriteriaProgress(entry);
if (!progress)
@@ -2012,7 +2010,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID))
return;
- TC_LOG_INFO(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::CompletedAchievement(%u). Player: %s (%u)",
+ TC_LOG_INFO("achievement", "AchievementMgr::CompletedAchievement(%u). Player: %s (%u)",
achievement->ID, m_player->GetName().c_str(), m_player->GetGUIDLow());
SendAchievementEarned(achievement);
@@ -2177,7 +2175,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
if (sAchievementCriteriaStore.GetNumRows() == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement criteria.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 achievement criteria.");
return;
}
@@ -2197,7 +2195,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
++loaded;
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement criteria in %u ms", loaded, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u achievement criteria in %u ms", loaded, GetMSTimeDiffToNow(oldMSTime));
}
void AchievementGlobalMgr::LoadAchievementReferenceList()
@@ -2206,7 +2204,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
if (sAchievementStore.GetNumRows() == 0)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement references.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 achievement references.");
return;
}
@@ -2226,7 +2224,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
if (AchievementEntry const* achievement = sAchievementMgr->GetAchievement(4539))
const_cast<AchievementEntry*>(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void AchievementGlobalMgr::LoadAchievementCriteriaData()
@@ -2239,7 +2237,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
return;
}
@@ -2254,7 +2252,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (!criteria)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` has data for non-existing criteria (Entry: %u), ignore.", criteria_id);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` has data for non-existing criteria (Entry: %u), ignore.", criteria_id);
continue;
}
@@ -2264,7 +2262,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (scriptName.length()) // not empty
{
if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType);
else
scriptId = sObjectMgr->GetScriptId(scriptName.c_str());
}
@@ -2368,10 +2366,10 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
}
if (!GetCriteriaDataSet(criteria) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_ACHIEVEMENT_CRITERIA, entryId, NULL))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement);
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void AchievementGlobalMgr::LoadCompletedAchievements()
@@ -2382,7 +2380,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 realm first completed achievements. DB table `character_achievement` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 realm first completed achievements. DB table `character_achievement` is empty.");
return;
}
@@ -2395,7 +2393,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
if (!achievement)
{
// Remove non existent achievements from all characters
- TC_LOG_ERROR(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement %u data removed from table `character_achievement`.", achievementId);
+ TC_LOG_ERROR("achievement", "Non-existing achievement %u data removed from table `character_achievement`.", achievementId);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEVMENT);
stmt->setUInt16(0, uint16(achievementId));
@@ -2408,7 +2406,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu realm first completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu realm first completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
}
void AchievementGlobalMgr::LoadRewards()
@@ -2422,7 +2420,7 @@ void AchievementGlobalMgr::LoadRewards()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
return;
}
@@ -2435,7 +2433,7 @@ void AchievementGlobalMgr::LoadRewards()
const AchievementEntry* pAchievement = GetAchievement(entry);
if (!pAchievement)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` has wrong achievement (Entry: %u), ignored.", entry);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` has wrong achievement (Entry: %u), ignored.", entry);
continue;
}
@@ -2450,19 +2448,19 @@ void AchievementGlobalMgr::LoadRewards()
// must be title or mail at least
if (!reward.titleId[0] && !reward.titleId[1] && !reward.sender)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have title or item reward data, ignored.", entry);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) does not have title or item reward data, ignored.", entry);
continue;
}
if (pAchievement->requiredFaction == ACHIEVEMENT_FACTION_ANY && ((reward.titleId[0] == 0) != (reward.titleId[1] == 0)))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has title (A: %u H: %u) for only one team.", entry, reward.titleId[0], reward.titleId[1]);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) has title (A: %u H: %u) for only one team.", entry, reward.titleId[0], reward.titleId[1]);
if (reward.titleId[0])
{
CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(reward.titleId[0]);
if (!titleEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_A`, set to 0", entry, reward.titleId[0]);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_A`, set to 0", entry, reward.titleId[0]);
reward.titleId[0] = 0;
}
}
@@ -2472,7 +2470,7 @@ void AchievementGlobalMgr::LoadRewards()
CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(reward.titleId[1]);
if (!titleEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_H`, set to 0", entry, reward.titleId[1]);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_H`, set to 0", entry, reward.titleId[1]);
reward.titleId[1] = 0;
}
}
@@ -2482,27 +2480,27 @@ void AchievementGlobalMgr::LoadRewards()
{
if (!sObjectMgr->GetCreatureTemplate(reward.sender))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid creature entry %u as sender, mail reward skipped.", entry, reward.sender);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) has invalid creature entry %u as sender, mail reward skipped.", entry, reward.sender);
reward.sender = 0;
}
}
else
{
if (reward.itemId)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has item reward, item will not be rewarded.", entry);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) does not have sender data but has item reward, item will not be rewarded.", entry);
if (!reward.subject.empty())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has mail subject.", entry);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) does not have sender data but has mail subject.", entry);
if (!reward.text.empty())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has mail text.", entry);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) does not have sender data but has mail text.", entry);
}
if (reward.itemId)
{
if (!sObjectMgr->GetItemTemplate(reward.itemId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid item id %u, reward mail will not contain item.", entry, reward.itemId);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_reward` (Entry: %u) has invalid item id %u, reward mail will not contain item.", entry, reward.itemId);
reward.itemId = 0;
}
}
@@ -2512,7 +2510,7 @@ void AchievementGlobalMgr::LoadRewards()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void AchievementGlobalMgr::LoadRewardLocales()
@@ -2527,7 +2525,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty");
return;
}
@@ -2539,7 +2537,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
if (m_achievementRewards.find(entry) == m_achievementRewards.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `locales_achievement_reward` (Entry: %u) has locale strings for non-existing achievement reward.", entry);
+ TC_LOG_ERROR("sql.sql", "Table `locales_achievement_reward` (Entry: %u) has locale strings for non-existing achievement reward.", entry);
continue;
}
@@ -2554,7 +2552,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
}
AchievementEntry const* AchievementGlobalMgr::GetAchievement(uint32 achievementId) const
diff --git a/src/server/game/Achievements/AchievementMgr.h b/src/server/game/Achievements/AchievementMgr.h
index f57c05a2769..65a936c3d40 100644
--- a/src/server/game/Achievements/AchievementMgr.h
+++ b/src/server/game/Achievements/AchievementMgr.h
@@ -202,7 +202,7 @@ struct AchievementCriteriaData
struct AchievementCriteriaDataSet
{
- AchievementCriteriaDataSet() : criteria_id(0) {}
+ AchievementCriteriaDataSet() : criteria_id(0) { }
typedef std::vector<AchievementCriteriaData> Storage;
void Add(AchievementCriteriaData const& data) { storage.push_back(data); }
bool Meets(Player const* source, Unit const* target, uint32 miscValue = 0) const;
@@ -293,8 +293,8 @@ class AchievementMgr
class AchievementGlobalMgr
{
friend class ACE_Singleton<AchievementGlobalMgr, ACE_Null_Mutex>;
- AchievementGlobalMgr() {}
- ~AchievementGlobalMgr() {}
+ AchievementGlobalMgr() { }
+ ~AchievementGlobalMgr() { }
public:
AchievementCriteriaEntryList const& GetAchievementCriteriaByType(AchievementCriteriaTypes type) const
diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp
index 46a2b4bafe2..ec78a7565d4 100644
--- a/src/server/game/Addons/AddonMgr.cpp
+++ b/src/server/game/Addons/AddonMgr.cpp
@@ -60,10 +60,10 @@ void LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
else
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 known addons. DB table `addons` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 known addons. DB table `addons` is empty!");
oldMSTime = getMSTime();
result = CharacterDatabase.Query("SELECT id, name, version, UNIX_TIMESTAMP(timestamp) FROM banned_addons");
@@ -92,7 +92,7 @@ void LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u banned addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u banned addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index ef50746b9ea..ec2dec8df08 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -37,9 +37,7 @@ enum eAuctionHouse
AH_MINIMUM_DEPOSIT = 100
};
-AuctionHouseMgr::AuctionHouseMgr()
-{
-}
+AuctionHouseMgr::AuctionHouseMgr() { }
AuctionHouseMgr::~AuctionHouseMgr()
{
@@ -75,10 +73,10 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32
uint32 timeHr = (((time / 60) / 60) / 12);
uint32 deposit = uint32(((multiplier * MSV * count / 3) * timeHr * 3) * sWorld->getRate(RATE_AUCTION_DEPOSIT));
- TC_LOG_DEBUG(LOG_FILTER_AUCTIONHOUSE, "MSV: %u", MSV);
- TC_LOG_DEBUG(LOG_FILTER_AUCTIONHOUSE, "Items: %u", count);
- TC_LOG_DEBUG(LOG_FILTER_AUCTIONHOUSE, "Multiplier: %f", multiplier);
- TC_LOG_DEBUG(LOG_FILTER_AUCTIONHOUSE, "Deposit: %u", deposit);
+ TC_LOG_DEBUG("auctionHouse", "MSV: %u", MSV);
+ TC_LOG_DEBUG("auctionHouse", "Items: %u", count);
+ TC_LOG_DEBUG("auctionHouse", "Multiplier: %f", multiplier);
+ TC_LOG_DEBUG("auctionHouse", "Deposit: %u", deposit);
if (deposit < AH_MINIMUM_DEPOSIT)
return AH_MINIMUM_DEPOSIT;
@@ -268,7 +266,7 @@ void AuctionHouseMgr::LoadAuctionItems()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
return;
}
@@ -285,7 +283,7 @@ void AuctionHouseMgr::LoadAuctionItems()
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry);
if (!proto)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, itemEntry);
+ TC_LOG_ERROR("misc", "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, itemEntry);
continue;
}
@@ -301,7 +299,7 @@ void AuctionHouseMgr::LoadAuctionItems()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
@@ -314,7 +312,7 @@ void AuctionHouseMgr::LoadAuctions()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
return;
}
@@ -340,7 +338,7 @@ void AuctionHouseMgr::LoadAuctions()
CharacterDatabase.CommitTransaction(trans);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
@@ -610,7 +608,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
Item* item = sAuctionMgr->GetAItem(itemGUIDLow);
if (!item)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, itemGUIDLow);
+ TC_LOG_ERROR("misc", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, itemGUIDLow);
return false;
}
data << uint32(Id);
@@ -693,14 +691,14 @@ bool AuctionEntry::LoadFromDB(Field* fields)
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(auctioneer);
if (!auctioneerData)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
+ TC_LOG_ERROR("misc", "Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
return false;
}
CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id);
if (!auctioneerInfo)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
+ TC_LOG_ERROR("misc", "Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
return false;
}
@@ -708,7 +706,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(factionTemplateId);
if (!auctionHouseEntry)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
+ TC_LOG_ERROR("misc", "Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
return false;
}
@@ -716,7 +714,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
// and itemEntry in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems)
if (!sAuctionMgr->GetAItem(itemGUIDLow))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Auction %u has not a existing item : %u", Id, itemGUIDLow);
+ TC_LOG_ERROR("misc", "Auction %u has not a existing item : %u", Id, itemGUIDLow);
return false;
}
return true;
@@ -740,7 +738,7 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup()
if (!expAuctions)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> No expired auctions to delete");
+ TC_LOG_INFO("server.loading", ">> No expired auctions to delete");
return;
}
@@ -789,7 +787,7 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup()
}
while (expAuctions->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Deleted %u expired auctions in %u ms", expirecount, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Deleted %u expired auctions in %u ms", expirecount, GetMSTimeDiffToNow(oldMSTime));
}
@@ -816,14 +814,14 @@ bool AuctionEntry::LoadFromFieldList(Field* fields)
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(auctioneer);
if (!auctioneerData)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
+ TC_LOG_ERROR("misc", "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
return false;
}
CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id);
if (!auctioneerInfo)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
+ TC_LOG_ERROR("misc", "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
return false;
}
@@ -832,7 +830,7 @@ bool AuctionEntry::LoadFromFieldList(Field* fields)
if (!auctionHouseEntry)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
+ TC_LOG_ERROR("misc", "AuctionEntry::LoadFromFieldList() - Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
return false;
}
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index 97f91e7ba7a..07dfb45150c 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -286,7 +286,7 @@ void Battlefield::InitStalker(uint32 entry, float x, float y, float z, float o)
if (Creature* creature = SpawnCreature(entry, x, y, z, o, TEAM_NEUTRAL))
StalkerGuid = creature->GetGUID();
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::InitStalker: could not spawn Stalker (Creature entry %u), zone messeges will be un-available", entry);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::InitStalker: could not spawn Stalker (Creature entry %u), zone messeges will be un-available", entry);
}
void Battlefield::KickAfkPlayers()
@@ -595,10 +595,10 @@ BfGraveyard* Battlefield::GetGraveyardById(uint32 id) const
if (BfGraveyard* graveyard = m_GraveyardList.at(id))
return graveyard;
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::GetGraveyardById Id:%u not existed", id);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::GetGraveyardById Id:%u not existed", id);
}
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::GetGraveyardById Id:%u cant be found", id);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::GetGraveyardById Id:%u cant be found", id);
return NULL;
}
@@ -691,7 +691,7 @@ void BfGraveyard::SetSpirit(Creature* spirit, TeamId team)
{
if (!spirit)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "BfGraveyard::SetSpirit: Invalid Spirit.");
+ TC_LOG_ERROR("bg.battlefield", "BfGraveyard::SetSpirit: Invalid Spirit.");
return;
}
@@ -817,14 +817,14 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
Map* map = sMapMgr->CreateBaseMap(m_MapId);
if (!map)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::SpawnCreature: Can't create creature entry: %u map not found", entry);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u map not found", entry);
return 0;
}
Creature* creature = new Creature;
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, team, x, y, z, o))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
delete creature;
return NULL;
}
@@ -834,7 +834,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cinfo)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::SpawnCreature: entry %u does not exist.", entry);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: entry %u does not exist.", entry);
return NULL;
}
// force using DB speeds -- do we really need this?
@@ -860,8 +860,8 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
GameObject* go = new GameObject;
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, PHASEMASK_NORMAL, x, y, z, o, 0, 0, 0, 0, 100, GO_STATE_READY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::SpawnGameObject: Gameobject template %u not found in database! Battlefield not created!", entry);
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "Battlefield::SpawnGameObject: Cannot create gameobject template %u! Battlefield not created!", entry);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnGameObject: Gameobject template %u not found in database! Battlefield not created!", entry);
+ TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnGameObject: Cannot create gameobject template %u! Battlefield not created!", entry);
delete go;
return NULL;
}
@@ -954,7 +954,7 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
{
ASSERT(capturePoint);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEFIELD, "Creating capture point %u", capturePoint->GetEntry());
+ TC_LOG_DEBUG("bg.battlefield", "Creating capture point %u", capturePoint->GetEntry());
m_capturePointGUID = MAKE_NEW_GUID(capturePoint->GetGUIDLow(), capturePoint->GetEntry(), HIGHGUID_GAMEOBJECT);
@@ -962,7 +962,7 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
GameObjectTemplate const* goinfo = capturePoint->GetGOInfo();
if (goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "OutdoorPvP: GO %u is not capture point!", capturePoint->GetEntry());
+ TC_LOG_ERROR("misc", "OutdoorPvP: GO %u is not capture point!", capturePoint->GetEntry());
return false;
}
@@ -1120,7 +1120,7 @@ bool BfCapturePoint::Update(uint32 diff)
if (m_OldState != m_State)
{
- //TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "%u->%u", m_OldState, m_State);
+ //TC_LOG_ERROR("bg.battlefield", "%u->%u", m_OldState, m_State);
if (oldTeam != m_team)
ChangeTeam(oldTeam);
return true;
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h
index 788bbf9cb2e..70805dd3a97 100644
--- a/src/server/game/Battlefield/Battlefield.h
+++ b/src/server/game/Battlefield/Battlefield.h
@@ -80,7 +80,7 @@ class BfCapturePoint
virtual ~BfCapturePoint() { }
- virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
+ virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
// Send world state update to all players present
void SendUpdateWorldState(uint32 field, uint32 value);
@@ -98,7 +98,7 @@ class BfCapturePoint
// Returns true if the state of the objective has changed, in this case, the OutdoorPvP must send a world state ui update.
virtual bool Update(uint32 diff);
- virtual void ChangeTeam(TeamId /*oldTeam*/) {}
+ virtual void ChangeTeam(TeamId /*oldTeam*/) { }
virtual void SendChangePhase();
bool SetCapturePointData(GameObject* capturePoint);
@@ -223,7 +223,7 @@ class Battlefield : public ZoneScript
void InvitePlayersInZoneToWar();
/// Called when a Unit is kill in battlefield zone
- virtual void HandleKill(Player* /*killer*/, Unit* /*killed*/) {};
+ virtual void HandleKill(Player* /*killer*/, Unit* /*killed*/) { };
uint32 GetTypeId() { return m_TypeId; }
uint32 GetZoneId() { return m_ZoneId; }
@@ -398,7 +398,7 @@ class Battlefield : public ZoneScript
void KickAfkPlayers();
// use for switch off all worldstate for client
- virtual void SendRemoveWorldStates(Player* /*player*/) {}
+ virtual void SendRemoveWorldStates(Player* /*player*/) { }
// use for send a packet for all player list
void BroadcastPacketToZone(WorldPacket& data) const;
diff --git a/src/server/game/Battlefield/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp
index 8bce2342899..1585724334d 100644
--- a/src/server/game/Battlefield/BattlefieldMgr.cpp
+++ b/src/server/game/Battlefield/BattlefieldMgr.cpp
@@ -23,12 +23,12 @@
BattlefieldMgr::BattlefieldMgr()
{
m_UpdateTimer = 0;
- //TC_LOG_DEBUG(LOG_FILTER_BATTLEFIELD, "Instantiating BattlefieldMgr");
+ //TC_LOG_DEBUG("bg.battlefield", "Instantiating BattlefieldMgr");
}
BattlefieldMgr::~BattlefieldMgr()
{
- //TC_LOG_DEBUG(LOG_FILTER_BATTLEFIELD, "Deleting BattlefieldMgr");
+ //TC_LOG_DEBUG("bg.battlefield", "Deleting BattlefieldMgr");
for (BattlefieldSet::iterator itr = m_BattlefieldSet.begin(); itr != m_BattlefieldSet.end(); ++itr)
delete *itr;
}
@@ -39,13 +39,13 @@ void BattlefieldMgr::InitBattlefield()
// respawn, init variables
if (!pBf->SetupBattlefield())
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Battlefield : Wintergrasp init failed.");
+ TC_LOG_INFO("misc", "Battlefield : Wintergrasp init failed.");
delete pBf;
}
else
{
m_BattlefieldSet.push_back(pBf);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Battlefield : Wintergrasp successfully initiated.");
+ TC_LOG_INFO("misc", "Battlefield : Wintergrasp successfully initiated.");
}
/* For Cataclysm: Tol Barad
@@ -53,13 +53,13 @@ void BattlefieldMgr::InitBattlefield()
// respawn, init variables
if (!pBf->SetupBattlefield())
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEFIELD, "Battlefield : Tol Barad init failed.");
+ TC_LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad init failed.");
delete pBf;
}
else
{
m_BattlefieldSet.push_back(pBf);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEFIELD, "Battlefield : Tol Barad successfully initiated.");
+ TC_LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad successfully initiated.");
} */
}
@@ -79,7 +79,7 @@ void BattlefieldMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
return;
bf->HandlePlayerEnterZone(player, zoneid);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEFIELD, "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), bf->GetTypeId());
+ TC_LOG_DEBUG("bg.battlefield", "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), bf->GetTypeId());
}
void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
@@ -92,7 +92,7 @@ void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
if (!itr->second->HasPlayer(player))
return;
itr->second->HandlePlayerLeaveZone(player, zoneid);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEFIELD, "Player %u left outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
+ TC_LOG_DEBUG("bg.battlefield", "Player %u left outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
}
Battlefield *BattlefieldMgr::GetBattlefieldToZoneId(uint32 zoneid)
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 6103ff4c5ce..fbc27dc47aa 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -166,7 +166,7 @@ bool BattlefieldWG::SetupBattlefield()
{
Position towerCannonPos;
WGTurret[i].GetPosition(&towerCannonPos);
- if (Creature* creature = SpawnCreature(NPC_TOWER_CANNON, towerCannonPos, TEAM_ALLIANCE))
+ if (Creature* creature = SpawnCreature(NPC_WINTERGRASP_TOWER_CANNON, towerCannonPos, TEAM_ALLIANCE))
{
CanonList.insert(creature->GetGUID());
HideNpc(creature);
@@ -228,7 +228,7 @@ void BattlefieldWG::OnBattleStart()
m_titansRelicGUID = relic->GetGUID();
}
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "WG: Failed to spawn titan relic.");
+ TC_LOG_ERROR("bg.battlefield", "WG: Failed to spawn titan relic.");
// Update tower visibility and update faction
@@ -473,7 +473,7 @@ uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) const
case AREA_THE_CHILLED_QUAGMIRE:
return BATTLEFIELD_WG_GY_HORDE;
default:
- TC_LOG_ERROR(LOG_FILTER_BATTLEFIELD, "BattlefieldWG::GetSpiritGraveyardId: Unexpected Area Id %u", areaId);
+ TC_LOG_ERROR("bg.battlefield", "BattlefieldWG::GetSpiritGraveyardId: Unexpected Area Id %u", areaId);
break;
}
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h
index e13eddd7672..683df863a5f 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -208,7 +208,6 @@ enum WintergraspNpcs
NPC_TAUNKA_SPIRIT_GUIDE = 31841, // Horde spirit guide for Wintergrasp
NPC_DWARVEN_SPIRIT_GUIDE = 31842, // Alliance spirit guide for Wintergrasp
- NPC_TOWER_CANNON = 28366,
NPC_WINTERGRASP_SIEGE_ENGINE_ALLIANCE = 28312,
NPC_WINTERGRASP_SIEGE_ENGINE_HORDE = 32627,
@@ -1189,7 +1188,7 @@ struct BfWGGameObjectBuilding
if (m_WG->GetRelic())
m_WG->GetRelic()->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
else
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "BattlefieldWG: Relic not found.");
+ TC_LOG_ERROR("misc", "BattlefieldWG: Relic not found.");
break;
}
@@ -1338,7 +1337,7 @@ struct BfWGGameObjectBuilding
{
Position towerCannonPos;
TowerCannon[towerid].TurretTop[i].GetPosition(&towerCannonPos);
- if (Creature* turret = m_WG->SpawnCreature(28366, towerCannonPos, TeamId(0)))
+ if (Creature* turret = m_WG->SpawnCreature(NPC_WINTERGRASP_TOWER_CANNON, towerCannonPos, TeamId(0)))
{
m_TurretTopList.insert(turret->GetGUID());
switch (go->GetEntry())
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 82d02c538dc..222a3f55387 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -82,7 +82,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string const& teamNa
// Add captain as member
AddMember(CaptainGuid);
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "New ArenaTeam created [Id: %u, Name: %s] [Type: %u] [Captain low GUID: %u]", GetId(), GetName().c_str(), GetType(), captainLowGuid);
+ TC_LOG_DEBUG("bg.arena", "New ArenaTeam created [Id: %u, Name: %s] [Type: %u] [Captain low GUID: %u]", GetId(), GetName().c_str(), GetType(), captainLowGuid);
return true;
}
@@ -120,7 +120,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
// Check if player is already in a similar arena team
if ((player && player->GetArenaTeamId(GetSlot())) || Player::GetArenaTeamIdFromDB(playerGuid, GetType()) != 0)
{
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType());
+ TC_LOG_DEBUG("bg.arena", "Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType());
return false;
}
@@ -179,7 +179,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1);
}
- TC_LOG_INFO(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] joined arena team type: %u [Id: %u, Name: %s].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId(), GetName().c_str());
+ TC_LOG_INFO("bg.arena", "Player: %s [GUID: %u] joined arena team type: %u [Id: %u, Name: %s].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId(), GetName().c_str());
return true;
}
@@ -245,7 +245,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
// Delete member if character information is missing
if (newMember.Name.empty())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ArenaTeam %u has member with empty name - probably player %u doesn't exist, deleting him from memberlist!", arenaTeamId, GUID_LOPART(newMember.Guid));
+ TC_LOG_ERROR("sql.sql", "ArenaTeam %u has member with empty name - probably player %u doesn't exist, deleting him from memberlist!", arenaTeamId, GUID_LOPART(newMember.Guid));
DelMember(newMember.Guid, true);
continue;
}
@@ -262,7 +262,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
if (Empty() || !captainPresentInTeam)
{
// Arena team is empty or captain is not in team, delete from db
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
+ TC_LOG_DEBUG("bg.arena", "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
return false;
}
@@ -304,7 +304,7 @@ void ArenaTeam::SetCaptain(uint64 guid)
newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0);
if (oldCaptain)
{
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u, Name: %s] [Type: %u].",
+ TC_LOG_DEBUG("bg.arena", "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u, Name: %s] [Type: %u].",
oldCaptain->GetName().c_str(), oldCaptain->GetGUIDLow(), newCaptain->GetName().c_str(),
newCaptain->GetGUIDLow(), GetId(), GetName().c_str(), GetType());
}
@@ -328,7 +328,7 @@ void ArenaTeam::DelMember(uint64 guid, bool cleanDb)
// delete all info regarding this team
for (uint32 i = 0; i < ARENA_TEAM_END; ++i)
player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] left arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str());
+ TC_LOG_DEBUG("bg.arena", "Player: %s [GUID: %u] left arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str());
}
// Only used for single member deletion, for arena team disband we use a single query for more efficiency
@@ -353,7 +353,7 @@ void ArenaTeam::Disband(WorldSession* session)
BroadcastEvent(ERR_ARENA_TEAM_DISBANDED_S, 0, 2, session->GetPlayerName(), GetName(), "");
if (Player* player = session->GetPlayer())
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str());
+ TC_LOG_DEBUG("bg.arena", "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUIDLow(), GetType(), GetId(), GetName().c_str());
}
// Update database
@@ -431,7 +431,7 @@ void ArenaTeam::Roster(WorldSession* session)
}
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_ROSTER");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_ROSTER");
}
void ArenaTeam::Query(WorldSession* session)
@@ -446,7 +446,7 @@ void ArenaTeam::Query(WorldSession* session)
data << uint32(BorderStyle); // border style
data << uint32(BorderColor); // border color
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_QUERY_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_QUERY_RESPONSE");
}
void ArenaTeam::SendStats(WorldSession* session)
@@ -537,7 +537,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun
data << str1 << str2 << str3;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_ARENAS, "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
+ TC_LOG_ERROR("bg.arena", "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
return;
}
@@ -546,7 +546,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun
BroadcastPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_EVENT");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_EVENT");
}
void ArenaTeam::MassInviteToEvent(WorldSession* session)
@@ -576,7 +576,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
default:
break;
}
- TC_LOG_ERROR(LOG_FILTER_ARENAS, "FATAL: Unknown arena team type %u for some arena team", type);
+ TC_LOG_ERROR("bg.arena", "FATAL: Unknown arena team type %u for some arena team", type);
return 0xFF;
}
diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
index cb3388151bd..ac15440e564 100644
--- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
@@ -82,7 +82,7 @@ uint32 ArenaTeamMgr::GenerateArenaTeamId()
{
if (NextArenaTeamId >= 0xFFFFFFFE)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Arena team ids overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("bg.battleground", "Arena team ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return NextArenaTeamId++;
@@ -102,7 +102,7 @@ void ArenaTeamMgr::LoadArenaTeams()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
return;
}
@@ -132,7 +132,7 @@ void ArenaTeamMgr::LoadArenaTeams()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ArenaTeamMgr::DistributeArenaPoints()
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 211ab6caf77..044036ef860 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -87,7 +87,7 @@ namespace Trinity
{
public:
Battleground2ChatBuilder(ChatMsg msgtype, int32 textId, Player const* source, int32 arg1, int32 arg2)
- : _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) {}
+ : _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
@@ -320,7 +320,7 @@ inline void Battleground::_CheckSafePositions(uint32 diff)
GetTeamStartLoc(player->GetBGTeam(), x, y, z, o);
if (pos.GetExactDistSq(x, y, z) > maxDist)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", player->GetName().c_str(), GetMapId());
+ TC_LOG_DEBUG("bg.battleground", "BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", player->GetName().c_str(), GetMapId());
player->TeleportTo(GetMapId(), x, y, z, o);
}
}
@@ -472,7 +472,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
if (!FindBgMap())
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
+ TC_LOG_ERROR("bg.battleground", "Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
EndNow();
return;
}
@@ -596,7 +596,7 @@ inline Player* Battleground::_GetPlayer(uint64 guid, bool offlineRemove, char co
{
player = ObjectAccessor::FindPlayer(guid);
if (!player)
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::%s: player (GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::%s: player (GUID: %u) not found for BG (map: %u, instance id: %u)!",
context, GUID_LOPART(guid), m_MapId, m_InstanceID);
}
return player;
@@ -785,18 +785,18 @@ void Battleground::EndBattleground(uint32 winner)
winnerMatchmakerRating = GetArenaMatchmakerRating(winner);
winnerMatchmakerChange = winnerArenaTeam->WonAgainst(winnerMatchmakerRating, loserMatchmakerRating, winnerChange);
loserMatchmakerChange = loserArenaTeam->LostAgainst(loserMatchmakerRating, winnerMatchmakerRating, loserChange);
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "match Type: %u --- Winner: old rating: %u, rating gain: %d, old MMR: %u, MMR gain: %d --- Loser: old rating: %u, rating loss: %d, old MMR: %u, MMR loss: %d ---", m_ArenaType, winnerTeamRating, winnerChange, winnerMatchmakerRating,
+ TC_LOG_DEBUG("bg.arena", "match Type: %u --- Winner: old rating: %u, rating gain: %d, old MMR: %u, MMR gain: %d --- Loser: old rating: %u, rating loss: %d, old MMR: %u, MMR loss: %d ---", m_ArenaType, winnerTeamRating, winnerChange, winnerMatchmakerRating,
winnerMatchmakerChange, loserTeamRating, loserChange, loserMatchmakerRating, loserMatchmakerChange);
SetArenaMatchmakerRating(winner, winnerMatchmakerRating + winnerMatchmakerChange);
SetArenaMatchmakerRating(GetOtherTeam(winner), loserMatchmakerRating + loserMatchmakerChange);
SetArenaTeamRatingChangeForTeam(winner, winnerChange);
SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loserChange);
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[TEAM_ALLIANCE], m_ArenaTeamIds[TEAM_HORDE], winnerArenaTeam->GetId(), winnerChange, loserChange);
+ TC_LOG_DEBUG("bg.arena", "Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[TEAM_ALLIANCE], m_ArenaTeamIds[TEAM_HORDE], winnerArenaTeam->GetId(), winnerChange, loserChange);
if (sWorld->getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO))
for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(itr->first))
{
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Statistics match Type: %u for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows",
+ TC_LOG_DEBUG("bg.arena", "Statistics match Type: %u for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows",
m_ArenaType, player->GetName().c_str(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3),
player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone,
itr->second->KillingBlows);
@@ -1073,7 +1073,7 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if (Transport)
player->TeleportToBGEntryPoint();
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Removed player %s from Battleground.", player->GetName().c_str());
+ TC_LOG_DEBUG("bg.battleground", "Removed player %s from Battleground.", player->GetName().c_str());
}
//battleground object will be deleted next Battleground::Update() call
@@ -1090,7 +1090,7 @@ void Battleground::Reset()
m_Events = 0;
if (m_InvitedAlliance > 0 || m_InvitedHorde > 0)
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!",
m_InvitedAlliance, m_InvitedHorde, m_MapId, m_InstanceID);
m_InvitedAlliance = 0;
@@ -1119,7 +1119,7 @@ void Battleground::StartBattleground()
sBattlegroundMgr->AddBattleground(this);
if (m_IsRated)
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Arena match type: %u for Team1Id: %u - Team2Id: %u started.", m_ArenaType, m_ArenaTeamIds[TEAM_ALLIANCE], m_ArenaTeamIds[TEAM_HORDE]);
+ TC_LOG_DEBUG("bg.arena", "Arena match type: %u for Team1Id: %u - Team2Id: %u started.", m_ArenaType, m_ArenaTeamIds[TEAM_ALLIANCE], m_ArenaTeamIds[TEAM_HORDE]);
}
void Battleground::AddPlayer(Player* player)
@@ -1390,7 +1390,7 @@ void Battleground::UpdatePlayerScore(Player* Source, uint32 type, uint32 value,
itr->second->HealingDone += value;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!",
type, m_MapId, m_InstanceID);
break;
}
@@ -1462,9 +1462,9 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, GetBgMap(),
PHASEMASK_NORMAL, x, y, z, o, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("sql.sql", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
entry, m_MapId, m_InstanceID);
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
entry, m_MapId, m_InstanceID);
delete go;
return false;
@@ -1515,7 +1515,7 @@ void Battleground::DoorClose(uint32 type)
}
}
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::DoorClose: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::DoorClose: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
}
@@ -1527,7 +1527,7 @@ void Battleground::DoorOpen(uint32 type)
obj->SetGoState(GO_STATE_ACTIVE);
}
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
}
@@ -1535,7 +1535,7 @@ GameObject* Battleground::GetBGObject(uint32 type)
{
GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]);
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
return obj;
}
@@ -1544,7 +1544,7 @@ Creature* Battleground::GetBGCreature(uint32 type)
{
Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]);
if (!creature)
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
return creature;
}
@@ -1577,7 +1577,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
Creature* creature = new Creature;
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, teamval, x, y, z, o))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!",
entry, m_MapId, m_InstanceID);
delete creature;
return NULL;
@@ -1588,7 +1588,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cinfo)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!",
entry, m_MapId, m_InstanceID);
delete creature;
return NULL;
@@ -1623,7 +1623,7 @@ bool Battleground::DelCreature(uint32 type)
return true;
}
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::DelCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::DelCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
BgCreatures[type] = 0;
return false;
@@ -1641,7 +1641,7 @@ bool Battleground::DelObject(uint32 type)
BgObjects[type] = 0;
return true;
}
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::DelObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::DelObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
BgObjects[type] = 0;
return false;
@@ -1667,7 +1667,7 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
//creature->CastSpell(creature, SPELL_SPIRIT_HEAL_CHANNEL, true);
return true;
}
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!",
type, entry, m_MapId, m_InstanceID);
EndNow();
return false;
@@ -1765,7 +1765,7 @@ void Battleground::HandleTriggerBuff(uint64 go_guid)
index--;
if (index < 0)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::HandleTriggerBuff: cannot find buff gameobject (GUID: %u, entry: %u, type: %u) in internal data for BG (map: %u, instance id: %u)!",
+ TC_LOG_ERROR("bg.battleground", "Battleground::HandleTriggerBuff: cannot find buff gameobject (GUID: %u, entry: %u, type: %u) in internal data for BG (map: %u, instance id: %u)!",
GUID_LOPART(go_guid), obj->GetEntry(), obj->GetGoType(), m_MapId, m_InstanceID);
return;
}
@@ -1889,14 +1889,12 @@ int32 Battleground::GetObjectType(uint64 guid)
for (uint32 i = 0; i < BgObjects.size(); ++i)
if (BgObjects[i] == guid)
return i;
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::GetObjectType: player used gameobject (GUID: %u) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
+ TC_LOG_ERROR("bg.battleground", "Battleground::GetObjectType: player used gameobject (GUID: %u) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
GUID_LOPART(guid), m_MapId, m_InstanceID);
return -1;
}
-void Battleground::HandleKillUnit(Creature* /*victim*/, Player* /*killer*/)
-{
-}
+void Battleground::HandleKillUnit(Creature* /*victim*/, Player* /*killer*/) { }
void Battleground::CheckArenaAfterTimerConditions()
{
@@ -1956,18 +1954,18 @@ uint32 Battleground::GetTeamScore(uint32 teamId) const
if (teamId == TEAM_ALLIANCE || teamId == TEAM_HORDE)
return m_TeamScores[teamId];
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "GetTeamScore with wrong Team %u for BG %u", teamId, GetTypeID());
+ TC_LOG_ERROR("bg.battleground", "GetTeamScore with wrong Team %u for BG %u", teamId, GetTypeID());
return 0;
}
void Battleground::HandleAreaTrigger(Player* player, uint32 trigger)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Unhandled AreaTrigger %u in Battleground %u. Player coords (x: %f, y: %f, z: %f)",
+ TC_LOG_DEBUG("bg.battleground", "Unhandled AreaTrigger %u in Battleground %u. Player coords (x: %f, y: %f, z: %f)",
trigger, player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
}
bool Battleground::CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground::CheckAchievementCriteriaMeet: No implementation for criteria %u", criteriaId);
+ TC_LOG_ERROR("bg.battleground", "Battleground::CheckAchievementCriteriaMeet: No implementation for criteria %u", criteriaId);
return false;
}
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 76ff08e0281..eebf5bead25 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -162,7 +162,7 @@ struct BattlegroundPlayer
struct BattlegroundObjectInfo
{
- BattlegroundObjectInfo() : object(NULL), timer(0), spellid(0) {}
+ BattlegroundObjectInfo() : object(NULL), timer(0), spellid(0) { }
GameObject *object;
int32 timer;
@@ -287,7 +287,7 @@ class Battleground
virtual void StartingEventOpenDoors() { }
virtual void ResetBGSubclass() { } // must be implemented in BG subclass
- virtual void DestroyGate(Player* /*player*/, GameObject* /*go*/) {}
+ virtual void DestroyGate(Player* /*player*/, GameObject* /*go*/) { }
/* achievement req. */
virtual bool IsAllNodesControlledByTeam(uint32 /*team*/) const { return false; }
@@ -409,7 +409,7 @@ class Battleground
// Packet Transfer
// method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
- virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
+ virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = NULL, bool self = true);
void SendPacketToAll(WorldPacket* packet);
void YellToAll(Creature* creature, const char* text, uint32 language);
@@ -474,17 +474,17 @@ class Battleground
virtual void HandleKillUnit(Creature* /*unit*/, Player* /*killer*/);
// Battleground events
- virtual void EventPlayerDroppedFlag(Player* /*player*/) {}
- virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) {}
+ virtual void EventPlayerDroppedFlag(Player* /*player*/) { }
+ virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) { }
void EventPlayerLoggedIn(Player* player);
void EventPlayerLoggedOut(Player* player);
- virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) {}
- virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){}
+ virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) { }
+ virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){ }
// this function can be used by spell to interact with the BG map
- virtual void DoAction(uint32 /*action*/, uint64 /*var*/) {}
+ virtual void DoAction(uint32 /*action*/, uint64 /*var*/) { }
- virtual void HandlePlayerResurrect(Player* /*player*/) {}
+ virtual void HandlePlayerResurrect(Player* /*player*/) { }
// Death related
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
@@ -531,8 +531,8 @@ class Battleground
bool CanAwardArenaPoints() const { return m_LevelMin >= BG_AWARD_ARENA_POINTS_MIN_LEVEL; }
virtual uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return 0; }
- virtual void SetDroppedFlagGUID(uint64 /*guid*/, int32 /*team*/ = -1) {}
- virtual void HandleQuestComplete(uint32 /*questid*/, Player* /*player*/) {}
+ virtual void SetDroppedFlagGUID(uint64 /*guid*/, int32 /*team*/ = -1) { }
+ virtual void HandleQuestComplete(uint32 /*questid*/, Player* /*player*/) { }
virtual bool CanActivateGO(int32 /*entry*/, uint32 /*team*/) const { return true; }
virtual bool IsSpellAllowed(uint32 /*spellId*/, Player const* /*player*/) const { return true; }
uint32 GetTeamScore(uint32 TeamID) const;
@@ -559,7 +559,7 @@ class Battleground
// Scorekeeping
BattlegroundScoreMap PlayerScores; // Player scores
// must be implemented in BG subclass
- virtual void RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) {}
+ virtual void RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) { }
// Player lists, those need to be accessible by inherited classes
BattlegroundPlayerMap m_Players;
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index 936cc88462f..6797c1f5e64 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -132,7 +132,7 @@ void BattlegroundMgr::Update(uint32 diff)
if (m_NextRatedArenaUpdate < diff)
{
// forced update for rated arenas (scan all, but skipped non rated)
- TC_LOG_TRACE(LOG_FILTER_ARENAS, "BattlegroundMgr: UPDATING ARENA QUEUES");
+ TC_LOG_TRACE("bg.arena", "BattlegroundMgr: UPDATING ARENA QUEUES");
for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype)
for (int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(diff,
@@ -178,7 +178,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battlegro
*data << uint32(QueueSlot); // queue id (0...1) - player can be in 2 queues in time
// The following segment is read as uint64 in client but can be appended as their original type.
*data << uint8(arenatype);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "BattlegroundMgr::BuildBattlegroundStatusPacket: arenatype = %u for bg instanceID %u, TypeID %u.", arenatype, bg->GetClientInstanceID(), bg->GetTypeID());
+ TC_LOG_DEBUG("network", "BattlegroundMgr::BuildBattlegroundStatusPacket: arenatype = %u for bg instanceID %u, TypeID %u.", arenatype, bg->GetClientInstanceID(), bg->GetTypeID());
*data << uint8(bg->isArena() ? 0xE : 0x0);
*data << uint32(bg->GetTypeID());
*data << uint16(0x1F90);
@@ -210,7 +210,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battlegro
*data << uint8(arenaFaction == ALLIANCE ? 1 : 0); // arenafaction (0 for horde, 1 for alliance)
break;
default:
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Unknown BG status!");
+ TC_LOG_ERROR("bg.battleground", "Unknown BG status!");
break;
}
}
@@ -236,7 +236,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
*data << uint32(pointsLost); // Rating Lost
*data << uint32(pointsGained); // Rating gained
*data << uint32(MatchmakerRating); // Matchmaking Value
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "rating change: %d", rating_change);
+ TC_LOG_DEBUG("bg.battleground", "rating change: %d", rating_change);
}
for (int8 i = 1; i >= 0; --i)
{
@@ -266,7 +266,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
BattlegroundScore* score = itr2->second;
if (!bg->IsPlayerInBattleground(itr2->first))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true));
+ TC_LOG_ERROR("bg.battleground", "Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true));
continue;
}
@@ -370,14 +370,14 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
*data << uint32(0);
break;
default:
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID());
+ TC_LOG_DEBUG("network", "Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID());
*data << uint32(0);
break;
}
// should never happen
if (++scoreCount >= bg->GetMaxPlayers() && itr != bg->GetPlayerScoresEnd())
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bg->GetTypeID(true), bg->GetPlayerScoresSize(), bg->GetMaxPlayers());
+ TC_LOG_ERROR("bg.battleground", "Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bg->GetTypeID(true), bg->GetPlayerScoresSize(), bg->GetMaxPlayers());
break;
}
}
@@ -532,7 +532,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId original
if (!bg_template)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId);
+ TC_LOG_ERROR("bg.battleground", "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId);
return NULL;
}
@@ -695,7 +695,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
return;
}
@@ -713,7 +713,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
if (!bl)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeId);
+ TC_LOG_ERROR("bg.battleground", "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeId);
continue;
}
@@ -733,14 +733,14 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
+ TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam);
continue;
}
if (data.LevelMin == 0 || data.LevelMax == 0 || data.LevelMin > data.LevelMax)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
+ TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
data.bgTypeId, data.LevelMin, data.LevelMax);
continue;
}
@@ -768,7 +768,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
+ TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
continue;
}
@@ -782,7 +782,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
+ TC_LOG_ERROR("sql.sql", "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
continue;
}
}
@@ -802,7 +802,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void BattlegroundMgr::InitAutomaticArenaPointDistribution()
@@ -812,15 +812,15 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
time_t wstime = time_t(sWorld->getWorldState(WS_ARENA_DISTRIBUTION_TIME));
time_t curtime = time(NULL);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Initializing Automatic Arena Point Distribution");
+ TC_LOG_DEBUG("bg.battleground", "Initializing Automatic Arena Point Distribution");
if (wstime < curtime)
{
m_NextAutoDistributionTime = curtime; // reset will be called in the next update
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: Next arena point distribution time in the past, reseting it now.");
+ TC_LOG_DEBUG("bg.battleground", "Battleground: Next arena point distribution time in the past, reseting it now.");
}
else
m_NextAutoDistributionTime = wstime;
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Automatic Arena Point Distribution initialized.");
+ TC_LOG_DEBUG("bg.battleground", "Automatic Arena Point Distribution initialized.");
}
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* player, BattlegroundTypeId bgTypeId, uint8 fromWhere)
@@ -898,11 +898,11 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt
team = player->GetTeam();
bg->GetTeamStartLoc(team, x, y, z, O);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr::SendToBattleground: Sending %s to map %u, X %f, Y %f, Z %f, O %f (bgType %u)", player->GetName().c_str(), mapid, x, y, z, O, bgTypeId);
+ TC_LOG_DEBUG("bg.battleground", "BattlegroundMgr::SendToBattleground: Sending %s to map %u, X %f, Y %f, Z %f, O %f (bgType %u)", player->GetName().c_str(), mapid, x, y, z, O, bgTypeId);
player->TeleportTo(mapid, x, y, z, O);
}
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr::SendToBattleground: Instance %u (bgType %u) not found while trying to teleport player %s", instanceId, bgTypeId, player->GetName().c_str());
+ TC_LOG_ERROR("bg.battleground", "BattlegroundMgr::SendToBattleground: Instance %u (bgType %u) not found while trying to teleport player %s", instanceId, bgTypeId, player->GetName().c_str());
}
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid)
@@ -1068,7 +1068,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
return;
}
@@ -1084,7 +1084,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
uint32 bgTypeId = fields[1].GetUInt32();
if (!sBattlemasterListStore.LookupEntry(bgTypeId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId);
+ TC_LOG_ERROR("sql.sql", "Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId);
continue;
}
@@ -1092,7 +1092,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId)
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index e52d64a4f72..ae7a8d2e191 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -154,7 +154,7 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
index += BG_TEAMS_COUNT;
if (ginfo->Team == HORDE)
index++;
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Adding Group to BattlegroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index);
+ TC_LOG_DEBUG("bg.battleground", "Adding Group to BattlegroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index);
uint32 lastOnlineTime = getMSTime();
@@ -295,7 +295,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
std::string playerName = "Unknown";
if (Player* player = ObjectAccessor::FindPlayer(guid))
playerName = player->GetName();
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: couldn't find player %s (GUID: %u)", playerName.c_str(), GUID_LOPART(guid));
+ TC_LOG_ERROR("bg.battleground", "BattlegroundQueue: couldn't find player %s (GUID: %u)", playerName.c_str(), GUID_LOPART(guid));
return;
}
@@ -330,10 +330,10 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
//player can't be in queue without group, but just in case
if (bracket_id == -1)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid));
+ TC_LOG_ERROR("bg.battleground", "BattlegroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid));
return;
}
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id);
+ TC_LOG_DEBUG("bg.battleground", "BattlegroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id);
// ALL variables are correctly set
// We can ignore leveling up in queue - it should not cause crash
@@ -363,7 +363,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
{
if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(group->ArenaTeamId))
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating);
+ TC_LOG_DEBUG("bg.battleground", "UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating);
if (Player* player = ObjectAccessor::FindPlayer(guid))
at->MemberLost(player, group->OpponentsMatchmakerRating);
else
@@ -476,7 +476,7 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg,
uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: invited player %s (%u) to BG instance %u queueindex %u bgtype %u",
+ TC_LOG_DEBUG("bg.battleground", "Battleground: invited player %s (%u) to BG instance %u queueindex %u bgtype %u",
player->GetName().c_str(), player->GetGUIDLow(), bg->GetInstanceID(), queueSlot, bg->GetTypeID());
// send status packet
@@ -784,14 +784,14 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
Battleground* bg_template = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
if (!bg_template)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground: Update: bg template not found for %u", bgTypeId);
+ TC_LOG_ERROR("bg.battleground", "Battleground: Update: bg template not found for %u", bgTypeId);
return;
}
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id);
if (!bracketEntry)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id);
+ TC_LOG_ERROR("bg.battleground", "Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id);
return;
}
@@ -818,7 +818,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, 0, false);
if (!bg2)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
+ TC_LOG_ERROR("bg.battleground", "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
return;
}
// invite those selection pools
@@ -844,7 +844,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, false);
if (!bg2)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
+ TC_LOG_ERROR("bg.battleground", "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
return;
}
@@ -942,7 +942,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
Battleground* arena = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, true);
if (!arena)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update couldn't create arena instance for rated arena match!");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundQueue::Update couldn't create arena instance for rated arena match!");
return;
}
@@ -950,8 +950,8 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
hTeam->OpponentsTeamRating = aTeam->ArenaTeamRating;
aTeam->OpponentsMatchmakerRating = hTeam->ArenaMatchmakerRating;
hTeam->OpponentsMatchmakerRating = aTeam->ArenaMatchmakerRating;
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", aTeam->ArenaTeamId, aTeam->OpponentsTeamRating);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", hTeam->ArenaTeamId, hTeam->OpponentsTeamRating);
+ TC_LOG_DEBUG("bg.battleground", "setting oposite teamrating for team %u to %u", aTeam->ArenaTeamId, aTeam->OpponentsTeamRating);
+ TC_LOG_DEBUG("bg.battleground", "setting oposite teamrating for team %u to %u", hTeam->ArenaTeamId, hTeam->OpponentsTeamRating);
// now we must move team if we changed its faction to another faction queue, because then we will spam log by errors in Queue::RemovePlayer
if (aTeam->Team != ALLIANCE)
@@ -970,7 +970,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
InviteGroupToBG(aTeam, arena, ALLIANCE);
InviteGroupToBG(hTeam, arena, HORDE);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Starting rated arena match!");
+ TC_LOG_DEBUG("bg.battleground", "Starting rated arena match!");
arena->StartBattleground();
}
}
@@ -1041,7 +1041,7 @@ bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
BattlegroundQueue &bgQueue = sBattlegroundMgr->GetBattlegroundQueue(m_BgQueueTypeId);
if (bgQueue.IsPlayerInvited(m_PlayerGuid, m_BgInstanceGUID, m_RemoveTime))
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.", player->GetGUIDLow(), m_BgInstanceGUID);
+ TC_LOG_DEBUG("bg.battleground", "Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.", player->GetGUIDLow(), m_BgInstanceGUID);
player->RemoveBattlegroundQueueId(m_BgQueueTypeId);
bgQueue.RemovePlayer(m_PlayerGuid, true);
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h
index 0595d73fcc6..34c9e5ea1c7 100644
--- a/src/server/game/Battlegrounds/BattlegroundQueue.h
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.h
@@ -106,7 +106,7 @@ class BattlegroundQueue
class SelectionPool
{
public:
- SelectionPool(): PlayerCount(0) {};
+ SelectionPool(): PlayerCount(0) { };
void Init();
bool AddGroup(GroupQueueInfo* ginfo, uint32 desiredCount);
bool KickGroup(uint32 size);
@@ -163,9 +163,9 @@ class BGQueueRemoveEvent : public BasicEvent
public:
BGQueueRemoveEvent(uint64 pl_guid, uint32 bgInstanceGUID, BattlegroundTypeId BgTypeId, BattlegroundQueueTypeId bgQueueTypeId, uint32 removeTime)
: m_PlayerGuid(pl_guid), m_BgInstanceGUID(bgInstanceGUID), m_RemoveTime(removeTime), m_BgTypeId(BgTypeId), m_BgQueueTypeId(bgQueueTypeId)
- {}
+ { }
- virtual ~BGQueueRemoveEvent() {}
+ virtual ~BGQueueRemoveEvent() { }
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index da292d050e9..a26b9dbaa2f 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -41,9 +41,7 @@ BattlegroundAB::BattlegroundAB()
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AB_HAS_BEGUN;
}
-BattlegroundAB::~BattlegroundAB()
-{
-}
+BattlegroundAB::~BattlegroundAB() { }
void BattlegroundAB::PostUpdateImpl(uint32 diff)
{
@@ -363,7 +361,7 @@ void BattlegroundAB::_SendNodeUpdate(uint8 node)
void BattlegroundAB::_NodeOccupied(uint8 node, Team team)
{
if (!AddSpiritGuide(node, BG_AB_SpiritGuidePos[node][0], BG_AB_SpiritGuidePos[node][1], BG_AB_SpiritGuidePos[node][2], BG_AB_SpiritGuidePos[node][3], team))
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Failed to spawn spirit guide! point: %u, team: %u, ", node, team);
+ TC_LOG_ERROR("bg.battleground", "Failed to spawn spirit guide! point: %u, team: %u, ", node, team);
if (node >= BG_AB_DYNAMIC_NODES_COUNT)//only dynamic nodes, no start points
return;
@@ -569,7 +567,7 @@ bool BattlegroundAB::SetupBattleground()
|| !AddObject(BG_AB_OBJECT_AURA_CONTESTED + 8*i, BG_AB_OBJECTID_AURA_C, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, std::sin(BG_AB_NodePositions[i][3]/2), std::cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn some object Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundAB: Failed to spawn some object Battleground not created!");
return false;
}
}
@@ -577,7 +575,7 @@ bool BattlegroundAB::SetupBattleground()
|| !AddObject(BG_AB_OBJECT_GATE_H, BG_AB_OBJECTID_GATE_H, BG_AB_DoorPositions[1][0], BG_AB_DoorPositions[1][1], BG_AB_DoorPositions[1][2], BG_AB_DoorPositions[1][3], BG_AB_DoorPositions[1][4], BG_AB_DoorPositions[1][5], BG_AB_DoorPositions[1][6], BG_AB_DoorPositions[1][7], RESPAWN_IMMEDIATELY)
)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn door object Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundAB: Failed to spawn door object Battleground not created!");
return false;
}
//buffs
@@ -587,7 +585,7 @@ bool BattlegroundAB::SetupBattleground()
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 1, Buff_Entries[1], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, std::sin(BG_AB_BuffPositions[i][3]/2), std::cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 2, Buff_Entries[2], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, std::sin(BG_AB_BuffPositions[i][3]/2), std::cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
)
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn buff object!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundAB: Failed to spawn buff object!");
}
return true;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index f8c9e888176..7a54317032b 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -39,9 +39,7 @@ BattlegroundAV::BattlegroundAV()
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AV_HAS_BEGUN;
}
-BattlegroundAV::~BattlegroundAV()
-{
-}
+BattlegroundAV::~BattlegroundAV() { }
uint16 BattlegroundAV::GetBonusHonor(uint8 kills) /// @todo move this function to Battleground.cpp (needs to find a way to get m_MaxLevel)
{
@@ -59,7 +57,7 @@ void BattlegroundAV::HandleKillPlayer(Player* player, Player* killer)
void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "bg_av HandleKillUnit %i", unit->GetEntry());
+ TC_LOG_DEBUG("bg.battleground", "bg_av HandleKillUnit %i", unit->GetEntry());
if (GetStatus() != STATUS_IN_PROGRESS)
return;
uint32 entry = unit->GetEntry();
@@ -94,7 +92,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
{
if (!m_CaptainAlive[0])
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
+ TC_LOG_ERROR("bg.battleground", "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
return;
}
m_CaptainAlive[0]=false;
@@ -113,7 +111,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
{
if (!m_CaptainAlive[1])
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
+ TC_LOG_ERROR("bg.battleground", "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
return;
}
m_CaptainAlive[1]=false;
@@ -140,7 +138,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
return;//maybe we should log this, cause this must be a cheater or a big bug
uint8 team = GetTeamIndexByTeamId(player->GetTeam());
/// @todo add reputation, events (including quest not available anymore, next quest availabe, go/npc de/spawning)and maybe honor
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed", questid);
switch (questid)
{
case AV_QUEST_A_SCRAPS1:
@@ -150,7 +148,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[team][0]+=20;
if (m_Team_QuestStatus[team][0] == 500 || m_Team_QuestStatus[team][0] == 1000 || m_Team_QuestStatus[team][0] == 1500) //25, 50, 75 turn ins
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed starting with unit upgrading..", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed starting with unit upgrading..", questid);
for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i)
if (m_Nodes[i].Owner == player->GetTeam() && m_Nodes[i].State == POINT_CONTROLED)
{
@@ -165,21 +163,21 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[team][1]++;
RewardReputationToTeam(team, 1, player->GetTeam());
if (m_Team_QuestStatus[team][1] == 30)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
break;
case AV_QUEST_A_COMMANDER2:
case AV_QUEST_H_COMMANDER2:
m_Team_QuestStatus[team][2]++;
RewardReputationToTeam(team, 1, player->GetTeam());
if (m_Team_QuestStatus[team][2] == 60)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
break;
case AV_QUEST_A_COMMANDER3:
case AV_QUEST_H_COMMANDER3:
m_Team_QuestStatus[team][3]++;
RewardReputationToTeam(team, 1, player->GetTeam());
if (m_Team_QuestStatus[team][3] == 120)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
break;
case AV_QUEST_A_BOSS1:
case AV_QUEST_H_BOSS1:
@@ -188,16 +186,16 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
case AV_QUEST_H_BOSS2:
m_Team_QuestStatus[team][4]++;
if (m_Team_QuestStatus[team][4] >= 200)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
break;
case AV_QUEST_A_NEAR_MINE:
case AV_QUEST_H_NEAR_MINE:
m_Team_QuestStatus[team][5]++;
if (m_Team_QuestStatus[team][5] == 28)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][6] == 7)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
}
break;
case AV_QUEST_A_OTHER_MINE:
@@ -205,9 +203,9 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[team][6]++;
if (m_Team_QuestStatus[team][6] == 7)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][5] == 20)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
}
break;
case AV_QUEST_A_RIDER_HIDE:
@@ -215,9 +213,9 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[team][7]++;
if (m_Team_QuestStatus[team][7] == 25)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][8] == 25)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
}
break;
case AV_QUEST_A_RIDER_TAME:
@@ -225,13 +223,13 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[team][8]++;
if (m_Team_QuestStatus[team][8] == 25)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][7] == 25)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
}
break;
default:
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed but is not interesting at all", questid);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed but is not interesting at all", questid);
return; //was no interesting quest at all
break;
}
@@ -430,7 +428,7 @@ void BattlegroundAV::StartingEventCloseDoors()
void BattlegroundAV::StartingEventOpenDoors()
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning mine stuff");
+ TC_LOG_DEBUG("bg.battleground", "BG_AV: start spawning mine stuff");
for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_N_MAX; i++)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_S_MAX; i++)
@@ -502,7 +500,7 @@ void BattlegroundAV::RemovePlayer(Player* player, uint64 /*guid*/, uint32 /*team
{
if (!player)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "bg_AV no player at remove");
+ TC_LOG_ERROR("bg.battleground", "bg_AV no player at remove");
return;
}
/// @todo search more buffs
@@ -587,7 +585,7 @@ void BattlegroundAV::UpdatePlayerScore(Player* Source, uint32 type, uint32 value
void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
uint32 object = GetObjectThroughNode(node);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "bg_av: player destroyed point node %i object %i", node, object);
+ TC_LOG_DEBUG("bg.battleground", "bg_av: player destroyed point node %i object %i", node, object);
//despawn banner
SpawnBGObject(object, RESPAWN_ONE_DAY);
@@ -602,7 +600,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
if (BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
DelCreature(AV_CPLACE_A_MARSHAL_SOUTH + tmp);
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
+ TC_LOG_ERROR("bg.battleground", "BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
//spawn destroyed aura
for (uint8 i=0; i <= 9; i++)
SpawnBGObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + i + (tmp * 10), RESPAWN_IMMEDIATELY);
@@ -662,7 +660,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
if (!initial)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "bg_av depopulating mine %i (0=north, 1=south)", mine);
+ TC_LOG_DEBUG("bg.battleground", "bg_av depopulating mine %i (0=north, 1=south)", mine);
if (mine == AV_SOUTH_MINE)
for (uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
if (BgCreatures[i])
@@ -673,7 +671,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
}
SendMineWorldStates(mine);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "bg_av populating mine %i (0=north, 1=south)", mine);
+ TC_LOG_DEBUG("bg.battleground", "bg_av populating mine %i (0=north, 1=south)", mine);
uint16 miner;
//also neutral team exists.. after a big time, the neutral team tries to conquer the mine
if (mine == AV_NORTH_MINE)
@@ -695,7 +693,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
else
miner = AV_NPC_S_MINE_N_1;
//vermin
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "spawning vermin");
+ TC_LOG_DEBUG("bg.battleground", "spawning vermin");
if (team == ALLIANCE)
cinfo = AV_NPC_S_MINE_A_3;
else if (team == HORDE)
@@ -766,7 +764,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
if (BgCreatures[node])
DelCreature(node);
if (!AddSpiritGuide(node, BG_AV_CreaturePos[node][0], BG_AV_CreaturePos[node][1], BG_AV_CreaturePos[node][2], BG_AV_CreaturePos[node][3], owner))
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "AV: couldn't spawn spiritguide at node %i", node);
+ TC_LOG_ERROR("bg.battleground", "AV: couldn't spawn spiritguide at node %i", node);
}
for (uint8 i=0; i<4; i++)
AddAVCreature(creatureid, c_place+i);
@@ -816,7 +814,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node)
BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "bg_AV getnodethroughobject %i", object);
+ TC_LOG_DEBUG("bg.battleground", "bg_AV getnodethroughobject %i", object);
if (object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER)
return BG_AV_Nodes(object);
if (object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_HUT)
@@ -831,14 +829,14 @@ BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
return BG_AV_Nodes(object - 29);
if (object == BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE)
return BG_AV_NODES_SNOWFALL_GRAVE;
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundAV: ERROR! GetPlace got a wrong object :(");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundAV: ERROR! GetPlace got a wrong object :(");
ASSERT(false);
return BG_AV_Nodes(0);
}
uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
{ //this function is the counterpart to GetNodeThroughObject()
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "bg_AV GetObjectThroughNode %i", node);
+ TC_LOG_DEBUG("bg.battleground", "bg_AV GetObjectThroughNode %i", node);
if (m_Nodes[node].Owner == ALLIANCE)
{
if (m_Nodes[node].State == POINT_ASSAULTED)
@@ -869,7 +867,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
}
else if (m_Nodes[node].Owner == AV_NEUTRAL_TEAM)
return BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE;
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node);
+ TC_LOG_ERROR("bg.battleground", "BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node);
ASSERT(false);
return 0;
}
@@ -881,7 +879,7 @@ void BattlegroundAV::EventPlayerClickedOnFlag(Player* source, GameObject* target
if (GetStatus() != STATUS_IN_PROGRESS)
return;
int32 object = GetObjectType(target_obj->GetGUID());
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV using gameobject %i with type %i", target_obj->GetEntry(), object);
+ TC_LOG_DEBUG("bg.battleground", "BG_AV using gameobject %i with type %i", target_obj->GetEntry(), object);
if (object < 0)
return;
switch (target_obj->GetEntry())
@@ -920,10 +918,10 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
EventPlayerAssaultsPoint(player, object);
return;
}
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "player defends point object: %i node: %i", object, node);
+ TC_LOG_DEBUG("bg.battleground", "player defends point object: %i node: %i", object, node);
if (m_Nodes[node].PrevOwner != team)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BG_AV: player defends point which doesn't belong to his team %i", node);
+ TC_LOG_ERROR("bg.battleground", "BG_AV: player defends point which doesn't belong to his team %i", node);
return;
}
@@ -983,7 +981,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
BG_AV_Nodes node = GetNodeThroughObject(object);
uint32 owner = m_Nodes[node].Owner; //maybe name it prevowner
uint32 team = player->GetTeam();
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "bg_av: player assaults point object %i node %i", object, node);
+ TC_LOG_DEBUG("bg.battleground", "bg_av: player assaults point object %i node %i", object, node);
if (owner == team || team == m_Nodes[node].TotalOwner)
return; //surely a gm used this object
@@ -1129,7 +1127,7 @@ uint8 BattlegroundAV::GetWorldStateType(uint8 state, uint16 team) //this is used
if (state == POINT_ASSAULTED)
return 3;
}
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BG_AV: should update a strange worldstate state:%i team:%i", state, team);
+ TC_LOG_ERROR("bg.battleground", "BG_AV: should update a strange worldstate state:%i team:%i", state, team);
return 5; //this will crash the game, but i want to know if something is wrong here
}
@@ -1212,7 +1210,7 @@ bool BattlegroundAV::SetupBattleground()
BG_AV_DoorPositons[1][0], BG_AV_DoorPositons[1][1], BG_AV_DoorPositons[1][2], BG_AV_DoorPositons[1][3],
0, 0, std::sin(BG_AV_DoorPositons[1][3]/2), std::cos(BG_AV_DoorPositons[1][3]/2), RESPAWN_IMMEDIATELY))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundAV: Failed to spawn some object Battleground not created!1");
+ TC_LOG_ERROR("sql.sql", "BatteGroundAV: Failed to spawn some object Battleground not created!1");
return false;
}
@@ -1244,7 +1242,7 @@ bool BattlegroundAV::SetupBattleground()
BG_AV_ObjectPos[i][0], BG_AV_ObjectPos[i][1], BG_AV_ObjectPos[i][2], BG_AV_ObjectPos[i][3],
0, 0, std::sin(BG_AV_ObjectPos[i][3]/2), std::cos(BG_AV_ObjectPos[i][3]/2), RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!2");
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!2");
return false;
}
}
@@ -1271,7 +1269,7 @@ bool BattlegroundAV::SetupBattleground()
BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3],
0, 0, std::sin(BG_AV_ObjectPos[i+8][3]/2), std::cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!3");
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!3");
return false;
}
}
@@ -1296,7 +1294,7 @@ bool BattlegroundAV::SetupBattleground()
BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3],
0, 0, std::sin(BG_AV_ObjectPos[i+8][3]/2), std::cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!4");
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!4");
return false;
}
}
@@ -1314,7 +1312,7 @@ bool BattlegroundAV::SetupBattleground()
std::cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2),
RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i);
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i);
return false;
}
}
@@ -1338,7 +1336,7 @@ bool BattlegroundAV::SetupBattleground()
std::cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2),
RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i);
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i);
return false;
}
}
@@ -1356,7 +1354,7 @@ bool BattlegroundAV::SetupBattleground()
std::cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2),
RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i);
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i);
return false;
}
}
@@ -1376,7 +1374,7 @@ bool BattlegroundAV::SetupBattleground()
std::cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2),
RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i);
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i);
return false;
}
}
@@ -1394,7 +1392,7 @@ bool BattlegroundAV::SetupBattleground()
std::cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2),
RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i);
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i);
return false;
}
}
@@ -1411,7 +1409,7 @@ bool BattlegroundAV::SetupBattleground()
std::cos(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2),
RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!8");
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!8");
return false;
}
for (uint8 i = 0; i < 4; i++)
@@ -1429,13 +1427,13 @@ bool BattlegroundAV::SetupBattleground()
BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3],
0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), std::cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i);
+ TC_LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i);
return false;
}
}
uint16 i;
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Alterac Valley: entering state STATUS_WAIT_JOIN ...");
+ TC_LOG_DEBUG("bg.battleground", "Alterac Valley: entering state STATUS_WAIT_JOIN ...");
// Initial Nodes
for (i = 0; i < BG_AV_OBJECT_MAX; i++)
SpawnBGObject(i, RESPAWN_ONE_DAY);
@@ -1475,22 +1473,22 @@ bool BattlegroundAV::SetupBattleground()
SpawnBGObject(BG_AV_OBJECT_AURA_N_SNOWFALL_GRAVE, RESPAWN_IMMEDIATELY);
//creatures
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV start poputlating nodes");
+ TC_LOG_DEBUG("bg.battleground", "BG_AV start poputlating nodes");
for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
{
if (m_Nodes[i].Owner)
PopulateNode(i);
}
//all creatures which don't get despawned through the script are static
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning static creatures");
+ TC_LOG_DEBUG("bg.battleground", "BG_AV: start spawning static creatures");
for (i = 0; i < AV_STATICCPLACE_MAX; i++)
AddAVCreature(0, i + AV_CPLACE_MAX);
//mainspiritguides:
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning spiritguides creatures");
+ TC_LOG_DEBUG("bg.battleground", "BG_AV: start spawning spiritguides creatures");
AddSpiritGuide(7, BG_AV_CreaturePos[7][0], BG_AV_CreaturePos[7][1], BG_AV_CreaturePos[7][2], BG_AV_CreaturePos[7][3], ALLIANCE);
AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE);
//spawn the marshals (those who get deleted, if a tower gets destroyed)
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning marshal creatures");
+ TC_LOG_DEBUG("bg.battleground", "BG_AV: start spawning marshal creatures");
for (i = AV_NPC_A_MARSHAL_SOUTH; i <= AV_NPC_H_MARSHAL_WTOWER; i++)
AddAVCreature(i, AV_CPLACE_A_MARSHAL_SOUTH + (i - AV_NPC_A_MARSHAL_SOUTH));
AddAVCreature(AV_NPC_HERALD, AV_CPLACE_HERALD);
@@ -1517,7 +1515,7 @@ char const* BattlegroundAV::GetNodeName(BG_AV_Nodes node)
case BG_AV_NODES_FROSTWOLF_WTOWER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_FROST_W);
case BG_AV_NODES_FROSTWOLF_HUT: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_FROST_HUT);
default:
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "tried to get name for node %u", node);
+ TC_LOG_ERROR("bg.battleground", "tried to get name for node %u", node);
break;
}
@@ -1528,22 +1526,22 @@ void BattlegroundAV::AssaultNode(BG_AV_Nodes node, uint16 team)
{
if (m_Nodes[node].TotalOwner == team)
{
- TC_LOG_FATAL(LOG_FILTER_BATTLEGROUND, "Assaulting team is TotalOwner of node");
+ TC_LOG_FATAL("bg.battleground", "Assaulting team is TotalOwner of node");
ASSERT(false);
}
if (m_Nodes[node].Owner == team)
{
- TC_LOG_FATAL(LOG_FILTER_BATTLEGROUND, "Assaulting team is owner of node");
+ TC_LOG_FATAL("bg.battleground", "Assaulting team is owner of node");
ASSERT(false);
}
if (m_Nodes[node].State == POINT_DESTROYED)
{
- TC_LOG_FATAL(LOG_FILTER_BATTLEGROUND, "Destroyed node is being assaulted");
+ TC_LOG_FATAL("bg.battleground", "Destroyed node is being assaulted");
ASSERT(false);
}
if (m_Nodes[node].State == POINT_ASSAULTED && m_Nodes[node].TotalOwner) //only assault an assaulted node if no totalowner exists
{
- TC_LOG_FATAL(LOG_FILTER_BATTLEGROUND, "Assault on an not assaulted node with total owner");
+ TC_LOG_FATAL("bg.battleground", "Assault on an not assaulted node with total owner");
ASSERT(false);
}
//the timer gets another time, if the previous owner was 0 == Neutral
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
index b49ae97493c..264f421d9f7 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
@@ -84,7 +84,7 @@ void BattlegroundBE::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Killer player not found");
+ TC_LOG_ERROR("bg.battleground", "Killer player not found");
return;
}
@@ -133,7 +133,7 @@ bool BattlegroundBE::SetupBattleground()
|| !AddObject(BG_BE_OBJECT_BUFF_1, BG_BE_OBJECT_TYPE_BUFF_1, 6249.042f, 275.3239f, 11.22033f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|| !AddObject(BG_BE_OBJECT_BUFF_2, BG_BE_OBJECT_TYPE_BUFF_2, 6228.26f, 249.566f, 11.21812f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundBE: Failed to spawn some object!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundBE: Failed to spawn some object!");
return false;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
index 83965884029..4eed8b05c25 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
@@ -166,7 +166,7 @@ void BattlegroundDS::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundDS: Killer player not found");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundDS: Killer player not found");
return;
}
@@ -228,7 +228,7 @@ bool BattlegroundDS::SetupBattleground()
|| !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_1, 0, 1369.977f, 817.2882f, 16.08718f, 3.106686f, RESPAWN_IMMEDIATELY)
|| !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_2, 0, 1212.833f, 765.3871f, 16.09484f, 0.0f, RESPAWN_IMMEDIATELY))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundDS: Failed to spawn some object!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundDS: Failed to spawn some object!");
return false;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index 95808065d62..d73242388c8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -50,9 +50,7 @@ BattlegroundEY::BattlegroundEY()
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN;
}
-BattlegroundEY::~BattlegroundEY()
-{
-}
+BattlegroundEY::~BattlegroundEY() { }
void BattlegroundEY::PostUpdateImpl(uint32 diff)
{
@@ -152,7 +150,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint()
Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
if (!player)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
+ TC_LOG_ERROR("bg.battleground", "BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
++j;
continue;
}
@@ -192,7 +190,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]);
if (!player)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
+ TC_LOG_ERROR("bg.battleground", "BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
//move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug
m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]);
m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
@@ -481,7 +479,7 @@ bool BattlegroundEY::SetupBattleground()
|| !AddObject(BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER, BG_OBJECT_HU_TOWER_CAP_EY_ENTRY, 2282.121582f, 1760.006958f, 1189.707153f, 1.919862f, 0, 0, 0.819152f, 0.573576f, RESPAWN_ONE_DAY)
)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn some object Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn some object Battleground not created!");
return false;
}
@@ -491,28 +489,28 @@ bool BattlegroundEY::SetupBattleground()
AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(m_Points_Trigger[i]);
if (!at)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]);
+ TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]);
continue;
}
if (!AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3, Buff_Entries[0], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 1, Buff_Entries[1], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 2, Buff_Entries[2], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
)
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Cannot spawn buff");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Cannot spawn buff");
}
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE);
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
return false;
}
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_HORDE);
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
return false;
}
@@ -577,7 +575,7 @@ void BattlegroundEY::RespawnFlagAfterDrop()
if (obj)
obj->Delete();
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Unknown dropped flag guid: %u", GUID_LOPART(GetDroppedFlagGUID()));
+ TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Unknown dropped flag guid: %u", GUID_LOPART(GetDroppedFlagGUID()));
SetDroppedFlagGUID(0);
}
@@ -749,7 +747,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
WorldSafeLocsEntry const* sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId);
if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team))
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
+ TC_LOG_ERROR("bg.battleground", "BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
Point, Team, m_CapturingPointTypes[Point].GraveYardId);
// SpawnBGCreature(Point, RESPAWN_IMMEDIATELY);
@@ -901,7 +899,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player)
if (!entry)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!");
return NULL;
}
@@ -918,7 +916,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player)
{
entry = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[i].GraveYardId);
if (!entry)
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Not found graveyard: %u", m_CapturingPointTypes[i].GraveYardId);
+ TC_LOG_ERROR("bg.battleground", "BattlegroundEY: Not found graveyard: %u", m_CapturingPointTypes[i].GraveYardId);
else
{
distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
index f03b458e7ff..26c6d276311 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h
@@ -249,7 +249,7 @@ enum BG_EY_Objectives
struct BattlegroundEYPointIconsStruct
{
BattlegroundEYPointIconsStruct(uint32 _WorldStateControlIndex, uint32 _WorldStateAllianceControlledIndex, uint32 _WorldStateHordeControlledIndex)
- : WorldStateControlIndex(_WorldStateControlIndex), WorldStateAllianceControlledIndex(_WorldStateAllianceControlledIndex), WorldStateHordeControlledIndex(_WorldStateHordeControlledIndex) {}
+ : WorldStateControlIndex(_WorldStateControlIndex), WorldStateAllianceControlledIndex(_WorldStateAllianceControlledIndex), WorldStateHordeControlledIndex(_WorldStateHordeControlledIndex) { }
uint32 WorldStateControlIndex;
uint32 WorldStateAllianceControlledIndex;
uint32 WorldStateHordeControlledIndex;
@@ -270,7 +270,7 @@ struct BattlegroundEYLosingPointStruct
: SpawnNeutralObjectType(_SpawnNeutralObjectType),
DespawnObjectTypeAlliance(_DespawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
DespawnObjectTypeHorde(_DespawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde)
- {}
+ { }
uint32 SpawnNeutralObjectType;
uint32 DespawnObjectTypeAlliance;
@@ -286,7 +286,7 @@ struct BattlegroundEYCapturingPointStruct
SpawnObjectTypeAlliance(_SpawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance),
SpawnObjectTypeHorde(_SpawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde),
GraveYardId(_GraveYardId)
- {}
+ { }
uint32 DespawnNeutralObjectType;
uint32 SpawnObjectTypeAlliance;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index 501c0b4c1f1..aa3568a62d5 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -45,6 +45,7 @@ BattlegroundIC::BattlegroundIC()
closeFortressDoorsTimer = CLOSE_DOORS_TIME; // the doors are closed again... in a special way
doorsClosed = false;
+ docksTimer = DOCKS_UPDATE_TIME;
resourceTimer = IC_RESOURCE_TIME;
for (uint8 i = NODE_TYPE_REFINERY; i < MAX_NODE_TYPES; ++i)
@@ -56,20 +57,7 @@ BattlegroundIC::BattlegroundIC()
gunshipAlliance = NULL;
}
-BattlegroundIC::~BattlegroundIC()
-{
- if (gunshipHorde)
- {
- gunshipHorde->RemoveFromWorld();
- delete gunshipHorde;
- }
-
- if (gunshipAlliance)
- {
- gunshipAlliance->RemoveFromWorld();
- delete gunshipAlliance;
- }
-}
+BattlegroundIC::~BattlegroundIC() { }
void BattlegroundIC::HandlePlayerResurrect(Player* player)
{
@@ -278,7 +266,7 @@ void BattlegroundIC::StartingEventOpenDoors()
BG_IC_Teleporters[i].z, BG_IC_Teleporters[i].o,
0, 0, 0, 0, RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
}
}
}
@@ -374,7 +362,7 @@ bool BattlegroundIC::SetupBattleground()
BG_IC_ObjSpawnlocs[i].z, BG_IC_ObjSpawnlocs[i].o,
0, 0, 0, 0, RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry);
return false;
}
}
@@ -386,7 +374,7 @@ bool BattlegroundIC::SetupBattleground()
BG_IC_NpcSpawnlocs[i].z, BG_IC_NpcSpawnlocs[i].o,
RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
return false;
}
}
@@ -396,7 +384,7 @@ bool BattlegroundIC::SetupBattleground()
|| !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+3, BG_IC_SpiritGuidePos[7][0], BG_IC_SpiritGuidePos[7][1], BG_IC_SpiritGuidePos[7][2], BG_IC_SpiritGuidePos[7][3], ALLIANCE)
|| !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+4, BG_IC_SpiritGuidePos[8][0], BG_IC_SpiritGuidePos[8][1], BG_IC_SpiritGuidePos[8][2], BG_IC_SpiritGuidePos[8][3], HORDE))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: Failed to spawn initial spirit guide!");
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn initial spirit guide!");
return false;
}
@@ -405,7 +393,7 @@ bool BattlegroundIC::SetupBattleground()
if (!gunshipAlliance || !gunshipHorde)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error creating gunships!");
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error creating gunships!");
return false;
}
@@ -535,7 +523,7 @@ void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target
DelObject(nodePoint[i].gameobject_type);
if (!AddObject(nodePoint[i].gameobject_type, nodePoint[i].gameobject_entry, cords[0], cords[1], cords[2], cords[3], 0, 0, 0, 0, RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning a banner (type: %u, entry: %u). Isle of Conquest BG cancelled.", nodePoint[i].gameobject_type, nodePoint[i].gameobject_entry);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a banner (type: %u, entry: %u). Isle of Conquest BG cancelled.", nodePoint[i].gameobject_type, nodePoint[i].gameobject_entry);
Battleground::EndBattleground(WINNER_NONE);
}
@@ -601,7 +589,7 @@ uint32 BattlegroundIC::GetNextBanner(ICNodePoint* nodePoint, uint32 team, bool r
return nodePoint->last_entry;
// we should never be here...
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle Of Conquest: Unexpected return in GetNextBanner function");
+ TC_LOG_ERROR("bg.battleground", "Isle Of Conquest: Unexpected return in GetNextBanner function");
return 0;
}
@@ -625,7 +613,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
BG_IC_SpiritGuidePos[nodePoint->nodeType][0], BG_IC_SpiritGuidePos[nodePoint->nodeType][1],
BG_IC_SpiritGuidePos[nodePoint->nodeType][2], BG_IC_SpiritGuidePos[nodePoint->nodeType][3],
(nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE)))
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
}
switch (nodePoint->gameobject_type)
@@ -643,11 +631,11 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
BG_IC_HangarTeleporters[u].GetPositionZ(), BG_IC_HangarTeleporters[u].GetOrientation(),
0, 0, 0, 0, RESPAWN_ONE_DAY))
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning a gunship portal. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1+u);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1+u);
}
}
- //TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction);
+ //TC_LOG_ERROR("bg.battleground", "BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction);
(nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->EnableMovement(true);
(nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->EnableMovement(false);
@@ -845,20 +833,18 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go)
if (go->GetEntry() == GO_HORDE_GATE_1 || go->GetEntry() == GO_HORDE_GATE_2 || go->GetEntry() == GO_HORDE_GATE_3)
{
if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].team, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].o, RESPAWN_ONE_DAY))
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_OVERLORD_AGMAR].entry);
}
else if (go->GetEntry() == GO_ALLIANCE_GATE_1 || go->GetEntry() == GO_ALLIANCE_GATE_2 || go->GetEntry() == GO_ALLIANCE_GATE_3)
{
if (!GetBgMap()->GetCreature(BgCreatures[BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type]) && !AddCreature(BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].type, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].team, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].x, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].y, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].z, BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].o, RESPAWN_ONE_DAY))
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry);
+ TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry);
}
SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP));
}
-void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/)
-{
-}
+void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/) { }
WorldSafeLocsEntry const* BattlegroundIC::GetClosestGraveYard(Player* player)
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
index 3f644936262..a2c1ca42406 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
@@ -81,7 +81,7 @@ void BattlegroundNA::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundNA: Killer player not found");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundNA: Killer player not found");
return;
}
@@ -130,7 +130,7 @@ bool BattlegroundNA::SetupBattleground()
|| !AddObject(BG_NA_OBJECT_BUFF_1, BG_NA_OBJECT_TYPE_BUFF_1, 4009.189941f, 2895.250000f, 13.052700f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|| !AddObject(BG_NA_OBJECT_BUFF_2, BG_NA_OBJECT_TYPE_BUFF_2, 4103.330078f, 2946.350098f, 13.051300f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundNA: Failed to spawn some object!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundNA: Failed to spawn some object!");
return false;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
index b7c19175632..045e007bdb7 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
@@ -81,7 +81,7 @@ void BattlegroundRL::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "Killer player not found");
+ TC_LOG_ERROR("bg.battleground", "Killer player not found");
return;
}
@@ -128,7 +128,7 @@ bool BattlegroundRL::SetupBattleground()
|| !AddObject(BG_RL_OBJECT_BUFF_1, BG_RL_OBJECT_TYPE_BUFF_1, 1328.719971f, 1632.719971f, 36.730400f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|| !AddObject(BG_RL_OBJECT_BUFF_2, BG_RL_OBJECT_TYPE_BUFF_2, 1243.300049f, 1699.170044f, 34.872601f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundRL: Failed to spawn some object!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundRL: Failed to spawn some object!");
return false;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
index 3ca9b6d4f72..5e5007d18a1 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
@@ -73,9 +73,7 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff)
setTimer(getTimer() - diff);
}
-void BattlegroundRV::StartingEventCloseDoors()
-{
-}
+void BattlegroundRV::StartingEventCloseDoors() { }
void BattlegroundRV::StartingEventOpenDoors()
{
@@ -121,7 +119,7 @@ void BattlegroundRV::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundRV: Killer player not found");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundRV: Killer player not found");
return;
}
@@ -198,7 +196,7 @@ bool BattlegroundRV::SetupBattleground()
)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundRV: Failed to spawn some object!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundRV: Failed to spawn some object!");
return false;
}
return true;
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index 03c4b84b817..62c42ff3091 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -44,9 +44,7 @@ BattlegroundSA::BattlegroundSA()
memset(&GraveyardStatus, 0, sizeof(GraveyardStatus));
}
-BattlegroundSA::~BattlegroundSA()
-{
-}
+BattlegroundSA::~BattlegroundSA() { }
void BattlegroundSA::Reset()
{
@@ -165,7 +163,7 @@ bool BattlegroundSA::ResetObjs()
if (!sg)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
+ TC_LOG_ERROR("bg.battleground", "SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
return false;
}
@@ -178,7 +176,7 @@ bool BattlegroundSA::ResetObjs()
{
GraveyardStatus[i] = ((Attackers == TEAM_HORDE)? TEAM_ALLIANCE : TEAM_HORDE);
if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((Attackers == TEAM_HORDE)? ALLIANCE : HORDE)))
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "SOTA: couldn't spawn GY: %u", i);
+ TC_LOG_ERROR("bg.battleground", "SOTA: couldn't spawn GY: %u", i);
}
}
@@ -392,13 +390,9 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff)
}
}
-void BattlegroundSA::StartingEventCloseDoors()
-{
-}
+void BattlegroundSA::StartingEventCloseDoors() { }
-void BattlegroundSA::StartingEventOpenDoors()
-{
-}
+void BattlegroundSA::StartingEventOpenDoors() { }
void BattlegroundSA::FillInitialWorldStates(WorldPacket& data)
{
@@ -472,9 +466,7 @@ void BattlegroundSA::AddPlayer(Player* player)
PlayerScores[player->GetGUID()] = sc;
}
-void BattlegroundSA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/)
-{
-}
+void BattlegroundSA::RemovePlayer(Player* /*player*/, uint64 /*guid*/, uint32 /*team*/) { }
void BattlegroundSA::HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/)
{
@@ -734,7 +726,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
if (!sg)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
+ TC_LOG_ERROR("bg.battleground", "BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
return;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 5e0cade9b37..d035f5a6ca2 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -56,9 +56,7 @@ BattlegroundWS::BattlegroundWS()
_flagDebuffState = 0;
}
-BattlegroundWS::~BattlegroundWS()
-{
-}
+BattlegroundWS::~BattlegroundWS() { }
void BattlegroundWS::PostUpdateImpl(uint32 diff)
{
@@ -226,12 +224,12 @@ void BattlegroundWS::RespawnFlag(uint32 Team, bool captured)
{
if (Team == ALLIANCE)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Respawn Alliance flag");
+ TC_LOG_DEBUG("bg.battleground", "Respawn Alliance flag");
_flagState[TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Respawn Horde flag");
+ TC_LOG_DEBUG("bg.battleground", "Respawn Horde flag");
_flagState[TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
}
@@ -268,7 +266,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
if (GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team)))
obj->Delete();
else
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team)));
+ TC_LOG_ERROR("bg.battleground", "unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team)));
SetDroppedFlagGUID(0, GetTeamIndexByTeamId(team));
_bothFlagsKept = false;
@@ -580,7 +578,7 @@ void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
{
if (!player)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundWS: Removing offline player who has the FLAG!!");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundWS: Removing offline player who has the FLAG!!");
SetAllianceFlagPicker(0);
RespawnFlag(ALLIANCE, false);
}
@@ -591,7 +589,7 @@ void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
{
if (!player)
{
- TC_LOG_ERROR(LOG_FILTER_BATTLEGROUND, "BattlegroundWS: Removing offline player who has the FLAG!!");
+ TC_LOG_ERROR("bg.battleground", "BattlegroundWS: Removing offline player who has the FLAG!!");
SetHordeFlagPicker(0);
RespawnFlag(HORDE, false);
}
@@ -693,25 +691,25 @@ bool BattlegroundWS::SetupBattleground()
|| !AddObject(BG_WS_OBJECT_DOOR_H_4, BG_OBJECT_DOOR_H_4_WS_ENTRY, 950.7952f, 1459.583f, 342.1523f, 0.05235988f, 0, 0, 0.02617695f, 0.9996573f, RESPAWN_IMMEDIATELY)
)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn some object Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundWS: Failed to spawn some object Battleground not created!");
return false;
}
WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);
if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
return false;
}
sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_HORDE);
if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!");
+ TC_LOG_ERROR("sql.sql", "BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!");
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BatteGroundWS: BG objects and spirit guides spawned");
+ TC_LOG_DEBUG("bg.battleground", "BatteGroundWS: BG objects and spirit guides spawned");
return true;
}
diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp
index d2a166c492c..bd3a97adb09 100644
--- a/src/server/game/Calendar/CalendarMgr.cpp
+++ b/src/server/game/Calendar/CalendarMgr.cpp
@@ -34,9 +34,7 @@ CalendarEvent::~CalendarEvent()
sCalendarMgr->FreeEventId(_eventId);
}
-CalendarMgr::CalendarMgr()
-{
-}
+CalendarMgr::CalendarMgr() { }
CalendarMgr::~CalendarMgr()
{
@@ -83,7 +81,7 @@ void CalendarMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u calendar events", count);
+ TC_LOG_INFO("server.loading", ">> Loaded %u calendar events", count);
count = 0;
// 0 1 2 3 4 5 6 7
@@ -110,7 +108,7 @@ void CalendarMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u calendar invites", count);
+ TC_LOG_INFO("server.loading", ">> Loaded %u calendar invites", count);
for (uint64 i = 1; i < _maxEventId; ++i)
if (!GetEvent(i))
@@ -284,7 +282,7 @@ CalendarEvent* CalendarMgr::GetEvent(uint64 eventId) const
if ((*itr)->GetEventId() == eventId)
return *itr;
- TC_LOG_DEBUG(LOG_FILTER_CALENDAR, "CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId);
+ TC_LOG_DEBUG("calendar", "CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId);
return NULL;
}
@@ -295,7 +293,7 @@ CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId) const
if ((*itr2)->GetInviteId() == inviteId)
return *itr2;
- TC_LOG_DEBUG(LOG_FILTER_CALENDAR, "CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
+ TC_LOG_DEBUG("calendar", "CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
return NULL;
}
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index 10af9f4fb1a..9e0747c3d11 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -83,7 +83,7 @@ Channel::Channel(std::string const& name, uint32 channelId, uint32 team):
uint64 banned_guid = atol(*i);
if (banned_guid)
{
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "Channel(%s) loaded bannedStore guid:" UI64FMTD "", name.c_str(), banned_guid);
+ TC_LOG_DEBUG("chat.system", "Channel(%s) loaded bannedStore guid:" UI64FMTD "", name.c_str(), banned_guid);
bannedStore.insert(banned_guid);
}
}
@@ -95,7 +95,7 @@ Channel::Channel(std::string const& name, uint32 channelId, uint32 team):
stmt->setString(0, name);
stmt->setUInt32(1, _Team);
CharacterDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "Channel(%s) saved in database", name.c_str());
+ TC_LOG_DEBUG("chat.system", "Channel(%s) saved in database", name.c_str());
}
_IsSaved = true;
@@ -123,7 +123,7 @@ void Channel::UpdateChannelInDB() const
stmt->setUInt32(5, _Team);
CharacterDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "Channel(%s) updated in database", _name.c_str());
+ TC_LOG_DEBUG("chat.system", "Channel(%s) updated in database", _name.c_str());
}
}
@@ -143,7 +143,7 @@ void Channel::CleanOldChannelsInDB()
stmt->setUInt32(0, sWorld->getIntConfig(CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION) * DAY);
CharacterDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "Cleaned out unused custom chat channels.");
+ TC_LOG_DEBUG("chat.system", "Cleaned out unused custom chat channels.");
}
}
@@ -527,7 +527,7 @@ void Channel::List(Player const* player)
return;
}
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "SMSG_CHANNEL_LIST %s Channel: %s",
+ TC_LOG_DEBUG("chat.system", "SMSG_CHANNEL_LIST %s Channel: %s",
player->GetSession()->GetPlayerInfo().c_str(), GetName().c_str());
WorldPacket data(SMSG_CHANNEL_LIST, 1+(GetName().size()+1)+1+4+playersStore.size()*(8+1));
diff --git a/src/server/game/Chat/Channels/ChannelMgr.h b/src/server/game/Chat/Channels/ChannelMgr.h
index f03514461f8..74a0d622e80 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.h
+++ b/src/server/game/Chat/Channels/ChannelMgr.h
@@ -51,7 +51,7 @@ class ChannelMgr
void MakeNotOnPacket(WorldPacket* data, std::string const& name);
};
-class AllianceChannelMgr : public ChannelMgr {};
-class HordeChannelMgr : public ChannelMgr {};
+class AllianceChannelMgr : public ChannelMgr { };
+class HordeChannelMgr : public ChannelMgr { };
#endif
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 6d806336315..99dd23aa649 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -412,12 +412,12 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, char const* text,
// expected subcommand by full name DB content
else if (*text)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str());
+ TC_LOG_ERROR("sql.sql", "Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str());
return false;
}
if (table[i].Permission != permission)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Table `command` overwrite for command '%s' default permission (%u) by %u", fullcommand.c_str(), table[i].Permission, permission);
+ TC_LOG_INFO("misc", "Table `command` overwrite for command '%s' default permission (%u) by %u", fullcommand.c_str(), table[i].Permission, permission);
table[i].Permission = permission;
table[i].Help = help;
@@ -428,9 +428,9 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, char const* text,
if (!cmd.empty())
{
if (table == getCommandTable())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `command` have not existed command '%s', skip.", cmd.c_str());
+ TC_LOG_ERROR("sql.sql", "Table `command` have not existed command '%s', skip.", cmd.c_str());
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `command` have not existed subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str());
+ TC_LOG_ERROR("sql.sql", "Table `command` have not existed subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str());
}
return false;
diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h
index 405bf7384ae..9574d3b38c3 100644
--- a/src/server/game/Chat/Chat.h
+++ b/src/server/game/Chat/Chat.h
@@ -50,8 +50,8 @@ class ChatHandler
{
public:
WorldSession* GetSession() { return m_session; }
- explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) {}
- virtual ~ChatHandler() {}
+ explicit ChatHandler(WorldSession* session) : m_session(session), sentErrorMessage(false) { }
+ virtual ~ChatHandler() { }
static void FillMessageData(WorldPacket* data, WorldSession* session, uint8 type, uint32 language, const char *channelName, uint64 target_guid, const char *message, Unit* speaker);
@@ -129,7 +129,7 @@ class ChatHandler
bool ShowHelpForCommand(ChatCommand* table, const char* cmd);
protected:
- explicit ChatHandler() : m_session(NULL), sentErrorMessage(false) {} // for CLI subclass
+ explicit ChatHandler() : m_session(NULL), sentErrorMessage(false) { } // for CLI subclass
static bool SetDataForCommandInTable(ChatCommand* table, const char* text, uint32 permission, std::string const& help, std::string const& fullcommand);
bool ExecuteCommandInTable(ChatCommand* table, const char* text, std::string const& fullcmd);
bool ShowHelpForSubCommands(ChatCommand* table, char const* cmd, char const* subcmd);
@@ -146,7 +146,7 @@ class CliHandler : public ChatHandler
{
public:
typedef void Print(void*, char const*);
- explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) {}
+ explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) { }
// overwrite functions
const char *GetTrinityString(int32 entry) const;
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp
index 729bbb60bf7..dd602ea07ab 100644
--- a/src/server/game/Chat/ChatLink.cpp
+++ b/src/server/game/Chat/ChatLink.cpp
@@ -76,7 +76,7 @@ inline bool CheckDelimiter(std::istringstream& iss, char delimiter, const char*
char c = iss.peek();
if (c != delimiter)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid %s link structure ('%c' expected, '%c' found)", iss.str().c_str(), context, delimiter, c);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid %s link structure ('%c' expected, '%c' found)", iss.str().c_str(), context, delimiter, c);
return false;
}
iss.ignore(1);
@@ -110,20 +110,20 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
uint32 itemEntry = 0;
if (!ReadUInt32(iss, itemEntry))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item entry", iss.str().c_str());
return false;
}
// Validate item
_item = sObjectMgr->GetItemTemplate(itemEntry);
if (!_item)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid itemEntry %u in |item command", iss.str().c_str(), itemEntry);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid itemEntry %u in |item command", iss.str().c_str(), itemEntry);
return false;
}
// Validate item's color
if (_color != ItemQualityColors[_item->Quality])
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item has color %u, but user claims %u", iss.str().c_str(), ItemQualityColors[_item->Quality], _color);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): linked item has color %u, but user claims %u", iss.str().c_str(), ItemQualityColors[_item->Quality], _color);
return false;
}
// Number of various item properties after item entry
@@ -137,7 +137,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
int32 id = 0;
if (!ReadInt32(iss, id))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item property (%u)", iss.str().c_str(), index);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item property (%u)", iss.str().c_str(), index);
return false;
}
if (id && (index == randomPropertyPosition))
@@ -148,7 +148,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
_property = sItemRandomPropertiesStore.LookupEntry(id);
if (!_property)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), id);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), id);
return false;
}
}
@@ -157,7 +157,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
_suffix = sItemRandomSuffixStore.LookupEntry(-id);
if (!_suffix)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -id);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -id);
return false;
}
}
@@ -199,7 +199,7 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context)
}
}
if (!res)
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item (id: %u) name wasn't found in any localization", context, _item->ItemId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): linked item (id: %u) name wasn't found in any localization", context, _item->ItemId);
return res;
}
@@ -211,14 +211,14 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
uint32 questId = 0;
if (!ReadUInt32(iss, questId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest entry", iss.str().c_str());
return false;
}
// Validate quest
_quest = sObjectMgr->GetQuestTemplate(questId);
if (!_quest)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest template %u not found", iss.str().c_str(), questId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): quest template %u not found", iss.str().c_str(), questId);
return false;
}
// Check delimiter
@@ -227,13 +227,13 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
// Read quest level
if (!ReadInt32(iss, _questLevel))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest level", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest level", iss.str().c_str());
return false;
}
// Validate quest level
if (_questLevel >= STRONG_MAX_LEVEL)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest level %d is too big", iss.str().c_str(), _questLevel);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): quest level %d is too big", iss.str().c_str(), _questLevel);
return false;
}
return true;
@@ -253,7 +253,7 @@ bool QuestChatLink::ValidateName(char* buffer, const char* context)
break;
}
if (!res)
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked quest (id: %u) title wasn't found in any localization", context, _quest->GetQuestId());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): linked quest (id: %u) title wasn't found in any localization", context, _quest->GetQuestId());
return res;
}
@@ -267,14 +267,14 @@ bool SpellChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading spell entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading spell entry", iss.str().c_str());
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |spell command", iss.str().c_str(), spellId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |spell command", iss.str().c_str(), spellId);
return false;
}
return true;
@@ -290,19 +290,19 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(_spell->Id);
if (bounds.first == bounds.second)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for spell %u", context, _spell->Id);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line not found for spell %u", context, _spell->Id);
return false;
}
SkillLineAbilityEntry const* skillInfo = bounds.first->second;
if (!skillInfo)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id);
return false;
}
SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skillInfo->skillId);
if (!skillLine)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId);
return false;
}
@@ -323,7 +323,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
if (*_spell->SpellName[i] && strcmp(_spell->SpellName[i], buffer) == 0)
return true;
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
return false;
}
@@ -337,14 +337,14 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
uint32 achievementId = 0;
if (!ReadUInt32(iss, achievementId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
return false;
}
// Validate achievement
_achievement = sAchievementMgr->GetAchievement(achievementId);
if (!_achievement)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
return false;
}
// Check delimiter
@@ -353,7 +353,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
// Read HEX
if (!ReadHex(iss, _guid, 0))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading char's guid", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading char's guid", iss.str().c_str());
return false;
}
// Skip progress
@@ -365,7 +365,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
if (!ReadUInt32(iss, _data[index]))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement property (%u)", iss.str().c_str(), index);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement property (%u)", iss.str().c_str(), index);
return false;
}
}
@@ -380,7 +380,7 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
if (*_achievement->name[i] && strcmp(_achievement->name[i], buffer) == 0)
return true;
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
return false;
}
@@ -394,14 +394,14 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), spellId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), spellId);
return false;
}
// Check delimiter
@@ -410,7 +410,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Minimum talent level
if (!ReadInt32(iss, _minSkillLevel))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading minimum talent level", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading minimum talent level", iss.str().c_str());
return false;
}
// Check delimiter
@@ -419,7 +419,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Maximum talent level
if (!ReadInt32(iss, _maxSkillLevel))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading maximum talent level", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading maximum talent level", iss.str().c_str());
return false;
}
// Check delimiter
@@ -428,7 +428,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Something hexadecimal
if (!ReadHex(iss, _guid, 0))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement's owner guid", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement's owner guid", iss.str().c_str());
return false;
}
// Skip base64 encoded stuff
@@ -445,21 +445,21 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
// Read talent entry
if (!ReadUInt32(iss, _talentId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent entry", iss.str().c_str());
return false;
}
// Validate talent
TalentEntry const* talentInfo = sTalentStore.LookupEntry(_talentId);
if (!talentInfo)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid talent id %u in |talent command", iss.str().c_str(), _talentId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid talent id %u in |talent command", iss.str().c_str(), _talentId);
return false;
}
// Validate talent's spell
_spell = sSpellMgr->GetSpellInfo(talentInfo->RankID[0]);
if (!_spell)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]);
return false;
}
// Delimiter
@@ -468,7 +468,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
// Rank
if (!ReadInt32(iss, _rankId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent rank", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent rank", iss.str().c_str());
return false;
}
return true;
@@ -484,14 +484,14 @@ bool EnchantmentChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading enchantment spell entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading enchantment spell entry", iss.str().c_str());
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
return false;
}
return true;
@@ -506,7 +506,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
// Slot
if (!ReadUInt32(iss, _slotId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading slot id", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading slot id", iss.str().c_str());
return false;
}
// Check delimiter
@@ -516,29 +516,27 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
uint32 glyphId = 0;
if (!ReadUInt32(iss, glyphId))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading glyph entry", iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading glyph entry", iss.str().c_str());
return false;
}
// Validate glyph
_glyph = sGlyphPropertiesStore.LookupEntry(glyphId);
if (!_glyph)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid glyph id %u in |glyph command", iss.str().c_str(), glyphId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid glyph id %u in |glyph command", iss.str().c_str(), glyphId);
return false;
}
// Validate glyph's spell
_spell = sSpellMgr->GetSpellInfo(_glyph->SpellId);
if (!_spell)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
return false;
}
return true;
}
-LinkExtractor::LinkExtractor(const char* msg) : _iss(msg)
-{
-}
+LinkExtractor::LinkExtractor(const char* msg) : _iss(msg) { }
LinkExtractor::~LinkExtractor()
{
@@ -568,14 +566,14 @@ bool LinkExtractor::IsValidMessage()
}
else if (_iss.get() != PIPE_CHAR)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence aborted unexpectedly", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence aborted unexpectedly", _iss.str().c_str());
return false;
}
// pipe has always to be followed by at least one char
if (_iss.peek() == '\0')
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): pipe followed by '\\0'", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): pipe followed by '\\0'", _iss.str().c_str());
return false;
}
@@ -598,14 +596,14 @@ bool LinkExtractor::IsValidMessage()
}
else
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid sequence, expected '%c' but got '%c'", _iss.str().c_str(), *validSequenceIterator, commandChar);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid sequence, expected '%c' but got '%c'", _iss.str().c_str(), *validSequenceIterator, commandChar);
return false;
}
}
else if (validSequence != validSequenceIterator)
{
// no escaped pipes in sequences
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got escaped pipe in sequence", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got escaped pipe in sequence", _iss.str().c_str());
return false;
}
@@ -614,7 +612,7 @@ bool LinkExtractor::IsValidMessage()
case 'c':
if (!ReadHex(_iss, color, 8))
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading color", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading color", _iss.str().c_str());
return false;
}
break;
@@ -623,7 +621,7 @@ bool LinkExtractor::IsValidMessage()
_iss.getline(buffer, 256, DELIMITER);
if (_iss.eof())
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
return false;
}
@@ -645,7 +643,7 @@ bool LinkExtractor::IsValidMessage()
link = new GlyphChatLink();
else
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): user sent unsupported link type '%s'", _iss.str().c_str(), buffer);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): user sent unsupported link type '%s'", _iss.str().c_str(), buffer);
return false;
}
_links.push_back(link);
@@ -660,13 +658,13 @@ bool LinkExtractor::IsValidMessage()
// links start with '['
if (_iss.get() != '[')
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): link caption doesn't start with '['", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): link caption doesn't start with '['", _iss.str().c_str());
return false;
}
_iss.getline(buffer, 256, ']');
if (_iss.eof())
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
return false;
}
@@ -684,7 +682,7 @@ bool LinkExtractor::IsValidMessage()
// no further payload
break;
default:
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid command |%c", _iss.str().c_str(), commandChar);
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid command |%c", _iss.str().c_str(), commandChar);
return false;
}
}
@@ -692,7 +690,7 @@ bool LinkExtractor::IsValidMessage()
// check if every opened sequence was also closed properly
if (validSequence != validSequenceIterator)
{
- TC_LOG_TRACE(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): EOF in active sequence", _iss.str().c_str());
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): EOF in active sequence", _iss.str().c_str());
return false;
}
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp
index b24979d9131..ed23a72bee1 100644
--- a/src/server/game/Combat/ThreatManager.cpp
+++ b/src/server/game/Combat/ThreatManager.cpp
@@ -390,9 +390,7 @@ HostileReference* ThreatContainer::selectNextVictim(Creature* attacker, HostileR
//=================== ThreatManager ==========================
//============================================================
-ThreatManager::ThreatManager(Unit* owner) : iCurrentVictim(NULL), iOwner(owner), iUpdateTimer(THREAT_UPDATE_INTERVAL)
-{
-}
+ThreatManager::ThreatManager(Unit* owner) : iCurrentVictim(NULL), iOwner(owner), iUpdateTimer(THREAT_UPDATE_INTERVAL) { }
//============================================================
diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h
index 9b249bd4bee..2d13d8b61e2 100644
--- a/src/server/game/Combat/ThreatManager.h
+++ b/src/server/game/Combat/ThreatManager.h
@@ -281,7 +281,7 @@ namespace Trinity
class ThreatOrderPred
{
public:
- ThreatOrderPred(bool ascending = false) : m_ascending(ascending) {}
+ ThreatOrderPred(bool ascending = false) : m_ascending(ascending) { }
bool operator() (HostileReference const* a, HostileReference const* b) const
{
return m_ascending ? a->getThreat() < b->getThreat() : a->getThreat() > b->getThreat();
diff --git a/src/server/game/Combat/UnitEvents.h b/src/server/game/Combat/UnitEvents.h
index 21cd2d80964..0e568d139a8 100644
--- a/src/server/game/Combat/UnitEvents.h
+++ b/src/server/game/Combat/UnitEvents.h
@@ -123,8 +123,8 @@ class ThreatManagerEvent : public ThreatRefStatusChangeEvent
private:
ThreatContainer* iThreatContainer;
public:
- ThreatManagerEvent(uint32 pType) : ThreatRefStatusChangeEvent(pType), iThreatContainer(NULL) {}
- ThreatManagerEvent(uint32 pType, HostileReference* pHostileReference) : ThreatRefStatusChangeEvent(pType, pHostileReference), iThreatContainer(NULL) {}
+ ThreatManagerEvent(uint32 pType) : ThreatRefStatusChangeEvent(pType), iThreatContainer(NULL) { }
+ ThreatManagerEvent(uint32 pType, HostileReference* pHostileReference) : ThreatRefStatusChangeEvent(pType, pHostileReference), iThreatContainer(NULL) { }
void setThreatContainer(ThreatContainer* pThreatContainer) { iThreatContainer = pThreatContainer; }
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 933d77cc2e8..2160fbdd173 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -38,7 +38,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
// object not present, return false
if (!object)
{
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "Condition object not found for condition (Entry: %u Type: %u Group: %u)", SourceEntry, SourceType, SourceGroup);
+ TC_LOG_DEBUG("condition", "Condition object not found for condition (Entry: %u Type: %u Group: %u)", SourceEntry, SourceType, SourceGroup);
return false;
}
bool condMeets = false;
@@ -515,9 +515,7 @@ uint32 Condition::GetMaxAvailableConditionTargets()
}
}
-ConditionMgr::ConditionMgr()
-{
-}
+ConditionMgr::ConditionMgr() { }
ConditionMgr::~ConditionMgr()
{
@@ -579,7 +577,7 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo,
std::map<uint32, bool> ElseGroupStore;
for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i)
{
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->ConditionType, (*i)->ConditionValue1);
+ TC_LOG_DEBUG("condition", "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->ConditionType, (*i)->ConditionValue1);
if ((*i)->isLoaded())
{
//! Find ElseGroup in ElseGroupStore
@@ -600,7 +598,7 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo,
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "IsPlayerMeetToConditionList: Reference template -%u not found",
+ TC_LOG_DEBUG("condition", "IsPlayerMeetToConditionList: Reference template -%u not found",
(*i)->ReferenceId);//checked at loading, should never happen
}
@@ -636,7 +634,7 @@ bool ConditionMgr::IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, Con
if (conditions.empty())
return true;
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsObjectMeetToConditions");
+ TC_LOG_DEBUG("condition", "ConditionMgr::IsObjectMeetToConditions");
return IsObjectMeetToConditionList(sourceInfo, conditions);
}
@@ -680,7 +678,7 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType
if (i != (*itr).second.end())
{
spellCond = (*i).second;
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "GetConditionsForNotGroupedEntry: found conditions for type %u and entry %u", uint32(sourceType), entry);
+ TC_LOG_DEBUG("condition", "GetConditionsForNotGroupedEntry: found conditions for type %u and entry %u", uint32(sourceType), entry);
}
}
}
@@ -697,7 +695,7 @@ ConditionList ConditionMgr::GetConditionsForSpellClickEvent(uint32 creatureId, u
if (i != (*itr).second.end())
{
cond = (*i).second;
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "GetConditionsForSpellClickEvent: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
+ TC_LOG_DEBUG("condition", "GetConditionsForSpellClickEvent: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
}
}
return cond;
@@ -713,7 +711,7 @@ ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureId, uint
if (i != (*itr).second.end())
{
cond = (*i).second;
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "GetConditionsForVehicleSpell: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
+ TC_LOG_DEBUG("condition", "GetConditionsForVehicleSpell: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
}
}
return cond;
@@ -729,7 +727,7 @@ ConditionList ConditionMgr::GetConditionsForSmartEvent(int32 entryOrGuid, uint32
if (i != (*itr).second.end())
{
cond = (*i).second;
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d event_id %u", entryOrGuid, eventId);
+ TC_LOG_DEBUG("condition", "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d event_id %u", entryOrGuid, eventId);
}
}
return cond;
@@ -745,7 +743,7 @@ ConditionList ConditionMgr::GetConditionsForNpcVendorEvent(uint32 creatureId, ui
if (i != (*itr).second.end())
{
cond = (*i).second;
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "GetConditionsForNpcVendorEvent: found conditions for creature entry %u item %u", creatureId, itemId);
+ TC_LOG_DEBUG("condition", "GetConditionsForNpcVendorEvent: found conditions for creature entry %u item %u", creatureId, itemId);
}
}
return cond;
@@ -760,7 +758,7 @@ void ConditionMgr::LoadConditions(bool isReload)
//must clear all custom handled cases (groupped types) before reload
if (isReload)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Reseting Loot Conditions...");
+ TC_LOG_INFO("misc", "Reseting Loot Conditions...");
LootTemplates_Creature.ResetConditions();
LootTemplates_Fishing.ResetConditions();
LootTemplates_Gameobject.ResetConditions();
@@ -774,10 +772,10 @@ void ConditionMgr::LoadConditions(bool isReload)
LootTemplates_Prospecting.ResetConditions();
LootTemplates_Spell.ResetConditions();
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu` Table for Conditions!");
+ TC_LOG_INFO("misc", "Re-Loading `gossip_menu` Table for Conditions!");
sObjectMgr->LoadGossipMenu();
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu_option` Table for Conditions!");
+ TC_LOG_INFO("misc", "Re-Loading `gossip_menu_option` Table for Conditions!");
sObjectMgr->LoadGossipMenuItems();
sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
}
@@ -787,7 +785,7 @@ void ConditionMgr::LoadConditions(bool isReload)
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 conditions. DB table `conditions` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 conditions. DB table `conditions` is empty!");
return;
}
@@ -823,7 +821,7 @@ void ConditionMgr::LoadConditions(bool isReload)
{
if (iConditionTypeOrReference == iSourceTypeOrReferenceId)//self referencing, skip
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition reference %i is referencing self, skipped", iSourceTypeOrReferenceId);
+ TC_LOG_ERROR("sql.sql", "Condition reference %i is referencing self, skipped", iSourceTypeOrReferenceId);
delete cond;
continue;
}
@@ -834,19 +832,19 @@ void ConditionMgr::LoadConditions(bool isReload)
rowType = "reference";
//check for useless data
if (cond->ConditionTarget)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget);
+ TC_LOG_ERROR("sql.sql", "Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget);
if (cond->ConditionValue1)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1);
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3);
if (cond->NegativeCondition)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition);
+ TC_LOG_ERROR("sql.sql", "Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition);
if (cond->SourceGroup && iSourceTypeOrReferenceId < 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup);
if (cond->SourceEntry && iSourceTypeOrReferenceId < 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry);
}
else if (!isConditionTypeValid(cond))//doesn't have reference, validate ConditionType
{
@@ -877,26 +875,26 @@ void ConditionMgr::LoadConditions(bool isReload)
//Grouping is only allowed for some types (loot templates, gossip menus, gossip items)
if (cond->SourceGroup && !CanHaveSourceGroupSet(cond->SourceType))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup);
delete cond;
continue;
}
if (cond->SourceId && !CanHaveSourceIdSet(cond->SourceType))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId);
+ TC_LOG_ERROR("sql.sql", "Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId);
delete cond;
continue;
}
if (cond->ErrorType && cond->SourceType != CONDITION_SOURCE_TYPE_SPELL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition type %u entry %i can't have ErrorType (%u), set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorType);
+ TC_LOG_ERROR("sql.sql", "Condition type %u entry %i can't have ErrorType (%u), set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorType);
cond->ErrorType = 0;
}
if (cond->ErrorTextId && !cond->ErrorType)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition type %u entry %i has any ErrorType, ErrorTextId (%u) is set, set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorTextId);
+ TC_LOG_ERROR("sql.sql", "Condition type %u entry %i has any ErrorType, ErrorTextId (%u) is set, set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorTextId);
cond->ErrorTextId = 0;
}
@@ -987,7 +985,7 @@ void ConditionMgr::LoadConditions(bool isReload)
if (!valid)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Not handled grouped condition, SourceGroup %u", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "Not handled grouped condition, SourceGroup %u", cond->SourceGroup);
delete cond;
}
else
@@ -1019,7 +1017,7 @@ void ConditionMgr::LoadConditions(bool isReload)
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
@@ -1027,14 +1025,14 @@ bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot)
{
if (!loot)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ConditionMgr: LootTemplate %u not found", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "ConditionMgr: LootTemplate %u not found", cond->SourceGroup);
return false;
}
if (loot->addConditionItem(cond))
return true;
- TC_LOG_ERROR(LOG_FILTER_SQL, "ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup);
return false;
}
@@ -1054,7 +1052,7 @@ bool ConditionMgr::addToGossipMenus(Condition* cond)
}
}
- TC_LOG_ERROR(LOG_FILTER_SQL, "addToGossipMenus: GossipMenu %u not found", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "addToGossipMenus: GossipMenu %u not found", cond->SourceGroup);
return false;
}
@@ -1073,7 +1071,7 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond)
}
}
- TC_LOG_ERROR(LOG_FILTER_SQL, "addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry);
return false;
}
@@ -1131,7 +1129,7 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
// we have overlapping masks in db
if (conditionEffMask != *itr)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - "
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - "
"effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->SourceEntry, cond->SourceGroup);
return false;
}
@@ -1165,7 +1163,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (cond->SourceType == CONDITION_SOURCE_TYPE_NONE || cond->SourceType >= CONDITION_SOURCE_TYPE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType));
+ TC_LOG_ERROR("sql.sql", "Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType));
return false;
}
@@ -1175,7 +1173,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Creature.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1183,7 +1181,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1192,7 +1190,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Disenchant.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1200,7 +1198,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1209,7 +1207,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Fishing.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1217,7 +1215,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1226,7 +1224,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Gameobject.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1234,7 +1232,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1243,7 +1241,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Item.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1251,7 +1249,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1260,7 +1258,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Mail.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1268,7 +1266,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1277,7 +1275,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Milling.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1285,7 +1283,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1294,7 +1292,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Pickpocketing.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1302,7 +1300,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1311,7 +1309,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Prospecting.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1319,7 +1317,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1328,7 +1326,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Reference.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1336,7 +1334,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1345,7 +1343,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Skinning.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1353,7 +1351,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1362,7 +1360,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!LootTemplates_Spell.HaveLootFor(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup);
return false;
}
@@ -1370,7 +1368,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!pItemProto && !loot->isReference(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
return false;
}
break;
@@ -1380,13 +1378,13 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cond->SourceEntry);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
if ((cond->SourceGroup > MAX_EFFECT_MASK) || !cond->SourceGroup)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set, ignoring.", cond->SourceEntry, cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set, ignoring.", cond->SourceEntry, cond->SourceGroup);
return false;
}
@@ -1417,7 +1415,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
break;
}
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i));
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i));
cond->SourceGroup &= ~(1<<i);
}
// all effects were removed, no need to add the condition at all
@@ -1429,7 +1427,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!sObjectMgr->GetCreatureTemplate(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry);
return false;
}
break;
@@ -1440,7 +1438,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry);
if (!spellProto)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
@@ -1448,40 +1446,40 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
case CONDITION_SOURCE_TYPE_QUEST_ACCEPT:
if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry);
return false;
}
break;
case CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK:
if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry);
return false;
}
break;
case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
return false;
}
if (!sSpellMgr->GetSpellInfo(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT:
if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
return false;
}
if (!sSpellMgr->GetSpellInfo(cond->SourceEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
return false;
}
break;
@@ -1489,20 +1487,20 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
return false;
}
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(cond->SourceEntry);
if (!itemTemplate)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry);
return false;
}
break;
}
case CONDITION_SOURCE_TYPE_PHASE_DEFINITION:
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_PHASE_DEFINITION:: is only for 4.3.4 branch, skipped");
+ TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_PHASE_DEFINITION:: is only for 4.3.4 branch, skipped");
return false;
}
case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
@@ -1520,13 +1518,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry);
+ TC_LOG_ERROR("sql.sql", "Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry);
return false;
}
if (cond->ConditionTarget >= cond->GetMaxAvailableConditionTargets())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u, SourceGroup %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry, cond->SourceGroup);
+ TC_LOG_ERROR("sql.sql", "SourceType %u, SourceEntry %u, SourceGroup %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry, cond->SourceGroup);
return false;
}
@@ -1536,17 +1534,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2 > EFFECT_2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Aura condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Aura condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ITEM:
@@ -1554,13 +1552,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
if (!proto)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item condition has non existing item (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Item condition has non existing item (%u), skipped", cond->ConditionValue1);
return false;
}
if (!cond->ConditionValue2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2);
return false;
}
break;
@@ -1570,14 +1568,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
if (!proto)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ZONEID:
@@ -1585,20 +1583,20 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1);
if (!areaEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1);
return false;
}
if (areaEntry->zone != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_REPUTATION_RANK:
@@ -1606,25 +1604,25 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->ConditionValue1);
if (!factionEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TEAM:
{
if (cond->ConditionValue1 != ALLIANCE && cond->ConditionValue1 != HORDE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Team condition specifies unknown team (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Team condition specifies unknown team (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Team condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Team condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Team condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Team condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_SKILL:
@@ -1632,17 +1630,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->ConditionValue1);
if (!pSkill)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2 < 1 || cond->ConditionValue2 > sWorld->GetConfigMaxSkillValue())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Skill condition specifies skill (%u) with invalid value (%u), skipped", cond->ConditionValue1, cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Skill condition specifies skill (%u) with invalid value (%u), skipped", cond->ConditionValue1, cond->ConditionValue2);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Skill condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Skill condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_QUESTREWARDED:
@@ -1652,15 +1650,15 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (!sObjectMgr->GetQuestTemplate(cond->ConditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest condition (Type: %u) points to non-existing quest (%u) for Source Entry %u. SourceGroup: %u, SourceTypeOrReferenceId: %u",
+ TC_LOG_ERROR("sql.sql", "Quest condition (Type: %u) points to non-existing quest (%u) for Source Entry %u. SourceGroup: %u, SourceTypeOrReferenceId: %u",
cond->ConditionType, cond->ConditionValue1, cond->SourceEntry, cond->SourceGroup, cond->SourceType);
return false;
}
if (cond->ConditionValue2 > 1)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Quest condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Quest condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ACTIVE_EVENT:
@@ -1668,14 +1666,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (cond->ConditionValue1 >=events.size() || !events[cond->ConditionValue1].isValid())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_ACHIEVEMENT:
@@ -1683,56 +1681,56 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
AchievementEntry const* achievement = sAchievementMgr->GetAchievement(cond->ConditionValue1);
if (!achievement)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_CLASS:
{
if (!(cond->ConditionValue1 & CLASSMASK_ALL_PLAYABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
+ TC_LOG_ERROR("sql.sql", "Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Class condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Class condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Class condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Class condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_RACE:
{
if (!(cond->ConditionValue1 & RACEMASK_ALL_PLAYABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
+ TC_LOG_ERROR("sql.sql", "Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Race condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Race condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Race condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Race condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_GENDER:
{
if (!Player::IsValidGender(uint8(cond->ConditionValue1)))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gender condition has invalid gender (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Gender condition has invalid gender (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gender condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Gender condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gender condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Gender condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_MAPID:
@@ -1740,77 +1738,77 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1);
if (!me)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Map condition has non existing map (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Map condition has non existing map (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Map condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Map condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Map condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Map condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_SPELL:
{
if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Spell condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Spell condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_LEVEL:
{
if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Level condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Level condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Level condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Level condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_DRUNKENSTATE:
{
if (cond->ConditionValue1 > DRUNKEN_SMASHED)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_NEAR_CREATURE:
{
if (!sObjectMgr->GetCreatureTemplate(cond->ConditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_NEAR_GAMEOBJECT:
{
if (!sObjectMgr->GetGameObjectTemplate(cond->ConditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_OBJECT_ENTRY:
@@ -1820,79 +1818,79 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
case TYPEID_UNIT:
if (cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2);
return false;
}
break;
case TYPEID_GAMEOBJECT:
if (cond->ConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->ConditionValue2))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2);
return false;
}
break;
case TYPEID_PLAYER:
case TYPEID_CORPSE:
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2);
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TYPE_MASK:
{
if (!cond->ConditionValue1 || (cond->ConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE)))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2);
return false;
}
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_RELATION_TO:
{
if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue1 == cond->ConditionTarget)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2 >= RELATION_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_REACTION_TO:
{
if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue1 == cond->ConditionTarget)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
return false;
}
if (!cond->ConditionValue2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2);
return false;
}
break;
@@ -1901,17 +1899,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue1 == cond->ConditionTarget)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue3 >= COMP_TYPE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3);
return false;
}
break;
@@ -1919,38 +1917,38 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
case CONDITION_ALIVE:
{
if (cond->ConditionValue1)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Alive condition has useless data in value1 (%u)!", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Alive condition has useless data in value1 (%u)!", cond->ConditionValue1);
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Alive condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Alive condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Alive condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Alive condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_HP_VAL:
{
if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_HP_PCT:
{
if (cond->ConditionValue1 > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2 >= COMP_TYPE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_AREAID:
@@ -1960,19 +1958,19 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (!sWorld->getWorldState(cond->ConditionValue1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "World state condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "World state condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_PHASEMASK:
{
if (cond->ConditionValue2)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ TC_LOG_ERROR("sql.sql", "Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ TC_LOG_ERROR("sql.sql", "Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_TITLE:
@@ -1980,7 +1978,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(cond->ConditionValue1);
if (!titleEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
break;
@@ -1989,7 +1987,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (cond->ConditionValue1 > SPAWNMASK_RAID_ALL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SpawnMask condition has non existing SpawnMask in value1 (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "SpawnMask condition has non existing SpawnMask in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
break;
@@ -1998,7 +1996,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (cond->ConditionValue1 > uint32(UNIT_STATE_ALL_STATE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "UnitState condition has non existing UnitState in value1 (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "UnitState condition has non existing UnitState in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
break;
@@ -2007,7 +2005,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (!cond->ConditionValue1 || cond->ConditionValue1 > CREATURE_TYPE_GAS_CLOUD)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureType condition has non existing CreatureType in value1 (%u), skipped", cond->ConditionValue1);
+ TC_LOG_ERROR("sql.sql", "CreatureType condition has non existing CreatureType in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
break;
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index 529ca8dc9ec..c32d4e4120e 100644
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -61,7 +61,7 @@ void LoadDisables()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 disables. DB table `disables` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 disables. DB table `disables` is empty!");
return;
}
@@ -72,7 +72,7 @@ void LoadDisables()
DisableType type = DisableType(fields[0].GetUInt32());
if (type >= MAX_DISABLE_TYPES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Invalid type %u specified in `disables` table, skipped.", type);
+ TC_LOG_ERROR("sql.sql", "Invalid type %u specified in `disables` table, skipped.", type);
continue;
}
@@ -89,13 +89,13 @@ void LoadDisables()
case DISABLE_TYPE_SPELL:
if (!(sSpellMgr->GetSpellInfo(entry) || flags & SPELL_DISABLE_DEPRECATED_SPELL))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell entry %u from `disables` doesn't exist in dbc, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Spell entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;
}
if (!flags || flags > MAX_SPELL_DISABLE_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Disable flags for spell %u are invalid, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Disable flags for spell %u are invalid, skipped.", entry);
continue;
}
@@ -122,7 +122,7 @@ void LoadDisables()
MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
if (!mapEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;
}
bool isFlagInvalid = false;
@@ -145,12 +145,12 @@ void LoadDisables()
break;
case MAP_BATTLEGROUND:
case MAP_ARENA:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Battleground map %u specified to be disabled in map case, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Battleground map %u specified to be disabled in map case, skipped.", entry);
continue;
}
if (isFlagInvalid)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Disable flags for map %u are invalid, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Disable flags for map %u are invalid, skipped.", entry);
continue;
}
break;
@@ -158,64 +158,64 @@ void LoadDisables()
case DISABLE_TYPE_BATTLEGROUND:
if (!sBattlemasterListStore.LookupEntry(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Battleground entry %u from `disables` doesn't exist in dbc, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Battleground entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;
}
if (flags)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Disable flags specified for battleground %u, useless data.", entry);
+ TC_LOG_ERROR("sql.sql", "Disable flags specified for battleground %u, useless data.", entry);
break;
case DISABLE_TYPE_OUTDOORPVP:
if (entry > MAX_OUTDOORPVP_TYPES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "OutdoorPvPTypes value %u from `disables` is invalid, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "OutdoorPvPTypes value %u from `disables` is invalid, skipped.", entry);
continue;
}
if (flags)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Disable flags specified for outdoor PvP %u, useless data.", entry);
+ TC_LOG_ERROR("sql.sql", "Disable flags specified for outdoor PvP %u, useless data.", entry);
break;
case DISABLE_TYPE_ACHIEVEMENT_CRITERIA:
if (!sAchievementMgr->GetAchievementCriteria(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;
}
if (flags)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Disable flags specified for Achievement Criteria %u, useless data.", entry);
+ TC_LOG_ERROR("sql.sql", "Disable flags specified for Achievement Criteria %u, useless data.", entry);
break;
case DISABLE_TYPE_VMAP:
{
MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
if (!mapEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;
}
switch (mapEntry->map_type)
{
case MAP_COMMON:
if (flags & VMAP_DISABLE_AREAFLAG)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Areaflag disabled for world map %u.", entry);
+ TC_LOG_INFO("misc", "Areaflag disabled for world map %u.", entry);
if (flags & VMAP_DISABLE_LIQUIDSTATUS)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Liquid status disabled for world map %u.", entry);
+ TC_LOG_INFO("misc", "Liquid status disabled for world map %u.", entry);
break;
case MAP_INSTANCE:
case MAP_RAID:
if (flags & VMAP_DISABLE_HEIGHT)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Height disabled for instance map %u.", entry);
+ TC_LOG_INFO("misc", "Height disabled for instance map %u.", entry);
if (flags & VMAP_DISABLE_LOS)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "LoS disabled for instance map %u.", entry);
+ TC_LOG_INFO("misc", "LoS disabled for instance map %u.", entry);
break;
case MAP_BATTLEGROUND:
if (flags & VMAP_DISABLE_HEIGHT)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Height disabled for battleground map %u.", entry);
+ TC_LOG_INFO("misc", "Height disabled for battleground map %u.", entry);
if (flags & VMAP_DISABLE_LOS)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "LoS disabled for battleground map %u.", entry);
+ TC_LOG_INFO("misc", "LoS disabled for battleground map %u.", entry);
break;
case MAP_ARENA:
if (flags & VMAP_DISABLE_HEIGHT)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Height disabled for arena map %u.", entry);
+ TC_LOG_INFO("misc", "Height disabled for arena map %u.", entry);
if (flags & VMAP_DISABLE_LOS)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "LoS disabled for arena map %u.", entry);
+ TC_LOG_INFO("misc", "LoS disabled for arena map %u.", entry);
break;
default:
break;
@@ -227,23 +227,23 @@ void LoadDisables()
MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
if (!mapEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
continue;
}
switch (mapEntry->map_type)
{
case MAP_COMMON:
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Pathfinding disabled for world map %u.", entry);
+ TC_LOG_INFO("misc", "Pathfinding disabled for world map %u.", entry);
break;
case MAP_INSTANCE:
case MAP_RAID:
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Pathfinding disabled for instance map %u.", entry);
+ TC_LOG_INFO("misc", "Pathfinding disabled for instance map %u.", entry);
break;
case MAP_BATTLEGROUND:
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Pathfinding disabled for battleground map %u.", entry);
+ TC_LOG_INFO("misc", "Pathfinding disabled for battleground map %u.", entry);
break;
case MAP_ARENA:
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Pathfinding disabled for arena map %u.", entry);
+ TC_LOG_INFO("misc", "Pathfinding disabled for arena map %u.", entry);
break;
default:
break;
@@ -259,7 +259,7 @@ void LoadDisables()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime));
}
void CheckQuestDisables()
@@ -269,7 +269,7 @@ void CheckQuestDisables()
uint32 count = m_DisableMap[DISABLE_TYPE_QUEST].size();
if (!count)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Checked 0 quest disables.");
+ TC_LOG_INFO("server.loading", ">> Checked 0 quest disables.");
return;
}
@@ -279,16 +279,16 @@ void CheckQuestDisables()
const uint32 entry = itr->first;
if (!sObjectMgr->GetQuestTemplate(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest entry %u from `disables` doesn't exist, skipped.", entry);
+ TC_LOG_ERROR("sql.sql", "Quest entry %u from `disables` doesn't exist, skipped.", entry);
m_DisableMap[DISABLE_TYPE_QUEST].erase(itr++);
continue;
}
if (itr->second.flags)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Disable flags specified for quest %u, useless data.", entry);
+ TC_LOG_ERROR("sql.sql", "Disable flags specified for quest %u, useless data.", entry);
++itr;
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags)
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index a7189ea415a..171d0fe8cc2 100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -344,6 +344,12 @@ enum ItemLimitCategoryMode
ITEM_LIMIT_CATEGORY_MODE_EQUIP = 1 // limit applied to amount equipped items (including used gems)
};
+enum SpellCategoryFlags
+{
+ SPELL_CATEGORY_FLAG_COOLDOWN_SCALES_WITH_WEAPON_SPEED = 0x01, // unused
+ SPELL_CATEGORY_FLAG_COOLDOWN_STARTS_ON_EVENT = 0x04
+};
+
enum TotemCategoryType
{
TOTEM_CATEGORY_TYPE_KNIFE = 1,
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 95592cd87d9..1fc2c3ee9f2 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -154,10 +154,11 @@ DBCStorage <SoundEntriesEntry> sSoundEntriesStore(SoundEntriesfmt);
DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore(SpellItemEnchantmentfmt);
DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt);
DBCStorage <SpellEntry> sSpellStore(SpellEntryfmt);
-SpellCategoryStore sSpellCategoryStore;
+SpellCategoryStore sSpellsByCategoryStore;
PetFamilySpellsStore sPetFamilySpellsStore;
DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore(SpellCastTimefmt);
+DBCStorage <SpellCategoryEntry> sSpellCategoryStore(SpellCategoryfmt);
DBCStorage <SpellDifficultyEntry> sSpellDifficultyStore(SpellDifficultyfmt);
DBCStorage <SpellDurationEntry> sSpellDurationStore(SpellDurationfmt);
DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore(SpellFocusObjectfmt);
@@ -206,7 +207,7 @@ uint32 DBCFileCount = 0;
static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string& filename)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
+ TC_LOG_ERROR("misc", "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
// ASSERT must fail after function call
return false;
@@ -408,7 +409,7 @@ void LoadDBCStores(const std::string& dataPath)
{
SpellEntry const* spell = sSpellStore.LookupEntry(i);
if (spell && spell->Category)
- sSpellCategoryStore[spell->Category].insert(i);
+ sSpellsByCategoryStore[spell->Category].insert(i);
}
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
@@ -442,6 +443,7 @@ void LoadDBCStores(const std::string& dataPath)
}
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCastTimesStore, dbcPath, "SpellCastTimes.dbc");
+ LoadDBC(availableDbcLocales, bad_dbc_files, sSpellCategoryStore, dbcPath, "SpellCategory.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDifficultyStore, dbcPath, "SpellDifficulty.dbc", &CustomSpellDifficultyfmt, &CustomSpellDifficultyIndex);
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellDurationStore, dbcPath, "SpellDuration.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sSpellFocusObjectStore, dbcPath, "SpellFocusObject.dbc");
@@ -470,7 +472,7 @@ void LoadDBCStores(const std::string& dataPath)
if (spellDiff->SpellID[x] <= 0 || !sSpellStore.LookupEntry(spellDiff->SpellID[x]))
{
if (spellDiff->SpellID[x] > 0)//don't show error if spell is <= 0, not all modes have spells and there are unknown negative values
- TC_LOG_ERROR(LOG_FILTER_SQL, "spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x);
+ TC_LOG_ERROR("sql.sql", "spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x);
newEntry.SpellID[x] = 0;//spell was <= 0 or invalid, set to 0
}
else
@@ -641,7 +643,7 @@ void LoadDBCStores(const std::string& dataPath)
// error checks
if (bad_dbc_files.size() >= DBCFileCount)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
+ TC_LOG_ERROR("misc", "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
exit(1);
}
else if (!bad_dbc_files.empty())
@@ -650,7 +652,7 @@ void LoadDBCStores(const std::string& dataPath)
for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
str += *i + "\n";
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
+ TC_LOG_ERROR("misc", "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
exit(1);
}
@@ -663,11 +665,11 @@ void LoadDBCStores(const std::string& dataPath)
!sMapStore.LookupEntry(724) || // last map added in 3.3.5a
!sSpellStore.LookupEntry(80864) ) // last client known item added in 3.3.5a
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "You have _outdated_ DBC files. Please extract correct versions from current using client.");
+ TC_LOG_ERROR("misc", "You have _outdated_ DBC files. Please extract correct versions from current using client.");
exit(1);
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
}
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index cac93a120a5..808ebb78fa5 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -148,12 +148,13 @@ extern DBCStorage <SkillLineEntry> sSkillLineStore;
extern DBCStorage <SkillLineAbilityEntry> sSkillLineAbilityStore;
extern DBCStorage <SoundEntriesEntry> sSoundEntriesStore;
extern DBCStorage <SpellCastTimesEntry> sSpellCastTimesStore;
+extern DBCStorage <SpellCategoryEntry> sSpellCategoryStore;
extern DBCStorage <SpellDifficultyEntry> sSpellDifficultyStore;
extern DBCStorage <SpellDurationEntry> sSpellDurationStore;
extern DBCStorage <SpellFocusObjectEntry> sSpellFocusObjectStore;
extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
-extern SpellCategoryStore sSpellCategoryStore;
+extern SpellCategoryStore sSpellsByCategoryStore;
extern PetFamilySpellsStore sPetFamilySpellsStore;
extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index aff54f75a40..0c1f6af5506 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1675,6 +1675,12 @@ struct SpellCastTimesEntry
//int32 MinCastTime; // 3 unsure
};
+struct SpellCategoryEntry
+{
+ uint32 Id;
+ uint32 Flags;
+};
+
struct SpellDifficultyEntry
{
uint32 ID; // 0
@@ -2095,8 +2101,8 @@ struct WorldStateUI
// Structures not used for casting to loaded DBC data and not required then packing
struct MapDifficulty
{
- MapDifficulty() : resetTime(0), maxPlayers(0), hasErrorMessage(false) {}
- MapDifficulty(uint32 _resetTime, uint32 _maxPlayers, bool _hasErrorMessage) : resetTime(_resetTime), maxPlayers(_maxPlayers), hasErrorMessage(_hasErrorMessage) {}
+ MapDifficulty() : resetTime(0), maxPlayers(0), hasErrorMessage(false) { }
+ MapDifficulty(uint32 _resetTime, uint32 _maxPlayers, bool _hasErrorMessage) : resetTime(_resetTime), maxPlayers(_maxPlayers), hasErrorMessage(_hasErrorMessage) { }
uint32 resetTime;
uint32 maxPlayers;
@@ -2105,8 +2111,8 @@ struct MapDifficulty
struct TalentSpellPos
{
- TalentSpellPos() : talent_id(0), rank(0) {}
- TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) {}
+ TalentSpellPos() : talent_id(0), rank(0) { }
+ TalentSpellPos(uint16 _talent_id, uint8 _rank) : talent_id(_talent_id), rank(_rank) { }
uint16 talent_id;
uint8 rank;
@@ -2116,8 +2122,8 @@ typedef std::map<uint32, TalentSpellPos> TalentSpellPosMap;
struct TaxiPathBySourceAndDestination
{
- TaxiPathBySourceAndDestination() : ID(0), price(0) {}
- TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) {}
+ TaxiPathBySourceAndDestination() : ID(0), price(0) { }
+ TaxiPathBySourceAndDestination(uint32 _id, uint32 _price) : ID(_id), price(_price) { }
uint32 ID;
uint32 price;
@@ -2127,8 +2133,8 @@ typedef std::map<uint32, TaxiPathSetForSource> TaxiPathSetBySource;
struct TaxiPathNodePtr
{
- TaxiPathNodePtr() : i_ptr(NULL) {}
- TaxiPathNodePtr(TaxiPathNodeEntry const* ptr) : i_ptr(ptr) {}
+ TaxiPathNodePtr() : i_ptr(NULL) { }
+ TaxiPathNodePtr(TaxiPathNodeEntry const* ptr) : i_ptr(ptr) { }
TaxiPathNodeEntry const* i_ptr;
operator TaxiPathNodeEntry const& () const { return *i_ptr; }
};
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index 5326ab70fa3..0066db2b049 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -97,6 +97,7 @@ char const SkillLinefmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxx
char const SkillLineAbilityfmt[] = "niiiixxiiiiixx";
char const SoundEntriesfmt[] = "nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char const SpellCastTimefmt[] = "nixx";
+char const SpellCategoryfmt[] = "ni";
char const SpellDifficultyfmt[] = "niiii";
const std::string CustomSpellDifficultyfmt = "ppppp";
const std::string CustomSpellDifficultyIndex = "id";
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 75b09914080..783511c8251 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -113,7 +113,7 @@ void LFGMgr::LoadRewards()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
return;
}
@@ -130,25 +130,25 @@ void LFGMgr::LoadRewards()
if (!GetLFGDungeonEntry(dungeonId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId);
+ TC_LOG_ERROR("sql.sql", "Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId);
continue;
}
if (!maxLevel || maxLevel > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Level %u specified for dungeon %u in table `lfg_dungeon_rewards` can never be reached!", maxLevel, dungeonId);
+ TC_LOG_ERROR("sql.sql", "Level %u specified for dungeon %u in table `lfg_dungeon_rewards` can never be reached!", maxLevel, dungeonId);
maxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
}
if (!firstQuestId || !sObjectMgr->GetQuestTemplate(firstQuestId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId);
+ TC_LOG_ERROR("sql.sql", "First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId);
continue;
}
if (otherQuestId && !sObjectMgr->GetQuestTemplate(otherQuestId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId);
+ TC_LOG_ERROR("sql.sql", "Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId);
otherQuestId = 0;
}
@@ -157,7 +157,7 @@ void LFGMgr::LoadRewards()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
LFGDungeonData const* LFGMgr::GetLFGDungeon(uint32 id)
@@ -198,7 +198,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 lfg entrance positions. DB table `lfg_entrances` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 lfg entrance positions. DB table `lfg_entrances` is empty!");
return;
}
@@ -211,7 +211,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
LFGDungeonContainer::iterator dungeonItr = LfgDungeonStore.find(dungeonId);
if (dungeonItr == LfgDungeonStore.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "table `lfg_entrances` contains coordinates for wrong dungeon %u", dungeonId);
+ TC_LOG_ERROR("sql.sql", "table `lfg_entrances` contains coordinates for wrong dungeon %u", dungeonId);
continue;
}
@@ -225,7 +225,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg entrance positions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u lfg entrance positions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
// Fill all other teleport coords from areatriggers
for (LFGDungeonContainer::iterator itr = LfgDungeonStore.begin(); itr != LfgDungeonStore.end(); ++itr)
@@ -238,7 +238,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
AreaTrigger const* at = sObjectMgr->GetMapEntranceTrigger(dungeon.map);
if (!at)
{
- TC_LOG_ERROR(LOG_FILTER_LFG, "LFGMgr::LoadLFGDungeons: Failed to load dungeon %s, cant find areatrigger for map %u", dungeon.name.c_str(), dungeon.map);
+ TC_LOG_ERROR("lfg", "LFGMgr::LoadLFGDungeons: Failed to load dungeon %s, cant find areatrigger for map %u", dungeon.name.c_str(), dungeon.map);
continue;
}
@@ -325,7 +325,7 @@ void LFGMgr::Update(uint32 diff)
// Check if a proposal can be formed with the new groups being added
for (LfgQueueContainer::iterator it = QueuesStore.begin(); it != QueuesStore.end(); ++it)
if (uint8 newProposals = it->second.FindGroups())
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::Update: Found %u new groups in queue %u", newProposals, it->first);
+ TC_LOG_DEBUG("lfg", "LFGMgr::Update: Found %u new groups in queue %u", newProposals, it->first);
if (lastProposalId != m_lfgProposalId)
{
@@ -542,7 +542,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
isRaid = true;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_LFG, "Wrong dungeon type %u for dungeon %u", type, *it);
+ TC_LOG_ERROR("lfg", "Wrong dungeon type %u for dungeon %u", type, *it);
joinData.result = LFG_JOIN_DUNGEON_INVALID;
break;
}
@@ -565,7 +565,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
// Can't join. Send result
if (joinData.result != LFG_JOIN_OK)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: %u", guid, grp ? grp->GetMembersCount() : 1, joinData.result);
+ TC_LOG_DEBUG("lfg", "LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: %u", guid, grp ? grp->GetMembersCount() : 1, joinData.result);
if (!dungeons.empty()) // Only should show lockmap when have no dungeons available
joinData.lockmap.clear();
player->GetSession()->SendLfgJoinResult(joinData);
@@ -576,7 +576,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
if (isRaid)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::Join: [" UI64FMTD "] trying to join raid browser and it's disabled.", guid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::Join: [" UI64FMTD "] trying to join raid browser and it's disabled.", guid);
return;
}
@@ -642,12 +642,12 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
debugNames.append(player->GetName());
}
- if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG))
+ if (sLog->ShouldLog("lfg", LOG_LEVEL_DEBUG))
{
std::ostringstream o;
o << "LFGMgr::Join: [" << guid << "] joined (" << (grp ? "group" : "player") << ") Members: " << debugNames.c_str()
<< ". Dungeons (" << uint32(dungeons.size()) << "): " << ConcatenateDungeons(dungeons);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "%s", o.str().c_str());
+ TC_LOG_DEBUG("lfg", "%s", o.str().c_str());
}
}
@@ -659,7 +659,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
*/
void LFGMgr::LeaveLfg(uint64 guid)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::LeaveLfg: [" UI64FMTD "]", guid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::LeaveLfg: [" UI64FMTD "]", guid);
uint64 gguid = IS_GROUP_GUID(guid) ? guid : GetGroup(guid);
LfgState state = GetState(guid);
@@ -1017,7 +1017,7 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept)
LfgProposalPlayer& player = itProposalPlayer->second;
player.accept = LfgAnswer(accept);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::UpdateProposal: Player [" UI64FMTD "] of proposal %u selected: %u", guid, proposalId, accept);
+ TC_LOG_DEBUG("lfg", "LFGMgr::UpdateProposal: Player [" UI64FMTD "] of proposal %u selected: %u", guid, proposalId, accept);
if (!accept)
{
RemoveProposal(itProposal, LFG_UPDATETYPE_PROPOSAL_DECLINED);
@@ -1108,7 +1108,7 @@ void LFGMgr::RemoveProposal(LfgProposalContainer::iterator itProposal, LfgUpdate
LfgProposal& proposal = itProposal->second;
proposal.state = LFG_PROPOSAL_FAILED;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: Proposal %u, state FAILED, UpdateType %u", itProposal->first, type);
+ TC_LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: Proposal %u, state FAILED, UpdateType %u", itProposal->first, type);
// Mark all people that didn't answered as no accept
if (type == LFG_UPDATETYPE_PROPOSAL_FAILED)
for (LfgProposalPlayerContainer::iterator it = proposal.players.begin(); it != proposal.players.end(); ++it)
@@ -1145,12 +1145,12 @@ void LFGMgr::RemoveProposal(LfgProposalContainer::iterator itProposal, LfgUpdate
if (it->second.accept == LFG_ANSWER_DENY)
{
updateData.updateType = type;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: [" UI64FMTD "] didn't accept. Removing from queue and compatible cache", guid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: [" UI64FMTD "] didn't accept. Removing from queue and compatible cache", guid);
}
else
{
updateData.updateType = LFG_UPDATETYPE_REMOVED_FROM_QUEUE;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: [" UI64FMTD "] in same group that someone that didn't accept. Removing from queue and compatible cache", guid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: [" UI64FMTD "] in same group that someone that didn't accept. Removing from queue and compatible cache", guid);
}
RestoreState(guid, "Proposal Fail (didn't accepted or in group with someone that didn't accept");
@@ -1164,7 +1164,7 @@ void LFGMgr::RemoveProposal(LfgProposalContainer::iterator itProposal, LfgUpdate
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: Readding [" UI64FMTD "] to queue.", guid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: Readding [" UI64FMTD "] to queue.", guid);
SetState(guid, LFG_STATE_QUEUED);
if (gguid != guid)
{
@@ -1309,7 +1309,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
if (!dungeon)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "TeleportPlayer: Player %s not in group/lfggroup or dungeon not found!",
+ TC_LOG_DEBUG("lfg", "TeleportPlayer: Player %s not in group/lfggroup or dungeon not found!",
player->GetName().c_str());
player->GetSession()->SendLfgTeleportError(uint8(LFG_TELEPORTERROR_INVALID_LOCATION));
return;
@@ -1317,7 +1317,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
if (out)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "TeleportPlayer: Player %s is being teleported out. Current Map %u - Expected Map %u",
+ TC_LOG_DEBUG("lfg", "TeleportPlayer: Player %s is being teleported out. Current Map %u - Expected Map %u",
player->GetName().c_str(), player->GetMapId(), uint32(dungeon->map));
if (player->GetMapId() == uint32(dungeon->map))
player->TeleportToBGEntryPoint();
@@ -1381,7 +1381,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
if (error != LFG_TELEPORTERROR_OK)
player->GetSession()->SendLfgTeleportError(uint8(error));
- TC_LOG_DEBUG(LOG_FILTER_LFG, "TeleportPlayer: Player %s is being teleported in to map %u "
+ TC_LOG_DEBUG("lfg", "TeleportPlayer: Player %s is being teleported in to map %u "
"(x: %f, y: %f, z: %f) Result: %u", player->GetName().c_str(), dungeon->map,
dungeon->x, dungeon->y, dungeon->z, error);
}
@@ -1397,13 +1397,13 @@ void LFGMgr::FinishDungeon(uint64 gguid, const uint32 dungeonId)
uint32 gDungeonId = GetDungeon(gguid);
if (gDungeonId != dungeonId)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::FinishDungeon: [" UI64FMTD "] Finished dungeon %u but group queued for %u. Ignoring", gguid, dungeonId, gDungeonId);
+ TC_LOG_DEBUG("lfg", "LFGMgr::FinishDungeon: [" UI64FMTD "] Finished dungeon %u but group queued for %u. Ignoring", gguid, dungeonId, gDungeonId);
return;
}
if (GetState(gguid) == LFG_STATE_FINISHED_DUNGEON) // Shouldn't happen. Do not reward multiple times
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::FinishDungeon: [" UI64FMTD "] Already rewarded group. Ignoring", gguid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::FinishDungeon: [" UI64FMTD "] Already rewarded group. Ignoring", gguid);
return;
}
@@ -1415,7 +1415,7 @@ void LFGMgr::FinishDungeon(uint64 gguid, const uint32 dungeonId)
uint64 guid = (*it);
if (GetState(guid) == LFG_STATE_FINISHED_DUNGEON)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::FinishDungeon: [" UI64FMTD "] Already rewarded player. Ignoring", guid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::FinishDungeon: [" UI64FMTD "] Already rewarded player. Ignoring", guid);
continue;
}
@@ -1431,14 +1431,14 @@ void LFGMgr::FinishDungeon(uint64 gguid, const uint32 dungeonId)
if (!dungeon || (dungeon->type != LFG_TYPE_RANDOM && !dungeon->seasonal))
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::FinishDungeon: [" UI64FMTD "] dungeon %u is not random or seasonal", guid, rDungeonId);
+ TC_LOG_DEBUG("lfg", "LFGMgr::FinishDungeon: [" UI64FMTD "] dungeon %u is not random or seasonal", guid, rDungeonId);
continue;
}
Player* player = ObjectAccessor::FindPlayer(guid);
if (!player || !player->IsInWorld())
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::FinishDungeon: [" UI64FMTD "] not found in world", guid);
+ TC_LOG_DEBUG("lfg", "LFGMgr::FinishDungeon: [" UI64FMTD "] not found in world", guid);
continue;
}
@@ -1447,7 +1447,7 @@ void LFGMgr::FinishDungeon(uint64 gguid, const uint32 dungeonId)
if (player->GetMapId() != mapId)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::FinishDungeon: [" UI64FMTD "] is in map %u and should be in %u to get reward", guid, player->GetMapId(), mapId);
+ TC_LOG_DEBUG("lfg", "LFGMgr::FinishDungeon: [" UI64FMTD "] is in map %u and should be in %u to get reward", guid, player->GetMapId(), mapId);
continue;
}
@@ -1478,7 +1478,7 @@ void LFGMgr::FinishDungeon(uint64 gguid, const uint32 dungeonId)
}
// Give rewards
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGMgr::FinishDungeon: [" UI64FMTD "] done dungeon %u, %s previously done.", player->GetGUID(), GetDungeon(gguid), done? " " : " not");
+ TC_LOG_DEBUG("lfg", "LFGMgr::FinishDungeon: [" UI64FMTD "] done dungeon %u, %s previously done.", player->GetGUID(), GetDungeon(gguid), done? " " : " not");
LfgPlayerRewardData data = LfgPlayerRewardData(dungeon->Entry(), GetDungeon(gguid, false), done, quest);
player->GetSession()->SendLfgPlayerReward(data);
}
@@ -1546,7 +1546,7 @@ LfgState LFGMgr::GetState(uint64 guid)
else
state = PlayersStore[guid].GetState();
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "] = %u", guid, state);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetState: [" UI64FMTD "] = %u", guid, state);
return state;
}
@@ -1558,14 +1558,14 @@ LfgState LFGMgr::GetOldState(uint64 guid)
else
state = PlayersStore[guid].GetOldState();
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetOldState: [" UI64FMTD "] = %u", guid, state);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetOldState: [" UI64FMTD "] = %u", guid, state);
return state;
}
uint32 LFGMgr::GetDungeon(uint64 guid, bool asId /*= true */)
{
uint32 dungeon = GroupsStore[guid].GetDungeon(asId);
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u = %u", guid, asId, dungeon);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u = %u", guid, asId, dungeon);
return dungeon;
}
@@ -1577,39 +1577,39 @@ uint32 LFGMgr::GetDungeonMapId(uint64 guid)
if (LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId))
mapId = dungeon->map;
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetDungeonMapId: [" UI64FMTD "] = %u (DungeonId = %u)", guid, mapId, dungeonId);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetDungeonMapId: [" UI64FMTD "] = %u (DungeonId = %u)", guid, mapId, dungeonId);
return mapId;
}
uint8 LFGMgr::GetRoles(uint64 guid)
{
uint8 roles = PlayersStore[guid].GetRoles();
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetRoles: [" UI64FMTD "] = %u", guid, roles);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetRoles: [" UI64FMTD "] = %u", guid, roles);
return roles;
}
const std::string& LFGMgr::GetComment(uint64 guid)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetComment: [" UI64FMTD "] = %s", guid, PlayersStore[guid].GetComment().c_str());
+ TC_LOG_TRACE("lfg", "LFGMgr::GetComment: [" UI64FMTD "] = %s", guid, PlayersStore[guid].GetComment().c_str());
return PlayersStore[guid].GetComment();
}
LfgDungeonSet const& LFGMgr::GetSelectedDungeons(uint64 guid)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid);
return PlayersStore[guid].GetSelectedDungeons();
}
LfgLockMap const& LFGMgr::GetLockedDungeons(uint64 guid)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid);
return PlayersStore[guid].GetLockedDungeons();
}
uint8 LFGMgr::GetKicksLeft(uint64 guid)
{
uint8 kicks = GroupsStore[guid].GetKicksLeft();
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::GetKicksLeft: [" UI64FMTD "] = %u", guid, kicks);
+ TC_LOG_TRACE("lfg", "LFGMgr::GetKicksLeft: [" UI64FMTD "] = %u", guid, kicks);
return kicks;
}
@@ -1618,11 +1618,11 @@ void LFGMgr::RestoreState(uint64 guid, char const* debugMsg)
if (IS_GROUP_GUID(guid))
{
LfgGroupData& data = GroupsStore[guid];
- if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG))
+ if (sLog->ShouldLog("lfg", LOG_LEVEL_DEBUG))
{
std::string const& ps = GetStateString(data.GetState());
std::string const& os = GetStateString(data.GetOldState());
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::RestoreState: Group: [" UI64FMTD "] (%s) State: %s, oldState: %s",
+ TC_LOG_TRACE("lfg", "LFGMgr::RestoreState: Group: [" UI64FMTD "] (%s) State: %s, oldState: %s",
guid, debugMsg, ps.c_str(), os.c_str());
}
@@ -1631,11 +1631,11 @@ void LFGMgr::RestoreState(uint64 guid, char const* debugMsg)
else
{
LfgPlayerData& data = PlayersStore[guid];
- if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_DEBUG))
+ if (sLog->ShouldLog("lfg", LOG_LEVEL_DEBUG))
{
std::string const& ps = GetStateString(data.GetState());
std::string const& os = GetStateString(data.GetOldState());
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::RestoreState: Player: [" UI64FMTD "] (%s) State: %s, oldState: %s",
+ TC_LOG_TRACE("lfg", "LFGMgr::RestoreState: Player: [" UI64FMTD "] (%s) State: %s, oldState: %s",
guid, debugMsg, ps.c_str(), os.c_str());
}
data.RestoreState();
@@ -1647,12 +1647,12 @@ void LFGMgr::SetState(uint64 guid, LfgState state)
if (IS_GROUP_GUID(guid))
{
LfgGroupData& data = GroupsStore[guid];
- if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_TRACE))
+ if (sLog->ShouldLog("lfg", LOG_LEVEL_TRACE))
{
std::string const& ns = GetStateString(state);
std::string const& ps = GetStateString(data.GetState());
std::string const& os = GetStateString(data.GetOldState());
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::SetState: Group: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
+ TC_LOG_TRACE("lfg", "LFGMgr::SetState: Group: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
guid, ns.c_str(), ps.c_str(), os.c_str());
}
data.SetState(state);
@@ -1660,12 +1660,12 @@ void LFGMgr::SetState(uint64 guid, LfgState state)
else
{
LfgPlayerData& data = PlayersStore[guid];
- if (sLog->ShouldLog(LOG_FILTER_LFG, LOG_LEVEL_TRACE))
+ if (sLog->ShouldLog("lfg", LOG_LEVEL_TRACE))
{
std::string const& ns = GetStateString(state);
std::string const& ps = GetStateString(data.GetState());
std::string const& os = GetStateString(data.GetOldState());
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::SetState: Player: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
+ TC_LOG_TRACE("lfg", "LFGMgr::SetState: Player: [" UI64FMTD "] newState: %s, previous: %s, oldState: %s",
guid, ns.c_str(), ps.c_str(), os.c_str());
}
data.SetState(state);
@@ -1674,43 +1674,43 @@ void LFGMgr::SetState(uint64 guid, LfgState state)
void LFGMgr::SetDungeon(uint64 guid, uint32 dungeon)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon);
+ TC_LOG_TRACE("lfg", "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon);
GroupsStore[guid].SetDungeon(dungeon);
}
void LFGMgr::SetRoles(uint64 guid, uint8 roles)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles);
+ TC_LOG_TRACE("lfg", "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles);
PlayersStore[guid].SetRoles(roles);
}
void LFGMgr::SetComment(uint64 guid, std::string const& comment)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str());
+ TC_LOG_TRACE("lfg", "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str());
PlayersStore[guid].SetComment(comment);
}
void LFGMgr::SetSelectedDungeons(uint64 guid, LfgDungeonSet const& dungeons)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::SetSelectedDungeons: [" UI64FMTD "] Dungeons: %s", guid, ConcatenateDungeons(dungeons).c_str());
+ TC_LOG_TRACE("lfg", "LFGMgr::SetSelectedDungeons: [" UI64FMTD "] Dungeons: %s", guid, ConcatenateDungeons(dungeons).c_str());
PlayersStore[guid].SetSelectedDungeons(dungeons);
}
void LFGMgr::SetLockedDungeons(uint64 guid, LfgLockMap const& lock)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid);
+ TC_LOG_TRACE("lfg", "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid);
PlayersStore[guid].SetLockedDungeons(lock);
}
void LFGMgr::DecreaseKicksLeft(uint64 guid)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid);
+ TC_LOG_TRACE("lfg", "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid);
GroupsStore[guid].DecreaseKicksLeft();
}
void LFGMgr::RemovePlayerData(uint64 guid)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid);
+ TC_LOG_TRACE("lfg", "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid);
LfgPlayerDataContainer::iterator it = PlayersStore.find(guid);
if (it != PlayersStore.end())
PlayersStore.erase(it);
@@ -1718,7 +1718,7 @@ void LFGMgr::RemovePlayerData(uint64 guid)
void LFGMgr::RemoveGroupData(uint64 guid)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid);
+ TC_LOG_TRACE("lfg", "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid);
LfgGroupDataContainer::iterator it = GroupsStore.find(guid);
if (it == GroupsStore.end())
return;
diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h
index 96fedb65547..83b4142ae36 100644
--- a/src/server/game/DungeonFinding/LFGMgr.h
+++ b/src/server/game/DungeonFinding/LFGMgr.h
@@ -151,7 +151,7 @@ typedef UNORDERED_MAP<uint32, LFGDungeonData> LFGDungeonContainer;
struct LfgJoinResultData
{
LfgJoinResultData(LfgJoinResult _result = LFG_JOIN_OK, LfgRoleCheckState _state = LFG_ROLECHECK_DEFAULT):
- result(_result), state(_state) {}
+ result(_result), state(_state) { }
LfgJoinResult result;
LfgRoleCheckState state;
LfgLockPartyMap lockmap;
@@ -178,7 +178,7 @@ struct LfgQueueStatusData
LfgQueueStatusData(uint32 _dungeonId = 0, int32 _waitTime = -1, int32 _waitTimeAvg = -1, int32 _waitTimeTank = -1, int32 _waitTimeHealer = -1,
int32 _waitTimeDps = -1, uint32 _queuedTime = 0, uint8 _tanks = 0, uint8 _healers = 0, uint8 _dps = 0) :
dungeonId(_dungeonId), waitTime(_waitTime), waitTimeAvg(_waitTimeAvg), waitTimeTank(_waitTimeTank), waitTimeHealer(_waitTimeHealer),
- waitTimeDps(_waitTimeDps), queuedTime(_queuedTime), tanks(_tanks), healers(_healers), dps(_dps) {}
+ waitTimeDps(_waitTimeDps), queuedTime(_queuedTime), tanks(_tanks), healers(_healers), dps(_dps) { }
uint32 dungeonId;
int32 waitTime;
diff --git a/src/server/game/DungeonFinding/LFGPlayerData.cpp b/src/server/game/DungeonFinding/LFGPlayerData.cpp
index e8ef430bc1f..305263cb73d 100644
--- a/src/server/game/DungeonFinding/LFGPlayerData.cpp
+++ b/src/server/game/DungeonFinding/LFGPlayerData.cpp
@@ -22,11 +22,9 @@ namespace lfg
LfgPlayerData::LfgPlayerData(): m_State(LFG_STATE_NONE), m_OldState(LFG_STATE_NONE),
m_Team(0), m_Group(0), m_Roles(0), m_Comment("")
-{}
+{ }
-LfgPlayerData::~LfgPlayerData()
-{
-}
+LfgPlayerData::~LfgPlayerData() { }
void LfgPlayerData::SetState(LfgState state)
{
diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp
index 178855e25e8..2946a5a9c5a 100644
--- a/src/server/game/DungeonFinding/LFGQueue.cpp
+++ b/src/server/game/DungeonFinding/LFGQueue.cpp
@@ -88,7 +88,7 @@ void LFGQueue::AddToQueue(uint64 guid)
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(guid);
if (itQueue == QueueDataStore.end())
{
- TC_LOG_ERROR(LOG_FILTER_LFG, "LFGQueue::AddToQueue: Queue data not found for [" UI64FMTD "]", guid);
+ TC_LOG_ERROR("lfg", "LFGQueue::AddToQueue: Queue data not found for [" UI64FMTD "]", guid);
return;
}
@@ -194,7 +194,7 @@ void LFGQueue::RemoveFromCompatibles(uint64 guid)
out << guid;
std::string strGuid = out.str();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::RemoveFromCompatibles: Removing [" UI64FMTD "]", guid);
+ TC_LOG_DEBUG("lfg", "LFGQueue::RemoveFromCompatibles: Removing [" UI64FMTD "]", guid);
for (LfgCompatibleContainer::iterator itNext = CompatibleMapStore.begin(); itNext != CompatibleMapStore.end();)
{
LfgCompatibleContainer::iterator it = itNext++;
@@ -251,7 +251,7 @@ uint8 LFGQueue::FindGroups()
while (!newToQueueStore.empty())
{
uint64 frontguid = newToQueueStore.front();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::FindGroups: checking [" UI64FMTD "] newToQueue(%u), currentQueue(%u)", frontguid, uint32(newToQueueStore.size()), uint32(currentQueueStore.size()));
+ TC_LOG_DEBUG("lfg", "LFGQueue::FindGroups: checking [" UI64FMTD "] newToQueue(%u), currentQueue(%u)", frontguid, uint32(newToQueueStore.size()), uint32(currentQueueStore.size()));
firstNew.clear();
firstNew.push_back(frontguid);
RemoveFromNewQueue(frontguid);
@@ -279,13 +279,13 @@ LfgCompatibility LFGQueue::FindNewGroups(LfgGuidList& check, LfgGuidList& all)
std::string strGuids = ConcatenateGuids(check);
LfgCompatibility compatibles = GetCompatibles(strGuids);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::FindNewGroup: (%s): %s - all(%s)", strGuids.c_str(), GetCompatibleString(compatibles), ConcatenateGuids(all).c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::FindNewGroup: (%s): %s - all(%s)", strGuids.c_str(), GetCompatibleString(compatibles), ConcatenateGuids(all).c_str());
if (compatibles == LFG_COMPATIBILITY_PENDING) // Not previously cached, calculate
compatibles = CheckCompatibility(check);
if (compatibles == LFG_COMPATIBLES_BAD_STATES && sLFGMgr->AllQueued(check))
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::FindNewGroup: (%s) compatibles (cached) changed from bad states to match", strGuids.c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::FindNewGroup: (%s) compatibles (cached) changed from bad states to match", strGuids.c_str());
SetCompatibles(strGuids, LFG_COMPATIBLES_MATCH);
return LFG_COMPATIBLES_MATCH;
}
@@ -323,7 +323,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
// Check for correct size
if (check.size() > MAXGROUPSIZE || check.empty())
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s): Size wrong - Not compatibles", strGuids.c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s): Size wrong - Not compatibles", strGuids.c_str());
return LFG_INCOMPATIBLES_WRONG_GROUP_SIZE;
}
@@ -337,7 +337,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
LfgCompatibility child_compatibles = CheckCompatibility(check);
if (child_compatibles < LFG_COMPATIBLES_WITH_LESS_PLAYERS) // Group not compatible
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) child %s not compatibles", strGuids.c_str(), ConcatenateGuids(check).c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) child %s not compatibles", strGuids.c_str(), ConcatenateGuids(check).c_str());
SetCompatibles(strGuids, child_compatibles);
return child_compatibles;
}
@@ -353,7 +353,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(guid);
if (itQueue == QueueDataStore.end())
{
- TC_LOG_ERROR(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: [" UI64FMTD "] is not queued but listed as queued!", guid);
+ TC_LOG_ERROR("lfg", "LFGQueue::CheckCompatibility: [" UI64FMTD "] is not queued but listed as queued!", guid);
RemoveFromQueue(guid);
return LFG_COMPATIBILITY_PENDING;
}
@@ -375,7 +375,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
// Group with less that MAXGROUPSIZE members always compatible
if (check.size() == 1 && numPlayers != MAXGROUPSIZE)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) sigle group. Compatibles", strGuids.c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) sigle group. Compatibles", strGuids.c_str());
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(check.front());
LfgCompatibilityData data(LFG_COMPATIBLES_WITH_LESS_PLAYERS);
@@ -389,14 +389,14 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
if (numLfgGroups > 1)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) More than one Lfggroup (%u)", strGuids.c_str(), numLfgGroups);
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) More than one Lfggroup (%u)", strGuids.c_str(), numLfgGroups);
SetCompatibles(strGuids, LFG_INCOMPATIBLES_MULTIPLE_LFG_GROUPS);
return LFG_INCOMPATIBLES_MULTIPLE_LFG_GROUPS;
}
if (numPlayers > MAXGROUPSIZE)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) Too much players (%u)", strGuids.c_str(), numPlayers);
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) Too much players (%u)", strGuids.c_str(), numPlayers);
SetCompatibles(strGuids, LFG_INCOMPATIBLES_TOO_MUCH_PLAYERS);
return LFG_INCOMPATIBLES_TOO_MUCH_PLAYERS;
}
@@ -413,7 +413,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
for (itPlayer = proposalRoles.begin(); itPlayer != proposalRoles.end(); ++itPlayer)
{
if (itRoles->first == itPlayer->first)
- TC_LOG_ERROR(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: ERROR! Player multiple times in queue! [" UI64FMTD "]", itRoles->first);
+ TC_LOG_ERROR("lfg", "LFGQueue::CheckCompatibility: ERROR! Player multiple times in queue! [" UI64FMTD "]", itRoles->first);
else if (sLFGMgr->HasIgnore(itRoles->first, itPlayer->first))
break;
}
@@ -424,7 +424,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
if (uint8 playersize = numPlayers - proposalRoles.size())
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) not compatible, %u players are ignoring each other", strGuids.c_str(), playersize);
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) not compatible, %u players are ignoring each other", strGuids.c_str(), playersize);
SetCompatibles(strGuids, LFG_INCOMPATIBLES_HAS_IGNORES);
return LFG_INCOMPATIBLES_HAS_IGNORES;
}
@@ -436,7 +436,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
for (LfgRolesMap::const_iterator it = debugRoles.begin(); it != debugRoles.end(); ++it)
o << ", " << it->first << ": " << GetRolesString(it->second);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) Roles not compatible%s", strGuids.c_str(), o.str().c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) Roles not compatible%s", strGuids.c_str(), o.str().c_str());
SetCompatibles(strGuids, LFG_INCOMPATIBLES_NO_ROLES);
return LFG_INCOMPATIBLES_NO_ROLES;
}
@@ -456,7 +456,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
if (proposalDungeons.empty())
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) No compatible dungeons%s", strGuids.c_str(), o.str().c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) No compatible dungeons%s", strGuids.c_str(), o.str().c_str());
SetCompatibles(strGuids, LFG_INCOMPATIBLES_NO_DUNGEONS);
return LFG_INCOMPATIBLES_NO_DUNGEONS;
}
@@ -473,7 +473,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
// Enough players?
if (numPlayers != MAXGROUPSIZE)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) Compatibles but not enough players(%u)", strGuids.c_str(), numPlayers);
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) Compatibles but not enough players(%u)", strGuids.c_str(), numPlayers);
LfgCompatibilityData data(LFG_COMPATIBLES_WITH_LESS_PLAYERS);
data.roles = proposalRoles;
@@ -490,7 +490,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
if (!sLFGMgr->AllQueued(check))
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) Group MATCH but can't create proposal!", strGuids.c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) Group MATCH but can't create proposal!", strGuids.c_str());
SetCompatibles(strGuids, LFG_COMPATIBLES_BAD_STATES);
return LFG_COMPATIBLES_BAD_STATES;
}
@@ -532,14 +532,14 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
sLFGMgr->AddProposal(proposal);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) MATCH! Group formed", strGuids.c_str());
+ TC_LOG_DEBUG("lfg", "LFGQueue::CheckCompatibility: (%s) MATCH! Group formed", strGuids.c_str());
SetCompatibles(strGuids, LFG_COMPATIBLES_MATCH);
return LFG_COMPATIBLES_MATCH;
}
void LFGQueue::UpdateQueueTimers(time_t currTime)
{
- TC_LOG_TRACE(LOG_FILTER_LFG, "Updating queue timers...");
+ TC_LOG_TRACE("lfg", "Updating queue timers...");
for (LfgQueueDataContainer::iterator itQueue = QueueDataStore.begin(); itQueue != QueueDataStore.end(); ++itQueue)
{
LfgQueueData& queueinfo = itQueue->second;
@@ -631,7 +631,7 @@ std::string LFGQueue::DumpCompatibleInfo(bool full /* = false */) const
void LFGQueue::FindBestCompatibleInQueue(LfgQueueDataContainer::iterator itrQueue)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::FindBestCompatibleInQueue: " UI64FMTD, itrQueue->first);
+ TC_LOG_DEBUG("lfg", "LFGQueue::FindBestCompatibleInQueue: " UI64FMTD, itrQueue->first);
std::ostringstream o;
o << itrQueue->first;
std::string sguid = o.str();
@@ -656,7 +656,7 @@ void LFGQueue::UpdateBestCompatibleInQueue(LfgQueueDataContainer::iterator itrQu
if (size <= storedSize)
return;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGQueue::UpdateBestCompatibleInQueue: Changed (%s) to (%s) as best compatible group for " UI64FMTD,
+ TC_LOG_DEBUG("lfg", "LFGQueue::UpdateBestCompatibleInQueue: Changed (%s) to (%s) as best compatible group for " UI64FMTD,
queueData.bestCompatible.c_str(), key.c_str(), itrQueue->first);
queueData.bestCompatible = key;
diff --git a/src/server/game/DungeonFinding/LFGQueue.h b/src/server/game/DungeonFinding/LFGQueue.h
index db7e7bbf318..128b2aa2f0b 100644
--- a/src/server/game/DungeonFinding/LFGQueue.h
+++ b/src/server/game/DungeonFinding/LFGQueue.h
@@ -71,7 +71,7 @@ struct LfgQueueData
struct LfgWaitTime
{
- LfgWaitTime(): time(-1), number(0) {}
+ LfgWaitTime(): time(-1), number(0) { }
int32 time; ///< Wait time
uint32 number; ///< Number of people used to get that wait time
};
diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index 9dfbb0e9fb3..5f4e5c664a0 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -32,9 +32,7 @@
namespace lfg
{
-LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript")
-{
-}
+LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript") { }
void LFGPlayerScript::OnLevelChanged(Player* player, uint8 /*oldLevel*/)
{
@@ -70,7 +68,7 @@ void LFGPlayerScript::OnLogin(Player* player)
uint64 gguid2 = group->GetGUID();
if (gguid != gguid2)
{
- TC_LOG_ERROR(LOG_FILTER_LFG, "%s on group %u but LFG has group %u saved... Fixing.",
+ TC_LOG_ERROR("lfg", "%s on group %u but LFG has group %u saved... Fixing.",
player->GetSession()->GetPlayerInfo().c_str(), GUID_LOPART(gguid2), GUID_LOPART(gguid));
sLFGMgr->SetupGroupMember(guid, group->GetGUID());
}
@@ -104,7 +102,7 @@ void LFGPlayerScript::OnMapChanged(Player* player)
sLFGMgr->LeaveLfg(player->GetGUID());
player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, 0.0f);
- TC_LOG_ERROR(LOG_FILTER_LFG, "LFGPlayerScript::OnMapChanged, Player %s (%u) is in LFG dungeon map but does not have a valid group! "
+ TC_LOG_ERROR("lfg", "LFGPlayerScript::OnMapChanged, Player %s (%u) is in LFG dungeon map but does not have a valid group! "
"Teleporting to homebind.", player->GetName().c_str(), player->GetGUIDLow());
return;
}
@@ -120,9 +118,7 @@ void LFGPlayerScript::OnMapChanged(Player* player)
player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
}
-LFGGroupScript::LFGGroupScript() : GroupScript("LFGGroupScript")
-{
-}
+LFGGroupScript::LFGGroupScript() : GroupScript("LFGGroupScript") { }
void LFGGroupScript::OnAddMember(Group* group, uint64 guid)
{
@@ -134,14 +130,14 @@ void LFGGroupScript::OnAddMember(Group* group, uint64 guid)
if (leader == guid)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "] leader " UI64FMTD "]", gguid, guid, leader);
+ TC_LOG_DEBUG("lfg", "LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "] leader " UI64FMTD "]", gguid, guid, leader);
sLFGMgr->SetLeader(gguid, guid);
}
else
{
LfgState gstate = sLFGMgr->GetState(gguid);
LfgState state = sLFGMgr->GetState(guid);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "] leader " UI64FMTD "] gstate: %u, state: %u", gguid, guid, leader, gstate, state);
+ TC_LOG_DEBUG("lfg", "LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "] leader " UI64FMTD "] gstate: %u, state: %u", gguid, guid, leader, gstate, state);
if (state == LFG_STATE_QUEUED)
sLFGMgr->LeaveLfg(guid);
@@ -160,7 +156,7 @@ void LFGGroupScript::OnRemoveMember(Group* group, uint64 guid, RemoveMethod meth
return;
uint64 gguid = group->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGScripts::OnRemoveMember [" UI64FMTD "]: remove [" UI64FMTD "] Method: %d Kicker: [" UI64FMTD "] Reason: %s", gguid, guid, method, kicker, (reason ? reason : ""));
+ TC_LOG_DEBUG("lfg", "LFGScripts::OnRemoveMember [" UI64FMTD "]: remove [" UI64FMTD "] Method: %d Kicker: [" UI64FMTD "] Reason: %s", gguid, guid, method, kicker, (reason ? reason : ""));
bool isLFG = group->isLFGGroup();
@@ -213,7 +209,7 @@ void LFGGroupScript::OnDisband(Group* group)
return;
uint64 gguid = group->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGScripts::OnDisband [" UI64FMTD "]", gguid);
+ TC_LOG_DEBUG("lfg", "LFGScripts::OnDisband [" UI64FMTD "]", gguid);
sLFGMgr->RemoveGroupData(gguid);
}
@@ -225,7 +221,7 @@ void LFGGroupScript::OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 o
uint64 gguid = group->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGScripts::OnChangeLeader [" UI64FMTD "]: old [" UI64FMTD "] new [" UI64FMTD "]", gguid, newLeaderGuid, oldLeaderGuid);
+ TC_LOG_DEBUG("lfg", "LFGScripts::OnChangeLeader [" UI64FMTD "]: old [" UI64FMTD "] new [" UI64FMTD "]", gguid, newLeaderGuid, oldLeaderGuid);
sLFGMgr->SetLeader(gguid, newLeaderGuid);
}
@@ -236,7 +232,7 @@ void LFGGroupScript::OnInviteMember(Group* group, uint64 guid)
uint64 gguid = group->GetGUID();
uint64 leader = group->GetLeaderGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "LFGScripts::OnInviteMember [" UI64FMTD "]: invite [" UI64FMTD "] leader [" UI64FMTD "]", gguid, guid, leader);
+ TC_LOG_DEBUG("lfg", "LFGScripts::OnInviteMember [" UI64FMTD "]: invite [" UI64FMTD "] leader [" UI64FMTD "]", gguid, guid, leader);
// No gguid == new group being formed
// No leader == after group creation first invite is new leader
// leader and no gguid == first invite after leader is added to new group (this is the real invite)
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index ccceec7185b..9d3ee045c61 100644
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -41,9 +41,7 @@ Corpse::Corpse(CorpseType type) : WorldObject(type != CORPSE_BONES), m_type(type
lootRecipient = NULL;
}
-Corpse::~Corpse()
-{
-}
+Corpse::~Corpse() { }
void Corpse::AddToWorld()
{
@@ -78,7 +76,7 @@ bool Corpse::Create(uint32 guidlow, Player* owner)
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
+ TC_LOG_ERROR("entities.player", "Corpse (guidlow %d, owner %s) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow, owner->GetName().c_str(), owner->GetPositionX(), owner->GetPositionY());
return false;
}
@@ -135,7 +133,7 @@ void Corpse::DeleteBonesFromWorld()
if (!corpse)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Bones %u not found in world.", GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Bones %u not found in world.", GetGUIDLow());
return;
}
@@ -196,7 +194,7 @@ bool Corpse::LoadCorpseFromDB(uint32 guid, Field* fields)
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Corpse (guid: %u, owner: %u) is not created, given coordinates are not valid (X: %f, Y: %f, Z: %f)",
+ TC_LOG_ERROR("entities.player", "Corpse (guid: %u, owner: %u) is not created, given coordinates are not valid (X: %f, Y: %f, Z: %f)",
GetGUIDLow(), GUID_LOPART(GetOwnerGUID()), posX, posY, posZ);
return false;
}
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index f68d87de2f4..7974e07fe33 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -174,7 +174,7 @@ Creature::~Creature()
i_AI = NULL;
//if (m_uint32Values)
- // TC_LOG_ERROR(LOG_FILTER_UNITS, "Deconstruct Creature Entry = %u", GetEntry());
+ // TC_LOG_ERROR("entities.unit", "Deconstruct Creature Entry = %u", GetEntry());
}
void Creature::AddToWorld()
@@ -262,7 +262,7 @@ bool Creature::InitEntry(uint32 entry, uint32 /*team*/, const CreatureData* data
CreatureTemplate const* normalInfo = sObjectMgr->GetCreatureTemplate(entry);
if (!normalInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature::InitEntry creature entry %u does not exist.", entry);
+ TC_LOG_ERROR("sql.sql", "Creature::InitEntry creature entry %u does not exist.", entry);
return false;
}
@@ -304,7 +304,7 @@ bool Creature::InitEntry(uint32 entry, uint32 /*team*/, const CreatureData* data
// Cancel load if no model defined
if (!(cinfo->GetFirstValidModelId()))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", entry);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", entry);
return false;
}
@@ -312,7 +312,7 @@ bool Creature::InitEntry(uint32 entry, uint32 /*team*/, const CreatureData* data
CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelRandomGender(&displayID);
if (!minfo) // Cancel load if no model defined
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", entry);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", entry);
return false;
}
@@ -457,11 +457,11 @@ void Creature::Update(uint32 diff)
{
case JUST_RESPAWNED:
// Must not be called, see Creature::setDeathState JUST_RESPAWNED -> ALIVE promoting.
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature (GUID: %u Entry: %u) in wrong state: JUST_RESPAWNED (4)", GetGUIDLow(), GetEntry());
+ TC_LOG_ERROR("entities.unit", "Creature (GUID: %u Entry: %u) in wrong state: JUST_RESPAWNED (4)", GetGUIDLow(), GetEntry());
break;
case JUST_DIED:
// Must not be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting.
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature (GUID: %u Entry: %u) in wrong state: JUST_DEAD (1)", GetGUIDLow(), GetEntry());
+ TC_LOG_ERROR("entities.unit", "Creature (GUID: %u Entry: %u) in wrong state: JUST_DEAD (1)", GetGUIDLow(), GetEntry());
break;
case DEAD:
{
@@ -510,7 +510,7 @@ void Creature::Update(uint32 diff)
else if (m_corpseRemoveTime <= time(NULL))
{
RemoveCorpse(false);
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
+ TC_LOG_DEBUG("entities.unit", "Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
}
break;
}
@@ -705,7 +705,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
// make sure nothing can change the AI during AI update
if (m_AI_locked)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "AIM_Initialize: failed to init, locked.");
+ TC_LOG_DEBUG("scripts", "AIM_Initialize: failed to init, locked.");
return false;
}
@@ -747,7 +747,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry);
if (!cinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry);
+ TC_LOG_ERROR("sql.sql", "Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry);
return false;
}
@@ -761,7 +761,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow, Entry, x, y, z, ang);
+ TC_LOG_ERROR("entities.unit", "Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow, Entry, x, y, z, ang);
return false;
}
@@ -930,7 +930,7 @@ void Creature::SaveToDB()
CreatureData const* data = sObjectMgr->GetCreatureData(m_DBTableGuid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature::SaveToDB failed, cannot get creature data!");
+ TC_LOG_ERROR("entities.unit", "Creature::SaveToDB failed, cannot get creature data!");
return;
}
@@ -1162,7 +1162,7 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint3
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(Entry);
if (!cinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry);
+ TC_LOG_ERROR("sql.sql", "Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow, Entry);
return false;
}
@@ -1188,7 +1188,7 @@ bool Creature::LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap)
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) not found in table `creature`, can't load. ", guid);
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) not found in table `creature`, can't load. ", guid);
return false;
}
@@ -1304,7 +1304,7 @@ void Creature::DeleteFromDB()
{
if (!m_DBTableGuid)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Trying to delete not saved creature! LowGUID: %u, Entry: %u", GetGUIDLow(), GetEntry());
+ TC_LOG_ERROR("entities.unit", "Trying to delete not saved creature! LowGUID: %u, Entry: %u", GetGUIDLow(), GetEntry());
return;
}
@@ -1506,7 +1506,7 @@ void Creature::Respawn(bool force)
if (m_DBTableGuid)
GetMap()->RemoveCreatureRespawnTime(m_DBTableGuid);
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)",
+ TC_LOG_DEBUG("entities.unit", "Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)",
GetName().c_str(), GetGUIDLow(), GetGUID(), GetEntry());
m_respawnTime = 0;
lootForPickPocketed = false;
@@ -1638,7 +1638,7 @@ SpellInfo const* Creature::reachWithSpellAttack(Unit* victim)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "WORLD: unknown spell id %i", m_spells[i]);
+ TC_LOG_ERROR("entities.unit", "WORLD: unknown spell id %i", m_spells[i]);
continue;
}
@@ -1686,7 +1686,7 @@ SpellInfo const* Creature::reachWithSpellCure(Unit* victim)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "WORLD: unknown spell id %i", m_spells[i]);
+ TC_LOG_ERROR("entities.unit", "WORLD: unknown spell id %i", m_spells[i]);
continue;
}
@@ -1758,7 +1758,7 @@ Unit* Creature::SelectNearestTargetInAttackDistance(float dist) const
if (dist > MAX_VISIBILITY_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > MAX_VISIBILITY_DISTANCE. Distance set to ATTACK_DISTANCE.", GetGUIDLow(), GetEntry());
+ TC_LOG_ERROR("entities.unit", "Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > MAX_VISIBILITY_DISTANCE. Distance set to ATTACK_DISTANCE.", GetGUIDLow(), GetEntry());
dist = ATTACK_DISTANCE;
}
@@ -1796,7 +1796,7 @@ void Creature::SendAIReaction(AiReaction reactionType)
((WorldObject*)this)->SendMessageToSet(&data, true);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
}
void Creature::CallAssistance()
@@ -2044,7 +2044,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(*itr);
if (!AdditionalSpellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.", GetGUIDLow(), GetEntry(), *itr);
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u Entry: %u) has wrong spell %u defined in `auras` field.", GetGUIDLow(), GetEntry(), *itr);
continue;
}
@@ -2052,13 +2052,13 @@ bool Creature::LoadCreaturesAddon(bool reload)
if (HasAura(*itr))
{
if (!reload)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.", GetDBTableGUIDLow(), GetEntry(), *itr);
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.", GetDBTableGUIDLow(), GetEntry(), *itr);
continue;
}
AddAura(*itr, this);
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Spell: %u added to creature (GUID: %u Entry: %u)", *itr, GetGUIDLow(), GetEntry());
+ TC_LOG_DEBUG("entities.unit", "Spell: %u added to creature (GUID: %u Entry: %u)", *itr, GetGUIDLow(), GetEntry());
}
}
@@ -2079,7 +2079,7 @@ void Creature::SetInCombatWithZone()
{
if (!CanHaveThreatList())
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry());
+ TC_LOG_ERROR("entities.unit", "Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry());
return;
}
@@ -2087,7 +2087,7 @@ void Creature::SetInCombatWithZone()
if (!map->IsDungeon())
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), map->GetId());
+ TC_LOG_ERROR("entities.unit", "Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), map->GetId());
return;
}
@@ -2141,8 +2141,8 @@ void Creature::AddCreatureSpellCooldown(uint32 spellid)
if (cooldown)
_AddCreatureSpellCooldown(spellid, time(NULL) + cooldown/IN_MILLISECONDS);
- if (spellInfo->Category)
- _AddCreatureCategoryCooldown(spellInfo->Category, time(NULL));
+ if (spellInfo->GetCategory())
+ _AddCreatureCategoryCooldown(spellInfo->GetCategory(), time(NULL));
}
bool Creature::HasCategoryCooldown(uint32 spell_id) const
@@ -2151,7 +2151,7 @@ bool Creature::HasCategoryCooldown(uint32 spell_id) const
if (!spellInfo)
return false;
- CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->Category);
+ CreatureSpellCooldowns::const_iterator itr = m_CreatureCategoryCooldowns.find(spellInfo->GetCategory());
return(itr != m_CreatureCategoryCooldowns.end() && time_t(itr->second + (spellInfo->CategoryRecoveryTime / IN_MILLISECONDS)) > time(NULL));
}
@@ -2185,7 +2185,7 @@ void Creature::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs
}
// Not send cooldown for this spells
- if (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (spellInfo->IsCooldownStartedOnEvent())
continue;
if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE)
@@ -2417,7 +2417,7 @@ void Creature::SetPosition(float x, float y, float z, float o)
// prevent crash when a bad coord is sent by the client
if (!Trinity::IsValidMapCoord(x, y, z, o))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Creature::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
+ TC_LOG_DEBUG("entities.unit", "Creature::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
return;
}
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 4f43305c54f..cab00be9446 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -246,7 +246,7 @@ typedef UNORDERED_MAP<uint32, EquipmentInfoContainerInternal> EquipmentInfoConta
// from `creature` table
struct CreatureData
{
- CreatureData() : dbData(true) {}
+ CreatureData() : dbData(true) { }
uint32 id; // entry in creature_template
uint16 mapid;
uint32 phaseMask;
@@ -325,7 +325,7 @@ typedef UNORDERED_MAP<uint32, CreatureAddon> CreatureAddonContainer;
struct VendorItem
{
VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
- : item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) {}
+ : item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) { }
uint32 item;
uint32 maxcount; // 0 for infinity item amount
@@ -367,7 +367,7 @@ struct VendorItemData
struct VendorItemCount
{
explicit VendorItemCount(uint32 _item, uint32 _count)
- : itemId(_item), count(_count), lastIncrementTime(time(NULL)) {}
+ : itemId(_item), count(_count), lastIncrementTime(time(NULL)) { }
uint32 itemId;
uint32 count;
@@ -399,7 +399,7 @@ typedef UNORDERED_MAP<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap;
struct TrainerSpellData
{
- TrainerSpellData() : trainerType(0) {}
+ TrainerSpellData() : trainerType(0) { }
~TrainerSpellData() { spellList.clear(); }
TrainerSpellMap spellList;
@@ -641,15 +641,15 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
void GetTransportHomePosition(float &x, float &y, float &z, float &ori) { m_transportHomePosition.GetPosition(x, y, z, ori); }
Position GetTransportHomePosition() { return m_transportHomePosition; }
- uint32 GetWaypointPath(){return m_path_id;}
+ uint32 GetWaypointPath() const { return m_path_id; }
void LoadPath(uint32 pathid) { m_path_id = pathid; }
uint32 GetCurrentWaypointID() const { return m_waypointID; }
void UpdateWaypointID(uint32 wpID) { m_waypointID = wpID; }
void SearchFormation();
- CreatureGroup* GetFormation() {return m_formation;}
- void SetFormation(CreatureGroup* formation) {m_formation = formation;}
+ CreatureGroup* GetFormation() { return m_formation; }
+ void SetFormation(CreatureGroup* formation) { m_formation = formation; }
Unit* SelectVictim();
@@ -667,9 +667,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
float m_SightDistance, m_CombatDistance;
- void SetGUIDTransport(uint32 guid) { guid_transport=guid; }
- uint32 GetGUIDTransport() { return guid_transport; }
-
void FarTeleportTo(Map* map, float X, float Y, float Z, float O);
bool m_isTempWorldObject; //true when possessed
@@ -724,10 +721,10 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
CreatureData const* m_creatureData;
uint16 m_LootMode; // Bitmask (default: LOOT_MODE_DEFAULT) that determines what loot will be lootable
- uint32 guid_transport;
bool IsInvisibleDueToDespawn() const;
bool CanAlwaysSee(WorldObject const* obj) const;
+
private:
void ForcedDespawn(uint32 timeMSToDespawn = 0);
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index 2a3829b7aeb..fc56fc011d4 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.cpp
+++ b/src/server/game/Entities/Creature/CreatureGroups.cpp
@@ -41,13 +41,13 @@ void FormationMgr::AddCreatureToGroup(uint32 groupId, Creature* member)
//Add member to an existing group
if (itr != map->CreatureGroupHolder.end())
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId());
+ TC_LOG_DEBUG("entities.unit", "Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId());
itr->second->AddMember(member);
}
//Create new group
else
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Group not found: %u. Creating new group.", groupId);
+ TC_LOG_DEBUG("entities.unit", "Group not found: %u. Creating new group.", groupId);
CreatureGroup* group = new CreatureGroup(groupId);
map->CreatureGroupHolder[groupId] = group;
group->AddMember(member);
@@ -56,7 +56,7 @@ void FormationMgr::AddCreatureToGroup(uint32 groupId, Creature* member)
void FormationMgr::RemoveCreatureFromGroup(CreatureGroup* group, Creature* member)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow());
+ TC_LOG_DEBUG("entities.unit", "Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow());
group->RemoveMember(member);
if (group->isEmpty())
@@ -65,7 +65,7 @@ void FormationMgr::RemoveCreatureFromGroup(CreatureGroup* group, Creature* membe
if (!map)
return;
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Deleting group with InstanceID %u", member->GetInstanceId());
+ TC_LOG_DEBUG("entities.unit", "Deleting group with InstanceID %u", member->GetInstanceId());
map->CreatureGroupHolder.erase(group->GetId());
delete group;
}
@@ -80,11 +80,11 @@ void FormationMgr::LoadCreatureFormations()
CreatureGroupMap.clear();
//Get group data
- QueryResult result = WorldDatabase.Query("SELECT leaderGUID, memberGUID, dist, angle, groupAI FROM creature_formations ORDER BY leaderGUID");
+ QueryResult result = WorldDatabase.Query("SELECT leaderGUID, memberGUID, dist, angle, groupAI, point_1, point_2 FROM creature_formations ORDER BY leaderGUID");
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
return;
}
@@ -101,6 +101,8 @@ void FormationMgr::LoadCreatureFormations()
group_member->leaderGUID = fields[0].GetUInt32();
uint32 memberGUID = fields[1].GetUInt32();
group_member->groupAI = fields[4].GetUInt32();
+ group_member->point_1 = fields[5].GetUInt16();
+ group_member->point_2 = fields[6].GetUInt16();
//If creature is group leader we may skip loading of dist/angle
if (group_member->leaderGUID != memberGUID)
{
@@ -117,14 +119,14 @@ void FormationMgr::LoadCreatureFormations()
{
if (!sObjectMgr->GetCreatureData(group_member->leaderGUID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "creature_formations table leader guid %u incorrect (not exist)", group_member->leaderGUID);
+ TC_LOG_ERROR("sql.sql", "creature_formations table leader guid %u incorrect (not exist)", group_member->leaderGUID);
delete group_member;
continue;
}
if (!sObjectMgr->GetCreatureData(memberGUID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "creature_formations table member guid %u incorrect (not exist)", memberGUID);
+ TC_LOG_ERROR("sql.sql", "creature_formations table member guid %u incorrect (not exist)", memberGUID);
delete group_member;
continue;
}
@@ -135,17 +137,17 @@ void FormationMgr::LoadCreatureFormations()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void CreatureGroup::AddMember(Creature* member)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
+ TC_LOG_DEBUG("entities.unit", "CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
//Check if it is a leader
if (member->GetDBTableGUIDLow() == m_groupID)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
+ TC_LOG_DEBUG("entities.unit", "Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
m_leader = member;
}
@@ -174,7 +176,7 @@ void CreatureGroup::MemberAttackStart(Creature* member, Unit* target)
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
if (m_leader) // avoid crash if leader was killed and reset.
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
+ TC_LOG_DEBUG("entities.unit", "GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
Creature* other = itr->first;
@@ -203,7 +205,7 @@ void CreatureGroup::FormationReset(bool dismiss)
itr->first->GetMotionMaster()->Initialize();
else
itr->first->GetMotionMaster()->MoveIdle();
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow());
+ TC_LOG_DEBUG("entities.unit", "Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow());
}
}
m_Formed = !dismiss;
@@ -224,6 +226,14 @@ void CreatureGroup::LeaderMoveTo(float x, float y, float z)
if (member == m_leader || !member->IsAlive() || member->GetVictim())
continue;
+ if (itr->second->point_1)
+ {
+ if (m_leader->GetCurrentWaypointID() == itr->second->point_1)
+ itr->second->follow_angle = (2 * M_PI) - itr->second->follow_angle;
+ if (m_leader->GetCurrentWaypointID() == itr->second->point_2)
+ itr->second->follow_angle = (2 * M_PI) + itr->second->follow_angle;
+ }
+
float angle = itr->second->follow_angle;
float dist = itr->second->follow_dist;
diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h
index fb5b823fbe9..ea115bd2efd 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.h
+++ b/src/server/game/Entities/Creature/CreatureGroups.h
@@ -32,6 +32,8 @@ struct FormationInfo
float follow_dist;
float follow_angle;
uint8 groupAI;
+ uint16 point_1;
+ uint16 point_2;
};
typedef UNORDERED_MAP<uint32/*memberDBGUID*/, FormationInfo*> CreatureGroupInfoType;
@@ -60,8 +62,8 @@ class CreatureGroup
public:
//Group cannot be created empty
- explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) {}
- ~CreatureGroup() {}
+ explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) { }
+ ~CreatureGroup() { }
Creature* getLeader() const { return m_leader; }
uint32 GetId() const { return m_groupID; }
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index e86935f49f8..84cd2d41c1f 100644
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -232,7 +232,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poiId) const
PointOfInterest const* poi = sObjectMgr->GetPointOfInterest(poiId);
if (!poi)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Request to send non-existing POI (Id: %u), ignored.", poiId);
+ TC_LOG_ERROR("sql.sql", "Request to send non-existing POI (Id: %u), ignored.", poiId);
return;
}
@@ -341,7 +341,7 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title
data.put<uint8>(count_pos, count);
_session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
}
void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID) const
@@ -351,7 +351,7 @@ void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID) const
data << uint8(questStatus);
_session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
}
void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, uint64 npcGUID, bool activateAccept) const
@@ -459,7 +459,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, uint64 npcGUID,
}
_session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), quest->GetQuestId());
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), quest->GetQuestId());
}
void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
@@ -596,7 +596,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
data << questObjectiveText[i];
_session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", quest->GetQuestId());
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", quest->GetQuestId());
}
void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, uint64 npcGUID, bool enableNext) const
@@ -690,7 +690,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, uint64 npcGUID, b
data << uint32(quest->RewardFactionValueIdOverride[i]);
_session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), quest->GetQuestId());
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), quest->GetQuestId());
}
void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, uint64 npcGUID, bool canComplete, bool closeOnCancel) const
@@ -767,7 +767,7 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, uint64 npcGUID,
data << uint32(0x10);
_session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), quest->GetQuestId());
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), quest->GetQuestId());
}
void PlayerMenu::AddQuestLevelToTitle(std::string &title, int32 level)
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index 05bedf907a0..9fee6b8237d 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -166,7 +166,7 @@ void TempSummon::Update(uint32 diff)
}
default:
UnSummon();
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Temporary summoned creature (entry: %u) have unknown type %u of ", GetEntry(), m_type);
+ TC_LOG_ERROR("entities.unit", "Temporary summoned creature (entry: %u) have unknown type %u of ", GetEntry(), m_type);
break;
}
}
@@ -274,7 +274,7 @@ void TempSummon::RemoveFromWorld()
owner->m_SummonSlot[slot] = 0;
//if (GetOwnerGUID())
- // TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit %u has owner guid when removed from world", GetEntry());
+ // TC_LOG_ERROR("entities.unit", "Unit %u has owner guid when removed from world", GetEntry());
Creature::RemoveFromWorld();
}
diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h
index 46f5c1300a4..03fcd4cd74d 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.h
+++ b/src/server/game/Entities/Creature/TemporarySummon.h
@@ -41,14 +41,14 @@ class TempSummon : public Creature
{
public:
explicit TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
- virtual ~TempSummon() {}
+ virtual ~TempSummon() { }
void Update(uint32 time);
virtual void InitStats(uint32 lifetime);
virtual void InitSummon();
virtual void UnSummon(uint32 msTime = 0);
void RemoveFromWorld();
void SetTempSummonType(TempSummonType type);
- void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) {}
+ void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) { }
Unit* GetSummoner() const;
Creature* GetSummonerCreatureBase() const;
uint64 GetSummonerGUID() const { return m_summonerGUID; }
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index 92eab703155..ec90ad7cb48 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -85,7 +85,7 @@ bool DynamicObject::CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spe
Relocate(pos);
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spellId, GetPositionX(), GetPositionY());
+ TC_LOG_ERROR("misc", "DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spellId, GetPositionX(), GetPositionY());
return false;
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 6d940623963..64e9d4a1c26 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -131,7 +131,7 @@ void GameObject::RemoveFromOwner()
else if (IS_PET_GUID(ownerGUID))
ownerType = "pet";
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "Removed GameObject (GUID: %u Entry: %u SpellId: %u LinkedGO: %u) that just lost any reference to the owner (GUID: %u Type: '%s') GO list",
+ TC_LOG_FATAL("misc", "Removed GameObject (GUID: %u Entry: %u SpellId: %u LinkedGO: %u) that just lost any reference to the owner (GUID: %u Type: '%s') GO list",
GetGUIDLow(), GetGOInfo()->entry, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), GUID_LOPART(ownerGUID), ownerType);
SetOwnerGUID(0);
}
@@ -182,7 +182,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
m_stationaryPosition.Relocate(x, y, z, ang);
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y);
+ TC_LOG_ERROR("misc", "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y);
return false;
}
@@ -199,7 +199,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(name_id);
if (!goinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry: %u) not created: non-existing entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f)", guidlow, name_id, map->GetId(), x, y, z);
+ TC_LOG_ERROR("sql.sql", "Gameobject (GUID: %u Entry: %u) not created: non-existing entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f)", guidlow, name_id, map->GetId(), x, y, z);
return false;
}
@@ -212,7 +212,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa
if (goinfo->type >= MAX_GAMEOBJECT_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry: %u) not created: non-existing GO type '%u' in `gameobject_template`. It will crash client if created.", guidlow, name_id, goinfo->type);
+ TC_LOG_ERROR("sql.sql", "Gameobject (GUID: %u Entry: %u) not created: non-existing GO type '%u' in `gameobject_template`. It will crash client if created.", guidlow, name_id, goinfo->type);
return false;
}
@@ -293,7 +293,7 @@ void GameObject::Update(uint32 diff)
if (AI())
AI()->UpdateAI(diff);
else if (!AIM_Initialize())
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Could not initialize GameObjectAI");
+ TC_LOG_ERROR("misc", "Could not initialize GameObjectAI");
switch (m_lootState)
{
@@ -340,7 +340,7 @@ void GameObject::Update(uint32 diff)
G3D::Vector3 src(GetPositionX(), GetPositionY(), GetPositionZ());
- sLog->outInfo(LOG_FILTER_GENERAL, "Src: %s Dest: %s", src.toString().c_str(), pos.toString().c_str());
+ TC_LOG_INFO("misc", "Src: %s Dest: %s", src.toString().c_str(), pos.toString().c_str());
GetMap()->GameObjectRelocation(this, pos.x, pos.y, pos.z, GetOrientation());
}
@@ -701,7 +701,7 @@ void GameObject::SaveToDB()
GameObjectData const* data = sObjectMgr->GetGOData(m_DBTableGuid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "GameObject::SaveToDB failed, cannot get gameobject data!");
+ TC_LOG_ERROR("misc", "GameObject::SaveToDB failed, cannot get gameobject data!");
return;
}
@@ -775,7 +775,7 @@ bool GameObject::LoadGameObjectFromDB(uint32 guid, Map* map, bool addToMap)
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (GUID: %u) not found in table `gameobject`, can't load. ", guid);
+ TC_LOG_ERROR("sql.sql", "Gameobject (GUID: %u) not found in table `gameobject`, can't load. ", guid);
return false;
}
@@ -1283,7 +1283,7 @@ void GameObject::Use(Unit* user)
if (info->goober.eventId)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPSCRIPTS, "Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow());
+ TC_LOG_DEBUG("maps.script", "Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow());
GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this);
EventInform(info->goober.eventId);
}
@@ -1364,7 +1364,7 @@ void GameObject::Use(Unit* user)
//provide error, no fishable zone or area should be 0
if (!zone_skill)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Fishable areaId %u are not properly defined in `skill_fishing_base_level`.", subzone);
+ TC_LOG_ERROR("sql.sql", "Fishable areaId %u are not properly defined in `skill_fishing_base_level`.", subzone);
int32 skill = player->GetSkillValue(SKILL_FISHING);
@@ -1380,7 +1380,7 @@ void GameObject::Use(Unit* user)
int32 roll = irand(1, 100);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Fishing check (skill: %i zone min skill: %i chance %i roll: %i", skill, zone_skill, chance, roll);
+ TC_LOG_DEBUG("misc", "Fishing check (skill: %i zone min skill: %i chance %i roll: %i", skill, zone_skill, chance, roll);
// but you will likely cause junk in areas that require a high fishing skill (not yet implemented)
if (chance >= roll)
@@ -1685,7 +1685,7 @@ void GameObject::Use(Unit* user)
}
default:
if (GetGoType() >= MAX_GAMEOBJECT_TYPE)
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "GameObject::Use(): unit (type: %u, guid: %u, name: %s) tries to use object (guid: %u, entry: %u, name: %s) of unknown type (%u)",
+ TC_LOG_ERROR("misc", "GameObject::Use(): unit (type: %u, guid: %u, name: %s) tries to use object (guid: %u, entry: %u, name: %s) of unknown type (%u)",
user->GetTypeId(), user->GetGUIDLow(), user->GetName().c_str(), GetGUIDLow(), GetEntry(), GetGOInfo()->name.c_str(), GetGoType());
break;
}
@@ -1697,9 +1697,9 @@ void GameObject::Use(Unit* user)
if (!spellInfo)
{
if (user->GetTypeId() != TYPEID_PLAYER || !sOutdoorPvPMgr->HandleCustomSpell(user->ToPlayer(), spellId, this))
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId, GetEntry(), GetGoType());
+ TC_LOG_ERROR("misc", "WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId, GetEntry(), GetGoType());
else
- TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId);
+ TC_LOG_DEBUG("outdoorpvp", "WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId);
return;
}
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index de92257893b..27ea15c38ff 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -589,7 +589,7 @@ enum GOState
// from `gameobject`
struct GameObjectData
{
- explicit GameObjectData() : dbData(true) {}
+ explicit GameObjectData() : dbData(true) { }
uint32 id; // entry in gamobject_template
uint16 mapid;
uint32 phaseMask;
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index 5d7aa72a59b..56c29c1d1c7 100644
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -42,7 +42,7 @@ Bag::~Bag()
{
if (item->IsInWorld())
{
- TC_LOG_FATAL(LOG_FILTER_PLAYER_ITEMS, "Item %u (slot %u, bag slot %u) in bag %u (slot %u, bag slot %u, m_bagslot %u) is to be deleted but is still in world.",
+ TC_LOG_FATAL("entities.player.items", "Item %u (slot %u, bag slot %u) in bag %u (slot %u, bag slot %u, m_bagslot %u) is to be deleted but is still in world.",
item->GetEntry(), (uint32)item->GetSlot(), (uint32)item->GetBagSlot(),
GetEntry(), (uint32)GetSlot(), (uint32)GetBagSlot(), (uint32)i);
item->RemoveFromWorld();
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index a0b6fdafb06..747884e197c 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -38,7 +38,7 @@ void AddItemsSetItem(Player* player, Item* item)
if (!set)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item set %u for item (id %u) not found, mods not applied.", setid, proto->ItemId);
+ TC_LOG_ERROR("sql.sql", "Item set %u for item (id %u) not found, mods not applied.", setid, proto->ItemId);
return;
}
@@ -98,7 +98,7 @@ void AddItemsSetItem(Player* player, Item* item)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(set->spells[x]);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_ITEMS, "WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid);
+ TC_LOG_ERROR("entities.player.items", "WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid);
break;
}
@@ -119,7 +119,7 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const* proto)
if (!set)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item set #%u for item #%u not found, mods not removed.", setid, proto->ItemId);
+ TC_LOG_ERROR("sql.sql", "Item set #%u for item #%u not found, mods not removed.", setid, proto->ItemId);
return;
}
@@ -295,7 +295,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff)
if (!GetUInt32Value(ITEM_FIELD_DURATION))
return;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)", GetEntry(), GetUInt32Value(ITEM_FIELD_DURATION), diff);
+ TC_LOG_DEBUG("entities.player.items", "Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)", GetEntry(), GetUInt32Value(ITEM_FIELD_DURATION), diff);
if (GetUInt32Value(ITEM_FIELD_DURATION) <= diff)
{
@@ -607,7 +607,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
// item can have not null only one from field values
if ((itemProto->RandomProperty) && (itemProto->RandomSuffix))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item template %u have RandomProperty == %u and RandomSuffix == %u, but must have one from field =0", itemProto->ItemId, itemProto->RandomProperty, itemProto->RandomSuffix);
+ TC_LOG_ERROR("sql.sql", "Item template %u have RandomProperty == %u and RandomSuffix == %u, but must have one from field =0", itemProto->ItemId, itemProto->RandomProperty, itemProto->RandomSuffix);
return 0;
}
@@ -618,7 +618,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
ItemRandomPropertiesEntry const* random_id = sItemRandomPropertiesStore.LookupEntry(randomPropId);
if (!random_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'", randomPropId);
+ TC_LOG_ERROR("sql.sql", "Enchantment id #%u used but it doesn't have records in 'ItemRandomProperties.dbc'", randomPropId);
return 0;
}
@@ -631,7 +631,7 @@ int32 Item::GenerateItemRandomPropertyId(uint32 item_id)
ItemRandomSuffixEntry const* random_id = sItemRandomSuffixStore.LookupEntry(randomPropId);
if (!random_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.", randomPropId);
+ TC_LOG_ERROR("sql.sql", "Enchantment id #%u used but it doesn't have records in sItemRandomSuffixStore.", randomPropId);
return 0;
}
@@ -721,7 +721,7 @@ void Item::AddToUpdateQueueOf(Player* player)
if (player->GetGUID() != GetOwnerGUID())
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item::AddToUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.items", "Item::AddToUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
return;
}
@@ -741,7 +741,7 @@ void Item::RemoveFromUpdateQueueOf(Player* player)
if (player->GetGUID() != GetOwnerGUID())
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item::RemoveFromUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.items", "Item::RemoveFromUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow());
return;
}
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index ba9604fcd52..527329a9d61 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -33,10 +33,10 @@ struct EnchStoreItem
float chance;
EnchStoreItem()
- : ench(0), chance(0) {}
+ : ench(0), chance(0) { }
EnchStoreItem(uint32 _ench, float _chance)
- : ench(_ench), chance(_chance) {}
+ : ench(_ench), chance(_chance) { }
};
typedef std::vector<EnchStoreItem> EnchStoreList;
@@ -71,10 +71,10 @@ void LoadRandomEnchantmentsTable()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
}
uint32 GetItemEnchantMod(int32 entry)
@@ -88,7 +88,7 @@ uint32 GetItemEnchantMod(int32 entry)
EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry);
if (tab == RandomItemEnch.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.", entry);
+ TC_LOG_ERROR("sql.sql", "Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.", entry);
return 0;
}
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 1471e966045..675504cd668 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -91,7 +91,7 @@ WorldObject::~WorldObject()
{
if (GetTypeId() == TYPEID_CORPSE)
{
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "Object::~Object Corpse guid=" UI64FMTD ", type=%d, entry=%u deleted but still in map!!",
+ TC_LOG_FATAL("misc", "Object::~Object Corpse guid=" UI64FMTD ", type=%d, entry=%u deleted but still in map!!",
GetGUID(), ((Corpse*)this)->GetType(), GetEntry());
ASSERT(false);
}
@@ -103,16 +103,16 @@ Object::~Object()
{
if (IsInWorld())
{
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry());
+ TC_LOG_FATAL("misc", "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry());
if (isType(TYPEMASK_ITEM))
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "Item slot %u", ((Item*)this)->GetSlot());
+ TC_LOG_FATAL("misc", "Item slot %u", ((Item*)this)->GetSlot());
ASSERT(false);
RemoveFromWorld();
}
if (m_objectUpdated)
{
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry());
+ TC_LOG_FATAL("misc", "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry());
ASSERT(false);
sObjectAccessor->RemoveUpdateObject(this);
}
@@ -737,7 +737,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value)
if (offset > 4)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::SetByteValue: wrong offset %u", offset);
+ TC_LOG_ERROR("misc", "Object::SetByteValue: wrong offset %u", offset);
return;
}
@@ -761,7 +761,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value)
if (offset > 2)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::SetUInt16Value: wrong offset %u", offset);
+ TC_LOG_ERROR("misc", "Object::SetUInt16Value: wrong offset %u", offset);
return;
}
@@ -901,7 +901,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
if (offset > 4)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::SetByteFlag: wrong offset %u", offset);
+ TC_LOG_ERROR("misc", "Object::SetByteFlag: wrong offset %u", offset);
return;
}
@@ -924,7 +924,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
if (offset > 4)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::RemoveByteFlag: wrong offset %u", offset);
+ TC_LOG_ERROR("misc", "Object::RemoveByteFlag: wrong offset %u", offset);
return;
}
@@ -991,7 +991,7 @@ void Object::ApplyModFlag64(uint16 index, uint64 flag, bool apply)
bool Object::PrintIndexError(uint32 index, bool set) const
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u", (set ? "set value to" : "get value from"), index, m_valuesCount, GetTypeId(), m_objectType);
+ TC_LOG_ERROR("misc", "Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u", (set ? "set value to" : "get value from"), index, m_valuesCount, GetTypeId(), m_objectType);
// ASSERT must fail after function call
return false;
@@ -1054,32 +1054,32 @@ ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& st
void MovementInfo::OutDebug()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "MOVEMENT INFO");
- TC_LOG_INFO(LOG_FILTER_GENERAL, "guid " UI64FMTD, guid);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "flags %u", flags);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "flags2 %u", flags2);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "time %u current time " UI64FMTD "", flags2, uint64(::time(NULL)));
- TC_LOG_INFO(LOG_FILTER_GENERAL, "position: `%s`", pos.ToString().c_str());
+ TC_LOG_INFO("misc", "MOVEMENT INFO");
+ TC_LOG_INFO("misc", "guid " UI64FMTD, guid);
+ TC_LOG_INFO("misc", "flags %u", flags);
+ TC_LOG_INFO("misc", "flags2 %u", flags2);
+ TC_LOG_INFO("misc", "time %u current time " UI64FMTD "", flags2, uint64(::time(NULL)));
+ TC_LOG_INFO("misc", "position: `%s`", pos.ToString().c_str());
if (flags & MOVEMENTFLAG_ONTRANSPORT)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "TRANSPORT:");
- TC_LOG_INFO(LOG_FILTER_GENERAL, "guid: " UI64FMTD, transport.guid);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "position: `%s`", transport.pos.ToString().c_str());
- TC_LOG_INFO(LOG_FILTER_GENERAL, "seat: %i", transport.seat);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "time: %u", transport.time);
+ TC_LOG_INFO("misc", "TRANSPORT:");
+ TC_LOG_INFO("misc", "guid: " UI64FMTD, transport.guid);
+ TC_LOG_INFO("misc", "position: `%s`", transport.pos.ToString().c_str());
+ TC_LOG_INFO("misc", "seat: %i", transport.seat);
+ TC_LOG_INFO("misc", "time: %u", transport.time);
if (flags2 & MOVEMENTFLAG2_INTERPOLATED_MOVEMENT)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "time2: %u", transport.time2);
+ TC_LOG_INFO("misc", "time2: %u", transport.time2);
}
if ((flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (flags2 & MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))
- TC_LOG_INFO(LOG_FILTER_GENERAL, "pitch: %f", pitch);
+ TC_LOG_INFO("misc", "pitch: %f", pitch);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "fallTime: %u", fallTime);
+ TC_LOG_INFO("misc", "fallTime: %u", fallTime);
if (flags & MOVEMENTFLAG_FALLING)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed);
+ TC_LOG_INFO("misc", "j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed);
if (flags & MOVEMENTFLAG_SPLINE_ELEVATION)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "splineElevation: %f", splineElevation);
+ TC_LOG_INFO("misc", "splineElevation: %f", splineElevation);
}
WorldObject::WorldObject(bool isWorldObject): WorldLocation(),
@@ -1881,7 +1881,7 @@ namespace Trinity
{
public:
MonsterChatBuilder(WorldObject const& obj, ChatMsg msgtype, int32 textId, uint32 language, uint64 targetGUID)
- : i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {}
+ : i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx);
@@ -1902,7 +1902,7 @@ namespace Trinity
{
public:
MonsterCustomChatBuilder(WorldObject const& obj, ChatMsg msgtype, const char* text, uint32 language, uint64 targetGUID)
- : i_object(obj), i_msgtype(msgtype), i_text(text), i_language(language), i_targetGUID(targetGUID) {}
+ : i_object(obj), i_msgtype(msgtype), i_text(text), i_language(language), i_targetGUID(targetGUID) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
/// @todo i_object.GetName() also must be localized?
@@ -2096,7 +2096,7 @@ void WorldObject::SetMap(Map* map)
return;
if (m_currMap)
{
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId());
+ TC_LOG_FATAL("misc", "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId());
ASSERT(false);
}
m_currMap = map;
@@ -2131,7 +2131,7 @@ void WorldObject::AddObjectToRemoveList()
Map* map = FindMap();
if (!map)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).", GetTypeId(), GetEntry(), GetGUIDLow(), GetMapId());
+ TC_LOG_ERROR("misc", "Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).", GetTypeId(), GetEntry(), GetGUIDLow(), GetMapId());
return;
}
@@ -2305,7 +2305,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
if (!goinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject template %u not found in database!", entry);
+ TC_LOG_ERROR("sql.sql", "Gameobject template %u not found in database!", entry);
return NULL;
}
@@ -2426,10 +2426,10 @@ namespace Trinity
{
public:
NearUsedPosDo(WorldObject const& obj, WorldObject const* searcher, float angle, ObjectPosSelector& selector)
- : i_object(obj), i_searcher(searcher), i_angle(angle), i_selector(selector) {}
+ : i_object(obj), i_searcher(searcher), i_angle(angle), i_selector(selector) { }
- void operator()(Corpse*) const {}
- void operator()(DynamicObject*) const {}
+ void operator()(Corpse*) const { }
+ void operator()(DynamicObject*) const { }
void operator()(Creature* c) const
{
@@ -2673,7 +2673,7 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle)
// Prevent invalid coordinates here, position is unchanged
if (!Trinity::IsValidMapCoord(destx, desty, pos.m_positionZ))
{
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::MovePosition: Object (TypeId: %u Entry: %u GUID: %u) has invalid coordinates X: %f and Y: %f were passed!",
+ TC_LOG_FATAL("misc", "WorldObject::MovePosition: Object (TypeId: %u Entry: %u GUID: %u) has invalid coordinates X: %f and Y: %f were passed!",
GetTypeId(), GetEntry(), GetGUIDLow(), destx, desty);
return;
}
@@ -2720,7 +2720,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float
// Prevent invalid coordinates here, position is unchanged
if (!Trinity::IsValidMapCoord(destx, desty))
{
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::MovePositionToFirstCollision invalid coordinates X: %f and Y: %f were passed!", destx, desty);
+ TC_LOG_FATAL("misc", "WorldObject::MovePositionToFirstCollision invalid coordinates X: %f and Y: %f were passed!", destx, desty);
return;
}
@@ -2850,7 +2850,7 @@ struct WorldObjectChangeAccumulator
UpdateDataMapType& i_updateDatas;
WorldObject& i_object;
std::set<uint64> plr_list;
- WorldObjectChangeAccumulator(WorldObject &obj, UpdateDataMapType &d) : i_updateDatas(d), i_object(obj) {}
+ WorldObjectChangeAccumulator(WorldObject &obj, UpdateDataMapType &d) : i_updateDatas(d), i_object(obj) { }
void Visit(PlayerMapType &m)
{
Player* source = NULL;
@@ -2912,7 +2912,7 @@ struct WorldObjectChangeAccumulator
}
}
- template<class SKIP> void Visit(GridRefManager<SKIP> &) {}
+ template<class SKIP> void Visit(GridRefManager<SKIP> &) { }
};
void WorldObject::BuildUpdate(UpdateDataMapType& data_map)
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index 3e010fa98a2..f03b95d0cc7 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -200,7 +200,7 @@ class Object
virtual bool hasQuest(uint32 /* quest_id */) const { return false; }
virtual bool hasInvolvedQuest(uint32 /* quest_id */) const { return false; }
- virtual void BuildUpdate(UpdateDataMapType&) {}
+ virtual void BuildUpdate(UpdateDataMapType&) { }
void BuildFieldsUpdate(Player*, UpdateDataMapType &) const;
void SetFieldNotifyFlag(uint16 flag) { _fieldNotifyFlags |= flag; }
@@ -275,13 +275,13 @@ struct Position
{
struct PositionXYZStreamer
{
- explicit PositionXYZStreamer(Position& pos) : m_pos(&pos) {}
+ explicit PositionXYZStreamer(Position& pos) : m_pos(&pos) { }
Position* m_pos;
};
struct PositionXYZOStreamer
{
- explicit PositionXYZOStreamer(Position& pos) : m_pos(&pos) {}
+ explicit PositionXYZOStreamer(Position& pos) : m_pos(&pos) { }
Position* m_pos;
};
@@ -536,7 +536,7 @@ class MapObject
friend class ObjectGridLoader; //grid loader for loading creatures
protected:
- MapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) {}
+ MapObject() : _moveState(MAP_OBJECT_CELL_MOVE_NONE) { }
private:
Cell _currentCell;
@@ -650,7 +650,7 @@ class WorldObject : public Object, public WorldLocation
void SendObjectDeSpawnAnim(uint64 guid);
- virtual void SaveRespawnTime() {}
+ virtual void SaveRespawnTime() { }
void AddObjectToRemoveList();
float GetGridActivationRange() const;
@@ -789,7 +789,7 @@ namespace Trinity
class ObjectDistanceOrderPred
{
public:
- ObjectDistanceOrderPred(WorldObject const* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) {}
+ ObjectDistanceOrderPred(WorldObject const* pRefObj, bool ascending = true) : m_refObj(pRefObj), m_ascending(ascending) { }
bool operator()(WorldObject const* pLeft, WorldObject const* pRight) const
{
return m_ascending ? m_refObj->GetDistanceOrder(pLeft, pRight) : !m_refObj->GetDistanceOrder(pLeft, pRight);
diff --git a/src/server/game/Entities/Object/ObjectPosSelector.h b/src/server/game/Entities/Object/ObjectPosSelector.h
index d381fb5627e..d3f43654969 100644
--- a/src/server/game/Entities/Object/ObjectPosSelector.h
+++ b/src/server/game/Entities/Object/ObjectPosSelector.h
@@ -34,7 +34,7 @@ struct ObjectPosSelector
{
struct UsedPos
{
- UsedPos(float sign_, float size_, float dist_) : sign(sign_), size(size_), dist(dist_) {}
+ UsedPos(float sign_, float size_, float dist_) : sign(sign_), size(size_), dist(dist_) { }
float sign;
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index ba4a4070e63..be04a38c2d0 100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
@@ -25,9 +25,7 @@
#include "World.h"
#include "zlib.h"
-UpdateData::UpdateData() : m_blockCount(0)
-{
-}
+UpdateData::UpdateData() : m_blockCount(0) { }
void UpdateData::AddOutOfRangeGUID(std::set<uint64>& guids)
{
@@ -57,7 +55,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
int z_res = deflateInit(&c_stream, sWorld->getIntConfig(CONFIG_COMPRESSION));
if (z_res != Z_OK)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res));
+ TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
@@ -70,14 +68,14 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
z_res = deflate(&c_stream, Z_NO_FLUSH);
if (z_res != Z_OK)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res));
+ TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
if (c_stream.avail_in != 0)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate not greedy)");
+ TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflate not greedy)");
*dst_size = 0;
return;
}
@@ -85,7 +83,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
z_res = deflate(&c_stream, Z_FINISH);
if (z_res != Z_STREAM_END)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res));
+ TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
@@ -93,7 +91,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
z_res = deflateEnd(&c_stream);
if (z_res != Z_OK)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res));
+ TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 9758564c8f2..b019cd7e423 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -178,17 +178,6 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
if (!Create(guid, map, owner->GetPhaseMask(), petEntry, petId))
return false;
- float px, py, pz;
- owner->GetClosePoint(px, py, pz, GetObjectSize(), PET_FOLLOW_DIST, GetFollowAngle());
- Relocate(px, py, pz, owner->GetOrientation());
-
- if (!IsPositionValid())
- {
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
- GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
- return false;
- }
-
setPetType(petType);
setFaction(owner->getFaction());
SetUInt32Value(UNIT_CREATED_BY_SPELL, summonSpellId);
@@ -196,6 +185,17 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
CreatureTemplate const* cinfo = GetCreatureTemplate();
if (cinfo->type == CREATURE_TYPE_CRITTER)
{
+ float px, py, pz;
+ owner->GetClosePoint(px, py, pz, GetObjectSize(), PET_FOLLOW_DIST, GetFollowAngle());
+ Relocate(px, py, pz, owner->GetOrientation());
+
+ if (!IsPositionValid())
+ {
+ TC_LOG_ERROR("entities.pet", "Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
+ GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
+ return false;
+ }
+
map->AddToMap(this->ToCreature());
return true;
}
@@ -230,7 +230,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
break;
default:
if (!IsPetGhoul())
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet have incorrect type (%u) for pet loading.", getPetType());
+ TC_LOG_ERROR("entities.pet", "Pet have incorrect type (%u) for pet loading.", getPetType());
break;
}
@@ -242,6 +242,17 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
SynchronizeLevelWithOwner();
+ // Set pet's position after setting level, its size depends on it
+ float px, py, pz;
+ owner->GetClosePoint(px, py, pz, GetObjectSize(), PET_FOLLOW_DIST, GetFollowAngle());
+ Relocate(px, py, pz, owner->GetOrientation());
+ if (!IsPositionValid())
+ {
+ TC_LOG_ERROR("entities.pet", "Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
+ GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
+ return false;
+ }
+
SetReactState(ReactStates(fields[6].GetUInt8()));
SetCanModifyStats(true);
@@ -322,7 +333,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
CleanupActionBar(); // remove unknown spells from action bar after load
- TC_LOG_DEBUG(LOG_FILTER_PETS, "New Pet has guid %u", GetGUIDLow());
+ TC_LOG_DEBUG("entities.pet", "New Pet has guid %u", GetGUIDLow());
owner->PetSpellInitialize();
@@ -563,7 +574,7 @@ void Pet::Update(uint32 diff)
{
if (owner->GetPetGUID() != GetGUID())
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet %u is not pet of owner %s, removed", GetEntry(), GetOwner()->GetName().c_str());
+ TC_LOG_ERROR("entities.pet", "Pet %u is not pet of owner %s, removed", GetEntry(), GetOwner()->GetName().c_str());
Remove(getPetType() == HUNTER_PET?PET_SAVE_AS_DELETED:PET_SAVE_NOT_IN_SLOT);
return;
}
@@ -761,7 +772,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
+ TC_LOG_ERROR("entities.pet", "Pet (guidlow %d, entry %d) not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY());
return false;
}
@@ -769,7 +780,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
CreatureTemplate const* cinfo = GetCreatureTemplate();
if (!cinfo)
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "CreateBaseAtCreature() failed, creatureInfo is missing!");
+ TC_LOG_ERROR("entities.pet", "CreateBaseAtCreature() failed, creatureInfo is missing!");
return false;
}
@@ -798,7 +809,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner)
bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask)
{
- TC_LOG_DEBUG(LOG_FILTER_PETS, "Pet::CreateBaseForTamed");
+ TC_LOG_DEBUG("entities.pet", "Pet::CreateBaseForTamed");
uint32 guid=sObjectMgr->GenerateLowGuid(HIGHGUID_PET);
uint32 petId = sObjectMgr->GeneratePetNumber();
if (!Create(guid, map, phaseMask, cinfo->Entry, petId))
@@ -847,7 +858,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "Unknown type pet %u is summoned by player class %u",
+ TC_LOG_ERROR("entities.pet", "Unknown type pet %u is summoned by player class %u",
GetEntry(), GetOwner()->getClass());
}
}
@@ -1124,7 +1135,7 @@ void Pet::_LoadSpellCooldowns()
if (!sSpellMgr->GetSpellInfo(spell_id))
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.", m_charmInfo->GetPetNumber(), spell_id);
+ TC_LOG_ERROR("entities.pet", "Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.", m_charmInfo->GetPetNumber(), spell_id);
continue;
}
@@ -1137,7 +1148,7 @@ void Pet::_LoadSpellCooldowns()
_AddCreatureSpellCooldown(spell_id, db_time);
- TC_LOG_DEBUG(LOG_FILTER_PETS, "Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime));
+ TC_LOG_DEBUG("entities.pet", "Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime));
}
while (result->NextRow());
@@ -1241,7 +1252,7 @@ void Pet::_SaveSpells(SQLTransaction& trans)
void Pet::_LoadAuras(uint32 timediff)
{
- TC_LOG_DEBUG(LOG_FILTER_PETS, "Loading auras for pet %u", GetGUIDLow());
+ TC_LOG_DEBUG("entities.pet", "Loading auras for pet %u", GetGUIDLow());
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_AURA);
stmt->setUInt32(0, m_charmInfo->GetPetNumber());
@@ -1275,7 +1286,7 @@ void Pet::_LoadAuras(uint32 timediff)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "Unknown aura (spellid %u), ignore.", spellid);
+ TC_LOG_ERROR("entities.pet", "Unknown aura (spellid %u), ignore.", spellid);
continue;
}
@@ -1306,7 +1317,7 @@ void Pet::_LoadAuras(uint32 timediff)
}
aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, &damage[0]);
aura->ApplyForTargets();
- TC_LOG_INFO(LOG_FILTER_PETS, "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
+ TC_LOG_INFO("entities.pet", "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
}
}
while (result->NextRow());
@@ -1382,7 +1393,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel
// do pet spell book cleanup
if (state == PETSPELL_UNCHANGED) // spell load case
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.", spellId);
+ TC_LOG_ERROR("entities.pet", "Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.", spellId);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_PET_SPELL);
@@ -1391,7 +1402,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel
CharacterDatabase.Execute(stmt);
}
else
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
+ TC_LOG_ERROR("entities.pet", "Pet::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
return false;
}
@@ -2056,7 +2067,7 @@ void Pet::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
}
// Not send cooldown for this spells
- if (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (spellInfo->IsCooldownStartedOnEvent())
continue;
if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE)
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index eaee6dc090a..c61621f3a91 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -943,7 +943,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(createInfo->Race, createInfo->Class);
if (!info)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid race/class pair (%u/%u) - refusing to do so.",
+ TC_LOG_ERROR("entities.player", "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid race/class pair (%u/%u) - refusing to do so.",
GetSession()->GetAccountId(), m_name.c_str(), createInfo->Race, createInfo->Class);
return false;
}
@@ -956,7 +956,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(createInfo->Class);
if (!cEntry)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid character class (%u) - refusing to do so (wrong DBC-files?)",
+ TC_LOG_ERROR("entities.player", "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid character class (%u) - refusing to do so (wrong DBC-files?)",
GetSession()->GetAccountId(), m_name.c_str(), createInfo->Class);
return false;
}
@@ -971,7 +971,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
if (!IsValidGender(createInfo->Gender))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid gender (%u) - refusing to do so",
+ TC_LOG_ERROR("entities.player", "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid gender (%u) - refusing to do so",
GetSession()->GetAccountId(), m_name.c_str(), createInfo->Gender);
return false;
}
@@ -1198,7 +1198,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: Creating initial item, itemId = %u, count = %u", titem_id, titem_amount);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: Creating initial item, itemId = %u, count = %u", titem_id, titem_amount);
// attempt equip by one
while (titem_amount > 0)
@@ -1227,7 +1227,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
}
// item can't be added
- TC_LOG_ERROR(LOG_FILTER_PLAYER_ITEMS, "STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg);
+ TC_LOG_ERROR("entities.player.items", "STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(), getClass(), msg);
return false;
}
@@ -1294,7 +1294,7 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
{
if (type == DAMAGE_FALL) // DealDamage not apply item durability loss at self damage
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "We are fall to death, loosing 10 percents durability");
+ TC_LOG_DEBUG("entities.player", "We are fall to death, loosing 10 percents durability");
DurabilityLossAll(0.10f, false);
// durability lost message
WorldPacket data2(SMSG_DURABILITY_DAMAGE_DEATH, 0);
@@ -1544,9 +1544,9 @@ void Player::Update(uint32 p_time)
//ASSERT (!m_spellModTakingSpell);
if (m_spellModTakingSpell)
{
- //TC_LOG_FATAL(LOG_FILTER_PLAYER, "Player has m_pad %u during update!", m_pad);
+ //TC_LOG_FATAL("entities.player", "Player has m_pad %u during update!", m_pad);
//if (m_spellModTakingSpell)
- TC_LOG_FATAL(LOG_FILTER_SPELLS_AURAS, "Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id);
+ TC_LOG_FATAL("spells", "Player has m_spellModTakingSpell %u during update!", m_spellModTakingSpell->m_spellInfo->Id);
m_spellModTakingSpell = NULL;
}
@@ -1756,7 +1756,7 @@ void Player::Update(uint32 p_time)
// m_nextSave reset in SaveToDB call
sScriptMgr->OnPlayerSave(this);
SaveToDB();
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Player '%s' (GUID: %u) saved", GetName().c_str(), GetGUIDLow());
+ TC_LOG_DEBUG("entities.player", "Player '%s' (GUID: %u) saved", GetName().c_str(), GetGUIDLow());
}
else
m_nextSave -= p_time;
@@ -1845,7 +1845,7 @@ void Player::setDeathState(DeathState s)
{
if (!cur)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "setDeathState: attempt to kill a dead player %s(%d)", GetName().c_str(), GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "setDeathState: attempt to kill a dead player %s(%d)", GetName().c_str(), GetGUIDLow());
return;
}
@@ -1912,12 +1912,12 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(plrRace, plrClass);
if (!info)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_LOADING, "Player %u has incorrect race/class pair. Don't build enum.", guid);
+ TC_LOG_ERROR("entities.player.loading", "Player %u has incorrect race/class pair. Don't build enum.", guid);
return false;
}
else if (!IsValidGender(gender))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_LOADING, "Player (%u) has incorrect gender (%u), don't build enum.", guid, gender);
+ TC_LOG_ERROR("entities.player.loading", "Player (%u) has incorrect gender (%u), don't build enum.", guid, gender);
return false;
}
@@ -2084,14 +2084,14 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
{
if (!MapManager::IsValidMapCoord(mapid, x, y, z, orientation))
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (GUID: %u, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
+ TC_LOG_ERROR("maps", "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (GUID: %u, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
mapid, x, y, z, orientation, GetGUIDLow(), GetName().c_str(), GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
return false;
}
if (!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_DISABLE_MAP) && DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, mapid, this))
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Player (GUID: %u, name: %s) tried to enter a forbidden map %u", GetGUIDLow(), GetName().c_str(), mapid);
+ TC_LOG_ERROR("maps", "Player (GUID: %u, name: %s) tried to enter a forbidden map %u", GetGUIDLow(), GetName().c_str(), mapid);
SendTransferAborted(mapid, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
}
@@ -2109,7 +2109,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// client without expansion support
if (GetSession()->Expansion() < mEntry->Expansion())
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Player %s using client without required expansion tried teleport to non accessible map %u", GetName().c_str(), mapid);
+ TC_LOG_DEBUG("maps", "Player %s using client without required expansion tried teleport to non accessible map %u", GetName().c_str(), mapid);
if (GetTransport())
{
@@ -2124,7 +2124,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
return false; // normal client can't teleport to this map...
}
else
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Player %s is being teleported to map %u", GetName().c_str(), mapid);
+ TC_LOG_DEBUG("maps", "Player %s is being teleported to map %u", GetName().c_str(), mapid);
if (m_vehicle)
ExitVehicle();
@@ -2178,26 +2178,8 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (!(options & TELE_TO_NOT_LEAVE_COMBAT))
CombatStop();
- // new final coordinates
- float final_x = x;
- float final_y = y;
- float final_z = z;
- float final_o = orientation;
-
- // Calculate final positions if on transport
- if (m_transport)
- {
- float tx, ty, tz, to;
- m_movementInfo.transport.pos.GetPosition(tx, ty, tz, to);
-
- final_x = x + tx * std::cos(orientation) - ty * std::sin(orientation);
- final_y = y + ty * std::cos(orientation) + tx * std::sin(orientation);
- final_z = z + tz;
- final_o = Position::NormalizeOrientation(orientation + m_movementInfo.transport.pos.GetOrientation());
- }
-
// this will be used instead of the current location in SaveToDB
- m_teleport_dest = WorldLocation(mapid, final_x, final_y, final_z, final_o);
+ m_teleport_dest = WorldLocation(mapid, x, y, z, orientation);
SetFallInformation(0, z);
// code for finish transfer called in WorldSession::HandleMovementOpcodes()
@@ -2208,7 +2190,9 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
{
Position oldPos;
GetPosition(&oldPos);
- Relocate(final_x, final_y, final_z, final_o);
+ if (HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
+ z += GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
+ Relocate(x, y, z, orientation);
SendTeleportAckPacket();
SendTeleportPacket(oldPos); // this automatically relocates to oldPos in order to broadcast the packet in the right place
}
@@ -2304,25 +2288,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (oldmap)
oldmap->RemovePlayerFromMap(this, false);
- // new final coordinates
- float final_x = x;
- float final_y = y;
- float final_z = z;
- float final_o = orientation;
-
- // Calculate final positions if on transport
- if (m_transport)
- {
- float tx, ty, tz, to;
- m_movementInfo.transport.pos.GetPosition(tx, ty, tz, to);
-
- final_x = x + tx * std::cos(orientation) - ty * std::sin(orientation);
- final_y = y + ty * std::cos(orientation) + tx * std::sin(orientation);
- final_z = z + tz;
- final_o = Position::NormalizeOrientation(orientation + m_movementInfo.transport.pos.GetOrientation());
- }
-
- m_teleport_dest = WorldLocation(mapid, final_x, final_y, final_z, final_o);
+ m_teleport_dest = WorldLocation(mapid, x, y, z, orientation);
SetFallInformation(0, z);
// if the player is saved before worldportack (at logout for example)
// this will be used instead of the current location in SaveToDB
@@ -2471,7 +2437,7 @@ void Player::RemoveFromWorld()
{
if (WorldObject* viewpoint = GetViewpoint())
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s has viewpoint %u %u when removed from world",
+ TC_LOG_ERROR("entities.player", "Player %s has viewpoint %u %u when removed from world",
GetName().c_str(), viewpoint->GetEntry(), viewpoint->GetTypeId());
SetViewpoint(viewpoint, false);
}
@@ -2797,7 +2763,7 @@ GameObject* Player::GetGameObjectIfCanInteractWith(uint64 guid, GameobjectTypes
if (go->IsWithinDistInMap(this, maxdist))
return go;
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "IsGameObjectOfTypeInRange: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name.c_str(),
+ TC_LOG_DEBUG("maps", "IsGameObjectOfTypeInRange: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name.c_str(),
go->GetGUIDLow(), GetName().c_str(), GetGUIDLow(), go->GetDistance(this));
}
}
@@ -3384,7 +3350,7 @@ void Player::SendInitialSpells()
data << uint32(itr->first);
data << uint16(itr->second.itemid); // cast item id
- data << uint16(sEntry->Category); // spell category
+ data << uint16(sEntry->GetCategory()); // spell category
// send infinity cooldown in special format
if (itr->second.end >= infTime)
@@ -3396,7 +3362,7 @@ void Player::SendInitialSpells()
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...
+ if (sEntry->GetCategory()) // may be wrong, but anyway better than nothing...
{
data << uint32(0); // cooldown
data << uint32(cooldown); // category cooldown
@@ -3410,7 +3376,7 @@ void Player::SendInitialSpells()
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CHARACTER: Sent Initial Spells");
+ TC_LOG_DEBUG("network", "CHARACTER: Sent Initial Spells");
}
void Player::RemoveMail(uint32 id)
@@ -3504,12 +3470,12 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning)
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
+ TC_LOG_ERROR("spells", "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
DeleteSpellFromAllPlayers(spellId);
}
else
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
+ TC_LOG_ERROR("spells", "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
return false;
}
@@ -3519,12 +3485,12 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning)
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.", spellId);
+ TC_LOG_ERROR("spells", "Player::addTalent: Broken spell #%u learning not allowed, deleting for all characters in `character_talent`.", spellId);
DeleteSpellFromAllPlayers(spellId);
}
else
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addTalent: Broken spell #%u learning not allowed.", spellId);
+ TC_LOG_ERROR("spells", "Player::addTalent: Broken spell #%u learning not allowed.", spellId);
return false;
}
@@ -3569,12 +3535,12 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
+ TC_LOG_ERROR("spells", "Player::addSpell: Non-existed in SpellStore spell #%u request, deleting for all characters in `character_spell`.", spellId);
DeleteSpellFromAllPlayers(spellId);
}
else
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
+ TC_LOG_ERROR("spells", "Player::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
return false;
}
@@ -3584,12 +3550,12 @@ bool Player::addSpell(uint32 spellId, bool active, bool learning, bool dependent
// do character spell book cleanup (all characters)
if (!IsInWorld() && !learning) // spell load case
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.", spellId);
+ TC_LOG_ERROR("spells", "Player::addSpell: Broken spell #%u learning not allowed, deleting for all characters in `character_spell`.", spellId);
DeleteSpellFromAllPlayers(spellId);
}
else
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::addSpell: Broken spell #%u learning not allowed.", spellId);
+ TC_LOG_ERROR("spells", "Player::addSpell: Broken spell #%u learning not allowed.", spellId);
return false;
}
@@ -4259,16 +4225,16 @@ void Player::RemoveSpellCooldown(uint32 spell_id, bool update /* = false */)
// I am not sure which one is more efficient
void Player::RemoveCategoryCooldown(uint32 cat)
{
- SpellCategoryStore::const_iterator i_scstore = sSpellCategoryStore.find(cat);
- if (i_scstore != sSpellCategoryStore.end())
+ SpellCategoryStore::const_iterator i_scstore = sSpellsByCategoryStore.find(cat);
+ if (i_scstore != sSpellsByCategoryStore.end())
for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
RemoveSpellCooldown(*i_scset, true);
}
void Player::RemoveSpellCategoryCooldown(uint32 cat, bool update /* = false */)
{
- SpellCategoryStore::const_iterator ct = sSpellCategoryStore.find(cat);
- if (ct == sSpellCategoryStore.end())
+ SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(cat);
+ if (ct == sSpellsByCategoryStore.end())
return;
const SpellCategorySet& ct_set = ct->second;
@@ -4344,7 +4310,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result)
if (!sSpellMgr->GetSpellInfo(spell_id))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_LOADING, "Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id);
+ TC_LOG_ERROR("entities.player.loading", "Player %u has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUIDLow(), spell_id);
continue;
}
@@ -4354,7 +4320,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result)
AddSpellCooldown(spell_id, item_id, db_time);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime));
+ TC_LOG_DEBUG("entities.player.loading", "Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime));
}
while (result->NextRow());
}
@@ -5025,7 +4991,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
+ TC_LOG_ERROR("entities.player", "Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
return;
}
@@ -5058,7 +5024,7 @@ void Player::DeleteOldCharacters()
*/
void Player::DeleteOldCharacters(uint32 keepDays)
{
- TC_LOG_INFO(LOG_FILTER_PLAYER, "Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
+ TC_LOG_INFO("entities.player", "Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_OLD_CHARS);
stmt->setUInt32(0, uint32(time(NULL) - time_t(keepDays * DAY)));
@@ -5066,7 +5032,7 @@ void Player::DeleteOldCharacters(uint32 keepDays)
if (result)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount());
+ TC_LOG_DEBUG("entities.player", "Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount());
do
{
Field* fields = result->Fetch();
@@ -5086,7 +5052,7 @@ void Player::SetMovement(PlayerMovementType pType)
case MOVE_WATER_WALK: data.Initialize(SMSG_MOVE_WATER_WALK, GetPackGUID().size()+4); break;
case MOVE_LAND_WALK: data.Initialize(SMSG_MOVE_LAND_WALK, GetPackGUID().size()+4); break;
default:
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::SetMovement: Unsupported move type (%d), data not sent to client.", pType);
+ TC_LOG_ERROR("entities.player", "Player::SetMovement: Unsupported move type (%d), data not sent to client.", pType);
return;
}
data.append(GetPackGUID());
@@ -5115,7 +5081,7 @@ void Player::BuildPlayerRepop()
// the player cannot have a corpse already, only bones which are not returned by GetCorpse
if (GetCorpse())
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "BuildPlayerRepop: player %s(%d) already has a corpse", GetName().c_str(), GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "BuildPlayerRepop: player %s(%d) already has a corpse", GetName().c_str(), GetGUIDLow());
return;
}
@@ -5124,7 +5090,7 @@ void Player::BuildPlayerRepop()
Corpse* corpse = GetCorpse();
if (!corpse)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Error creating corpse for Player %s [%u]", GetName().c_str(), GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Error creating corpse for Player %s [%u]", GetName().c_str(), GetGUIDLow());
return;
}
GetMap()->AddToMap(corpse);
@@ -5479,7 +5445,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityCostsEntry const* dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel);
if (!dcost)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_ITEMS, "RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
+ TC_LOG_ERROR("entities.player.items", "RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
return TotalCost;
}
@@ -5487,7 +5453,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityQualityEntry const* dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId);
if (!dQualitymodEntry)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_ITEMS, "RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
+ TC_LOG_ERROR("entities.player.items", "RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
return TotalCost;
}
@@ -5503,7 +5469,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
{
if (GetGuildId() == 0)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "You are not member of a guild");
+ TC_LOG_DEBUG("entities.player.items", "You are not member of a guild");
return TotalCost;
}
@@ -5518,7 +5484,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
}
else if (!HasEnoughMoney(costs))
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "You do not have enough money");
+ TC_LOG_DEBUG("entities.player.items", "You do not have enough money");
return TotalCost;
}
else
@@ -5618,7 +5584,7 @@ void Player::CleanupChannels()
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetTeam()))
cMgr->LeftChannel(ch->GetName()); // deleted channel if empty
}
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "Player %s: channels cleaned up!", GetName().c_str());
+ TC_LOG_DEBUG("chat.system", "Player %s: channels cleaned up!", GetName().c_str());
}
void Player::UpdateLocalChannels(uint32 newZone)
@@ -5726,7 +5692,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa
{
if (modGroup >= BASEMOD_END || modType >= MOD_END)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!");
+ TC_LOG_ERROR("spells", "ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!");
return;
}
@@ -5752,7 +5718,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
{
if (modGroup >= BASEMOD_END || modType >= MOD_END)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "trial to access non existed BaseModGroup or wrong BaseModType!");
+ TC_LOG_ERROR("spells", "trial to access non existed BaseModGroup or wrong BaseModType!");
return 0.0f;
}
@@ -5766,7 +5732,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
{
if (modGroup >= BASEMOD_END)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "wrong BaseModGroup in GetTotalBaseModValue()!");
+ TC_LOG_ERROR("spells", "wrong BaseModGroup in GetTotalBaseModValue()!");
return 0.0f;
}
@@ -6141,7 +6107,7 @@ inline int SkillGainChance(uint32 SkillValue, uint32 GrayLevel, uint32 GreenLeve
bool Player::UpdateCraftSkill(uint32 spellid)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_SKILLS, "UpdateCraftSkill spellid %d", spellid);
+ TC_LOG_DEBUG("entities.player.skills", "UpdateCraftSkill spellid %d", spellid);
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellid);
@@ -6173,7 +6139,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLevel, uint32 Multiplicator)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_SKILLS, "UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel);
+ TC_LOG_DEBUG("entities.player.skills", "UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel);
uint32 gathering_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_GATHERING);
@@ -6201,7 +6167,7 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLeve
bool Player::UpdateFishingSkill()
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_SKILLS, "UpdateFishingSkill");
+ TC_LOG_DEBUG("entities.player.skills", "UpdateFishingSkill");
uint32 SkillValue = GetPureSkillValue(SKILL_FISHING);
@@ -6215,18 +6181,18 @@ bool Player::UpdateFishingSkill()
// levels sync. with spell requirement for skill levels to learn
// bonus abilities in sSkillLineAbilityStore
// Used only to avoid scan DBC at each skill grow
-static uint32 bonusSkillLevels[] = {75, 150, 225, 300, 375, 450};
+static uint32 bonusSkillLevels[ ] = {75, 150, 225, 300, 375, 450};
static const size_t bonusSkillLevelsSize = sizeof(bonusSkillLevels) / sizeof(uint32);
bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_SKILLS, "UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance / 10.0f);
+ TC_LOG_DEBUG("entities.player.skills", "UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance / 10.0f);
if (!SkillId)
return false;
if (Chance <= 0) // speedup in 0 chance case
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
+ TC_LOG_DEBUG("entities.player.skills", "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
return false;
}
@@ -6265,11 +6231,11 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
}
UpdateSkillEnchantments(SkillId, SkillValue, new_value);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, SkillId);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% taken", Chance / 10.0f);
+ TC_LOG_DEBUG("entities.player.skills", "Player::UpdateSkillPro Chance=%3.1f%% taken", Chance / 10.0f);
return true;
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
+ TC_LOG_DEBUG("entities.player.skills", "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
return false;
}
@@ -6488,7 +6454,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id);
if (!pSkill)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_SKILLS, "Skill not found in SkillLineStore: skill #%u", id);
+ TC_LOG_ERROR("entities.player.skills", "Skill not found in SkillLineStore: skill #%u", id);
return;
}
@@ -6669,20 +6635,20 @@ void Player::SendActionButtons(uint32 state) const
}
GetSession()->SendPacket(&data);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "SMSG_ACTION_BUTTONS sent '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec);
+ TC_LOG_INFO("network", "SMSG_ACTION_BUTTONS sent '%u' spec '%u' Sent", GetGUIDLow(), m_activeSpec);
}
bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
{
if (button >= MAX_ACTION_BUTTONS)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Action %u not added into button %u for player %s (GUID: %u): button must be < %u", action, button, GetName().c_str(), GUID_LOPART(GetGUID()), MAX_ACTION_BUTTONS );
+ TC_LOG_ERROR("entities.player", "Action %u not added into button %u for player %s (GUID: %u): button must be < %u", action, button, GetName().c_str(), GUID_LOPART(GetGUID()), MAX_ACTION_BUTTONS );
return false;
}
if (action >= MAX_ACTION_BUTTON_ACTION_VALUE)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Action %u not added into button %u for player %s (GUID: %u): action must be < %u", action, button, GetName().c_str(), GUID_LOPART(GetGUID()), MAX_ACTION_BUTTON_ACTION_VALUE);
+ TC_LOG_ERROR("entities.player", "Action %u not added into button %u for player %s (GUID: %u): action must be < %u", action, button, GetName().c_str(), GUID_LOPART(GetGUID()), MAX_ACTION_BUTTON_ACTION_VALUE);
return false;
}
@@ -6691,20 +6657,20 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
case ACTION_BUTTON_SPELL:
if (!sSpellMgr->GetSpellInfo(action))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Spell action %u not added into button %u for player %s (GUID: %u): spell not exist", action, button, GetName().c_str(), GUID_LOPART(GetGUID()));
+ TC_LOG_ERROR("entities.player", "Spell action %u not added into button %u for player %s (GUID: %u): spell not exist", action, button, GetName().c_str(), GUID_LOPART(GetGUID()));
return false;
}
if (!HasSpell(action))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Spell action %u not added into button %u for player %s (GUID: %u): player don't known this spell", action, button, GetName().c_str(), GUID_LOPART(GetGUID()));
+ TC_LOG_ERROR("entities.player", "Spell action %u not added into button %u for player %s (GUID: %u): player don't known this spell", action, button, GetName().c_str(), GUID_LOPART(GetGUID()));
return false;
}
break;
case ACTION_BUTTON_ITEM:
if (!sObjectMgr->GetItemTemplate(action))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Item action %u not added into button %u for player %s (GUID: %u): item not exist", action, button, GetName().c_str(), GUID_LOPART(GetGUID()));
+ TC_LOG_ERROR("entities.player", "Item action %u not added into button %u for player %s (GUID: %u): item not exist", action, button, GetName().c_str(), GUID_LOPART(GetGUID()));
return false;
}
break;
@@ -6714,7 +6680,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
case ACTION_BUTTON_EQSET:
break;
default:
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Unknown action type %u", type);
+ TC_LOG_ERROR("entities.player", "Unknown action type %u", type);
return false; // other cases not checked at this moment
}
@@ -6732,7 +6698,7 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type)
// set data and update to CHANGED if not NEW
ab.SetActionAndType(action, ActionButtonType(type));
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button);
+ TC_LOG_DEBUG("entities.player", "Player '%u' Added Action '%u' (type %u) to Button '%u'", GetGUIDLow(), action, type, button);
return &ab;
}
@@ -6747,7 +6713,7 @@ void Player::removeActionButton(uint8 button)
else
buttonItr->second.uState = ACTIONBUTTON_DELETED; // saved, will deleted at next save
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Action Button '%u' Removed from Player '%u'", button, GetGUIDLow());
+ TC_LOG_DEBUG("entities.player", "Action Button '%u' Removed from Player '%u'", button, GetGUIDLow());
}
ActionButton const* Player::GetActionButton(uint8 button)
@@ -6859,7 +6825,7 @@ void Player::CheckAreaExploreAndOutdoor()
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", areaFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE);
+ TC_LOG_ERROR("entities.player", "Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", areaFlag, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE);
return;
}
@@ -6875,7 +6841,7 @@ void Player::CheckAreaExploreAndOutdoor()
AreaTableEntry const* areaEntry = GetAreaEntryByAreaFlagAndMap(areaFlag, GetMapId());
if (!areaEntry)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %u discovered unknown area (x: %f y: %f z: %f map: %u", GetGUIDLow(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId());
+ TC_LOG_ERROR("entities.player", "Player %u discovered unknown area (x: %f y: %f z: %f map: %u", GetGUIDLow(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId());
return;
}
@@ -6910,7 +6876,7 @@ void Player::CheckAreaExploreAndOutdoor()
GiveXP(XP, NULL);
SendExplorationExperience(area, XP);
}
- TC_LOG_INFO(LOG_FILTER_PLAYER, "Player %u discovered a new area: %u", GetGUIDLow(), area);
+ TC_LOG_INFO("entities.player", "Player %u discovered a new area: %u", GetGUIDLow(), area);
}
}
}
@@ -6924,10 +6890,10 @@ uint32 Player::TeamForRace(uint8 race)
case 1: return HORDE;
case 7: return ALLIANCE;
}
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID);
+ TC_LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID);
}
else
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Race (%u) not found in DBC: wrong DBC files?", uint32(race));
+ TC_LOG_ERROR("entities.player", "Race (%u) not found in DBC: wrong DBC files?", uint32(race));
return ALLIANCE;
}
@@ -7656,7 +7622,7 @@ void Player::DuelComplete(DuelCompleteType type)
if (!duel)
return;
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Duel Complete %s %s", GetName().c_str(), duel->opponent->GetName().c_str());
+ TC_LOG_DEBUG("entities.unit", "Duel Complete %s %s", GetName().c_str(), duel->opponent->GetName().c_str());
WorldPacket data(SMSG_DUEL_COMPLETE, (1));
data << (uint8)((type != DUEL_INTERRUPTED) ? 1 : 0);
@@ -7780,7 +7746,7 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
if (item->IsBroken())
return;
- TC_LOG_INFO(LOG_FILTER_PLAYER_ITEMS, "applying mods for item %u ", item->GetGUIDLow());
+ TC_LOG_INFO("entities.player.items", "applying mods for item %u ", item->GetGUIDLow());
uint8 attacktype = Player::GetAttackBySlot(slot);
@@ -7798,7 +7764,7 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
ApplyItemEquipSpell(item, apply);
ApplyEnchantment(item, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "_ApplyItemMods complete.");
+ TC_LOG_DEBUG("entities.player.items", "_ApplyItemMods complete.");
}
void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply, bool only_level_scale /*= false*/)
@@ -8272,7 +8238,7 @@ void Player::ApplyEquipSpell(SpellInfo const* spellInfo, Item* item, bool apply,
return;
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id);
+ TC_LOG_DEBUG("entities.player", "WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id);
CastSpell(this, spellInfo, true, item);
}
@@ -8378,7 +8344,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_ITEMS, "WORLD: unknown Item spellid %i", spellData.SpellId);
+ TC_LOG_ERROR("entities.player.items", "WORLD: unknown Item spellid %i", spellData.SpellId);
continue;
}
@@ -8433,7 +8399,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER_ITEMS, "Player::CastItemCombatSpell(GUID: %u, name: %s, enchant: %i): unknown spell %i is casted, ignoring...",
+ TC_LOG_ERROR("entities.player.items", "Player::CastItemCombatSpell(GUID: %u, name: %s, enchant: %i): unknown spell %i is casted, ignoring...",
GetGUIDLow(), GetName().c_str(), pEnchant->ID, pEnchant->spellid[s]);
continue;
}
@@ -8478,7 +8444,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learn_spell_id);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id);
+ TC_LOG_ERROR("entities.player", "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id);
SendEquipError(EQUIP_ERR_NONE, item, NULL);
return;
}
@@ -8510,7 +8476,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId);
+ TC_LOG_ERROR("entities.player", "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId);
continue;
}
@@ -8538,7 +8504,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
+ TC_LOG_ERROR("entities.player", "Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
continue;
}
@@ -8555,7 +8521,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
void Player::_RemoveAllItemMods()
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "_RemoveAllItemMods start.");
+ TC_LOG_DEBUG("entities.player.items", "_RemoveAllItemMods start.");
for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@@ -8598,12 +8564,12 @@ void Player::_RemoveAllItemMods()
}
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "_RemoveAllItemMods complete.");
+ TC_LOG_DEBUG("entities.player.items", "_RemoveAllItemMods complete.");
}
void Player::_ApplyAllItemMods()
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "_ApplyAllItemMods start.");
+ TC_LOG_DEBUG("entities.player.items", "_ApplyAllItemMods start.");
for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@@ -8647,7 +8613,7 @@ void Player::_ApplyAllItemMods()
}
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "_ApplyAllItemMods complete.");
+ TC_LOG_DEBUG("entities.player.items", "_ApplyAllItemMods complete.");
}
void Player::_ApplyAllLevelScaleItemMods(bool apply)
@@ -8771,10 +8737,10 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
Loot* loot = 0;
PermissionTypes permission = ALL_PERMISSION;
- TC_LOG_DEBUG(LOG_FILTER_LOOT, "Player::SendLoot");
+ TC_LOG_DEBUG("loot", "Player::SendLoot");
if (IS_GAMEOBJECT_GUID(guid))
{
- TC_LOG_DEBUG(LOG_FILTER_LOOT, "IS_GAMEOBJECT_GUID(guid)");
+ TC_LOG_DEBUG("loot", "IS_GAMEOBJECT_GUID(guid)");
GameObject* go = GetMap()->GetGameObject(guid);
// not check distance for GO in case owned GO (fishing bobber case, for example)
@@ -9110,7 +9076,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
InstanceScript* instance = GetInstanceScript();
Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(zoneid);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid);
+ TC_LOG_DEBUG("network", "Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid);
WorldPacket data(SMSG_INIT_WORLD_STATES, (4+4+4+2+(12*8)));
data << uint32(mapid); // mapid
@@ -9663,6 +9629,16 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
data << uint32(3932) << uint32(0); // 13 WORLDSTATE_TIME_GUARDIAN_SHOW
}
break;
+ // The Oculus
+ case 4228:
+ if (instance && mapid == 578)
+ instance->FillInitialWorldStates(data);
+ else
+ {
+ data << uint32(3524) << uint32(0); // 9 WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW
+ data << uint32(3486) << uint32(0); // 10 WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT
+ }
+ break;
// Ulduar
case 4273:
if (instance && mapid == 603)
@@ -9673,13 +9649,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
data << uint32(4131) << uint32(0); // 10 WORLDSTATE_ALGALON_DESPAWN_TIMER
}
break;
- // Wintergrasp
- case 4197:
- if (bf && bf->GetTypeId() == BATTLEFIELD_WG)
- {
- bf->FillInitialWorldStates(data);
- break;
- }
+ // Halls of Refection
case 4820:
if (instance && mapid == 668)
instance->FillInitialWorldStates(data);
@@ -9689,7 +9659,13 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
data << uint32(4882) << uint32(0); // 10 WORLD_STATE_HOR_WAVE_COUNT
}
break;
-
+ // Wintergrasp
+ case 4197:
+ if (bf && bf->GetTypeId() == BATTLEFIELD_WG)
+ {
+ bf->FillInitialWorldStates(data);
+ break;
+ }
// No break here, intended.
default:
data << uint32(0x914) << uint32(0x0); // 7
@@ -9749,7 +9725,7 @@ uint32 Player::GetXPRestBonus(uint32 xp)
SetRestBonus(GetRestBonus() - rested_bonus);
- TC_LOG_INFO(LOG_FILTER_PLAYER, "Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp+rested_bonus, rested_bonus, GetRestBonus());
+ TC_LOG_INFO("entities.player", "Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp+rested_bonus, rested_bonus, GetRestBonus());
return rested_bonus;
}
@@ -9781,7 +9757,7 @@ void Player::ResetPetTalents()
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
+ TC_LOG_ERROR("entities.player", "Object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
pet->resetTalents();
@@ -10813,7 +10789,7 @@ InventoryResult Player::CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 sl
InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item* pItem, bool swap, uint32* no_space_count) const
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(entry);
if (!pProto)
@@ -11298,7 +11274,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
if (!pItem)
continue;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItems %i. item = %u, count = %u", k + 1, pItem->GetEntry(), pItem->GetCount());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: CanStoreItems %i. item = %u, count = %u", k + 1, pItem->GetEntry(), pItem->GetCount());
ItemTemplate const* pProto = pItem->GetTemplate();
// strange item
@@ -11515,7 +11491,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool
dest = 0;
if (pItem)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount());
ItemTemplate const* pProto = pItem->GetTemplate();
if (pProto)
{
@@ -11685,7 +11661,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const
if (!pItem)
return EQUIP_ERR_OK;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount());
ItemTemplate const* pProto = pItem->GetTemplate();
if (!pProto)
@@ -11721,7 +11697,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
uint32 count = pItem->GetCount();
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount());
ItemTemplate const* pProto = pItem->GetTemplate();
if (!pProto)
return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND;
@@ -11737,7 +11713,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
uint8 pItemslot = pItem->GetSlot();
if (pItemslot >= CURRENCYTOKEN_SLOT_START && pItemslot < CURRENCYTOKEN_SLOT_END)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!",
+ TC_LOG_ERROR("entities.player", "Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!",
GetName().c_str(), GetGUIDLow(), pItem->GetGUIDLow(), pProto->ItemId);
return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED;
}
@@ -11905,7 +11881,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const
{
if (pItem)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseItem item = %u", pItem->GetEntry());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: CanUseItem item = %u", pItem->GetEntry());
if (!IsAlive() && not_loading)
return EQUIP_ERR_YOU_ARE_DEAD;
@@ -12078,7 +12054,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
InventoryResult Player::CanUseAmmo(uint32 item) const
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseAmmo item = %u", item);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: CanUseAmmo item = %u", item);
if (!IsAlive())
return EQUIP_ERR_YOU_ARE_DEAD;
//if (isStunned())
@@ -12213,7 +12189,7 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool
uint8 bag = pos >> 8;
uint8 slot = pos & 255;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow());
Item* pItem2 = GetItemByPos(bag, slot);
@@ -12359,7 +12335,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cooldownSpell);
if (!spellProto)
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
+ TC_LOG_ERROR("entities.player", "Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
else
{
m_weaponChangeTimer = spellProto->StartRecoveryTime;
@@ -12483,7 +12459,7 @@ void Player::VisualizeItem(uint8 slot, Item* pItem)
if (pItem->GetTemplate()->Bonding == BIND_WHEN_EQUIPED || pItem->GetTemplate()->Bonding == BIND_WHEN_PICKED_UP || pItem->GetTemplate()->Bonding == BIND_QUEST_ITEM)
pItem->SetBinding(true);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
m_items[slot] = pItem;
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID());
@@ -12513,7 +12489,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update)
Item* pItem = GetItemByPos(bag, slot);
if (pItem)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
RemoveEnchantmentDurations(pItem);
RemoveItemDurations(pItem);
@@ -12632,7 +12608,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
Item* pItem = GetItemByPos(bag, slot);
if (pItem)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
// Also remove all contained items if the item is a bag.
// This if () prevents item saving crashes if the condition for a bag to be empty before being destroyed was bypassed somehow.
if (pItem->IsNotEmptyBag())
@@ -12729,7 +12705,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
void Player::DestroyItemCount(uint32 itemEntry, uint32 count, bool update, bool unequip_check)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item = %u, count = %u", itemEntry, count);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: DestroyItemCount item = %u, count = %u", itemEntry, count);
uint32 remcount = 0;
// in inventory
@@ -12920,7 +12896,7 @@ void Player::DestroyItemCount(uint32 itemEntry, uint32 count, bool update, bool
void Player::DestroyZoneLimitedItem(bool update, uint32 new_zone)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone);
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
@@ -12952,7 +12928,7 @@ void Player::DestroyConjuredItems(bool update)
{
// used when entering arena
// destroys all conjured items
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyConjuredItems");
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: DestroyConjuredItems");
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
@@ -13008,7 +12984,7 @@ void Player::DestroyItemCount(Item* pItem, uint32 &count, bool update)
if (!pItem)
return;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(), pItem->GetEntry(), count);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(), pItem->GetEntry(), count);
if (pItem->GetCount() <= count)
{
@@ -13071,7 +13047,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
return;
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
Item* pNewItem = pSrcItem->CloneItem(count, this);
if (!pNewItem)
{
@@ -13156,7 +13132,7 @@ void Player::SwapItem(uint16 src, uint16 dst)
if (!pSrcItem)
return;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
if (!IsAlive())
{
@@ -13532,7 +13508,7 @@ void Player::AddItemToBuyBackSlot(Item* pItem)
}
RemoveItemFromBuyBackSlot(slot, true);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot);
m_items[slot] = pItem;
time_t base = time(NULL);
@@ -13554,7 +13530,7 @@ void Player::AddItemToBuyBackSlot(Item* pItem)
Item* Player::GetItemFromBuyBackSlot(uint32 slot)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: GetItemFromBuyBackSlot slot = %u", slot);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: GetItemFromBuyBackSlot slot = %u", slot);
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
return m_items[slot];
return NULL;
@@ -13562,7 +13538,7 @@ Item* Player::GetItemFromBuyBackSlot(uint32 slot)
void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot);
+ TC_LOG_DEBUG("entities.player.items", "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot);
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
{
Item* pItem = m_items[slot];
@@ -13588,7 +13564,7 @@ void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del)
void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint32 itemid)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
WorldPacket data(SMSG_INVENTORY_CHANGE_FAILURE, (msg == EQUIP_ERR_CANT_EQUIP_LEVEL_I ? 22 : 18));
data << uint8(msg);
@@ -13631,7 +13607,7 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint
void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32 param)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_BUY_FAILED");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_BUY_FAILED");
WorldPacket data(SMSG_BUY_FAILED, (8+4+4+1));
data << uint64(creature ? creature->GetGUID() : 0);
data << uint32(item);
@@ -13643,7 +13619,7 @@ void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32
void Player::SendSellError(SellResult msg, Creature* creature, uint64 guid, uint32 param)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_SELL_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_SELL_ITEM");
WorldPacket data(SMSG_SELL_ITEM, (8+8+(param?4:0)+1)); // last check 2.0.10
data << uint64(creature ? creature->GetGUID() : 0);
data << uint64(guid);
@@ -13724,7 +13700,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
if (m_itemDuration.empty())
return;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Player::UpdateItemDuration(%u, %u)", time, realtimeonly);
+ TC_LOG_DEBUG("entities.player.items", "Player::UpdateItemDuration(%u, %u)", time, realtimeonly);
for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end();)
{
@@ -13993,81 +13969,81 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
}
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Adding %u to stat nb %u", enchant_amount, enchant_spell_id);
+ TC_LOG_DEBUG("entities.player.items", "Adding %u to stat nb %u", enchant_amount, enchant_spell_id);
switch (enchant_spell_id)
{
case ITEM_MOD_MANA:
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u MANA", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u MANA", enchant_amount);
HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_HEALTH:
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u HEALTH", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u HEALTH", enchant_amount);
HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_AGILITY:
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u AGILITY", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u AGILITY", enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_AGILITY, (float)enchant_amount, apply);
break;
case ITEM_MOD_STRENGTH:
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u STRENGTH", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u STRENGTH", enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_STRENGTH, (float)enchant_amount, apply);
break;
case ITEM_MOD_INTELLECT:
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u INTELLECT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u INTELLECT", enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_INTELLECT, (float)enchant_amount, apply);
break;
case ITEM_MOD_SPIRIT:
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u SPIRIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u SPIRIT", enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_SPIRIT, (float)enchant_amount, apply);
break;
case ITEM_MOD_STAMINA:
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u STAMINA", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u STAMINA", enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_STAMINA, (float)enchant_amount, apply);
break;
case ITEM_MOD_DEFENSE_SKILL_RATING:
ApplyRatingMod(CR_DEFENSE_SKILL, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u DEFENCE", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u DEFENCE", enchant_amount);
break;
case ITEM_MOD_DODGE_RATING:
ApplyRatingMod(CR_DODGE, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u DODGE", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u DODGE", enchant_amount);
break;
case ITEM_MOD_PARRY_RATING:
ApplyRatingMod(CR_PARRY, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u PARRY", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u PARRY", enchant_amount);
break;
case ITEM_MOD_BLOCK_RATING:
ApplyRatingMod(CR_BLOCK, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u SHIELD_BLOCK", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u SHIELD_BLOCK", enchant_amount);
break;
case ITEM_MOD_HIT_MELEE_RATING:
ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u MELEE_HIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u MELEE_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_RANGED_RATING:
ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u RANGED_HIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u RANGED_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_SPELL_RATING:
ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_HIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_MELEE_RATING:
ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u MELEE_CRIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u MELEE_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RANGED_RATING:
ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u RANGED_CRIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u RANGED_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_SPELL_RATING:
ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_CRIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_CRIT", enchant_amount);
break;
// Values from ITEM_STAT_MELEE_HA_RATING to ITEM_MOD_HASTE_RANGED_RATING are never used
// in Enchantments
@@ -14102,13 +14078,13 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u HIT", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RATING:
ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u CRITICAL", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u CRITICAL", enchant_amount);
break;
// Values ITEM_MOD_HIT_TAKEN_RATING and ITEM_MOD_CRIT_TAKEN_RATING are never used in Enchantment
// case ITEM_MOD_HIT_TAKEN_RATING:
@@ -14125,54 +14101,54 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
ApplyRatingMod(CR_CRIT_TAKEN_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_TAKEN_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_TAKEN_SPELL, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u RESILIENCE", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u RESILIENCE", enchant_amount);
break;
case ITEM_MOD_HASTE_RATING:
ApplyRatingMod(CR_HASTE_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_HASTE_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_HASTE_SPELL, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u HASTE", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u HASTE", enchant_amount);
break;
case ITEM_MOD_EXPERTISE_RATING:
ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u EXPERTISE", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u EXPERTISE", enchant_amount);
break;
case ITEM_MOD_ATTACK_POWER:
HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply);
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u ATTACK_POWER", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u ATTACK_POWER", enchant_amount);
break;
case ITEM_MOD_RANGED_ATTACK_POWER:
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u RANGED_ATTACK_POWER", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u RANGED_ATTACK_POWER", enchant_amount);
break;
// case ITEM_MOD_FERAL_ATTACK_POWER:
// ApplyFeralAPBonus(enchant_amount, apply);
-// TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u FERAL_ATTACK_POWER", enchant_amount);
+// TC_LOG_DEBUG("entities.player.items", "+ %u FERAL_ATTACK_POWER", enchant_amount);
// break;
case ITEM_MOD_MANA_REGENERATION:
ApplyManaRegenBonus(enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u MANA_REGENERATION", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u MANA_REGENERATION", enchant_amount);
break;
case ITEM_MOD_ARMOR_PENETRATION_RATING:
ApplyRatingMod(CR_ARMOR_PENETRATION, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u ARMOR PENETRATION", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u ARMOR PENETRATION", enchant_amount);
break;
case ITEM_MOD_SPELL_POWER:
ApplySpellPowerBonus(enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_POWER", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_POWER", enchant_amount);
break;
case ITEM_MOD_HEALTH_REGEN:
ApplyHealthRegenBonus(enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u HEALTH_REGENERATION", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u HEALTH_REGENERATION", enchant_amount);
break;
case ITEM_MOD_SPELL_PENETRATION:
ApplySpellPenetrationBonus(enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_PENETRATION", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_PENETRATION", enchant_amount);
break;
case ITEM_MOD_BLOCK_VALUE:
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u BLOCK_VALUE", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u BLOCK_VALUE", enchant_amount);
break;
case ITEM_MOD_SPELL_HEALING_DONE: // deprecated
case ITEM_MOD_SPELL_DAMAGE_DONE: // deprecated
@@ -14206,7 +14182,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
// nothing do..
break;
default:
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type);
+ TC_LOG_ERROR("entities.player", "Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type);
break;
} /*switch (enchant_display_type)*/
} /*for*/
@@ -14377,7 +14353,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
VendorItemData const* vendorItems = creature->GetVendorItems();
if (!vendorItems || vendorItems->Empty())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature %s (Entry: %u GUID: %u DB GUID: %u) has UNIT_NPC_FLAG_VENDOR set but has an empty trading item list.", creature->GetName().c_str(), creature->GetEntry(), creature->GetGUIDLow(), creature->GetDBTableGUIDLow());
+ TC_LOG_ERROR("sql.sql", "Creature %s (Entry: %u GUID: %u DB GUID: %u) has UNIT_NPC_FLAG_VENDOR set but has an empty trading item list.", creature->GetName().c_str(), creature->GetEntry(), creature->GetGUIDLow(), creature->GetDBTableGUIDLow());
canTalk = false;
}
break;
@@ -14411,7 +14387,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
break;
case GOSSIP_OPTION_TRAINER:
if (getClass() != creature->GetCreatureTemplate()->trainer_class && creature->GetCreatureTemplate()->trainer_type == TRAINER_TYPE_CLASS)
- TC_LOG_ERROR(LOG_FILTER_SQL, "GOSSIP_OPTION_TRAINER:: Player %s (GUID: %u) request wrong gossip menu: %u with wrong class: %u at Creature: %s (Entry: %u, Trainer Class: %u)",
+ TC_LOG_ERROR("sql.sql", "GOSSIP_OPTION_TRAINER:: Player %s (GUID: %u) request wrong gossip menu: %u with wrong class: %u at Creature: %s (Entry: %u, Trainer Class: %u)",
GetName().c_str(), GetGUIDLow(), menu->GetGossipMenu().GetMenuId(), getClass(), creature->GetName().c_str(), creature->GetEntry(), creature->GetCreatureTemplate()->trainer_class);
// no break;
case GOSSIP_OPTION_GOSSIP:
@@ -14427,7 +14403,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool
canTalk = false;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature entry %u has unknown gossip option %u for menu %u", creature->GetEntry(), itr->second.OptionType, itr->second.MenuId);
+ TC_LOG_ERROR("sql.sql", "Creature entry %u has unknown gossip option %u for menu %u", creature->GetEntry(), itr->second.OptionType, itr->second.MenuId);
canTalk = false;
break;
}
@@ -14522,7 +14498,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
{
if (gossipOptionId > GOSSIP_OPTION_QUESTGIVER)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player guid %u request invalid gossip option for GameObject entry %u", GetGUIDLow(), source->GetEntry());
+ TC_LOG_ERROR("entities.player", "Player guid %u request invalid gossip option for GameObject entry %u", GetGUIDLow(), source->GetEntry());
return;
}
}
@@ -14626,7 +14602,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
if (bgTypeId == BATTLEGROUND_TYPE_NONE)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "a user (guid %u) requested battlegroundlist from a npc who is no battlemaster", GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "a user (guid %u) requested battlegroundlist from a npc who is no battlemaster", GetGUIDLow());
return;
}
@@ -15335,9 +15311,25 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
// cast spells after mark quest complete (some spells have quest completed state requirements in spell_area data)
if (quest->GetRewSpellCast() > 0)
- CastSpell(this, quest->GetRewSpellCast(), true);
+ {
+ if (questGiver->isType(TYPEMASK_UNIT))
+ {
+ if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
+ creature->CastSpell(this, quest->GetRewSpellCast(), true);
+ }
+ else
+ CastSpell(this, quest->GetRewSpellCast(), true);
+ }
else if (quest->GetRewSpell() > 0)
- CastSpell(this, quest->GetRewSpell(), true);
+ {
+ if (questGiver->isType(TYPEMASK_UNIT))
+ {
+ if (Creature* creature = GetMap()->GetCreature(questGiver->GetGUID()))
+ creature->CastSpell(this, quest->GetRewSpell(), true);
+ }
+ else
+ CastSpell(this, quest->GetRewSpell(), true);
+ }
if (quest->GetZoneOrSort() > 0)
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUESTS_IN_ZONE, quest->GetZoneOrSort());
@@ -15406,7 +15398,7 @@ bool Player::SatisfyQuestSkill(Quest const* qInfo, bool msg) const
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestSkill: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required skill value.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestSkill: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required skill value.", qInfo->GetQuestId());
}
return false;
@@ -15422,7 +15414,7 @@ bool Player::SatisfyQuestLevel(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_QUEST_FAILED_LOW_LEVEL);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestLevel: Sent INVALIDREASON_QUEST_FAILED_LOW_LEVEL (questId: %u) because player does not have required (min) level.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestLevel: Sent INVALIDREASON_QUEST_FAILED_LOW_LEVEL (questId: %u) because player does not have required (min) level.", qInfo->GetQuestId());
}
return false;
}
@@ -15431,7 +15423,7 @@ bool Player::SatisfyQuestLevel(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); // There doesn't seem to be a specific response for too high player level
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestLevel: Sent INVALIDREASON_QUEST_FAILED_LOW_LEVEL (questId: %u) because player does not have required (max) level.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestLevel: Sent INVALIDREASON_QUEST_FAILED_LOW_LEVEL (questId: %u) because player does not have required (max) level.", qInfo->GetQuestId());
}
return false;
}
@@ -15448,7 +15440,7 @@ bool Player::SatisfyQuestLog(bool msg)
{
WorldPacket data(SMSG_QUESTLOG_FULL, 0);
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTLOG_FULL");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTLOG_FULL");
}
return false;
}
@@ -15492,7 +15484,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestPreviousQuest: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required quest (1).", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestPreviousQuest: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required quest (1).", qInfo->GetQuestId());
}
return false;
}
@@ -15525,7 +15517,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestPreviousQuest: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required quest (2).", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestPreviousQuest: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required quest (2).", qInfo->GetQuestId());
}
return false;
@@ -15541,7 +15533,7 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestPreviousQuest: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required quest (3).", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestPreviousQuest: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required quest (3).", qInfo->GetQuestId());
}
return false;
@@ -15559,7 +15551,7 @@ bool Player::SatisfyQuestClass(Quest const* qInfo, bool msg) const
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestClass: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required class.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestClass: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required class.", qInfo->GetQuestId());
}
return false;
@@ -15578,7 +15570,7 @@ bool Player::SatisfyQuestRace(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_QUEST_FAILED_WRONG_RACE);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestRace: Sent INVALIDREASON_QUEST_FAILED_WRONG_RACE (questId: %u) because player does not have required race.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestRace: Sent INVALIDREASON_QUEST_FAILED_WRONG_RACE (questId: %u) because player does not have required race.", qInfo->GetQuestId());
}
return false;
@@ -15594,7 +15586,7 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestReputation: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required reputation (min).", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestReputation: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required reputation (min).", qInfo->GetQuestId());
}
return false;
}
@@ -15605,7 +15597,7 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestReputation: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required reputation (max).", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestReputation: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required reputation (max).", qInfo->GetQuestId());
}
return false;
}
@@ -15618,7 +15610,7 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestReputation: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required reputation (ReputationObjective2).", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestReputation: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not have required reputation (ReputationObjective2).", qInfo->GetQuestId());
}
return false;
}
@@ -15633,7 +15625,7 @@ bool Player::SatisfyQuestStatus(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_QUEST_ALREADY_ON);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestStatus: Sent INVALIDREASON_QUEST_ALREADY_ON (questId: %u) because player quest status is not NONE.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestStatus: Sent INVALIDREASON_QUEST_ALREADY_ON (questId: %u) because player quest status is not NONE.", qInfo->GetQuestId());
}
return false;
}
@@ -15648,9 +15640,9 @@ bool Player::SatisfyQuestConditions(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestConditions: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not meet conditions.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestConditions: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player does not meet conditions.", qInfo->GetQuestId());
}
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId());
+ TC_LOG_DEBUG("condition", "Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId());
return false;
}
return true;
@@ -15663,7 +15655,7 @@ bool Player::SatisfyQuestTimed(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_QUEST_ONLY_ONE_TIMED);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestTimed: Sent INVALIDREASON_QUEST_ONLY_ONE_TIMED (questId: %u) because player is already on a timed quest.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestTimed: Sent INVALIDREASON_QUEST_ONLY_ONE_TIMED (questId: %u) because player is already on a timed quest.", qInfo->GetQuestId());
}
return false;
}
@@ -15693,7 +15685,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestExclusiveGroup: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did daily quests in exclusive group.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestExclusiveGroup: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did daily quests in exclusive group.", qInfo->GetQuestId());
}
return false;
@@ -15705,7 +15697,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestExclusiveGroup: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did quest in exclusive group.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestExclusiveGroup: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did quest in exclusive group.", qInfo->GetQuestId());
}
return false;
}
@@ -15725,7 +15717,7 @@ bool Player::SatisfyQuestNextChain(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestNextChain: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did or started next quest in chain.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestNextChain: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did or started next quest in chain.", qInfo->GetQuestId());
}
return false;
}
@@ -15752,7 +15744,7 @@ bool Player::SatisfyQuestPrevChain(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestNextChain: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did or started next quest in chain.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestNextChain: Sent INVALIDREASON_DONT_HAVE_REQ (questId: %u) because player already did or started next quest in chain.", qInfo->GetQuestId());
}
return false;
}
@@ -15796,7 +15788,7 @@ bool Player::SatisfyQuestDay(Quest const* qInfo, bool msg)
if (msg)
{
SendCanTakeQuestResponse(INVALIDREASON_DAILY_QUESTS_REMAINING);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "SatisfyQuestDay: Sent INVALIDREASON_DAILY_QUESTS_REMAINING (questId: %u) because player already did all possible quests today.", qInfo->GetQuestId());
+ TC_LOG_DEBUG("misc", "SatisfyQuestDay: Sent INVALIDREASON_DAILY_QUESTS_REMAINING (questId: %u) because player already did all possible quests today.", qInfo->GetQuestId());
}
return false;
}
@@ -16602,14 +16594,14 @@ void Player::SendQuestComplete(uint32 quest_id)
WorldPacket data(SMSG_QUESTUPDATE_COMPLETE, 4);
data << uint32(quest_id);
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id);
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id);
}
}
void Player::SendQuestReward(Quest const* quest, uint32 XP)
{
uint32 questid = quest->GetQuestId();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid);
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid);
sGameEventMgr->HandleQuestComplete(questid);
WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4));
data << uint32(questid);
@@ -16639,7 +16631,7 @@ void Player::SendQuestFailed(uint32 questId, InventoryResult reason)
data << uint32(questId);
data << uint32(reason); // failed reason (valid reasons: 4, 16, 50, 17, 74, other values show default message)
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
}
}
@@ -16650,7 +16642,7 @@ void Player::SendQuestTimerFailed(uint32 quest_id)
WorldPacket data(SMSG_QUESTUPDATE_FAILEDTIMER, 4);
data << uint32(quest_id);
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
}
}
@@ -16659,7 +16651,7 @@ void Player::SendCanTakeQuestResponse(QuestFailedReason msg) const
WorldPacket data(SMSG_QUESTGIVER_QUEST_INVALID, 4);
data << uint32(msg);
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
}
void Player::SendQuestConfirmAccept(const Quest* quest, Player* pReceiver)
@@ -16679,7 +16671,7 @@ void Player::SendQuestConfirmAccept(const Quest* quest, Player* pReceiver)
data << uint64(GetGUID());
pReceiver->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
}
}
@@ -16691,14 +16683,14 @@ void Player::SendPushToPartyResponse(Player* player, uint8 msg)
data << uint64(player->GetGUID());
data << uint8(msg); // valid values: 0-8
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent MSG_QUEST_PUSH_RESULT");
+ TC_LOG_DEBUG("network", "WORLD: Sent MSG_QUEST_PUSH_RESULT");
}
}
void Player::SendQuestUpdateAddItem(Quest const* /*quest*/, uint32 /*item_idx*/, uint16 /*count*/)
{
WorldPacket data(SMSG_QUESTUPDATE_ADD_ITEM, 0);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM");
//data << quest->RequiredItemId[item_idx];
//data << count;
GetSession()->SendPacket(&data);
@@ -16714,7 +16706,7 @@ void Player::SendQuestUpdateAddCreatureOrGo(Quest const* quest, uint64 guid, uin
entry = (-entry) | 0x80000000;
WorldPacket data(SMSG_QUESTUPDATE_ADD_KILL, (4*4+8));
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL");
data << uint32(quest->GetQuestId());
data << uint32(entry);
data << uint32(old_count + add_count);
@@ -16732,7 +16724,7 @@ void Player::SendQuestUpdateAddPlayer(Quest const* quest, uint16 old_count, uint
ASSERT(old_count + add_count < 65536 && "player count store in 16 bits");
WorldPacket data(SMSG_QUESTUPDATE_ADD_PVP_KILL, (3*4));
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_ADD_PVP_KILL");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_PVP_KILL");
data << uint32(quest->GetQuestId());
data << uint32(old_count + add_count);
data << uint32(quest->GetPlayersSlain());
@@ -16800,7 +16792,7 @@ void Player::_LoadArenaTeamInfo(PreparedQueryResult result)
ArenaTeam* arenaTeam = sArenaTeamMgr->GetArenaTeamById(arenaTeamId);
if (!arenaTeam)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadArenaTeamInfo: couldn't load arenateam %u", arenaTeamId);
+ TC_LOG_ERROR("entities.player", "Player::_LoadArenaTeamInfo: couldn't load arenateam %u", arenaTeamId);
continue;
}
@@ -16955,7 +16947,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
{
std::string name = "<unknown>";
sObjectMgr->GetPlayerNameByGUID(guid, name);
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s (GUID: %u) not found in table `characters`, can't load. ", name.c_str(), guid);
+ TC_LOG_ERROR("entities.player", "Player %s (GUID: %u) not found in table `characters`, can't load. ", name.c_str(), guid);
return false;
}
@@ -16967,13 +16959,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// player should be able to load/delete character only with correct account!
if (dbAccountId != GetSession()->GetAccountId())
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (GUID: %u) loading from wrong account (is: %u, should be: %u)", guid, GetSession()->GetAccountId(), dbAccountId);
+ TC_LOG_ERROR("entities.player", "Player (GUID: %u) loading from wrong account (is: %u, should be: %u)", guid, GetSession()->GetAccountId(), dbAccountId);
return false;
}
if (holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BANNED))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (GUID: %u) is banned, can't load.", guid);
+ TC_LOG_ERROR("entities.player", "Player (GUID: %u) is banned, can't load.", guid);
return false;
}
@@ -16999,7 +16991,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
uint8 gender = fields[5].GetUInt8();
if (!IsValidGender(gender))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (GUID: %u) has wrong gender (%u), can't be loaded.", guid, gender);
+ TC_LOG_ERROR("entities.player", "Player (GUID: %u) has wrong gender (%u), can't be loaded.", guid, gender);
return false;
}
@@ -17053,7 +17045,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
m_items[slot] = NULL;
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Load Basic value of player %s is: ", m_name.c_str());
+ TC_LOG_DEBUG("entities.player.loading", "Load Basic value of player %s is: ", m_name.c_str());
outDebugValues();
//Need to call it to initialize m_team (m_team can be calculated from race)
@@ -17067,7 +17059,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
InitPrimaryProfessions(); // to max set before any spell loaded
// init saved position, and fix it later if problematic
- uint32 transGUID = fields[30].GetUInt32();
+ uint32 transLowGUID = fields[30].GetUInt32();
Relocate(fields[12].GetFloat(), fields[13].GetFloat(), fields[14].GetFloat(), fields[16].GetFloat());
uint32 mapId = fields[15].GetUInt16();
uint32 instanceId = fields[58].GetUInt32();
@@ -17122,7 +17114,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
if (!mapEntry || !IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) have invalid coordinates (MapId: %u X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
+ TC_LOG_ERROR("entities.player", "Player (guidlow %d) have invalid coordinates (MapId: %u X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
RelocateToHomebind();
}
// Player was saved in Arena or Bg
@@ -17162,7 +17154,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
//if (mapId == MAPID_INVALID) -- code kept for reference
if (int16(mapId) == int16(-1)) // Battleground Entry Point not found (???)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.", guid);
+ TC_LOG_ERROR("entities.player", "Player (guidlow %d) was in BG in database, but BG was not found, and entry point was invalid! Teleport to default race/class locations.", guid);
RelocateToHomebind();
}
else
@@ -17173,41 +17165,50 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
}
// currently we do not support transport in bg
- else if (transGUID)
+ else if (transLowGUID)
{
- m_movementInfo.transport.guid = MAKE_NEW_GUID(transGUID, 0, HIGHGUID_MO_TRANSPORT);
- m_movementInfo.transport.pos.Relocate(fields[26].GetFloat(), fields[27].GetFloat(), fields[28].GetFloat(), fields[29].GetFloat());
+ uint64 transGUID = MAKE_NEW_GUID(transLowGUID, 0, HIGHGUID_MO_TRANSPORT);
- if (!Trinity::IsValidMapCoord(
- GetPositionX()+m_movementInfo.transport.pos.m_positionX, GetPositionY()+m_movementInfo.transport.pos.m_positionY,
- GetPositionZ()+m_movementInfo.transport.pos.m_positionZ, GetOrientation()+m_movementInfo.transport.pos.m_orientation) ||
- // transport size limited
- m_movementInfo.transport.pos.m_positionX > 250 || m_movementInfo.transport.pos.m_positionY > 250 || m_movementInfo.transport.pos.m_positionZ > 250)
- {
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to bind location.",
- guid, GetPositionX()+m_movementInfo.transport.pos.m_positionX, GetPositionY()+m_movementInfo.transport.pos.m_positionY,
- GetPositionZ()+m_movementInfo.transport.pos.m_positionZ, GetOrientation()+m_movementInfo.transport.pos.m_orientation);
+ if (GameObject* go = HashMapHolder<GameObject>::Find(transGUID))
+ m_transport = go->ToTransport();
- RelocateToHomebind();
- }
- else
+ if (m_transport)
{
- if (GameObject* go = HashMapHolder<GameObject>::Find(m_movementInfo.transport.guid))
- m_transport = go->ToTransport();
+ m_movementInfo.transport.guid = transGUID;
+ float x = fields[26].GetFloat(), y = fields[27].GetFloat(), z = fields[28].GetFloat(), o = fields[29].GetFloat();
+ m_movementInfo.transport.pos.Relocate(x, y, z, o);
+ m_transport->CalculatePassengerPosition(x, y, z, &o);
- if (m_transport)
+ if (!Trinity::IsValidMapCoord(x, y, z, o) ||
+ // transport size limited
+ std::fabs(m_movementInfo.transport.pos.GetPositionX()) > 250.0f ||
+ std::fabs(m_movementInfo.transport.pos.GetPositionY()) > 250.0f ||
+ std::fabs(m_movementInfo.transport.pos.GetPositionZ()) > 250.0f)
{
- m_transport->AddPassenger(this);
- mapId = m_transport->GetMapId();
+ TC_LOG_ERROR("entities.player", "Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to bind location.",
+ guid, x, y, z, o);
+
+ m_transport = NULL;
+ m_movementInfo.transport.Reset();
+
+ RelocateToHomebind();
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.",
- guid, transGUID);
+ Relocate(x, y, z, o);
+ mapId = m_transport->GetMapId();
- RelocateToHomebind();
+ m_transport->AddPassenger(this);
+ AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
}
}
+ else
+ {
+ TC_LOG_ERROR("entities.player", "Player (guidlow %u) have problems with transport guid (%u). Teleport to bind location.",
+ guid, transLowGUID);
+
+ RelocateToHomebind();
+ }
}
// currently we do not support taxi in instance
else if (!taxi_nodes.empty())
@@ -17229,12 +17230,12 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (!nodeEntry) // don't know taxi start node, to homebind
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Character %u have wrong data in taxi destination list, teleport to homebind.", GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Character %u have wrong data in taxi destination list, teleport to homebind.", GetGUIDLow());
RelocateToHomebind();
}
else // have start node, to it
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Character %u have too short taxi destination list, teleport to original node.", GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Character %u have too short taxi destination list, teleport to original node.", GetGUIDLow());
mapId = nodeEntry->map_id;
Relocate(nodeEntry->x, nodeEntry->y, nodeEntry->z, 0.0f);
}
@@ -17263,7 +17264,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
{
if (GetSession()->Expansion() < mapEntry->Expansion())
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player %s using client without required expansion tried login at non accessible map %u", GetName().c_str(), mapId);
+ TC_LOG_DEBUG("entities.player.loading", "Player %s using client without required expansion tried login at non accessible map %u", GetName().c_str(), mapId);
RelocateToHomebind();
}
@@ -17284,13 +17285,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(mapId);
if (at)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
+ TC_LOG_ERROR("entities.player", "Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
Relocate(at->target_X, at->target_Y, at->target_Z, GetOrientation());
mapId = at->target_mapId;
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
+ TC_LOG_ERROR("entities.player", "Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
RelocateToHomebind();
}
@@ -17300,11 +17301,11 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
mapId = info->mapId;
Relocate(info->positionX, info->positionY, info->positionZ, 0.0f);
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "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());
+ TC_LOG_ERROR("entities.player", "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 = sMapMgr->CreateMap(mapId, this);
if (!map)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "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());
+ TC_LOG_ERROR("entities.player", "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());
return false;
}
}
@@ -17318,7 +17319,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
Relocate(at->target_X, at->target_Y, at->target_Z, at->target_Orientation);
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s(GUID: %u) logged in to a reset instance (map: %u) and there is no area-trigger leading to this map. Thus he can't be ported back to the entrance. This _might_ be an exploit attempt.", GetName().c_str(), GetGUIDLow(), mapId);
+ TC_LOG_ERROR("entities.player", "Player %s(GUID: %u) logged in to a reset instance (map: %u) and there is no area-trigger leading to this map. Thus he can't be ported back to the entrance. This _might_ be an exploit attempt.", GetName().c_str(), GetGUIDLow(), mapId);
RelocateToHomebind();
}
}
@@ -17360,7 +17361,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
m_stableSlots = fields[32].GetUInt8();
if (m_stableSlots > MAX_PET_STABLES)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player can have not more %u stable slots, but have in DB %u", MAX_PET_STABLES, uint32(m_stableSlots));
+ TC_LOG_ERROR("entities.player", "Player can have not more %u stable slots, but have in DB %u", MAX_PET_STABLES, uint32(m_stableSlots));
m_stableSlots = MAX_PET_STABLES;
}
@@ -17438,7 +17439,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (m_specsCount > MAX_TALENT_SPECS || m_activeSpec > MAX_TALENT_SPEC || m_specsCount < MIN_TALENT_SPECS)
{
m_activeSpec = 0;
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName().c_str(), GetGUIDLow(), m_specsCount, m_activeSpec);
+ TC_LOG_ERROR("entities.player", "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName().c_str(), GetGUIDLow(), m_specsCount, m_activeSpec);
}
_LoadTalents(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_TALENTS));
@@ -17512,7 +17513,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
SetPower(Powers(i), savedPower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedPower);
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "The value of player %s after load item and aura is: ", m_name.c_str());
+ TC_LOG_DEBUG("entities.player.loading", "The value of player %s after load item and aura is: ", m_name.c_str());
outDebugValues();
// GM state
@@ -17644,7 +17645,7 @@ void Player::_LoadActions(PreparedQueryResult result)
ab->uState = ACTIONBUTTON_UNCHANGED;
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, " ...at loading, and will deleted in DB also");
+ TC_LOG_ERROR("entities.player", " ...at loading, and will deleted in DB also");
// Will deleted in DB at next save (it can create data until save but marked as deleted)
m_actionButtons[button].uState = ACTIONBUTTON_DELETED;
@@ -17655,7 +17656,7 @@ void Player::_LoadActions(PreparedQueryResult result)
void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Loading auras for player %u", GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.loading", "Loading auras for player %u", GetGUIDLow());
/* 0 1 2 3 4 5 6 7 8 9 10
QueryResult* result = CharacterDatabase.PQuery("SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2,
@@ -17688,7 +17689,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Unknown aura (spellid %u), ignore.", spellid);
+ TC_LOG_ERROR("entities.player", "Unknown aura (spellid %u), ignore.", spellid);
continue;
}
@@ -17722,7 +17723,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, &damage[0]);
aura->ApplyForTargets();
- TC_LOG_INFO(LOG_FILTER_PLAYER, "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
+ TC_LOG_INFO("entities.player", "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
}
}
while (result->NextRow());
@@ -17745,13 +17746,13 @@ void Player::_LoadGlyphAuras()
continue;
}
else
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags);
+ TC_LOG_ERROR("entities.player", "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags);
}
else
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i);
+ TC_LOG_ERROR("entities.player", "Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i);
}
else
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s has not existing glyph entry %u on index %u", m_name.c_str(), glyph, i);
+ TC_LOG_ERROR("entities.player", "Player %s has not existing glyph entry %u on index %u", m_name.c_str(), glyph, i);
// On any error remove glyph
SetGlyph(i, 0);
@@ -17861,7 +17862,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?",
+ TC_LOG_ERROR("entities.player", "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?",
GetGUIDLow(), GetName().c_str(), item->GetGUIDLow(), item->GetEntry(), bagGuid, slot);
item->DeleteFromInventoryDB(trans);
delete item;
@@ -17875,7 +17876,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
item->SetState(ITEM_UNCHANGED, this);
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which can't be loaded into inventory (Bag GUID: %u, slot: %u) by reason %u. Item will be sent by mail.",
+ TC_LOG_ERROR("entities.player", "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which can't be loaded into inventory (Bag GUID: %u, slot: %u) by reason %u. Item will be sent by mail.",
GetGUIDLow(), GetName().c_str(), item->GetGUIDLow(), item->GetEntry(), bagGuid, slot, err);
item->DeleteFromInventoryDB(trans);
problematicItems.push_back(item);
@@ -17920,14 +17921,14 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
// Do not allow to have item limited to another map/zone in alive state
if (IsAlive() && item->IsLimitedToAnotherMapOrZone(GetMapId(), zoneId))
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player::_LoadInventory: player (GUID: %u, name: '%s', map: %u) has item (GUID: %u, entry: %u) limited to another map (%u). Deleting item.",
+ TC_LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (GUID: %u, name: '%s', map: %u) has item (GUID: %u, entry: %u) limited to another map (%u). Deleting item.",
GetGUIDLow(), GetName().c_str(), GetMapId(), item->GetGUIDLow(), item->GetEntry(), zoneId);
remove = true;
}
// "Conjured items disappear if you are logged out for more than 15 minutes"
else if (timeDiff > 15 * MINUTE && proto->Flags & ITEM_PROTO_FLAG_CONJURED)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player::_LoadInventory: player (GUID: %u, name: '%s', diff: %u) has conjured item (GUID: %u, entry: %u) with expired lifetime (15 minutes). Deleting item.",
+ TC_LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (GUID: %u, name: '%s', diff: %u) has conjured item (GUID: %u, entry: %u) with expired lifetime (15 minutes). Deleting item.",
GetGUIDLow(), GetName().c_str(), timeDiff, item->GetGUIDLow(), item->GetEntry());
remove = true;
}
@@ -17935,7 +17936,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
{
if (item->GetPlayedTime() > (2 * HOUR))
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) with expired refund time (%u). Deleting refund data and removing refundable flag.",
+ TC_LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) with expired refund time (%u). Deleting refund data and removing refundable flag.",
GetGUIDLow(), GetName().c_str(), item->GetGUIDLow(), item->GetEntry(), item->GetPlayedTime());
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_REFUND_INSTANCE);
@@ -17958,7 +17959,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) with refundable flags, but without data in item_refund_instance. Removing flag.",
+ TC_LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) with refundable flags, but without data in item_refund_instance. Removing flag.",
GetGUIDLow(), GetName().c_str(), item->GetGUIDLow(), item->GetEntry());
item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE);
}
@@ -17986,7 +17987,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) with ITEM_FLAG_BOP_TRADEABLE flag, but without data in item_soulbound_trade_data. Removing flag.",
+ TC_LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) with ITEM_FLAG_BOP_TRADEABLE flag, but without data in item_soulbound_trade_data. Removing flag.",
GetGUIDLow(), GetName().c_str(), item->GetGUIDLow(), item->GetEntry());
item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE);
}
@@ -18008,7 +18009,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has broken item (GUID: %u, entry: %u) in inventory. Deleting item.",
+ TC_LOG_ERROR("entities.player", "Player::_LoadInventory: player (GUID: %u, name: '%s') has broken item (GUID: %u, entry: %u) in inventory. Deleting item.",
GetGUIDLow(), GetName().c_str(), itemGuid, itemEntry);
remove = true;
}
@@ -18023,7 +18024,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadInventory: player (GUID: %u, name: '%s') has unknown item (entry: %u) in inventory. Deleting item.",
+ TC_LOG_ERROR("entities.player", "Player::_LoadInventory: player (GUID: %u, name: '%s') has unknown item (entry: %u) in inventory. Deleting item.",
GetGUIDLow(), GetName().c_str(), itemEntry);
Item::DeleteFromInventoryDB(trans, itemGuid);
Item::DeleteFromDB(trans, itemGuid);
@@ -18054,7 +18055,7 @@ void Player::_LoadMailedItems(Mail* mail)
if (!proto)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %u has unknown item_template (ProtoType) in mailed items(GUID: %u template: %u) in mail (%u), deleted.", GetGUIDLow(), itemGuid, itemTemplate, mail->messageID);
+ TC_LOG_ERROR("entities.player", "Player %u has unknown item_template (ProtoType) in mailed items(GUID: %u template: %u) in mail (%u), deleted.", GetGUIDLow(), itemGuid, itemTemplate, mail->messageID);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_MAIL_ITEM);
stmt->setUInt32(0, itemGuid);
@@ -18070,7 +18071,7 @@ void Player::_LoadMailedItems(Mail* mail)
if (!item->LoadFromDB(itemGuid, MAKE_NEW_GUID(fields[13].GetUInt32(), 0, HIGHGUID_PLAYER), fields, itemTemplate))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, itemGuid);
+ TC_LOG_ERROR("entities.player", "Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, itemGuid);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_MAIL_ITEM);
stmt->setUInt32(0, itemGuid);
@@ -18133,7 +18134,7 @@ void Player::_LoadMail()
if (m->mailTemplateId && !sMailTemplateStore.LookupEntry(m->mailTemplateId))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
+ TC_LOG_ERROR("entities.player", "Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
m->mailTemplateId = 0;
}
@@ -18190,7 +18191,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
else
{
questStatusData.Status = QUEST_STATUS_INCOMPLETE;
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s (GUID: %u) has invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).",
+ TC_LOG_ERROR("entities.player", "Player %s (GUID: %u) has invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).",
GetName().c_str(), GetGUIDLow(), quest_id, qstatus);
}
@@ -18240,7 +18241,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
++slot;
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.Status, quest_id, GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.loading", "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.Status, quest_id, GetGUIDLow());
}
}
while (result->NextRow());
@@ -18314,7 +18315,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result)
if (quest_daily_idx >= PLAYER_MAX_DAILY_QUESTS) // max amount with exist data in query
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (GUID: %u) have more 25 daily quest records in `charcter_queststatus_daily`", GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Player (GUID: %u) have more 25 daily quest records in `charcter_queststatus_daily`", GetGUIDLow());
break;
}
@@ -18330,7 +18331,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result)
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx, quest_id);
++quest_daily_idx;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Daily quest (%u) cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.loading", "Daily quest (%u) cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while (result->NextRow());
}
@@ -18353,7 +18354,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result)
continue;
m_weeklyquests.insert(quest_id);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.loading", "Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while (result->NextRow());
}
@@ -18377,7 +18378,7 @@ void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result)
continue;
m_seasonalquests[event_id].insert(quest_id);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Seasonal quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.loading", "Seasonal quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while (result->NextRow());
}
@@ -18400,7 +18401,7 @@ void Player::_LoadMonthlyQuestStatus(PreparedQueryResult result)
continue;
m_monthlyquests.insert(quest_id);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "Monthly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
+ TC_LOG_DEBUG("entities.player.loading", "Monthly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while (result->NextRow());
}
@@ -18470,12 +18471,12 @@ void Player::_LoadBoundInstances(PreparedQueryResult result)
if (!mapEntry || !mapEntry->IsDungeon())
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d (%s)", GetName().c_str(), GetGUIDLow(), mapId, mapname.c_str());
+ TC_LOG_ERROR("entities.player", "_LoadBoundInstances: player %s(%d) has bind to not existed or not dungeon map %d (%s)", GetName().c_str(), GetGUIDLow(), mapId, mapname.c_str());
deleteInstance = true;
}
else if (difficulty >= MAX_DIFFICULTY)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u (%s)", GetName().c_str(), GetGUIDLow(), difficulty, mapId, mapname.c_str());
+ TC_LOG_ERROR("entities.player", "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u (%s)", GetName().c_str(), GetGUIDLow(), difficulty, mapId, mapname.c_str());
deleteInstance = true;
}
else
@@ -18483,12 +18484,12 @@ void Player::_LoadBoundInstances(PreparedQueryResult result)
MapDifficulty const* mapDiff = GetMapDifficultyData(mapId, Difficulty(difficulty));
if (!mapDiff)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u (%s)", GetName().c_str(), GetGUIDLow(), difficulty, mapId, mapname.c_str());
+ TC_LOG_ERROR("entities.player", "_LoadBoundInstances: player %s(%d) has bind to not existed difficulty %d instance for map %u (%s)", GetName().c_str(), GetGUIDLow(), difficulty, mapId, mapname.c_str());
deleteInstance = true;
}
else if (!perm && group)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d (%s), %d, %d", GetName().c_str(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, mapname.c_str(), instanceId, difficulty);
+ TC_LOG_ERROR("entities.player", "_LoadBoundInstances: player %s(%d) is in group %d but has a non-permanent character bind to map %d (%s), %d, %d", GetName().c_str(), GetGUIDLow(), GUID_LOPART(group->GetGUID()), mapId, mapname.c_str(), instanceId, difficulty);
deleteInstance = true;
}
}
@@ -18614,7 +18615,7 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave* save, bool permanent, b
bind.save = save;
bind.perm = permanent;
if (!load)
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName().c_str(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
+ TC_LOG_DEBUG("maps", "Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName().c_str(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
sScriptMgr->OnPlayerBindToInstance(this, save->GetDifficulty(), save->GetMapId(), permanent);
return &bind;
}
@@ -18856,7 +18857,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
if (!info)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (Name %s) has incorrect race/class pair. Can't be loaded.", GetName().c_str());
+ TC_LOG_ERROR("entities.player", "Player (Name %s) has incorrect race/class pair. Can't be loaded.", GetName().c_str());
return false;
}
@@ -18904,7 +18905,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
CharacterDatabase.Execute(stmt);
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Setting player home position - mapid: %u, areaid: %u, X: %f, Y: %f, Z: %f",
+ TC_LOG_DEBUG("entities.player", "Setting player home position - mapid: %u, areaid: %u, X: %f, Y: %f, Z: %f",
m_homebindMapId, m_homebindAreaId, m_homebindX, m_homebindY, m_homebindZ);
return true;
@@ -18929,7 +18930,7 @@ void Player::SaveToDB(bool create /*=false*/)
// first save/honor gain after midnight will also update the player's honor fields
UpdateHonorFields();
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "The value of player %s at save: ", m_name.c_str());
+ TC_LOG_DEBUG("entities.unit", "The value of player %s at save: ", m_name.c_str());
outDebugValues();
PreparedStatement* stmt = NULL;
@@ -18959,6 +18960,14 @@ void Player::SaveToDB(bool create /*=false*/)
stmt->setFloat(index++, finiteAlways(GetPositionY()));
stmt->setFloat(index++, finiteAlways(GetPositionZ()));
stmt->setFloat(index++, finiteAlways(GetOrientation()));
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetX()));
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetY()));
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetZ()));
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetO()));
+ uint32 transLowGUID = 0;
+ if (GetTransport())
+ transLowGUID = GetTransport()->GetGUIDLow();
+ stmt->setUInt32(index++, transLowGUID);
std::ostringstream ss;
ss << m_taxi;
@@ -19071,6 +19080,15 @@ void Player::SaveToDB(bool create /*=false*/)
stmt->setFloat(index++, finiteAlways(GetTeleportDest().GetOrientation()));
}
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetX()));
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetY()));
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetZ()));
+ stmt->setFloat(index++, finiteAlways(GetTransOffsetO()));
+ uint32 transLowGUID = 0;
+ if (GetTransport())
+ transLowGUID = GetTransport()->GetGUIDLow();
+ stmt->setUInt32(index++, transLowGUID);
+
std::ostringstream ss;
ss << m_taxi;
stmt->setString(index++, ss.str());
@@ -19349,7 +19367,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Can't find item guid %u but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Can't find item guid %u but is in refundable storage for player %u ! Removing.", *itr, GetGUIDLow());
m_refundableItems.erase(itr);
}
}
@@ -19380,7 +19398,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
uint32 bagTestGUID = 0;
if (Item* test2 = GetItemByPos(INVENTORY_SLOT_BAG_0, item->GetBagSlot()))
bagTestGUID = test2->GetGUIDLow();
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u (state %d) are incorrect, the player doesn't have an item at that position!", lowGuid, GetName().c_str(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), (int32)item->GetState());
+ TC_LOG_ERROR("entities.player", "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u (state %d) are incorrect, the player doesn't have an item at that position!", lowGuid, GetName().c_str(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), (int32)item->GetState());
// according to the test that was just performed nothing should be in this slot, delete
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INVENTORY_BY_BAG_SLOT);
stmt->setUInt32(0, bagTestGUID);
@@ -19396,7 +19414,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
}
else if (test != item)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u are incorrect, the item with guid %u is there instead!", lowGuid, GetName().c_str(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item with guid %u are incorrect, the item with guid %u is there instead!", lowGuid, GetName().c_str(), item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
// save all changes to the item...
if (item->GetState() != ITEM_NEW) // only for existing items, no dupes
item->SaveToDB(trans);
@@ -19826,21 +19844,21 @@ void Player::_SaveStats(SQLTransaction& trans)
void Player::outDebugValues() const
{
- if (!sLog->ShouldLog(LOG_FILTER_UNITS, LOG_LEVEL_DEBUG))
+ if (!sLog->ShouldLog("entities.unit", LOG_LEVEL_DEBUG))
return;
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "HP is: \t\t\t%u\t\tMP is: \t\t\t%u", GetMaxHealth(), GetMaxPower(POWER_MANA));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f", GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f", GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "STAMINA is: \t\t%f", GetStat(STAT_STAMINA));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Armor is: \t\t%u\t\tBlock is: \t\t%f", GetArmor(), GetFloatValue(PLAYER_BLOCK_PERCENTAGE));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "HolyRes is: \t\t%u\t\tFireRes is: \t\t%u", GetResistance(SPELL_SCHOOL_HOLY), GetResistance(SPELL_SCHOOL_FIRE));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "NatureRes is: \t\t%u\t\tFrostRes is: \t\t%u", GetResistance(SPELL_SCHOOL_NATURE), GetResistance(SPELL_SCHOOL_FROST));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "ShadowRes is: \t\t%u\t\tArcaneRes is: \t\t%u", GetResistance(SPELL_SCHOOL_SHADOW), GetResistance(SPELL_SCHOOL_ARCANE));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "MIN_DAMAGE is: \t\t%f\tMAX_DAMAGE is: \t\t%f", GetFloatValue(UNIT_FIELD_MINDAMAGE), GetFloatValue(UNIT_FIELD_MAXDAMAGE));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f", GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f", GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u", GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK));
+ TC_LOG_DEBUG("entities.unit", "HP is: \t\t\t%u\t\tMP is: \t\t\t%u", GetMaxHealth(), GetMaxPower(POWER_MANA));
+ TC_LOG_DEBUG("entities.unit", "AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f", GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH));
+ TC_LOG_DEBUG("entities.unit", "INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f", GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT));
+ TC_LOG_DEBUG("entities.unit", "STAMINA is: \t\t%f", GetStat(STAT_STAMINA));
+ TC_LOG_DEBUG("entities.unit", "Armor is: \t\t%u\t\tBlock is: \t\t%f", GetArmor(), GetFloatValue(PLAYER_BLOCK_PERCENTAGE));
+ TC_LOG_DEBUG("entities.unit", "HolyRes is: \t\t%u\t\tFireRes is: \t\t%u", GetResistance(SPELL_SCHOOL_HOLY), GetResistance(SPELL_SCHOOL_FIRE));
+ TC_LOG_DEBUG("entities.unit", "NatureRes is: \t\t%u\t\tFrostRes is: \t\t%u", GetResistance(SPELL_SCHOOL_NATURE), GetResistance(SPELL_SCHOOL_FROST));
+ TC_LOG_DEBUG("entities.unit", "ShadowRes is: \t\t%u\t\tArcaneRes is: \t\t%u", GetResistance(SPELL_SCHOOL_SHADOW), GetResistance(SPELL_SCHOOL_ARCANE));
+ TC_LOG_DEBUG("entities.unit", "MIN_DAMAGE is: \t\t%f\tMAX_DAMAGE is: \t\t%f", GetFloatValue(UNIT_FIELD_MINDAMAGE), GetFloatValue(UNIT_FIELD_MAXDAMAGE));
+ TC_LOG_DEBUG("entities.unit", "MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f", GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE));
+ TC_LOG_DEBUG("entities.unit", "MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f", GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE));
+ TC_LOG_DEBUG("entities.unit", "ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u", GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK));
}
/*********************************************************/
@@ -20154,7 +20172,7 @@ Pet* Player::GetPet() const
return pet;
//there may be a guardian in slot
- //TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::GetPet: Pet %u not exist.", GUID_LOPART(pet_guid));
+ //TC_LOG_ERROR("entities.player", "Player::GetPet: Pet %u not exist.", GUID_LOPART(pet_guid));
//const_cast<Player*>(this)->SetPetGUID(0);
}
@@ -20168,7 +20186,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
if (pet)
{
- TC_LOG_DEBUG(LOG_FILTER_PETS, "RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent);
+ TC_LOG_DEBUG("entities.pet", "RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent);
if (pet->m_removed)
return;
@@ -20256,10 +20274,10 @@ void Player::StopCastingCharm()
if (GetCharmGUID())
{
- TC_LOG_FATAL(LOG_FILTER_PLAYER, "Player %s (GUID: " UI64FMTD " is not able to uncharm unit (GUID: " UI64FMTD " Entry: %u, Type: %u)", GetName().c_str(), GetGUID(), GetCharmGUID(), charm->GetEntry(), charm->GetTypeId());
+ TC_LOG_FATAL("entities.player", "Player %s (GUID: " UI64FMTD " is not able to uncharm unit (GUID: " UI64FMTD " Entry: %u, Type: %u)", GetName().c_str(), GetGUID(), GetCharmGUID(), charm->GetEntry(), charm->GetTypeId());
if (charm->GetCharmerGUID())
{
- TC_LOG_FATAL(LOG_FILTER_PLAYER, "Charmed unit has charmer guid " UI64FMTD, charm->GetCharmerGUID());
+ TC_LOG_FATAL("entities.player", "Charmed unit has charmer guid " UI64FMTD, charm->GetCharmerGUID());
ASSERT(false);
}
else
@@ -20377,7 +20395,7 @@ void Player::PetSpellInitialize()
if (!pet)
return;
- TC_LOG_DEBUG(LOG_FILTER_PETS, "Pet Spells Groups");
+ TC_LOG_DEBUG("entities.pet", "Pet Spells Groups");
CharmInfo* charmInfo = pet->GetCharmInfo();
@@ -20433,13 +20451,13 @@ void Player::PetSpellInitialize()
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILLISECONDS : 0;
data << uint32(itr->first); // spell ID
- CreatureSpellCooldowns::const_iterator categoryitr = pet->m_CreatureCategoryCooldowns.find(spellInfo->Category);
+ CreatureSpellCooldowns::const_iterator categoryitr = pet->m_CreatureCategoryCooldowns.find(spellInfo->GetCategory());
if (categoryitr != pet->m_CreatureCategoryCooldowns.end())
{
time_t categoryCooldown = (categoryitr->second > curTime) ? (categoryitr->second - curTime) * IN_MILLISECONDS : 0;
- data << uint16(spellInfo->Category); // spell category
- data << uint32(cooldown); // spell cooldown
- data << uint32(categoryCooldown); // category cooldown
+ data << uint16(spellInfo->GetCategory()); // spell category
+ data << uint32(cooldown); // spell cooldown
+ data << uint32(categoryCooldown); // category cooldown
}
else
{
@@ -20462,7 +20480,7 @@ void Player::PossessSpellInitialize()
if (!charmInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::PossessSpellInitialize(): charm (" UI64FMTD ") has no charminfo!", charm->GetGUID());
+ TC_LOG_ERROR("entities.player", "Player::PossessSpellInitialize(): charm (" UI64FMTD ") has no charminfo!", charm->GetGUID());
return;
}
@@ -20510,7 +20528,7 @@ void Player::VehicleSpellInitialize()
ConditionList conditions = sConditionMgr->GetConditionsForVehicleSpell(vehicle->GetEntry(), spellId);
if (!sConditionMgr->IsObjectMeetToConditions(this, vehicle, conditions))
{
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", vehicle->ToCreature()->GetEntry(), spellId);
+ TC_LOG_DEBUG("condition", "VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", vehicle->ToCreature()->GetEntry(), spellId);
data << uint16(0) << uint8(0) << uint8(i+8);
continue;
}
@@ -20546,13 +20564,13 @@ void Player::VehicleSpellInitialize()
time_t cooldown = (itr->second > now) ? (itr->second - now) * IN_MILLISECONDS : 0;
data << uint32(itr->first); // spell ID
- CreatureSpellCooldowns::const_iterator categoryitr = vehicle->m_CreatureCategoryCooldowns.find(spellInfo->Category);
+ CreatureSpellCooldowns::const_iterator categoryitr = vehicle->m_CreatureCategoryCooldowns.find(spellInfo->GetCategory());
if (categoryitr != vehicle->m_CreatureCategoryCooldowns.end())
{
time_t categoryCooldown = (categoryitr->second > now) ? (categoryitr->second - now) * IN_MILLISECONDS : 0;
- data << uint16(spellInfo->Category); // spell category
- data << uint32(cooldown); // spell cooldown
- data << uint32(categoryCooldown); // category cooldown
+ data << uint16(spellInfo->GetCategory()); // spell category
+ data << uint32(cooldown); // spell cooldown
+ data << uint32(categoryCooldown); // category cooldown
}
else
{
@@ -20574,7 +20592,7 @@ void Player::CharmSpellInitialize()
CharmInfo* charmInfo = charm->GetCharmInfo();
if (!charmInfo)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::CharmSpellInitialize(): the player's charm (" UI64FMTD ") has no charminfo!", charm->GetGUID());
+ TC_LOG_ERROR("entities.player", "Player::CharmSpellInitialize(): the player's charm (" UI64FMTD ") has no charminfo!", charm->GetGUID());
return;
}
@@ -20644,7 +20662,7 @@ bool Player::IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod
void Player::AddSpellMod(SpellModifier* mod, bool apply)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Player::AddSpellMod %d", mod->spellId);
+ TC_LOG_DEBUG("spells", "Player::AddSpellMod %d", mod->spellId);
uint16 Opcode = (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER;
int i = 0;
@@ -21150,7 +21168,7 @@ void Player::ContinueTaxiFlight()
if (!sourceNode)
return;
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Restart character %u taxi flight", GetGUIDLow());
+ TC_LOG_DEBUG("entities.unit", "WORLD: Restart character %u taxi flight", GetGUIDLow());
uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourceNode, GetTeam(), true);
if (!mountDisplayId)
@@ -21220,7 +21238,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
}
// Not send cooldown for this spells
- if (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (spellInfo->IsCooldownStartedOnEvent())
continue;
if (spellInfo->PreventionType != SPELL_PREVENTION_TYPE_SILENCE)
@@ -21288,7 +21306,7 @@ void Player::InitDisplayIds()
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass());
if (!info)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow());
+ TC_LOG_ERROR("entities.player", "Player %u has incorrect race/class pair. Can't init display ids.", GetGUIDLow());
return;
}
@@ -21304,7 +21322,7 @@ void Player::InitDisplayIds()
SetNativeDisplayId(info->displayId_m);
break;
default:
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Invalid gender %u for player", gender);
+ TC_LOG_ERROR("entities.player", "Invalid gender %u for player", gender);
return;
}
}
@@ -21394,7 +21412,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
Creature* creature = GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)));
+ TC_LOG_DEBUG("network", "WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)));
SendBuyError(BUY_ERR_DISTANCE_TOO_FAR, NULL, item, 0);
return false;
}
@@ -21441,7 +21459,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost);
if (!iece)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost);
+ TC_LOG_ERROR("entities.player", "Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost);
return false;
}
@@ -21484,7 +21502,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
uint32 maxCount = MAX_MONEY_AMOUNT / pProto->BuyPrice;
if ((uint32)count > maxCount)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s tried to buy %u item id %u, causing overflow", GetName().c_str(), (uint32)count, pProto->ItemId);
+ TC_LOG_ERROR("entities.player", "Player %s tried to buy %u item id %u, causing overflow", GetName().c_str(), (uint32)count, pProto->ItemId);
count = (uint8)maxCount;
}
price = pProto->BuyPrice * count; //it should not exceed MAX_MONEY_AMOUNT
@@ -21578,7 +21596,7 @@ void Player::UpdateHomebindTime(uint32 time)
data << uint32(m_HomebindTimer);
data << uint32(1);
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName().c_str(), GetGUIDLow());
+ TC_LOG_DEBUG("maps", "PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName().c_str(), GetGUIDLow());
}
}
@@ -21683,7 +21701,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite
// if no cooldown found above then base at DBC data
if (rec < 0 && catrec < 0)
{
- cat = spellInfo->Category;
+ cat = spellInfo->GetCategory();
rec = spellInfo->RecoveryTime;
catrec = spellInfo->CategoryRecoveryTime;
}
@@ -21734,8 +21752,8 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite
// category spells
if (cat && catrec > 0)
{
- SpellCategoryStore::const_iterator i_scstore = sSpellCategoryStore.find(cat);
- if (i_scstore != sSpellCategoryStore.end())
+ SpellCategoryStore::const_iterator i_scstore = sSpellsByCategoryStore.find(cat);
+ if (i_scstore != sSpellsByCategoryStore.end())
{
for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
{
@@ -21882,7 +21900,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
}
}
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no");
+ TC_LOG_DEBUG("entities.player.items", "Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no");
return activate;
}
@@ -21994,7 +22012,7 @@ void Player::SetBattlegroundEntryPoint()
if (const WorldSafeLocsEntry* entry = sObjectMgr->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam()))
m_bgData.joinPos = WorldLocation(entry->map_id, entry->x, entry->y, entry->z, 0.0f);
else
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "SetBattlegroundEntryPoint: Dungeon map %u has no linked graveyard, setting home location as entry point.", GetMapId());
+ TC_LOG_ERROR("entities.player", "SetBattlegroundEntryPoint: Dungeon map %u has no linked graveyard, setting home location as entry point.", GetMapId());
}
// If new entry point is not BG or arena set it
else if (!GetMap()->IsBattlegroundOrArena())
@@ -22193,9 +22211,7 @@ inline void UpdateVisibilityOf_helper(std::set<uint64>& s64, Player* target, std
}
template<class T>
-inline void BeforeVisibilityDestroy(T* /*t*/, Player* /*p*/)
-{
-}
+inline void BeforeVisibilityDestroy(T* /*t*/, Player* /*p*/) { }
template<>
inline void BeforeVisibilityDestroy<Creature>(Creature* t, Player* p)
@@ -22217,7 +22233,7 @@ void Player::UpdateVisibilityOf(WorldObject* target)
m_clientGUIDs.erase(target->GetGUID());
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object %u (Type: %u) out of range for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), GetGUIDLow(), GetDistance(target));
+ TC_LOG_DEBUG("maps", "Object %u (Type: %u) out of range for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), GetGUIDLow(), GetDistance(target));
#endif
}
}
@@ -22229,7 +22245,7 @@ void Player::UpdateVisibilityOf(WorldObject* target)
m_clientGUIDs.insert(target->GetGUID());
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object %u (Type: %u) is visible now for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), GetGUIDLow(), GetDistance(target));
+ TC_LOG_DEBUG("maps", "Object %u (Type: %u) is visible now for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), GetGUIDLow(), GetDistance(target));
#endif
// target aura duration for caster show only if target exist at caster client
@@ -22305,7 +22321,7 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi
m_clientGUIDs.erase(target->GetGUID());
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object %u (Type: %u, Entry: %u) is out of range for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), target->GetEntry(), GetGUIDLow(), GetDistance(target));
+ TC_LOG_DEBUG("maps", "Object %u (Type: %u, Entry: %u) is out of range for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), target->GetEntry(), GetGUIDLow(), GetDistance(target));
#endif
}
}
@@ -22317,7 +22333,7 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi
UpdateVisibilityOf_helper(m_clientGUIDs, target, visibleNow);
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), target->GetEntry(), GetGUIDLow(), GetDistance(target));
+ TC_LOG_DEBUG("maps", "Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f", target->GetGUIDLow(), target->GetTypeId(), target->GetEntry(), GetGUIDLow(), GetDistance(target));
#endif
}
}
@@ -22776,7 +22792,7 @@ void Player::learnDefaultSpells()
for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr != info->spell.end(); ++itr)
{
uint32 tspell = *itr;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_LOADING, "PLAYER (Class: %u Race: %u): Adding initial spell, id = %u", uint32(getClass()), uint32(getRace()), tspell);
+ TC_LOG_DEBUG("entities.player.loading", "PLAYER (Class: %u Race: %u): Adding initial spell, id = %u", uint32(getClass()), uint32(getRace()), tspell);
if (!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add
addSpell(tspell, true, true, true, false);
else // but send in normal spell in game learn case
@@ -23411,7 +23427,7 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "HasItemFitToSpellRequirements: Not handled spell requirement for item class %u", spellInfo->EquippedItemClass);
+ TC_LOG_ERROR("entities.player", "HasItemFitToSpellRequirements: Not handled spell requirement for item class %u", spellInfo->EquippedItemClass);
break;
}
@@ -23489,7 +23505,7 @@ uint32 Player::GetResurrectionSpellId()
case 27239: spell_id = 27240; break; // rank 6
case 47883: spell_id = 47882; break; // rank 7
default:
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Unhandled spell %u: S.Resurrection", (*itr)->GetId());
+ TC_LOG_ERROR("entities.player", "Unhandled spell %u: S.Resurrection", (*itr)->GetId());
continue;
}
@@ -24061,11 +24077,11 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
{
if (apply)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName().c_str(), target->GetEntry(), target->GetTypeId());
+ TC_LOG_DEBUG("maps", "Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName().c_str(), target->GetEntry(), target->GetTypeId());
if (!AddUInt64Value(PLAYER_FARSIGHT, target->GetGUID()))
{
- TC_LOG_FATAL(LOG_FILTER_PLAYER, "Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName().c_str());
+ TC_LOG_FATAL("entities.player", "Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName().c_str());
return;
}
@@ -24077,11 +24093,11 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Player::CreateViewpoint: Player %s remove seer", GetName().c_str());
+ TC_LOG_DEBUG("maps", "Player::CreateViewpoint: Player %s remove seer", GetName().c_str());
if (!RemoveUInt64Value(PLAYER_FARSIGHT, target->GetGUID()))
{
- TC_LOG_FATAL(LOG_FILTER_PLAYER, "Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName().c_str());
+ TC_LOG_FATAL("entities.player", "Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName().c_str());
return;
}
@@ -24586,7 +24602,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
if (!pSkill)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Character %u has skill %u that does not exist.", GetGUIDLow(), skill);
+ TC_LOG_ERROR("entities.player", "Character %u has skill %u that does not exist.", GetGUIDLow(), skill);
continue;
}
@@ -24604,7 +24620,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
}
if (value == 0)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Character %u has skill %u with value 0. Will be deleted.", GetGUIDLow(), skill);
+ TC_LOG_ERROR("entities.player", "Character %u has skill %u with value 0. Will be deleted.", GetGUIDLow(), skill);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_SKILL);
@@ -24633,7 +24649,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
if (count >= PLAYER_MAX_SKILLS) // client limit
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Character %u has more than %u skills.", GetGUIDLow(), PLAYER_MAX_SKILLS);
+ TC_LOG_ERROR("entities.player", "Character %u has more than %u skills.", GetGUIDLow(), PLAYER_MAX_SKILLS);
break;
}
}
@@ -24807,7 +24823,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
}
//Z given by moveinfo, LastZ, FallTime, WaterZ, MapZ, Damage, Safefall reduction
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d", movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall);
+ TC_LOG_DEBUG("entities.player", "FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d", movementInfo.pos.GetPositionZ(), height, GetPositionZ(), movementInfo.fallTime, height, damage, safe_fall);
}
}
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LANDING); // No fly zone - Parachute
@@ -24951,7 +24967,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
uint32 spellid = talentInfo->RankID[talentRank];
if (spellid == 0)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
+ TC_LOG_ERROR("entities.player", "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
return;
}
@@ -24963,7 +24979,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
learnSpell(spellid, false);
AddTalent(spellid, m_activeSpec, true);
- TC_LOG_INFO(LOG_FILTER_PLAYER, "TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec);
+ TC_LOG_INFO("entities.player", "TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, m_activeSpec);
// update free talent points
SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1));
@@ -25088,7 +25104,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
uint32 spellid = talentInfo->RankID[talentRank];
if (spellid == 0)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
+ TC_LOG_ERROR("entities.player", "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
return;
}
@@ -25098,7 +25114,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
// learn! (other talent ranks will unlearned at learning)
pet->learnSpell(spellid);
- TC_LOG_INFO(LOG_FILTER_PLAYER, "PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
+ TC_LOG_INFO("entities.player", "PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
// update free talent points
pet->SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1));
@@ -25417,7 +25433,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
if (!found) // something wrong...
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s tried to save equipment set " UI64FMTD " (index %u), but that equipment set not found!", GetName().c_str(), eqset.Guid, index);
+ TC_LOG_ERROR("entities.player", "Player %s tried to save equipment set " UI64FMTD " (index %u), but that equipment set not found!", GetName().c_str(), eqset.Guid, index);
return;
}
}
@@ -25918,13 +25934,13 @@ void Player::SendRefundInfo(Item* item)
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item refund: item not refundable!");
+ TC_LOG_DEBUG("entities.player.items", "Item refund: item not refundable!");
return;
}
if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item refund: item was traded!");
+ TC_LOG_DEBUG("entities.player.items", "Item refund: item was traded!");
item->SetNotRefundable(this);
return;
}
@@ -25932,7 +25948,7 @@ void Player::SendRefundInfo(Item* item)
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost());
if (!iece)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item refund: cannot find extendedcost data.");
+ TC_LOG_DEBUG("entities.player.items", "Item refund: cannot find extendedcost data.");
return;
}
@@ -25978,7 +25994,7 @@ void Player::RefundItem(Item* item)
{
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item refund: item not refundable!");
+ TC_LOG_DEBUG("entities.player.items", "Item refund: item not refundable!");
return;
}
@@ -25994,7 +26010,7 @@ void Player::RefundItem(Item* item)
if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item refund: item was traded!");
+ TC_LOG_DEBUG("entities.player.items", "Item refund: item was traded!");
item->SetNotRefundable(this);
return;
}
@@ -26002,7 +26018,7 @@ void Player::RefundItem(Item* item)
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost());
if (!iece)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item refund: cannot find extendedcost data.");
+ TC_LOG_DEBUG("entities.player.items", "Item refund: cannot find extendedcost data.");
return;
}
@@ -26354,7 +26370,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
pet->Relocate(x, y, z, ang);
if (!pet->IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", pet->GetGUIDLow(), pet->GetEntry(), pet->GetPositionX(), pet->GetPositionY());
+ TC_LOG_ERROR("misc", "Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)", pet->GetGUIDLow(), pet->GetEntry(), pet->GetPositionX(), pet->GetPositionY());
delete pet;
return NULL;
}
@@ -26363,7 +26379,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
uint32 pet_number = sObjectMgr->GeneratePetNumber();
if (!pet->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "no such creature entry %u", entry);
+ TC_LOG_ERROR("misc", "no such creature entry %u", entry);
delete pet;
return NULL;
}
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index fee542a752e..35a3f5f10d4 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -111,7 +111,7 @@ struct PlayerTalent
// Spell modifier (used for modify other spells)
struct SpellModifier
{
- SpellModifier(Aura* _ownerAura = NULL) : op(SPELLMOD_DAMAGE), type(SPELLMOD_FLAT), charges(0), value(0), mask(), spellId(0), ownerAura(_ownerAura) {}
+ SpellModifier(Aura* _ownerAura = NULL) : op(SPELLMOD_DAMAGE), type(SPELLMOD_FLAT), charges(0), value(0), mask(), spellId(0), ownerAura(_ownerAura) { }
SpellModOp op : 8;
SpellModType type : 8;
int16 charges : 16;
@@ -179,7 +179,7 @@ enum ReputationSource
struct ActionButton
{
- ActionButton() : packedData(0), uState(ACTIONBUTTON_NEW) {}
+ ActionButton() : packedData(0), uState(ACTIONBUTTON_NEW) { }
uint32 packedData;
ActionButtonUpdateState uState;
@@ -205,7 +205,7 @@ typedef std::map<uint8, ActionButton> ActionButtonList;
struct PlayerCreateInfoItem
{
- PlayerCreateInfoItem(uint32 id, uint32 amount) : item_id(id), item_amount(amount) {}
+ PlayerCreateInfoItem(uint32 id, uint32 amount) : item_id(id), item_amount(amount) { }
uint32 item_id;
uint32 item_amount;
@@ -215,7 +215,7 @@ typedef std::list<PlayerCreateInfoItem> PlayerCreateInfoItems;
struct PlayerClassLevelInfo
{
- PlayerClassLevelInfo() : basehealth(0), basemana(0) {}
+ PlayerClassLevelInfo() : basehealth(0), basemana(0) { }
uint16 basehealth;
uint16 basemana;
};
@@ -238,8 +238,8 @@ typedef std::list<uint32> PlayerCreateInfoSpells;
struct PlayerCreateInfoAction
{
- PlayerCreateInfoAction() : button(0), type(0), action(0) {}
- PlayerCreateInfoAction(uint8 _button, uint32 _action, uint8 _type) : button(_button), type(_type), action(_action) {}
+ PlayerCreateInfoAction() : button(0), type(0), action(0) { }
+ PlayerCreateInfoAction(uint8 _button, uint32 _action, uint8 _type) : button(_button), type(_type), action(_action) { }
uint8 button;
uint8 type;
@@ -270,7 +270,7 @@ struct PlayerInfo
struct PvPInfo
{
- PvPInfo() : IsHostile(false), IsInHostileArea(false), IsInNoPvPArea(false), IsInFFAPvPArea(false), EndTimer(0) {}
+ PvPInfo() : IsHostile(false), IsInHostileArea(false), IsInNoPvPArea(false), IsInFFAPvPArea(false), EndTimer(0) { }
bool IsHostile;
bool IsInHostileArea; ///> Marks if player is in an area which forces PvP flag
@@ -281,7 +281,7 @@ struct PvPInfo
struct DuelInfo
{
- DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0), isMounted(false) {}
+ DuelInfo() : initiator(NULL), opponent(NULL), startTimer(0), startTime(0), outOfBound(0), isMounted(false) { }
Player* initiator;
Player* opponent;
@@ -343,7 +343,7 @@ struct Runes
struct EnchantDuration
{
- EnchantDuration() : item(NULL), slot(MAX_ENCHANTMENT_SLOT), leftduration(0) {};
+ EnchantDuration() : item(NULL), slot(MAX_ENCHANTMENT_SLOT), leftduration(0) { };
EnchantDuration(Item* _item, EnchantmentSlot _slot, uint32 _leftduration) : item(_item), slot(_slot),
leftduration(_leftduration){ ASSERT(item); };
@@ -667,7 +667,7 @@ typedef std::map<uint32, EquipmentSet> EquipmentSets;
struct ItemPosCount
{
- ItemPosCount(uint16 _pos, uint32 _count) : pos(_pos), count(_count) {}
+ ItemPosCount(uint16 _pos, uint32 _count) : pos(_pos), count(_count) { }
bool isContainedIn(std::vector<ItemPosCount> const& vec) const;
uint16 pos;
uint32 count;
@@ -833,7 +833,7 @@ struct InstancePlayerBind
/* permanent PlayerInstanceBinds are created in Raid/Heroic instances for players
that aren't already permanently bound when they are inside when a boss is killed
or when they enter an instance that the group leader is permanently bound to. */
- InstancePlayerBind() : save(NULL), perm(false) {}
+ InstancePlayerBind() : save(NULL), perm(false) { }
};
struct AccessRequirement
@@ -900,7 +900,7 @@ class PlayerTaxi
{
public:
PlayerTaxi();
- ~PlayerTaxi() {}
+ ~PlayerTaxi() { }
// Nodes
void InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level);
void LoadTaxiMask(std::string const& data);
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index 8b37fef9500..e7cc8f92ce2 100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -172,7 +172,7 @@ void PlayerSocial::SendSocialList(Player* player)
}
player->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CONTACT_LIST");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_CONTACT_LIST");
}
bool PlayerSocial::HasFriend(uint32 friendGuid)
@@ -191,13 +191,9 @@ bool PlayerSocial::HasIgnore(uint32 ignore_guid)
return false;
}
-SocialMgr::SocialMgr()
-{
-}
+SocialMgr::SocialMgr() { }
-SocialMgr::~SocialMgr()
-{
-}
+SocialMgr::~SocialMgr() { }
void SocialMgr::GetFriendInfo(Player* player, uint32 friendGUID, FriendInfo &friendInfo)
{
diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h
index 565d13cd0d0..48cb71c4918 100644
--- a/src/server/game/Entities/Totem/Totem.h
+++ b/src/server/game/Entities/Totem/Totem.h
@@ -36,7 +36,7 @@ class Totem : public Minion
{
public:
Totem(SummonPropertiesEntry const* properties, Unit* owner);
- virtual ~Totem() {}
+ virtual ~Totem() { }
void Update(uint32 time);
void InitStats(uint32 duration);
void InitSummon();
@@ -48,12 +48,12 @@ class Totem : public Minion
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
- void UpdateResistances(uint32 /*school*/) {}
- void UpdateArmor() {}
- void UpdateMaxHealth() {}
- void UpdateMaxPower(Powers /*power*/) {}
- void UpdateAttackPowerAndDamage(bool /*ranged*/) {}
- void UpdateDamagePhysical(WeaponAttackType /*attType*/) {}
+ void UpdateResistances(uint32 /*school*/) { }
+ void UpdateArmor() { }
+ void UpdateMaxHealth() { }
+ void UpdateMaxPower(Powers /*power*/) { }
+ void UpdateAttackPowerAndDamage(bool /*ranged*/) { }
+ void UpdateDamagePhysical(WeaponAttackType /*attType*/) { }
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 30b7b61f574..ddb0775dc01 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -40,6 +40,7 @@ Transport::Transport() : GameObject(),
Transport::~Transport()
{
+ ASSERT(_passengers.empty());
UnloadStaticPassengers();
}
@@ -49,7 +50,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
+ TC_LOG_ERROR("entities.transport", "Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow, x, y);
return false;
}
@@ -60,7 +61,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
if (!goinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f", guidlow, mapid, x, y, z, ang);
+ TC_LOG_ERROR("sql.sql", "Transport not created: entry in `gameobject_template` not found, guidlow: %u map: %u (X: %f Y: %f Z: %f) ang: %f", guidlow, mapid, x, y, z, ang);
return false;
}
@@ -69,7 +70,7 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
TransportTemplate const* tInfo = sTransportMgr->GetTransportTemplate(entry);
if (!tInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Transport %u (name: %s) will not be created, missing `transport_template` entry.", entry, goinfo->name.c_str());
+ TC_LOG_ERROR("sql.sql", "Transport %u (name: %s) will not be created, missing `transport_template` entry.", entry, goinfo->name.c_str());
return false;
}
@@ -104,7 +105,7 @@ void Transport::Update(uint32 diff)
if (AI())
AI()->UpdateAI(diff);
else if (!AIM_Initialize())
- TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Could not initialize GameObjectAI for Transport");
+ TC_LOG_ERROR("entities.transport", "Could not initialize GameObjectAI for Transport");
if (GetKeyFrames().size() <= 1)
return;
@@ -162,13 +163,14 @@ void Transport::Update(uint32 diff)
if (GetGOInfo()->moTransport.canBeStopped)
SetGoState(GO_STATE_ACTIVE);
- // Departure event
- if (_currentFrame->IsTeleportFrame())
- TeleportTransport(_nextFrame->Node->mapid, _nextFrame->Node->x, _nextFrame->Node->y, _nextFrame->Node->z);
-
sScriptMgr->OnRelocate(this, _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z);
- TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z);
+ TC_LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z);
+
+ // Departure event
+ if (_currentFrame->IsTeleportFrame())
+ if (TeleportTransport(_nextFrame->Node->mapid, _nextFrame->Node->x, _nextFrame->Node->y, _nextFrame->Node->z))
+ return; // Update more in new map thread
}
// Set position
@@ -192,20 +194,23 @@ void Transport::Update(uint32 diff)
void Transport::AddPassenger(WorldObject* passenger)
{
if (_passengers.insert(passenger).second)
- TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, "Object %s boarded transport %s.", passenger->GetName().c_str(), GetName().c_str());
+ {
+ TC_LOG_DEBUG("entities.transport", "Object %s boarded transport %s.", passenger->GetName().c_str(), GetName().c_str());
- if (Player* plr = passenger->ToPlayer())
- sScriptMgr->OnAddPassenger(this, plr);
+ if (Player* plr = passenger->ToPlayer())
+ sScriptMgr->OnAddPassenger(this, plr);
+ }
}
void Transport::RemovePassenger(WorldObject* passenger)
{
if (_passengers.erase(passenger) || _staticPassengers.erase(passenger)) // static passenger can remove itself in case of grid unload
- TC_LOG_DEBUG(LOG_FILTER_TRANSPORTS, "Object %s removed from transport %s.", passenger->GetName().c_str(), GetName().c_str());
-
+ {
+ TC_LOG_DEBUG("entities.transport", "Object %s removed from transport %s.", passenger->GetName().c_str(), GetName().c_str());
- if (Player* plr = passenger->ToPlayer())
- sScriptMgr->OnRemovePassenger(this, plr);
+ if (Player* plr = passenger->ToPlayer())
+ sScriptMgr->OnRemovePassenger(this, plr);
+ }
}
Creature* Transport::CreateNPCPassenger(uint32 guid, CreatureData const* data)
@@ -233,16 +238,24 @@ Creature* Transport::CreateNPCPassenger(uint32 guid, CreatureData const* data)
creature->SetHomePosition(creature->GetPositionX(), creature->GetPositionY(), creature->GetPositionZ(), creature->GetOrientation());
creature->SetTransportHomePosition(creature->m_movementInfo.transport.pos);
+ /// @HACK - transport models are not added to map's dynamic LoS calculations
+ /// because the current GameObjectModel cannot be moved without recreating
+ creature->AddUnitState(UNIT_STATE_IGNORE_PATHFINDING);
+
if (!creature->IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Creature (guidlow %d, entry %d) not created. Suggested coordinates aren't valid (X: %f Y: %f)",creature->GetGUIDLow(),creature->GetEntry(),creature->GetPositionX(),creature->GetPositionY());
+ TC_LOG_ERROR("entities.transport", "Creature (guidlow %d, entry %d) not created. Suggested coordinates aren't valid (X: %f Y: %f)",creature->GetGUIDLow(),creature->GetEntry(),creature->GetPositionX(),creature->GetPositionY());
delete creature;
return NULL;
}
- map->AddToMap(creature);
- _staticPassengers.insert(creature);
+ if (!map->AddToMap(creature))
+ {
+ delete creature;
+ return NULL;
+ }
+ _staticPassengers.insert(creature);
sScriptMgr->OnAddCreaturePassenger(this, creature);
return creature;
}
@@ -271,42 +284,21 @@ GameObject* Transport::CreateGOPassenger(uint32 guid, GameObjectData const* data
if (!go->IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "GameObject (guidlow %d, entry %d) not created. Suggested coordinates aren't valid (X: %f Y: %f)", go->GetGUIDLow(), go->GetEntry(), go->GetPositionX(), go->GetPositionY());
+ TC_LOG_ERROR("entities.transport", "GameObject (guidlow %d, entry %d) not created. Suggested coordinates aren't valid (X: %f Y: %f)", go->GetGUIDLow(), go->GetEntry(), go->GetPositionX(), go->GetPositionY());
delete go;
return NULL;
}
- map->AddToMap(go);
- _staticPassengers.insert(go);
+ if (!map->AddToMap(go))
+ {
+ delete go;
+ return NULL;
+ }
- //sScriptMgr->OnAddCreaturePassenger(this, go);
+ _staticPassengers.insert(go);
return go;
}
-void Transport::CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
-{
- float inx = x, iny = y, inz = z;
- if (o)
- *o = Position::NormalizeOrientation(GetOrientation() + *o);
-
- x = GetPositionX() + inx * std::cos(GetOrientation()) - iny * std::sin(GetOrientation());
- y = GetPositionY() + iny * std::cos(GetOrientation()) + inx * std::sin(GetOrientation());
- z = GetPositionZ() + inz;
-}
-
-void Transport::CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
-{
- if (o)
- *o = Position::NormalizeOrientation(*o - GetOrientation());
-
- z -= GetPositionZ();
- y -= GetPositionY(); // y = searchedY * std::cos(o) + searchedX * std::sin(o)
- x -= GetPositionX(); // x = searchedX * std::cos(o) + searchedY * std::sin(o + pi)
- float inx = x, iny = y;
- y = (iny - inx * std::tan(GetOrientation())) / (std::cos(GetOrientation()) + std::sin(GetOrientation()) * std::tan(GetOrientation()));
- x = (inx + iny * std::tan(GetOrientation())) / (std::cos(GetOrientation()) + std::sin(GetOrientation()) * std::tan(GetOrientation()));
-}
-
void Transport::UpdatePosition(float x, float y, float z, float o)
{
bool newActive = GetMap()->IsGridLoaded(x, y);
@@ -411,7 +403,7 @@ float Transport::CalculateSegmentPos(float now)
return segmentPos / frame.NextDistFromPrev;
}
-void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
+bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
{
Map const* oldMap = GetMap();
@@ -454,23 +446,27 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
{
WorldObject* obj = (*itr++);
+ float destX, destY, destZ, destO;
+ obj->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO);
+ TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, GetOrientation());
+
switch (obj->GetTypeId())
{
case TYPEID_UNIT:
if (!IS_PLAYER_GUID(obj->ToUnit()->GetOwnerGUID())) // pets should be teleported with player
- obj->ToCreature()->FarTeleportTo(newMap, x, y, z, obj->GetOrientation());
+ obj->ToCreature()->FarTeleportTo(newMap, destX, destY, destZ, destO);
break;
case TYPEID_GAMEOBJECT:
{
GameObject* go = obj->ToGameObject();
go->GetMap()->RemoveFromMap(go, false);
- Relocate(x, y, z, go->GetOrientation());
- SetMap(newMap);
+ go->Relocate(destX, destY, destZ, destO);
+ go->SetMap(newMap);
newMap->AddToMap(go);
break;
}
case TYPEID_PLAYER:
- if (!obj->ToPlayer()->TeleportTo(newMapid, x, y, z, GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT))
+ if (!obj->ToPlayer()->TeleportTo(newMapid, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT))
_passengers.erase(obj);
break;
default:
@@ -478,17 +474,28 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
}
}
+ Relocate(x, y, z, GetOrientation());
GetMap()->AddToMap<Transport>(this);
+ return true;
}
else
{
// Teleport players, they need to know it
for (std::set<WorldObject*>::iterator itr = _passengers.begin(); itr != _passengers.end(); ++itr)
+ {
if ((*itr)->GetTypeId() == TYPEID_PLAYER)
- (*itr)->ToUnit()->NearTeleportTo(x, y, z, GetOrientation());
- }
+ {
+ float destX, destY, destZ, destO;
+ (*itr)->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO);
+ TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, GetOrientation());
- UpdatePosition(x, y, z, GetOrientation());
+ (*itr)->ToUnit()->NearTeleportTo(destX, destY, destZ, destO);
+ }
+ }
+
+ UpdatePosition(x, y, z, GetOrientation());
+ return false;
+ }
}
void Transport::UpdatePassengerPositions(std::set<WorldObject*>& passengers)
@@ -523,7 +530,9 @@ void Transport::UpdatePassengerPositions(std::set<WorldObject*>& passengers)
break;
}
case TYPEID_PLAYER:
- GetMap()->PlayerRelocation(passenger->ToPlayer(), x, y, z, o);
+ //relocate only passengers in world and skip any player that might be still logging in/teleporting
+ if (passenger->IsInWorld())
+ GetMap()->PlayerRelocation(passenger->ToPlayer(), x, y, z, o);
break;
case TYPEID_GAMEOBJECT:
GetMap()->GameObjectRelocation(passenger->ToGameObject(), x, y, z, o, false);
@@ -542,7 +551,7 @@ void Transport::DoEventIfAny(KeyFrame const& node, bool departure)
{
if (uint32 eventid = departure ? node.Node->departureEventID : node.Node->arrivalEventID)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.Node->index, GetName().c_str());
+ TC_LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.Node->index, GetName().c_str());
GetMap()->ScriptsStart(sEventScripts, eventid, this, this);
EventInform(eventid);
}
diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h
index 0d020fe2c34..e290a5d5e00 100644
--- a/src/server/game/Entities/Transport/Transport.h
+++ b/src/server/game/Entities/Transport/Transport.h
@@ -46,10 +46,16 @@ class Transport : public GameObject, public TransportBase
GameObject* CreateGOPassenger(uint32 guid, GameObjectData const* data);
/// This method transforms supplied transport offsets into global coordinates
- void CalculatePassengerPosition(float& x, float& y, float& z, float* o = NULL) const;
+ void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
+ {
+ TransportBase::CalculatePassengerPosition(x, y, z, o, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
+ }
/// This method transforms supplied global coordinates into local offsets
- void CalculatePassengerOffset(float& x, float& y, float& z, float* o = NULL) const;
+ void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
+ {
+ TransportBase::CalculatePassengerOffset(x, y, z, o, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
+ }
uint32 GetPeriod() const { return GetUInt32Value(GAMEOBJECT_LEVEL); }
void SetPeriod(uint32 period) { SetUInt32Value(GAMEOBJECT_LEVEL, period); }
@@ -72,7 +78,7 @@ class Transport : public GameObject, public TransportBase
private:
void MoveToNextWaypoint();
float CalculateSegmentPos(float perc);
- void TeleportTransport(uint32 newMapid, float x, float y, float z);
+ bool TeleportTransport(uint32 newMapid, float x, float y, float z);
void UpdatePassengerPositions(std::set<WorldObject*>& passengers);
void DoEventIfAny(KeyFrame const& node, bool departure);
@@ -84,7 +90,6 @@ class Transport : public GameObject, public TransportBase
KeyFrameVec::const_iterator _currentFrame;
KeyFrameVec::const_iterator _nextFrame;
- uint32 _moveTimer;
TimeTrackerSmall _positionChangeTimer;
bool _isMoving;
bool _pendingStop;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index c3a611c441f..54db2da73df 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -241,8 +241,6 @@ Unit::Unit(bool isWorldObject) :
for (uint8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
m_threatModifier[i] = 1.0f;
- m_isSorted = true;
-
for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
m_speed_rate[i] = 1.0f;
@@ -385,8 +383,6 @@ void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed, bool gen
void Unit::UpdateSplineMovement(uint32 t_diff)
{
- uint32 const positionUpdateDelay = 400;
-
if (movespline->Finalized())
return;
@@ -398,27 +394,32 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
m_movesplineTimer.Update(t_diff);
if (m_movesplineTimer.Passed() || arrived)
- {
- m_movesplineTimer.Reset(positionUpdateDelay);
- Movement::Location loc = movespline->ComputePosition();
+ UpdateSplinePosition();
+}
- if (HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
- {
- Position& pos = m_movementInfo.transport.pos;
- pos.m_positionX = loc.x;
- pos.m_positionY = loc.y;
- pos.m_positionZ = loc.z;
- pos.m_orientation = loc.orientation;
+void Unit::UpdateSplinePosition()
+{
+ static uint32 const positionUpdateDelay = 400;
- if (TransportBase* transport = GetDirectTransport())
- transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.orientation);
- }
+ m_movesplineTimer.Reset(positionUpdateDelay);
+ Movement::Location loc = movespline->ComputePosition();
- if (HasUnitState(UNIT_STATE_CANNOT_TURN))
- loc.orientation = GetOrientation();
+ if (HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
+ {
+ Position& pos = m_movementInfo.transport.pos;
+ pos.m_positionX = loc.x;
+ pos.m_positionY = loc.y;
+ pos.m_positionZ = loc.z;
+ pos.m_orientation = loc.orientation;
- UpdatePosition(loc.x, loc.y, loc.z, loc.orientation);
+ if (TransportBase* transport = GetDirectTransport())
+ transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.orientation);
}
+
+ if (HasUnitState(UNIT_STATE_CANNOT_TURN))
+ loc.orientation = GetOrientation();
+
+ UpdatePosition(loc.x, loc.y, loc.z, loc.orientation);
}
void Unit::DisableSpline()
@@ -667,10 +668,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
return 0;
}
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "DealDamageStart");
+ TC_LOG_DEBUG("entities.unit", "DealDamageStart");
uint32 health = victim->GetHealth();
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Unit " UI64FMTD " dealt %u damage to unit " UI64FMTD, GetGUID(), damage, victim->GetGUID());
+ TC_LOG_DEBUG("entities.unit", "Unit " UI64FMTD " dealt %u damage to unit " UI64FMTD, GetGUID(), damage, victim->GetGUID());
// duel ends when player has 1 or less hp
bool duel_hasEnded = false;
@@ -724,7 +725,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
if (health <= damage)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "DealDamage: victim just died");
+ TC_LOG_DEBUG("entities.unit", "DealDamage: victim just died");
if (victim->GetTypeId() == TYPEID_PLAYER && victim != this)
victim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, health);
@@ -733,7 +734,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "DealDamageAlive");
+ TC_LOG_DEBUG("entities.unit", "DealDamageAlive");
if (victim->GetTypeId() == TYPEID_PLAYER)
victim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, damage);
@@ -821,7 +822,7 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
}
}
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "DealDamageEnd returned %d damage", damage);
+ TC_LOG_DEBUG("entities.unit", "DealDamageEnd returned %d damage", damage);
return damage;
}
@@ -837,7 +838,7 @@ void Unit::CastSpell(SpellCastTargets const& targets, SpellInfo const* spellInfo
{
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "CastSpell: unknown spell by caster: %s %u)", (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ TC_LOG_ERROR("entities.unit", "CastSpell: unknown spell by caster: %s %u)", (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
@@ -865,7 +866,7 @@ void Unit::CastSpell(Unit* victim, uint32 spellId, TriggerCastFlags triggerFlags
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ TC_LOG_ERROR("entities.unit", "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
@@ -915,7 +916,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const& value, Unit*
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ TC_LOG_ERROR("entities.unit", "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
SpellCastTargets targets;
@@ -929,7 +930,7 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered,
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ TC_LOG_ERROR("entities.unit", "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
SpellCastTargets targets;
@@ -943,7 +944,7 @@ void Unit::CastSpell(GameObject* go, uint32 spellId, bool triggered, Item* castI
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
+ TC_LOG_ERROR("entities.unit", "CastSpell: unknown spell id %u by caster: %s %u)", spellId, (GetTypeId() == TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"), (GetTypeId() == TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return;
}
SpellCastTargets targets;
@@ -1092,7 +1093,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss)
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(damageInfo->SpellID);
if (spellProto == NULL)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Unit::DealSpellDamage has wrong damageInfo->SpellID: %u", damageInfo->SpellID);
+ TC_LOG_DEBUG("entities.unit", "Unit::DealSpellDamage has wrong damageInfo->SpellID: %u", damageInfo->SpellID);
return;
}
@@ -1952,10 +1953,10 @@ void Unit::AttackerStateUpdate (Unit* victim, WeaponAttackType attType, bool ext
DealMeleeDamage(&damageInfo, true);
if (GetTypeId() == TYPEID_PLAYER)
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
+ TC_LOG_DEBUG("entities.unit", "AttackerStateUpdate: (Player) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
else
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
+ TC_LOG_DEBUG("entities.unit", "AttackerStateUpdate: (NPC) %u attacked %u (TypeId: %u) for %u dmg, absorbed %u, blocked %u, resisted %u.",
GetGUIDLow(), victim->GetGUIDLow(), victim->GetTypeId(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
}
}
@@ -1986,7 +1987,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
float parry_chance = victim->GetUnitParryChance();
// Useful if want to specify crit & miss chances for melee, else it could be removed
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance, crit_chance, dodge_chance, parry_chance, block_chance);
+ TC_LOG_DEBUG("entities.unit", "MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance, crit_chance, dodge_chance, parry_chance, block_chance);
return RollMeleeOutcomeAgainst(victim, attType, int32(crit_chance*100), int32(miss_chance*100), int32(dodge_chance*100), int32(parry_chance*100), int32(block_chance*100));
}
@@ -2007,22 +2008,22 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
int32 sum = 0, tmp = 0;
int32 roll = urand (0, 10000);
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus);
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d",
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus);
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d",
roll, miss_chance, dodge_chance, parry_chance, block_chance, crit_chance);
tmp = miss_chance;
if (tmp > 0 && roll < (sum += tmp))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: MISS");
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: MISS");
return MELEE_HIT_MISS;
}
// always crit against a sitting target (except 0 crit chance)
if (victim->GetTypeId() == TYPEID_PLAYER && crit_chance > 0 && !victim->IsStandState())
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRIT (sitting victim)");
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT (sitting victim)");
return MELEE_HIT_CRIT;
}
@@ -2031,7 +2032,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
// only players can't dodge if attacker is behind
if (victim->GetTypeId() == TYPEID_PLAYER && !victim->HasInArc(M_PI, this) && !victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
}
else
{
@@ -2050,7 +2051,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
&& ((tmp -= skillBonus) > 0)
&& roll < (sum += tmp))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum);
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum-tmp, sum);
return MELEE_HIT_DODGE;
}
}
@@ -2059,7 +2060,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
// check if attack comes from behind, nobody can parry or block if attacker is behind
if (!victim->HasInArc(M_PI, this) && !victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: attack came from behind.");
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: attack came from behind.");
else
{
// Reduce parry chance by attacker expertise rating
@@ -2075,7 +2076,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
&& (tmp2 -= skillBonus) > 0
&& roll < (sum += tmp2))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum);
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum);
return MELEE_HIT_PARRY;
}
}
@@ -2087,7 +2088,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
&& (tmp -= skillBonus) > 0
&& roll < (sum += tmp))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum);
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum-tmp, sum);
return MELEE_HIT_BLOCK;
}
}
@@ -2098,9 +2099,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
if (tmp > 0 && roll < (sum += tmp))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum-tmp, sum);
if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRIT DISABLED)");
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT DISABLED)");
else
return MELEE_HIT_CRIT;
}
@@ -2120,7 +2121,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
tmp = tmp > 4000 ? 4000 : tmp;
if (roll < (sum += tmp))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum);
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum-4000, sum);
return MELEE_HIT_GLANCING;
}
}
@@ -2144,13 +2145,13 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackT
tmp = tmp * 200 - 1500;
if (roll < (sum += tmp))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum);
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum-tmp, sum);
return MELEE_HIT_CRUSHING;
}
}
}
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "RollMeleeOutcomeAgainst: NORMAL");
+ TC_LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: NORMAL");
return MELEE_HIT_NORMAL;
}
@@ -2215,7 +2216,7 @@ void Unit::SendMeleeAttackStart(Unit* victim)
data << uint64(GetGUID());
data << uint64(victim->GetGUID());
SendMessageToSet(&data, true);
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Sent SMSG_ATTACKSTART");
+ TC_LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTART");
}
void Unit::SendMeleeAttackStop(Unit* victim)
@@ -2225,12 +2226,12 @@ void Unit::SendMeleeAttackStop(Unit* victim)
data.append(victim ? victim->GetPackGUID() : 0);
data << uint32(0); //! Can also take the value 0x01, which seems related to updating rotation
SendMessageToSet(&data, true);
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Sent SMSG_ATTACKSTOP");
+ TC_LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTOP");
if (victim)
- TC_LOG_INFO(LOG_FILTER_UNITS, "%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
+ TC_LOG_INFO("entities.unit", "%s %u stopped attacking %s %u", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUIDLow());
else
- TC_LOG_INFO(LOG_FILTER_UNITS, "%s %u stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow());
+ TC_LOG_INFO("entities.unit", "%s %u stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUIDLow());
}
bool Unit::isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType)
@@ -2426,7 +2427,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo
canParry = false;
break;
default:
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
+ TC_LOG_DEBUG("entities.unit", "Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
break;
}
}
@@ -3038,7 +3039,7 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool withInstant)
{
- //TC_LOG_DEBUG(LOG_FILTER_UNITS, "Interrupt spell for unit %u.", GetEntry());
+ //TC_LOG_DEBUG("entities.unit", "Interrupt spell for unit %u.", GetEntry());
Spell* spell = m_currentSpells[spellType];
if (spell
&& (withDelayed || spell->getState() != SPELL_STATE_DELAYED)
@@ -3404,7 +3405,7 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
aurApp->SetRemoveMode(removeMode);
Aura* aura = aurApp->GetBase();
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Aura %u now is remove mode %d", aura->GetId(), removeMode);
+ TC_LOG_DEBUG("spells", "Aura %u now is remove mode %d", aura->GetId(), removeMode);
// dead loop is killing the server probably
ASSERT(m_removedAurasCount < 0xFFFFFFFF);
@@ -4132,7 +4133,7 @@ void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime)
// update for out of range group members (on 1 slot use)
aura->SetNeedClientUpdateForTargets();
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId(), GetGUIDLow(), aura->GetDuration());
+ TC_LOG_DEBUG("spells", "Aura %u partially interrupted on unit %u, new duration: %u ms", aura->GetId(), GetGUIDLow(), aura->GetDuration());
}
}
}
@@ -4838,7 +4839,7 @@ void Unit::AddGameObject(GameObject* gameObj)
{
SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(gameObj->GetSpellId());
// Need disable spell use for owner
- if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (createBySpell && createBySpell->IsCooldownStartedOnEvent())
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases)
ToPlayer()->AddSpellAndCategoryCooldowns(createBySpell, 0, NULL, true);
}
@@ -4869,7 +4870,7 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
{
SpellInfo const* createBySpell = sSpellMgr->GetSpellInfo(spellid);
// Need activate spell use for owner
- if (createBySpell && createBySpell->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (createBySpell && createBySpell->IsCooldownStartedOnEvent())
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existing cases)
ToPlayer()->SendCooldownEvent(createBySpell);
}
@@ -5005,7 +5006,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo)
data << float(pInfo->multiplier); // gain multiplier
break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType()));
+ TC_LOG_ERROR("entities.unit", "Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType()));
return;
}
@@ -5048,7 +5049,7 @@ void Unit::SendSpellDamageImmune(Unit* target, uint32 spellId)
void Unit::SendAttackStateUpdate(CalcDamageInfo* damageInfo)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
+ TC_LOG_DEBUG("entities.unit", "WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
uint32 count = 1;
size_t maxsize = 4+5+5+4+4+1+4+4+4+4+4+1+4+4+4+4+4*12;
@@ -5554,7 +5555,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 31571: triggered_spell_id = 57529; break;
case 31572: triggered_spell_id = 57531; break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u", dummySpell->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non handled spell id: %u", dummySpell->Id);
return false;
}
break;
@@ -5691,7 +5692,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 29834: triggered_spell_id=29841; break;
case 42770: triggered_spell_id=42771; break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u (SW)", dummySpell->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non handled spell id: %u (SW)", dummySpell->Id);
return false;
}
@@ -6779,7 +6780,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 3787:spellId = 58804; break; // 8 Rank
default:
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)",
+ TC_LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)",
castItem->GetEnchantmentId(EnchantmentSlot(TEMP_ENCHANTMENT_SLOT)), dummySpell->Id);
return false;
}
@@ -6788,7 +6789,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
SpellInfo const* windfurySpellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!windfurySpellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId);
return false;
}
@@ -7104,7 +7105,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
case 49270: spellId = 49268; break; // Rank 7
case 49271: spellId = 49269; break; // Rank 8
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non handled spell id: %u (LO)", procSpell->Id);
return false;
}
@@ -7424,7 +7425,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
SpellInfo const* triggerEntry = sSpellMgr->GetSpellInfo(triggered_spell_id);
if (!triggerEntry)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id);
return false;
}
@@ -7812,7 +7813,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
trigger_spell_id = 31643;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id);
return false;
}
}
@@ -7871,7 +7872,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 27815: trigger_spell_id = 27817; break;
case 27816: trigger_spell_id = 27818; break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
return false;
}
basepoints0 = CalculatePct(int32(damage), triggerAmount) / 3;
@@ -7931,7 +7932,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
trigger_spell_id = 63468;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->Id);
return false;
}
SpellInfo const* TriggerPS = sSpellMgr->GetSpellInfo(trigger_spell_id);
@@ -8037,14 +8038,14 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 48820: originalSpellId = 48824; break;
case 48821: originalSpellId = 48825; break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u not handled in HShock", procSpell->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u not handled in HShock", procSpell->Id);
return false;
}
}
SpellInfo const* originalSpell = sSpellMgr->GetSpellInfo(originalSpellId);
if (!originalSpell)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu", originalSpellId);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu", originalSpellId);
return false;
}
// percent stored in effect 1 (class scripts) base points
@@ -8169,7 +8170,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
if (triggerEntry == NULL)
{
// Don't cast unknown spell
- // TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u has 0 in EffectTriggered[%d]. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex());
+ // TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u has 0 in EffectTriggered[%d]. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex());
return false;
}
@@ -8646,7 +8647,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au
if (!triggerEntry)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u", triggered_spell_id, scriptId);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u", triggered_spell_id, scriptId);
return false;
}
@@ -8713,11 +8714,11 @@ FactionTemplateEntry const* Unit::GetFactionTemplateEntry() const
if (GetGUID() != guid)
{
if (Player const* player = ToPlayer())
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Player %s has invalid faction (faction template id) #%u", player->GetName().c_str(), getFaction());
+ TC_LOG_ERROR("entities.unit", "Player %s has invalid faction (faction template id) #%u", player->GetName().c_str(), getFaction());
else if (Creature const* creature = ToCreature())
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction());
+ TC_LOG_ERROR("entities.unit", "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction());
else
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName().c_str(), uint32(GetTypeId()), getFaction());
+ TC_LOG_ERROR("entities.unit", "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName().c_str(), uint32(GetTypeId()), getFaction());
guid = GetGUID();
}
@@ -9089,7 +9090,7 @@ void Unit::RemoveAllAttackers()
AttackerSet::iterator iter = m_attackers.begin();
if (!(*iter)->AttackStop())
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "WORLD: Unit has an attacker that isn't attacking it!");
+ TC_LOG_ERROR("entities.unit", "WORLD: Unit has an attacker that isn't attacking it!");
m_attackers.erase(iter);
}
}
@@ -9259,7 +9260,7 @@ Minion *Unit::GetFirstMinion() const
if (pet->HasUnitTypeMask(UNIT_MASK_MINION))
return (Minion*)pet;
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::GetFirstMinion: Minion %u not exist.", GUID_LOPART(pet_guid));
+ TC_LOG_ERROR("entities.unit", "Unit::GetFirstMinion: Minion %u not exist.", GUID_LOPART(pet_guid));
const_cast<Unit*>(this)->SetMinionGUID(0);
}
@@ -9274,7 +9275,7 @@ Guardian* Unit::GetGuardianPet() const
if (pet->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
return (Guardian*)pet;
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit::GetGuardianPet: Guardian " UI64FMTD " not exist.", pet_guid);
+ TC_LOG_FATAL("entities.unit", "Unit::GetGuardianPet: Guardian " UI64FMTD " not exist.", pet_guid);
const_cast<Unit*>(this)->SetPetGUID(0);
}
@@ -9288,7 +9289,7 @@ Unit* Unit::GetCharm() const
if (Unit* pet = ObjectAccessor::GetUnit(*this, charm_guid))
return pet;
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::GetCharm: Charmed creature %u not exist.", GUID_LOPART(charm_guid));
+ TC_LOG_ERROR("entities.unit", "Unit::GetCharm: Charmed creature %u not exist.", GUID_LOPART(charm_guid));
const_cast<Unit*>(this)->SetUInt64Value(UNIT_FIELD_CHARM, 0);
}
@@ -9310,13 +9311,13 @@ Unit* Unit::GetCharmerOrOwnerOrSelf() const
void Unit::SetMinion(Minion *minion, bool apply)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply);
+ TC_LOG_DEBUG("entities.unit", "SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply);
if (apply)
{
if (minion->GetOwnerGUID())
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
+ TC_LOG_FATAL("entities.unit", "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
return;
}
@@ -9382,7 +9383,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
// Send infinity cooldown - client does that automatically but after relog cooldown needs to be set again
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL));
- if (spellInfo && (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE))
+ if (spellInfo && (spellInfo->IsCooldownStartedOnEvent()))
ToPlayer()->AddSpellAndCategoryCooldowns(spellInfo, 0, NULL, true);
}
}
@@ -9390,7 +9391,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
{
if (minion->GetOwnerGUID() != GetGUID())
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
+ TC_LOG_FATAL("entities.unit", "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
return;
}
@@ -9424,7 +9425,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(minion->GetUInt32Value(UNIT_CREATED_BY_SPELL));
// Remove infinity cooldown
- if (spellInfo && (spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE))
+ if (spellInfo && (spellInfo->IsCooldownStartedOnEvent()))
ToPlayer()->SendCooldownEvent(spellInfo);
}
@@ -9502,7 +9503,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
if (GetTypeId() == TYPEID_PLAYER)
{
if (!AddUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID()))
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Player %s is trying to charm unit %u, but it already has a charmed unit " UI64FMTD "", GetName().c_str(), charm->GetEntry(), GetCharmGUID());
+ TC_LOG_FATAL("entities.unit", "Player %s is trying to charm unit %u, but it already has a charmed unit " UI64FMTD "", GetName().c_str(), charm->GetEntry(), GetCharmGUID());
charm->m_ControlledByPlayer = true;
/// @todo maybe we can use this flag to check if controlled by player
@@ -9515,7 +9516,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
charm->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
if (!charm->AddUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID()))
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
+ TC_LOG_FATAL("entities.unit", "Unit %u is being charmed, but it already has a charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
_isWalkingBeforeCharm = charm->IsWalking();
if (_isWalkingBeforeCharm)
@@ -9531,11 +9532,11 @@ void Unit::SetCharm(Unit* charm, bool apply)
if (GetTypeId() == TYPEID_PLAYER)
{
if (!RemoveUInt64Value(UNIT_FIELD_CHARM, charm->GetGUID()))
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Player %s is trying to uncharm unit %u, but it has another charmed unit " UI64FMTD "", GetName().c_str(), charm->GetEntry(), GetCharmGUID());
+ TC_LOG_FATAL("entities.unit", "Player %s is trying to uncharm unit %u, but it has another charmed unit " UI64FMTD "", GetName().c_str(), charm->GetEntry(), GetCharmGUID());
}
if (!charm->RemoveUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID()))
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit %u is being uncharmed, but it has another charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
+ TC_LOG_FATAL("entities.unit", "Unit %u is being uncharmed, but it has another charmer " UI64FMTD "", charm->GetEntry(), charm->GetCharmerGUID());
if (charm->GetTypeId() == TYPEID_PLAYER)
{
@@ -9679,14 +9680,14 @@ void Unit::RemoveAllControlled()
else if (target->GetOwnerGUID() == GetGUID() && target->IsSummon())
target->ToTempSummon()->UnSummon();
else
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
+ TC_LOG_ERROR("entities.unit", "Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
}
if (GetPetGUID())
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit %u is not able to release its pet " UI64FMTD, GetEntry(), GetPetGUID());
+ TC_LOG_FATAL("entities.unit", "Unit %u is not able to release its pet " UI64FMTD, GetEntry(), GetPetGUID());
if (GetMinionGUID())
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit %u is not able to release its minion " UI64FMTD, GetEntry(), GetMinionGUID());
+ TC_LOG_FATAL("entities.unit", "Unit %u is not able to release its minion " UI64FMTD, GetEntry(), GetMinionGUID());
if (GetCharmGUID())
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit %u is not able to release its charm " UI64FMTD, GetEntry(), GetCharmGUID());
+ TC_LOG_FATAL("entities.unit", "Unit %u is not able to release its charm " UI64FMTD, GetEntry(), GetCharmGUID());
}
bool Unit::isPossessedByPlayer() const
@@ -10546,7 +10547,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
break;
}
// Exorcism
- else if (spellProto->Category == 19)
+ else if (spellProto->GetCategory() == 19)
{
if (victim->GetCreatureTypeMask() & CREATURE_TYPEMASK_DEMON_OR_UNDEAD)
return true;
@@ -12200,7 +12201,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::UpdateSpeed: Unsupported move type (%d)", mtype);
+ TC_LOG_ERROR("entities.unit", "Unit::UpdateSpeed: Unsupported move type (%d)", mtype);
return;
}
@@ -12325,7 +12326,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
data.Initialize(MSG_MOVE_SET_PITCH_RATE, 8+4+2+4+4+4+4+4+4+4);
break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
+ TC_LOG_ERROR("entities.unit", "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
return;
}
@@ -12376,7 +12377,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
data.Initialize(SMSG_FORCE_PITCH_RATE_CHANGE, 16);
break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
+ TC_LOG_ERROR("entities.unit", "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
return;
}
data.append(GetPackGUID());
@@ -13069,7 +13070,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
{
if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!");
+ TC_LOG_ERROR("entities.unit", "ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!");
return false;
}
@@ -13134,7 +13135,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co
{
if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "attempt to access non-existing modifier value from UnitMods!");
+ TC_LOG_ERROR("entities.unit", "attempt to access non-existing modifier value from UnitMods!");
return 0.0f;
}
@@ -13164,7 +13165,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const
{
if (unitMod >= UNIT_MOD_END)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "attempt to access non-existing UnitMods in GetTotalAuraModValue()!");
+ TC_LOG_ERROR("entities.unit", "attempt to access non-existing UnitMods in GetTotalAuraModValue()!");
return 0.0f;
}
@@ -13454,7 +13455,7 @@ void Unit::RemoveFromWorld()
if (GetCharmerGUID())
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit %u has charmer guid when removed from world", GetEntry());
+ TC_LOG_FATAL("entities.unit", "Unit %u has charmer guid when removed from world", GetEntry());
ASSERT(false);
}
@@ -13462,7 +13463,7 @@ void Unit::RemoveFromWorld()
{
if (owner->m_Controlled.find(this) != owner->m_Controlled.end())
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
+ TC_LOG_FATAL("entities.unit", "Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
ASSERT(false);
}
}
@@ -13570,9 +13571,7 @@ CharmInfo::CharmInfo(Unit* unit)
}
}
-CharmInfo::~CharmInfo()
-{
-}
+CharmInfo::~CharmInfo() { }
void CharmInfo::RestoreState()
{
@@ -14093,7 +14092,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
// "handled" is needed as long as proc can be handled in multiple places
if (!handled && HandleAuraProc(target, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), Id);
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), Id);
takeCharges = true;
}
@@ -14118,7 +14117,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
{
case SPELL_AURA_PROC_TRIGGER_SPELL:
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
// Don`t drop charge or add cooldown for not started trigger
if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -14137,7 +14136,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
case SPELL_AURA_MANA_SHIELD:
case SPELL_AURA_DUMMY:
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleDummyAuraProc(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
@@ -14146,19 +14145,19 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN:
case SPELL_AURA_MOD_MELEE_HASTE:
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, isVictim ? "a victim's" : "an attacker's", triggeredByAura->GetId());
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, isVictim ? "a victim's" : "an attacker's", triggeredByAura->GetId());
takeCharges = true;
break;
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleOverrideClassScriptAuraProc(target, damage, triggeredByAura, procSpell, cooldown))
takeCharges = true;
break;
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE:
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
HandleAuraRaidProcFromChargeWithValue(triggeredByAura);
@@ -14167,7 +14166,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE:
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
HandleAuraRaidProcFromCharge(triggeredByAura);
@@ -14176,7 +14175,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
}
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
+ TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -14415,14 +14414,14 @@ void Unit::StopMoving()
{
ClearUnitState(UNIT_STATE_MOVING);
- // not need send any packets if not in world
- if (!IsInWorld())
+ // not need send any packets if not in world or not moving
+ if (!IsInWorld() || movespline->Finalized())
return;
+ // Update position now since Stop does not start a new movement that can be updated later
+ UpdateSplinePosition();
Movement::MoveSplineInit init(this);
- init.MoveTo(GetPositionX(), GetPositionY(), GetPositionZMinusOffset(), false);
- init.SetFacing(GetOrientation());
- init.Launch();
+ init.Stop();
}
void Unit::SendMovementFlagUpdate(bool self /* = false */)
@@ -14908,7 +14907,7 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id)
if (!pet->InitStatsForLevel(level))
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Pet::InitStatsForLevel() failed for creature (Entry: %u)!", pet->GetEntry());
+ TC_LOG_ERROR("entities.unit", "Pet::InitStatsForLevel() failed for creature (Entry: %u)!", pet->GetEntry());
return false;
}
@@ -15036,7 +15035,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura)
// Currently only Prayer of Mending
if (!(spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellFamilyFlags[1] & 0x20))
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
+ TC_LOG_DEBUG("spells", "Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
return false;
}
@@ -15086,7 +15085,7 @@ bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura)
damageSpellId = 43594;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleAuraRaidProcFromCharge, received unhandled spell: %u", spellProto->Id);
+ TC_LOG_ERROR("entities.unit", "Unit::HandleAuraRaidProcFromCharge, received unhandled spell: %u", spellProto->Id);
return false;
}
@@ -15248,7 +15247,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (!spiritOfRedemption)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "SET JUST_DIED");
+ TC_LOG_DEBUG("entities.unit", "SET JUST_DIED");
victim->setDeathState(JUST_DIED);
}
@@ -15273,7 +15272,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
// only if not player and not controlled by player pet. And not at BG
if ((durabilityLoss && !player && !victim->ToPlayer()->InBattleground()) || (player && sWorld->getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
+ TC_LOG_DEBUG("entities.unit", "We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
// durability lost message
WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
@@ -15293,7 +15292,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
}
else // creature died
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "DealDamageNotPlayer");
+ TC_LOG_DEBUG("entities.unit", "DealDamageNotPlayer");
if (!creature->IsPet())
{
@@ -15658,11 +15657,11 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
ASSERT(type != CHARM_TYPE_POSSESS || charmer->GetTypeId() == TYPEID_PLAYER);
ASSERT((type == CHARM_TYPE_VEHICLE) == IsVehicle());
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type));
+ TC_LOG_DEBUG("entities.unit", "SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type));
if (this == charmer)
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit::SetCharmedBy: Unit %u (GUID %u) is trying to charm itself!", GetEntry(), GetGUIDLow());
+ TC_LOG_FATAL("entities.unit", "Unit::SetCharmedBy: Unit %u (GUID %u) is trying to charm itself!", GetEntry(), GetGUIDLow());
return false;
}
@@ -15671,14 +15670,14 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->GetTransport())
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit::SetCharmedBy: Player on transport is trying to charm %u (GUID %u)", GetEntry(), GetGUIDLow());
+ TC_LOG_FATAL("entities.unit", "Unit::SetCharmedBy: Player on transport is trying to charm %u (GUID %u)", GetEntry(), GetGUIDLow());
return false;
}
// Already charmed
if (GetCharmerGUID())
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit::SetCharmedBy: %u (GUID %u) has already been charmed but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
+ TC_LOG_FATAL("entities.unit", "Unit::SetCharmedBy: %u (GUID %u) has already been charmed but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
return false;
}
@@ -15703,7 +15702,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
// StopCastingCharm may remove a possessed pet?
if (!IsInWorld())
{
- TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit::SetCharmedBy: %u (GUID %u) is not in world but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
+ TC_LOG_FATAL("entities.unit", "Unit::SetCharmedBy: %u (GUID %u) is not in world but %u (GUID %u) is trying to charm it!", GetEntry(), GetGUIDLow(), charmer->GetEntry(), charmer->GetGUIDLow());
return false;
}
@@ -15803,7 +15802,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
charmer = GetCharmer();
if (charmer != GetCharmer()) // one aura overrides another?
{
-// TC_LOG_FATAL(LOG_FILTER_UNITS, "Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD,
+// TC_LOG_FATAL("entities.unit", "Unit::RemoveCharmedBy: this: " UI64FMTD " true charmer: " UI64FMTD " false charmer: " UI64FMTD,
// GetGUID(), GetCharmerGUID(), charmer->GetGUID());
// ASSERT(false);
return;
@@ -15883,7 +15882,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
if (GetCharmInfo())
GetCharmInfo()->SetPetNumber(0, true);
else
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Aura::HandleModCharm: target=" UI64FMTD " with typeid=%d has a charm aura but no charm info!", GetGUID(), GetTypeId());
+ TC_LOG_ERROR("entities.unit", "Aura::HandleModCharm: target=" UI64FMTD " with typeid=%d has a charm aura but no charm info!", GetGUID(), GetTypeId());
}
}
break;
@@ -16726,7 +16725,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
if (!valid)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u specified in npc_spellclick_spells is not a valid vehicle enter aura!", itr->second.spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u specified in npc_spellclick_spells is not a valid vehicle enter aura!", itr->second.spellId);
continue;
}
@@ -16777,7 +16776,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
{
if (m_vehicle != vehicle)
{
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry());
+ TC_LOG_DEBUG("entities.vehicle", "EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry());
ExitVehicle();
}
else if (seatId >= 0 && seatId == GetTransSeat())
@@ -17011,7 +17010,7 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel
// prevent crash when a bad coord is sent by the client
if (!Trinity::IsValidMapCoord(x, y, z, orientation))
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Unit::UpdatePosition(%f, %f, %f) .. bad coordinates!", x, y, z);
+ TC_LOG_DEBUG("entities.unit", "Unit::UpdatePosition(%f, %f, %f) .. bad coordinates!", x, y, z);
return false;
}
@@ -17067,7 +17066,7 @@ void Unit::SendThreatListUpdate()
{
uint32 count = getThreatManager().getThreatList().size();
- //TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_UPDATE Message");
+ //TC_LOG_DEBUG("entities.unit", "WORLD: Send SMSG_THREAT_UPDATE Message");
WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8);
data.append(GetPackGUID());
data << uint32(count);
@@ -17087,7 +17086,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
{
uint32 count = getThreatManager().getThreatList().size();
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
+ TC_LOG_DEBUG("entities.unit", "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
data.append(GetPackGUID());
data.appendPackGUID(pHostileReference->getUnitGuid());
@@ -17104,7 +17103,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
void Unit::SendClearThreatListOpcode()
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_CLEAR Message");
+ TC_LOG_DEBUG("entities.unit", "WORLD: Send SMSG_THREAT_CLEAR Message");
WorldPacket data(SMSG_THREAT_CLEAR, 8);
data.append(GetPackGUID());
SendMessageToSet(&data, false);
@@ -17112,7 +17111,7 @@ void Unit::SendClearThreatListOpcode()
void Unit::SendRemoveFromThreatListOpcode(HostileReference* pHostileReference)
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_REMOVE Message");
+ TC_LOG_DEBUG("entities.unit", "WORLD: Send SMSG_THREAT_REMOVE Message");
WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8);
data.append(GetPackGUID());
data.appendPackGUID(pHostileReference->getUnitGuid());
@@ -17186,31 +17185,31 @@ void Unit::StopAttackFaction(uint32 faction_id)
void Unit::OutDebugInfo() const
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::OutDebugInfo");
- TC_LOG_INFO(LOG_FILTER_UNITS, "GUID " UI64FMTD ", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName().c_str());
- TC_LOG_INFO(LOG_FILTER_UNITS, "OwnerGUID " UI64FMTD ", MinionGUID " UI64FMTD ", CharmerGUID " UI64FMTD ", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID());
- TC_LOG_INFO(LOG_FILTER_UNITS, "In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
+ TC_LOG_ERROR("entities.unit", "Unit::OutDebugInfo");
+ TC_LOG_INFO("entities.unit", "GUID " UI64FMTD ", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName().c_str());
+ TC_LOG_INFO("entities.unit", "OwnerGUID " UI64FMTD ", MinionGUID " UI64FMTD ", CharmerGUID " UI64FMTD ", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID());
+ TC_LOG_INFO("entities.unit", "In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
if (IsInWorld())
- TC_LOG_INFO(LOG_FILTER_UNITS, "Mapid %u", GetMapId());
+ TC_LOG_INFO("entities.unit", "Mapid %u", GetMapId());
std::ostringstream o;
o << "Summon Slot: ";
for (uint32 i = 0; i < MAX_SUMMON_SLOT; ++i)
o << m_SummonSlot[i] << ", ";
- TC_LOG_INFO(LOG_FILTER_UNITS, "%s", o.str().c_str());
+ TC_LOG_INFO("entities.unit", "%s", o.str().c_str());
o.str("");
o << "Controlled List: ";
for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
o << (*itr)->GetGUID() << ", ";
- TC_LOG_INFO(LOG_FILTER_UNITS, "%s", o.str().c_str());
+ TC_LOG_INFO("entities.unit", "%s", o.str().c_str());
o.str("");
o << "Aura List: ";
for (AuraApplicationMap::const_iterator itr = m_appliedAuras.begin(); itr != m_appliedAuras.end(); ++itr)
o << itr->first << ", ";
- TC_LOG_INFO(LOG_FILTER_UNITS, "%s", o.str().c_str());
+ TC_LOG_INFO("entities.unit", "%s", o.str().c_str());
o.str("");
if (IsVehicle())
@@ -17219,11 +17218,11 @@ void Unit::OutDebugInfo() const
for (SeatMap::iterator itr = GetVehicleKit()->Seats.begin(); itr != GetVehicleKit()->Seats.end(); ++itr)
if (Unit* passenger = ObjectAccessor::GetUnit(*GetVehicleBase(), itr->second.Passenger.Guid))
o << passenger->GetGUID() << ", ";
- TC_LOG_INFO(LOG_FILTER_UNITS, "%s", o.str().c_str());
+ TC_LOG_INFO("entities.unit", "%s", o.str().c_str());
}
if (GetVehicle())
- TC_LOG_INFO(LOG_FILTER_UNITS, "On vehicle %u.", GetVehicleBase()->GetEntry());
+ TC_LOG_INFO("entities.unit", "On vehicle %u.", GetVehicleBase()->GetEntry());
}
uint32 Unit::GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex) const
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 25352a924ef..84c687a2cce 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -786,7 +786,7 @@ struct DiminishingReturn
{
DiminishingReturn(DiminishingGroup group, uint32 t, uint32 count)
: DRGroup(group), stack(0), hitTime(t), hitCount(count)
- {}
+ { }
DiminishingGroup DRGroup:16;
uint16 stack:16;
@@ -804,7 +804,7 @@ class DispelInfo
{
public:
explicit DispelInfo(Unit* dispeller, uint32 dispellerSpellId, uint8 chargesRemoved) :
- _dispellerUnit(dispeller), _dispellerSpell(dispellerSpellId), _chargesRemoved(chargesRemoved) {}
+ _dispellerUnit(dispeller), _dispellerSpell(dispellerSpellId), _chargesRemoved(chargesRemoved) { }
Unit* GetDispeller() const { return _dispellerUnit; }
uint32 GetDispellerSpellId() const { return _dispellerSpell; }
@@ -822,7 +822,7 @@ private:
struct CleanDamage
{
CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome) :
- absorbed_damage(absorbed), mitigated_damage(mitigated), attackType(_attackType), hitOutCome(_hitOutCome) {}
+ absorbed_damage(absorbed), mitigated_damage(mitigated), attackType(_attackType), hitOutCome(_hitOutCome) { }
uint32 absorbed_damage;
uint32 mitigated_damage;
@@ -951,7 +951,7 @@ struct SpellNonMeleeDamage
SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask)
: target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), overkill(0), schoolMask(_schoolMask),
absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0), cleanDamage(0)
- {}
+ { }
Unit *target;
Unit *attacker;
@@ -972,7 +972,7 @@ struct SpellNonMeleeDamage
struct SpellPeriodicAuraLogInfo
{
SpellPeriodicAuraLogInfo(AuraEffect const* _auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical)
- : auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){}
+ : auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){ }
AuraEffect const* auraEff;
uint32 damage;
@@ -1027,7 +1027,7 @@ enum CurrentSpellTypes
struct GlobalCooldown
{
- explicit GlobalCooldown(uint32 _dur = 0, uint32 _time = 0) : duration(_dur), cast_time(_time) {}
+ explicit GlobalCooldown(uint32 _dur = 0, uint32 _time = 0) : duration(_dur), cast_time(_time) { }
uint32 duration;
uint32 cast_time;
@@ -1038,7 +1038,7 @@ typedef UNORDERED_MAP<uint32 /*category*/, GlobalCooldown> GlobalCooldownList;
class GlobalCooldownMgr // Shared by Player and CharmInfo
{
public:
- GlobalCooldownMgr() {}
+ GlobalCooldownMgr() { }
public:
bool HasGlobalCooldown(SpellInfo const* spellInfo) const;
@@ -1080,7 +1080,7 @@ enum CommandStates
struct UnitActionBarEntry
{
- UnitActionBarEntry() : packedData(uint32(ACT_DISABLED) << 24) {}
+ UnitActionBarEntry() : packedData(uint32(ACT_DISABLED) << 24) { }
uint32 packedData;
@@ -2158,7 +2158,7 @@ class Unit : public WorldObject
typedef std::list<GameObject*> GameObjectList;
GameObjectList m_gameObj;
- bool m_isSorted;
+
uint32 m_transform;
Spell* m_currentSpells[CURRENT_MAX_SPELL];
@@ -2214,6 +2214,7 @@ class Unit : public WorldObject
bool HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura);
void UpdateSplineMovement(uint32 t_diff);
+ void UpdateSplinePosition();
// player or player's pet
float GetCombatRatingReduction(CombatRating cr) const;
@@ -2255,7 +2256,7 @@ namespace Trinity
class PowerPctOrderPred
{
public:
- PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) {}
+ PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) { }
bool operator() (const Unit* a, const Unit* b) const
{
float rA = a->GetMaxPower(m_power) ? float(a->GetPower(m_power)) / float(a->GetMaxPower(m_power)) : 0.0f;
@@ -2271,7 +2272,7 @@ namespace Trinity
class HealthPctOrderPred
{
public:
- HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) {}
+ HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) { }
bool operator() (const Unit* a, const Unit* b) const
{
float rA = a->GetMaxHealth() ? float(a->GetHealth()) / float(a->GetMaxHealth()) : 0.0f;
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 88c9ab203b0..e1d6a2f3d9e 100755
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -147,13 +147,13 @@ void Vehicle::Uninstall()
/// @Prevent recursive uninstall call. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
if (_status == STATUS_UNINSTALLING && !GetBase()->HasUnitTypeMask(UNIT_MASK_MINION))
{
- TC_LOG_ERROR(LOG_FILTER_VEHICLES, "Vehicle GuidLow: %u, Entry: %u attempts to uninstall, but already has STATUS_UNINSTALLING! "
+ TC_LOG_ERROR("entities.vehicle", "Vehicle GuidLow: %u, Entry: %u attempts to uninstall, but already has STATUS_UNINSTALLING! "
"Check Uninstall/PassengerBoarded script hooks for errors.", _me->GetGUIDLow(), _me->GetEntry());
return;
}
_status = STATUS_UNINSTALLING;
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Vehicle::Uninstall Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
+ TC_LOG_DEBUG("entities.vehicle", "Vehicle::Uninstall Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
RemoveAllPassengers();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
@@ -176,7 +176,7 @@ void Vehicle::Reset(bool evading /*= false*/)
if (GetBase()->GetTypeId() != TYPEID_UNIT)
return;
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Vehicle::Reset (Entry: %u, GuidLow: %u, DBGuid: %u)", GetCreatureEntry(), _me->GetGUIDLow(), _me->ToCreature()->GetDBTableGUIDLow());
+ TC_LOG_DEBUG("entities.vehicle", "Vehicle::Reset (Entry: %u, GuidLow: %u, DBGuid: %u)", GetCreatureEntry(), _me->GetGUIDLow(), _me->ToCreature()->GetDBTableGUIDLow());
ApplyAllImmunities();
InstallAllAccessories(evading);
@@ -252,7 +252,7 @@ void Vehicle::ApplyAllImmunities()
void Vehicle::RemoveAllPassengers()
{
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Vehicle::RemoveAllPassengers. Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
+ TC_LOG_DEBUG("entities.vehicle", "Vehicle::RemoveAllPassengers. Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
/// Setting to_Abort to true will cause @VehicleJoinEvent::Abort to be executed on next @Unit::UpdateEvents call
/// This will properly "reset" the pending join process for the passenger.
@@ -388,13 +388,13 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 typ
/// @Prevent adding accessories when vehicle is uninstalling. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
if (_status == STATUS_UNINSTALLING)
{
- TC_LOG_ERROR(LOG_FILTER_VEHICLES, "Vehicle (GuidLow: %u, DB GUID: %u, Entry: %u) attempts to install accessory (Entry: %u) on seat %d with STATUS_UNINSTALLING! "
+ TC_LOG_ERROR("entities.vehicle", "Vehicle (GuidLow: %u, DB GUID: %u, Entry: %u) attempts to install accessory (Entry: %u) on seat %d with STATUS_UNINSTALLING! "
"Check Uninstall/PassengerBoarded script hooks for errors.", _me->GetGUIDLow(),
(_me->GetTypeId() == TYPEID_UNIT ? _me->ToCreature()->GetDBTableGUIDLow() : _me->GetGUIDLow()), GetCreatureEntry(), entry, (int32)seatId);
return;
}
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Vehicle (GuidLow: %u, DB Guid: %u, Entry %u): installing accessory (Entry: %u) on seat: %d",
+ TC_LOG_DEBUG("entities.vehicle", "Vehicle (GuidLow: %u, DB Guid: %u, Entry %u): installing accessory (Entry: %u) on seat: %d",
_me->GetGUIDLow(), (_me->GetTypeId() == TYPEID_UNIT ? _me->ToCreature()->GetDBTableGUIDLow() : _me->GetGUIDLow()), GetCreatureEntry(),
entry, (int32)seatId);
@@ -429,12 +429,12 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
/// @Prevent adding passengers when vehicle is uninstalling. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
if (_status == STATUS_UNINSTALLING)
{
- TC_LOG_ERROR(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, attempting to board vehicle GuidLow: %u, Entry: %u during uninstall! SeatId: %d",
+ TC_LOG_ERROR("entities.vehicle", "Passenger GuidLow: %u, Entry: %u, attempting to board vehicle GuidLow: %u, Entry: %u during uninstall! SeatId: %d",
unit->GetGUIDLow(), unit->GetEntry(), _me->GetGUIDLow(), _me->GetEntry(), (int32)seatId);
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Unit %s scheduling enter vehicle (entry: %u, vehicleId: %u, guid: %u (dbguid: %u) on seat %d",
+ TC_LOG_DEBUG("entities.vehicle", "Unit %s scheduling enter vehicle (entry: %u, vehicleId: %u, guid: %u (dbguid: %u) on seat %d",
unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUIDLow(),
(_me->GetTypeId() == TYPEID_UNIT ? _me->ToCreature()->GetDBTableGUIDLow() : 0), (int32)seatId);
@@ -504,7 +504,7 @@ Vehicle* Vehicle::RemovePassenger(Unit* unit)
SeatMap::iterator seat = GetSeatIteratorForPassenger(unit);
ASSERT(seat != Seats.end());
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Unit %s exit vehicle entry %u id %u dbguid %u seat %d",
+ TC_LOG_DEBUG("entities.vehicle", "Unit %s exit vehicle entry %u id %u dbguid %u seat %d",
unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUIDLow(), (int32)seat->first);
if (seat->second.SeatInfo->CanEnterOrExit() && ++UsableSeatNum)
@@ -679,30 +679,6 @@ uint8 Vehicle::GetAvailableSeatCount() const
return ret;
}
-void Vehicle::CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
-{
- float inx = x, iny = y, inz = z;
- if (o)
- *o = Position::NormalizeOrientation(GetBase()->GetOrientation() + *o);
-
- x = GetBase()->GetPositionX() + inx * std::cos(GetBase()->GetOrientation()) - iny * std::sin(GetBase()->GetOrientation());
- y = GetBase()->GetPositionY() + iny * std::cos(GetBase()->GetOrientation()) + inx * std::sin(GetBase()->GetOrientation());
- z = GetBase()->GetPositionZ() + inz;
-}
-
-void Vehicle::CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
-{
- if (o)
- *o = Position::NormalizeOrientation(*o - GetBase()->GetOrientation());
-
- z -= GetBase()->GetPositionZ();
- y -= GetBase()->GetPositionY(); // y = searchedY * std::cos(o) + searchedX * std::sin(o)
- x -= GetBase()->GetPositionX(); // x = searchedX * std::cos(o) + searchedY * std::sin(o + pi)
- float inx = x, iny = y;
- y = (iny - inx * std::tan(GetBase()->GetOrientation())) / (std::cos(GetBase()->GetOrientation()) + std::sin(GetBase()->GetOrientation()) * std::tan(GetBase()->GetOrientation()));
- x = (inx + iny * std::tan(GetBase()->GetOrientation())) / (std::cos(GetBase()->GetOrientation()) + std::sin(GetBase()->GetOrientation()) * std::tan(GetBase()->GetOrientation()));
-}
-
/**
* @fn void Vehicle::RemovePendingEvent(VehicleJoinEvent* e)
*
@@ -896,7 +872,7 @@ void VehicleJoinEvent::Abort(uint64)
/// Check if the Vehicle was already uninstalled, in which case all auras were removed already
if (Target)
{
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, board on vehicle GuidLow: %u, Entry: %u SeatId: %d cancelled",
+ TC_LOG_DEBUG("entities.vehicle", "Passenger GuidLow: %u, Entry: %u, board on vehicle GuidLow: %u, Entry: %u SeatId: %d cancelled",
Passenger->GetGUIDLow(), Passenger->GetEntry(), Target->GetBase()->GetGUIDLow(), Target->GetBase()->GetEntry(), (int32)Seat->first);
/// @SPELL_AURA_CONTROL_VEHICLE auras can be applied even when the passenger is not (yet) on the vehicle.
@@ -905,7 +881,7 @@ void VehicleJoinEvent::Abort(uint64)
Target->GetBase()->RemoveAurasByType(SPELL_AURA_CONTROL_VEHICLE, Passenger->GetGUID());
}
else
- TC_LOG_DEBUG(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, board on uninstalled vehicle SeatId: %d cancelled",
+ TC_LOG_DEBUG("entities.vehicle", "Passenger GuidLow: %u, Entry: %u, board on uninstalled vehicle SeatId: %d cancelled",
Passenger->GetGUIDLow(), Passenger->GetEntry(), (int32)Seat->first);
if (Passenger->IsInWorld() && Passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
diff --git a/src/server/game/Entities/Vehicle/Vehicle.h b/src/server/game/Entities/Vehicle/Vehicle.h
index 9fb1b6614b5..7dc9c36ecef 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.h
+++ b/src/server/game/Entities/Vehicle/Vehicle.h
@@ -89,10 +89,20 @@ class Vehicle : public TransportBase
void InitMovementInfoForBase();
/// This method transforms supplied transport offsets into global coordinates
- void CalculatePassengerPosition(float& x, float& y, float& z, float* o = NULL) const;
+ void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
+ {
+ TransportBase::CalculatePassengerPosition(x, y, z, o,
+ GetBase()->GetPositionX(), GetBase()->GetPositionY(),
+ GetBase()->GetPositionZ(), GetBase()->GetOrientation());
+ }
/// This method transforms supplied global coordinates into local offsets
- void CalculatePassengerOffset(float& x, float& y, float& z, float* o = NULL) const;
+ void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
+ {
+ TransportBase::CalculatePassengerOffset(x, y, z, o,
+ GetBase()->GetPositionX(), GetBase()->GetPositionY(),
+ GetBase()->GetPositionZ(), GetBase()->GetOrientation());
+ }
void RemovePendingEvent(VehicleJoinEvent* e);
void RemovePendingEventsForSeat(int8 seatId);
@@ -114,7 +124,7 @@ class VehicleJoinEvent : public BasicEvent
{
friend class Vehicle;
protected:
- VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) {}
+ VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) { }
~VehicleJoinEvent();
bool Execute(uint64, uint32);
void Abort(uint64);
diff --git a/src/server/game/Entities/Vehicle/VehicleDefines.h b/src/server/game/Entities/Vehicle/VehicleDefines.h
index ce922b550c1..0290ecf7859 100644
--- a/src/server/game/Entities/Vehicle/VehicleDefines.h
+++ b/src/server/game/Entities/Vehicle/VehicleDefines.h
@@ -81,7 +81,7 @@ struct VehicleSeat
struct VehicleAccessory
{
VehicleAccessory(uint32 entry, int8 seatId, bool isMinion, uint8 summonType, uint32 summonTime) :
- AccessoryEntry(entry), IsMinion(isMinion), SummonTime(summonTime), SeatId(seatId), SummonedType(summonType) {}
+ AccessoryEntry(entry), IsMinion(isMinion), SummonTime(summonTime), SeatId(seatId), SummonedType(summonType) { }
uint32 AccessoryEntry;
uint32 IsMinion;
uint32 SummonTime;
@@ -105,6 +105,31 @@ public:
/// This method transforms supplied global coordinates into local offsets
virtual void CalculatePassengerOffset(float& x, float& y, float& z, float* o = NULL) const = 0;
+
+protected:
+ static void CalculatePassengerPosition(float& x, float& y, float& z, float* o, float transX, float transY, float transZ, float transO)
+ {
+ float inx = x, iny = y, inz = z;
+ if (o)
+ *o = Position::NormalizeOrientation(transO + *o);
+
+ x = transX + inx * std::cos(transO) - iny * std::sin(transO);
+ y = transY + iny * std::cos(transO) + inx * std::sin(transO);
+ z = transZ + inz;
+ }
+
+ static void CalculatePassengerOffset(float& x, float& y, float& z, float* o, float transX, float transY, float transZ, float transO)
+ {
+ if (o)
+ *o = Position::NormalizeOrientation(*o - transO);
+
+ z -= transZ;
+ y -= transY; // y = searchedY * std::cos(o) + searchedX * std::sin(o)
+ x -= transX; // x = searchedX * std::cos(o) + searchedY * std::sin(o + pi)
+ float inx = x, iny = y;
+ y = (iny - inx * std::tan(transO)) / (std::cos(transO) + std::sin(transO) * std::tan(transO));
+ x = (inx + iny * std::tan(transO)) / (std::cos(transO) + std::sin(transO) * std::tan(transO));
+ }
};
#endif
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index 0d59b7fa2f4..b0428de6e28 100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -210,7 +210,7 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
mGameEvent.clear();
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game events. DB table `game_event` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 game events. DB table `game_event` is empty.");
return;
}
@@ -222,7 +222,7 @@ void GameEventMgr::LoadFromDB()
uint8 event_id = fields[0].GetUInt8();
if (event_id == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event` game event entry 0 is reserved and can't be used.");
+ TC_LOG_ERROR("sql.sql", "`game_event` game event entry 0 is reserved and can't be used.");
continue;
}
@@ -241,7 +241,7 @@ void GameEventMgr::LoadFromDB()
if (pGameEvent.length == 0 && pGameEvent.state == GAMEEVENT_NORMAL) // length>0 is validity check
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event` game event id (%i) isn't a world event and has length = 0, thus it can't be used.", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event` game event id (%i) isn't a world event and has length = 0, thus it can't be used.", event_id);
continue;
}
@@ -249,7 +249,7 @@ void GameEventMgr::LoadFromDB()
{
if (!sHolidaysStore.LookupEntry(pGameEvent.holiday_id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event` game event id (%i) have not existed holiday id %u.", event_id, pGameEvent.holiday_id);
+ TC_LOG_ERROR("sql.sql", "`game_event` game event id (%i) have not existed holiday id %u.", event_id, pGameEvent.holiday_id);
pGameEvent.holiday_id = HOLIDAY_NONE;
}
}
@@ -260,11 +260,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Saves Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Saves Data...");
{
uint32 oldMSTime = getMSTime();
@@ -272,7 +272,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = CharacterDatabase.Query("SELECT eventEntry, state, next_start FROM game_event_save");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
else
{
uint32 count = 0;
@@ -284,7 +284,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_save` game event entry (%i) is out of range compared to max event entry in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_save` game event entry (%i) is out of range compared to max event entry in `game_event`", event_id);
continue;
}
@@ -295,7 +295,7 @@ void GameEventMgr::LoadFromDB()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "game_event_save includes event save for non-worldevent id %u", event_id);
+ TC_LOG_ERROR("sql.sql", "game_event_save includes event save for non-worldevent id %u", event_id);
continue;
}
@@ -303,19 +303,19 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Prerequisite Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Prerequisite Data...");
{
uint32 oldMSTime = getMSTime();
// 0 1
QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
else
{
uint32 count = 0;
@@ -327,7 +327,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_prerequisite` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_prerequisite` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -336,14 +336,14 @@ void GameEventMgr::LoadFromDB()
uint16 prerequisite_event = fields[1].GetUInt32();
if (prerequisite_event >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_prerequisite` game event prerequisite id (%i) is out of range compared to max event id in `game_event`", prerequisite_event);
+ TC_LOG_ERROR("sql.sql", "`game_event_prerequisite` game event prerequisite id (%i) is out of range compared to max event id in `game_event`", prerequisite_event);
continue;
}
mGameEvent[event_id].prerequisite_events.insert(prerequisite_event);
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "game_event_prerequisiste includes event entry for non-worldevent id %u", event_id);
+ TC_LOG_ERROR("sql.sql", "game_event_prerequisiste includes event entry for non-worldevent id %u", event_id);
continue;
}
@@ -351,12 +351,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Creature Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Creature Data...");
{
uint32 oldMSTime = getMSTime();
@@ -364,7 +364,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry FROM game_event_creature");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
else
{
uint32 count = 0;
@@ -380,13 +380,13 @@ void GameEventMgr::LoadFromDB()
CreatureData const* data = sObjectMgr->GetCreatureData(guid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_creature` contains creature (GUID: %u) not found in `creature` table.", guid);
+ TC_LOG_ERROR("sql.sql", "`game_event_creature` contains creature (GUID: %u) not found in `creature` table.", guid);
continue;
}
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_creature` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -397,12 +397,12 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event GO Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event GO Data...");
{
uint32 oldMSTime = getMSTime();
@@ -410,7 +410,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry FROM game_event_gameobject");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
else
{
uint32 count = 0;
@@ -426,13 +426,13 @@ void GameEventMgr::LoadFromDB()
GameObjectData const* data = sObjectMgr->GetGOData(guid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_gameobject` contains gameobject (GUID: %u) not found in `gameobject` table.", guid);
+ TC_LOG_ERROR("sql.sql", "`game_event_gameobject` contains gameobject (GUID: %u) not found in `gameobject` table.", guid);
continue;
}
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_gameobject` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -443,11 +443,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Model/Equipment Change Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Model/Equipment Change Data...");
{
uint32 oldMSTime = getMSTime();
@@ -456,7 +456,7 @@ void GameEventMgr::LoadFromDB()
"FROM creature JOIN game_event_model_equip ON creature.guid=game_event_model_equip.guid");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
else
{
uint32 count = 0;
@@ -470,7 +470,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventModelEquip.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_model_equip` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_model_equip` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -486,7 +486,7 @@ void GameEventMgr::LoadFromDB()
int8 equipId = static_cast<int8>(newModelEquipSet.equipment_id);
if (!sObjectMgr->GetEquipmentInfo(entry, equipId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_event_model_equip` have creature (Guid: %u, entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.",
+ TC_LOG_ERROR("sql.sql", "Table `game_event_model_equip` have creature (Guid: %u, entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.",
guid, entry, newModelEquipSet.equipment_id);
continue;
}
@@ -498,11 +498,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Quest Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Quest Data...");
{
uint32 oldMSTime = getMSTime();
@@ -510,7 +510,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT id, quest, eventEntry FROM game_event_creature_quest");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
else
{
uint32 count = 0;
@@ -524,7 +524,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventCreatureQuests.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_creature_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_creature_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -535,11 +535,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event GO Quest Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event GO Quest Data...");
{
uint32 oldMSTime = getMSTime();
@@ -547,7 +547,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT id, quest, eventEntry FROM game_event_gameobject_quest");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
else
{
uint32 count = 0;
@@ -561,7 +561,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventGameObjectQuests.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_gameobject_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_gameobject_quest` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -572,11 +572,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Quest Condition Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Quest Condition Data...");
{
uint32 oldMSTime = getMSTime();
@@ -584,7 +584,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT quest, eventEntry, condition_id, num FROM game_event_quest_condition");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
else
{
uint32 count = 0;
@@ -599,7 +599,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_quest_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_quest_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -611,11 +611,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Condition Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Condition Data...");
{
uint32 oldMSTime = getMSTime();
@@ -623,7 +623,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, condition_id, req_num, max_world_state_field, done_world_state_field FROM game_event_condition");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
else
{
uint32 count = 0;
@@ -636,7 +636,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_condition` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -649,11 +649,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Condition Save Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Condition Save Data...");
{
uint32 oldMSTime = getMSTime();
@@ -661,7 +661,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = CharacterDatabase.Query("SELECT eventEntry, condition_id, done FROM game_event_condition_save");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
else
{
uint32 count = 0;
@@ -674,7 +674,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_condition_save` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_condition_save` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -685,7 +685,7 @@ void GameEventMgr::LoadFromDB()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "game_event_condition_save contains not present condition evt id %u cond id %u", event_id, condition);
+ TC_LOG_ERROR("sql.sql", "game_event_condition_save contains not present condition evt id %u cond id %u", event_id, condition);
continue;
}
@@ -693,11 +693,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event NPCflag Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event NPCflag Data...");
{
uint32 oldMSTime = getMSTime();
@@ -705,7 +705,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT guid, eventEntry, npcflag FROM game_event_npcflag");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
else
{
uint32 count = 0;
@@ -719,7 +719,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_npcflag` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_npcflag` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -729,11 +729,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Seasonal Quest Relations...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Seasonal Quest Relations...");
{
uint32 oldMSTime = getMSTime();
@@ -741,7 +741,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT questId, eventEntry FROM game_event_seasonal_questrelation");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
else
{
uint32 count = 0;
@@ -754,13 +754,13 @@ void GameEventMgr::LoadFromDB()
if (!sObjectMgr->GetQuestTemplate(questId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_seasonal_questrelation` quest id (%u) does not exist in `quest_template`", questId);
+ TC_LOG_ERROR("sql.sql", "`game_event_seasonal_questrelation` quest id (%u) does not exist in `quest_template`", questId);
continue;
}
if (eventEntry >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_seasonal_questrelation` event id (%u) is out of range compared to max event in `game_event`", eventEntry);
+ TC_LOG_ERROR("sql.sql", "`game_event_seasonal_questrelation` event id (%u) is out of range compared to max event in `game_event`", eventEntry);
continue;
}
@@ -769,11 +769,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Vendor Additions Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Vendor Additions Data...");
{
uint32 oldMSTime = getMSTime();
@@ -781,7 +781,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, guid, item, maxcount, incrtime, ExtendedCost FROM game_event_npc_vendor ORDER BY guid, slot ASC");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
else
{
uint32 count = 0;
@@ -793,7 +793,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEventVendors.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_npc_vendor` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_npc_vendor` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -831,11 +831,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Battleground Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Battleground Data...");
{
uint32 oldMSTime = getMSTime();
@@ -843,7 +843,7 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, bgflag FROM game_event_battleground_holiday");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
else
{
uint32 count = 0;
@@ -855,7 +855,7 @@ void GameEventMgr::LoadFromDB()
if (event_id >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_battleground_holiday` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_battleground_holiday` game event id (%u) is out of range compared to max event id in `game_event`", event_id);
continue;
}
@@ -865,11 +865,11 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Pool Data...");
+ TC_LOG_INFO("server.loading", "Loading Game Event Pool Data...");
{
uint32 oldMSTime = getMSTime();
@@ -878,7 +878,7 @@ void GameEventMgr::LoadFromDB()
" JOIN game_event_pool ON pool_template.entry = game_event_pool.pool_entry");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
else
{
uint32 count = 0;
@@ -893,13 +893,13 @@ void GameEventMgr::LoadFromDB()
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`game_event_pool` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
+ TC_LOG_ERROR("sql.sql", "`game_event_pool` game event id (%i) is out of range compared to max event id in `game_event`", event_id);
continue;
}
if (!sPoolMgr->CheckPool(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "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.", entry);
+ TC_LOG_ERROR("sql.sql", "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.", entry);
continue;
}
@@ -910,7 +910,7 @@ void GameEventMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
}
@@ -972,7 +972,7 @@ void GameEventMgr::StartArenaSeason()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "ArenaSeason (%u) must be an existant Arena Season", season);
+ TC_LOG_ERROR("gameevent", "ArenaSeason (%u) must be an existant Arena Season", season);
return;
}
@@ -981,12 +981,12 @@ void GameEventMgr::StartArenaSeason()
if (eventId >= mGameEvent.size())
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "EventEntry %u for ArenaSeason (%u) does not exists", eventId, season);
+ TC_LOG_ERROR("gameevent", "EventEntry %u for ArenaSeason (%u) does not exists", eventId, season);
return;
}
StartEvent(eventId, true);
- TC_LOG_INFO(LOG_FILTER_GAMEEVENTS, "Arena Season %u started...", season);
+ TC_LOG_INFO("gameevent", "Arena Season %u started...", season);
}
@@ -1000,7 +1000,7 @@ uint32 GameEventMgr::Update() // return the next e
{
// must do the activating first, and after that the deactivating
// so first queue it
- //TC_LOG_ERROR(LOG_FILTER_SQL, "Checking event %u", itr);
+ //TC_LOG_ERROR("sql.sql", "Checking event %u", itr);
if (CheckOneGameEvent(itr))
{
// if the world event is in NEXTPHASE state, and the time has passed to finish this event, then do so
@@ -1021,14 +1021,14 @@ uint32 GameEventMgr::Update() // return the next e
// changed, save to DB the gameevent state, will be updated in next update cycle
SaveWorldEventStateToDB(itr);
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "GameEvent %u is active", itr->first);
+ //TC_LOG_DEBUG("misc", "GameEvent %u is active", itr->first);
// queue for activation
if (!IsActiveEvent(itr))
activate.insert(itr);
}
else
{
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "GameEvent %u is not active", itr->first);
+ //TC_LOG_DEBUG("misc", "GameEvent %u is not active", itr->first);
if (IsActiveEvent(itr))
deactivate.insert(itr);
else
@@ -1056,13 +1056,13 @@ uint32 GameEventMgr::Update() // return the next e
nextEventDelay = 0;
for (std::set<uint16>::iterator itr = deactivate.begin(); itr != deactivate.end(); ++itr)
StopEvent(*itr);
- TC_LOG_INFO(LOG_FILTER_GAMEEVENTS, "Next game event check in %u seconds.", nextEventDelay + 1);
+ TC_LOG_INFO("gameevent", "Next game event check in %u seconds.", nextEventDelay + 1);
return (nextEventDelay + 1) * IN_MILLISECONDS; // Add 1 second to be sure event has started/stopped at next call
}
void GameEventMgr::UnApplyEvent(uint16 event_id)
{
- TC_LOG_INFO(LOG_FILTER_GAMEEVENTS, "GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str());
+ TC_LOG_INFO("gameevent", "GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str());
//! Run SAI scripts with SMART_EVENT_GAME_EVENT_END
RunSmartAIScripts(event_id, false);
// un-spawn positive event tagged objects
@@ -1089,7 +1089,7 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
if (announce == 1 || (announce == 2 && sWorld->getBoolConfig(CONFIG_EVENT_ANNOUNCE)))
sWorld->SendWorldText(LANG_EVENTMESSAGE, mGameEvent[event_id].description.c_str());
- TC_LOG_INFO(LOG_FILTER_GAMEEVENTS, "GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str());
+ TC_LOG_INFO("gameevent", "GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str());
//! Run SAI scripts with SMART_EVENT_GAME_EVENT_END
RunSmartAIScripts(event_id, true);
@@ -1163,7 +1163,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
+ TC_LOG_ERROR("gameevent", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventCreatureGuids.size());
return;
}
@@ -1181,7 +1181,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
Creature* creature = new Creature;
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Spawning creature %u", *itr);
+ //TC_LOG_DEBUG("misc", "Spawning creature %u", *itr);
if (!creature->LoadCreatureFromDB(*itr, map))
delete creature;
}
@@ -1190,7 +1190,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
+ TC_LOG_ERROR("gameevent", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventGameobjectGuids.size());
return;
}
@@ -1208,7 +1208,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Spawning gameobject %u", *itr);
+ //TC_LOG_DEBUG("misc", "Spawning gameobject %u", *itr);
/// @todo find out when it is add to map
if (!pGameobject->LoadGameObjectFromDB(*itr, map, false))
delete pGameobject;
@@ -1223,7 +1223,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")",
+ TC_LOG_ERROR("gameevent", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")",
internal_event_id, mGameEventPoolIds.size());
return;
}
@@ -1238,7 +1238,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
+ TC_LOG_ERROR("gameevent", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventCreatureGuids.size());
return;
}
@@ -1260,7 +1260,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
+ TC_LOG_ERROR("gameevent", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
internal_event_id, mGameEventGameobjectGuids.size());
return;
}
@@ -1281,7 +1281,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
}
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
{
- TC_LOG_ERROR(LOG_FILTER_GAMEEVENTS, "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size());
+ TC_LOG_ERROR("gameevent", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size());
return;
}
@@ -1493,9 +1493,7 @@ void GameEventMgr::UpdateWorldStates(uint16 event_id, bool Activate)
}
}
-GameEventMgr::GameEventMgr() : isSystemInit(false)
-{
-}
+GameEventMgr::GameEventMgr() : isSystemInit(false) { }
void GameEventMgr::HandleQuestComplete(uint32 quest_id)
{
diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h
index ad4ddeeba88..d25da0db89d 100644
--- a/src/server/game/Events/GameEventMgr.h
+++ b/src/server/game/Events/GameEventMgr.h
@@ -55,7 +55,7 @@ typedef std::map<uint32 /*condition id*/, GameEventFinishCondition> GameEventCon
struct GameEventData
{
- GameEventData() : start(1), end(0), nextstart(0), occurence(0), length(0), holiday_id(HOLIDAY_NONE), state(GAMEEVENT_NORMAL) {}
+ GameEventData() : start(1), end(0), nextstart(0), occurence(0), length(0), holiday_id(HOLIDAY_NONE), state(GAMEEVENT_NORMAL) { }
time_t start; // occurs after this time
time_t end; // occurs before this time
time_t nextstart; // after this time the follow-up events count this phase completed
@@ -98,7 +98,7 @@ class GameEventMgr
private:
GameEventMgr();
- ~GameEventMgr() {};
+ ~GameEventMgr() { };
public:
typedef std::set<uint16> ActiveEvents;
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index 67474c1dca0..cf1a813d287 100644
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -39,13 +39,9 @@
#include <cmath>
-ObjectAccessor::ObjectAccessor()
-{
-}
+ObjectAccessor::ObjectAccessor() { }
-ObjectAccessor::~ObjectAccessor()
-{
-}
+ObjectAccessor::~ObjectAccessor() { }
template<class T> T* ObjectAccessor::GetObjectInWorld(uint32 mapid, float x, float y, uint64 guid, T* /*fake*/)
{
@@ -56,14 +52,14 @@ template<class T> T* ObjectAccessor::GetObjectInWorld(uint32 mapid, float x, flo
CellCoord p = Trinity::ComputeCellCoord(x, y);
if (!p.IsCoordValid())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "ObjectAccessor::GetObjectInWorld: invalid coordinates supplied X:%f Y:%f grid cell [%u:%u]", x, y, p.x_coord, p.y_coord);
+ TC_LOG_ERROR("misc", "ObjectAccessor::GetObjectInWorld: invalid coordinates supplied X:%f Y:%f grid cell [%u:%u]", x, y, p.x_coord, p.y_coord);
return NULL;
}
CellCoord q = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if (!q.IsCoordValid())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "ObjectAccessor::GetObjecInWorld: object (GUID: %u TypeId: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), q.x_coord, q.y_coord);
+ TC_LOG_ERROR("misc", "ObjectAccessor::GetObjecInWorld: object (GUID: %u TypeId: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUIDLow(), obj->GetTypeId(), obj->GetPositionX(), obj->GetPositionY(), q.x_coord, q.y_coord);
return NULL;
}
@@ -334,7 +330,7 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia
return NULL;
}
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Deleting Corpse and spawned bones.");
+ TC_LOG_DEBUG("misc", "Deleting Corpse and spawned bones.");
// Map can be NULL
Map* map = corpse->FindMap();
diff --git a/src/server/game/Globals/ObjectAccessor.h b/src/server/game/Globals/ObjectAccessor.h
index a2707920c63..4e5c12104ed 100644
--- a/src/server/game/Globals/ObjectAccessor.h
+++ b/src/server/game/Globals/ObjectAccessor.h
@@ -75,7 +75,7 @@ class HashMapHolder
private:
//Non instanceable only static
- HashMapHolder() {}
+ HashMapHolder() { }
static LockType i_lock;
static MapType m_objectMap;
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 86e6963b1de..8ebcc17df16 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -321,7 +321,7 @@ void ObjectMgr::LoadCreatureLocales()
}
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu creature locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadGossipMenuItemsLocales()
@@ -357,7 +357,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
}
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu gossip_menu_option locale strings in %u ms", (unsigned long)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadPointOfInterestLocales()
@@ -383,7 +383,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.IconName);
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu points_of_interest locale strings in %u ms", (unsigned long)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadCreatureTemplates()
@@ -410,7 +410,7 @@ void ObjectMgr::LoadCreatureTemplates()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature template definitions. DB table `creature_template` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creature template definitions. DB table `creature_template` is empty.");
return;
}
@@ -512,7 +512,7 @@ void ObjectMgr::LoadCreatureTemplates()
for (CreatureTemplateContainer::const_iterator itr = _creatureTemplateStore.begin(); itr != _creatureTemplateStore.end(); ++itr)
CheckCreatureTemplate(&itr->second);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadCreatureTemplateAddons()
@@ -524,7 +524,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty.");
return;
}
@@ -537,7 +537,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
if (!sObjectMgr->GetCreatureTemplate(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature template (Entry: %u) does not exist but has a record in `creature_template_addon`", entry);
+ TC_LOG_ERROR("sql.sql", "Creature template (Entry: %u) does not exist but has a record in `creature_template_addon`", entry);
continue;
}
@@ -557,12 +557,12 @@ void ObjectMgr::LoadCreatureTemplateAddons()
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
if (!AdditionalSpellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong spell %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr)));
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong spell %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr)));
continue;
}
if (AdditionalSpellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr)));
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr)));
creatureAddon.auras[i++] = uint32(atol(*itr));
}
@@ -571,14 +571,14 @@ void ObjectMgr::LoadCreatureTemplateAddons()
{
if (!sCreatureDisplayInfoStore.LookupEntry(creatureAddon.mount))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid displayInfoId (%u) for mount defined in `creature_template_addon`", entry, creatureAddon.mount);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid displayInfoId (%u) for mount defined in `creature_template_addon`", entry, creatureAddon.mount);
creatureAddon.mount = 0;
}
}
if (!sEmotesStore.LookupEntry(creatureAddon.emote))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid emote (%u) defined in `creature_template_addon`.", entry, creatureAddon.emote);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid emote (%u) defined in `creature_template_addon`.", entry, creatureAddon.emote);
creatureAddon.emote = 0;
}
@@ -586,7 +586,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
@@ -604,7 +604,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureTemplate const* difficultyInfo = GetCreatureTemplate(cInfo->DifficultyEntry[diff]);
if (!difficultyInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u does not exist.",
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u does not exist.",
cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff], cInfo->DifficultyEntry[diff]);
continue;
}
@@ -615,20 +615,20 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
ok2 = false;
if (_difficultyEntries[diff2].find(cInfo->Entry) != _difficultyEntries[diff2].end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.",
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.",
cInfo->Entry, diff2 + 1, cInfo->DifficultyEntry[diff], diff + 1);
continue;
}
if (_difficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _difficultyEntries[diff2].end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) already listed as `difficulty_entry_%u` for another entry.", cInfo->DifficultyEntry[diff], diff2 + 1);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) already listed as `difficulty_entry_%u` for another entry.", cInfo->DifficultyEntry[diff], diff2 + 1);
continue;
}
if (_hasDifficultyEntries[diff2].find(cInfo->DifficultyEntry[diff]) != _hasDifficultyEntries[diff2].end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u has itself a value in `difficulty_entry_%u`.",
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has `difficulty_entry_%u`=%u but creature entry %u has itself a value in `difficulty_entry_%u`.",
cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff], cInfo->DifficultyEntry[diff], diff2 + 1);
continue;
}
@@ -639,51 +639,51 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
if (cInfo->unit_class != difficultyInfo->unit_class)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u, class %u) has different `unit_class` in difficulty %u mode (Entry: %u, class %u).",
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u, class %u) has different `unit_class` in difficulty %u mode (Entry: %u, class %u).",
cInfo->Entry, cInfo->unit_class, diff + 1, cInfo->DifficultyEntry[diff], difficultyInfo->unit_class);
continue;
}
if (cInfo->npcflag != difficultyInfo->npcflag)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has different `npcflag` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has different `npcflag` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
continue;
}
if (cInfo->trainer_class != difficultyInfo->trainer_class)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_class` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has different `trainer_class` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
continue;
}
if (cInfo->trainer_race != difficultyInfo->trainer_race)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_race` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has different `trainer_race` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
continue;
}
if (cInfo->trainer_type != difficultyInfo->trainer_type)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_type` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has different `trainer_type` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
continue;
}
if (cInfo->trainer_spell != difficultyInfo->trainer_spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has different `trainer_spell` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has different `trainer_spell` in difficulty %u mode (Entry: %u).", cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
continue;
}
if (!difficultyInfo->AIName.empty())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) lists difficulty %u mode entry %u with `AIName` filled in. `AIName` of difficulty 0 mode creature is always used instead.",
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists difficulty %u mode entry %u with `AIName` filled in. `AIName` of difficulty 0 mode creature is always used instead.",
cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
continue;
}
if (difficultyInfo->ScriptID)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) lists difficulty %u mode entry %u with `ScriptName` filled in. `ScriptName` of difficulty 0 mode creature is always used instead.",
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists difficulty %u mode entry %u with `ScriptName` filled in. `ScriptName` of difficulty 0 mode creature is always used instead.",
cInfo->Entry, diff + 1, cInfo->DifficultyEntry[diff]);
continue;
}
@@ -695,11 +695,11 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
FactionTemplateEntry const* factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction_A);
if (!factionTemplate)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing faction_A template (%u).", cInfo->Entry, cInfo->faction_A);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing faction_A template (%u).", cInfo->Entry, cInfo->faction_A);
factionTemplate = sFactionTemplateStore.LookupEntry(cInfo->faction_H);
if (!factionTemplate)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing faction_H template (%u).", cInfo->Entry, cInfo->faction_H);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing faction_H template (%u).", cInfo->Entry, cInfo->faction_H);
// used later for scale
CreatureDisplayInfoEntry const* displayScaleEntry = NULL;
@@ -709,7 +709,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid1);
if (!displayEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid1 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid1);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists non-existing Modelid1 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid1);
const_cast<CreatureTemplate*>(cInfo)->Modelid1 = 0;
}
else if (!displayScaleEntry)
@@ -717,7 +717,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid1);
if (!modelInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "No model data exist for `Modelid1` = %u listed by creature (Entry: %u).", cInfo->Modelid1, cInfo->Entry);
+ TC_LOG_ERROR("sql.sql", "No model data exist for `Modelid1` = %u listed by creature (Entry: %u).", cInfo->Modelid1, cInfo->Entry);
}
if (cInfo->Modelid2)
@@ -725,7 +725,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid2);
if (!displayEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid2 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid2);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists non-existing Modelid2 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid2);
const_cast<CreatureTemplate*>(cInfo)->Modelid2 = 0;
}
else if (!displayScaleEntry)
@@ -733,7 +733,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid2);
if (!modelInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "No model data exist for `Modelid2` = %u listed by creature (Entry: %u).", cInfo->Modelid2, cInfo->Entry);
+ TC_LOG_ERROR("sql.sql", "No model data exist for `Modelid2` = %u listed by creature (Entry: %u).", cInfo->Modelid2, cInfo->Entry);
}
if (cInfo->Modelid3)
@@ -741,7 +741,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid3);
if (!displayEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid3 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid3);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists non-existing Modelid3 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid3);
const_cast<CreatureTemplate*>(cInfo)->Modelid3 = 0;
}
else if (!displayScaleEntry)
@@ -749,7 +749,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid3);
if (!modelInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "No model data exist for `Modelid3` = %u listed by creature (Entry: %u).", cInfo->Modelid3, cInfo->Entry);
+ TC_LOG_ERROR("sql.sql", "No model data exist for `Modelid3` = %u listed by creature (Entry: %u).", cInfo->Modelid3, cInfo->Entry);
}
if (cInfo->Modelid4)
@@ -757,7 +757,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->Modelid4);
if (!displayEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing Modelid4 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid4);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists non-existing Modelid4 id (%u), this can crash the client.", cInfo->Entry, cInfo->Modelid4);
const_cast<CreatureTemplate*>(cInfo)->Modelid4 = 0;
}
else if (!displayScaleEntry)
@@ -765,11 +765,11 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
CreatureModelInfo const* modelInfo = GetCreatureModelInfo(cInfo->Modelid4);
if (!modelInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "No model data exist for `Modelid4` = %u listed by creature (Entry: %u).", cInfo->Modelid4, cInfo->Entry);
+ TC_LOG_ERROR("sql.sql", "No model data exist for `Modelid4` = %u listed by creature (Entry: %u).", cInfo->Modelid4, cInfo->Entry);
}
if (!displayScaleEntry)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) does not have any existing display id in Modelid1/Modelid2/Modelid3/Modelid4.", cInfo->Entry);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) does not have any existing display id in Modelid1/Modelid2/Modelid3/Modelid4.", cInfo->Entry);
for (int k = 0; k < MAX_KILL_CREDIT; ++k)
{
@@ -777,7 +777,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
{
if (!GetCreatureTemplate(cInfo->KillCredit[k]))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) lists non-existing creature entry %u in `KillCredit%d`.", cInfo->Entry, cInfo->KillCredit[k], k + 1);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) lists non-existing creature entry %u in `KillCredit%d`.", cInfo->Entry, cInfo->KillCredit[k], k + 1);
const_cast<CreatureTemplate*>(cInfo)->KillCredit[k] = 0;
}
}
@@ -785,13 +785,13 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
if (!cInfo->unit_class || ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid unit_class (%u) in creature_template. Set to 1 (UNIT_CLASS_WARRIOR).", cInfo->Entry, cInfo->unit_class);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid unit_class (%u) in creature_template. Set to 1 (UNIT_CLASS_WARRIOR).", cInfo->Entry, cInfo->unit_class);
const_cast<CreatureTemplate*>(cInfo)->unit_class = UNIT_CLASS_WARRIOR;
}
if (cInfo->dmgschool >= MAX_SPELL_SCHOOL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid spell school value (%u) in `dmgschool`.", cInfo->Entry, cInfo->dmgschool);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid spell school value (%u) in `dmgschool`.", cInfo->Entry, cInfo->dmgschool);
const_cast<CreatureTemplate*>(cInfo)->dmgschool = SPELL_SCHOOL_NORMAL;
}
@@ -802,42 +802,42 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
const_cast<CreatureTemplate*>(cInfo)->rangeattacktime = BASE_ATTACK_TIME;
if ((cInfo->npcflag & UNIT_NPC_FLAG_TRAINER) && cInfo->trainer_type >= MAX_TRAINER_TYPE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong trainer type %u.", cInfo->Entry, cInfo->trainer_type);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong trainer type %u.", cInfo->Entry, cInfo->trainer_type);
if (cInfo->speed_walk == 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in speed_walk, set to 1.", cInfo->Entry, cInfo->speed_walk);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong value (%f) in speed_walk, set to 1.", cInfo->Entry, cInfo->speed_walk);
const_cast<CreatureTemplate*>(cInfo)->speed_walk = 1.0f;
}
if (cInfo->speed_run == 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in speed_run, set to 1.14286.", cInfo->Entry, cInfo->speed_run);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong value (%f) in speed_run, set to 1.14286.", cInfo->Entry, cInfo->speed_run);
const_cast<CreatureTemplate*>(cInfo)->speed_run = 1.14286f;
}
if (cInfo->type && !sCreatureTypeStore.LookupEntry(cInfo->type))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid creature type (%u) in `type`.", cInfo->Entry, cInfo->type);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid creature type (%u) in `type`.", cInfo->Entry, cInfo->type);
const_cast<CreatureTemplate*>(cInfo)->type = CREATURE_TYPE_HUMANOID;
}
// must exist or used hidden but used in data horse case
if (cInfo->family && !sCreatureFamilyStore.LookupEntry(cInfo->family) && cInfo->family != CREATURE_FAMILY_HORSE_CUSTOM)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid creature family (%u) in `family`.", cInfo->Entry, cInfo->family);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid creature family (%u) in `family`.", cInfo->Entry, cInfo->family);
const_cast<CreatureTemplate*>(cInfo)->family = 0;
}
if (cInfo->InhabitType <= 0 || cInfo->InhabitType > INHABIT_ANYWHERE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%u) in `InhabitType`, creature will not correctly walk/swim/fly.", cInfo->Entry, cInfo->InhabitType);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong value (%u) in `InhabitType`, creature will not correctly walk/swim/fly.", cInfo->Entry, cInfo->InhabitType);
const_cast<CreatureTemplate*>(cInfo)->InhabitType = INHABIT_ANYWHERE;
}
if (cInfo->HoverHeight < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in `HoverHeight`", cInfo->Entry, cInfo->HoverHeight);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong value (%f) in `HoverHeight`", cInfo->Entry, cInfo->HoverHeight);
const_cast<CreatureTemplate*>(cInfo)->HoverHeight = 1.0f;
}
@@ -846,7 +846,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
VehicleEntry const* vehId = sVehicleStore.LookupEntry(cInfo->VehicleId);
if (!vehId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has a non-existing VehicleId (%u). This *WILL* cause the client to freeze!", cInfo->Entry, cInfo->VehicleId);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has a non-existing VehicleId (%u). This *WILL* cause the client to freeze!", cInfo->Entry, cInfo->VehicleId);
const_cast<CreatureTemplate*>(cInfo)->VehicleId = 0;
}
}
@@ -855,21 +855,21 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
{
CreatureSpellDataEntry const* spellDataId = sCreatureSpellDataStore.LookupEntry(cInfo->PetSpellDataId);
if (!spellDataId)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing PetSpellDataId (%u).", cInfo->Entry, cInfo->PetSpellDataId);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing PetSpellDataId (%u).", cInfo->Entry, cInfo->PetSpellDataId);
}
for (uint8 j = 0; j < CREATURE_MAX_SPELLS; ++j)
{
if (cInfo->spells[j] && !sSpellMgr->GetSpellInfo(cInfo->spells[j]))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has non-existing Spell%d (%u), set to 0.", cInfo->Entry, j+1, cInfo->spells[j]);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-existing Spell%d (%u), set to 0.", cInfo->Entry, j+1, cInfo->spells[j]);
const_cast<CreatureTemplate*>(cInfo)->spells[j] = 0;
}
}
if (cInfo->MovementType >= MAX_DB_MOTION_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong movement generator type (%u), ignored and set to IDLE.", cInfo->Entry, cInfo->MovementType);
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong movement generator type (%u), ignored and set to IDLE.", cInfo->Entry, cInfo->MovementType);
const_cast<CreatureTemplate*>(cInfo)->MovementType = IDLE_MOTION_TYPE;
}
@@ -884,13 +884,13 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
if (cInfo->expansion > (MAX_CREATURE_BASE_HP - 1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_template` lists creature (Entry: %u) with expansion %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion);
+ TC_LOG_ERROR("sql.sql", "Table `creature_template` lists creature (Entry: %u) with expansion %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion);
const_cast<CreatureTemplate*>(cInfo)->expansion = 0;
}
if (uint32 badFlags = (cInfo->flags_extra & ~CREATURE_FLAG_EXTRA_DB_ALLOWED))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_template` lists creature (Entry: %u) with disallowed `flags_extra` %u, removing incorrect flag.", cInfo->Entry, badFlags);
+ TC_LOG_ERROR("sql.sql", "Table `creature_template` lists creature (Entry: %u) with disallowed `flags_extra` %u, removing incorrect flag.", cInfo->Entry, badFlags);
const_cast<CreatureTemplate*>(cInfo)->flags_extra &= CREATURE_FLAG_EXTRA_DB_ALLOWED;
}
@@ -906,7 +906,7 @@ void ObjectMgr::LoadCreatureAddons()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty.");
return;
}
@@ -920,7 +920,7 @@ void ObjectMgr::LoadCreatureAddons()
CreatureData const* creData = GetCreatureData(guid);
if (!creData)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) does not exist but has a record in `creature_addon`", guid);
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) does not exist but has a record in `creature_addon`", guid);
continue;
}
@@ -930,7 +930,7 @@ void ObjectMgr::LoadCreatureAddons()
if (creData->movementType == WAYPOINT_MOTION_TYPE && !creatureAddon.path_id)
{
const_cast<CreatureData*>(creData)->movementType = IDLE_MOTION_TYPE;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID %u) has movement type set to WAYPOINT_MOTION_TYPE but no path assigned", guid);
+ TC_LOG_ERROR("sql.sql", "Creature (GUID %u) has movement type set to WAYPOINT_MOTION_TYPE but no path assigned", guid);
}
creatureAddon.mount = fields[2].GetUInt32();
@@ -946,12 +946,12 @@ void ObjectMgr::LoadCreatureAddons()
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
if (!AdditionalSpellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr)));
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr)));
continue;
}
if (AdditionalSpellInfo->HasAura(SPELL_AURA_CONTROL_VEHICLE))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr)));
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has SPELL_AURA_CONTROL_VEHICLE aura %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr)));
creatureAddon.auras[i++] = uint32(atol(*itr));
}
@@ -960,14 +960,14 @@ void ObjectMgr::LoadCreatureAddons()
{
if (!sCreatureDisplayInfoStore.LookupEntry(creatureAddon.mount))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) has invalid displayInfoId (%u) for mount defined in `creature_addon`", guid, creatureAddon.mount);
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has invalid displayInfoId (%u) for mount defined in `creature_addon`", guid, creatureAddon.mount);
creatureAddon.mount = 0;
}
}
if (!sEmotesStore.LookupEntry(creatureAddon.emote))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (GUID: %u) has invalid emote (%u) defined in `creature_addon`.", guid, creatureAddon.emote);
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: %u) has invalid emote (%u) defined in `creature_addon`.", guid, creatureAddon.emote);
creatureAddon.emote = 0;
}
@@ -975,7 +975,7 @@ void ObjectMgr::LoadCreatureAddons()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
CreatureAddon const* ObjectMgr::GetCreatureAddon(uint32 lowguid)
@@ -1031,7 +1031,7 @@ void ObjectMgr::LoadEquipmentTemplates()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!");
return;
}
@@ -1044,7 +1044,7 @@ void ObjectMgr::LoadEquipmentTemplates()
if (!sObjectMgr->GetCreatureTemplate(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature template (Entry: %u) does not exist but has a record in `creature_equip_template`", entry);
+ TC_LOG_ERROR("sql.sql", "Creature template (Entry: %u) does not exist but has a record in `creature_equip_template`", entry);
continue;
}
@@ -1065,7 +1065,7 @@ void ObjectMgr::LoadEquipmentTemplates()
if (!dbcItem)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Unknown item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u and id=%u, forced to 0.",
+ TC_LOG_ERROR("sql.sql", "Unknown item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u and id=%u, forced to 0.",
equipmentInfo.ItemEntry[i], i+1, entry, id);
equipmentInfo.ItemEntry[i] = 0;
continue;
@@ -1081,7 +1081,7 @@ void ObjectMgr::LoadEquipmentTemplates()
dbcItem->InventoryType != INVTYPE_THROWN &&
dbcItem->InventoryType != INVTYPE_RANGEDRIGHT)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u and id = %u is not equipable in a hand, forced to 0.",
+ TC_LOG_ERROR("sql.sql", "Item (entry=%u) in creature_equip_template.itemEntry%u for entry = %u and id = %u is not equipable in a hand, forced to 0.",
equipmentInfo.ItemEntry[i], i+1, entry, id);
equipmentInfo.ItemEntry[i] = 0;
}
@@ -1091,7 +1091,7 @@ void ObjectMgr::LoadEquipmentTemplates()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId)
@@ -1142,7 +1142,7 @@ CreatureModelInfo const* ObjectMgr::GetCreatureModelRandomGender(uint32* display
{
CreatureModelInfo const* minfo_tmp = GetCreatureModelInfo(modelInfo->modelid_other_gender);
if (!minfo_tmp)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Model (Entry: %u) has modelid_other_gender %u not found in table `creature_model_info`. ", *displayID, modelInfo->modelid_other_gender);
+ TC_LOG_ERROR("sql.sql", "Model (Entry: %u) has modelid_other_gender %u not found in table `creature_model_info`. ", *displayID, modelInfo->modelid_other_gender);
else
{
// Model ID changed
@@ -1162,7 +1162,7 @@ void ObjectMgr::LoadCreatureModelInfo()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty.");
return;
}
@@ -1185,17 +1185,17 @@ void ObjectMgr::LoadCreatureModelInfo()
// Checks
if (!sCreatureDisplayInfoStore.LookupEntry(modelId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_model_info` has model for not existed display id (%u).", modelId);
+ TC_LOG_ERROR("sql.sql", "Table `creature_model_info` has model for not existed display id (%u).", modelId);
if (modelInfo.gender > GENDER_NONE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_model_info` has wrong gender (%u) for display id (%u).", uint32(modelInfo.gender), modelId);
+ TC_LOG_ERROR("sql.sql", "Table `creature_model_info` has wrong gender (%u) for display id (%u).", uint32(modelInfo.gender), modelId);
modelInfo.gender = GENDER_MALE;
}
if (modelInfo.modelid_other_gender && !sCreatureDisplayInfoStore.LookupEntry(modelInfo.modelid_other_gender))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_model_info` has not existed alt.gender model (%u) for existed display id (%u).", modelInfo.modelid_other_gender, modelId);
+ TC_LOG_ERROR("sql.sql", "Table `creature_model_info` has not existed alt.gender model (%u) for existed display id (%u).", modelInfo.modelid_other_gender, modelId);
modelInfo.modelid_other_gender = 0;
}
@@ -1206,7 +1206,7 @@ void ObjectMgr::LoadCreatureModelInfo()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadLinkedRespawn()
@@ -1219,7 +1219,7 @@ void ObjectMgr::LoadLinkedRespawn()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 linked respawns. DB table `linked_respawn` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 linked respawns. DB table `linked_respawn` is empty.");
return;
}
@@ -1240,7 +1240,7 @@ void ObjectMgr::LoadLinkedRespawn()
const CreatureData* slave = GetCreatureData(guidLow);
if (!slave)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", guidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature (guid) '%u' not found in creature table", guidLow);
error = true;
break;
}
@@ -1248,7 +1248,7 @@ void ObjectMgr::LoadLinkedRespawn()
const CreatureData* master = GetCreatureData(linkedGuidLow);
if (!master)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature (linkedGuid) '%u' not found in creature table", linkedGuidLow);
error = true;
break;
}
@@ -1256,14 +1256,14 @@ void ObjectMgr::LoadLinkedRespawn()
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature '%u' linking to Creature '%u' on an unpermitted map.", guidLow, linkedGuidLow);
error = true;
break;
}
if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature '%u' linking to Creature '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1277,7 +1277,7 @@ void ObjectMgr::LoadLinkedRespawn()
const CreatureData* slave = GetCreatureData(guidLow);
if (!slave)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", guidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature (guid) '%u' not found in creature table", guidLow);
error = true;
break;
}
@@ -1285,7 +1285,7 @@ void ObjectMgr::LoadLinkedRespawn()
const GameObjectData* master = GetGOData(linkedGuidLow);
if (!master)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject (linkedGuid) '%u' not found in gameobject table", linkedGuidLow);
error = true;
break;
}
@@ -1293,14 +1293,14 @@ void ObjectMgr::LoadLinkedRespawn()
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature '%u' linking to Gameobject '%u' on an unpermitted map.", guidLow, linkedGuidLow);
error = true;
break;
}
if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature '%u' linking to Gameobject '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1314,7 +1314,7 @@ void ObjectMgr::LoadLinkedRespawn()
const GameObjectData* slave = GetGOData(guidLow);
if (!slave)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", guidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject (guid) '%u' not found in gameobject table", guidLow);
error = true;
break;
}
@@ -1322,7 +1322,7 @@ void ObjectMgr::LoadLinkedRespawn()
const GameObjectData* master = GetGOData(linkedGuidLow);
if (!master)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject (linkedGuid) '%u' not found in gameobject table", linkedGuidLow);
error = true;
break;
}
@@ -1330,14 +1330,14 @@ void ObjectMgr::LoadLinkedRespawn()
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject '%u' linking to Gameobject '%u' on an unpermitted map.", guidLow, linkedGuidLow);
error = true;
break;
}
if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject '%u' linking to Gameobject '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1351,7 +1351,7 @@ void ObjectMgr::LoadLinkedRespawn()
const GameObjectData* slave = GetGOData(guidLow);
if (!slave)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get gameobject data for GUIDLow %u", guidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject (guid) '%u' not found in gameobject table", guidLow);
error = true;
break;
}
@@ -1359,7 +1359,7 @@ void ObjectMgr::LoadLinkedRespawn()
const CreatureData* master = GetCreatureData(linkedGuidLow);
if (!master)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Couldn't get creature data for GUIDLow %u", linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature (linkedGuid) '%u' not found in creature table", linkedGuidLow);
error = true;
break;
}
@@ -1367,14 +1367,14 @@ void ObjectMgr::LoadLinkedRespawn()
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject '%u' linking to Creature '%u' on an unpermitted map.", guidLow, linkedGuidLow);
error = true;
break;
}
if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Gameobject '%u' linking to Creature '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1390,7 +1390,7 @@ void ObjectMgr::LoadLinkedRespawn()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
@@ -1415,13 +1415,13 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
const MapEntry* const map = sMapStore.LookupEntry(master->mapid);
if (!map || !map->Instanceable() || (master->mapid != slave->mapid))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "Creature '%u' linking to '%u' on an unpermitted map.", guidLow, linkedGuidLow);
return false;
}
if (!(master->spawnMask & slave->spawnMask)) // they must have a possibility to meet (normal/heroic difficulty)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
+ TC_LOG_ERROR("sql.sql", "LinkedRespawn: Creature '%u' linking to '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
return false;
}
@@ -1446,7 +1446,7 @@ void ObjectMgr::LoadTempSummons()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 temp summons. DB table `creature_summon_groups` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 temp summons. DB table `creature_summon_groups` is empty.");
return;
}
@@ -1464,26 +1464,26 @@ void ObjectMgr::LoadTempSummons()
case SUMMONER_TYPE_CREATURE:
if (!GetCreatureTemplate(summonerId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_summon_groups` has summoner with non existing entry %u for creature summoner type, skipped.", summonerId);
+ TC_LOG_ERROR("sql.sql", "Table `creature_summon_groups` has summoner with non existing entry %u for creature summoner type, skipped.", summonerId);
continue;
}
break;
case SUMMONER_TYPE_GAMEOBJECT:
if (!GetGameObjectTemplate(summonerId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_summon_groups` has summoner with non existing entry %u for gameobject summoner type, skipped.", summonerId);
+ TC_LOG_ERROR("sql.sql", "Table `creature_summon_groups` has summoner with non existing entry %u for gameobject summoner type, skipped.", summonerId);
continue;
}
break;
case SUMMONER_TYPE_MAP:
if (!sMapStore.LookupEntry(summonerId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_summon_groups` has summoner with non existing entry %u for map summoner type, skipped.", summonerId);
+ TC_LOG_ERROR("sql.sql", "Table `creature_summon_groups` has summoner with non existing entry %u for map summoner type, skipped.", summonerId);
continue;
}
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_summon_groups` has unhandled summoner type %u for summoner %u, skipped.", summonerType, summonerId);
+ TC_LOG_ERROR("sql.sql", "Table `creature_summon_groups` has unhandled summoner type %u for summoner %u, skipped.", summonerType, summonerId);
continue;
}
@@ -1492,7 +1492,7 @@ void ObjectMgr::LoadTempSummons()
if (!GetCreatureTemplate(data.entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_summon_groups` has creature in group [Summoner ID: %u, Summoner Type: %u, Group ID: %u] with non existing creature entry %u, skipped.", summonerId, summonerType, group, data.entry);
+ TC_LOG_ERROR("sql.sql", "Table `creature_summon_groups` has creature in group [Summoner ID: %u, Summoner Type: %u, Group ID: %u] with non existing creature entry %u, skipped.", summonerId, summonerType, group, data.entry);
continue;
}
@@ -1507,7 +1507,7 @@ void ObjectMgr::LoadTempSummons()
if (data.type > TEMPSUMMON_MANUAL_DESPAWN)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_summon_groups` has unhandled temp summon type %u in group [Summoner ID: %u, Summoner Type: %u, Group ID: %u] for creature entry %u, skipped.", data.type, summonerId, summonerType, group, data.entry);
+ TC_LOG_ERROR("sql.sql", "Table `creature_summon_groups` has unhandled temp summon type %u in group [Summoner ID: %u, Summoner Type: %u, Group ID: %u] for creature entry %u, skipped.", data.type, summonerId, summonerType, group, data.entry);
continue;
}
@@ -1520,7 +1520,7 @@ void ObjectMgr::LoadTempSummons()
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u temp summons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u temp summons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadCreatures()
@@ -1537,7 +1537,7 @@ void ObjectMgr::LoadCreatures()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures. DB table `creature` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 creatures. DB table `creature` is empty.");
return;
}
@@ -1561,7 +1561,7 @@ void ObjectMgr::LoadCreatures()
CreatureTemplate const* cInfo = GetCreatureTemplate(entry);
if (!cInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` has creature (GUID: %u) with non existing creature entry %u, skipped.", guid, entry);
+ TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u) with non existing creature entry %u, skipped.", guid, entry);
continue;
}
@@ -1591,19 +1591,19 @@ void ObjectMgr::LoadCreatures()
MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid);
if (!mapEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u) that spawned at not existed map (Id: %u), skipped.", guid, data.mapid);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u) that spawned at not existed map (Id: %u), skipped.", guid, data.mapid);
continue;
}
if (data.spawnMask & ~spawnMasks[data.mapid])
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u) that have wrong spawn mask %u including not supported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.mapid);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u) that have wrong spawn mask %u including not supported difficulty modes for map (Id: %u).", guid, data.spawnMask, data.mapid);
bool ok = true;
for (uint32 diff = 0; diff < MAX_DIFFICULTY - 1 && ok; ++diff)
{
if (_difficultyEntries[diff].find(data.id) != _difficultyEntries[diff].end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u) that listed as difficulty %u template (entry: %u) in `creature_template`, skipped.",
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u) that listed as difficulty %u template (entry: %u) in `creature_template`, skipped.",
guid, diff + 1, data.id);
ok = false;
}
@@ -1616,7 +1616,7 @@ void ObjectMgr::LoadCreatures()
{
if (!GetEquipmentInfo(data.id, data.equipmentId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (Entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", data.id, data.equipmentId);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (Entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", data.id, data.equipmentId);
data.equipmentId = 0;
}
}
@@ -1624,19 +1624,19 @@ void ObjectMgr::LoadCreatures()
if (cInfo->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
{
if (!mapEntry || !mapEntry->IsDungeon())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `creature_template`.`flags_extra` including CREATURE_FLAG_EXTRA_INSTANCE_BIND but creature are not in instance.", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) with `creature_template`.`flags_extra` including CREATURE_FLAG_EXTRA_INSTANCE_BIND but creature are not in instance.", guid, data.id);
}
if (data.spawndist < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `spawndist`< 0, set to 0.", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) with `spawndist`< 0, set to 0.", guid, data.id);
data.spawndist = 0.0f;
}
else if (data.movementType == RANDOM_MOTION_TYPE)
{
if (data.spawndist == 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=1 (random movement) but with `spawndist`=0, replace by idle movement type (0).", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=1 (random movement) but with `spawndist`=0, replace by idle movement type (0).", guid, data.id);
data.movementType = IDLE_MOTION_TYPE;
}
}
@@ -1644,14 +1644,14 @@ void ObjectMgr::LoadCreatures()
{
if (data.spawndist != 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=0 (idle) have `spawndist`<>0, set to 0.", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) with `MovementType`=0 (idle) have `spawndist`<>0, set to 0.", guid, data.id);
data.spawndist = 0.0f;
}
}
if (data.phaseMask == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature` have creature (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `creature` have creature (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id);
data.phaseMask = 1;
}
@@ -1663,7 +1663,7 @@ void ObjectMgr::LoadCreatures()
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
@@ -1733,13 +1733,13 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
GameObject* go = new GameObject;
if (!go->LoadGameObjectFromDB(guid, map))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "AddGOData: cannot add gameobject entry %u to map", entry);
+ TC_LOG_ERROR("misc", "AddGOData: cannot add gameobject entry %u to map", entry);
delete go;
return 0;
}
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "AddGOData: dbguid %u entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, x, y, z, o);
+ TC_LOG_DEBUG("maps", "AddGOData: dbguid %u entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, x, y, z, o);
return guid;
}
@@ -1768,7 +1768,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, const Position& pos)
Creature* creature = new Creature;
if (!creature->LoadCreatureFromDB(guid, map))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "MoveCreData: Cannot add creature guid %u to map", guid);
+ TC_LOG_ERROR("misc", "MoveCreData: Cannot add creature guid %u to map", guid);
delete creature;
return false;
}
@@ -1820,7 +1820,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
Creature* creature = new Creature;
if (!creature->LoadCreatureFromDB(guid, map))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "AddCreature: Cannot add creature entry %u to map", entry);
+ TC_LOG_ERROR("misc", "AddCreature: Cannot add creature entry %u to map", entry);
delete creature;
return 0;
}
@@ -1845,7 +1845,7 @@ void ObjectMgr::LoadGameobjects()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
return;
}
@@ -1868,7 +1868,7 @@ void ObjectMgr::LoadGameobjects()
GameObjectTemplate const* gInfo = GetGameObjectTemplate(entry);
if (!gInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u) with non existing gameobject entry %u, skipped.", guid, entry);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u) with non existing gameobject entry %u, skipped.", guid, entry);
continue;
}
@@ -1880,14 +1880,14 @@ void ObjectMgr::LoadGameobjects()
case GAMEOBJECT_TYPE_SPELL_FOCUS:
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry %u GoType: %u) doesn't have a displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
+ TC_LOG_ERROR("sql.sql", "Gameobject (GUID: %u Entry %u GoType: %u) doesn't have a displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
break;
}
}
if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (GUID: %u Entry %u GoType: %u) has an invalid displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
+ TC_LOG_ERROR("sql.sql", "Gameobject (GUID: %u Entry %u GoType: %u) has an invalid displayId (%u), not loaded.", guid, entry, gInfo->type, gInfo->displayId);
continue;
}
@@ -1908,13 +1908,13 @@ void ObjectMgr::LoadGameobjects()
MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid);
if (!mapEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) spawned on a non-existed map (Id: %u), skip", guid, data.id, data.mapid);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) spawned on a non-existed map (Id: %u), skip", guid, data.id, data.mapid);
continue;
}
if (data.spawntimesecs == 0 && gInfo->IsDespawnAtAction())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with `spawntimesecs` (0) value, but the gameobejct is marked as despawnable at action.", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with `spawntimesecs` (0) value, but the gameobejct is marked as despawnable at action.", guid, data.id);
}
data.animprogress = fields[12].GetUInt8();
@@ -1923,7 +1923,7 @@ void ObjectMgr::LoadGameobjects()
uint32 go_state = fields[13].GetUInt8();
if (go_state >= MAX_GO_STATE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid `state` (%u) value, skip", guid, data.id, go_state);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid `state` (%u) value, skip", guid, data.id, go_state);
continue;
}
data.go_state = GOState(go_state);
@@ -1931,7 +1931,7 @@ void ObjectMgr::LoadGameobjects()
data.spawnMask = fields[14].GetUInt8();
if (data.spawnMask & ~spawnMasks[data.mapid])
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including not supported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.mapid);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including not supported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.mapid);
data.phaseMask = fields[15].GetUInt32();
int16 gameEvent = fields[16].GetInt8();
@@ -1939,25 +1939,25 @@ void ObjectMgr::LoadGameobjects()
if (data.rotation2 < -1.0f || data.rotation2 > 1.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip", guid, data.id, data.rotation2);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip", guid, data.id, data.rotation2);
continue;
}
if (data.rotation3 < -1.0f || data.rotation3 > 1.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation3 (%f) value, skip", guid, data.id, data.rotation3);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation3 (%f) value, skip", guid, data.id, data.rotation3);
continue;
}
if (!MapManager::IsValidMapCoord(data.mapid, data.posX, data.posY, data.posZ, data.orientation))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid coordinates, skip", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid coordinates, skip", guid, data.id);
continue;
}
if (data.phaseMask == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with `phaseMask`=0 (not visible for anyone), set to 1.", guid, data.id);
data.phaseMask = 1;
}
@@ -1966,7 +1966,7 @@ void ObjectMgr::LoadGameobjects()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
@@ -2134,7 +2134,7 @@ void ObjectMgr::LoadItemLocales()
}
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu Item locale strings in %u ms", (unsigned long)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadItemTemplates()
@@ -2176,7 +2176,7 @@ void ObjectMgr::LoadItemTemplates()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 item templates. DB table `item_template` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 item templates. DB table `item_template` is empty.");
return;
}
@@ -2306,61 +2306,61 @@ void ObjectMgr::LoadItemTemplates()
{
if (itemTemplate.Class != dbcitem->Class)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct class %u, must be %u .", entry, itemTemplate.Class, dbcitem->Class);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have a correct class %u, must be %u .", entry, itemTemplate.Class, dbcitem->Class);
if (enforceDBCAttributes)
itemTemplate.Class = dbcitem->Class;
}
if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclass)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct SoundOverrideSubclass (%i), must be %i .", entry, itemTemplate.SoundOverrideSubclass, dbcitem->SoundOverrideSubclass);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have a correct SoundOverrideSubclass (%i), must be %i .", entry, itemTemplate.SoundOverrideSubclass, dbcitem->SoundOverrideSubclass);
if (enforceDBCAttributes)
itemTemplate.SoundOverrideSubclass = dbcitem->SoundOverrideSubclass;
}
if (itemTemplate.Material != dbcitem->Material)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct material (%i), must be %i .", entry, itemTemplate.Material, dbcitem->Material);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have a correct material (%i), must be %i .", entry, itemTemplate.Material, dbcitem->Material);
if (enforceDBCAttributes)
itemTemplate.Material = dbcitem->Material;
}
if (itemTemplate.InventoryType != dbcitem->InventoryType)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct inventory type (%u), must be %u .", entry, itemTemplate.InventoryType, dbcitem->InventoryType);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have a correct inventory type (%u), must be %u .", entry, itemTemplate.InventoryType, dbcitem->InventoryType);
if (enforceDBCAttributes)
itemTemplate.InventoryType = dbcitem->InventoryType;
}
if (itemTemplate.DisplayInfoID != dbcitem->DisplayId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct display id (%u), must be %u .", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayId);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have a correct display id (%u), must be %u .", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayId);
if (enforceDBCAttributes)
itemTemplate.DisplayInfoID = dbcitem->DisplayId;
}
if (itemTemplate.Sheath != dbcitem->Sheath)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct sheathid (%u), must be %u .", entry, itemTemplate.Sheath, dbcitem->Sheath);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have a correct sheathid (%u), must be %u .", entry, itemTemplate.Sheath, dbcitem->Sheath);
if (enforceDBCAttributes)
itemTemplate.Sheath = dbcitem->Sheath;
}
}
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not exist in item.dbc! (not correct id?).", entry);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not exist in item.dbc! (not correct id?).", entry);
if (itemTemplate.Class >= MAX_ITEM_CLASS)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Class value (%u)", entry, itemTemplate.Class);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Class value (%u)", entry, itemTemplate.Class);
itemTemplate.Class = ITEM_CLASS_MISC;
}
if (itemTemplate.SubClass >= MaxItemSubclassValues[itemTemplate.Class])
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Subclass value (%u) for class %u", entry, itemTemplate.SubClass, itemTemplate.Class);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Subclass value (%u) for class %u", entry, itemTemplate.SubClass, itemTemplate.Class);
itemTemplate.SubClass = 0;// exist for all item classes
}
if (itemTemplate.Quality >= MAX_ITEM_QUALITY)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Quality value (%u)", entry, itemTemplate.Quality);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Quality value (%u)", entry, itemTemplate.Quality);
itemTemplate.Quality = ITEM_QUALITY_NORMAL;
}
@@ -2368,36 +2368,36 @@ void ObjectMgr::LoadItemTemplates()
{
if (FactionEntry const* faction = sFactionStore.LookupEntry(HORDE))
if ((itemTemplate.AllowableRace & faction->BaseRepRaceMask[0]) == 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.",
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.",
entry, itemTemplate.AllowableRace, ITEM_FLAGS_EXTRA_HORDE_ONLY);
if (itemTemplate.Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has value (%u) in `Flags2` flags (ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) and ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, this is a wrong combination.",
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has value (%u) in `Flags2` flags (ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) and ITEM_FLAGS_EXTRA_HORDE_ONLY (%u) in Flags field, this is a wrong combination.",
entry, ITEM_FLAGS_EXTRA_ALLIANCE_ONLY, ITEM_FLAGS_EXTRA_HORDE_ONLY);
}
else if (itemTemplate.Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY)
{
if (FactionEntry const* faction = sFactionStore.LookupEntry(ALLIANCE))
if ((itemTemplate.AllowableRace & faction->BaseRepRaceMask[0]) == 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_ALLIANCE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.",
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has value (%u) in `AllowableRace` races, not compatible with ITEM_FLAGS_EXTRA_ALLIANCE_ONLY (%u) in Flags field, item cannot be equipped or used by these races.",
entry, itemTemplate.AllowableRace, ITEM_FLAGS_EXTRA_ALLIANCE_ONLY);
}
if (itemTemplate.BuyCount <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong BuyCount value (%u), set to default(1).", entry, itemTemplate.BuyCount);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong BuyCount value (%u), set to default(1).", entry, itemTemplate.BuyCount);
itemTemplate.BuyCount = 1;
}
if (itemTemplate.InventoryType >= MAX_INVTYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong InventoryType value (%u)", entry, itemTemplate.InventoryType);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong InventoryType value (%u)", entry, itemTemplate.InventoryType);
itemTemplate.InventoryType = INVTYPE_NON_EQUIP;
}
if (itemTemplate.RequiredSkill >= MAX_SKILL_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong RequiredSkill value (%u)", entry, itemTemplate.RequiredSkill);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong RequiredSkill value (%u)", entry, itemTemplate.RequiredSkill);
itemTemplate.RequiredSkill = 0;
}
@@ -2417,60 +2417,60 @@ void ObjectMgr::LoadItemTemplates()
if (req)
{
if (!(itemTemplate.AllowableClass & CLASSMASK_ALL_PLAYABLE))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have any playable classes (%u) in `AllowableClass` and can't be equipped or used.", entry, itemTemplate.AllowableClass);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have any playable classes (%u) in `AllowableClass` and can't be equipped or used.", entry, itemTemplate.AllowableClass);
if (!(itemTemplate.AllowableRace & RACEMASK_ALL_PLAYABLE))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have any playable races (%u) in `AllowableRace` and can't be equipped or used.", entry, itemTemplate.AllowableRace);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have any playable races (%u) in `AllowableRace` and can't be equipped or used.", entry, itemTemplate.AllowableRace);
}
}
if (itemTemplate.RequiredSpell && !sSpellMgr->GetSpellInfo(itemTemplate.RequiredSpell))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has a wrong (non-existing) spell in RequiredSpell (%u)", entry, itemTemplate.RequiredSpell);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has a wrong (non-existing) spell in RequiredSpell (%u)", entry, itemTemplate.RequiredSpell);
itemTemplate.RequiredSpell = 0;
}
if (itemTemplate.RequiredReputationRank >= MAX_REPUTATION_RANK)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong reputation rank in RequiredReputationRank (%u), item can't be used.", entry, itemTemplate.RequiredReputationRank);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong reputation rank in RequiredReputationRank (%u), item can't be used.", entry, itemTemplate.RequiredReputationRank);
if (itemTemplate.RequiredReputationFaction)
{
if (!sFactionStore.LookupEntry(itemTemplate.RequiredReputationFaction))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (not existing) faction in RequiredReputationFaction (%u)", entry, itemTemplate.RequiredReputationFaction);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong (not existing) faction in RequiredReputationFaction (%u)", entry, itemTemplate.RequiredReputationFaction);
itemTemplate.RequiredReputationFaction = 0;
}
if (itemTemplate.RequiredReputationRank == MIN_REPUTATION_RANK)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has min. reputation rank in RequiredReputationRank (0) but RequiredReputationFaction > 0, faction setting is useless.", entry);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has min. reputation rank in RequiredReputationRank (0) but RequiredReputationFaction > 0, faction setting is useless.", entry);
}
if (itemTemplate.MaxCount < -1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has too large negative in maxcount (%i), replace by value (-1) no storing limits.", entry, itemTemplate.MaxCount);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has too large negative in maxcount (%i), replace by value (-1) no storing limits.", entry, itemTemplate.MaxCount);
itemTemplate.MaxCount = -1;
}
if (itemTemplate.Stackable == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong value in stackable (%i), replace by default 1.", entry, itemTemplate.Stackable);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong value in stackable (%i), replace by default 1.", entry, itemTemplate.Stackable);
itemTemplate.Stackable = 1;
}
else if (itemTemplate.Stackable < -1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has too large negative in stackable (%i), replace by value (-1) no stacking limits.", entry, itemTemplate.Stackable);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has too large negative in stackable (%i), replace by value (-1) no stacking limits.", entry, itemTemplate.Stackable);
itemTemplate.Stackable = -1;
}
if (itemTemplate.ContainerSlots > MAX_BAG_SIZE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has too large value in ContainerSlots (%u), replace by hardcoded limit (%u).", entry, itemTemplate.ContainerSlots, MAX_BAG_SIZE);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has too large value in ContainerSlots (%u), replace by hardcoded limit (%u).", entry, itemTemplate.ContainerSlots, MAX_BAG_SIZE);
itemTemplate.ContainerSlots = MAX_BAG_SIZE;
}
if (itemTemplate.StatsCount > MAX_ITEM_PROTO_STATS)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has too large value in statscount (%u), replace by hardcoded limit (%u).", entry, itemTemplate.StatsCount, MAX_ITEM_PROTO_STATS);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has too large value in statscount (%u), replace by hardcoded limit (%u).", entry, itemTemplate.StatsCount, MAX_ITEM_PROTO_STATS);
itemTemplate.StatsCount = MAX_ITEM_PROTO_STATS;
}
@@ -2479,7 +2479,7 @@ void ObjectMgr::LoadItemTemplates()
// for ItemStatValue != 0
if (itemTemplate.ItemStat[j].ItemStatValue && itemTemplate.ItemStat[j].ItemStatType >= MAX_ITEM_MOD)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (non-existing?) stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong (non-existing?) stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType);
itemTemplate.ItemStat[j].ItemStatType = 0;
}
@@ -2487,7 +2487,7 @@ void ObjectMgr::LoadItemTemplates()
{
case ITEM_MOD_SPELL_HEALING_DONE:
case ITEM_MOD_SPELL_DAMAGE_DONE:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has deprecated stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has deprecated stat_type%d (%u)", entry, j+1, itemTemplate.ItemStat[j].ItemStatType);
break;
default:
break;
@@ -2498,7 +2498,7 @@ void ObjectMgr::LoadItemTemplates()
{
if (itemTemplate.Damage[j].DamageType >= MAX_SPELL_SCHOOL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong dmg_type%d (%u)", entry, j+1, itemTemplate.Damage[j].DamageType);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong dmg_type%d (%u)", entry, j+1, itemTemplate.Damage[j].DamageType);
itemTemplate.Damage[j].DamageType = 0;
}
}
@@ -2509,7 +2509,7 @@ void ObjectMgr::LoadItemTemplates()
// spell_1
if (itemTemplate.Spells[0].SpellTrigger != ITEM_SPELLTRIGGER_ON_USE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format", entry, 0+1, itemTemplate.Spells[0].SpellTrigger);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format", entry, 0+1, itemTemplate.Spells[0].SpellTrigger);
itemTemplate.Spells[0].SpellId = 0;
itemTemplate.Spells[0].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
itemTemplate.Spells[1].SpellId = 0;
@@ -2519,14 +2519,14 @@ void ObjectMgr::LoadItemTemplates()
// spell_2 have learning spell
if (itemTemplate.Spells[1].SpellTrigger != ITEM_SPELLTRIGGER_LEARN_SPELL_ID)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format.", entry, 1+1, itemTemplate.Spells[1].SpellTrigger);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u) for special learning format.", entry, 1+1, itemTemplate.Spells[1].SpellTrigger);
itemTemplate.Spells[0].SpellId = 0;
itemTemplate.Spells[1].SpellId = 0;
itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
}
else if (!itemTemplate.Spells[1].SpellId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not have an expected spell in spellid_%d in special learning format.", entry, 1+1);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not have an expected spell in spellid_%d in special learning format.", entry, 1+1);
itemTemplate.Spells[0].SpellId = 0;
itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
}
@@ -2535,7 +2535,7 @@ void ObjectMgr::LoadItemTemplates()
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemTemplate.Spells[1].SpellId);
if (!spellInfo && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[1].SpellId, NULL))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId);
itemTemplate.Spells[0].SpellId = 0;
itemTemplate.Spells[1].SpellId = 0;
itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
@@ -2543,7 +2543,7 @@ void ObjectMgr::LoadItemTemplates()
// allowed only in special format
else if ((itemTemplate.Spells[1].SpellId == 483) || (itemTemplate.Spells[1].SpellId == 55884))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId);
itemTemplate.Spells[0].SpellId = 0;
itemTemplate.Spells[1].SpellId = 0;
itemTemplate.Spells[1].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
@@ -2555,13 +2555,13 @@ void ObjectMgr::LoadItemTemplates()
{
if (itemTemplate.Spells[j].SpellTrigger != ITEM_SPELLTRIGGER_ON_USE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger);
itemTemplate.Spells[j].SpellId = 0;
itemTemplate.Spells[j].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
}
else if (itemTemplate.Spells[j].SpellId != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong spell in spellid_%d (%d) for learning special format", entry, j+1, itemTemplate.Spells[j].SpellId);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong spell in spellid_%d (%d) for learning special format", entry, j+1, itemTemplate.Spells[j].SpellId);
itemTemplate.Spells[j].SpellId = 0;
}
}
@@ -2573,7 +2573,7 @@ void ObjectMgr::LoadItemTemplates()
{
if (itemTemplate.Spells[j].SpellTrigger >= MAX_ITEM_SPELLTRIGGER || itemTemplate.Spells[j].SpellTrigger == ITEM_SPELLTRIGGER_LEARN_SPELL_ID)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong item spell trigger value in spelltrigger_%d (%u)", entry, j+1, itemTemplate.Spells[j].SpellTrigger);
itemTemplate.Spells[j].SpellId = 0;
itemTemplate.Spells[j].SpellTrigger = ITEM_SPELLTRIGGER_ON_USE;
}
@@ -2583,13 +2583,13 @@ void ObjectMgr::LoadItemTemplates()
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemTemplate.Spells[j].SpellId);
if (!spellInfo && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[j].SpellId, NULL))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId);
itemTemplate.Spells[j].SpellId = 0;
}
// allowed only in special format
else if ((itemTemplate.Spells[j].SpellId == 483) || (itemTemplate.Spells[j].SpellId == 55884))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has broken spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId);
itemTemplate.Spells[j].SpellId = 0;
}
}
@@ -2597,17 +2597,17 @@ void ObjectMgr::LoadItemTemplates()
}
if (itemTemplate.Bonding >= MAX_BIND_TYPE)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Bonding value (%u)", entry, itemTemplate.Bonding);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Bonding value (%u)", entry, itemTemplate.Bonding);
if (itemTemplate.PageText && !GetPageText(itemTemplate.PageText))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has non existing first page (Id:%u)", entry, itemTemplate.PageText);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has non existing first page (Id:%u)", entry, itemTemplate.PageText);
if (itemTemplate.LockID && !sLockStore.LookupEntry(itemTemplate.LockID))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong LockID (%u)", entry, itemTemplate.LockID);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong LockID (%u)", entry, itemTemplate.LockID);
if (itemTemplate.Sheath >= MAX_SHEATHETYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Sheath (%u)", entry, itemTemplate.Sheath);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Sheath (%u)", entry, itemTemplate.Sheath);
itemTemplate.Sheath = SHEATHETYPE_NONE;
}
@@ -2619,28 +2619,28 @@ void ObjectMgr::LoadItemTemplates()
else if (!sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(itemTemplate.RandomProperty)))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)", entry, itemTemplate.RandomProperty);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)", entry, itemTemplate.RandomProperty);
itemTemplate.RandomProperty = 0;
}
}
if (itemTemplate.RandomSuffix && !sItemRandomSuffixStore.LookupEntry(GetItemEnchantMod(itemTemplate.RandomSuffix)))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong RandomSuffix (%u)", entry, itemTemplate.RandomSuffix);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong RandomSuffix (%u)", entry, itemTemplate.RandomSuffix);
itemTemplate.RandomSuffix = 0;
}
if (itemTemplate.ItemSet && !sItemSetStore.LookupEntry(itemTemplate.ItemSet))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) have wrong ItemSet (%u)", entry, itemTemplate.ItemSet);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) have wrong ItemSet (%u)", entry, itemTemplate.ItemSet);
itemTemplate.ItemSet = 0;
}
if (itemTemplate.Area && !GetAreaEntryByAreaID(itemTemplate.Area))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Area (%u)", entry, itemTemplate.Area);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Area (%u)", entry, itemTemplate.Area);
if (itemTemplate.Map && !sMapStore.LookupEntry(itemTemplate.Map))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong Map (%u)", entry, itemTemplate.Map);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong Map (%u)", entry, itemTemplate.Map);
if (itemTemplate.BagFamily)
{
@@ -2654,7 +2654,7 @@ void ObjectMgr::LoadItemTemplates()
ItemBagFamilyEntry const* bf = sItemBagFamilyStore.LookupEntry(j+1);
if (!bf)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has bag family bit set not listed in ItemBagFamily.dbc, remove bit", entry);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has bag family bit set not listed in ItemBagFamily.dbc, remove bit", entry);
itemTemplate.BagFamily &= ~mask;
continue;
}
@@ -2664,7 +2664,7 @@ void ObjectMgr::LoadItemTemplates()
CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(itemTemplate.ItemId);
if (!ctEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit", entry);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit", entry);
itemTemplate.BagFamily &= ~mask;
}
}
@@ -2672,41 +2672,41 @@ void ObjectMgr::LoadItemTemplates()
}
if (itemTemplate.TotemCategory && !sTotemCategoryStore.LookupEntry(itemTemplate.TotemCategory))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong TotemCategory (%u)", entry, itemTemplate.TotemCategory);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong TotemCategory (%u)", entry, itemTemplate.TotemCategory);
for (uint8 j = 0; j < MAX_ITEM_PROTO_SOCKETS; ++j)
{
if (itemTemplate.Socket[j].Color && (itemTemplate.Socket[j].Color & SOCKET_COLOR_ALL) != itemTemplate.Socket[j].Color)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong socketColor_%d (%u)", entry, j+1, itemTemplate.Socket[j].Color);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong socketColor_%d (%u)", entry, j+1, itemTemplate.Socket[j].Color);
itemTemplate.Socket[j].Color = 0;
}
}
if (itemTemplate.GemProperties && !sGemPropertiesStore.LookupEntry(itemTemplate.GemProperties))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong GemProperties (%u)", entry, itemTemplate.GemProperties);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong GemProperties (%u)", entry, itemTemplate.GemProperties);
if (itemTemplate.FoodType >= MAX_PET_DIET)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong FoodType value (%u)", entry, itemTemplate.FoodType);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong FoodType value (%u)", entry, itemTemplate.FoodType);
itemTemplate.FoodType = 0;
}
if (itemTemplate.ItemLimitCategory && !sItemLimitCategoryStore.LookupEntry(itemTemplate.ItemLimitCategory))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong LimitCategory value (%u)", entry, itemTemplate.ItemLimitCategory);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong LimitCategory value (%u)", entry, itemTemplate.ItemLimitCategory);
itemTemplate.ItemLimitCategory = 0;
}
if (itemTemplate.HolidayId && !sHolidaysStore.LookupEntry(itemTemplate.HolidayId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) has wrong HolidayId value (%u)", entry, itemTemplate.HolidayId);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) has wrong HolidayId value (%u)", entry, itemTemplate.HolidayId);
itemTemplate.HolidayId = 0;
}
if (itemTemplate.FlagsCu & ITEM_FLAGS_CU_DURATION_REAL_TIME && !itemTemplate.Duration)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry %u) has flag ITEM_FLAGS_CU_DURATION_REAL_TIME but it does not have duration limit", entry);
+ TC_LOG_ERROR("sql.sql", "Item (Entry %u) has flag ITEM_FLAGS_CU_DURATION_REAL_TIME but it does not have duration limit", entry);
itemTemplate.FlagsCu &= ~ITEM_FLAGS_CU_DURATION_REAL_TIME;
}
@@ -2735,9 +2735,9 @@ void ObjectMgr::LoadItemTemplates()
}
for (std::set<uint32>::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr);
+ TC_LOG_ERROR("sql.sql", "Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry)
@@ -2772,7 +2772,7 @@ void ObjectMgr::LoadItemSetNameLocales()
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Name);
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded " UI64FMTD " Item set name locale strings in %u ms", uint64(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadItemSetNames()
@@ -2800,7 +2800,7 @@ void ObjectMgr::LoadItemSetNames()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 item set names. DB table `item_set_names` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 item set names. DB table `item_set_names` is empty.");
return;
}
@@ -2814,7 +2814,7 @@ void ObjectMgr::LoadItemSetNames()
uint32 entry = fields[0].GetUInt32();
if (itemSetItems.find(entry) == itemSetItems.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item set name (Entry: %u) not found in ItemSet.dbc, data useless.", entry);
+ TC_LOG_ERROR("sql.sql", "Item set name (Entry: %u) not found in ItemSet.dbc, data useless.", entry);
continue;
}
@@ -2824,7 +2824,7 @@ void ObjectMgr::LoadItemSetNames()
uint32 invType = fields[2].GetUInt8();
if (invType >= MAX_INVTYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item set name (Entry: %u) has wrong InventoryType value (%u)", entry, invType);
+ TC_LOG_ERROR("sql.sql", "Item set name (Entry: %u) has wrong InventoryType value (%u)", entry, invType);
invType = INVTYPE_NON_EQUIP;
}
@@ -2843,18 +2843,18 @@ void ObjectMgr::LoadItemSetNames()
pProto = sObjectMgr->GetItemTemplate(entry);
if (pProto)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry);
+ TC_LOG_ERROR("sql.sql", "Item set part (Entry: %u) does not have entry in `item_set_names`, adding data from `item_template`.", entry);
ItemSetNameEntry &data = _itemSetNameStore[entry];
data.name = pProto->Name1;
data.InventoryType = pProto->InventoryType;
++count;
}
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item set part (Entry: %u) does not have entry in `item_set_names`, set will not display properly.", entry);
+ TC_LOG_ERROR("sql.sql", "Item set part (Entry: %u) does not have entry in `item_set_names`, set will not display properly.", entry);
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadVehicleTemplateAccessories()
@@ -2870,7 +2870,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty.");
return;
}
@@ -2887,19 +2887,19 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
if (!sObjectMgr->GetCreatureTemplate(uiEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `vehicle_template_accessory`: creature template entry %u does not exist.", uiEntry);
+ TC_LOG_ERROR("sql.sql", "Table `vehicle_template_accessory`: creature template entry %u does not exist.", uiEntry);
continue;
}
if (!sObjectMgr->GetCreatureTemplate(uiAccessory))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `vehicle_template_accessory`: Accessory %u does not exist.", uiAccessory);
+ TC_LOG_ERROR("sql.sql", "Table `vehicle_template_accessory`: Accessory %u does not exist.", uiAccessory);
continue;
}
if (_spellClickInfoStore.find(uiEntry) == _spellClickInfoStore.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `vehicle_template_accessory`: creature template entry %u has no data in npc_spellclick_spells", uiEntry);
+ TC_LOG_ERROR("sql.sql", "Table `vehicle_template_accessory`: creature template entry %u has no data in npc_spellclick_spells", uiEntry);
continue;
}
@@ -2909,7 +2909,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadVehicleAccessories()
@@ -2925,7 +2925,7 @@ void ObjectMgr::LoadVehicleAccessories()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime));
return;
}
@@ -2942,7 +2942,7 @@ void ObjectMgr::LoadVehicleAccessories()
if (!sObjectMgr->GetCreatureTemplate(uiAccessory))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `vehicle_accessory`: Accessory %u does not exist.", uiAccessory);
+ TC_LOG_ERROR("sql.sql", "Table `vehicle_accessory`: Accessory %u does not exist.", uiAccessory);
continue;
}
@@ -2952,7 +2952,7 @@ void ObjectMgr::LoadVehicleAccessories()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadPetLevelInfo()
@@ -2964,7 +2964,7 @@ void ObjectMgr::LoadPetLevelInfo()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty.");
return;
}
@@ -2977,7 +2977,7 @@ void ObjectMgr::LoadPetLevelInfo()
uint32 creature_id = fields[0].GetUInt32();
if (!sObjectMgr->GetCreatureTemplate(creature_id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong creature id %u in `pet_levelstats` table, ignoring.", creature_id);
+ TC_LOG_ERROR("sql.sql", "Wrong creature id %u in `pet_levelstats` table, ignoring.", creature_id);
continue;
}
@@ -2985,17 +2985,17 @@ void ObjectMgr::LoadPetLevelInfo()
if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong (> %u) level %u in `pet_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level);
+ TC_LOG_ERROR("sql.sql", "Wrong (> %u) level %u in `pet_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level);
else
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `pet_levelstats` table, ignoring.", current_level);
+ TC_LOG_INFO("misc", "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;
}
else if (current_level < 1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong (<1) level %u in `pet_levelstats` table, ignoring.", current_level);
+ TC_LOG_ERROR("sql.sql", "Wrong (<1) level %u in `pet_levelstats` table, ignoring.", current_level);
continue;
}
@@ -3028,7 +3028,7 @@ void ObjectMgr::LoadPetLevelInfo()
// fatal error if no level 1 data
if (!pInfo || pInfo[0].health == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature %u does not have pet stats data for Level 1!", itr->first);
+ TC_LOG_ERROR("sql.sql", "Creature %u does not have pet stats data for Level 1!", itr->first);
exit(1);
}
@@ -3037,13 +3037,13 @@ void ObjectMgr::LoadPetLevelInfo()
{
if (pInfo[level].health == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature %u has no data for Level %i pet stats data, using data of Level %i.", itr->first, level+1, level);
+ TC_LOG_ERROR("sql.sql", "Creature %u has no data for Level %i pet stats data, using data of Level %i.", itr->first, level+1, level);
pInfo[level] = pInfo[level-1];
}
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) const
@@ -3068,7 +3068,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3
else
{
if (count < -1)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId);
+ TC_LOG_ERROR("sql.sql", "Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId);
for (uint32 gender = 0; gender < GENDER_NONE; ++gender)
{
@@ -3086,7 +3086,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3
}
if (!found)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item %u specified to be removed from original create info not found in dbc!", itemId);
+ TC_LOG_ERROR("sql.sql", "Item %u specified to be removed from original create info not found in dbc!", itemId);
}
}
}
@@ -3102,7 +3102,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty.");
exit(1);
}
else
@@ -3124,39 +3124,39 @@ void ObjectMgr::LoadPlayerInfo()
if (current_race >= MAX_RACES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo` table, ignoring.", current_race);
+ TC_LOG_ERROR("sql.sql", "Wrong race %u in `playercreateinfo` table, ignoring.", current_race);
continue;
}
ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(current_race);
if (!rEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo` table, ignoring.", current_race);
+ TC_LOG_ERROR("sql.sql", "Wrong race %u in `playercreateinfo` table, ignoring.", current_race);
continue;
}
if (current_class >= MAX_CLASSES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo` table, ignoring.", current_class);
+ TC_LOG_ERROR("sql.sql", "Wrong class %u in `playercreateinfo` table, ignoring.", current_class);
continue;
}
if (!sChrClassesStore.LookupEntry(current_class))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo` table, ignoring.", current_class);
+ TC_LOG_ERROR("sql.sql", "Wrong class %u in `playercreateinfo` table, ignoring.", current_class);
continue;
}
// accept DB data only for valid position (and non instanceable)
if (!MapManager::IsValidMapCoord(mapId, positionX, positionY, positionZ, orientation))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong home position for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
+ TC_LOG_ERROR("sql.sql", "Wrong home position for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
continue;
}
if (sMapStore.LookupEntry(mapId)->Instanceable())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Home position in instanceable map for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
+ TC_LOG_ERROR("sql.sql", "Home position in instanceable map for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
continue;
}
@@ -3175,12 +3175,12 @@ void ObjectMgr::LoadPlayerInfo()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// Load playercreate items
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Create Items Data...");
+ TC_LOG_INFO("server.loading", "Loading Player Create Items Data...");
{
uint32 oldMSTime = getMSTime();
// 0 1 2 3
@@ -3188,7 +3188,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty.");
}
else
{
@@ -3201,14 +3201,14 @@ void ObjectMgr::LoadPlayerInfo()
uint32 current_race = fields[0].GetUInt8();
if (current_race >= MAX_RACES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo_item` table, ignoring.", current_race);
+ TC_LOG_ERROR("sql.sql", "Wrong race %u in `playercreateinfo_item` table, ignoring.", current_race);
continue;
}
uint32 current_class = fields[1].GetUInt8();
if (current_class >= MAX_CLASSES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo_item` table, ignoring.", current_class);
+ TC_LOG_ERROR("sql.sql", "Wrong class %u in `playercreateinfo_item` table, ignoring.", current_class);
continue;
}
@@ -3216,7 +3216,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!GetItemTemplate(item_id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item id %u (race %u class %u) in `playercreateinfo_item` table but not listed in `item_template`, ignoring.", item_id, current_race, current_class);
+ TC_LOG_ERROR("sql.sql", "Item id %u (race %u class %u) in `playercreateinfo_item` table but not listed in `item_template`, ignoring.", item_id, current_race, current_class);
continue;
}
@@ -3224,7 +3224,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!amount)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item id %u (class %u race %u) have amount == 0 in `playercreateinfo_item` table, ignoring.", item_id, current_race, current_class);
+ TC_LOG_ERROR("sql.sql", "Item id %u (class %u race %u) have amount == 0 in `playercreateinfo_item` table, ignoring.", item_id, current_race, current_class);
continue;
}
@@ -3245,12 +3245,12 @@ void ObjectMgr::LoadPlayerInfo()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// Load playercreate spells
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Create Spell Data...");
+ TC_LOG_INFO("server.loading", "Loading Player Create Spell Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3259,7 +3259,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 player create spells. DB table `%s` is empty.", sWorld->getBoolConfig(CONFIG_START_ALL_SPELLS) ? "playercreateinfo_spell_custom" : "playercreateinfo_spell");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 player create spells. DB table `%s` is empty.", sWorld->getBoolConfig(CONFIG_START_ALL_SPELLS) ? "playercreateinfo_spell_custom" : "playercreateinfo_spell");
}
else
{
@@ -3274,13 +3274,13 @@ void ObjectMgr::LoadPlayerInfo()
if (raceMask != 0 && !(raceMask & RACEMASK_ALL_PLAYABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong race mask %u in `playercreateinfo_spell` table, ignoring.", raceMask);
+ TC_LOG_ERROR("sql.sql", "Wrong race mask %u in `playercreateinfo_spell` table, ignoring.", raceMask);
continue;
}
if (classMask != 0 && !(classMask & CLASSMASK_ALL_PLAYABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong class mask %u in `playercreateinfo_spell` table, ignoring.", classMask);
+ TC_LOG_ERROR("sql.sql", "Wrong class mask %u in `playercreateinfo_spell` table, ignoring.", classMask);
continue;
}
@@ -3300,7 +3300,7 @@ void ObjectMgr::LoadPlayerInfo()
// We need something better here, the check is not accounting for spells used by multiple races/classes but not all of them.
// Either split the masks per class, or per race, which kind of kills the point yet.
// else if (raceMask != 0 && classMask != 0)
- // TC_LOG_ERROR(LOG_FILTER_SQL, "Racemask/classmask (%u/%u) combination was found containing an invalid race/class combination (%u/%u) in `playercreateinfo_spell` (Spell %u), ignoring.", raceMask, classMask, raceIndex, classIndex, spellId);
+ // TC_LOG_ERROR("sql.sql", "Racemask/classmask (%u/%u) combination was found containing an invalid race/class combination (%u/%u) in `playercreateinfo_spell` (Spell %u), ignoring.", raceMask, classMask, raceIndex, classIndex, spellId);
}
}
}
@@ -3308,12 +3308,12 @@ void ObjectMgr::LoadPlayerInfo()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// Load playercreate actions
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Create Action Data...");
+ TC_LOG_INFO("server.loading", "Loading Player Create Action Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3322,7 +3322,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty.");
}
else
{
@@ -3335,14 +3335,14 @@ void ObjectMgr::LoadPlayerInfo()
uint32 current_race = fields[0].GetUInt8();
if (current_race >= MAX_RACES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong race %u in `playercreateinfo_action` table, ignoring.", current_race);
+ TC_LOG_ERROR("sql.sql", "Wrong race %u in `playercreateinfo_action` table, ignoring.", current_race);
continue;
}
uint32 current_class = fields[1].GetUInt8();
if (current_class >= MAX_CLASSES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong class %u in `playercreateinfo_action` table, ignoring.", current_class);
+ TC_LOG_ERROR("sql.sql", "Wrong class %u in `playercreateinfo_action` table, ignoring.", current_class);
continue;
}
@@ -3353,12 +3353,12 @@ void ObjectMgr::LoadPlayerInfo()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// Loading levels data (class only dependent)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Create Level HP/Mana Data...");
+ TC_LOG_INFO("server.loading", "Loading Player Create Level HP/Mana Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3367,7 +3367,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 level health/mana definitions. DB table `game_event_condition` is empty.");
exit(1);
}
@@ -3380,14 +3380,14 @@ void ObjectMgr::LoadPlayerInfo()
uint32 current_class = fields[0].GetUInt8();
if (current_class >= MAX_CLASSES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong class %u in `player_classlevelstats` table, ignoring.", current_class);
+ TC_LOG_ERROR("sql.sql", "Wrong class %u in `player_classlevelstats` table, ignoring.", current_class);
continue;
}
uint8 current_level = fields[1].GetUInt8(); // Can't be > than STRONG_MAX_LEVEL (hardcoded level maximum) due to var type
if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.", current_level);
+ TC_LOG_INFO("misc", "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;
}
@@ -3421,7 +3421,7 @@ void ObjectMgr::LoadPlayerInfo()
// fatal error if no level 1 data
if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Class %i Level 1 does not have health/mana data!", class_);
+ TC_LOG_ERROR("sql.sql", "Class %i Level 1 does not have health/mana data!", class_);
exit(1);
}
@@ -3430,17 +3430,17 @@ void ObjectMgr::LoadPlayerInfo()
{
if (pClassInfo->levelInfo[level].basehealth == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level+1, level);
+ TC_LOG_ERROR("sql.sql", "Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level+1, level);
pClassInfo->levelInfo[level] = pClassInfo->levelInfo[level-1];
}
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
// Loading levels data (class/race dependent)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Create Level Stats Data...");
+ TC_LOG_INFO("server.loading", "Loading Player Create Level Stats Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3449,7 +3449,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty.");
exit(1);
}
@@ -3462,14 +3462,14 @@ void ObjectMgr::LoadPlayerInfo()
uint32 current_race = fields[0].GetUInt8();
if (current_race >= MAX_RACES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong race %u in `player_levelstats` table, ignoring.", current_race);
+ TC_LOG_ERROR("sql.sql", "Wrong race %u in `player_levelstats` table, ignoring.", current_race);
continue;
}
uint32 current_class = fields[1].GetUInt8();
if (current_class >= MAX_CLASSES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong class %u in `player_levelstats` table, ignoring.", current_class);
+ TC_LOG_ERROR("sql.sql", "Wrong class %u in `player_levelstats` table, ignoring.", current_class);
continue;
}
@@ -3477,10 +3477,10 @@ void ObjectMgr::LoadPlayerInfo()
if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong (> %u) level %u in `player_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level);
+ TC_LOG_ERROR("sql.sql", "Wrong (> %u) level %u in `player_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level);
else
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_levelstats` table, ignoring.", current_level);
+ TC_LOG_INFO("misc", "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;
@@ -3528,7 +3528,7 @@ void ObjectMgr::LoadPlayerInfo()
// fatal error if no level 1 data
if (!info->levelInfo || info->levelInfo[0].stats[0] == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Race %i Class %i Level 1 does not have stats data!", race, class_);
+ TC_LOG_ERROR("sql.sql", "Race %i Class %i Level 1 does not have stats data!", race, class_);
exit(1);
}
@@ -3537,18 +3537,18 @@ void ObjectMgr::LoadPlayerInfo()
{
if (info->levelInfo[level].stats[0] == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level);
+ TC_LOG_ERROR("sql.sql", "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level+1, level);
info->levelInfo[level] = info->levelInfo[level-1];
}
}
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
// Loading xp per level data
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Create XP Data...");
+ TC_LOG_INFO("server.loading", "Loading Player Create XP Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3561,7 +3561,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty.");
exit(1);
}
@@ -3577,10 +3577,10 @@ void ObjectMgr::LoadPlayerInfo()
if (current_level >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
if (current_level > STRONG_MAX_LEVEL) // hardcoded level maximum
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL, current_level);
+ TC_LOG_ERROR("sql.sql", "Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL, current_level);
else
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_xp_for_levels` table, ignoring.", current_level);
+ TC_LOG_INFO("misc", "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;
@@ -3596,12 +3596,12 @@ void ObjectMgr::LoadPlayerInfo()
{
if (_playerXPperLevel[level] == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level);
+ TC_LOG_ERROR("sql.sql", "Level %i does not have XP for level data. Using data of level [%i] + 100.", level+1, level);
_playerXPperLevel[level] = _playerXPperLevel[level-1]+100;
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
@@ -3754,7 +3754,7 @@ void ObjectMgr::LoadQuests()
" FROM quest_template");
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests definitions. DB table `quest_template` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 quests definitions. DB table `quest_template` is empty.");
return;
}
@@ -3783,18 +3783,18 @@ void ObjectMgr::LoadQuests()
// additional quest integrity checks (GO, creature_template and item_template must be loaded already)
if (qinfo->GetQuestMethod() >= 3)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `Method` = %u, expected values are 0, 1 or 2.", qinfo->GetQuestId(), qinfo->GetQuestMethod());
+ TC_LOG_ERROR("sql.sql", "Quest %u has `Method` = %u, expected values are 0, 1 or 2.", qinfo->GetQuestId(), qinfo->GetQuestMethod());
if (qinfo->SpecialFlags & ~QUEST_SPECIAL_FLAGS_DB_ALLOWED)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u",
qinfo->GetQuestId(), qinfo->SpecialFlags, QUEST_SPECIAL_FLAGS_DB_ALLOWED);
qinfo->SpecialFlags &= QUEST_SPECIAL_FLAGS_DB_ALLOWED;
}
if (qinfo->Flags & QUEST_FLAGS_DAILY && qinfo->Flags & QUEST_FLAGS_WEEKLY)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Weekly Quest %u is marked as daily quest in `Flags`, removed daily flag.", qinfo->GetQuestId());
+ TC_LOG_ERROR("sql.sql", "Weekly Quest %u is marked as daily quest in `Flags`, removed daily flag.", qinfo->GetQuestId());
qinfo->Flags &= ~QUEST_FLAGS_DAILY;
}
@@ -3802,7 +3802,7 @@ void ObjectMgr::LoadQuests()
{
if (!(qinfo->SpecialFlags & QUEST_SPECIAL_FLAGS_REPEATABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Daily Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
+ TC_LOG_ERROR("sql.sql", "Daily Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
qinfo->SpecialFlags |= QUEST_SPECIAL_FLAGS_REPEATABLE;
}
}
@@ -3811,7 +3811,7 @@ void ObjectMgr::LoadQuests()
{
if (!(qinfo->SpecialFlags & QUEST_SPECIAL_FLAGS_REPEATABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Weekly Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
+ TC_LOG_ERROR("sql.sql", "Weekly Quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
qinfo->SpecialFlags |= QUEST_SPECIAL_FLAGS_REPEATABLE;
}
}
@@ -3820,7 +3820,7 @@ void ObjectMgr::LoadQuests()
{
if (!(qinfo->SpecialFlags & QUEST_SPECIAL_FLAGS_REPEATABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Monthly quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
+ TC_LOG_ERROR("sql.sql", "Monthly quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
qinfo->SpecialFlags |= QUEST_SPECIAL_FLAGS_REPEATABLE;
}
}
@@ -3832,7 +3832,7 @@ void ObjectMgr::LoadQuests()
{
if (uint32 id = qinfo->RewardChoiceItemId[j])
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = %u but item from `RewardChoiceItemId%d` can't be rewarded with quest flag QUEST_FLAGS_TRACKING.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardChoiceItemId%d` = %u but item from `RewardChoiceItemId%d` can't be rewarded with quest flag QUEST_FLAGS_TRACKING.",
qinfo->GetQuestId(), j+1, id, j+1);
// no changes, quest ignore this data
}
@@ -3844,7 +3844,7 @@ void ObjectMgr::LoadQuests()
{
if (!GetAreaEntryByAreaID(qinfo->ZoneOrSort))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `ZoneOrSort` = %u (zone case) but zone with this id does not exist.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `ZoneOrSort` = %u (zone case) but zone with this id does not exist.",
qinfo->GetQuestId(), qinfo->ZoneOrSort);
// no changes, quest not dependent from this value but can have problems at client
}
@@ -3855,7 +3855,7 @@ void ObjectMgr::LoadQuests()
QuestSortEntry const* qSort = sQuestSortStore.LookupEntry(-int32(qinfo->ZoneOrSort));
if (!qSort)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `ZoneOrSort` = %i (sort case) but quest sort with this id does not exist.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `ZoneOrSort` = %i (sort case) but quest sort with this id does not exist.",
qinfo->GetQuestId(), qinfo->ZoneOrSort);
// no changes, quest not dependent from this value but can have problems at client (note some may be 0, we must allow this so no check)
}
@@ -3864,7 +3864,7 @@ void ObjectMgr::LoadQuests()
{
if (qinfo->RequiredSkillId != skill_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%d).",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `ZoneOrSort` = %i but `RequiredSkillId` does not have a corresponding value (%d).",
qinfo->GetQuestId(), qinfo->ZoneOrSort, skill_id);
//override, and force proper value here?
}
@@ -3876,7 +3876,7 @@ void ObjectMgr::LoadQuests()
{
if (!(qinfo->RequiredClasses & CLASSMASK_ALL_PLAYABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u does not contain any playable classes in `RequiredClasses` (%u), value set to 0 (all classes).", qinfo->GetQuestId(), qinfo->RequiredClasses);
+ TC_LOG_ERROR("sql.sql", "Quest %u does not contain any playable classes in `RequiredClasses` (%u), value set to 0 (all classes).", qinfo->GetQuestId(), qinfo->RequiredClasses);
qinfo->RequiredClasses = 0;
}
}
@@ -3885,7 +3885,7 @@ void ObjectMgr::LoadQuests()
{
if (!(qinfo->RequiredRaces & RACEMASK_ALL_PLAYABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u does not contain any playable races in `RequiredRaces` (%u), value set to 0 (all races).", qinfo->GetQuestId(), qinfo->RequiredRaces);
+ TC_LOG_ERROR("sql.sql", "Quest %u does not contain any playable races in `RequiredRaces` (%u), value set to 0 (all races).", qinfo->GetQuestId(), qinfo->RequiredRaces);
qinfo->RequiredRaces = 0;
}
}
@@ -3894,7 +3894,7 @@ void ObjectMgr::LoadQuests()
{
if (!sSkillLineStore.LookupEntry(qinfo->RequiredSkillId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredSkillId` = %u but this skill does not exist",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredSkillId` = %u but this skill does not exist",
qinfo->GetQuestId(), qinfo->RequiredSkillId);
}
}
@@ -3903,7 +3903,7 @@ void ObjectMgr::LoadQuests()
{
if (qinfo->RequiredSkillPoints > sWorld->GetConfigMaxSkillValue())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredSkillPoints` = %u but max possible skill is %u, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredSkillPoints` = %u but max possible skill is %u, quest can't be done.",
qinfo->GetQuestId(), qinfo->RequiredSkillPoints, sWorld->GetConfigMaxSkillValue());
// no changes, quest can't be done for this requirement
}
@@ -3912,77 +3912,77 @@ void ObjectMgr::LoadQuests()
if (qinfo->RequiredFactionId2 && !sFactionStore.LookupEntry(qinfo->RequiredFactionId2))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredFactionId2` = %u but faction template %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredFactionId2` = %u but faction template %u does not exist, quest can't be done.",
qinfo->GetQuestId(), qinfo->RequiredFactionId2, qinfo->RequiredFactionId2);
// no changes, quest can't be done for this requirement
}
if (qinfo->RequiredFactionId1 && !sFactionStore.LookupEntry(qinfo->RequiredFactionId1))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredFactionId1` = %u but faction template %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredFactionId1` = %u but faction template %u does not exist, quest can't be done.",
qinfo->GetQuestId(), qinfo->RequiredFactionId1, qinfo->RequiredFactionId1);
// no changes, quest can't be done for this requirement
}
if (qinfo->RequiredMinRepFaction && !sFactionStore.LookupEntry(qinfo->RequiredMinRepFaction))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredMinRepFaction` = %u but faction template %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredMinRepFaction` = %u but faction template %u does not exist, quest can't be done.",
qinfo->GetQuestId(), qinfo->RequiredMinRepFaction, qinfo->RequiredMinRepFaction);
// no changes, quest can't be done for this requirement
}
if (qinfo->RequiredMaxRepFaction && !sFactionStore.LookupEntry(qinfo->RequiredMaxRepFaction))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredMaxRepFaction` = %u but faction template %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredMaxRepFaction` = %u but faction template %u does not exist, quest can't be done.",
qinfo->GetQuestId(), qinfo->RequiredMaxRepFaction, qinfo->RequiredMaxRepFaction);
// no changes, quest can't be done for this requirement
}
if (qinfo->RequiredMinRepValue && qinfo->RequiredMinRepValue > ReputationMgr::Reputation_Cap)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredMinRepValue` = %d but max reputation is %u, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredMinRepValue` = %d but max reputation is %u, quest can't be done.",
qinfo->GetQuestId(), qinfo->RequiredMinRepValue, ReputationMgr::Reputation_Cap);
// no changes, quest can't be done for this requirement
}
if (qinfo->RequiredMinRepValue && qinfo->RequiredMaxRepValue && qinfo->RequiredMaxRepValue <= qinfo->RequiredMinRepValue)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredMaxRepValue` = %d and `RequiredMinRepValue` = %d, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredMaxRepValue` = %d and `RequiredMinRepValue` = %d, quest can't be done.",
qinfo->GetQuestId(), qinfo->RequiredMaxRepValue, qinfo->RequiredMinRepValue);
// no changes, quest can't be done for this requirement
}
if (!qinfo->RequiredFactionId1 && qinfo->RequiredFactionValue1 != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredFactionValue1` = %d but `RequiredFactionId1` is 0, value has no effect",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredFactionValue1` = %d but `RequiredFactionId1` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RequiredFactionValue1);
// warning
}
if (!qinfo->RequiredFactionId2 && qinfo->RequiredFactionValue2 != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredFactionValue2` = %d but `RequiredFactionId2` is 0, value has no effect",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredFactionValue2` = %d but `RequiredFactionId2` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RequiredFactionValue2);
// warning
}
if (!qinfo->RequiredMinRepFaction && qinfo->RequiredMinRepValue != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredMinRepValue` = %d but `RequiredMinRepFaction` is 0, value has no effect",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredMinRepValue` = %d but `RequiredMinRepFaction` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RequiredMinRepValue);
// warning
}
if (!qinfo->RequiredMaxRepFaction && qinfo->RequiredMaxRepValue != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredMaxRepValue` = %d but `RequiredMaxRepFaction` is 0, value has no effect",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredMaxRepValue` = %d but `RequiredMaxRepFaction` is 0, value has no effect",
qinfo->GetQuestId(), qinfo->RequiredMaxRepValue);
// warning
}
if (qinfo->RewardTitleId && !sCharTitlesStore.LookupEntry(qinfo->RewardTitleId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardTitleId` = %u but CharTitle Id %u does not exist, quest can't be rewarded with title.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardTitleId` = %u but CharTitle Id %u does not exist, quest can't be rewarded with title.",
qinfo->GetQuestId(), qinfo->GetCharTitleId(), qinfo->GetCharTitleId());
qinfo->RewardTitleId = 0;
// quest can't reward this title
@@ -3992,20 +3992,20 @@ void ObjectMgr::LoadQuests()
{
if (!sObjectMgr->GetItemTemplate(qinfo->SourceItemId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SourceItemId` = %u but item with entry %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SourceItemId` = %u but item with entry %u does not exist, quest can't be done.",
qinfo->GetQuestId(), qinfo->SourceItemId, qinfo->SourceItemId);
qinfo->SourceItemId = 0; // quest can't be done for this requirement
}
else if (qinfo->SourceItemIdCount == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SourceItemId` = %u but `SourceItemIdCount` = 0, set to 1 but need fix in DB.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SourceItemId` = %u but `SourceItemIdCount` = 0, set to 1 but need fix in DB.",
qinfo->GetQuestId(), qinfo->SourceItemId);
qinfo->SourceItemIdCount = 1; // update to 1 for allow quest work for backward compatibility with DB
}
}
else if (qinfo->SourceItemIdCount>0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SourceItemId` = 0 but `SourceItemIdCount` = %u, useless value.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SourceItemId` = 0 but `SourceItemIdCount` = %u, useless value.",
qinfo->GetQuestId(), qinfo->SourceItemIdCount);
qinfo->SourceItemIdCount=0; // no quest work changes in fact
}
@@ -4015,13 +4015,13 @@ void ObjectMgr::LoadQuests()
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(qinfo->SourceSpellid);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SourceSpellid` = %u but spell %u doesn't exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SourceSpellid` = %u but spell %u doesn't exist, quest can't be done.",
qinfo->GetQuestId(), qinfo->SourceSpellid, qinfo->SourceSpellid);
qinfo->SourceSpellid = 0; // quest can't be done for this requirement
}
else if (!SpellMgr::IsSpellValid(spellInfo))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SourceSpellid` = %u but spell %u is broken, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SourceSpellid` = %u but spell %u is broken, quest can't be done.",
qinfo->GetQuestId(), qinfo->SourceSpellid, qinfo->SourceSpellid);
qinfo->SourceSpellid = 0; // quest can't be done for this requirement
}
@@ -4034,7 +4034,7 @@ void ObjectMgr::LoadQuests()
{
if (qinfo->RequiredItemCount[j] == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredItemId%d` = %u but `RequiredItemCount%d` = 0, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredItemId%d` = %u but `RequiredItemCount%d` = 0, quest can't be done.",
qinfo->GetQuestId(), j+1, id, j+1);
// no changes, quest can't be done for this requirement
}
@@ -4043,14 +4043,14 @@ void ObjectMgr::LoadQuests()
if (!sObjectMgr->GetItemTemplate(id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredItemId%d` = %u but item with entry %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredItemId%d` = %u but item with entry %u does not exist, quest can't be done.",
qinfo->GetQuestId(), j+1, id, id);
qinfo->RequiredItemCount[j] = 0; // prevent incorrect work of quest
}
}
else if (qinfo->RequiredItemCount[j]>0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredItemId%d` = 0 but `RequiredItemCount%d` = %u, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredItemId%d` = 0 but `RequiredItemCount%d` = %u, quest can't be done.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredItemCount[j]);
qinfo->RequiredItemCount[j] = 0; // prevent incorrect work of quest
}
@@ -4063,7 +4063,7 @@ void ObjectMgr::LoadQuests()
{
if (!sObjectMgr->GetItemTemplate(id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredSourceItemId%d` = %u but item with entry %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredSourceItemId%d` = %u but item with entry %u does not exist, quest can't be done.",
qinfo->GetQuestId(), j+1, id, id);
// no changes, quest can't be done for this requirement
}
@@ -4072,7 +4072,7 @@ void ObjectMgr::LoadQuests()
{
if (qinfo->RequiredSourceItemCount[j]>0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredSourceItemId%d` = 0 but `RequiredSourceItemCount%d` = %u.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredSourceItemId%d` = 0 but `RequiredSourceItemCount%d` = %u.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredSourceItemCount[j]);
// no changes, quest ignore this data
}
@@ -4084,14 +4084,14 @@ void ObjectMgr::LoadQuests()
int32 id = qinfo->RequiredNpcOrGo[j];
if (id < 0 && !sObjectMgr->GetGameObjectTemplate(-id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = %i but gameobject %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredNpcOrGo%d` = %i but gameobject %u does not exist, quest can't be done.",
qinfo->GetQuestId(), j+1, id, uint32(-id));
qinfo->RequiredNpcOrGo[j] = 0; // quest can't be done for this requirement
}
if (id > 0 && !sObjectMgr->GetCreatureTemplate(id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = %i but creature with entry %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredNpcOrGo%d` = %i but creature with entry %u does not exist, quest can't be done.",
qinfo->GetQuestId(), j+1, id, uint32(id));
qinfo->RequiredNpcOrGo[j] = 0; // quest can't be done for this requirement
}
@@ -4104,14 +4104,14 @@ void ObjectMgr::LoadQuests()
if (!qinfo->RequiredNpcOrGoCount[j])
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = %u but `RequiredNpcOrGoCount%d` = 0, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredNpcOrGo%d` = %u but `RequiredNpcOrGoCount%d` = 0, quest can't be done.",
qinfo->GetQuestId(), j+1, id, j+1);
// no changes, quest can be incorrectly done, but we already report this
}
}
else if (qinfo->RequiredNpcOrGoCount[j]>0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredNpcOrGo%d` = 0 but `RequiredNpcOrGoCount%d` = %u.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredNpcOrGo%d` = 0 but `RequiredNpcOrGoCount%d` = %u.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredNpcOrGoCount[j]);
// no changes, quest ignore this data
}
@@ -4124,21 +4124,21 @@ void ObjectMgr::LoadQuests()
{
if (!sObjectMgr->GetItemTemplate(id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardChoiceItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.",
qinfo->GetQuestId(), j+1, id, id);
qinfo->RewardChoiceItemId[j] = 0; // no changes, quest will not reward this
}
if (!qinfo->RewardChoiceItemCount[j])
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = %u but `RewardChoiceItemCount%d` = 0, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardChoiceItemId%d` = %u but `RewardChoiceItemCount%d` = 0, quest can't be done.",
qinfo->GetQuestId(), j+1, id, j+1);
// no changes, quest can't be done
}
}
else if (qinfo->RewardChoiceItemCount[j]>0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardChoiceItemId%d` = 0 but `RewardChoiceItemCount%d` = %u.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardChoiceItemId%d` = 0 but `RewardChoiceItemCount%d` = %u.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RewardChoiceItemCount[j]);
// no changes, quest ignore this data
}
@@ -4151,21 +4151,21 @@ void ObjectMgr::LoadQuests()
{
if (!sObjectMgr->GetItemTemplate(id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardItemId%d` = %u but item with entry %u does not exist, quest will not reward this item.",
qinfo->GetQuestId(), j+1, id, id);
qinfo->RewardItemId[j] = 0; // no changes, quest will not reward this item
}
if (!qinfo->RewardItemIdCount[j])
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardItemId%d` = %u but `RewardItemIdCount%d` = 0, quest will not reward this item.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardItemId%d` = %u but `RewardItemIdCount%d` = 0, quest will not reward this item.",
qinfo->GetQuestId(), j+1, id, j+1);
// no changes
}
}
else if (qinfo->RewardItemIdCount[j]>0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardItemId%d` = 0 but `RewardItemIdCount%d` = %u.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardItemId%d` = 0 but `RewardItemIdCount%d` = %u.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RewardItemIdCount[j]);
// no changes, quest ignore this data
}
@@ -4177,18 +4177,18 @@ void ObjectMgr::LoadQuests()
{
if (abs(qinfo->RewardFactionValueId[j]) > 9)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has RewardFactionValueId%d = %i. That is outside the range of valid values (-9 to 9).", qinfo->GetQuestId(), j+1, qinfo->RewardFactionValueId[j]);
+ TC_LOG_ERROR("sql.sql", "Quest %u has RewardFactionValueId%d = %i. That is outside the range of valid values (-9 to 9).", qinfo->GetQuestId(), j+1, qinfo->RewardFactionValueId[j]);
}
if (!sFactionStore.LookupEntry(qinfo->RewardFactionId[j]))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardFactionId%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(), j+1, qinfo->RewardFactionId[j], qinfo->RewardFactionId[j]);
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardFactionId%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(), j+1, qinfo->RewardFactionId[j], qinfo->RewardFactionId[j]);
qinfo->RewardFactionId[j] = 0; // quest will not reward this
}
}
else if (qinfo->RewardFactionValueIdOverride[j] != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardFactionId%d` = 0 but `RewardFactionValueIdOverride%d` = %i.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardFactionId%d` = 0 but `RewardFactionValueIdOverride%d` = %i.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RewardFactionValueIdOverride[j]);
// no changes, quest ignore this data
}
@@ -4200,21 +4200,21 @@ void ObjectMgr::LoadQuests()
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u does not exist, spell removed as display reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSpell` = %u but spell %u does not exist, spell removed as display reward.",
qinfo->GetQuestId(), qinfo->RewardSpell, qinfo->RewardSpell);
qinfo->RewardSpell = 0; // no spell reward will display for this quest
}
else if (!SpellMgr::IsSpellValid(spellInfo))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u is broken, quest will not have a spell reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSpell` = %u but spell %u is broken, quest will not have a spell reward.",
qinfo->GetQuestId(), qinfo->RewardSpell, qinfo->RewardSpell);
qinfo->RewardSpell = 0; // no spell reward will display for this quest
}
else if (GetTalentSpellCost(qinfo->RewardSpell))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.",
qinfo->GetQuestId(), qinfo->RewardSpell, qinfo->RewardSpell);
qinfo->RewardSpell = 0; // no spell reward will display for this quest
}
@@ -4226,21 +4226,21 @@ void ObjectMgr::LoadQuests()
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSpellCast` = %u but spell %u does not exist, quest will not have a spell reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSpellCast` = %u but spell %u does not exist, quest will not have a spell reward.",
qinfo->GetQuestId(), qinfo->RewardSpellCast, qinfo->RewardSpellCast);
qinfo->RewardSpellCast = 0; // no spell will be casted on player
}
else if (!SpellMgr::IsSpellValid(spellInfo))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSpellCast` = %u but spell %u is broken, quest will not have a spell reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSpellCast` = %u but spell %u is broken, quest will not have a spell reward.",
qinfo->GetQuestId(), qinfo->RewardSpellCast, qinfo->RewardSpellCast);
qinfo->RewardSpellCast = 0; // no spell will be casted on player
}
else if (GetTalentSpellCost(qinfo->RewardSpellCast))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSpell` = %u but spell %u is talent, quest will not have a spell reward.",
qinfo->GetQuestId(), qinfo->RewardSpellCast, qinfo->RewardSpellCast);
qinfo->RewardSpellCast = 0; // no spell will be casted on player
}
@@ -4250,7 +4250,7 @@ void ObjectMgr::LoadQuests()
{
if (!sMailTemplateStore.LookupEntry(qinfo->RewardMailTemplateId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardMailTemplateId` = %u but mail template %u does not exist, quest will not have a mail reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardMailTemplateId` = %u but mail template %u does not exist, quest will not have a mail reward.",
qinfo->GetQuestId(), qinfo->RewardMailTemplateId, qinfo->RewardMailTemplateId);
qinfo->RewardMailTemplateId = 0; // no mail will send to player
qinfo->RewardMailDelay = 0; // no mail will send to player
@@ -4258,7 +4258,7 @@ void ObjectMgr::LoadQuests()
else if (usedMailTemplates.find(qinfo->RewardMailTemplateId) != usedMailTemplates.end())
{
std::map<uint32, uint32>::const_iterator used_mt_itr = usedMailTemplates.find(qinfo->RewardMailTemplateId);
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardMailTemplateId` = %u but mail template %u already used for quest %u, quest will not have a mail reward.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardMailTemplateId` = %u but mail template %u already used for quest %u, quest will not have a mail reward.",
qinfo->GetQuestId(), qinfo->RewardMailTemplateId, qinfo->RewardMailTemplateId, used_mt_itr->second);
qinfo->RewardMailTemplateId = 0; // no mail will send to player
qinfo->RewardMailDelay = 0; // no mail will send to player
@@ -4272,7 +4272,7 @@ void ObjectMgr::LoadQuests()
QuestMap::iterator qNextItr = _questTemplates.find(qinfo->NextQuestIdChain);
if (qNextItr == _questTemplates.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `NextQuestIdChain` = %u but quest %u does not exist, quest chain will not work.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `NextQuestIdChain` = %u but quest %u does not exist, quest chain will not work.",
qinfo->GetQuestId(), qinfo->NextQuestIdChain, qinfo->NextQuestIdChain);
qinfo->NextQuestIdChain = 0;
}
@@ -4285,7 +4285,7 @@ void ObjectMgr::LoadQuests()
{
if (_questTemplates.find(abs(qinfo->GetPrevQuestId())) == _questTemplates.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId());
+ TC_LOG_ERROR("sql.sql", "Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId());
}
else
{
@@ -4298,7 +4298,7 @@ void ObjectMgr::LoadQuests()
QuestMap::iterator qNextItr = _questTemplates.find(abs(qinfo->GetNextQuestId()));
if (qNextItr == _questTemplates.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
+ TC_LOG_ERROR("sql.sql", "Quest %d has NextQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetNextQuestId());
}
else
{
@@ -4337,7 +4337,7 @@ void ObjectMgr::LoadQuests()
if (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u, but quest not have flag QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT. Quest flags must be fixed, quest modified to enable objective.", spellInfo->Id, quest_id);
+ TC_LOG_ERROR("sql.sql", "Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE for quest %u, but quest not have flag QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT. Quest flags must be fixed, quest modified to enable objective.", spellInfo->Id, quest_id);
// this will prevent quest completing without objective
const_cast<Quest*>(quest)->SetSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT);
@@ -4345,7 +4345,7 @@ void ObjectMgr::LoadQuests()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadQuestLocales()
@@ -4393,7 +4393,7 @@ void ObjectMgr::LoadQuestLocales()
}
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu Quest locale strings in %u ms", (unsigned long)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadScripts(ScriptsType type)
@@ -4411,7 +4411,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
if (sScriptMgr->IsScriptScheduled()) // function cannot be called when scripts are in use.
return;
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading %s...", tableName.c_str());
+ TC_LOG_INFO("server.loading", "Loading %s...", tableName.c_str());
scripts->clear(); // need for reload support
@@ -4421,7 +4421,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str());
+ TC_LOG_INFO("server.loading", ">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str());
return;
}
@@ -4452,19 +4452,19 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (tmp.Talk.ChatType > CHAT_TYPE_WHISPER && tmp.Talk.ChatType != CHAT_MSG_RAID_BOSS_WHISPER)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid talk type (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid talk type (datalong = %u) in SCRIPT_COMMAND_TALK for script id %u",
tableName.c_str(), tmp.Talk.ChatType, tmp.id);
continue;
}
if (!tmp.Talk.TextID)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid talk text id (dataint = %i) in SCRIPT_COMMAND_TALK for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid talk text id (dataint = %i) in SCRIPT_COMMAND_TALK for script id %u",
tableName.c_str(), tmp.Talk.TextID, tmp.id);
continue;
}
if (tmp.Talk.TextID < MIN_DB_SCRIPT_STRING_ID || tmp.Talk.TextID >= MAX_DB_SCRIPT_STRING_ID)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has out of range text id (dataint = %i expected %u-%u) in SCRIPT_COMMAND_TALK for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has out of range text id (dataint = %i expected %u-%u) in SCRIPT_COMMAND_TALK for script id %u",
tableName.c_str(), tmp.Talk.TextID, MIN_DB_SCRIPT_STRING_ID, MAX_DB_SCRIPT_STRING_ID, tmp.id);
continue;
}
@@ -4476,7 +4476,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (!sEmotesStore.LookupEntry(tmp.Emote.EmoteID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid emote id (datalong = %u) in SCRIPT_COMMAND_EMOTE for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid emote id (datalong = %u) in SCRIPT_COMMAND_EMOTE for script id %u",
tableName.c_str(), tmp.Emote.EmoteID, tmp.id);
continue;
}
@@ -4487,14 +4487,14 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (!sMapStore.LookupEntry(tmp.TeleportTo.MapID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid map (Id: %u) in SCRIPT_COMMAND_TELEPORT_TO for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid map (Id: %u) in SCRIPT_COMMAND_TELEPORT_TO for script id %u",
tableName.c_str(), tmp.TeleportTo.MapID, tmp.id);
continue;
}
if (!Trinity::IsValidMapCoord(tmp.TeleportTo.DestX, tmp.TeleportTo.DestY, tmp.TeleportTo.DestZ, tmp.TeleportTo.Orientation))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TELEPORT_TO for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TELEPORT_TO for script id %u",
tableName.c_str(), tmp.TeleportTo.DestX, tmp.TeleportTo.DestY, tmp.TeleportTo.DestZ, tmp.TeleportTo.Orientation, tmp.id);
continue;
}
@@ -4506,14 +4506,14 @@ void ObjectMgr::LoadScripts(ScriptsType type)
Quest const* quest = GetQuestTemplate(tmp.QuestExplored.QuestID);
if (!quest)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u",
tableName.c_str(), tmp.QuestExplored.QuestID, tmp.id);
continue;
}
if (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, but quest not have flag QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT in quest flags. Script command or quest flags wrong. Quest modified to require objective.",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has quest (ID: %u) in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, but quest not have flag QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT in quest flags. Script command or quest flags wrong. Quest modified to require objective.",
tableName.c_str(), tmp.QuestExplored.QuestID, tmp.id);
// this will prevent quest completing without objective
@@ -4524,21 +4524,21 @@ void ObjectMgr::LoadScripts(ScriptsType type)
if (float(tmp.QuestExplored.Distance) > DEFAULT_VISIBILITY_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u",
tableName.c_str(), tmp.QuestExplored.Distance, tmp.id);
continue;
}
if (tmp.QuestExplored.Distance && float(tmp.QuestExplored.Distance) > DEFAULT_VISIBILITY_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, max distance is %f or 0 for disable distance check",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has too large distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, max distance is %f or 0 for disable distance check",
tableName.c_str(), tmp.QuestExplored.Distance, tmp.id, DEFAULT_VISIBILITY_DISTANCE);
continue;
}
if (tmp.QuestExplored.Distance && float(tmp.QuestExplored.Distance) < INTERACTION_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has too small distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, min distance is %f or 0 for disable distance check",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has too small distance (%u) for exploring objective complete in `datalong2` in SCRIPT_COMMAND_QUEST_EXPLORED in `datalong` for script id %u, min distance is %f or 0 for disable distance check",
tableName.c_str(), tmp.QuestExplored.Distance, tmp.id, INTERACTION_DISTANCE);
continue;
}
@@ -4550,7 +4550,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (!GetCreatureTemplate(tmp.KillCredit.CreatureEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_KILL_CREDIT for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_KILL_CREDIT for script id %u",
tableName.c_str(), tmp.KillCredit.CreatureEntry, tmp.id);
continue;
}
@@ -4562,7 +4562,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
GameObjectData const* data = GetGOData(tmp.RespawnGameobject.GOGuid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid gameobject (GUID: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid gameobject (GUID: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u",
tableName.c_str(), tmp.RespawnGameobject.GOGuid, tmp.id);
continue;
}
@@ -4570,7 +4570,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
GameObjectTemplate const* info = GetGameObjectTemplate(data->id);
if (!info)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u",
tableName.c_str(), tmp.RespawnGameobject.GOGuid, data->id, tmp.id);
continue;
}
@@ -4581,7 +4581,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
info->type == GAMEOBJECT_TYPE_BUTTON ||
info->type == GAMEOBJECT_TYPE_TRAP)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` have gameobject type (%u) unsupported by command SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` have gameobject type (%u) unsupported by command SCRIPT_COMMAND_RESPAWN_GAMEOBJECT for script id %u",
tableName.c_str(), info->entry, tmp.id);
continue;
}
@@ -4592,14 +4592,14 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (!Trinity::IsValidMapCoord(tmp.TempSummonCreature.PosX, tmp.TempSummonCreature.PosY, tmp.TempSummonCreature.PosZ, tmp.TempSummonCreature.Orientation))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid coordinates (X: %f Y: %f Z: %f O: %f) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u",
tableName.c_str(), tmp.TempSummonCreature.PosX, tmp.TempSummonCreature.PosY, tmp.TempSummonCreature.PosZ, tmp.TempSummonCreature.Orientation, tmp.id);
continue;
}
if (!GetCreatureTemplate(tmp.TempSummonCreature.CreatureEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid creature (Entry: %u) in SCRIPT_COMMAND_TEMP_SUMMON_CREATURE for script id %u",
tableName.c_str(), tmp.TempSummonCreature.CreatureEntry, tmp.id);
continue;
}
@@ -4612,7 +4612,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
GameObjectData const* data = GetGOData(tmp.ToggleDoor.GOGuid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has invalid gameobject (GUID: %u) in %s for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has invalid gameobject (GUID: %u) in %s for script id %u",
tableName.c_str(), tmp.ToggleDoor.GOGuid, GetScriptCommandName(tmp.command).c_str(), tmp.id);
continue;
}
@@ -4620,14 +4620,14 @@ void ObjectMgr::LoadScripts(ScriptsType type)
GameObjectTemplate const* info = GetGameObjectTemplate(data->id);
if (!info)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in %s for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has gameobject with invalid entry (GUID: %u Entry: %u) in %s for script id %u",
tableName.c_str(), tmp.ToggleDoor.GOGuid, data->id, GetScriptCommandName(tmp.command).c_str(), tmp.id);
continue;
}
if (info->type != GAMEOBJECT_TYPE_DOOR)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has gameobject type (%u) non supported by command %s for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has gameobject type (%u) non supported by command %s for script id %u",
tableName.c_str(), info->entry, GetScriptCommandName(tmp.command).c_str(), tmp.id);
continue;
}
@@ -4639,13 +4639,13 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (!sSpellMgr->GetSpellInfo(tmp.RemoveAura.SpellID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u",
tableName.c_str(), tmp.RemoveAura.SpellID, tmp.id);
continue;
}
if (tmp.RemoveAura.Flags & ~0x1) // 1 bits (0, 1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` using unknown flags in datalong2 (%u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` using unknown flags in datalong2 (%u) in SCRIPT_COMMAND_REMOVE_AURA for script id %u",
tableName.c_str(), tmp.RemoveAura.Flags, tmp.id);
continue;
}
@@ -4656,25 +4656,25 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (!sSpellMgr->GetSpellInfo(tmp.CastSpell.SpellID))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` using non-existent spell (id: %u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tableName.c_str(), tmp.CastSpell.SpellID, tmp.id);
continue;
}
if (tmp.CastSpell.Flags > 4) // targeting type
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` using unknown target in datalong2 (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` using unknown target in datalong2 (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tableName.c_str(), tmp.CastSpell.Flags, tmp.id);
continue;
}
if (tmp.CastSpell.Flags != 4 && tmp.CastSpell.CreatureEntry & ~0x1) // 1 bit (0, 1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` using unknown flags in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` using unknown flags in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tableName.c_str(), tmp.CastSpell.CreatureEntry, tmp.id);
continue;
}
else if (tmp.CastSpell.Flags == 4 && !GetCreatureTemplate(tmp.CastSpell.CreatureEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` using invalid creature entry in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` using invalid creature entry in dataint (%u) in SCRIPT_COMMAND_CAST_SPELL for script id %u",
tableName.c_str(), tmp.CastSpell.CreatureEntry, tmp.id);
continue;
}
@@ -4685,13 +4685,13 @@ void ObjectMgr::LoadScripts(ScriptsType type)
{
if (!GetItemTemplate(tmp.CreateItem.ItemEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` has nonexistent item (entry: %u) in SCRIPT_COMMAND_CREATE_ITEM for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` has nonexistent item (entry: %u) in SCRIPT_COMMAND_CREATE_ITEM for script id %u",
tableName.c_str(), tmp.CreateItem.ItemEntry, tmp.id);
continue;
}
if (!tmp.CreateItem.Amount)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` SCRIPT_COMMAND_CREATE_ITEM but amount is %u for script id %u",
+ TC_LOG_ERROR("sql.sql", "Table `%s` SCRIPT_COMMAND_CREATE_ITEM but amount is %u for script id %u",
tableName.c_str(), tmp.CreateItem.Amount, tmp.id);
continue;
}
@@ -4712,7 +4712,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadSpellScripts()
@@ -4727,14 +4727,14 @@ void ObjectMgr::LoadSpellScripts()
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `spell_scripts` has not existing spell (Id: %u) as script id", spellId);
+ TC_LOG_ERROR("sql.sql", "Table `spell_scripts` has not existing spell (Id: %u) as script id", spellId);
continue;
}
uint8 i = (uint8)((uint32(itr->first) >> 24) & 0x000000FF);
//check for correct spellEffect
if (!spellInfo->Effects[i].Effect || (spellInfo->Effects[i].Effect != SPELL_EFFECT_SCRIPT_EFFECT && spellInfo->Effects[i].Effect != SPELL_EFFECT_DUMMY))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `spell_scripts` - spell %u effect %u is not SPELL_EFFECT_SCRIPT_EFFECT or SPELL_EFFECT_DUMMY", spellId, i);
+ TC_LOG_ERROR("sql.sql", "Table `spell_scripts` - spell %u effect %u is not SPELL_EFFECT_SCRIPT_EFFECT or SPELL_EFFECT_DUMMY", spellId, i);
}
}
@@ -4776,7 +4776,7 @@ void ObjectMgr::LoadEventScripts()
{
std::set<uint32>::const_iterator itr2 = evt_scripts.find(itr->first);
if (itr2 == evt_scripts.end())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `event_scripts` has script (Id: %u) not referring to any gameobject_template type 10 data2 field, type 3 data6 field, type 13 data 2 field or any spell effect %u",
+ TC_LOG_ERROR("sql.sql", "Table `event_scripts` has script (Id: %u) not referring to any gameobject_template type 10 data2 field, type 3 data6 field, type 13 data 2 field or any spell effect %u",
itr->first, SPELL_EFFECT_SEND_EVENT);
}
}
@@ -4807,7 +4807,7 @@ void ObjectMgr::LoadWaypointScripts()
}
for (std::set<uint32>::iterator itr = actionSet.begin(); itr != actionSet.end(); ++itr)
- TC_LOG_ERROR(LOG_FILTER_SQL, "There is no waypoint which links to the waypoint script %u", *itr);
+ TC_LOG_ERROR("sql.sql", "There is no waypoint which links to the waypoint script %u", *itr);
}
void ObjectMgr::LoadSpellScriptNames()
@@ -4820,7 +4820,7 @@ void ObjectMgr::LoadSpellScriptNames()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!");
return;
}
@@ -4844,18 +4844,18 @@ void ObjectMgr::LoadSpellScriptNames()
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Scriptname: `%s` spell (Id: %d) does not exist.", scriptName, spellId);
+ TC_LOG_ERROR("sql.sql", "Scriptname: `%s` spell (Id: %d) does not exist.", scriptName, spellId);
continue;
}
if (allRanks)
{
if (!spellInfo->IsRanked())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Scriptname: `%s` spell (Id: %d) has no ranks of spell.", scriptName, fields[0].GetInt32());
+ TC_LOG_ERROR("sql.sql", "Scriptname: `%s` spell (Id: %d) has no ranks of spell.", scriptName, fields[0].GetInt32());
if (spellInfo->GetFirstRankSpell()->Id != uint32(spellId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Scriptname: `%s` spell (Id: %d) is not first rank of spell.", scriptName, fields[0].GetInt32());
+ TC_LOG_ERROR("sql.sql", "Scriptname: `%s` spell (Id: %d) is not first rank of spell.", scriptName, fields[0].GetInt32());
continue;
}
@@ -4868,7 +4868,7 @@ void ObjectMgr::LoadSpellScriptNames()
else
{
if (spellInfo->IsRanked())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Scriptname: `%s` spell (Id: %d) is ranked spell. Perhaps not all ranks are assigned to this script.", scriptName, spellId);
+ TC_LOG_ERROR("sql.sql", "Scriptname: `%s` spell (Id: %d) is ranked spell. Perhaps not all ranks are assigned to this script.", scriptName, spellId);
_spellScriptsStore.insert(SpellScriptsContainer::value_type(spellInfo->Id, GetScriptId(scriptName)));
}
@@ -4877,7 +4877,7 @@ void ObjectMgr::LoadSpellScriptNames()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::ValidateSpellScripts()
@@ -4886,7 +4886,7 @@ void ObjectMgr::ValidateSpellScripts()
if (_spellScriptsStore.empty())
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Validated 0 scripts.");
+ TC_LOG_INFO("server.loading", ">> Validated 0 scripts.");
return;
}
@@ -4906,7 +4906,7 @@ void ObjectMgr::ValidateSpellScripts()
bool valid = true;
if (!spellScript && !auraScript)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second));
+ TC_LOG_ERROR("scripts", "Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second));
valid = false;
}
if (spellScript)
@@ -4933,7 +4933,7 @@ void ObjectMgr::ValidateSpellScripts()
++count;
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadPageTexts()
@@ -4945,7 +4945,7 @@ void ObjectMgr::LoadPageTexts()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 page texts. DB table `page_text` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 page texts. DB table `page_text` is empty!");
return;
}
@@ -4969,12 +4969,12 @@ void ObjectMgr::LoadPageTexts()
{
PageTextContainer::const_iterator itr2 = _pageTextStore.find(itr->second.NextPage);
if (itr2 == _pageTextStore.end())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage);
+ TC_LOG_ERROR("sql.sql", "Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage);
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
PageText const* ObjectMgr::GetPageText(uint32 pageEntry)
@@ -5009,7 +5009,7 @@ void ObjectMgr::LoadPageTextLocales()
AddLocaleString(fields[i].GetString(), LocaleConstant(i), data.Text);
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu PageText locale strings in %u ms", (unsigned long)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadInstanceTemplate()
@@ -5021,7 +5021,7 @@ void ObjectMgr::LoadInstanceTemplate()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 instance templates. DB table `page_text` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 instance templates. DB table `page_text` is empty!");
return;
}
@@ -5034,7 +5034,7 @@ void ObjectMgr::LoadInstanceTemplate()
if (!MapManager::IsValidMAP(mapID, true))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "ObjectMgr::LoadInstanceTemplate: bad mapid %d for template!", mapID);
+ TC_LOG_ERROR("sql.sql", "ObjectMgr::LoadInstanceTemplate: bad mapid %d for template!", mapID);
continue;
}
@@ -5050,7 +5050,7 @@ void ObjectMgr::LoadInstanceTemplate()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID)
@@ -5070,7 +5070,7 @@ void ObjectMgr::LoadInstanceEncounters()
QueryResult result = WorldDatabase.Query("SELECT entry, creditType, creditEntry, lastEncounterDungeon FROM instance_encounters");
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 instance encounters, table is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 instance encounters, table is empty!");
return;
}
@@ -5086,13 +5086,13 @@ void ObjectMgr::LoadInstanceEncounters()
DungeonEncounterEntry const* dungeonEncounter = sDungeonEncounterStore.LookupEntry(entry);
if (!dungeonEncounter)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid encounter id %u, skipped!", entry);
+ TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid encounter id %u, skipped!", entry);
continue;
}
if (lastEncounterDungeon && !sLFGMgr->GetLFGDungeonEntry(lastEncounterDungeon))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->encounterName[0], lastEncounterDungeon);
+ TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an encounter %u (%s) marked as final for invalid dungeon id %u, skipped!", entry, dungeonEncounter->encounterName[0], lastEncounterDungeon);
continue;
}
@@ -5101,7 +5101,7 @@ void ObjectMgr::LoadInstanceEncounters()
{
if (itr != dungeonLastBosses.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->encounterName[0], itr->second->id, itr->second->encounterName[0]);
+ TC_LOG_ERROR("sql.sql", "Table `instance_encounters` specified encounter %u (%s) as last encounter but %u (%s) is already marked as one, skipped!", entry, dungeonEncounter->encounterName[0], itr->second->id, itr->second->encounterName[0]);
continue;
}
@@ -5115,7 +5115,7 @@ void ObjectMgr::LoadInstanceEncounters()
CreatureTemplate const* creatureInfo = GetCreatureTemplate(creditEntry);
if (!creatureInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]);
+ TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid creature (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]);
continue;
}
const_cast<CreatureTemplate*>(creatureInfo)->flags_extra |= CREATURE_FLAG_EXTRA_DUNGEON_BOSS;
@@ -5124,12 +5124,12 @@ void ObjectMgr::LoadInstanceEncounters()
case ENCOUNTER_CREDIT_CAST_SPELL:
if (!sSpellMgr->GetSpellInfo(creditEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]);
+ TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid spell (entry %u) linked to the encounter %u (%s), skipped!", creditEntry, entry, dungeonEncounter->encounterName[0]);
continue;
}
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName[0]);
+ TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName[0]);
continue;
}
@@ -5138,7 +5138,7 @@ void ObjectMgr::LoadInstanceEncounters()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const
@@ -5158,7 +5158,7 @@ void ObjectMgr::LoadGossipText()
int count = 0;
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u npc texts", count);
+ TC_LOG_INFO("server.loading", ">> Loaded %u npc texts", count);
return;
}
_gossipTextStore.rehash(result->GetRowCount());
@@ -5175,7 +5175,7 @@ void ObjectMgr::LoadGossipText()
uint32 Text_ID = fields[cic++].GetUInt32();
if (!Text_ID)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_text` has record wit reserved id 0, ignore.");
+ TC_LOG_ERROR("sql.sql", "Table `npc_text` has record wit reserved id 0, ignore.");
continue;
}
@@ -5197,7 +5197,7 @@ void ObjectMgr::LoadGossipText()
}
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadNpcTextLocales()
@@ -5239,7 +5239,7 @@ void ObjectMgr::LoadNpcTextLocales()
}
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu NpcText locale strings in %u ms", (unsigned long)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
//not very fast function but it is called only once a day, or on starting-up
@@ -5251,7 +5251,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
tm lt;
ACE_OS::localtime_r(&curTime, &lt);
uint64 basetime(curTime);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Returning mails current time: hour: %d, minute: %d, second: %d ", lt.tm_hour, lt.tm_min, lt.tm_sec);
+ TC_LOG_INFO("misc", "Returning mails current time: hour: %d, minute: %d, second: %d ", lt.tm_hour, lt.tm_min, lt.tm_sec);
// Delete all old mails without item and without body immediately, if starting server
if (!serverUp)
@@ -5265,7 +5265,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> No expired mails found.");
+ TC_LOG_INFO("server.loading", ">> No expired mails found.");
return; // any mails need to be returned or deleted
}
@@ -5368,7 +5368,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadQuestAreaTriggers()
@@ -5381,7 +5381,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty.");
return;
}
@@ -5399,7 +5399,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(trigger_ID);
if (!atEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", trigger_ID);
+ TC_LOG_ERROR("sql.sql", "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", trigger_ID);
continue;
}
@@ -5407,13 +5407,13 @@ void ObjectMgr::LoadQuestAreaTriggers()
if (!quest)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `areatrigger_involvedrelation` has record (id: %u) for not existing quest %u", trigger_ID, quest_ID);
+ TC_LOG_ERROR("sql.sql", "Table `areatrigger_involvedrelation` has record (id: %u) for not existing quest %u", trigger_ID, quest_ID);
continue;
}
if (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `areatrigger_involvedrelation` has record (id: %u) for not quest %u, but quest not have flag QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT. Trigger or quest flags must be fixed, quest modified to require objective.", trigger_ID, quest_ID);
+ TC_LOG_ERROR("sql.sql", "Table `areatrigger_involvedrelation` has record (id: %u) for not quest %u, but quest not have flag QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT. Trigger or quest flags must be fixed, quest modified to require objective.", trigger_ID, quest_ID);
// this will prevent quest completing without objective
const_cast<Quest*>(quest)->SetSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT);
@@ -5425,7 +5425,7 @@ void ObjectMgr::LoadQuestAreaTriggers()
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadTavernAreaTriggers()
@@ -5438,7 +5438,7 @@ void ObjectMgr::LoadTavernAreaTriggers()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty.");
return;
}
@@ -5455,14 +5455,14 @@ void ObjectMgr::LoadTavernAreaTriggers()
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if (!atEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
+ TC_LOG_ERROR("sql.sql", "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
continue;
}
_tavernAreaTriggerStore.insert(Trigger_ID);
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadAreaTriggerScripts()
@@ -5474,7 +5474,7 @@ void ObjectMgr::LoadAreaTriggerScripts()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty.");
return;
}
@@ -5492,13 +5492,13 @@ void ObjectMgr::LoadAreaTriggerScripts()
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if (!atEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
+ TC_LOG_ERROR("sql.sql", "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
continue;
}
_areaTriggerScriptStore[Trigger_ID] = GetScriptId(scriptName);
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 team)
@@ -5593,7 +5593,7 @@ uint32 ObjectMgr::GetTaxiMountDisplayId(uint32 id, uint32 team, bool allowed_alt
mount_id = mount_info->GetRandomValidModelId();
if (!mount_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "No displayid found for the taxi mount with the entry %u! Can't load it!", mount_entry);
+ TC_LOG_ERROR("sql.sql", "No displayid found for the taxi mount with the entry %u! Can't load it!", mount_entry);
return 0;
}
}
@@ -5616,7 +5616,7 @@ void ObjectMgr::LoadGraveyardZones()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 graveyard-zone links. DB table `game_graveyard_zone` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 graveyard-zone links. DB table `game_graveyard_zone` is empty.");
return;
}
@@ -5635,34 +5635,34 @@ void ObjectMgr::LoadGraveyardZones()
WorldSafeLocsEntry const* entry = sWorldSafeLocsStore.LookupEntry(safeLocId);
if (!entry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", safeLocId);
+ TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", safeLocId);
continue;
}
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(zoneId);
if (!areaEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId);
+ TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId);
continue;
}
if (areaEntry->zone != 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for subzone id (%u) instead of zone, skipped.", zoneId);
+ TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for subzone id (%u) instead of zone, skipped.", zoneId);
continue;
}
if (team != 0 && team != HORDE && team != ALLIANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a record for non player faction (%u), skipped.", team);
+ TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for non player faction (%u), skipped.", team);
continue;
}
if (!AddGraveYardLink(safeLocId, zoneId, team, false))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId);
+ TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId);
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
WorldSafeLocsEntry const* ObjectMgr::GetDefaultGraveYard(uint32 team)
@@ -5689,7 +5689,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
{
if (z > -500)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "ZoneId not found for map %u coords (%f, %f, %f)", MapId, x, y, z);
+ TC_LOG_ERROR("misc", "ZoneId not found for map %u coords (%f, %f, %f)", MapId, x, y, z);
return GetDefaultGraveYard(team);
}
}
@@ -5707,7 +5707,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
// not need to check validity of map object; MapId _MUST_ be valid here
if (range.first == range.second && !map->IsBattlegroundOrArena())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team);
+ TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team);
return GetDefaultGraveYard(team);
}
@@ -5733,7 +5733,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float
WorldSafeLocsEntry const* entry = sWorldSafeLocsStore.LookupEntry(data.safeLocId);
if (!entry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` has record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", data.safeLocId);
+ TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", data.safeLocId);
continue;
}
@@ -5848,7 +5848,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool
GraveYardMapBoundsNonConst range = GraveYardStore.equal_range(zoneId);
if (range.first == range.second)
{
- //TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team);
+ //TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team);
return;
}
@@ -5902,7 +5902,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty.");
return;
}
@@ -5927,20 +5927,20 @@ void ObjectMgr::LoadAreaTriggerTeleports()
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if (!atEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
+ TC_LOG_ERROR("sql.sql", "Area trigger (ID:%u) does not exist in `AreaTrigger.dbc`.", Trigger_ID);
continue;
}
MapEntry const* mapEntry = sMapStore.LookupEntry(at.target_mapId);
if (!mapEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Area trigger (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Trigger_ID, at.target_mapId);
+ TC_LOG_ERROR("sql.sql", "Area trigger (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Trigger_ID, at.target_mapId);
continue;
}
if (at.target_X == 0 && at.target_Y == 0 && at.target_Z == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Area trigger (ID:%u) target coordinates not provided.", Trigger_ID);
+ TC_LOG_ERROR("sql.sql", "Area trigger (ID:%u) target coordinates not provided.", Trigger_ID);
continue;
}
@@ -5948,7 +5948,7 @@ void ObjectMgr::LoadAreaTriggerTeleports()
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadAccessRequirements()
@@ -5967,7 +5967,7 @@ void ObjectMgr::LoadAccessRequirements()
QueryResult result = WorldDatabase.Query("SELECT mapid, difficulty, level_min, level_max, item, item2, quest_done_A, quest_done_H, completed_achievement, quest_failed_text FROM access_requirement");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 access requirement definitions. DB table `access_requirement` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 access requirement definitions. DB table `access_requirement` is empty.");
return;
}
@@ -5999,7 +5999,7 @@ void ObjectMgr::LoadAccessRequirements()
ItemTemplate const* pProto = GetItemTemplate(ar->item);
if (!pProto)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item, mapid, difficulty);
+ TC_LOG_ERROR("misc", "Key item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item, mapid, difficulty);
ar->item = 0;
}
}
@@ -6009,7 +6009,7 @@ void ObjectMgr::LoadAccessRequirements()
ItemTemplate const* pProto = GetItemTemplate(ar->item2);
if (!pProto)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item2, mapid, difficulty);
+ TC_LOG_ERROR("misc", "Second item %u does not exist for map %u difficulty %u, removing key requirement.", ar->item2, mapid, difficulty);
ar->item2 = 0;
}
}
@@ -6018,7 +6018,7 @@ void ObjectMgr::LoadAccessRequirements()
{
if (!GetQuestTemplate(ar->quest_A))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_A, mapid, difficulty);
+ TC_LOG_ERROR("sql.sql", "Required Alliance Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_A, mapid, difficulty);
ar->quest_A = 0;
}
}
@@ -6027,7 +6027,7 @@ void ObjectMgr::LoadAccessRequirements()
{
if (!GetQuestTemplate(ar->quest_H))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_H, mapid, difficulty);
+ TC_LOG_ERROR("sql.sql", "Required Horde Quest %u not exist for map %u difficulty %u, remove quest done requirement.", ar->quest_H, mapid, difficulty);
ar->quest_H = 0;
}
}
@@ -6036,7 +6036,7 @@ void ObjectMgr::LoadAccessRequirements()
{
if (!sAchievementMgr->GetAchievement(ar->achievement))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar->achievement, mapid, difficulty);
+ TC_LOG_ERROR("sql.sql", "Required Achievement %u not exist for map %u difficulty %u, remove quest done requirement.", ar->achievement, mapid, difficulty);
ar->achievement = 0;
}
}
@@ -6044,7 +6044,7 @@ void ObjectMgr::LoadAccessRequirements()
_accessRequirementStore[requirement_ID] = ar;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u access requirement definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
/*
@@ -6158,7 +6158,7 @@ uint32 ObjectMgr::GenerateAuctionID()
{
if (_auctionId >= 0xFFFFFFFE)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Auctions ids overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("misc", "Auctions ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return _auctionId++;
@@ -6168,7 +6168,7 @@ uint64 ObjectMgr::GenerateEquipmentSetGuid()
{
if (_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "EquipmentSet guid overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("misc", "EquipmentSet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return _equipmentSetGuid++;
@@ -6178,7 +6178,7 @@ uint32 ObjectMgr::GenerateMailID()
{
if (_mailId >= 0xFFFFFFFE)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Mail ids overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("misc", "Mail ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return _mailId++;
@@ -6268,7 +6268,7 @@ void ObjectMgr::LoadGameObjectLocales()
AddLocaleString(fields[i + (TOTAL_LOCALES - 1)].GetString(), LocaleConstant(i), data.CastBarCaption);
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu gameobject locale strings in %u ms", (unsigned long)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N)
@@ -6276,7 +6276,7 @@ inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32
if (sLockStore.LookupEntry(dataN))
return;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but lock (Id: %u) not found.",
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u GoType: %u) have data%d=%u but lock (Id: %u) not found.",
goInfo->entry, goInfo->type, N, goInfo->door.lockId, goInfo->door.lockId);
}
@@ -6285,7 +6285,7 @@ inline void CheckGOLinkedTrapId(GameObjectTemplate const* goInfo, uint32 dataN,
if (GameObjectTemplate const* trapInfo = sObjectMgr->GetGameObjectTemplate(dataN))
{
if (trapInfo->type != GAMEOBJECT_TYPE_TRAP)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but GO (Entry %u) have not GAMEOBJECT_TYPE_TRAP (%u) type.",
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u GoType: %u) have data%d=%u but GO (Entry %u) have not GAMEOBJECT_TYPE_TRAP (%u) type.",
goInfo->entry, goInfo->type, N, dataN, dataN, GAMEOBJECT_TYPE_TRAP);
}
}
@@ -6295,7 +6295,7 @@ inline void CheckGOSpellId(GameObjectTemplate const* goInfo, uint32 dataN, uint3
if (sSpellMgr->GetSpellInfo(dataN))
return;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but Spell (Entry %u) not exist.",
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u GoType: %u) have data%d=%u but Spell (Entry %u) not exist.",
goInfo->entry, goInfo->type, N, dataN, dataN);
}
@@ -6304,7 +6304,7 @@ inline void CheckAndFixGOChairHeightId(GameObjectTemplate const* goInfo, uint32
if (dataN <= (UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR))
return;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but correct chair height in range 0..%i.",
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u GoType: %u) have data%d=%u but correct chair height in range 0..%i.",
goInfo->entry, goInfo->type, N, dataN, UNIT_STAND_STATE_SIT_HIGH_CHAIR-UNIT_STAND_STATE_SIT_LOW_CHAIR);
// prevent client and server unexpected work
@@ -6317,7 +6317,7 @@ inline void CheckGONoDamageImmuneId(GameObjectTemplate* goTemplate, uint32 dataN
if (dataN <= 1)
return;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) noDamageImmune field value.", goTemplate->entry, goTemplate->type, N, dataN);
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) noDamageImmune field value.", goTemplate->entry, goTemplate->type, N, dataN);
}
inline void CheckGOConsumable(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N)
@@ -6326,7 +6326,7 @@ inline void CheckGOConsumable(GameObjectTemplate const* goInfo, uint32 dataN, ui
if (dataN <= 1)
return;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) consumable field value.",
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u GoType: %u) have data%d=%u but expected boolean (0/1) consumable field value.",
goInfo->entry, goInfo->type, N, dataN);
}
@@ -6344,7 +6344,7 @@ void ObjectMgr::LoadGameObjectTemplate()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty.");
return;
}
@@ -6428,7 +6428,7 @@ void ObjectMgr::LoadGameObjectTemplate()
if (got.spellFocus.focusId)
{
if (!sSpellFocusObjectStore.LookupEntry(got.spellFocus.focusId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "GameObject (Entry: %u GoType: %u) have data0=%u but SpellFocus (Id: %u) not exist.",
+ TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data0=%u but SpellFocus (Id: %u) not exist.",
entry, got.type, got.spellFocus.focusId, got.spellFocus.focusId);
}
@@ -6446,7 +6446,7 @@ void ObjectMgr::LoadGameObjectTemplate()
if (got.goober.pageId) // pageId
{
if (!GetPageText(got.goober.pageId))
- TC_LOG_ERROR(LOG_FILTER_SQL, "GameObject (Entry: %u GoType: %u) have data7=%u but PageText (Entry %u) not exist.",
+ TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data7=%u but PageText (Entry %u) not exist.",
entry, got.type, got.goober.pageId, got.goober.pageId);
}
CheckGONoDamageImmuneId(&got, got.goober.noDamageImmune, 11);
@@ -6471,7 +6471,7 @@ void ObjectMgr::LoadGameObjectTemplate()
if (got.moTransport.taxiPathId)
{
if (got.moTransport.taxiPathId >= sTaxiPathNodesByPath.size() || sTaxiPathNodesByPath[got.moTransport.taxiPathId].empty())
- TC_LOG_ERROR(LOG_FILTER_SQL, "GameObject (Entry: %u GoType: %u) have data0=%u but TaxiPath (Id: %u) not exist.",
+ TC_LOG_ERROR("sql.sql", "GameObject (Entry: %u GoType: %u) have data0=%u but TaxiPath (Id: %u) not exist.",
entry, got.type, got.moTransport.taxiPathId, got.moTransport.taxiPathId);
}
break;
@@ -6513,7 +6513,7 @@ void ObjectMgr::LoadGameObjectTemplate()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadExplorationBaseXP()
@@ -6524,7 +6524,7 @@ void ObjectMgr::LoadExplorationBaseXP()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty.");
return;
}
@@ -6540,7 +6540,7 @@ void ObjectMgr::LoadExplorationBaseXP()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
uint32 ObjectMgr::GetBaseXP(uint8 level)
@@ -6563,7 +6563,7 @@ void ObjectMgr::LoadPetNames()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!");
return;
}
@@ -6583,7 +6583,7 @@ void ObjectMgr::LoadPetNames()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadPetNumber()
@@ -6597,7 +6597,7 @@ void ObjectMgr::LoadPetNumber()
_hiPetNumber = fields[0].GetUInt32()+1;
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded the max pet number: %d in %u ms", _hiPetNumber-1, GetMSTimeDiffToNow(oldMSTime));
}
std::string ObjectMgr::GeneratePetName(uint32 entry)
@@ -6633,7 +6633,7 @@ void ObjectMgr::LoadCorpses()
PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_CORPSES));
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 corpses. DB table `corpse` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 corpses. DB table `corpse` is empty.");
return;
}
@@ -6645,7 +6645,7 @@ void ObjectMgr::LoadCorpses()
CorpseType type = CorpseType(fields[13].GetUInt8());
if (type >= MAX_CORPSE_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type);
+ TC_LOG_ERROR("misc", "Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type);
continue;
}
@@ -6661,7 +6661,7 @@ void ObjectMgr::LoadCorpses()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u corpses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u corpses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadReputationRewardRate()
@@ -6674,7 +6674,7 @@ void ObjectMgr::LoadReputationRewardRate()
QueryResult result = WorldDatabase.Query("SELECT faction, quest_rate, quest_daily_rate, quest_weekly_rate, quest_monthly_rate, quest_repeatable_rate, creature_rate, spell_rate FROM reputation_reward_rate");
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded `reputation_reward_rate`, table is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded `reputation_reward_rate`, table is empty!");
return;
}
@@ -6697,49 +6697,49 @@ void ObjectMgr::LoadReputationRewardRate()
FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
if (!factionEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_reward_rate`", factionId);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_reward_rate`", factionId);
continue;
}
if (repRate.questRate < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_rate with invalid rate %f, skipping data for faction %u", repRate.questRate, factionId);
+ TC_LOG_ERROR("sql.sql", "Table reputation_reward_rate has quest_rate with invalid rate %f, skipping data for faction %u", repRate.questRate, factionId);
continue;
}
if (repRate.questDailyRate < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_daily_rate with invalid rate %f, skipping data for faction %u", repRate.questDailyRate, factionId);
+ TC_LOG_ERROR("sql.sql", "Table reputation_reward_rate has quest_daily_rate with invalid rate %f, skipping data for faction %u", repRate.questDailyRate, factionId);
continue;
}
if (repRate.questWeeklyRate < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_weekly_rate with invalid rate %f, skipping data for faction %u", repRate.questWeeklyRate, factionId);
+ TC_LOG_ERROR("sql.sql", "Table reputation_reward_rate has quest_weekly_rate with invalid rate %f, skipping data for faction %u", repRate.questWeeklyRate, factionId);
continue;
}
if (repRate.questMonthlyRate < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_monthly_rate with invalid rate %f, skipping data for faction %u", repRate.questMonthlyRate, factionId);
+ TC_LOG_ERROR("sql.sql", "Table reputation_reward_rate has quest_monthly_rate with invalid rate %f, skipping data for faction %u", repRate.questMonthlyRate, factionId);
continue;
}
if (repRate.questRepeatableRate < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has quest_repeatable_rate with invalid rate %f, skipping data for faction %u", repRate.questRepeatableRate, factionId);
+ TC_LOG_ERROR("sql.sql", "Table reputation_reward_rate has quest_repeatable_rate with invalid rate %f, skipping data for faction %u", repRate.questRepeatableRate, factionId);
continue;
}
if (repRate.creatureRate < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creatureRate, factionId);
+ TC_LOG_ERROR("sql.sql", "Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creatureRate, factionId);
continue;
}
if (repRate.spellRate < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spellRate, factionId);
+ TC_LOG_ERROR("sql.sql", "Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spellRate, factionId);
continue;
}
@@ -6749,7 +6749,7 @@ void ObjectMgr::LoadReputationRewardRate()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadReputationOnKill()
@@ -6769,7 +6769,7 @@ void ObjectMgr::LoadReputationOnKill()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty.");
return;
}
@@ -6792,7 +6792,7 @@ void ObjectMgr::LoadReputationOnKill()
if (!GetCreatureTemplate(creature_id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped", creature_id);
+ TC_LOG_ERROR("sql.sql", "Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped", creature_id);
continue;
}
@@ -6801,7 +6801,7 @@ void ObjectMgr::LoadReputationOnKill()
FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repOnKill.RepFaction1);
if (!factionEntry1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction1);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction1);
continue;
}
}
@@ -6811,7 +6811,7 @@ void ObjectMgr::LoadReputationOnKill()
FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repOnKill.RepFaction2);
if (!factionEntry2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction2);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.RepFaction2);
continue;
}
}
@@ -6821,7 +6821,7 @@ void ObjectMgr::LoadReputationOnKill()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadReputationSpilloverTemplate()
@@ -6835,7 +6835,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded `reputation_spillover_template`, table is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded `reputation_spillover_template`, table is empty.");
return;
}
@@ -6864,13 +6864,13 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
if (!factionEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", factionId);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", factionId);
continue;
}
if (factionEntry->team == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u in `reputation_spillover_template` does not belong to any team, skipping", factionId);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u in `reputation_spillover_template` does not belong to any team, skipping", factionId);
continue;
}
@@ -6882,19 +6882,19 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
if (!factionSpillover)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spillover faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template` for faction %u, skipping", repTemplate.faction[i], factionId);
+ TC_LOG_ERROR("sql.sql", "Spillover faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template` for faction %u, skipping", repTemplate.faction[i], factionId);
continue;
}
if (factionSpillover->reputationListID < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spillover faction (faction.dbc) %u for faction %u in `reputation_spillover_template` can not be listed for client, and then useless, skipping", repTemplate.faction[i], factionId);
+ TC_LOG_ERROR("sql.sql", "Spillover faction (faction.dbc) %u for faction %u in `reputation_spillover_template` can not be listed for client, and then useless, skipping", repTemplate.faction[i], factionId);
continue;
}
if (repTemplate.faction_rank[i] >= MAX_REPUTATION_RANK)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Rank %u used in `reputation_spillover_template` for spillover faction %u is not valid, skipping", repTemplate.faction_rank[i], repTemplate.faction[i]);
+ TC_LOG_ERROR("sql.sql", "Rank %u used in `reputation_spillover_template` for spillover faction %u is not valid, skipping", repTemplate.faction_rank[i], repTemplate.faction[i]);
continue;
}
}
@@ -6903,25 +6903,25 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
FactionEntry const* factionEntry0 = sFactionStore.LookupEntry(repTemplate.faction[0]);
if (repTemplate.faction[0] && !factionEntry0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[0]);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[0]);
continue;
}
FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repTemplate.faction[1]);
if (repTemplate.faction[1] && !factionEntry1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[1]);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[1]);
continue;
}
FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repTemplate.faction[2]);
if (repTemplate.faction[2] && !factionEntry2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[2]);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[2]);
continue;
}
FactionEntry const* factionEntry3 = sFactionStore.LookupEntry(repTemplate.faction[3]);
if (repTemplate.faction[3] && !factionEntry3)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[3]);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[3]);
continue;
}
@@ -6931,7 +6931,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadPointsOfInterest()
@@ -6947,7 +6947,7 @@ void ObjectMgr::LoadPointsOfInterest()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty.");
return;
}
@@ -6968,7 +6968,7 @@ void ObjectMgr::LoadPointsOfInterest()
if (!Trinity::IsValidMapCoord(POI.x, POI.y))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.", point_id, POI.x, POI.y);
+ TC_LOG_ERROR("sql.sql", "Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.", point_id, POI.x, POI.y);
continue;
}
@@ -6977,7 +6977,7 @@ void ObjectMgr::LoadPointsOfInterest()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadQuestPOI()
@@ -6993,7 +6993,7 @@ void ObjectMgr::LoadQuestPOI()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
return;
}
@@ -7047,7 +7047,7 @@ void ObjectMgr::LoadQuestPOI()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadNPCSpellClickSpells()
@@ -7060,7 +7060,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty.");
return;
}
@@ -7074,7 +7074,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
CreatureTemplate const* cInfo = GetCreatureTemplate(npc_entry);
if (!cInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table npc_spellclick_spells references unknown creature_template %u. Skipping entry.", npc_entry);
+ TC_LOG_ERROR("sql.sql", "Table npc_spellclick_spells references unknown creature_template %u. Skipping entry.", npc_entry);
continue;
}
@@ -7082,13 +7082,13 @@ void ObjectMgr::LoadNPCSpellClickSpells()
SpellInfo const* spellinfo = sSpellMgr->GetSpellInfo(spellid);
if (!spellinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table npc_spellclick_spells references unknown spellid %u. Skipping entry.", spellid);
+ TC_LOG_ERROR("sql.sql", "Table npc_spellclick_spells references unknown spellid %u. Skipping entry.", spellid);
continue;
}
uint8 userType = fields[3].GetUInt16();
if (userType >= SPELL_CLICK_USER_MAX)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table npc_spellclick_spells references unknown user type %u. Skipping entry.", uint32(userType));
+ TC_LOG_ERROR("sql.sql", "Table npc_spellclick_spells references unknown user type %u. Skipping entry.", uint32(userType));
uint8 castFlags = fields[2].GetUInt8();
SpellClickInfo info;
@@ -7108,12 +7108,12 @@ void ObjectMgr::LoadNPCSpellClickSpells()
{
if ((itr->second.npcflag & UNIT_NPC_FLAG_SPELLCLICK) && _spellClickInfoStore.find(itr->second.Entry) == _spellClickInfoStore.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "npc_spellclick_spells: Creature template %u has UNIT_NPC_FLAG_SPELLCLICK but no data in spellclick table! Removing flag", itr->second.Entry);
+ TC_LOG_ERROR("sql.sql", "npc_spellclick_spells: Creature template %u has UNIT_NPC_FLAG_SPELLCLICK but no data in spellclick table! Removing flag", itr->second.Entry);
const_cast<CreatureTemplate*>(&itr->second)->npcflag &= ~UNIT_NPC_FLAG_SPELLCLICK;
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::DeleteCreatureData(uint32 guid)
@@ -7162,7 +7162,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const&
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quest relations from `%s`, table is empty.", table.c_str());
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 quest relations from `%s`, table is empty.", table.c_str());
return;
}
@@ -7178,7 +7178,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const&
if (_questTemplates.find(quest) == _questTemplates.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id);
+ TC_LOG_ERROR("sql.sql", "Table `%s`: Quest %u listed for entry %u does not exist.", table.c_str(), quest, id);
continue;
}
@@ -7190,7 +7190,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const&
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadGameobjectQuestStarters()
@@ -7201,9 +7201,9 @@ void ObjectMgr::LoadGameobjectQuestStarters()
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_queststarter` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject_queststarter` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_queststarter` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject_queststarter` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
}
}
@@ -7215,9 +7215,9 @@ void ObjectMgr::LoadGameobjectQuestEnders()
{
GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first);
if (!goInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questender` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject_questender` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second);
else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questender` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `gameobject_questender` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second);
}
}
@@ -7229,9 +7229,9 @@ void ObjectMgr::LoadCreatureQuestStarters()
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_queststarter` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `creature_queststarter` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_queststarter` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `creature_queststarter` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
}
}
@@ -7243,9 +7243,9 @@ void ObjectMgr::LoadCreatureQuestEnders()
{
CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first);
if (!cInfo)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questender` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `creature_questender` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second);
else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questender` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
+ TC_LOG_ERROR("sql.sql", "Table `creature_questender` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second);
}
}
@@ -7259,7 +7259,7 @@ void ObjectMgr::LoadReservedPlayersNames()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!");
return;
}
@@ -7274,7 +7274,7 @@ void ObjectMgr::LoadReservedPlayersNames()
std::wstring wstr;
if (!Utf8toWStr (name, wstr))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Table `reserved_name` have invalid name: %s", name.c_str());
+ TC_LOG_ERROR("misc", "Table `reserved_name` have invalid name: %s", name.c_str());
continue;
}
@@ -7285,7 +7285,7 @@ void ObjectMgr::LoadReservedPlayersNames()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
bool ObjectMgr::IsReservedName(const std::string& name) const
@@ -7443,7 +7443,7 @@ void ObjectMgr::LoadGameObjectForQuests()
if (sObjectMgr->GetGameObjectTemplates()->empty())
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 GameObjects for quests");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 GameObjects for quests");
return;
}
@@ -7491,7 +7491,7 @@ void ObjectMgr::LoadGameObjectForQuests()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max_value)
@@ -7505,7 +7505,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max
{
if (end_value >= start_value)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value);
+ TC_LOG_ERROR("sql.sql", "Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value);
return false;
}
@@ -7518,7 +7518,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max
{
if (start_value >= end_value)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value);
+ TC_LOG_ERROR("sql.sql", "Table '%s' attempt loaded with invalid range (%d - %d), strings not loaded.", table, min_value, max_value);
return false;
}
}
@@ -7537,9 +7537,9 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max
if (!result)
{
if (min_value == MIN_TRINITY_STRING_ID) // error only in case internal strings
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.", table);
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 trinity strings. DB table `%s` is empty. Cannot continue.", table);
else
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 string templates. DB table `%s` is empty.", table);
+ TC_LOG_INFO("server.loading", ">> Loaded 0 string templates. DB table `%s` is empty.", table);
return false;
}
@@ -7554,12 +7554,12 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max
if (entry == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` contain reserved entry 0, ignored.", table);
+ TC_LOG_ERROR("sql.sql", "Table `%s` contain reserved entry 0, ignored.", table);
continue;
}
else if (entry < start_value || entry >= end_value)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` contain entry %i out of allowed range (%d - %d), ignored.", table, entry, min_value, max_value);
+ TC_LOG_ERROR("sql.sql", "Table `%s` contain entry %i out of allowed range (%d - %d), ignored.", table, entry, min_value, max_value);
continue;
}
@@ -7567,7 +7567,7 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max
if (!data.Content.empty())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` contain data for already loaded entry %i (from another table?), ignored.", table, entry);
+ TC_LOG_ERROR("sql.sql", "Table `%s` contain data for already loaded entry %i (from another table?), ignored.", table, entry);
continue;
}
@@ -7579,9 +7579,9 @@ bool ObjectMgr::LoadTrinityStrings(const char* table, int32 min_value, int32 max
} while (result->NextRow());
if (min_value == MIN_TRINITY_STRING_ID)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Trinity strings from table %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Trinity strings from table %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u string templates from %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u string templates from %s in %u ms", count, table, GetMSTimeDiffToNow(oldMSTime));
return true;
}
@@ -7597,9 +7597,9 @@ const char *ObjectMgr::GetTrinityString(int32 entry, LocaleConstant locale_idx)
}
if (entry > 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Entry %i not found in `trinity_string` table.", entry);
+ TC_LOG_ERROR("sql.sql", "Entry %i not found in `trinity_string` table.", entry);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Trinity string entry %i not found in DB.", entry);
+ TC_LOG_ERROR("sql.sql", "Trinity string entry %i not found in DB.", entry);
return "<error>";
}
@@ -7613,7 +7613,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty.");
return;
}
@@ -7628,7 +7628,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
AreaTableEntry const* fArea = GetAreaEntryByAreaID(entry);
if (!fArea)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "AreaId %u defined in `skill_fishing_base_level` does not exist", entry);
+ TC_LOG_ERROR("sql.sql", "AreaId %u defined in `skill_fishing_base_level` does not exist", entry);
continue;
}
@@ -7637,7 +7637,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
bool ObjectMgr::CheckDeclinedNames(const std::wstring& w_ownname, DeclinedName const& names)
@@ -7741,7 +7741,7 @@ void ObjectMgr::LoadGameTele()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 GameTeleports. DB table `game_tele` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 GameTeleports. DB table `game_tele` is empty!");
return;
}
@@ -7764,13 +7764,13 @@ void ObjectMgr::LoadGameTele()
if (!MapManager::IsValidMapCoord(gt.mapId, gt.position_x, gt.position_y, gt.position_z, gt.orientation))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong position for id %u (name: %s) in `game_tele` table, ignoring.", id, gt.name.c_str());
+ TC_LOG_ERROR("sql.sql", "Wrong position for id %u (name: %s) in `game_tele` table, ignoring.", id, gt.name.c_str());
continue;
}
if (!Utf8toWStr(gt.name, gt.wnameLow))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong UTF8 name for id %u in `game_tele` table, ignoring.", id);
+ TC_LOG_ERROR("sql.sql", "Wrong UTF8 name for id %u in `game_tele` table, ignoring.", id);
continue;
}
@@ -7782,7 +7782,7 @@ void ObjectMgr::LoadGameTele()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
@@ -7808,6 +7808,25 @@ GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
return alt;
}
+GameTele const* ObjectMgr::GetGameTeleExactName(const std::string& name) const
+{
+ // explicit name case
+ std::wstring wname;
+ if (!Utf8toWStr(name, wname))
+ return NULL;
+
+ // converting string that we try to find to lower case
+ wstrToLower(wname);
+
+ for (GameTeleContainer::const_iterator itr = _gameTeleStore.begin(); itr != _gameTeleStore.end(); ++itr)
+ {
+ if (itr->second.wnameLow == wname)
+ return &itr->second;
+ }
+
+ return NULL;
+}
+
bool ObjectMgr::AddGameTele(GameTele& tele)
{
// find max id
@@ -7880,7 +7899,7 @@ void ObjectMgr::LoadMailLevelRewards()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty.");
return;
}
@@ -7897,25 +7916,25 @@ void ObjectMgr::LoadMailLevelRewards()
if (level > MAX_LEVEL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `mail_level_reward` have data for level %u that more supported by client (%u), ignoring.", level, MAX_LEVEL);
+ TC_LOG_ERROR("sql.sql", "Table `mail_level_reward` have data for level %u that more supported by client (%u), ignoring.", level, MAX_LEVEL);
continue;
}
if (!(raceMask & RACEMASK_ALL_PLAYABLE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `mail_level_reward` have raceMask (%u) for level %u that not include any player races, ignoring.", raceMask, level);
+ TC_LOG_ERROR("sql.sql", "Table `mail_level_reward` have raceMask (%u) for level %u that not include any player races, ignoring.", raceMask, level);
continue;
}
if (!sMailTemplateStore.LookupEntry(mailTemplateId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `mail_level_reward` have invalid mailTemplateId (%u) for level %u that invalid not include any player races, ignoring.", mailTemplateId, level);
+ TC_LOG_ERROR("sql.sql", "Table `mail_level_reward` have invalid mailTemplateId (%u) for level %u that invalid not include any player races, ignoring.", mailTemplateId, level);
continue;
}
if (!GetCreatureTemplate(senderEntry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `mail_level_reward` have not existed sender creature entry (%u) for level %u that invalid not include any player races, ignoring.", senderEntry, level);
+ TC_LOG_ERROR("sql.sql", "Table `mail_level_reward` have not existed sender creature entry (%u) for level %u that invalid not include any player races, ignoring.", senderEntry, level);
continue;
}
@@ -7925,7 +7944,7 @@ void ObjectMgr::LoadMailLevelRewards()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, uint32 reqSkill, uint32 reqSkillValue, uint32 reqLevel)
@@ -7936,32 +7955,32 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost,
CreatureTemplate const* cInfo = GetCreatureTemplate(entry);
if (!cInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_trainer` contains entries for a non-existing creature template (Entry: %u), ignoring", entry);
+ TC_LOG_ERROR("sql.sql", "Table `npc_trainer` contains entries for a non-existing creature template (Entry: %u), ignoring", entry);
return;
}
if (!(cInfo->npcflag & UNIT_NPC_FLAG_TRAINER))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_trainer` contains entries for a creature template (Entry: %u) without trainer flag, ignoring", entry);
+ TC_LOG_ERROR("sql.sql", "Table `npc_trainer` contains entries for a creature template (Entry: %u) without trainer flag, ignoring", entry);
return;
}
SpellInfo const* spellinfo = sSpellMgr->GetSpellInfo(spell);
if (!spellinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u), ignoring", entry, spell);
+ TC_LOG_ERROR("sql.sql", "Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u), ignoring", entry, spell);
return;
}
if (!SpellMgr::IsSpellValid(spellinfo))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry (Entry: %u) for a broken spell (Spell: %u), ignoring", entry, spell);
+ TC_LOG_ERROR("sql.sql", "Table `npc_trainer` contains an entry (Entry: %u) for a broken spell (Spell: %u), ignoring", entry, spell);
return;
}
if (GetTalentSpellCost(spell))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u) which is a talent, ignoring", entry, spell);
+ TC_LOG_ERROR("sql.sql", "Table `npc_trainer` contains an entry (Entry: %u) for a non-existing spell (Spell: %u) which is a talent, ignoring", entry, spell);
return;
}
@@ -7989,7 +8008,7 @@ void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost,
if (spellinfo->Effects[i].TargetA.GetTarget() != 0 && spellinfo->Effects[i].TargetA.GetTarget() != TARGET_UNIT_TARGET_ALLY
&& spellinfo->Effects[i].TargetA.GetTarget() != TARGET_UNIT_TARGET_ANY && spellinfo->Effects[i].TargetA.GetTarget() != TARGET_UNIT_CASTER)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_trainer` has spell %u for trainer entry %u with learn effect which has incorrect target type, ignoring learn effect!", spell, entry);
+ TC_LOG_ERROR("sql.sql", "Table `npc_trainer` has spell %u for trainer entry %u with learn effect which has incorrect target type, ignoring learn effect!", spell, entry);
continue;
}
@@ -8019,7 +8038,7 @@ void ObjectMgr::LoadTrainerSpell()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!");
+ TC_LOG_ERROR("sql.sql", ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!");
return;
}
@@ -8043,7 +8062,7 @@ void ObjectMgr::LoadTrainerSpell()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32> *skip_vendors)
@@ -8100,7 +8119,7 @@ void ObjectMgr::LoadVendors()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!");
+ TC_LOG_ERROR("sql.sql", ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!");
return;
}
@@ -8133,7 +8152,7 @@ void ObjectMgr::LoadVendors()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadGossipMenu()
@@ -8146,7 +8165,7 @@ void ObjectMgr::LoadGossipMenu()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!");
return;
}
@@ -8163,7 +8182,7 @@ void ObjectMgr::LoadGossipMenu()
if (!GetGossipText(gMenu.text_id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table gossip_menu entry %u are using non-existing text_id %u", gMenu.entry, gMenu.text_id);
+ TC_LOG_ERROR("sql.sql", "Table gossip_menu entry %u are using non-existing text_id %u", gMenu.entry, gMenu.text_id);
continue;
}
@@ -8173,7 +8192,7 @@ void ObjectMgr::LoadGossipMenu()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gossip_menu entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u gossip_menu entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadGossipMenuItems()
@@ -8189,7 +8208,7 @@ void ObjectMgr::LoadGossipMenuItems()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gossip_menu_option entries. DB table `gossip_menu_option` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 gossip_menu_option entries. DB table `gossip_menu_option` is empty!");
return;
}
@@ -8215,16 +8234,16 @@ void ObjectMgr::LoadGossipMenuItems()
if (gMenuItem.OptionIcon >= GOSSIP_ICON_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table gossip_menu_option for menu %u, id %u has unknown icon id %u. Replacing with GOSSIP_ICON_CHAT", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionIcon);
+ TC_LOG_ERROR("sql.sql", "Table gossip_menu_option for menu %u, id %u has unknown icon id %u. Replacing with GOSSIP_ICON_CHAT", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionIcon);
gMenuItem.OptionIcon = GOSSIP_ICON_CHAT;
}
if (gMenuItem.OptionType >= GOSSIP_OPTION_MAX)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table gossip_menu_option for menu %u, id %u has unknown option id %u. Option will not be used", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionType);
+ TC_LOG_ERROR("sql.sql", "Table gossip_menu_option for menu %u, id %u has unknown option id %u. Option will not be used", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.OptionType);
if (gMenuItem.ActionPoiId && !GetPointOfInterest(gMenuItem.ActionPoiId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table gossip_menu_option for menu %u, id %u use non-existing action_poi_id %u, ignoring", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.ActionPoiId);
+ TC_LOG_ERROR("sql.sql", "Table gossip_menu_option for menu %u, id %u use non-existing action_poi_id %u, ignoring", gMenuItem.MenuId, gMenuItem.OptionIndex, gMenuItem.ActionPoiId);
gMenuItem.ActionPoiId = 0;
}
@@ -8233,7 +8252,7 @@ void ObjectMgr::LoadGossipMenuItems()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gossip_menu_option entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u gossip_menu_option entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/)
@@ -8285,7 +8304,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (player)
ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry);
return false;
}
@@ -8296,7 +8315,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (player)
ChatHandler(player->GetSession()).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry);
if (skip_vendors)
skip_vendors->insert(vendor_entry);
@@ -8309,7 +8328,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (player)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore", vendor_entry, item_id);
return false;
}
@@ -8318,7 +8337,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (player)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST, ExtendedCost);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore", item_id, ExtendedCost, vendor_entry);
return false;
}
@@ -8327,7 +8346,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (player)
ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry);
return false;
}
else if (maxcount == 0 && incrtime > 0)
@@ -8335,7 +8354,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (player)
ChatHandler(player->GetSession()).PSendSysMessage("MaxCount == 0 but IncrTime<>= 0");
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry);
return false;
}
@@ -8348,7 +8367,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (player)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, item_id, ExtendedCost);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `npc_vendor` has duplicate items %u (with extended cost %u) for vendor (Entry: %u), ignoring", item_id, ExtendedCost, vendor_entry);
return false;
}
@@ -8387,7 +8406,7 @@ void ObjectMgr::LoadScriptNames()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded empty set of Script Names!");
+ TC_LOG_ERROR("server.loading", ">> Loaded empty set of Script Names!");
return;
}
@@ -8401,7 +8420,7 @@ void ObjectMgr::LoadScriptNames()
while (result->NextRow());
std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
uint32 ObjectMgr::GetScriptId(const char *name)
@@ -8433,7 +8452,7 @@ void ObjectMgr::CheckScripts(ScriptsType type, std::set<int32>& ids)
case SCRIPT_COMMAND_TALK:
{
if (!GetTrinityStringLocale (itrM->second.Talk.TextID))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `%s` references invalid text id %u from `db_script_string`, script id: %u.", GetScriptsTableNameByType(type).c_str(), itrM->second.Talk.TextID, itrMM->first);
+ TC_LOG_ERROR("sql.sql", "Table `%s` references invalid text id %u from `db_script_string`, script id: %u.", GetScriptsTableNameByType(type).c_str(), itrM->second.Talk.TextID, itrMM->first);
if (ids.find(itrM->second.Talk.TextID) != ids.end())
ids.erase(itrM->second.Talk.TextID);
@@ -8459,7 +8478,7 @@ void ObjectMgr::LoadDbScriptStrings()
CheckScripts(ScriptsType(type), ids);
for (std::set<int32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `db_script_string` has unused string id %u", *itr);
+ TC_LOG_ERROR("sql.sql", "Table `db_script_string` has unused string id %u", *itr);
}
bool LoadTrinityStrings(const char* table, int32 start_value, int32 end_value)
@@ -8468,7 +8487,7 @@ bool LoadTrinityStrings(const char* table, int32 start_value, int32 end_value)
// start/end reversed for negative values
if (start_value > MAX_DB_SCRIPT_STRING_ID || end_value >= start_value)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' load attempted with range (%d - %d) reserved by Trinity, strings not loaded.", table, start_value, end_value+1);
+ TC_LOG_ERROR("sql.sql", "Table '%s' load attempted with range (%d - %d) reserved by Trinity, strings not loaded.", table, start_value, end_value+1);
return false;
}
@@ -8504,7 +8523,7 @@ void ObjectMgr::LoadCreatureClassLevelStats()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty.");
return;
}
@@ -8525,13 +8544,13 @@ void ObjectMgr::LoadCreatureClassLevelStats()
stats.BaseArmor = fields[6].GetInt16();
if (!Class || ((1 << (Class - 1)) & CLASSMASK_ALL_CREATURES) == 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature base stats for level %u has invalid class %u", Level, Class);
+ TC_LOG_ERROR("sql.sql", "Creature base stats for level %u has invalid class %u", Level, Class);
for (uint8 i = 0; i < MAX_CREATURE_BASE_HP; ++i)
{
if (stats.BaseHealth[i] < 1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Creature base stats for class %u, level %u has invalid zero base HP[%u] - set to 1", Class, Level, i);
+ TC_LOG_ERROR("sql.sql", "Creature base stats for class %u, level %u has invalid zero base HP[%u] - set to 1", Class, Level, i);
stats.BaseHealth[i] = 1;
}
}
@@ -8548,11 +8567,11 @@ void ObjectMgr::LoadCreatureClassLevelStats()
for (uint16 lvl = itr->second.minlevel; lvl <= itr->second.maxlevel; ++lvl)
{
if (_creatureBaseStatsStore.find(MAKE_PAIR16(lvl, itr->second.unit_class)) == _creatureBaseStatsStore.end())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Missing base stats for creature class %u level %u", itr->second.unit_class, lvl);
+ TC_LOG_ERROR("sql.sql", "Missing base stats for creature class %u level %u", itr->second.unit_class, lvl);
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadFactionChangeAchievements()
@@ -8563,7 +8582,7 @@ void ObjectMgr::LoadFactionChangeAchievements()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty.");
return;
}
@@ -8577,9 +8596,9 @@ void ObjectMgr::LoadFactionChangeAchievements()
uint32 horde = fields[1].GetUInt32();
if (!sAchievementMgr->GetAchievement(alliance))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Achievement %u (alliance_id) referenced in `player_factionchange_achievement` does not exist, pair skipped!", alliance);
+ TC_LOG_ERROR("sql.sql", "Achievement %u (alliance_id) referenced in `player_factionchange_achievement` does not exist, pair skipped!", alliance);
else if (!sAchievementMgr->GetAchievement(horde))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Achievement %u (horde_id) referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde);
+ TC_LOG_ERROR("sql.sql", "Achievement %u (horde_id) referenced in `player_factionchange_achievement` does not exist, pair skipped!", horde);
else
FactionChangeAchievements[alliance] = horde;
@@ -8587,7 +8606,7 @@ void ObjectMgr::LoadFactionChangeAchievements()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadFactionChangeItems()
@@ -8598,7 +8617,7 @@ void ObjectMgr::LoadFactionChangeItems()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty.");
return;
}
@@ -8612,9 +8631,9 @@ void ObjectMgr::LoadFactionChangeItems()
uint32 horde = fields[1].GetUInt32();
if (!GetItemTemplate(alliance))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item %u (alliance_id) referenced in `player_factionchange_items` does not exist, pair skipped!", alliance);
+ TC_LOG_ERROR("sql.sql", "Item %u (alliance_id) referenced in `player_factionchange_items` does not exist, pair skipped!", alliance);
else if (!GetItemTemplate(horde))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item %u (horde_id) referenced in `player_factionchange_items` does not exist, pair skipped!", horde);
+ TC_LOG_ERROR("sql.sql", "Item %u (horde_id) referenced in `player_factionchange_items` does not exist, pair skipped!", horde);
else
FactionChangeItems[alliance] = horde;
@@ -8622,7 +8641,7 @@ void ObjectMgr::LoadFactionChangeItems()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadFactionChangeQuests()
@@ -8633,7 +8652,7 @@ void ObjectMgr::LoadFactionChangeQuests()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change quest pairs. DB table `player_factionchange_quests` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 faction change quest pairs. DB table `player_factionchange_quests` is empty.");
return;
}
@@ -8647,9 +8666,9 @@ void ObjectMgr::LoadFactionChangeQuests()
uint32 horde = fields[1].GetUInt32();
if (!sObjectMgr->GetQuestTemplate(alliance))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u (alliance_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", alliance);
+ TC_LOG_ERROR("sql.sql", "Quest %u (alliance_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", alliance);
else if (!sObjectMgr->GetQuestTemplate(horde))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u (horde_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", horde);
+ TC_LOG_ERROR("sql.sql", "Quest %u (horde_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", horde);
else
FactionChangeQuests[alliance] = horde;
@@ -8657,7 +8676,7 @@ void ObjectMgr::LoadFactionChangeQuests()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change quest pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u faction change quest pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadFactionChangeReputations()
@@ -8668,7 +8687,7 @@ void ObjectMgr::LoadFactionChangeReputations()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty.");
return;
}
@@ -8682,9 +8701,9 @@ void ObjectMgr::LoadFactionChangeReputations()
uint32 horde = fields[1].GetUInt32();
if (!sFactionStore.LookupEntry(alliance))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Reputation %u (alliance_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", alliance);
+ TC_LOG_ERROR("sql.sql", "Reputation %u (alliance_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", alliance);
else if (!sFactionStore.LookupEntry(horde))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Reputation %u (horde_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde);
+ TC_LOG_ERROR("sql.sql", "Reputation %u (horde_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde);
else
FactionChangeReputation[alliance] = horde;
@@ -8692,7 +8711,7 @@ void ObjectMgr::LoadFactionChangeReputations()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadFactionChangeSpells()
@@ -8703,7 +8722,7 @@ void ObjectMgr::LoadFactionChangeSpells()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty.");
return;
}
@@ -8717,9 +8736,9 @@ void ObjectMgr::LoadFactionChangeSpells()
uint32 horde = fields[1].GetUInt32();
if (!sSpellMgr->GetSpellInfo(alliance))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u (alliance_id) referenced in `player_factionchange_spells` does not exist, pair skipped!", alliance);
+ TC_LOG_ERROR("sql.sql", "Spell %u (alliance_id) referenced in `player_factionchange_spells` does not exist, pair skipped!", alliance);
else if (!sSpellMgr->GetSpellInfo(horde))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u (horde_id) referenced in `player_factionchange_spells` does not exist, pair skipped!", horde);
+ TC_LOG_ERROR("sql.sql", "Spell %u (horde_id) referenced in `player_factionchange_spells` does not exist, pair skipped!", horde);
else
FactionChangeSpells[alliance] = horde;
@@ -8727,7 +8746,7 @@ void ObjectMgr::LoadFactionChangeSpells()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadFactionChangeTitles()
@@ -8738,7 +8757,7 @@ void ObjectMgr::LoadFactionChangeTitles()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 faction change title pairs. DB table `player_factionchange_title` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 faction change title pairs. DB table `player_factionchange_title` is empty.");
return;
}
@@ -8752,9 +8771,9 @@ void ObjectMgr::LoadFactionChangeTitles()
uint32 horde = fields[1].GetUInt32();
if (!sCharTitlesStore.LookupEntry(alliance))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Title %u (alliance_id) referenced in `player_factionchange_title` does not exist, pair skipped!", alliance);
+ TC_LOG_ERROR("sql.sql", "Title %u (alliance_id) referenced in `player_factionchange_title` does not exist, pair skipped!", alliance);
else if (!sCharTitlesStore.LookupEntry(horde))
- TC_LOG_ERROR(LOG_FILTER_SQL, "Title %u (horde_id) referenced in `player_factionchange_title` does not exist, pair skipped!", horde);
+ TC_LOG_ERROR("sql.sql", "Title %u (horde_id) referenced in `player_factionchange_title` does not exist, pair skipped!", horde);
else
FactionChangeTitles[alliance] = horde;
@@ -8762,7 +8781,7 @@ void ObjectMgr::LoadFactionChangeTitles()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u faction change title pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u faction change title pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 752cc3b56ab..fa0f0e76e46 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -467,8 +467,8 @@ struct PetLevelInfo
struct MailLevelReward
{
- MailLevelReward() : raceMask(0), mailTemplateId(0), senderEntry(0) {}
- MailLevelReward(uint32 _raceMask, uint32 _mailTemplateId, uint32 _senderEntry) : raceMask(_raceMask), mailTemplateId(_mailTemplateId), senderEntry(_senderEntry) {}
+ MailLevelReward() : raceMask(0), mailTemplateId(0), senderEntry(0) { }
+ MailLevelReward(uint32 _raceMask, uint32 _mailTemplateId, uint32 _senderEntry) : raceMask(_raceMask), mailTemplateId(_mailTemplateId), senderEntry(_senderEntry) { }
uint32 raceMask;
uint32 mailTemplateId;
@@ -556,8 +556,8 @@ struct QuestPOIPoint
int32 x;
int32 y;
- QuestPOIPoint() : x(0), y(0) {}
- QuestPOIPoint(int32 _x, int32 _y) : x(_x), y(_y) {}
+ QuestPOIPoint() : x(0), y(0) { }
+ QuestPOIPoint(int32 _x, int32 _y) : x(_x), y(_y) { }
};
struct QuestPOI
@@ -566,13 +566,13 @@ struct QuestPOI
int32 ObjectiveIndex;
uint32 MapId;
uint32 AreaId;
- uint32 Unk2;
+ uint32 FloorId;
uint32 Unk3;
uint32 Unk4;
std::vector<QuestPOIPoint> points;
- QuestPOI() : Id(0), ObjectiveIndex(0), MapId(0), AreaId(0), Unk2(0), Unk3(0), Unk4(0) {}
- QuestPOI(uint32 id, int32 objIndex, uint32 mapId, uint32 areaId, uint32 unk2, uint32 unk3, uint32 unk4) : Id(id), ObjectiveIndex(objIndex), MapId(mapId), AreaId(areaId), Unk2(unk2), Unk3(unk3), Unk4(unk4) {}
+ QuestPOI() : Id(0), ObjectiveIndex(0), MapId(0), AreaId(0), FloorId(0), Unk3(0), Unk4(0) { }
+ QuestPOI(uint32 id, int32 objIndex, uint32 mapId, uint32 areaId, uint32 floorId, uint32 unk3, uint32 unk4) : Id(id), ObjectiveIndex(objIndex), MapId(mapId), AreaId(areaId), FloorId(floorId), Unk3(unk3), Unk4(unk4) { }
};
typedef std::vector<QuestPOI> QuestPOIVector;
@@ -854,13 +854,13 @@ class ObjectMgr
void LoadQuests();
void LoadQuestStartersAndEnders()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GO Start Quest Data...");
+ TC_LOG_INFO("server.loading", "Loading GO Start Quest Data...");
LoadGameobjectQuestStarters();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GO End Quest Data...");
+ TC_LOG_INFO("server.loading", "Loading GO End Quest Data...");
LoadGameobjectQuestEnders();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Start Quest Data...");
+ TC_LOG_INFO("server.loading", "Loading Creature Start Quest Data...");
LoadCreatureQuestStarters();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature End Quest Data...");
+ TC_LOG_INFO("server.loading", "Loading Creature End Quest Data...");
LoadCreatureQuestEnders();
}
void LoadGameobjectQuestStarters();
@@ -1161,6 +1161,7 @@ class ObjectMgr
return &itr->second;
}
GameTele const* GetGameTele(std::string const& name) const;
+ GameTele const* GetGameTeleExactName(std::string const& name) const;
GameTeleContainer const& GetGameTeleMap() const { return _gameTeleStore; }
bool AddGameTele(GameTele& data);
bool DeleteGameTele(std::string const& name);
diff --git a/src/server/game/Grids/Cells/Cell.h b/src/server/game/Grids/Cells/Cell.h
index 33a26c62ce0..ecfdfd6ce05 100644
--- a/src/server/game/Grids/Cells/Cell.h
+++ b/src/server/game/Grids/Cells/Cell.h
@@ -31,8 +31,8 @@ class WorldObject;
struct CellArea
{
- CellArea() {}
- CellArea(CellCoord low, CellCoord high) : low_bound(low), high_bound(high) {}
+ CellArea() { }
+ CellArea(CellCoord low, CellCoord high) : low_bound(low), high_bound(high) { }
bool operator!() const { return low_bound == high_bound; }
diff --git a/src/server/game/Grids/Grid.h b/src/server/game/Grids/Grid.h
index 0a5e84b8ded..57f79538e2b 100644
--- a/src/server/game/Grids/Grid.h
+++ b/src/server/game/Grids/Grid.h
@@ -52,7 +52,7 @@ class Grid
/** destructor to clean up its resources. This includes unloading the
grid if it has not been unload.
*/
- ~Grid() {}
+ ~Grid() { }
/** an object of interested enters the grid
*/
diff --git a/src/server/game/Grids/GridDefines.h b/src/server/game/Grids/GridDefines.h
index 9250c784dd9..7ddb4647afe 100644
--- a/src/server/game/Grids/GridDefines.h
+++ b/src/server/game/Grids/GridDefines.h
@@ -86,11 +86,11 @@ struct CoordPair
{
CoordPair(uint32 x=0, uint32 y=0)
: x_coord(x), y_coord(y)
- {}
+ { }
CoordPair(const CoordPair<LIMIT> &obj)
: x_coord(obj.x_coord), y_coord(obj.y_coord)
- {}
+ { }
CoordPair<LIMIT> & operator=(const CoordPair<LIMIT> &obj)
{
diff --git a/src/server/game/Grids/GridReference.h b/src/server/game/Grids/GridReference.h
index 3d662684060..18403e27a45 100644
--- a/src/server/game/Grids/GridReference.h
+++ b/src/server/game/Grids/GridReference.h
@@ -45,7 +45,7 @@ class GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
this->getTarget()->decSize();
}
public:
- GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() {}
+ GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() { }
~GridReference() { this->unlink(); }
GridReference* next() { return (GridReference*)Reference<GridRefManager<OBJECT>, OBJECT>::next(); }
};
diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp
index 478008fd5ae..cc6ceae6996 100644
--- a/src/server/game/Grids/GridStates.cpp
+++ b/src/server/game/Grids/GridStates.cpp
@@ -25,7 +25,7 @@ bool GridState::checkMagic()
{
if (i_Magic != MAGIC_TESTVAL)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "!!! GridState: Magic value gone !!!");
+ TC_LOG_ERROR("misc", "!!! GridState: Magic value gone !!!");
return false;
}
return true;
@@ -47,7 +47,7 @@ void ActiveState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff
TypeContainerVisitor<ObjectGridStoper, GridTypeMapContainer> visitor(worker);
grid.VisitAllGrids(visitor);
grid.SetGridState(GRID_STATE_IDLE);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to IDLE state", grid.getX(), grid.getY(), map.GetId());
+ TC_LOG_DEBUG("maps", "Grid[%u, %u] on map %u moved to IDLE state", grid.getX(), grid.getY(), map.GetId());
}
else
map.ResetGridExpiry(grid, 0.1f);
@@ -58,7 +58,7 @@ void IdleState::Update(Map& map, NGridType& grid, GridInfo&, uint32) const
{
map.ResetGridExpiry(grid);
grid.SetGridState(GRID_STATE_REMOVAL);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Grid[%u, %u] on map %u moved to REMOVAL state", grid.getX(), grid.getY(), map.GetId());
+ TC_LOG_DEBUG("maps", "Grid[%u, %u] on map %u moved to REMOVAL state", grid.getX(), grid.getY(), map.GetId());
}
void RemovalState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff) const
@@ -68,7 +68,7 @@ void RemovalState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff
info.UpdateTimeTracker(diff);
if (info.getTimeTracker().Passed() && !map.UnloadGrid(grid, false))
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Grid[%u, %u] for map %u differed unloading due to players or active objects nearby", grid.getX(), grid.getY(), map.GetId());
+ TC_LOG_DEBUG("maps", "Grid[%u, %u] for map %u differed unloading due to players or active objects nearby", grid.getX(), grid.getY(), map.GetId());
map.ResetGridExpiry(grid);
}
}
diff --git a/src/server/game/Grids/GridStates.h b/src/server/game/Grids/GridStates.h
index 09682c716a9..38728d11757 100644
--- a/src/server/game/Grids/GridStates.h
+++ b/src/server/game/Grids/GridStates.h
@@ -34,7 +34,7 @@ class GridState
void setMagic() { i_Magic = MAGIC_TESTVAL; }
unsigned int i_Magic;
#endif
- virtual ~GridState() {};
+ virtual ~GridState() { };
virtual void Update(Map &, NGridType&, GridInfo &, uint32 t_diff) const = 0;
};
diff --git a/src/server/game/Grids/NGrid.h b/src/server/game/Grids/NGrid.h
index 65cdd3a6033..2e244ecbc62 100644
--- a/src/server/game/Grids/NGrid.h
+++ b/src/server/game/Grids/NGrid.h
@@ -34,10 +34,10 @@ class GridInfo
public:
GridInfo()
: i_timer(0), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)),
- i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false) {}
+ i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false) { }
GridInfo(time_t expiry, bool unload = true )
: i_timer(expiry), vis_Update(0, irand(0, DEFAULT_VISIBILITY_NOTIFY_PERIOD)),
- i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) {}
+ i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) { }
const TimeTracker& getTimeTracker() const { return i_timer; }
bool getUnloadLock() const { return i_unloadActiveLockCount || i_unloadExplicitLock || i_unloadReferenceLock; }
void setUnloadExplicitLock(bool on) { i_unloadExplicitLock = on; }
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index d0df63155b2..24c44eb0c56 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -45,7 +45,7 @@ namespace Trinity
std::set<Unit*> i_visibleNow;
Player::ClientGUIDs vis_guids;
- VisibleNotifier(Player &player) : i_player(player), vis_guids(player.m_clientGUIDs) {}
+ VisibleNotifier(Player &player) : i_player(player), vis_guids(player.m_clientGUIDs) { }
template<class T> void Visit(GridRefManager<T> &m);
void SendToSelf(void);
};
@@ -54,8 +54,8 @@ namespace Trinity
{
WorldObject &i_object;
- explicit VisibleChangesNotifier(WorldObject &object) : i_object(object) {}
- template<class T> void Visit(GridRefManager<T> &) {}
+ explicit VisibleChangesNotifier(WorldObject &object) : i_object(object) { }
+ template<class T> void Visit(GridRefManager<T> &) { }
void Visit(PlayerMapType &);
void Visit(CreatureMapType &);
void Visit(DynamicObjectMapType &);
@@ -63,7 +63,7 @@ namespace Trinity
struct PlayerRelocationNotifier : public VisibleNotifier
{
- PlayerRelocationNotifier(Player &player) : VisibleNotifier(player) {}
+ PlayerRelocationNotifier(Player &player) : VisibleNotifier(player) { }
template<class T> void Visit(GridRefManager<T> &m) { VisibleNotifier::Visit(m); }
void Visit(CreatureMapType &);
@@ -73,8 +73,8 @@ namespace Trinity
struct CreatureRelocationNotifier
{
Creature &i_creature;
- CreatureRelocationNotifier(Creature &c) : i_creature(c) {}
- template<class T> void Visit(GridRefManager<T> &) {}
+ CreatureRelocationNotifier(Creature &c) : i_creature(c) { }
+ template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &);
void Visit(PlayerMapType &);
};
@@ -86,8 +86,8 @@ namespace Trinity
CellCoord &p;
const float i_radius;
DelayedUnitRelocation(Cell &c, CellCoord &pair, Map &map, float radius) :
- i_map(map), cell(c), p(pair), i_radius(radius) {}
- template<class T> void Visit(GridRefManager<T> &) {}
+ i_map(map), cell(c), p(pair), i_radius(radius) { }
+ template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &);
void Visit(PlayerMapType &);
};
@@ -96,8 +96,8 @@ namespace Trinity
{
Unit &i_unit;
bool isCreature;
- explicit AIRelocationNotifier(Unit &unit) : i_unit(unit), isCreature(unit.GetTypeId() == TYPEID_UNIT) {}
- template<class T> void Visit(GridRefManager<T> &) {}
+ explicit AIRelocationNotifier(Unit &unit) : i_unit(unit), isCreature(unit.GetTypeId() == TYPEID_UNIT) { }
+ template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &);
};
@@ -105,7 +105,7 @@ namespace Trinity
{
GridType &i_grid;
uint32 i_timeDiff;
- GridUpdater(GridType &grid, uint32 diff) : i_grid(grid), i_timeDiff(diff) {}
+ GridUpdater(GridType &grid, uint32 diff) : i_grid(grid), i_timeDiff(diff) { }
template<class T> void updateObjects(GridRefManager<T> &m)
{
@@ -141,7 +141,7 @@ namespace Trinity
void Visit(PlayerMapType &m);
void Visit(CreatureMapType &m);
void Visit(DynamicObjectMapType &m);
- template<class SKIP> void Visit(GridRefManager<SKIP> &) {}
+ template<class SKIP> void Visit(GridRefManager<SKIP> &) { }
void SendPacket(Player* player)
{
@@ -160,11 +160,10 @@ namespace Trinity
struct ObjectUpdater
{
uint32 i_timeDiff;
- explicit ObjectUpdater(const uint32 diff) : i_timeDiff(diff) {}
+ explicit ObjectUpdater(const uint32 diff) : i_timeDiff(diff) { }
template<class T> void Visit(GridRefManager<T> &m);
- void Visit(PlayerMapType &) {}
- void Visit(CorpseMapType &) {}
- void Visit(CreatureMapType &);
+ void Visit(PlayerMapType &) { }
+ void Visit(CorpseMapType &) { }
};
// SEARCHERS & LIST SEARCHERS & WORKERS
@@ -180,7 +179,7 @@ namespace Trinity
Check &i_check;
WorldObjectSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
- : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
void Visit(PlayerMapType &m);
@@ -188,7 +187,7 @@ namespace Trinity
void Visit(CorpseMapType &m);
void Visit(DynamicObjectMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -200,7 +199,7 @@ namespace Trinity
Check &i_check;
WorldObjectLastSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
- : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
void Visit(PlayerMapType &m);
@@ -208,7 +207,7 @@ namespace Trinity
void Visit(CorpseMapType &m);
void Visit(DynamicObjectMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -220,7 +219,7 @@ namespace Trinity
Check& i_check;
WorldObjectListSearcher(WorldObject const* searcher, std::list<WorldObject*> &objects, Check & check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
- : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(PlayerMapType &m);
void Visit(CreatureMapType &m);
@@ -228,7 +227,7 @@ namespace Trinity
void Visit(GameObjectMapType &m);
void Visit(DynamicObjectMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -239,7 +238,7 @@ namespace Trinity
Do const& i_do;
WorldObjectWorker(WorldObject const* searcher, Do const& _do, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
- : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
+ : i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) { }
void Visit(GameObjectMapType &m)
{
@@ -285,7 +284,7 @@ namespace Trinity
i_do(itr->GetSource());
}
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Gameobject searchers
@@ -298,11 +297,11 @@ namespace Trinity
Check &i_check;
GameObjectSearcher(WorldObject const* searcher, GameObject* & result, Check& check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Last accepted by Check GO if any (Check can change requirements at each call)
@@ -314,11 +313,11 @@ namespace Trinity
Check& i_check;
GameObjectLastSearcher(WorldObject const* searcher, GameObject* & result, Check& check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(GameObjectMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -329,18 +328,18 @@ namespace Trinity
Check& i_check;
GameObjectListSearcher(WorldObject const* searcher, std::list<GameObject*> &objects, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(GameObjectMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Functor>
struct GameObjectWorker
{
GameObjectWorker(WorldObject const* searcher, Functor& func)
- : _func(func), _phaseMask(searcher->GetPhaseMask()) {}
+ : _func(func), _phaseMask(searcher->GetPhaseMask()) { }
void Visit(GameObjectMapType& m)
{
@@ -349,7 +348,7 @@ namespace Trinity
_func(itr->GetSource());
}
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
private:
Functor& _func;
@@ -367,12 +366,12 @@ namespace Trinity
Check & i_check;
UnitSearcher(WorldObject const* searcher, Unit* & result, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
void Visit(PlayerMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Last accepted by Check Unit if any (Check can change requirements at each call)
@@ -384,12 +383,12 @@ namespace Trinity
Check & i_check;
UnitLastSearcher(WorldObject const* searcher, Unit* & result, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
void Visit(PlayerMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// All accepted by Check units if any
@@ -401,12 +400,12 @@ namespace Trinity
Check& i_check;
UnitListSearcher(WorldObject const* searcher, std::list<Unit*> &objects, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(PlayerMapType &m);
void Visit(CreatureMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Creature searchers
@@ -419,11 +418,11 @@ namespace Trinity
Check & i_check;
CreatureSearcher(WorldObject const* searcher, Creature* & result, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Last accepted by Check Creature if any (Check can change requirements at each call)
@@ -435,11 +434,11 @@ namespace Trinity
Check & i_check;
CreatureLastSearcher(WorldObject const* searcher, Creature* & result, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(CreatureMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -450,11 +449,11 @@ namespace Trinity
Check& i_check;
CreatureListSearcher(WorldObject const* searcher, std::list<Creature*> &objects, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(CreatureMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -464,7 +463,7 @@ namespace Trinity
Do& i_do;
CreatureWorker(WorldObject const* searcher, Do& _do)
- : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) { }
void Visit(CreatureMapType &m)
{
@@ -473,7 +472,7 @@ namespace Trinity
i_do(itr->GetSource());
}
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// Player searchers
@@ -486,11 +485,11 @@ namespace Trinity
Check & i_check;
PlayerSearcher(WorldObject const* searcher, Player* & result, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) { }
void Visit(PlayerMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -501,11 +500,11 @@ namespace Trinity
Check& i_check;
PlayerListSearcher(WorldObject const* searcher, std::list<Player*> &objects, Check & check)
- : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) { }
void Visit(PlayerMapType &m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Check>
@@ -521,7 +520,7 @@ namespace Trinity
void Visit(PlayerMapType& m);
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -531,7 +530,7 @@ namespace Trinity
Do& i_do;
PlayerWorker(WorldObject const* searcher, Do& _do)
- : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
+ : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) { }
void Visit(PlayerMapType &m)
{
@@ -540,7 +539,7 @@ namespace Trinity
i_do(itr->GetSource());
}
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
template<class Do>
@@ -551,7 +550,7 @@ namespace Trinity
Do& i_do;
PlayerDistWorker(WorldObject const* searcher, float _dist, Do& _do)
- : i_searcher(searcher), i_dist(_dist), i_do(_do) {}
+ : i_searcher(searcher), i_dist(_dist), i_do(_do) { }
void Visit(PlayerMapType &m)
{
@@ -560,7 +559,7 @@ namespace Trinity
i_do(itr->GetSource());
}
- template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) {}
+ template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
};
// CHECKS && DO classes
@@ -570,7 +569,7 @@ namespace Trinity
class AnyDeadUnitObjectInRangeCheck
{
public:
- AnyDeadUnitObjectInRangeCheck(Unit* searchObj, float range) : i_searchObj(searchObj), i_range(range) {}
+ AnyDeadUnitObjectInRangeCheck(Unit* searchObj, float range) : i_searchObj(searchObj), i_range(range) { }
bool operator()(Player* u);
bool operator()(Corpse* u);
bool operator()(Creature* u);
@@ -585,7 +584,7 @@ namespace Trinity
public:
AnyDeadUnitSpellTargetInRangeCheck(Unit* searchObj, float range, SpellInfo const* spellInfo, SpellTargetCheckTypes check)
: AnyDeadUnitObjectInRangeCheck(searchObj, range), i_spellInfo(spellInfo), i_check(searchObj, searchObj, spellInfo, check, NULL)
- {}
+ { }
bool operator()(Player* u);
bool operator()(Corpse* u);
bool operator()(Creature* u);
@@ -600,11 +599,11 @@ namespace Trinity
class RespawnDo
{
public:
- RespawnDo() {}
+ RespawnDo() { }
void operator()(Creature* u) const { u->Respawn(); }
void operator()(GameObject* u) const { u->Respawn(); }
- void operator()(WorldObject*) const {}
- void operator()(Corpse*) const {}
+ void operator()(WorldObject*) const { }
+ void operator()(Corpse*) const { }
};
// GameObject checks
@@ -612,7 +611,7 @@ namespace Trinity
class GameObjectFocusCheck
{
public:
- GameObjectFocusCheck(Unit const* unit, uint32 focusId) : i_unit(unit), i_focusId(focusId) {}
+ GameObjectFocusCheck(Unit const* unit, uint32 focusId) : i_unit(unit), i_focusId(focusId) { }
bool operator()(GameObject* go) const
{
if (go->GetGOInfo()->type != GAMEOBJECT_TYPE_SPELL_FOCUS)
@@ -634,7 +633,7 @@ namespace Trinity
class NearestGameObjectFishingHole
{
public:
- NearestGameObjectFishingHole(WorldObject const& obj, float range) : i_obj(obj), i_range(range) {}
+ NearestGameObjectFishingHole(WorldObject const& obj, float range) : i_obj(obj), i_range(range) { }
bool operator()(GameObject* go)
{
if (go->GetGOInfo()->type == GAMEOBJECT_TYPE_FISHINGHOLE && go->isSpawned() && i_obj.IsWithinDistInMap(go, i_range) && i_obj.IsWithinDistInMap(go, (float)go->GetGOInfo()->fishinghole.radius))
@@ -656,7 +655,7 @@ namespace Trinity
class NearestGameObjectCheck
{
public:
- NearestGameObjectCheck(WorldObject const& obj) : i_obj(obj), i_range(999) {}
+ NearestGameObjectCheck(WorldObject const& obj) : i_obj(obj), i_range(999) { }
bool operator()(GameObject* go)
{
if (i_obj.IsWithinDistInMap(go, i_range))
@@ -679,7 +678,7 @@ namespace Trinity
class NearestGameObjectEntryInObjectRangeCheck
{
public:
- NearestGameObjectEntryInObjectRangeCheck(WorldObject const& obj, uint32 entry, float range) : i_obj(obj), i_entry(entry), i_range(range) {}
+ NearestGameObjectEntryInObjectRangeCheck(WorldObject const& obj, uint32 entry, float range) : i_obj(obj), i_entry(entry), i_range(range) { }
bool operator()(GameObject* go)
{
if (go->GetEntry() == i_entry && i_obj.IsWithinDistInMap(go, i_range))
@@ -703,7 +702,7 @@ namespace Trinity
class NearestGameObjectTypeInObjectRangeCheck
{
public:
- NearestGameObjectTypeInObjectRangeCheck(WorldObject const& obj, GameobjectTypes type, float range) : i_obj(obj), i_type(type), i_range(range) {}
+ NearestGameObjectTypeInObjectRangeCheck(WorldObject const& obj, GameobjectTypes type, float range) : i_obj(obj), i_type(type), i_range(range) { }
bool operator()(GameObject* go)
{
if (go->GetGoType() == i_type && i_obj.IsWithinDistInMap(go, i_range))
@@ -726,7 +725,7 @@ namespace Trinity
class GameObjectWithDbGUIDCheck
{
public:
- GameObjectWithDbGUIDCheck(WorldObject const& /*obj*/, uint32 db_guid) : i_db_guid(db_guid) {}
+ GameObjectWithDbGUIDCheck(WorldObject const& /*obj*/, uint32 db_guid) : i_db_guid(db_guid) { }
bool operator()(GameObject const* go) const
{
return go->GetDBTableGUIDLow() == i_db_guid;
@@ -740,7 +739,7 @@ namespace Trinity
class MostHPMissingInRange
{
public:
- MostHPMissingInRange(Unit const* obj, float range, uint32 hp) : i_obj(obj), i_range(range), i_hp(hp) {}
+ MostHPMissingInRange(Unit const* obj, float range, uint32 hp) : i_obj(obj), i_range(range), i_hp(hp) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) && u->GetMaxHealth() - u->GetHealth() > i_hp)
@@ -759,7 +758,7 @@ namespace Trinity
class FriendlyCCedInRange
{
public:
- FriendlyCCedInRange(Unit const* obj, float range) : i_obj(obj), i_range(range) {}
+ FriendlyCCedInRange(Unit const* obj, float range) : i_obj(obj), i_range(range) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
@@ -777,7 +776,7 @@ namespace Trinity
class FriendlyMissingBuffInRange
{
public:
- FriendlyMissingBuffInRange(Unit const* obj, float range, uint32 spellid) : i_obj(obj), i_range(range), i_spell(spellid) {}
+ FriendlyMissingBuffInRange(Unit const* obj, float range, uint32 spellid) : i_obj(obj), i_range(range), i_spell(spellid) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
@@ -796,7 +795,7 @@ namespace Trinity
class AnyUnfriendlyUnitInObjectRangeCheck
{
public:
- AnyUnfriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
+ AnyUnfriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u))
@@ -813,7 +812,7 @@ namespace Trinity
class AnyUnfriendlyNoTotemUnitInObjectRangeCheck
{
public:
- AnyUnfriendlyNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
+ AnyUnfriendlyNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) { }
bool operator()(Unit* u)
{
if (!u->IsAlive())
@@ -840,7 +839,7 @@ namespace Trinity
{
public:
AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck(Unit const* funit, float range)
- : i_funit(funit), i_range(range) {}
+ : i_funit(funit), i_range(range) { }
bool operator()(const Unit* u)
{
@@ -859,7 +858,7 @@ namespace Trinity
class CreatureWithDbGUIDCheck
{
public:
- CreatureWithDbGUIDCheck(WorldObject const* /*obj*/, uint32 lowguid) : i_lowguid(lowguid) {}
+ CreatureWithDbGUIDCheck(WorldObject const* /*obj*/, uint32 lowguid) : i_lowguid(lowguid) { }
bool operator()(Creature* u)
{
return u->GetDBTableGUIDLow() == i_lowguid;
@@ -871,7 +870,7 @@ namespace Trinity
class AnyFriendlyUnitInObjectRangeCheck
{
public:
- AnyFriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool playerOnly = false) : i_obj(obj), i_funit(funit), i_range(range), i_playerOnly(playerOnly) {}
+ AnyFriendlyUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool playerOnly = false) : i_obj(obj), i_funit(funit), i_range(range), i_playerOnly(playerOnly) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range) && i_funit->IsFriendlyTo(u) && (!i_playerOnly || u->GetTypeId() == TYPEID_PLAYER))
@@ -889,7 +888,7 @@ namespace Trinity
class AnyGroupedUnitInObjectRangeCheck
{
public:
- AnyGroupedUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool raid) : _source(obj), _refUnit(funit), _range(range), _raid(raid) {}
+ AnyGroupedUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range, bool raid) : _source(obj), _refUnit(funit), _range(range), _raid(raid) { }
bool operator()(Unit* u)
{
if (G3D::fuzzyEq(_range, 0))
@@ -916,7 +915,7 @@ namespace Trinity
class AnyUnitInObjectRangeCheck
{
public:
- AnyUnitInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range) {}
+ AnyUnitInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range) { }
bool operator()(Unit* u)
{
if (u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range))
@@ -933,7 +932,7 @@ namespace Trinity
class NearestAttackableUnitInObjectRangeCheck
{
public:
- NearestAttackableUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {}
+ NearestAttackableUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) { }
bool operator()(Unit* u)
{
if (u->isTargetableForAttack() && i_obj->IsWithinDistInMap(u, i_range) &&
@@ -993,7 +992,7 @@ namespace Trinity
public:
CallOfHelpCreatureInRangeDo(Unit* funit, Unit* enemy, float range)
: i_funit(funit), i_enemy(enemy), i_range(range)
- {}
+ { }
void operator()(Creature* u)
{
if (u == i_funit)
@@ -1161,7 +1160,7 @@ namespace Trinity
{
public:
NearestAssistCreatureInCreatureRangeCheck(Creature* obj, Unit* enemy, float range)
- : i_obj(obj), i_enemy(enemy), i_range(range) {}
+ : i_obj(obj), i_enemy(enemy), i_range(range) { }
bool operator()(Creature* u)
{
@@ -1194,7 +1193,7 @@ namespace Trinity
{
public:
NearestCreatureEntryWithLiveStateInObjectRangeCheck(WorldObject const& obj, uint32 entry, bool alive, float range)
- : i_obj(obj), i_entry(entry), i_alive(alive), i_range(range) {}
+ : i_obj(obj), i_entry(entry), i_alive(alive), i_range(range) { }
bool operator()(Creature* u)
{
@@ -1219,7 +1218,7 @@ namespace Trinity
class AnyPlayerInObjectRangeCheck
{
public:
- AnyPlayerInObjectRangeCheck(WorldObject const* obj, float range, bool reqAlive = true) : _obj(obj), _range(range), _reqAlive(reqAlive) {}
+ AnyPlayerInObjectRangeCheck(WorldObject const* obj, float range, bool reqAlive = true) : _obj(obj), _range(range), _reqAlive(reqAlive) { }
bool operator()(Player* u)
{
if (_reqAlive && !u->IsAlive())
@@ -1264,7 +1263,7 @@ namespace Trinity
class AllFriendlyCreaturesInGrid
{
public:
- AllFriendlyCreaturesInGrid(Unit const* obj) : unit(obj) {}
+ AllFriendlyCreaturesInGrid(Unit const* obj) : unit(obj) { }
bool operator() (Unit* u)
{
if (u->IsAlive() && u->IsVisible() && u->IsFriendlyTo(unit))
@@ -1279,7 +1278,7 @@ namespace Trinity
class AllGameObjectsWithEntryInRange
{
public:
- AllGameObjectsWithEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
+ AllGameObjectsWithEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) { }
bool operator() (GameObject* go)
{
if (go->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(go, m_fRange, false))
@@ -1296,7 +1295,7 @@ namespace Trinity
class AllCreaturesOfEntryInRange
{
public:
- AllCreaturesOfEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) {}
+ AllCreaturesOfEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) { }
bool operator() (Unit* unit)
{
if (unit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(unit, m_fRange, false))
@@ -1314,7 +1313,7 @@ namespace Trinity
class PlayerAtMinimumRangeAway
{
public:
- PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : unit(unit), fRange(fMinRange) {}
+ PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : unit(unit), fRange(fMinRange) { }
bool operator() (Player* player)
{
//No threat list check, must be done explicit if expected to be in combat with creature
@@ -1333,7 +1332,7 @@ namespace Trinity
{
public:
GameObjectInRangeCheck(float _x, float _y, float _z, float _range, uint32 _entry = 0) :
- x(_x), y(_y), z(_z), range(_range), entry(_entry) {}
+ x(_x), y(_y), z(_z), range(_range), entry(_entry) { }
bool operator() (GameObject* go)
{
if (!entry || (go->GetGOInfo() && go->GetGOInfo()->entry == entry))
@@ -1348,7 +1347,7 @@ namespace Trinity
class AllWorldObjectsInRange
{
public:
- AllWorldObjectsInRange(const WorldObject* object, float maxRange) : m_pObject(object), m_fRange(maxRange) {}
+ AllWorldObjectsInRange(const WorldObject* object, float maxRange) : m_pObject(object), m_fRange(maxRange) { }
bool operator() (WorldObject* go)
{
return m_pObject->IsWithinDist(go, m_fRange, false) && m_pObject->InSamePhase(go);
@@ -1361,7 +1360,7 @@ namespace Trinity
class ObjectTypeIdCheck
{
public:
- ObjectTypeIdCheck(TypeID typeId, bool equals) : _typeId(typeId), _equals(equals) {}
+ ObjectTypeIdCheck(TypeID typeId, bool equals) : _typeId(typeId), _equals(equals) { }
bool operator()(WorldObject* object)
{
return (object->GetTypeId() == _typeId) == _equals;
@@ -1375,7 +1374,7 @@ namespace Trinity
class ObjectGUIDCheck
{
public:
- ObjectGUIDCheck(uint64 GUID) : _GUID(GUID) {}
+ ObjectGUIDCheck(uint64 GUID) : _GUID(GUID) { }
bool operator()(WorldObject* object)
{
return object->GetGUID() == _GUID;
@@ -1388,7 +1387,7 @@ namespace Trinity
class UnitAuraCheck
{
public:
- UnitAuraCheck(bool present, uint32 spellId, uint64 casterGUID = 0) : _present(present), _spellId(spellId), _casterGUID(casterGUID) {}
+ UnitAuraCheck(bool present, uint32 spellId, uint64 casterGUID = 0) : _present(present), _spellId(spellId), _casterGUID(casterGUID) { }
bool operator()(Unit* unit) const
{
return unit->HasAura(_spellId, _casterGUID) == _present;
@@ -1412,7 +1411,7 @@ namespace Trinity
class LocalizedPacketDo
{
public:
- explicit LocalizedPacketDo(Builder& builder) : i_builder(builder) {}
+ explicit LocalizedPacketDo(Builder& builder) : i_builder(builder) { }
~LocalizedPacketDo()
{
@@ -1432,7 +1431,7 @@ namespace Trinity
{
public:
typedef std::vector<WorldPacket*> WorldPacketList;
- explicit LocalizedPacketListDo(Builder& builder) : i_builder(builder) {}
+ explicit LocalizedPacketListDo(Builder& builder) : i_builder(builder) { }
~LocalizedPacketListDo()
{
diff --git a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
index deb8fa49a6c..dc0e99aaded 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiersImpl.h
@@ -38,13 +38,6 @@ inline void Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
}
}
-inline void Trinity::ObjectUpdater::Visit(CreatureMapType &m)
-{
- for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
- if (iter->GetSource()->IsInWorld())
- iter->GetSource()->Update(i_timeDiff);
-}
-
// SEARCHERS & LIST SEARCHERS & WORKERS
// WorldObject searchers & workers
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index 05dff6823be..5c4366e0c25 100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -64,7 +64,7 @@ class ObjectWorldLoader
public:
explicit ObjectWorldLoader(ObjectGridLoader& gloader)
: i_cell(gloader.i_cell), i_map(gloader.i_map), i_corpses (0)
- {}
+ { }
void Visit(CorpseMapType &m);
@@ -77,9 +77,7 @@ class ObjectWorldLoader
uint32 i_corpses;
};
-template<class T> void ObjectGridLoader::SetObjectCell(T* /*obj*/, CellCoord const& /*cellCoord*/)
-{
-}
+template<class T> void ObjectGridLoader::SetObjectCell(T* /*obj*/, CellCoord const& /*cellCoord*/) { }
template<> void ObjectGridLoader::SetObjectCell(Creature* obj, CellCoord const& cellCoord)
{
@@ -121,7 +119,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord &cell, GridRefManager<T>
{
T* obj = new T;
uint32 guid = *i_guid;
- //TC_LOG_INFO(LOG_FILTER_GENERAL, "DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid);
+ //TC_LOG_INFO("misc", "DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid);
if (!obj->LoadFromDB(guid, map))
{
delete obj;
@@ -212,7 +210,7 @@ void ObjectGridLoader::LoadN(void)
}
}
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses, i_grid.GetGridId(), i_map->GetId());
+ TC_LOG_DEBUG("maps", "%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses, i_grid.GetGridId(), i_map->GetId());
}
template<class T>
diff --git a/src/server/game/Grids/ObjectGridLoader.h b/src/server/game/Grids/ObjectGridLoader.h
index b858b92da32..da3baa9c03c 100644
--- a/src/server/game/Grids/ObjectGridLoader.h
+++ b/src/server/game/Grids/ObjectGridLoader.h
@@ -34,12 +34,12 @@ class ObjectGridLoader
public:
ObjectGridLoader(NGridType &grid, Map* map, const Cell &cell)
: i_cell(cell), i_grid(grid), i_map(map), i_gameObjects(0), i_creatures(0), i_corpses (0)
- {}
+ { }
void Visit(GameObjectMapType &m);
void Visit(CreatureMapType &m);
- void Visit(CorpseMapType &) const {}
- void Visit(DynamicObjectMapType&) const {}
+ void Visit(CorpseMapType &) const { }
+ void Visit(DynamicObjectMapType&) const { }
void LoadN(void);
@@ -59,7 +59,7 @@ class ObjectGridStoper
{
public:
void Visit(CreatureMapType &m);
- template<class T> void Visit(GridRefManager<T> &) {}
+ template<class T> void Visit(GridRefManager<T> &) { }
};
//Move the foreign creatures back to respawn positions before unloading the NGrid
@@ -68,7 +68,7 @@ class ObjectGridEvacuator
public:
void Visit(CreatureMapType &m);
void Visit(GameObjectMapType &m);
- template<class T> void Visit(GridRefManager<T> &) {}
+ template<class T> void Visit(GridRefManager<T> &) { }
};
//Clean up and remove from world
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 8ec6aac9d4e..272fd89f0a6 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -39,13 +39,9 @@
Roll::Roll(uint64 _guid, LootItem const& li) : itemGUID(_guid), itemid(li.itemid),
itemRandomPropId(li.randomPropertyId), itemRandomSuffix(li.randomSuffix), itemCount(li.count),
totalPlayersRolling(0), totalNeed(0), totalGreed(0), totalPass(0), itemSlot(0),
-rollVoteMask(ROLL_ALL_TYPE_NO_DISENCHANT)
-{
-}
+rollVoteMask(ROLL_ALL_TYPE_NO_DISENCHANT) { }
-Roll::~Roll()
-{
-}
+Roll::~Roll() { }
void Roll::setLoot(Loot* pLoot)
{
@@ -70,10 +66,10 @@ Group::~Group()
{
if (m_bgGroup)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Group::~Group: battleground group being deleted.");
+ TC_LOG_DEBUG("bg.battleground", "Group::~Group: battleground group being deleted.");
if (m_bgGroup->GetBgRaid(ALLIANCE) == this) m_bgGroup->SetBgRaid(ALLIANCE, NULL);
else if (m_bgGroup->GetBgRaid(HORDE) == this) m_bgGroup->SetBgRaid(HORDE, NULL);
- else TC_LOG_ERROR(LOG_FILTER_GENERAL, "Group::~Group: battleground group is not linked to the correct battleground.");
+ else TC_LOG_ERROR("misc", "Group::~Group: battleground group is not linked to the correct battleground.");
}
Rolls::iterator itr;
while (!RollId.empty())
@@ -913,7 +909,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
item = sObjectMgr->GetItemTemplate(i->itemid);
if (!item)
{
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
+ //TC_LOG_DEBUG("misc", "Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
continue;
}
@@ -1000,7 +996,7 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
item = sObjectMgr->GetItemTemplate(i->itemid);
if (!item)
{
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
+ //TC_LOG_DEBUG("misc", "Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
continue;
}
@@ -1197,7 +1193,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Group::MasterLoot (SMSG_LOOT_MASTER_LIST)");
+ TC_LOG_DEBUG("network", "Group::MasterLoot (SMSG_LOOT_MASTER_LIST)");
uint32 real_count = 0;
@@ -2050,7 +2046,7 @@ InstanceGroupBind* Group::BindToInstance(InstanceSave* save, bool permanent, boo
bind.save = save;
bind.perm = permanent;
if (!load)
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Group::BindToInstance: Group (guid: %u, storage id: %u) is now bound to map %d, instance %d, difficulty %d",
+ TC_LOG_DEBUG("maps", "Group::BindToInstance: Group (guid: %u, storage id: %u) is now bound to map %d, instance %d, difficulty %d",
GUID_LOPART(GetGUID()), m_dbStoreId, save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
return &bind;
@@ -2093,7 +2089,7 @@ void Group::BroadcastGroupUpdate(void)
{
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2);
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "-- Forced group value update for '%s'", pp->GetName().c_str());
+ TC_LOG_DEBUG("misc", "-- Forced group value update for '%s'", pp->GetName().c_str());
}
}
}
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index 356a1a59663..0f55aba464c 100644
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -152,7 +152,7 @@ struct InstanceGroupBind
bool perm;
/* permanent InstanceGroupBinds exist if the leader has a permanent
PlayerInstanceBind for the same instance. */
- InstanceGroupBind() : save(NULL), perm(false) {}
+ InstanceGroupBind() : save(NULL), perm(false) { }
};
/** request member stats checken **/
diff --git a/src/server/game/Groups/GroupMgr.cpp b/src/server/game/Groups/GroupMgr.cpp
index 765a9ad87e3..762199f21d5 100644
--- a/src/server/game/Groups/GroupMgr.cpp
+++ b/src/server/game/Groups/GroupMgr.cpp
@@ -48,7 +48,7 @@ uint32 GroupMgr::GenerateNewGroupDbStoreId()
if (newStorageId == NextGroupDbStoreId)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Group storage ID overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("misc", "Group storage ID overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
@@ -86,7 +86,7 @@ uint32 GroupMgr::GenerateGroupId()
{
if (NextGroupId >= 0xFFFFFFFE)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Group guid overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("misc", "Group guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return NextGroupId++;
@@ -127,7 +127,7 @@ void GroupMgr::LoadGroups()
", g.icon7, g.icon8, g.groupType, g.difficulty, g.raiddifficulty, g.guid, lfg.dungeon, lfg.state FROM groups g LEFT JOIN lfg_data lfg ON lfg.guid = g.guid ORDER BY g.guid ASC");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 group definitions. DB table `groups` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 group definitions. DB table `groups` is empty!");
return;
}
@@ -152,10 +152,10 @@ void GroupMgr::LoadGroups()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Group members...");
+ TC_LOG_INFO("server.loading", "Loading Group members...");
{
uint32 oldMSTime = getMSTime();
@@ -169,7 +169,7 @@ void GroupMgr::LoadGroups()
QueryResult result = CharacterDatabase.Query("SELECT guid, memberGuid, memberFlags, subgroup, roles FROM group_member ORDER BY guid");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 group members. DB table `group_member` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 group members. DB table `group_member` is empty!");
return;
}
@@ -183,16 +183,16 @@ void GroupMgr::LoadGroups()
if (group)
group->LoadMemberFromDB(fields[1].GetUInt32(), fields[2].GetUInt8(), fields[3].GetUInt8(), fields[4].GetUInt8());
else
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32());
+ TC_LOG_ERROR("misc", "GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32());
++count;
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Group instance saves...");
+ TC_LOG_INFO("server.loading", "Loading Group instance saves...");
{
uint32 oldMSTime = getMSTime();
// 0 1 2 3 4 5 6
@@ -201,7 +201,7 @@ void GroupMgr::LoadGroups()
"LEFT JOIN character_instance ci LEFT JOIN groups g ON g.leaderGuid = ci.guid ON ci.instance = gi.instance AND ci.permanent = 1 GROUP BY gi.instance ORDER BY gi.guid");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 group-instance saves. DB table `group_instance` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 group-instance saves. DB table `group_instance` is empty!");
return;
}
@@ -215,14 +215,14 @@ void GroupMgr::LoadGroups()
MapEntry const* mapEntry = sMapStore.LookupEntry(fields[1].GetUInt16());
if (!mapEntry || !mapEntry->IsDungeon())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt16());
+ TC_LOG_ERROR("sql.sql", "Incorrect entry in group_instance table : no dungeon map %d", fields[1].GetUInt16());
continue;
}
uint32 diff = fields[4].GetUInt8();
if (diff >= uint32(mapEntry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Wrong dungeon difficulty use in group_instance table: %d", diff + 1);
+ TC_LOG_ERROR("sql.sql", "Wrong dungeon difficulty use in group_instance table: %d", diff + 1);
diff = 0; // default for both difficaly types
}
@@ -232,6 +232,6 @@ void GroupMgr::LoadGroups()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u group-instance saves in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u group-instance saves in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
diff --git a/src/server/game/Groups/GroupReference.h b/src/server/game/Groups/GroupReference.h
index 6c68710aeb5..6e323eefa27 100644
--- a/src/server/game/Groups/GroupReference.h
+++ b/src/server/game/Groups/GroupReference.h
@@ -32,7 +32,7 @@ class GroupReference : public Reference<Group, Player>
void targetObjectDestroyLink();
void sourceObjectDestroyLink();
public:
- GroupReference() : Reference<Group, Player>(), iSubGroup(0) {}
+ GroupReference() : Reference<Group, Player>(), iSubGroup(0) { }
~GroupReference() { unlink(); }
GroupReference* next() { return (GroupReference*)Reference<Group, Player>::next(); }
GroupReference const* next() const { return (GroupReference const*)Reference<Group, Player>::next(); }
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 1a3e48c8217..10bce9e2d51 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -72,8 +72,8 @@ std::string _GetGuildEventString(GuildEvents event)
return "Bank tab updated";
case GE_BANK_MONEY_SET:
return "Bank money set";
- case GE_BANK_MONEY_CHANGED:
- return "Bank money changed";
+ case GE_BANK_TAB_AND_MONEY_UPDATED:
+ return "Bank and money updated";
case GE_BANK_TEXT_CHANGED:
return "Bank tab text changed";
default:
@@ -104,7 +104,7 @@ void Guild::SendCommandResult(WorldSession* session, GuildCommandType type, Guil
data << uint32(errCode);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_COMMAND_RESULT [%s]: Type: %u, code: %u, param: %s"
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_COMMAND_RESULT [%s]: Type: %u, code: %u, param: %s"
, session->GetPlayerInfo().c_str(), type, errCode, param.c_str());
}
@@ -114,7 +114,7 @@ void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode
data << uint32(errCode);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_SAVE_GUILD_EMBLEM [%s] Code: %u", session->GetPlayerInfo().c_str(), errCode);
+ TC_LOG_DEBUG("guild", "MSG_SAVE_GUILD_EMBLEM [%s] Code: %u", session->GetPlayerInfo().c_str(), errCode);
}
// LogHolder
@@ -273,6 +273,7 @@ void Guild::RankInfo::SaveToDB(SQLTransaction& trans) const
stmt->setUInt8 (1, m_rankId);
stmt->setString(2, m_name);
stmt->setUInt32(3, m_rights);
+ stmt->setUInt32(4, m_bankMoneyPerDay);
CharacterDatabase.ExecuteOrAppend(trans, stmt);
}
@@ -289,7 +290,7 @@ void Guild::RankInfo::CreateMissingTabsIfNeeded(uint8 tabs, SQLTransaction& tran
rightsAndSlots.SetGuildMasterValues();
if (logOnCreate)
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Guild %u has broken Tab %u for rank %u. Created default tab.", m_guildId, i, m_rankId);
+ TC_LOG_ERROR("guild", "Guild %u has broken Tab %u for rank %u. Created default tab.", m_guildId, i, m_rankId);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_RIGHT);
stmt->setUInt32(0, m_guildId);
@@ -398,21 +399,21 @@ bool Guild::BankTab::LoadItemFromDB(Field* fields)
uint32 itemEntry = fields[15].GetUInt32();
if (slotId >= GUILD_BANK_MAX_SLOTS)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
+ TC_LOG_ERROR("guild", "Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
return false;
}
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry);
if (!proto)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
+ TC_LOG_ERROR("guild", "Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
return false;
}
Item* pItem = NewItemOrBag(proto);
if (!pItem->LoadFromDB(itemGuid, 0, fields, itemEntry))
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry);
+ TC_LOG_ERROR("guild", "Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_NONEXISTENT_GUILD_BANK_ITEM);
stmt->setUInt32(0, m_guildId);
@@ -572,13 +573,13 @@ void Guild::BankTab::SendText(Guild const* guild, WorldSession* session) const
if (session)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_QUERY_GUILD_BANK_TEXT [%s]: Tabid: %u, Text: %s"
+ TC_LOG_DEBUG("guild", "MSG_QUERY_GUILD_BANK_TEXT [%s]: Tabid: %u, Text: %s"
, session->GetPlayerInfo().c_str(), m_tabId, m_text.c_str());
session->SendPacket(&data);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_QUERY_GUILD_BANK_TEXT [Broadcast]: Tabid: %u, Text: %s", m_tabId, m_text.c_str());
+ TC_LOG_DEBUG("guild", "MSG_QUERY_GUILD_BANK_TEXT [Broadcast]: Tabid: %u, Text: %s", m_tabId, m_text.c_str());
guild->BroadcastPacket(&data);
}
}
@@ -676,7 +677,7 @@ bool Guild::Member::LoadFromDB(Field* fields)
if (!m_zoneId)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Player (GUID: %u) has broken zone-data", GUID_LOPART(m_guid));
+ TC_LOG_ERROR("guild", "Player (GUID: %u) has broken zone-data", GUID_LOPART(m_guid));
m_zoneId = Player::GetZoneIdFromDB(m_guid);
}
ResetFlags();
@@ -688,13 +689,13 @@ bool Guild::Member::CheckStats() const
{
if (m_level < 1)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Player (GUID: %u) has a broken data in field `characters`.`level`, deleting him from guild!", GUID_LOPART(m_guid));
+ TC_LOG_ERROR("guild", "Player (GUID: %u) has a broken data in field `characters`.`level`, deleting him from guild!", GUID_LOPART(m_guid));
return false;
}
if (m_class < CLASS_WARRIOR || m_class >= MAX_CLASSES)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Player (GUID: %u) has a broken data in field `characters`.`class`, deleting him from guild!", GUID_LOPART(m_guid));
+ TC_LOG_ERROR("guild", "Player (GUID: %u) has a broken data in field `characters`.`class`, deleting him from guild!", GUID_LOPART(m_guid));
return false;
}
return true;
@@ -960,7 +961,7 @@ Item* Guild::BankMoveItemData::StoreItem(SQLTransaction& trans, Item* pItem)
ItemPosCount pos(*itr);
++itr;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u",
+ TC_LOG_DEBUG("guild", "GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u",
m_container, m_slotId, pItem->GetEntry(), pItem->GetCount());
pLastItem = _StoreItem(trans, pTab, pItem, pos, itr != m_vec.end());
}
@@ -1071,7 +1072,7 @@ void Guild::BankMoveItemData::CanStoreItemInTab(Item* pItem, uint8 skipSlotId, b
InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u",
+ TC_LOG_DEBUG("guild", "GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u",
m_container, m_slotId, pItem->GetEntry(), pItem->GetCount());
uint32 count = pItem->GetCount();
@@ -1169,7 +1170,7 @@ bool Guild::Create(Player* pLeader, std::string const& name)
m_createdDate = ::time(NULL);
_CreateLogHolders();
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "GUILD: creating guild [%s] for leader %s (%u)",
+ TC_LOG_DEBUG("guild", "GUILD: creating guild [%s] for leader %s (%u)",
name.c_str(), pLeader->GetName().c_str(), GUID_LOPART(m_leaderGuid));
SQLTransaction trans = CharacterDatabase.BeginTransaction();
@@ -1268,7 +1269,7 @@ void Guild::UpdateMemberData(Player* player, uint8 dataid, uint32 value)
member->SetLevel(value);
break;
default:
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Guild::UpdateMemberData: Called with incorrect DATAID %u (value %u)", dataid, value);
+ TC_LOG_ERROR("guild", "Guild::UpdateMemberData: Called with incorrect DATAID %u (value %u)", dataid, value);
return;
}
//HandleRoster();
@@ -1315,12 +1316,12 @@ void Guild::HandleRoster(WorldSession* session /*= NULL*/)
if (session)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_ROSTER [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_ROSTER [%s]", session->GetPlayerInfo().c_str());
session->SendPacket(&data);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_ROSTER [Broadcast]");
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_ROSTER [Broadcast]");
BroadcastPacket(&data);
}
}
@@ -1344,7 +1345,7 @@ void Guild::HandleQuery(WorldSession* session)
data << uint32(_GetRanksSize()); // Number of ranks used
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_QUERY_RESPONSE [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_QUERY_RESPONSE [%s]", session->GetPlayerInfo().c_str());
}
void Guild::HandleSetMOTD(WorldSession* session, std::string const& motd)
@@ -1433,7 +1434,7 @@ void Guild::HandleSetBankTabInfo(WorldSession* session, uint8 tabId, std::string
BankTab* tab = GetBankTab(tabId);
if (!tab)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Guild::HandleSetBankTabInfo: Player %s trying to change bank tab info from unexisting tab %d.",
+ TC_LOG_ERROR("guild", "Guild::HandleSetBankTabInfo: Player %s trying to change bank tab info from unexisting tab %d.",
session->GetPlayerInfo().c_str(), tabId);
return;
}
@@ -1468,7 +1469,7 @@ void Guild::HandleSetRankInfo(WorldSession* session, uint8 rankId, std::string c
SendCommandResult(session, GUILD_COMMAND_CHANGE_RANK, ERR_GUILD_PERMISSIONS);
else if (RankInfo* rankInfo = GetRankInfo(rankId))
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "Changed RankName to '%s', rights to 0x%08X", name.c_str(), rights);
+ TC_LOG_DEBUG("guild", "Changed RankName to '%s', rights to 0x%08X", name.c_str(), rights);
rankInfo->SetName(name);
rankInfo->SetRights(rights);
@@ -1553,7 +1554,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
SendCommandResult(session, GUILD_COMMAND_INVITE, ERR_GUILD_COMMAND_SUCCESS, name);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "Player %s invited %s to join his Guild", player->GetName().c_str(), name.c_str());
+ TC_LOG_DEBUG("guild", "Player %s invited %s to join his Guild", player->GetName().c_str(), name.c_str());
pInvitee->SetGuildIdInvited(m_id);
_LogEvent(GUILD_EVENT_LOG_INVITE_PLAYER, player->GetGUIDLow(), pInvitee->GetGUIDLow());
@@ -1562,7 +1563,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
data << player->GetName();
data << m_name;
pInvitee->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_INVITE [%s]", pInvitee->GetName().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_INVITE [%s]", pInvitee->GetName().c_str());
}
void Guild::HandleAcceptMember(WorldSession* session)
@@ -1749,8 +1750,8 @@ void Guild::HandleMemberDepositMoney(WorldSession* session, uint32 amount)
CharacterDatabase.CommitTransaction(trans);
- std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&amount), 8, true);
- _BroadcastEvent(GE_BANK_MONEY_CHANGED, 0, aux.c_str());
+ std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&m_bankMoney), 8, true);
+ _BroadcastEvent(GE_BANK_MONEY_SET, 0, aux.c_str());
if (player->GetSession()->HasPermission(rbac::RBAC_PERM_LOG_GM_TRADE))
{
@@ -1799,8 +1800,8 @@ bool Guild::HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool
_LogBankEvent(trans, repair ? GUILD_BANK_LOG_REPAIR_MONEY : GUILD_BANK_LOG_WITHDRAW_MONEY, uint8(0), player->GetGUIDLow(), amount);
CharacterDatabase.CommitTransaction(trans);
- std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&amount), 8, true);
- _BroadcastEvent(GE_BANK_MONEY_CHANGED, 0, aux.c_str());
+ std::string aux = ByteArrayToHexStr(reinterpret_cast<uint8*>(&m_bankMoney), 8, true);
+ _BroadcastEvent(GE_BANK_MONEY_SET, 0, aux.c_str());
return true;
}
@@ -1822,7 +1823,7 @@ void Guild::HandleDisband(WorldSession* session)
if (_IsLeader(session->GetPlayer()))
{
Disband();
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "Guild Successfully Disbanded");
+ TC_LOG_DEBUG("guild", "Guild Successfully Disbanded");
delete this;
}
}
@@ -1837,7 +1838,7 @@ void Guild::SendInfo(WorldSession* session) const
data << m_accountsNumber; // Number of accounts
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_INFO [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_INFO [%s]", session->GetPlayerInfo().c_str());
}
void Guild::SendEventLog(WorldSession* session) const
@@ -1845,7 +1846,7 @@ void Guild::SendEventLog(WorldSession* session) const
WorldPacket data(MSG_GUILD_EVENT_LOG_QUERY, 1 + m_eventLog->GetSize() * (1 + 8 + 4));
m_eventLog->WritePacket(data);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_EVENT_LOG_QUERY [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "MSG_GUILD_EVENT_LOG_QUERY [%s]", session->GetPlayerInfo().c_str());
}
void Guild::SendBankLog(WorldSession* session, uint8 tabId) const
@@ -1858,7 +1859,7 @@ void Guild::SendBankLog(WorldSession* session, uint8 tabId) const
data << uint8(tabId);
pLog->WritePacket(data);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_BANK_LOG_QUERY [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "MSG_GUILD_BANK_LOG_QUERY [%s]", session->GetPlayerInfo().c_str());
}
}
@@ -1899,7 +1900,7 @@ void Guild::SendPermissions(WorldSession* session) const
}
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_PERMISSIONS [%s] Rank: %u", session->GetPlayerInfo().c_str(), rankId);
+ TC_LOG_DEBUG("guild", "MSG_GUILD_PERMISSIONS [%s] Rank: %u", session->GetPlayerInfo().c_str(), rankId);
}
void Guild::SendMoneyInfo(WorldSession* session) const
@@ -1912,7 +1913,7 @@ void Guild::SendMoneyInfo(WorldSession* session) const
WorldPacket data(MSG_GUILD_BANK_MONEY_WITHDRAWN, 4);
data << int32(amount);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s] Money: %u", session->GetPlayerInfo().c_str(), amount);
+ TC_LOG_DEBUG("guild", "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s] Money: %u", session->GetPlayerInfo().c_str(), amount);
}
void Guild::SendLoginInfo(WorldSession* session)
@@ -1923,7 +1924,7 @@ void Guild::SendLoginInfo(WorldSession* session)
data << m_motd;
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_EVENT [%s] MOTD", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_EVENT [%s] MOTD", session->GetPlayerInfo().c_str());
SendBankTabsInfo(session);
@@ -2027,13 +2028,13 @@ bool Guild::LoadBankEventLogFromDB(Field* fields)
{
if (!isMoneyTab)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "GuildBankEventLog ERROR: MoneyEvent(LogGuid: %u, Guild: %u) does not belong to money tab (%u), ignoring...", guid, m_id, dbTabId);
+ TC_LOG_ERROR("guild", "GuildBankEventLog ERROR: MoneyEvent(LogGuid: %u, Guild: %u) does not belong to money tab (%u), ignoring...", guid, m_id, dbTabId);
return false;
}
}
else if (isMoneyTab)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "GuildBankEventLog ERROR: non-money event (LogGuid: %u, Guild: %u) belongs to money tab, ignoring...", guid, m_id);
+ TC_LOG_ERROR("guild", "GuildBankEventLog ERROR: non-money event (LogGuid: %u, Guild: %u) belongs to money tab, ignoring...", guid, m_id);
return false;
}
pLog->LoadEvent(new BankEventLogEntry(
@@ -2055,7 +2056,7 @@ void Guild::LoadBankTabFromDB(Field* fields)
{
uint8 tabId = fields[1].GetUInt8();
if (tabId >= _GetPurchasedTabsSize())
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Invalid tab (tabId: %u) in guild bank, skipped.", tabId);
+ TC_LOG_ERROR("guild", "Invalid tab (tabId: %u) in guild bank, skipped.", tabId);
else
m_bankTabs[tabId]->LoadFromDB(fields);
}
@@ -2065,7 +2066,7 @@ bool Guild::LoadBankItemFromDB(Field* fields)
uint8 tabId = fields[12].GetUInt8();
if (tabId >= _GetPurchasedTabsSize())
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.",
+ TC_LOG_ERROR("guild", "Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.",
fields[14].GetUInt32(), fields[15].GetUInt32());
return false;
}
@@ -2084,7 +2085,7 @@ bool Guild::Validate()
uint8 ranks = _GetRanksSize();
if (ranks < GUILD_RANKS_MIN_COUNT || ranks > GUILD_RANKS_MAX_COUNT)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Guild %u has invalid number of ranks, creating new...", m_id);
+ TC_LOG_ERROR("guild", "Guild %u has invalid number of ranks, creating new...", m_id);
broken_ranks = true;
}
else
@@ -2094,7 +2095,7 @@ bool Guild::Validate()
RankInfo* rankInfo = GetRankInfo(rankId);
if (rankInfo->GetId() != rankId)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId);
+ TC_LOG_ERROR("guild", "Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId);
broken_ranks = true;
}
else
@@ -2693,7 +2694,7 @@ void Guild::_MoveItems(MoveItemData* pSrc, MoveItemData* pDest, uint32 splitedAm
/*
if (pItemSrc->GetCount() == 0)
{
- TC_LOG_FATAL(LOG_FILTER_GUILD, "Guild::SwapItems: Player %s(GUIDLow: %u) tried to move item %u from tab %u slot %u to tab %u slot %u, but item %u has a stack of zero!",
+ TC_LOG_FATAL("guild", "Guild::SwapItems: Player %s(GUIDLow: %u) tried to move item %u from tab %u slot %u to tab %u slot %u, but item %u has a stack of zero!",
player->GetName(), player->GetGUIDLow(), pItemSrc->GetEntry(), tabId, slotId, destTabId, destSlotId, pItemSrc->GetEntry());
//return; // Commented out for now, uncomment when it's verified that this causes a crash!!
}
@@ -2857,8 +2858,8 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* par
BroadcastPacket(&data);
- if (sLog->ShouldLog(LOG_FILTER_GUILD, LOG_LEVEL_DEBUG))
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_EVENT [Broadcast] Event: %s (%u)", _GetGuildEventString(guildEvent).c_str(), guildEvent);
+ if (sLog->ShouldLog("guild", LOG_LEVEL_DEBUG))
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_EVENT [Broadcast] Event: %s (%u)", _GetGuildEventString(guildEvent).c_str(), guildEvent);
}
void Guild::_SendBankList(WorldSession* session /* = NULL*/, uint8 tabId /*= 0*/, bool sendAllSlots /*= false*/, SlotIds *slots /*= NULL*/) const
@@ -2898,7 +2899,7 @@ void Guild::_SendBankList(WorldSession* session /* = NULL*/, uint8 tabId /*= 0*/
numSlots = _GetMemberRemainingSlots(member, tabId);
data.put<uint32>(rempos, numSlots);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_BANK_LIST [%s]: TabId: %u, FullSlots: %u, slots: %d",
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_BANK_LIST [%s]: TabId: %u, FullSlots: %u, slots: %d",
session->GetPlayerInfo().c_str(), tabId, sendAllSlots, numSlots);
}
else /// @todo - Probably this is just sent to session + those that have sent CMSG_GUILD_BANKER_ACTIVATE
@@ -2914,7 +2915,7 @@ void Guild::_SendBankList(WorldSession* session /* = NULL*/, uint8 tabId /*= 0*/
uint32 numSlots = _GetMemberRemainingSlots(itr->second, tabId);
data.put<uint32>(rempos, numSlots);
player->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_BANK_LIST [%s]: TabId: %u, FullSlots: %u, slots: %u"
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_BANK_LIST [%s]: TabId: %u, FullSlots: %u, slots: %u"
, player->GetName().c_str(), tabId, sendAllSlots, numSlots);
}
}
@@ -2925,6 +2926,5 @@ void Guild::ResetTimes()
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
itr->second->ResetValues();
- // Hack... way to force client to ask for money/slots
- _BroadcastEvent(GE_RANK_UPDATED, 0, "0", GetRankInfo(0)->GetName().c_str());
+ _BroadcastEvent(GE_BANK_TAB_AND_MONEY_UPDATED, 0);
}
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h
index 4d8987dbbf0..c695d141afe 100644
--- a/src/server/game/Guilds/Guild.h
+++ b/src/server/game/Guilds/Guild.h
@@ -146,11 +146,11 @@ enum GuildEvents
GE_RANK_DELETED = 11,
GE_SIGNED_ON = 12,
GE_SIGNED_OFF = 13,
- GE_GUILDBANKBAGSLOTS_CHANGED = 14,
+ GE_GUILDBANKBAGSLOTS_CHANGED = 14, /// TODO: Sent when items are moved in gbank - all players with bank open will send tab query
GE_BANK_TAB_PURCHASED = 15,
GE_BANK_TAB_UPDATED = 16,
GE_BANK_MONEY_SET = 17,
- GE_BANK_MONEY_CHANGED = 18,
+ GE_BANK_TAB_AND_MONEY_UPDATED = 18,
GE_BANK_TEXT_CHANGED = 19,
};
@@ -471,7 +471,8 @@ private:
RankInfo(): m_guildId(0), m_rankId(GUILD_RANK_NONE), m_rights(GR_RIGHT_EMPTY), m_bankMoneyPerDay(0) { }
RankInfo(uint32 guildId) : m_guildId(guildId), m_rankId(GUILD_RANK_NONE), m_rights(GR_RIGHT_EMPTY), m_bankMoneyPerDay(0) { }
RankInfo(uint32 guildId, uint8 rankId, std::string const& name, uint32 rights, uint32 money) :
- m_guildId(guildId), m_rankId(rankId), m_name(name), m_rights(rights), m_bankMoneyPerDay(money) { }
+ m_guildId(guildId), m_rankId(rankId), m_name(name), m_rights(rights),
+ m_bankMoneyPerDay(rankId != GR_GUILDMASTER ? money : GUILD_WITHDRAW_MONEY_UNLIMITED) { }
void LoadFromDB(Field* fields);
void SaveToDB(SQLTransaction& trans) const;
diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp
index 1fcc6ec4e6e..66a763110c1 100644
--- a/src/server/game/Guilds/GuildMgr.cpp
+++ b/src/server/game/Guilds/GuildMgr.cpp
@@ -41,7 +41,7 @@ uint32 GuildMgr::GenerateGuildId()
{
if (NextGuildId >= 0xFFFFFFFE)
{
- TC_LOG_ERROR(LOG_FILTER_GUILD, "Guild ids overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("guild", "Guild ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return NextGuildId++;
@@ -91,7 +91,7 @@ Guild* GuildMgr::GetGuildByLeader(uint64 guid) const
void GuildMgr::LoadGuilds()
{
// 1. Load all guilds
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guilds definitions...");
+ TC_LOG_INFO("server.loading", "Loading guilds definitions...");
{
uint32 oldMSTime = getMSTime();
@@ -103,7 +103,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild definitions. DB table `guild` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild definitions. DB table `guild` is empty.");
return;
}
else
@@ -126,12 +126,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 2. Load all guild ranks
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guild ranks...");
+ TC_LOG_INFO("server.loading", "Loading guild ranks...");
{
uint32 oldMSTime = getMSTime();
@@ -143,7 +143,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
}
else
{
@@ -160,12 +160,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 3. Load all guild members
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guild members...");
+ TC_LOG_INFO("server.loading", "Loading guild members...");
{
uint32 oldMSTime = getMSTime();
@@ -182,7 +182,7 @@ void GuildMgr::LoadGuilds()
"LEFT JOIN characters c ON c.guid = gm.guid ORDER BY guildid ASC");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild members. DB table `guild_member` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild members. DB table `guild_member` is empty.");
else
{
uint32 count = 0;
@@ -199,12 +199,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 4. Load all guild bank tab rights
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading bank tab rights...");
+ TC_LOG_INFO("server.loading", "Loading bank tab rights...");
{
uint32 oldMSTime = getMSTime();
@@ -216,7 +216,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
}
else
{
@@ -233,12 +233,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 5. Load all event logs
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guild event logs...");
+ TC_LOG_INFO("server.loading", "Loading guild event logs...");
{
uint32 oldMSTime = getMSTime();
@@ -249,7 +249,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
}
else
{
@@ -266,12 +266,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 6. Load all bank event logs
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guild bank event logs...");
+ TC_LOG_INFO("server.loading", "Loading guild bank event logs...");
{
uint32 oldMSTime = getMSTime();
@@ -283,7 +283,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
}
else
{
@@ -300,12 +300,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 7. Load all guild bank tabs
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guild bank tabs...");
+ TC_LOG_INFO("server.loading", "Loading guild bank tabs...");
{
uint32 oldMSTime = getMSTime();
@@ -317,7 +317,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
}
else
{
@@ -334,12 +334,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 8. Fill all guild bank tabs
- TC_LOG_INFO(LOG_FILTER_GUILD, "Filling bank tabs with items...");
+ TC_LOG_INFO("guild", "Filling bank tabs with items...");
{
uint32 oldMSTime = getMSTime();
@@ -353,7 +353,7 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
}
else
{
@@ -370,12 +370,12 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 9. Validate loaded guild data
- TC_LOG_INFO(LOG_FILTER_GUILD, "Validating data of loaded guilds...");
+ TC_LOG_INFO("guild", "Validating data of loaded guilds...");
{
uint32 oldMSTime = getMSTime();
@@ -387,7 +387,7 @@ void GuildMgr::LoadGuilds()
delete guild;
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
}
diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp
index 7110768cf1f..3a5a5ba8bf0 100644
--- a/src/server/game/Handlers/AddonHandler.cpp
+++ b/src/server/game/Handlers/AddonHandler.cpp
@@ -22,13 +22,9 @@
#include "Opcodes.h"
#include "Log.h"
-AddonHandler::AddonHandler()
-{
-}
+AddonHandler::AddonHandler() { }
-AddonHandler::~AddonHandler()
-{
-}
+AddonHandler::~AddonHandler() { }
bool AddonHandler::BuildAddonPacket(WorldPacket* source, WorldPacket* target)
{
@@ -78,7 +74,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket* source, WorldPacket* target)
AddOnPacked >> enabled >> crc >> unk2;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2);
+ TC_LOG_DEBUG("network", "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2);
uint8 state = (enabled ? 2 : 1);
*target << uint8(state);
@@ -132,11 +128,11 @@ bool AddonHandler::BuildAddonPacket(WorldPacket* source, WorldPacket* target)
*target << uint32(count);
if (AddOnPacked.rpos() != AddOnPacked.size())
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "packet under read!");
+ TC_LOG_DEBUG("network", "packet under read!");
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Addon packet uncompress error :(");
+ TC_LOG_ERROR("network", "Addon packet uncompress error :(");
return false;
}
return true;
diff --git a/src/server/game/Handlers/ArenaTeamHandler.cpp b/src/server/game/Handlers/ArenaTeamHandler.cpp
index b2fa49233c3..824c5631da0 100644
--- a/src/server/game/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Handlers/ArenaTeamHandler.cpp
@@ -31,11 +31,11 @@
void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "MSG_INSPECT_ARENA_TEAMS");
+ TC_LOG_DEBUG("network", "MSG_INSPECT_ARENA_TEAMS");
uint64 guid;
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
+ TC_LOG_DEBUG("network", "Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
if (Player* player = ObjectAccessor::FindPlayer(guid))
{
@@ -52,7 +52,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ARENA_TEAM_QUERY");
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -66,7 +66,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_ROSTER");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ARENA_TEAM_ROSTER");
uint32 arenaTeamId; // arena team id
recvData >> arenaTeamId;
@@ -77,7 +77,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_INVITE");
+ TC_LOG_DEBUG("network", "CMSG_ARENA_TEAM_INVITE");
uint32 arenaTeamId; // arena team id
std::string invitedName;
@@ -141,7 +141,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
return;
}
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName().c_str(), invitedName.c_str());
+ TC_LOG_DEBUG("bg.battleground", "Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName().c_str(), invitedName.c_str());
player->SetArenaTeamIdInvited(arenaTeam->GetId());
@@ -150,12 +150,12 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
data << arenaTeam->GetName();
player->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_INVITE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_INVITE");
}
void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
+ TC_LOG_DEBUG("network", "CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
ArenaTeam* arenaTeam = sArenaTeamMgr->GetArenaTeamById(_player->GetArenaTeamIdInvited());
if (!arenaTeam)
@@ -188,7 +188,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recvData*/)
void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_DECLINE"); // empty opcode
+ TC_LOG_DEBUG("network", "CMSG_ARENA_TEAM_DECLINE"); // empty opcode
// Remove invite from player
_player->SetArenaTeamIdInvited(0);
@@ -196,7 +196,7 @@ void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recvData*/)
void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEAVE");
+ TC_LOG_DEBUG("network", "CMSG_ARENA_TEAM_LEAVE");
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -238,7 +238,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_DISBAND");
+ TC_LOG_DEBUG("network", "CMSG_ARENA_TEAM_DISBAND");
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -260,7 +260,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_REMOVE");
+ TC_LOG_DEBUG("network", "CMSG_ARENA_TEAM_REMOVE");
uint32 arenaTeamId;
std::string name;
@@ -306,7 +306,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEADER");
+ TC_LOG_DEBUG("network", "CMSG_ARENA_TEAM_LEADER");
uint32 arenaTeamId;
std::string name;
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index cceac0ef21f..8e86f43f19f 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -39,7 +39,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -149,7 +149,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
if (bid > MAX_MONEY_AMOUNT || buyout > MAX_MONEY_AMOUNT)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Player %s (GUID %u) attempted to sell item with higher price than max gold amount.", _player->GetName().c_str(), _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Player %s (GUID %u) attempted to sell item with higher price than max gold amount.", _player->GetName().c_str(), _player->GetGUIDLow());
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -158,14 +158,14 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(auctioneer));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(auctioneer));
return;
}
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction());
if (!auctionHouseEntry)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", GUID_LOPART(auctioneer));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", GUID_LOPART(auctioneer));
return;
}
@@ -268,7 +268,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName().c_str(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName().c_str(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sAuctionMgr->AddAItem(item);
auctionHouse->AddAuction(AH);
@@ -290,7 +290,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
Item* newItem = item->CloneItem(finalCount, _player);
if (!newItem)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
+ TC_LOG_ERROR("network", "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
delete AH;
return;
@@ -315,7 +315,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName().c_str(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", _player->GetName().c_str(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sAuctionMgr->AddAItem(newItem);
auctionHouse->AddAuction(AH);
@@ -363,7 +363,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
//this function is called when client bids or buys out auction
void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_PLACE_BID");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_PLACE_BID");
uint64 auctioneer;
uint32 auctionId;
@@ -377,7 +377,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
return;
}
@@ -490,7 +490,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
//this void is called when auction_owner cancels his auction
void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_REMOVE_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_REMOVE_ITEM");
uint64 auctioneer;
uint32 auctionId;
@@ -501,7 +501,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
return;
}
@@ -537,7 +537,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->itemGUIDLow);
+ TC_LOG_ERROR("network", "Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->itemGUIDLow);
SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -546,7 +546,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
{
SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
//this code isn't possible ... maybe there should be assert
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", player->GetGUIDLow(), auctionId);
+ TC_LOG_ERROR("network", "CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", player->GetGUIDLow(), auctionId);
return;
}
@@ -567,7 +567,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
//called when player lists his bids
void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_BIDDER_ITEMS");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_BIDDER_ITEMS");
uint64 guid; //NPC guid
uint32 listfrom; //page of auctions
@@ -578,14 +578,14 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
recvData >> outbiddedCount;
if (recvData.size() != (16 + outbiddedCount * 4))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recvData.size(), (16 + outbiddedCount * 4));
+ TC_LOG_ERROR("network", "Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recvData.size(), (16 + outbiddedCount * 4));
outbiddedCount = 0;
}
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
recvData.rfinish();
return;
}
@@ -624,7 +624,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
//this void sends player info about his auctions
void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_OWNER_ITEMS");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_OWNER_ITEMS");
uint32 listfrom;
uint64 guid;
@@ -635,7 +635,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -661,7 +661,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData)
//this void is called when player clicks on search button
void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_ITEMS");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_ITEMS");
std::string searchedname;
uint8 levelmin, levelmax, usable;
@@ -690,7 +690,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -728,7 +728,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
void WorldSession::HandleAuctionListPendingSales(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_PENDING_SALES");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_PENDING_SALES");
recvData.read_skip<uint64>();
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index db96c50347c..a88c2e146a1 100644
--- a/src/server/game/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
@@ -39,7 +39,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
@@ -86,7 +86,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
if (!sBattlemasterListStore.LookupEntry(bgTypeId_))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Battleground: invalid bgtype (%u) received. possible cheater? player guid %u", bgTypeId_, _player->GetGUIDLow());
+ TC_LOG_ERROR("network", "Battleground: invalid bgtype (%u) received. possible cheater? player guid %u", bgTypeId_, _player->GetGUIDLow());
return;
}
@@ -98,7 +98,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
BattlegroundTypeId bgTypeId = BattlegroundTypeId(bgTypeId_);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
// can do this, since it's battleground, not arena
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, 0);
@@ -189,7 +189,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
// send status packet (in queue)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType, 0);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",
+ TC_LOG_DEBUG("bg.battleground", "Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",
bgQueueTypeId, bgTypeId, _player->GetGUIDLow(), _player->GetName().c_str());
}
else
@@ -209,7 +209,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
if (err > 0)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: the following players are joining as group:");
+ TC_LOG_DEBUG("bg.battleground", "Battleground: the following players are joining as group:");
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
@@ -237,17 +237,17 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
member->GetSession()->SendPacket(&data);
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",
+ TC_LOG_DEBUG("bg.battleground", "Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",
bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName().c_str());
}
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: group end");
+ TC_LOG_DEBUG("bg.battleground", "Battleground: group end");
}
sBattlegroundMgr->ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
Battleground* bg = _player->GetBattleground();
if (!bg) // can't be received if player not in battleground
@@ -298,7 +298,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvDa
void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_PVP_LOG_DATA Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd MSG_PVP_LOG_DATA Message");
Battleground* bg = _player->GetBattleground();
if (!bg)
@@ -312,12 +312,12 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recvData*/)
sBattlegroundMgr->BuildPvpLogDataPacket(&data, bg);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent MSG_PVP_LOG_DATA Message");
+ TC_LOG_DEBUG("network", "WORLD: Sent MSG_PVP_LOG_DATA Message");
}
void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
uint32 bgTypeId;
recvData >> bgTypeId; // id from DBC
@@ -331,7 +331,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recvData)
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
if (!bl)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "BattlegroundHandler: invalid bgtype (%u) with player (Name: %s, GUID: %u) received.", bgTypeId, _player->GetName().c_str(), _player->GetGUIDLow());
+ TC_LOG_DEBUG("bg.battleground", "BattlegroundHandler: invalid bgtype (%u) with player (Name: %s, GUID: %u) received.", bgTypeId, _player->GetName().c_str(), _player->GetGUIDLow());
return;
}
@@ -351,14 +351,14 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
recvData >> type >> unk2 >> bgTypeId_ >> unk >> action;
if (!sBattlemasterListStore.LookupEntry(bgTypeId_))
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Invalid BgType!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Invalid BgType!",
GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action);
return;
}
if (!_player->InBattlegroundQueue())
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player not in queue!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player not in queue!",
GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action);
return;
}
@@ -371,14 +371,14 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
GroupQueueInfo ginfo;
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player not in queue (No player Group Info)!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player not in queue (No player Group Info)!",
GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action);
return;
}
// if action == 1, then instanceId is required
if (!ginfo.IsInvitedToBGInstanceGUID && action == 1)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player is not invited to any bg!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Player is not invited to any bg!",
GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action);
return;
}
@@ -388,7 +388,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
{
if (action)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Cant find BG with id %u!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u. Cant find BG with id %u!",
GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action, ginfo.IsInvitedToBGInstanceGUID);
return;
}
@@ -396,12 +396,12 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
if (!bg)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "BattlegroundHandler: bg_template not found for type id %u.", bgTypeId);
+ TC_LOG_ERROR("network", "BattlegroundHandler: bg_template not found for type id %u.", bgTypeId);
return;
}
}
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u.",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s ArenaType: %u, Unk: %u, BgType: %u, Action: %u.",
GetPlayerInfo().c_str(), type, unk2, bgTypeId_, action);
// expected bracket entry
@@ -420,12 +420,12 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data2, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
_player->GetSession()->SendPacket(&data2);
action = 0;
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUIDLow());
+ TC_LOG_DEBUG("bg.battleground", "Player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUIDLow());
}
//if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue
if (_player->getLevel() > bg->GetMaxLevel())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
+ TC_LOG_ERROR("network", "Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
_player->GetName().c_str(), _player->GetGUIDLow(), _player->getLevel(), bg->GetMaxLevel(), bg->GetTypeID());
action = 0;
}
@@ -472,7 +472,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
// add only in HandleMoveWorldPortAck()
// bg->AddPlayer(_player, team);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
+ TC_LOG_DEBUG("bg.battleground", "Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
}
else // leave queue
{
@@ -485,7 +485,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team);
if (at)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
+ TC_LOG_DEBUG("bg.battleground", "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
at->MemberLost(_player, ginfo.OpponentsMatchmakerRating);
at->SaveToDB();
}
@@ -497,13 +497,13 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
if (!ginfo.ArenaType)
sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
+ TC_LOG_DEBUG("bg.battleground", "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName().c_str(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
}
}
void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
recvData.read_skip<uint8>(); // unk1
recvData.read_skip<uint8>(); // unk2
@@ -522,7 +522,7 @@ void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& recvData)
void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recvData*/)
{
// empty opcode
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Battleground status");
+ TC_LOG_DEBUG("network", "WORLD: Battleground status");
WorldPacket data;
// we must update all queues here
@@ -585,7 +585,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recvData*/)
void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
uint64 guid; // arena Battlemaster guid
uint8 arenaslot; // 2v2, 3v3 or 5v5
@@ -622,7 +622,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
arenatype = ARENA_TYPE_5v5;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Unknown arena slot %u at HandleBattlemasterJoinArena()", arenaslot);
+ TC_LOG_ERROR("network", "Unknown arena slot %u at HandleBattlemasterJoinArena()", arenaslot);
return;
}
@@ -630,7 +630,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(BATTLEGROUND_AA);
if (!bg)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Battleground: template bg (all arenas) not found");
+ TC_LOG_ERROR("network", "Battleground: template bg (all arenas) not found");
return;
}
@@ -697,10 +697,10 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
if (err > 0)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: arena join as group start");
+ TC_LOG_DEBUG("bg.battleground", "Battleground: arena join as group start");
if (isRated)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u", _player->GetArenaTeamId(arenaslot), _player->GetName().c_str(), matchmakerRating, arenatype);
+ TC_LOG_DEBUG("bg.battleground", "Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u", _player->GetArenaTeamId(arenaslot), _player->GetName().c_str(), matchmakerRating, arenatype);
bg->SetRated(true);
}
else
@@ -733,7 +733,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
member->GetSession()->SendPacket(&data);
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName().c_str());
+ TC_LOG_DEBUG("bg.battleground", "Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName().c_str());
}
}
else
@@ -746,7 +746,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
// send status packet (in queue)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype, 0);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, _player->GetGUIDLow(), _player->GetName().c_str());
+ TC_LOG_DEBUG("bg.battleground", "Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, _player->GetGUIDLow(), _player->GetName().c_str());
}
sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
@@ -759,11 +759,11 @@ void WorldSession::HandleReportPvPAFK(WorldPacket& recvData)
if (!reportedPlayer)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "WorldSession::HandleReportPvPAFK: player not found");
+ TC_LOG_DEBUG("bg.battleground", "WorldSession::HandleReportPvPAFK: player not found");
return;
}
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName().c_str(), reportedPlayer->GetName().c_str());
+ TC_LOG_DEBUG("bg.battleground", "WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName().c_str(), reportedPlayer->GetName().c_str());
reportedPlayer->ReportedAfkBy(_player);
}
diff --git a/src/server/game/Handlers/BattlefieldHandler.cpp b/src/server/game/Handlers/BattlefieldHandler.cpp
index 11e7789f275..c81822152d8 100644
--- a/src/server/game/Handlers/BattlefieldHandler.cpp
+++ b/src/server/game/Handlers/BattlefieldHandler.cpp
@@ -101,7 +101,7 @@ void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recvData)
uint8 Accepted;
recvData >> BattleId >> Accepted;
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
+ TC_LOG_DEBUG("misc", "HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
@@ -119,7 +119,7 @@ void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recvData)
uint8 Accepted;
recvData >> BattleId >> Accepted;
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
+ TC_LOG_DEBUG("misc", "HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
@@ -141,7 +141,7 @@ void WorldSession::HandleBfExitRequest(WorldPacket & recvData)
uint32 BattleId;
recvData >> BattleId;
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "HandleBfExitRequest: BattleID:%u ", BattleId);
+ TC_LOG_DEBUG("misc", "HandleBfExitRequest: BattleID:%u ", BattleId);
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index c1756311bc1..b5887ea7c00 100644
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -51,7 +51,7 @@ Copied events should probably have a new owner
void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
{
uint64 guid = _player->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_CALENDAR [" UI64FMTD "]", guid);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_CALENDAR [" UI64FMTD "]", guid);
time_t currTime = time(NULL);
@@ -180,7 +180,7 @@ void WorldSession::HandleCalendarGetEvent(WorldPacket& recvData)
uint64 eventId;
recvData >> eventId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_EVENT. Player ["
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_EVENT. Player ["
UI64FMTD "] Event [" UI64FMTD "]", _player->GetGUID(), eventId);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
@@ -191,7 +191,7 @@ void WorldSession::HandleCalendarGetEvent(WorldPacket& recvData)
void WorldSession::HandleCalendarGuildFilter(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GUILD_FILTER [" UI64FMTD "]", _player->GetGUID());
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER [" UI64FMTD "]", _player->GetGUID());
uint32 minLevel;
uint32 maxLevel;
@@ -202,12 +202,12 @@ void WorldSession::HandleCalendarGuildFilter(WorldPacket& recvData)
if (Guild* guild = sGuildMgr->GetGuildById(_player->GetGuildId()))
guild->MassInviteToEvent(this, minLevel, maxLevel, minRank);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GUILD_FILTER: Min level [%d], Max level [%d], Min rank [%d]", minLevel, maxLevel, minRank);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GUILD_FILTER: Min level [%d], Max level [%d], Min rank [%d]", minLevel, maxLevel, minRank);
}
void WorldSession::HandleCalendarArenaTeam(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_ARENA_TEAM [" UI64FMTD "]", _player->GetGUID());
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_ARENA_TEAM [" UI64FMTD "]", _player->GetGUID());
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -292,7 +292,7 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recvData)
recvData.ReadPackedTime(timeZoneTime);
recvData >> flags;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_UPDATE_EVENT [" UI64FMTD "] EventId [" UI64FMTD
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_UPDATE_EVENT [" UI64FMTD "] EventId [" UI64FMTD
"], InviteId [" UI64FMTD "] Title %s, Description %s, type %u "
"Repeatable %u, MaxInvites %u, Dungeon ID %d, Time %u "
"Time2 %u, Flags %u", guid, eventId, inviteId, title.c_str(),
@@ -338,7 +338,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData)
recvData >> eventId >> inviteId;
recvData.ReadPackedTime(time);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COPY_EVENT [" UI64FMTD "], EventId [" UI64FMTD
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_COPY_EVENT [" UI64FMTD "], EventId [" UI64FMTD
"] inviteId [" UI64FMTD "] Time: %u", guid, eventId, inviteId, time);
if (CalendarEvent* oldEvent = sCalendarMgr->GetEvent(eventId))
@@ -360,7 +360,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData)
void WorldSession::HandleCalendarEventInvite(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_INVITE");
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_INVITE");
uint64 playerGuid = _player->GetGUID();
@@ -458,7 +458,7 @@ void WorldSession::HandleCalendarEventSignup(WorldPacket& recvData)
bool tentative;
recvData >> eventId >> tentative;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_SIGNUP [" UI64FMTD "] EventId [" UI64FMTD "] Tentative %u", guid, eventId, tentative);
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_SIGNUP [" UI64FMTD "] EventId [" UI64FMTD "] Tentative %u", guid, eventId, tentative);
if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(eventId))
{
@@ -485,7 +485,7 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket& recvData)
uint32 status;
recvData >> eventId >> inviteId >> status;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_RSVP [" UI64FMTD "] EventId ["
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_RSVP [" UI64FMTD "] EventId ["
UI64FMTD "], InviteId [" UI64FMTD "], status %u", guid, eventId,
inviteId, status);
@@ -525,7 +525,7 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket& recvData)
recvData.readPackGUID(invitee);
recvData >> inviteId >> ownerInviteId >> eventId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_REMOVE_INVITE ["
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_REMOVE_INVITE ["
UI64FMTD "] EventId [" UI64FMTD "], ownerInviteId ["
UI64FMTD "], Invitee ([" UI64FMTD "] id: [" UI64FMTD "])",
guid, eventId, ownerInviteId, invitee, inviteId);
@@ -555,7 +555,7 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket& recvData)
recvData.readPackGUID(invitee);
recvData >> eventId >> inviteId >> ownerInviteId >> status;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_STATUS [" UI64FMTD"] EventId ["
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_STATUS [" UI64FMTD"] EventId ["
UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
UI64FMTD "], status %u", guid, eventId, ownerInviteId, invitee, inviteId, status);
@@ -589,7 +589,7 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket& recvData)
recvData.readPackGUID(invitee);
recvData >> eventId >> inviteId >> ownerInviteId >> rank;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_EVENT_MODERATOR_STATUS [" UI64FMTD "] EventId ["
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_EVENT_MODERATOR_STATUS [" UI64FMTD "] EventId ["
UI64FMTD "] ownerInviteId [" UI64FMTD "], Invitee ([" UI64FMTD "] id: ["
UI64FMTD "], rank %u", guid, eventId, ownerInviteId, invitee, inviteId, rank);
@@ -615,7 +615,7 @@ void WorldSession::HandleCalendarComplain(WorldPacket& recvData)
uint64 complainGUID;
recvData >> eventId >> complainGUID;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COMPLAIN [" UI64FMTD "] EventId ["
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_COMPLAIN [" UI64FMTD "] EventId ["
UI64FMTD "] guid [" UI64FMTD "]", guid, eventId, complainGUID);
// what to do with complains?
@@ -626,7 +626,7 @@ void WorldSession::HandleCalendarGetNumPending(WorldPacket& /*recvData*/)
uint64 guid = _player->GetGUID();
uint32 pending = sCalendarMgr->GetPlayerNumPending(guid);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_GET_NUM_PENDING: [" UI64FMTD
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_GET_NUM_PENDING: [" UI64FMTD
"] Pending: %u", guid, pending);
WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4);
@@ -639,7 +639,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
uint32 mapId, difficulty;
uint8 toggleExtend;
recvData >> mapId >> difficulty>> toggleExtend;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_SET_SAVED_INSTANCE_EXTEND - MapId: %u, Difficulty: %u, ToggleExtend: %s", mapId, difficulty, toggleExtend ? "On" : "Off");
+ TC_LOG_DEBUG("network", "CMSG_SET_SAVED_INSTANCE_EXTEND - MapId: %u, Difficulty: %u, ToggleExtend: %s", mapId, difficulty, toggleExtend ? "On" : "Off");
/*
InstancePlayerBind* instanceBind = _player->GetBoundInstance(mapId, Difficulty(difficulty));
@@ -656,7 +656,7 @@ void WorldSession::HandleSetSavedInstanceExtend(WorldPacket& recvData)
void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "%s", add ? "SMSG_CALENDAR_RAID_LOCKOUT_ADDED" : "SMSG_CALENDAR_RAID_LOCKOUT_REMOVED");
+ TC_LOG_DEBUG("network", "%s", add ? "SMSG_CALENDAR_RAID_LOCKOUT_ADDED" : "SMSG_CALENDAR_RAID_LOCKOUT_REMOVED");
time_t currTime = time(NULL);
WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_REMOVED, (add ? 4 : 0) + 4 + 4 + 4 + 8);
@@ -679,7 +679,7 @@ void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save)
return;
uint64 guid = _player->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD
+ TC_LOG_DEBUG("network", "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD
"] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty());
time_t currTime = time(NULL);
diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp
index 1ac1e5c78ac..12f6b52bf0a 100644
--- a/src/server/game/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
@@ -28,7 +28,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
recvPacket >> channelId >> unknown1 >> unknown2 >> channelName >> password;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_JOIN_CHANNEL %s Channel: %u, unk1: %u, unk2: %u, channel: %s, password: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_JOIN_CHANNEL %s Channel: %u, unk1: %u, unk2: %u, channel: %s, password: %s",
GetPlayerInfo().c_str(), channelId, unknown1, unknown2, channelName.c_str(), password.c_str());
if (channelId)
@@ -59,7 +59,7 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> unk >> channelName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_LEAVE_CHANNEL %s Channel: %s, unk1: %u",
+ TC_LOG_DEBUG("chat.system", "CMSG_LEAVE_CHANNEL %s Channel: %s, unk1: %u",
GetPlayerInfo().c_str(), channelName.c_str(), unk);
if (channelName.empty())
@@ -78,7 +78,7 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "%s %s Channel: %s",
+ TC_LOG_DEBUG("chat.system", "%s %s Channel: %s",
recvPacket.GetOpcode() == CMSG_CHANNEL_DISPLAY_LIST ? "CMSG_CHANNEL_DISPLAY_LIST" : "CMSG_CHANNEL_LIST",
GetPlayerInfo().c_str(), channelName.c_str());
@@ -92,7 +92,7 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
std::string channelName, password;
recvPacket >> channelName >> password;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_PASSWORD %s Channel: %s, Password: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_PASSWORD %s Channel: %s, Password: %s",
GetPlayerInfo().c_str(), channelName.c_str(), password.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
@@ -105,7 +105,7 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_SET_OWNER %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_SET_OWNER %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -121,7 +121,7 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_OWNER %s Channel: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_OWNER %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
@@ -134,7 +134,7 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_MODERATOR %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_MODERATOR %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -150,7 +150,7 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_UNMODERATOR %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNMODERATOR %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -166,7 +166,7 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_MUTE %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_MUTE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -182,7 +182,7 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_UNMUTE %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNMUTE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -198,7 +198,7 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_INVITE %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_INVITE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -214,7 +214,7 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_KICK %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_KICK %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -230,7 +230,7 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_BAN %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_BAN %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -246,7 +246,7 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_UNBAN %s Channel: %s, Target: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNBAN %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
@@ -262,7 +262,7 @@ void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_ANNOUNCEMENTS %s Channel: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_CHANNEL_ANNOUNCEMENTS %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
@@ -281,14 +281,14 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
std::string channelName;
recvPacket >> channelName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_GET_CHANNEL_MEMBER_COUNT %s Channel: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_GET_CHANNEL_MEMBER_COUNT %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
{
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
{
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "SMSG_CHANNEL_MEMBER_COUNT %s Channel: %s Count: %u",
+ TC_LOG_DEBUG("chat.system", "SMSG_CHANNEL_MEMBER_COUNT %s Channel: %s Count: %u",
GetPlayerInfo().c_str(), channelName.c_str(), channel->GetNumPlayers());
WorldPacket data(SMSG_CHANNEL_MEMBER_COUNT, channel->GetName().size() + 1 + 4);
@@ -305,7 +305,7 @@ void WorldSession::HandleSetChannelWatch(WorldPacket &recvPacket)
std::string channelName;
recvPacket >> channelName;
- TC_LOG_DEBUG(LOG_FILTER_CHATSYS, "CMSG_SET_CHANNEL_WATCH %s Channel: %s",
+ TC_LOG_DEBUG("chat.system", "CMSG_SET_CHANNEL_WATCH %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
/*
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index f079d6af261..25164b82936 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -221,7 +221,7 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
do
{
uint32 guidlow = (*result)[0].GetUInt32();
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Loading char guid %u from account %u.", guidlow, GetAccountId());
+ TC_LOG_INFO("network", "Loading char guid %u from account %u.", guidlow, GetAccountId());
if (Player::BuildEnumData(result, &data))
{
// Do not allow banned characters to log in
@@ -310,7 +310,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
{
data << uint8(CHAR_CREATE_FAILED);
SendPacket(&data);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", class_, GetAccountId());
+ TC_LOG_ERROR("network", "Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", class_, GetAccountId());
return;
}
@@ -319,7 +319,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
{
data << uint8(CHAR_CREATE_FAILED);
SendPacket(&data);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", race_, GetAccountId());
+ TC_LOG_ERROR("network", "Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", race_, GetAccountId());
return;
}
@@ -327,7 +327,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
if (raceEntry->expansion > Expansion())
{
data << uint8(CHAR_CREATE_EXPANSION);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
+ TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
SendPacket(&data);
return;
}
@@ -336,7 +336,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
if (classEntry->expansion > Expansion())
{
data << uint8(CHAR_CREATE_EXPANSION_CLASS);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
+ TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
SendPacket(&data);
return;
}
@@ -368,7 +368,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
{
data << uint8(CHAR_NAME_NO_NAME);
SendPacket(&data);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Account:[%d] but tried to Create character with empty [name] ", GetAccountId());
+ TC_LOG_ERROR("network", "Account:[%d] but tried to Create character with empty [name] ", GetAccountId());
return;
}
@@ -635,7 +635,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
{
uint8 unk;
createInfo->Data >> unk;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Character creation %s (account %u) has unhandled tail data: [%u]", createInfo->Name.c_str(), GetAccountId(), unk);
+ TC_LOG_DEBUG("network", "Character creation %s (account %u) has unhandled tail data: [%u]", createInfo->Name.c_str(), GetAccountId(), unk);
}
Player newChar(this);
@@ -683,7 +683,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
AntiDOS.AllowOpcode(CMSG_CHAR_ENUM, true);
std::string IP_str = GetRemoteAddress();
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
+ TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sScriptMgr->OnPlayerCreate(&newChar);
sWorld->AddCharacterNameData(newChar.GetGUIDLow(), newChar.GetName(), newChar.getGender(), newChar.getRace(), newChar.getClass(), newChar.getLevel());
@@ -742,10 +742,10 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData)
return;
std::string IP_str = GetRemoteAddress();
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d, IP: %s deleted character: %s, GUID: %u, Level: %u", accountId, IP_str.c_str(), name.c_str(), GUID_LOPART(guid), level);
+ TC_LOG_INFO("entities.player.character", "Account: %d, IP: %s deleted character: %s, GUID: %u, Level: %u", accountId, IP_str.c_str(), name.c_str(), GUID_LOPART(guid), level);
sScriptMgr->OnPlayerDelete(guid);
- if (sLog->ShouldLog(LOG_FILTER_PLAYER_DUMP, LOG_LEVEL_INFO)) // optimize GetPlayerDump call
+ if (sLog->ShouldLog("entities.player.dump", LOG_LEVEL_INFO)) // optimize GetPlayerDump call
{
std::string dump;
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
@@ -766,20 +766,20 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
{
if (PlayerLoading() || GetPlayer() != NULL)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player tryes to login again, AccountId = %d", GetAccountId());
+ TC_LOG_ERROR("network", "Player tryes to login again, AccountId = %d", GetAccountId());
return;
}
m_playerLoading = true;
uint64 playerGuid = 0;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd Player Logon Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd Player Logon Message");
recvData >> playerGuid;
if (!IsLegitCharacterForAccount(GUID_LOPART(playerGuid)))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Account (%u) can't login with that character (%u).", GetAccountId(), GUID_LOPART(playerGuid));
+ TC_LOG_ERROR("network", "Account (%u) can't login with that character (%u).", GetAccountId(), GUID_LOPART(playerGuid));
KickPlayer();
return;
}
@@ -863,13 +863,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
data.put(0, linecount);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_MOTD)");
+ TC_LOG_DEBUG("network", "WORLD: Sent motd (SMSG_MOTD)");
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage(_FULLVERSION);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent server info");
+ TC_LOG_DEBUG("network", "WORLD: Sent server info");
}
//QueryResult* result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow());
@@ -892,7 +892,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
else
{
// remove wrong guild data
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.", pCurrChar->GetName().c_str(), pCurrChar->GetGUIDLow(), pCurrChar->GetGuildId());
+ TC_LOG_ERROR("network", "Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.", pCurrChar->GetName().c_str(), pCurrChar->GetGUIDLow(), pCurrChar->GetGuildId());
pCurrChar->SetInGuild(0);
}
}
@@ -1019,7 +1019,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
SendNotification(LANG_GM_ON);
std::string IP_str = GetRemoteAddress();
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d",
+ TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d",
GetAccountId(), IP_str.c_str(), pCurrChar->GetName().c_str(), pCurrChar->GetGUIDLow(), pCurrChar->getLevel());
if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED))
@@ -1033,7 +1033,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_ATWAR");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_FACTION_ATWAR");
uint32 repListID;
uint8 flag;
@@ -1047,7 +1047,7 @@ void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData)
//I think this function is never used :/ I dunno, but i guess this opcode not exists
void WorldSession::HandleSetFactionCheat(WorldPacket & /*recvData*/)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
+ TC_LOG_ERROR("network", "WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
GetPlayer()->GetReputationMgr().SendStates();
}
@@ -1081,7 +1081,7 @@ void WorldSession::HandleTutorialReset(WorldPacket & /*recvData*/)
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_WATCHED_FACTION");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_WATCHED_FACTION");
uint32 fact;
recvData >> fact;
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
@@ -1089,7 +1089,7 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_INACTIVE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_FACTION_INACTIVE");
uint32 replistid;
uint8 inactive;
recvData >> replistid >> inactive;
@@ -1099,14 +1099,14 @@ void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData)
void WorldSession::HandleShowingHelmOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_SHOWING_HELM for %s", _player->GetName().c_str());
+ TC_LOG_DEBUG("network", "CMSG_SHOWING_HELM for %s", _player->GetName().c_str());
recvData.read_skip<uint8>(); // unknown, bool?
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM);
}
void WorldSession::HandleShowingCloakOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str());
+ TC_LOG_DEBUG("network", "CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str());
recvData.read_skip<uint8>(); // unknown, bool?
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
}
@@ -1197,7 +1197,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult resu
CharacterDatabase.Execute(stmt);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), guidLow, newName.c_str());
+ TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), guidLow, newName.c_str());
WorldPacket data(SMSG_CHAR_RENAME, 1+8+(newName.size()+1));
data << uint8(RESPONSE_SUCCESS);
@@ -1307,7 +1307,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recvData)
void WorldSession::HandleAlterAppearance(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ALTER_APPEARANCE");
+ TC_LOG_DEBUG("network", "CMSG_ALTER_APPEARANCE");
uint32 Hair, Color, FacialHair, SkinColor;
recvData >> Hair >> Color >> FacialHair >> SkinColor;
@@ -1384,7 +1384,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
if (slot >= MAX_GLYPH_SLOT_INDEX)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
+ TC_LOG_DEBUG("network", "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
return;
}
@@ -1407,7 +1407,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
recvData >> guid;
if (!IsLegitCharacterForAccount(GUID_LOPART(guid)))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Account %u, IP: %s tried to customise character %u, but it does not belong to their account!",
+ TC_LOG_ERROR("network", "Account %u, IP: %s tried to customise character %u, but it does not belong to their account!",
GetAccountId(), GetRemoteAddress().c_str(), GUID_LOPART(guid));
recvData.rfinish();
KickPlayer();
@@ -1492,7 +1492,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
if (result)
{
std::string oldname = result->Fetch()[0].GetString();
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str());
+ TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), GUID_LOPART(guid), newName.c_str());
}
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
@@ -1528,7 +1528,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
void WorldSession::HandleEquipmentSetSave(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_SAVE");
+ TC_LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_SAVE");
uint64 setGuid;
recvData.readPackGUID(setGuid);
@@ -1580,7 +1580,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recvData)
void WorldSession::HandleEquipmentSetDelete(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_DELETE");
+ TC_LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_DELETE");
uint64 setGuid;
recvData.readPackGUID(setGuid);
@@ -1593,7 +1593,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recvData)
if (_player->IsInCombat())
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_USE");
+ TC_LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_USE");
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
@@ -1603,7 +1603,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recvData)
uint8 srcbag, srcslot;
recvData >> srcbag >> srcslot;
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
+ TC_LOG_DEBUG("entities.player.items", "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
// check if item slot is set to "ignored" (raw value == 1), must not be unequipped then
if (itemGuid == 1)
@@ -1652,7 +1652,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
if (!IsLegitCharacterForAccount(GUID_LOPART(guid)))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Account %u, IP: %s tried to factionchange character %u, but it does not belong to their account!",
+ TC_LOG_ERROR("network", "Account %u, IP: %s tried to factionchange character %u, but it does not belong to their account!",
GetAccountId(), GetRemoteAddress().c_str(), GUID_LOPART(guid));
recvData.rfinish();
KickPlayer();
@@ -2176,7 +2176,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
CharacterDatabase.CommitTransaction(trans);
std::string IP_str = GetRemoteAddress();
- TC_LOG_DEBUG(LOG_FILTER_PLAYER, "%s (IP: %s) changed race from %u to %u", GetPlayerInfo().c_str(), IP_str.c_str(), oldRace, race);
+ TC_LOG_DEBUG("entities.player", "%s (IP: %s) changed race from %u to %u", GetPlayerInfo().c_str(), IP_str.c_str(), oldRace, race);
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1 + 8 + (newname.size() + 1) + 1 + 1 + 1 + 1 + 1 + 1 + 1);
data << uint8(RESPONSE_SUCCESS);
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index 8570ad03220..bea3fc76cf2 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -50,7 +50,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (type >= MAX_CHAT_MSG_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CHAT: Wrong message type received: %u", type);
+ TC_LOG_ERROR("network", "CHAT: Wrong message type received: %u", type);
recvData.rfinish();
return;
}
@@ -114,7 +114,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
return;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination",
+ TC_LOG_ERROR("network", "Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
recvData.rfinish();
@@ -225,7 +225,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) && !ChatHandler(this).isValidChatMessage(msg.c_str()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName().c_str(),
+ TC_LOG_ERROR("network", "Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName().c_str(),
GetPlayer()->GetGUIDLow(), msg.c_str());
if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK))
@@ -481,7 +481,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CHAT: unknown message type %u, lang: %u", type, lang);
+ TC_LOG_ERROR("network", "CHAT: unknown message type %u, lang: %u", type, lang);
break;
}
}
@@ -503,7 +503,7 @@ namespace Trinity
{
public:
EmoteChatBuilder(Player const& player, uint32 text_emote, uint32 emote_num, Unit const* target)
- : i_player(player), i_text_emote(text_emote), i_emote_num(emote_num), i_target(target) {}
+ : i_player(player), i_text_emote(text_emote), i_emote_num(emote_num), i_target(target) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
@@ -595,7 +595,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData)
{
uint64 iguid;
uint8 unk;
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_CHAT_IGNORED");
+ //TC_LOG_DEBUG("network", "WORLD: Received CMSG_CHAT_IGNORED");
recvData >> iguid;
recvData >> unk; // probably related to spam reporting
@@ -611,7 +611,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData)
void WorldSession::HandleChannelDeclineInvite(WorldPacket &recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
+ TC_LOG_DEBUG("network", "Opcode %u", recvPacket.GetOpcode());
}
void WorldSession::SendPlayerNotFoundNotice(std::string const& name)
diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp
index a326ba54baa..3c5bdfd1f58 100644
--- a/src/server/game/Handlers/CombatHandler.cpp
+++ b/src/server/game/Handlers/CombatHandler.cpp
@@ -33,7 +33,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData)
uint64 guid;
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid));
Unit* pEnemy = ObjectAccessor::GetUnit(*_player, guid);
@@ -78,11 +78,11 @@ void WorldSession::HandleSetSheathedOpcode(WorldPacket& recvData)
uint32 sheathed;
recvData >> sheathed;
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed);
+ //TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed);
if (sheathed >= MAX_SHEATH_STATE)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Unknown sheath state %u ??", sheathed);
+ TC_LOG_ERROR("network", "Unknown sheath state %u ??", sheathed);
return;
}
diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp
index bff1f20008b..01c2257c3dc 100644
--- a/src/server/game/Handlers/DuelHandler.cpp
+++ b/src/server/game/Handlers/DuelHandler.cpp
@@ -41,9 +41,9 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
if (player == player->duel->initiator || !plTarget || player == plTarget || player->duel->startTime != 0 || plTarget->duel->startTime != 0)
return;
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_DUEL_ACCEPTED");
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player 1 is: %u (%s)", player->GetGUIDLow(), player->GetName().c_str());
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName().c_str());
+ //TC_LOG_DEBUG("network", "WORLD: Received CMSG_DUEL_ACCEPTED");
+ TC_LOG_DEBUG("network", "Player 1 is: %u (%s)", player->GetGUIDLow(), player->GetName().c_str());
+ TC_LOG_DEBUG("network", "Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName().c_str());
time_t now = time(NULL);
player->duel->startTimer = now;
@@ -55,7 +55,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
void WorldSession::HandleDuelCancelledOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DUEL_CANCELLED");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_DUEL_CANCELLED");
uint64 guid;
recvPacket >> guid;
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index 27ef4960f79..4333f4f75d4 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -59,7 +59,7 @@ void WorldSession::SendPartyResult(PartyOperation operation, const std::string&
void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_INVITE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_INVITE");
std::string membername;
recvData >> membername;
@@ -198,7 +198,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ACCEPT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_ACCEPT");
recvData.read_skip<uint32>();
Group* group = GetPlayer()->GetGroupInvite();
@@ -211,7 +211,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
if (group->GetLeaderGUID() == GetPlayer()->GetGUID())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleGroupAcceptOpcode: player %s(%d) tried to accept an invite to his own group", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
+ TC_LOG_ERROR("network", "HandleGroupAcceptOpcode: player %s(%d) tried to accept an invite to his own group", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
return;
}
@@ -250,7 +250,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_DECLINE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_DECLINE");
Group* group = GetPlayer()->GetGroupInvite();
if (!group)
@@ -273,7 +273,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recvData*/)
void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE_GUID");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_UNINVITE_GUID");
uint64 guid;
std::string reason;
@@ -283,7 +283,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
//can't uninvite yourself
if (guid == GetPlayer()->GetGUID())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandleGroupUninviteGuidOpcode: leader %s(%d) tried to uninvite himself from the group.",
+ TC_LOG_ERROR("network", "WorldSession::HandleGroupUninviteGuidOpcode: leader %s(%d) tried to uninvite himself from the group.",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
return;
}
@@ -322,7 +322,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_UNINVITE");
std::string membername;
recvData >> membername;
@@ -334,7 +334,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData)
// can't uninvite yourself
if (GetPlayer()->GetName() == membername)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandleGroupUninviteOpcode: leader %s(%d) tried to uninvite himself from the group.",
+ TC_LOG_ERROR("network", "WorldSession::HandleGroupUninviteOpcode: leader %s(%d) tried to uninvite himself from the group.",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
return;
}
@@ -367,7 +367,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_SET_LEADER");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_SET_LEADER");
uint64 guid;
recvData >> guid;
@@ -388,7 +388,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_DISBAND");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_DISBAND");
Group* grp = GetPlayer()->GetGroup();
if (!grp)
@@ -411,7 +411,7 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recvData*/)
void WorldSession::HandleLootMethodOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LOOT_METHOD");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LOOT_METHOD");
uint32 lootMethod;
uint64 lootMaster;
@@ -462,7 +462,7 @@ void WorldSession::HandleLootRoll(WorldPacket& recvData)
void WorldSession::HandleMinimapPingOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_MINIMAP_PING");
+ TC_LOG_DEBUG("network", "WORLD: Received MSG_MINIMAP_PING");
if (!GetPlayer()->GetGroup())
return;
@@ -486,7 +486,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recvData)
void WorldSession::HandleRandomRollOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RANDOM_ROLL");
+ TC_LOG_DEBUG("network", "WORLD: Received MSG_RANDOM_ROLL");
uint32 minimum, maximum, roll;
recvData >> minimum;
@@ -515,7 +515,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recvData)
void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_TARGET_UPDATE");
+ TC_LOG_DEBUG("network", "WORLD: Received MSG_RAID_TARGET_UPDATE");
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -545,7 +545,7 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_RAID_CONVERT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_RAID_CONVERT");
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -566,7 +566,7 @@ void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recvData*/)
void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP");
// we will get correct pointer for group here, so we don't have to check if group is BG raid
Group* group = GetPlayer()->GetGroup();
@@ -605,7 +605,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER");
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -626,7 +626,7 @@ void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket& recvData)
void WorldSession::HandlePartyAssignmentOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_PARTY_ASSIGNMENT");
+ TC_LOG_DEBUG("network", "WORLD: Received MSG_PARTY_ASSIGNMENT");
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -660,7 +660,7 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket& recvData)
void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_READY_CHECK");
+ TC_LOG_DEBUG("network", "WORLD: Received MSG_RAID_READY_CHECK");
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -893,7 +893,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
/*this procedure handles clients CMSG_REQUEST_PARTY_MEMBER_STATS request*/
void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
uint64 Guid;
recvData >> Guid;
@@ -1039,7 +1039,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
void WorldSession::HandleOptOutOfLootOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_OPT_OUT_OF_LOOT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_OPT_OUT_OF_LOOT");
uint32 passOnLoot;
recvData >> passOnLoot; // 1 always pass, 0 do not pass
@@ -1048,7 +1048,7 @@ void WorldSession::HandleOptOutOfLootOpcode(WorldPacket& recvData)
if (!GetPlayer()) // needed because STATUS_AUTHED
{
if (passOnLoot != 0)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CMSG_OPT_OUT_OF_LOOT value<>0 for not-loaded character!");
+ TC_LOG_ERROR("network", "CMSG_OPT_OUT_OF_LOOT value<>0 for not-loaded character!");
return;
}
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index aa7c4b0b34a..96f1ce49d47 100644
--- a/src/server/game/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
@@ -33,7 +33,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
uint32 guildId;
recvPacket >> guildId;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_QUERY [%s]: Guild: %u", GetPlayerInfo().c_str(), guildId);
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_QUERY [%s]: Guild: %u", GetPlayerInfo().c_str(), guildId);
if (!guildId)
return;
@@ -43,7 +43,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_CREATE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GUILD_CREATE");
std::string name;
recvPacket >> name;
@@ -63,7 +63,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
std::string invitedName;
recvPacket >> invitedName;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_INVITE [%s]: Invited: %s", GetPlayerInfo().c_str(), invitedName.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_INVITE [%s]: Invited: %s", GetPlayerInfo().c_str(), invitedName.c_str());
if (normalizePlayerName(invitedName))
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleInviteMember(this, invitedName);
@@ -74,7 +74,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_REMOVE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_REMOVE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -83,7 +83,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ACCEPT [%s]", GetPlayer()->GetName().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_ACCEPT [%s]", GetPlayer()->GetName().c_str());
if (!GetPlayer()->GetGuildId())
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited()))
@@ -92,7 +92,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DECLINE [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_DECLINE [%s]", GetPlayerInfo().c_str());
GetPlayer()->SetGuildIdInvited(0);
GetPlayer()->SetInGuild(0);
@@ -100,7 +100,7 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_INFO [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_INFO [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendInfo(this);
@@ -108,7 +108,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ROSTER [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_ROSTER [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRoster(this);
@@ -121,7 +121,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_PROMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_PROMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -133,7 +133,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DEMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_DEMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -142,7 +142,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_LEAVE [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_LEAVE [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleLeaveMember(this);
@@ -150,7 +150,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DISBAND [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_DISBAND [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleDisband(this);
@@ -161,7 +161,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
std::string name;
recvPacket >> name;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_LEADER [%s]: Target: %s", GetPlayerInfo().c_str(), name.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_LEADER [%s]: Target: %s", GetPlayerInfo().c_str(), name.c_str());
if (normalizePlayerName(name))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -173,7 +173,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
std::string motd;
recvPacket >> motd;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_MOTD [%s]: MOTD: %s", GetPlayerInfo().c_str(), motd.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_MOTD [%s]: MOTD: %s", GetPlayerInfo().c_str(), motd.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleSetMOTD(this, motd);
@@ -185,7 +185,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
std::string note;
recvPacket >> playerName >> note;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_SET_PUBLIC_NOTE [%s]: Target: %s, Note: %s",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_SET_PUBLIC_NOTE [%s]: Target: %s, Note: %s",
GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
if (normalizePlayerName(playerName))
@@ -199,7 +199,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
std::string note;
recvPacket >> playerName >> note;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_SET_OFFICER_NOTE [%s]: Target: %s, Note: %s",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_SET_OFFICER_NOTE [%s]: Target: %s, Note: %s",
GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
if (normalizePlayerName(playerName))
@@ -221,7 +221,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
uint32 money;
recvPacket >> money;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_RANK [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), rankId);
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_RANK [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), rankId);
Guild* guild = GetPlayer()->GetGuild();
if (!guild)
@@ -251,7 +251,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
std::string rankName;
recvPacket >> rankName;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ADD_RANK [%s]: Rank: %s", GetPlayerInfo().c_str(), rankName.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_ADD_RANK [%s]: Rank: %s", GetPlayerInfo().c_str(), rankName.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleAddNewRank(this, rankName);
@@ -259,7 +259,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DEL_RANK [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_DEL_RANK [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRemoveLowestRank(this);
@@ -270,7 +270,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
std::string info;
recvPacket >> info;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_INFO_TEXT [%s]: %s", GetPlayerInfo().c_str(), info.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_INFO_TEXT [%s]: %s", GetPlayerInfo().c_str(), info.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleSetInfo(this, info);
@@ -284,7 +284,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
EmblemInfo emblemInfo;
emblemInfo.ReadPacket(recvPacket);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_SAVE_GUILD_EMBLEM [%s]: Guid: [" UI64FMTD
+ TC_LOG_DEBUG("guild", "MSG_SAVE_GUILD_EMBLEM [%s]: Guid: [" UI64FMTD
"] Style: %d, Color: %d, BorderStyle: %d, BorderColor: %d, BackgroundColor: %d"
, GetPlayerInfo().c_str(), vendorGuid, emblemInfo.GetStyle()
, emblemInfo.GetColor(), emblemInfo.GetBorderStyle()
@@ -307,7 +307,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_EVENT_LOG_QUERY [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "MSG_GUILD_EVENT_LOG_QUERY [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendEventLog(this);
@@ -315,7 +315,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recvData */)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendMoneyInfo(this);
@@ -323,7 +323,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recvData */)
void WorldSession::HandleGuildPermissions(WorldPacket& /* recvData */)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "MSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendPermissions(this);
@@ -336,7 +336,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket& recvData)
bool sendAllSlots;
recvData >> guid >> sendAllSlots;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [" UI64FMTD "] AllSlots: %u"
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [" UI64FMTD "] AllSlots: %u"
, GetPlayerInfo().c_str(), guid, sendAllSlots);
Guild* const guild = GetPlayer()->GetGuild();
@@ -358,7 +358,7 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket& recvData)
recvData >> guid >> tabId >> full;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, ShowTabs: %u"
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, ShowTabs: %u"
, GetPlayerInfo().c_str(), guid, tabId, full);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -372,7 +372,7 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket& recvData)
uint32 money;
recvData >> guid >> money;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
GetPlayerInfo().c_str(), guid, money);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -387,7 +387,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvData)
uint32 money;
recvData >> guid >> money;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
GetPlayerInfo().c_str(), guid, money);
if (money && GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -397,7 +397,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvData)
void WorldSession::HandleGuildBankSwapItems(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_SWAP_ITEMS [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_SWAP_ITEMS [%s]", GetPlayerInfo().c_str());
uint64 GoGuid;
recvData >> GoGuid;
@@ -483,7 +483,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket& recvData)
recvData >> guid >> tabId;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_BUY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u", GetPlayerInfo().c_str(), guid, tabId);
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_BUY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u", GetPlayerInfo().c_str(), guid, tabId);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -499,7 +499,7 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket& recvData)
recvData >> guid >> tabId >> name >> icon;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_UPDATE_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, Name: %s, Icon: %s"
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_UPDATE_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, Name: %s, Icon: %s"
, GetPlayerInfo().c_str(), guid, tabId, name.c_str(), icon.c_str());
if (!name.empty() && !icon.empty())
@@ -513,7 +513,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket& recvData)
uint8 tabId;
recvData >> tabId;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_BANK_LOG_QUERY [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
+ TC_LOG_DEBUG("guild", "MSG_GUILD_BANK_LOG_QUERY [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankLog(this, tabId);
@@ -524,7 +524,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recvData)
uint8 tabId;
recvData >> tabId;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_QUERY_GUILD_BANK_TEXT [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
+ TC_LOG_DEBUG("guild", "MSG_QUERY_GUILD_BANK_TEXT [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankTabText(this, tabId);
@@ -536,7 +536,7 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket &recvData)
std::string text;
recvData >> tabId >> text;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_SET_GUILD_BANK_TEXT [%s]: TabId: %u, Text: %s", GetPlayerInfo().c_str(), tabId, text.c_str());
+ TC_LOG_DEBUG("guild", "CMSG_SET_GUILD_BANK_TEXT [%s]: TabId: %u, Text: %s", GetPlayerInfo().c_str(), tabId, text.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SetBankTabText(tabId, text);
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 5f458edbb07..ad99c009a4f 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -30,7 +30,7 @@
void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_SPLIT_ITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_SPLIT_ITEM");
uint8 srcbag, srcslot, dstbag, dstslot;
uint32 count;
@@ -63,7 +63,7 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData)
void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_INV_ITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_SWAP_INV_ITEM");
uint8 srcslot, dstslot;
recvData >> dstslot >> srcslot;
@@ -112,7 +112,7 @@ void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket& recvData)
void WorldSession::HandleSwapItem(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_ITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_SWAP_ITEM");
uint8 dstbag, dstslot, srcbag, srcslot;
recvData >> dstbag >> dstslot >> srcbag >> srcslot;
@@ -142,7 +142,7 @@ void WorldSession::HandleSwapItem(WorldPacket& recvData)
void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOEQUIP_ITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_AUTOEQUIP_ITEM");
uint8 srcbag, srcslot;
recvData >> srcbag >> srcslot;
@@ -236,7 +236,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recvData)
void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_DESTROYITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_DESTROYITEM");
uint8 bag, slot, count, data1, data2, data3;
recvData >> bag >> slot >> count >> data1 >> data2 >> data3;
@@ -280,11 +280,11 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData)
// Only _static_ data send in this packet !!!
void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_ITEM_QUERY_SINGLE");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_ITEM_QUERY_SINGLE");
uint32 item;
recvData >> item;
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "STORAGE: Item Query = %u", item);
+ TC_LOG_INFO("network", "STORAGE: Item Query = %u", item);
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item);
if (pProto)
@@ -382,7 +382,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData)
else
{
data << uint32(spell->RecoveryTime);
- data << uint32(spell->Category);
+ data << uint32(spell->GetCategory());
data << uint32(spell->CategoryRecoveryTime);
}
}
@@ -430,7 +430,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item);
+ TC_LOG_DEBUG("network", "WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item);
WorldPacket data(SMSG_ITEM_QUERY_SINGLE_RESPONSE, 4);
data << uint32(item | 0x80000000);
SendPacket(&data);
@@ -439,12 +439,12 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData)
void WorldSession::HandleReadItem(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_READ_ITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_READ_ITEM");
uint8 bag, slot;
recvData >> bag >> slot;
- //TC_LOG_INFO(LOG_FILTER_NETWORKIO, "STORAGE: Read bag = %u, slot = %u", bag, slot);
+ //TC_LOG_INFO("network", "STORAGE: Read bag = %u, slot = %u", bag, slot);
Item* pItem = _player->GetItemByPos(bag, slot);
if (pItem && pItem->GetTemplate()->PageText)
@@ -455,12 +455,12 @@ void WorldSession::HandleReadItem(WorldPacket& recvData)
if (msg == EQUIP_ERR_OK)
{
data.Initialize (SMSG_READ_ITEM_OK, 8);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "STORAGE: Item page sent");
+ TC_LOG_INFO("network", "STORAGE: Item page sent");
}
else
{
data.Initialize(SMSG_READ_ITEM_FAILED, 8);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "STORAGE: Unable to read item");
+ TC_LOG_INFO("network", "STORAGE: Unable to read item");
_player->SendEquipError(msg, pItem, NULL);
}
data << pItem->GetGUID();
@@ -472,20 +472,20 @@ void WorldSession::HandleReadItem(WorldPacket& recvData)
void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_PAGE_TEXT_QUERY");
uint32 itemid;
uint64 guid;
recvData >> itemid >> guid;
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u",
+ TC_LOG_INFO("network", "Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u",
itemid, GUID_LOPART(guid), GUID_ENPART(guid), GUID_HIPART(guid));
}
void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SELL_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_SELL_ITEM");
uint64 vendorguid, itemguid;
uint32 count;
@@ -497,7 +497,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, itemguid, 0);
return;
}
@@ -559,7 +559,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
Item* pNewItem = pItem->CloneItem(count, _player);
if (!pNewItem)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count);
+ TC_LOG_ERROR("network", "WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count);
_player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, itemguid, 0);
return;
}
@@ -597,7 +597,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
void WorldSession::HandleBuybackItem(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUYBACK_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_BUYBACK_ITEM");
uint64 vendorguid;
uint32 slot;
@@ -606,7 +606,7 @@ void WorldSession::HandleBuybackItem(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
return;
}
@@ -645,7 +645,7 @@ void WorldSession::HandleBuybackItem(WorldPacket& recvData)
void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
uint64 vendorguid, bagguid;
uint32 item, slot, count;
uint8 bagslot;
@@ -687,7 +687,7 @@ void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket& recvData)
void WorldSession::HandleBuyItemOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_BUY_ITEM");
uint64 vendorguid;
uint32 item, slot, count;
uint8 unk1;
@@ -712,19 +712,19 @@ void WorldSession::HandleListInventoryOpcode(WorldPacket& recvData)
if (!GetPlayer()->IsAlive())
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LIST_INVENTORY");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_LIST_INVENTORY");
SendListInventory(guid);
}
void WorldSession::SendListInventory(uint64 vendorGuid)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_LIST_INVENTORY");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_LIST_INVENTORY");
Creature* vendor = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
if (!vendor)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorGuid)));
+ TC_LOG_DEBUG("network", "WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorGuid)));
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
return;
}
@@ -780,7 +780,7 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(vendor->GetEntry(), item->item);
if (!sConditionMgr->IsObjectMeetToConditions(_player, vendor, conditions))
{
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), item->item);
+ TC_LOG_DEBUG("condition", "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), item->item);
continue;
}
@@ -815,7 +815,7 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOSTORE_BAG_ITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_AUTOSTORE_BAG_ITEM");
uint8 srcbag, srcslot, dstbag;
recvData >> srcbag >> srcslot >> dstbag;
@@ -866,7 +866,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recvData)
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BUY_BANK_SLOT");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_BUY_BANK_SLOT");
uint64 guid;
recvPacket >> guid;
@@ -886,7 +886,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
// next slot
++slot;
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "PLAYER: Buy bank bag slot, slot number = %u", slot);
+ TC_LOG_INFO("network", "PLAYER: Buy bank bag slot, slot number = %u", slot);
BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot);
@@ -919,11 +919,11 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOBANK_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_AUTOBANK_ITEM");
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
+ TC_LOG_DEBUG("network", "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item* pItem = _player->GetItemByPos(srcbag, srcslot);
if (!pItem)
@@ -950,11 +950,11 @@ void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOSTORE_BANK_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_AUTOSTORE_BANK_ITEM");
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
+ TC_LOG_DEBUG("network", "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item* pItem = _player->GetItemByPos(srcbag, srcslot);
if (!pItem)
@@ -997,7 +997,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket& recvData)
return;
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SET_AMMO");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_SET_AMMO");
uint32 item;
recvData >> item;
@@ -1035,7 +1035,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket& recvData)
recvData >> itemid;
recvData.read_skip<uint64>(); // guid
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
+ TC_LOG_DEBUG("network", "WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
ItemSetNameEntry const* pName = sObjectMgr->GetItemSetNameEntry(itemid);
if (pName)
{
@@ -1055,14 +1055,14 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket& recvData)
void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_WRAP_ITEM");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_WRAP_ITEM");
uint8 gift_bag, gift_slot, item_bag, item_slot;
recvData >> gift_bag >> gift_slot; // paper
recvData >> item_bag >> item_slot; // item
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot);
+ TC_LOG_DEBUG("network", "WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot);
Item* gift = _player->GetItemByPos(gift_bag, gift_slot);
if (!gift)
@@ -1166,7 +1166,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData)
void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SOCKET_GEMS");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_SOCKET_GEMS");
uint64 item_guid;
uint64 gem_guids[MAX_GEM_SOCKETS];
@@ -1362,7 +1362,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
uint32 eslot;
@@ -1386,7 +1386,7 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recvData)
void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_REFUND_INFO");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_ITEM_REFUND_INFO");
uint64 guid;
recvData >> guid; // item guid
@@ -1394,7 +1394,7 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
Item* item = _player->GetItemByGuid(guid);
if (!item)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Item refund: item not found!");
+ TC_LOG_DEBUG("network", "Item refund: item not found!");
return;
}
@@ -1403,14 +1403,14 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
void WorldSession::HandleItemRefund(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_REFUND");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_ITEM_REFUND");
uint64 guid;
recvData >> guid; // item guid
Item* item = _player->GetItemByGuid(guid);
if (!item)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Item refund: item not found!");
+ TC_LOG_DEBUG("network", "Item refund: item not found!");
return;
}
@@ -1427,7 +1427,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket& recvData )
uint64 itemGuid;
recvData >> itemGuid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
+ TC_LOG_DEBUG("network", "CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index d289d0f65b8..b0780873e87 100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -61,7 +61,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
recvData >> numDungeons;
if (!numDungeons)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s no dungeons selected", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_JOIN %s no dungeons selected", GetPlayerInfo().c_str());
recvData.rfinish();
return;
}
@@ -78,7 +78,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
std::string comment;
recvData >> comment;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s roles: %u, Dungeons: %u, Comment: %s",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_JOIN %s roles: %u, Dungeons: %u, Comment: %s",
GetPlayerInfo().c_str(), roles, uint8(newDungeons.size()), comment.c_str());
sLFGMgr->JoinLfg(GetPlayer(), uint8(roles), newDungeons, comment);
@@ -90,7 +90,7 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
uint64 guid = GetPlayer()->GetGUID();
uint64 gguid = group ? group->GetGUID() : guid;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LEAVE %s in group: %u",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_LEAVE %s in group: %u",
GetPlayerInfo().c_str(), group ? 1 : 0);
// Check cheating - only leader can leave the queue
@@ -105,7 +105,7 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
recvData >> lfgGroupID;
recvData >> accept;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_PROPOSAL_RESULT %s proposal: %u accept: %u",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_PROPOSAL_RESULT %s proposal: %u accept: %u",
GetPlayerInfo().c_str(), lfgGroupID, accept ? 1 : 0);
sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
}
@@ -118,12 +118,12 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
Group* group = GetPlayer()->GetGroup();
if (!group)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES %s Not in group",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_ROLES %s Not in group",
GetPlayerInfo().c_str());
return;
}
uint64 gguid = group->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES: Group %u, Player %s, Roles: %u",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_ROLES: Group %u, Player %s, Roles: %u",
GUID_LOPART(gguid), GetPlayerInfo().c_str(), roles);
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
@@ -133,7 +133,7 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recvData)
std::string comment;
recvData >> comment;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_COMMENT %s comment: %s",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_COMMENT %s comment: %s",
GetPlayerInfo().c_str(), comment.c_str());
sLFGMgr->SetComment(GetPlayer()->GetGUID(), comment);
@@ -145,7 +145,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData)
recvData >> agree;
uint64 guid = GetPlayer()->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE %s agree: %u",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_BOOT_VOTE %s agree: %u",
GetPlayerInfo().c_str(), agree ? 1 : 0);
sLFGMgr->UpdateBoot(guid, agree);
}
@@ -155,7 +155,7 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
bool out;
recvData >> out;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_TELEPORT %s out: %u",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_TELEPORT %s out: %u",
GetPlayerInfo().c_str(), out ? 1 : 0);
sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
}
@@ -163,7 +163,7 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
uint64 guid = GetPlayer()->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST %s",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST %s",
GetPlayerInfo().c_str());
// Get Random dungeons that can be done at a certain level and expansion
@@ -176,7 +176,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
uint32 rsize = uint32(randomDungeons.size());
uint32 lsize = uint32(lock.size());
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_INFO %s", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_PLAYER_INFO %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_PLAYER_INFO, 1 + rsize * (4 + 1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4) + 4 + lsize * (1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4));
data << uint8(randomDungeons.size()); // Random Dungeon count
@@ -234,7 +234,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
uint64 guid = GetPlayer()->GetGUID();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST %s", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_PARTY_LOCK_INFO_REQUEST %s", GetPlayerInfo().c_str());
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -259,7 +259,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PARTY_INFO %s", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_PARTY_INFO %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
BuildPartyLockDungeonBlock(data, lockMap);
SendPacket(&data);
@@ -269,7 +269,7 @@ void WorldSession::HandleLfrJoinOpcode(WorldPacket& recvData)
{
uint32 entry; // Raid id to search
recvData >> entry;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LFR_JOIN %s dungeon entry: %u",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_LFR_JOIN %s dungeon entry: %u",
GetPlayerInfo().c_str(), entry);
//SendLfrUpdateListOpcode(entry);
}
@@ -278,14 +278,14 @@ void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recvData)
{
uint32 dungeonId; // Raid id queue to leave
recvData >> dungeonId;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LFR_LEAVE %s dungeonId: %u",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_LFR_LEAVE %s dungeonId: %u",
GetPlayerInfo().c_str(), dungeonId);
//sLFGMgr->LeaveLfr(GetPlayer(), dungeonId);
}
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
uint64 guid = GetPlayer()->GetGUID();
lfg::LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
@@ -322,7 +322,7 @@ void WorldSession::SendLfgUpdatePlayer(lfg::LfgUpdateData const& updateData)
break;
}
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
@@ -363,7 +363,7 @@ void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData)
break;
}
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
@@ -387,7 +387,7 @@ void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData)
void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHOSEN %s guid: %u roles: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_ROLE_CHOSEN %s guid: %u roles: %u",
GetPlayerInfo().c_str(), GUID_LOPART(guid), roles);
WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4);
@@ -405,7 +405,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
else
dungeons = roleCheck.dungeons;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHECK_UPDATE %s", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_ROLE_CHECK_UPDATE %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_ROLE_CHECK_UPDATE, 4 + 1 + 1 + dungeons.size() * 4 + 1 + roleCheck.roles.size() * (8 + 1 + 4 + 1));
data << uint32(roleCheck.state); // Check result
@@ -450,7 +450,7 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
for (lfg::LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_JOIN_RESULT %s checkResult: %u checkValue: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_JOIN_RESULT %s checkResult: %u checkValue: %u",
GetPlayerInfo().c_str(), joinData.result, joinData.state);
WorldPacket data(SMSG_LFG_JOIN_RESULT, 4 + 4 + size);
@@ -463,7 +463,7 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
void WorldSession::SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_QUEUE_STATUS %s dungeon: %u, waitTime: %d, "
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_QUEUE_STATUS %s dungeon: %u, waitTime: %d, "
"avgWaitTime: %d, waitTimeTanks: %d, waitTimeHealer: %d, waitTimeDps: %d, "
"queuedTime: %u, tanks: %u, healers: %u, dps: %u",
GetPlayerInfo().c_str(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg,
@@ -489,7 +489,7 @@ void WorldSession::SendLfgPlayerReward(lfg::LfgPlayerRewardData const& rewardDat
if (!rewardData.rdungeonEntry || !rewardData.sdungeonEntry || !rewardData.quest)
return;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_REWARD %s rdungeonEntry: %u, sdungeonEntry: %u, done: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_PLAYER_REWARD %s rdungeonEntry: %u, sdungeonEntry: %u, done: %u",
GetPlayerInfo().c_str(), rewardData.rdungeonEntry, rewardData.sdungeonEntry, rewardData.done);
uint8 itemNum = rewardData.quest->GetRewItemsCount();
@@ -534,7 +534,7 @@ void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
++agreeNum;
}
}
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_BOOT_PROPOSAL_UPDATE %s inProgress: %u - "
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_BOOT_PROPOSAL_UPDATE %s inProgress: %u - "
"didVote: %u - agree: %u - victim: %u votes: %u - agrees: %u - left: %u - "
"needed: %u - reason %s",
GetPlayerInfo().c_str(), uint8(boot.inProgress), uint8(playerVote != lfg::LFG_ANSWER_PENDING),
@@ -560,7 +560,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
bool silent = !proposal.isNew && gguid == proposal.group;
uint32 dungeonEntry = proposal.dungeonId;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PROPOSAL_UPDATE %s state: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_PROPOSAL_UPDATE %s state: %u",
GetPlayerInfo().c_str(), proposal.state);
// show random dungeon if player selected random dungeon and it's not lfg group
@@ -604,7 +604,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
void WorldSession::SendLfgLfrList(bool update)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_LFR_LIST %s update: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_LFR_LIST %s update: %u",
GetPlayerInfo().c_str(), update ? 1 : 0);
WorldPacket data(SMSG_LFG_UPDATE_SEARCH, 1);
data << uint8(update); // In Lfg Queue?
@@ -613,14 +613,14 @@ void WorldSession::SendLfgLfrList(bool update)
void WorldSession::SendLfgDisabled()
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_DISABLED %s", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_DISABLED %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_DISABLED, 0);
SendPacket(&data);
}
void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_OFFER_CONTINUE %s dungeon entry: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_OFFER_CONTINUE %s dungeon entry: %u",
GetPlayerInfo().c_str(), dungeonEntry);
WorldPacket data(SMSG_LFG_OFFER_CONTINUE, 4);
data << uint32(dungeonEntry);
@@ -629,7 +629,7 @@ void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
void WorldSession::SendLfgTeleportError(uint8 err)
{
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_TELEPORT_DENIED %s reason: %u",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_TELEPORT_DENIED %s reason: %u",
GetPlayerInfo().c_str(), err);
WorldPacket data(SMSG_LFG_TELEPORT_DENIED, 4);
data << uint32(err); // Error
@@ -639,7 +639,7 @@ void WorldSession::SendLfgTeleportError(uint8 err)
/*
void WorldSession::SendLfrUpdateListOpcode(uint32 dungeonEntry)
{
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "SMSG_LFG_UPDATE_LIST %s dungeon entry: %u",
+ TC_LOG_DEBUG("network", "SMSG_LFG_UPDATE_LIST %s dungeon entry: %u",
GetPlayerInfo().c_str(), dungeonEntry);
WorldPacket data(SMSG_LFG_UPDATE_LIST);
SendPacket(&data);
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index cdcf4c53dd3..9a371178044 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -33,7 +33,7 @@
void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
Player* player = GetPlayer();
uint64 lguid = player->GetLootGUID();
Loot* loot = NULL;
@@ -101,7 +101,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT_MONEY");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_LOOT_MONEY");
Player* player = GetPlayer();
uint64 guid = player->GetLootGUID();
@@ -217,7 +217,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleLootOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_LOOT");
uint64 guid;
recvData >> guid;
@@ -235,7 +235,7 @@ void WorldSession::HandleLootOpcode(WorldPacket& recvData)
void WorldSession::HandleLootReleaseOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT_RELEASE");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_LOOT_RELEASE");
// cheaters can modify lguid to prevent correct apply loot release code and re-loot
// use internal stored guid
@@ -414,7 +414,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
if (!target)
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName().c_str());
+ TC_LOG_DEBUG("network", "WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName().c_str());
if (_player->GetLootGUID() != lootguid)
return;
@@ -443,7 +443,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
if (slotid >= loot->items.size() + loot->quest_items.size())
{
- TC_LOG_DEBUG(LOG_FILTER_LOOT, "MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)",
+ TC_LOG_DEBUG("loot", "MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)",
GetPlayer()->GetName().c_str(), slotid, (unsigned long)loot->items.size());
return;
}
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index 27efe9d28d9..6fde51b7189 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -82,7 +82,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
if (!receiverGuid)
{
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Player %u is sending mail to %s (GUID: not existed!) with subject %s "
+ TC_LOG_INFO("network", "Player %u is sending mail to %s (GUID: not existed!) with subject %s "
"and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
player->GetGUIDLow(), receiverName.c_str(), subject.c_str(), body.c_str(),
items_count, money, COD, unk1, unk2);
@@ -90,7 +90,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
return;
}
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Player %u is sending mail to %s (GUID: %u) with subject %s and body %s "
+ TC_LOG_INFO("network", "Player %u is sending mail to %s (GUID: %u) with subject %s and body %s "
"includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
player->GetGUIDLow(), receiverName.c_str(), GUID_LOPART(receiverGuid), subject.c_str(),
body.c_str(), items_count, money, COD, unk1, unk2);
@@ -715,7 +715,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket& recvData)
bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender);
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_MAIL_TEXT_MASK);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandleMailCreateTextItem mailid=%u", mailId);
+ TC_LOG_INFO("network", "HandleMailCreateTextItem mailid=%u", mailId);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, bodyItem, false);
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 71453581ed0..4da0d829bae 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -58,7 +58,7 @@
void WorldSession::HandleRepopRequestOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_REPOP_REQUEST Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_REPOP_REQUEST Message");
recvData.read_skip<uint8>();
@@ -75,7 +75,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recvData)
// release spirit after he's killed but before he is updated
if (GetPlayer()->getDeathState() == JUST_DIED)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated",
+ TC_LOG_DEBUG("network", "HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
GetPlayer()->KillPlayer();
}
@@ -88,7 +88,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recvData)
void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_GOSSIP_SELECT_OPTION");
uint32 gossipListId;
uint32 menuId;
@@ -107,7 +107,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
}
@@ -116,13 +116,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
go = _player->GetMap()->GetGameObject(guid);
if (!go)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid)));
return;
}
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid)));
return;
}
@@ -132,7 +132,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
if ((unit && unit->GetCreatureTemplate()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id");
+ TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id");
if (unit)
unit->LastUsedScriptID = unit->GetCreatureTemplate()->ScriptID;
if (go)
@@ -173,7 +173,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_WHO Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_WHO Message");
time_t now = time(NULL);
if (now - timeLastWhoCommand < 5)
@@ -204,7 +204,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
uint32 temp;
recvData >> temp; // zone id, 0 if zone is unknown...
zoneids[i] = temp;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Zone %u: %u", i, zoneids[i]);
+ TC_LOG_DEBUG("network", "Zone %u: %u", i, zoneids[i]);
}
recvData >> str_count; // user entered strings count, client limit=4 (checked on 2.0.10)
@@ -212,7 +212,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
if (str_count > 4)
return; // can't be received from real client or broken packet
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count);
+ TC_LOG_DEBUG("network", "Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count);
std::wstring str[4]; // 4 is client limit
for (uint32 i = 0; i < str_count; ++i)
@@ -225,7 +225,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
wstrToLower(str[i]);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "String %u: %s", i, temp.c_str());
+ TC_LOG_DEBUG("network", "String %u: %s", i, temp.c_str());
}
std::wstring wplayer_name;
@@ -362,12 +362,12 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
data.put(4, matchcount); // insert right count, count of matches
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Send SMSG_WHO Message");
+ TC_LOG_DEBUG("network", "WORLD: Send SMSG_WHO Message");
}
void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity());
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity());
if (uint64 lguid = GetPlayer()->GetLootGUID())
DoLootRelease(lguid);
@@ -421,12 +421,12 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandlePlayerLogoutOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_PLAYER_LOGOUT Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_PLAYER_LOGOUT Message");
}
void WorldSession::HandleLogoutCancelOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LOGOUT_CANCEL Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_LOGOUT_CANCEL Message");
// Player have already logged out serverside, too late to cancel
if (!GetPlayer())
@@ -453,7 +453,7 @@ void WorldSession::HandleLogoutCancelOpcode(WorldPacket& /*recvData*/)
GetPlayer()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_LOGOUT_CANCEL_ACK Message");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_LOGOUT_CANCEL_ACK Message");
}
void WorldSession::HandleTogglePvP(WorldPacket& recvData)
@@ -492,7 +492,7 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket& recvData)
uint32 newZone;
recvData >> newZone;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd ZONE_UPDATE: %u", newZone);
+ TC_LOG_DEBUG("network", "WORLD: Recvd ZONE_UPDATE: %u", newZone);
// use server size data
uint32 newzone, newarea;
@@ -511,7 +511,7 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket& recvData)
void WorldSession::HandleStandStateChangeOpcode(WorldPacket& recvData)
{
- // TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop
+ // TC_LOG_DEBUG("network", "WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop
uint32 animstate;
recvData >> animstate;
@@ -522,13 +522,13 @@ void WorldSession::HandleContactListOpcode(WorldPacket& recvData)
{
uint32 unk;
recvData >> unk;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_CONTACT_LIST - Unk: %d", unk);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_CONTACT_LIST - Unk: %d", unk);
_player->GetSocial()->SendSocialList(_player);
}
void WorldSession::HandleAddFriendOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_FRIEND");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ADD_FRIEND");
std::string friendName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN);
std::string friendNote;
@@ -540,7 +540,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket& recvData)
if (!normalizePlayerName(friendName))
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: %s asked to add friend : '%s'",
+ TC_LOG_DEBUG("network", "WORLD: %s asked to add friend : '%s'",
GetPlayer()->GetName().c_str(), friendName.c_str());
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_RACE_ACC_BY_NAME);
@@ -592,7 +592,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(PreparedQueryResult result, std
if (!GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))
{
friendResult = FRIEND_LIST_FULL;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: %s's friend list is full.", GetPlayer()->GetName().c_str());
+ TC_LOG_DEBUG("network", "WORLD: %s's friend list is full.", GetPlayer()->GetName().c_str());
}
}
GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote);
@@ -602,14 +602,14 @@ void WorldSession::HandleAddFriendOpcodeCallBack(PreparedQueryResult result, std
sSocialMgr->SendFriendStatus(GetPlayer(), friendResult, GUID_LOPART(friendGuid), false);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)");
+ TC_LOG_DEBUG("network", "WORLD: Sent (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleDelFriendOpcode(WorldPacket& recvData)
{
uint64 FriendGUID;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_FRIEND");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_DEL_FRIEND");
recvData >> FriendGUID;
@@ -617,12 +617,12 @@ void WorldSession::HandleDelFriendOpcode(WorldPacket& recvData)
sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)");
+ TC_LOG_DEBUG("network", "WORLD: Sent motd (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleAddIgnoreOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_IGNORE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ADD_IGNORE");
std::string ignoreName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN);
@@ -631,7 +631,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket& recvData)
if (!normalizePlayerName(ignoreName))
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: %s asked to Ignore: '%s'",
+ TC_LOG_DEBUG("network", "WORLD: %s asked to Ignore: '%s'",
GetPlayer()->GetName().c_str(), ignoreName.c_str());
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_BY_NAME);
@@ -675,14 +675,14 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(PreparedQueryResult result)
sSocialMgr->SendFriendStatus(GetPlayer(), ignoreResult, GUID_LOPART(IgnoreGuid), false);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)");
+ TC_LOG_DEBUG("network", "WORLD: Sent (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleDelIgnoreOpcode(WorldPacket& recvData)
{
uint64 IgnoreGUID;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_IGNORE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_DEL_IGNORE");
recvData >> IgnoreGUID;
@@ -690,12 +690,12 @@ void WorldSession::HandleDelIgnoreOpcode(WorldPacket& recvData)
sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, GUID_LOPART(IgnoreGUID), false);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)");
+ TC_LOG_DEBUG("network", "WORLD: Sent motd (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleSetContactNotesOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_SET_CONTACT_NOTES");
+ TC_LOG_DEBUG("network", "CMSG_SET_CONTACT_NOTES");
uint64 guid;
std::string note;
recvData >> guid >> note;
@@ -712,12 +712,12 @@ void WorldSession::HandleBugOpcode(WorldPacket& recvData)
recvData >> typelen >> type;
if (suggestion == 0)
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Bug Report]");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_BUG [Bug Report]");
else
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Suggestion]");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_BUG [Suggestion]");
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "%s", type.c_str());
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "%s", content.c_str());
+ TC_LOG_DEBUG("network", "%s", type.c_str());
+ TC_LOG_DEBUG("network", "%s", content.c_str());
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_BUG_REPORT);
@@ -729,7 +729,7 @@ void WorldSession::HandleBugOpcode(WorldPacket& recvData)
void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RECLAIM_CORPSE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_RECLAIM_CORPSE");
uint64 guid;
recvData >> guid;
@@ -766,7 +766,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recvData)
void WorldSession::HandleResurrectResponseOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RESURRECT_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_RESURRECT_RESPONSE");
uint64 guid;
uint8 status;
@@ -810,12 +810,12 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
uint32 triggerId;
recvData >> triggerId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_AREATRIGGER. Trigger ID: %u", triggerId);
+ TC_LOG_DEBUG("network", "CMSG_AREATRIGGER. Trigger ID: %u", triggerId);
Player* player = GetPlayer();
if (player->IsInFlight())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u",
+ TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u",
player->GetName().c_str(), player->GetGUIDLow(), triggerId);
return;
}
@@ -823,14 +823,14 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(triggerId);
if (!atEntry)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u",
+ TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u",
player->GetName().c_str(), player->GetGUIDLow(), triggerId);
return;
}
if (player->GetMapId() != atEntry->mapid)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u",
+ TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u",
player->GetName().c_str(), atEntry->mapid, player->GetMapId(), player->GetGUIDLow(), triggerId);
return;
}
@@ -844,7 +844,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
float dist = player->GetDistance(atEntry->x, atEntry->y, atEntry->z);
if (dist > atEntry->radius + delta)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u",
+ TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u",
player->GetName().c_str(), player->GetGUIDLow(), atEntry->radius, dist, triggerId);
return;
}
@@ -875,7 +875,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
(fabs(dy) > atEntry->box_y / 2 + delta) ||
(fabs(dz) > atEntry->box_z / 2 + delta))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u",
+ TC_LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u",
player->GetName().c_str(), player->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotPlayerX, rotPlayerY, dz, triggerId);
return;
}
@@ -937,12 +937,12 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recvData)
void WorldSession::HandleUpdateAccountData(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
uint32 type, timestamp, decompressedSize;
recvData >> type >> timestamp >> decompressedSize;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize);
+ TC_LOG_DEBUG("network", "UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize);
if (type > NUM_ACCOUNT_DATA_TYPES)
return;
@@ -962,7 +962,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recvData)
if (decompressedSize > 0xFFFF)
{
recvData.rfinish(); // unnneded warning spam in this case
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "UAD: Account data packet too big, size %u", decompressedSize);
+ TC_LOG_ERROR("network", "UAD: Account data packet too big, size %u", decompressedSize);
return;
}
@@ -973,7 +973,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recvData)
if (uncompress(dest.contents(), &realSize, recvData.contents() + recvData.rpos(), recvData.size() - recvData.rpos()) != Z_OK)
{
recvData.rfinish(); // unnneded warning spam in this case
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "UAD: Failed to decompress account data");
+ TC_LOG_ERROR("network", "UAD: Failed to decompress account data");
return;
}
@@ -992,12 +992,12 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recvData)
void WorldSession::HandleRequestAccountData(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
uint32 type;
recvData >> type;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "RAD: type %u", type);
+ TC_LOG_DEBUG("network", "RAD: type %u", type);
if (type >= NUM_ACCOUNT_DATA_TYPES)
return;
@@ -1013,7 +1013,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recvData)
if (size && compress(dest.contents(), &destSize, (uint8 const*)adata->Data.c_str(), size) != Z_OK)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "RAD: Failed to compress account data");
+ TC_LOG_DEBUG("network", "RAD: Failed to compress account data");
return;
}
@@ -1033,7 +1033,7 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recvData)
uint8 button;
uint32 packetData;
recvData >> button >> packetData;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_SET_ACTION_BUTTON Button: %u Data: %u", button, packetData);
+ TC_LOG_DEBUG("network", "CMSG_SET_ACTION_BUTTON Button: %u Data: %u", button, packetData);
if (!packetData)
GetPlayer()->removeActionButton(button);
@@ -1043,18 +1043,18 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recvData)
void WorldSession::HandleCompleteCinematic(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_COMPLETE_CINEMATIC");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_COMPLETE_CINEMATIC");
}
void WorldSession::HandleNextCinematicCamera(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_NEXT_CINEMATIC_CAMERA");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_NEXT_CINEMATIC_CAMERA");
}
void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recvData)
{
/* WorldSession::Update(getMSTime());*/
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_MOVE_TIME_SKIPPED");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_MOVE_TIME_SKIPPED");
uint64 guid;
recvData.readPackGUID(guid);
@@ -1064,7 +1064,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recvData)
uint32 time_skipped;
recvData >> guid;
recvData >> time_skipped;
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_MOVE_TIME_SKIPPED");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_MOVE_TIME_SKIPPED");
//// @todo
must be need use in Trinity
@@ -1076,7 +1076,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recvData)
void WorldSession::HandleFeatherFallAck(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
// no used
recvData.rfinish(); // prevent warnings spam
@@ -1097,7 +1097,7 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket& recvData)
return;
}
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK");
recvData.read_skip<uint32>(); // unk
@@ -1123,7 +1123,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
return;
}
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_ROOT_ACK");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_FORCE_MOVE_ROOT_ACK");
recvData.read_skip<uint32>(); // unk
@@ -1141,7 +1141,7 @@ void WorldSession::HandleSetActionBarToggles(WorldPacket& recvData)
if (!GetPlayer()) // ignore until not logged (check needed because STATUS_AUTHED)
{
if (actionBar != 0)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored", uint32(actionBar));
+ TC_LOG_ERROR("network", "WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored", uint32(actionBar));
return;
}
@@ -1165,12 +1165,12 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recvData)
uint64 guid;
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_INSPECT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_INSPECT");
Player* player = ObjectAccessor::FindPlayer(guid);
if (!player)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_INSPECT: No player found from GUID: " UI64FMTD, guid);
+ TC_LOG_DEBUG("network", "CMSG_INSPECT: No player found from GUID: " UI64FMTD, guid);
return;
}
@@ -1201,7 +1201,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recvData)
if (!player)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "MSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, guid);
+ TC_LOG_DEBUG("network", "MSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, guid);
return;
}
@@ -1231,16 +1231,16 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recvData)
recvData >> PositionZ;
recvData >> Orientation; // o (3.141593 = 180 degrees)
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_WORLD_TELEPORT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_WORLD_TELEPORT");
if (GetPlayer()->IsInFlight())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.",
+ TC_LOG_DEBUG("network", "Player '%s' (GUID: %u) in flight, ignore worldport command.",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow());
return;
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_WORLD_TELEPORT: Player = %s, Time = %u, map = %u, x = %f, y = %f, z = %f, o = %f",
+ TC_LOG_DEBUG("network", "CMSG_WORLD_TELEPORT: Player = %s, Time = %u, map = %u, x = %f, y = %f, z = %f, o = %f",
GetPlayer()->GetName().c_str(), time, mapid, PositionX, PositionY, PositionZ, Orientation);
if (HasPermission(rbac::RBAC_PERM_OPCODE_WORLD_TELEPORT))
@@ -1251,7 +1251,7 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recvData)
void WorldSession::HandleWhoisOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_WHOIS");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_WHOIS");
std::string charname;
recvData >> charname;
@@ -1306,13 +1306,13 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recvData)
data << msg;
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received whois command from player %s for character %s",
+ TC_LOG_DEBUG("network", "Received whois command from player %s for character %s",
GetPlayer()->GetName().c_str(), charname.c_str());
}
void WorldSession::HandleComplainOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_COMPLAIN");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_COMPLAIN");
uint8 spam_type; // 0 - mail, 1 - chat
uint64 spammer_guid;
@@ -1347,12 +1347,12 @@ void WorldSession::HandleComplainOpcode(WorldPacket& recvData)
data << uint8(0);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str());
+ TC_LOG_DEBUG("network", "REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str());
}
void WorldSession::HandleRealmSplitOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_REALM_SPLIT");
+ TC_LOG_DEBUG("network", "CMSG_REALM_SPLIT");
uint32 unk;
std::string split_date = "01/01/01";
@@ -1372,22 +1372,22 @@ void WorldSession::HandleRealmSplitOpcode(WorldPacket& recvData)
void WorldSession::HandleFarSightOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_FAR_SIGHT");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_FAR_SIGHT");
bool apply;
recvData >> apply;
if (apply)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
if (WorldObject* target = _player->GetViewpoint())
_player->SetSeer(target);
else
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) requests non-existing seer " UI64FMTD, _player->GetName().c_str(), GUID_LOPART(_player->GetGUID()), _player->GetUInt64Value(PLAYER_FARSIGHT));
+ TC_LOG_ERROR("network", "Player %s (GUID: %u) requests non-existing seer " UI64FMTD, _player->GetName().c_str(), GUID_LOPART(_player->GetGUID()), _player->GetUInt64Value(PLAYER_FARSIGHT));
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "Player %u set vision to self", _player->GetGUIDLow());
_player->SetSeer(_player);
}
@@ -1396,7 +1396,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket& recvData)
void WorldSession::HandleSetTitleOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_SET_TITLE");
+ TC_LOG_DEBUG("network", "CMSG_SET_TITLE");
int32 title;
recvData >> title;
@@ -1415,27 +1415,27 @@ void WorldSession::HandleSetTitleOpcode(WorldPacket& recvData)
void WorldSession::HandleTimeSyncResp(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_TIME_SYNC_RESP");
+ TC_LOG_DEBUG("network", "CMSG_TIME_SYNC_RESP");
uint32 counter, clientTicks;
recvData >> counter >> clientTicks;
if (counter != _player->m_timeSyncCounter - 1)
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Wrong time sync counter from player %s (cheater?)", _player->GetName().c_str());
+ TC_LOG_DEBUG("network", "Wrong time sync counter from player %s (cheater?)", _player->GetName().c_str());
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
+ TC_LOG_DEBUG("network", "Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
uint32 ourTicks = clientTicks + (getMSTime() - _player->m_timeSyncServer);
// diff should be small
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency());
+ TC_LOG_DEBUG("network", "Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency());
_player->m_timeSyncClient = clientTicks;
}
void WorldSession::HandleResetInstancesOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_RESET_INSTANCES");
if (Group* group = _player->GetGroup())
{
@@ -1448,14 +1448,14 @@ void WorldSession::HandleResetInstancesOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "MSG_SET_DUNGEON_DIFFICULTY");
+ TC_LOG_DEBUG("network", "MSG_SET_DUNGEON_DIFFICULTY");
uint32 mode;
recvData >> mode;
if (mode >= MAX_DUNGEON_DIFFICULTY)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
+ TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
return;
}
@@ -1466,7 +1466,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
Map* map = _player->FindMap();
if (map && map->IsDungeon())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!",
+ TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: player (Name: %s, GUID: %u) tried to reset the instance while player is inside!",
_player->GetName().c_str(), _player->GetGUIDLow());
return;
}
@@ -1487,7 +1487,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
if (groupGuy->GetMap()->IsNonRaidDungeon())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!",
+ TC_LOG_DEBUG("network", "WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!",
_player->GetGUIDLow(), groupGuy->GetName().c_str(), groupGuy->GetGUIDLow());
return;
}
@@ -1507,14 +1507,14 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "MSG_SET_RAID_DIFFICULTY");
+ TC_LOG_DEBUG("network", "MSG_SET_RAID_DIFFICULTY");
uint32 mode;
recvData >> mode;
if (mode >= MAX_RAID_DIFFICULTY)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
+ TC_LOG_ERROR("network", "WorldSession::HandleSetRaidDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
return;
}
@@ -1522,7 +1522,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
Map* map = _player->FindMap();
if (map && map->IsDungeon())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;
}
@@ -1545,7 +1545,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
if (groupGuy->GetMap()->IsRaid())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;
}
}
@@ -1564,7 +1564,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
void WorldSession::HandleCancelMountAuraOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_MOUNT_AURA");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_CANCEL_MOUNT_AURA");
//If player is not mounted, so go out :)
if (!_player->IsMounted()) // not blizz like; no any messages on blizz
@@ -1585,7 +1585,7 @@ void WorldSession::HandleCancelMountAuraOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recvData)
{
// fly mode on/off
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
uint64 guid; // guid - unused
recvData.readPackGUID(guid);
@@ -1604,21 +1604,21 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recvData)
void WorldSession::HandleRequestPetInfoOpcode(WorldPacket& /*recvData */)
{
/*
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_REQUEST_PET_INFO");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_REQUEST_PET_INFO");
recvData.hexlike();
*/
}
void WorldSession::HandleSetTaxiBenchmarkOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SET_TAXI_BENCHMARK_MODE");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_SET_TAXI_BENCHMARK_MODE");
uint8 mode;
recvData >> mode;
mode ? _player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK) : _player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Client used \"/timetest %d\" command", mode);
+ TC_LOG_DEBUG("network", "Client used \"/timetest %d\" command", mode);
}
void WorldSession::HandleQueryInspectAchievements(WorldPacket& recvData)
@@ -1626,7 +1626,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket& recvData)
uint64 guid;
recvData.readPackGUID(guid);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_QUERY_INSPECT_ACHIEVEMENTS [" UI64FMTD "] Inspected Player [" UI64FMTD "]", _player->GetGUID(), guid);
+ TC_LOG_DEBUG("network", "CMSG_QUERY_INSPECT_ACHIEVEMENTS [" UI64FMTD "] Inspected Player [" UI64FMTD "]", _player->GetGUID(), guid);
Player* player = ObjectAccessor::FindPlayer(guid);
if (!player)
return;
@@ -1637,7 +1637,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket& recvData)
void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recvData*/)
{
// empty opcode
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4);
data << uint32(time(NULL));
@@ -1647,7 +1647,7 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recvData*/)
void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& /*recvData*/)
{
// empty opcode
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES");
SendAccountDataTimes(GLOBAL_CACHE_MASK);
}
@@ -1661,7 +1661,7 @@ void WorldSession::SendSetPhaseShift(uint32 PhaseShift)
// Battlefield and Battleground
void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
Battleground* bg = _player->GetBattleground();
@@ -1684,7 +1684,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recvData)
void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
Battleground* bg = _player->GetBattleground();
@@ -1732,7 +1732,7 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
if (!_player->HasPendingBind())
{
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!",
+ TC_LOG_INFO("network", "InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!",
_player->GetName().c_str(), _player->GetGUIDLow());
return;
}
@@ -1747,7 +1747,7 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
void WorldSession::HandleUpdateMissileTrajectory(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY");
uint64 guid;
uint32 spellId;
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index 36d1e1cb1ea..4b53dedc363 100644
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -35,7 +35,7 @@
void WorldSession::HandleMoveWorldportAckOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: got MSG_MOVE_WORLDPORT_ACK.");
+ TC_LOG_DEBUG("network", "WORLD: got MSG_MOVE_WORLDPORT_ACK.");
HandleMoveWorldportAckOpcode();
}
@@ -70,7 +70,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
if (GetPlayer()->IsInWorld())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) is still in world when teleported from map %s (%u) to new map %s (%u)", GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()), oldMap->GetMapName(), oldMap->GetId(), newMap ? newMap->GetMapName() : "Unknown", loc.GetMapId());
+ TC_LOG_ERROR("network", "Player %s (GUID: %u) is still in world when teleported from map %s (%u) to new map %s (%u)", GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()), oldMap->GetMapName(), oldMap->GetId(), newMap ? newMap->GetMapName() : "Unknown", loc.GetMapId());
oldMap->RemovePlayerFromMap(GetPlayer(), false);
}
@@ -79,12 +79,15 @@ void WorldSession::HandleMoveWorldportAckOpcode()
// while the player is in transit, for example the map may get full
if (!newMap || !newMap->CanEnter(GetPlayer()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Map %d (%s) could not be created for player %d (%s), porting player to homebind", loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown", GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
+ TC_LOG_ERROR("network", "Map %d (%s) could not be created for player %d (%s), porting player to homebind", loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown", GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
return;
}
- else
- GetPlayer()->Relocate(&loc);
+
+ float z = loc.GetPositionZ();
+ if (GetPlayer()->HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
+ z += GetPlayer()->GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
+ GetPlayer()->Relocate(loc.GetPositionX(), loc.GetPositionY(), z, loc.GetOrientation());
GetPlayer()->ResetMap();
GetPlayer()->SetMap(newMap);
@@ -92,7 +95,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->SendInitialPacketsBeforeAddToMap();
if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: failed to teleport player %s (%d) to map %d (%s) because of unknown reason!",
+ TC_LOG_ERROR("network", "WORLD: failed to teleport player %s (%d) to map %d (%s) because of unknown reason!",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow(), loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown");
GetPlayer()->ResetMap();
GetPlayer()->SetMap(oldMap);
@@ -193,15 +196,15 @@ void WorldSession::HandleMoveWorldportAckOpcode()
void WorldSession::HandleMoveTeleportAck(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "MSG_MOVE_TELEPORT_ACK");
+ TC_LOG_DEBUG("network", "MSG_MOVE_TELEPORT_ACK");
uint64 guid;
recvData.readPackGUID(guid);
uint32 flags, time;
recvData >> flags >> time;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Guid " UI64FMTD, guid);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Flags %u, time %u", flags, time/IN_MILLISECONDS);
+ TC_LOG_DEBUG("network", "Guid " UI64FMTD, guid);
+ TC_LOG_DEBUG("network", "Flags %u, time %u", flags, time/IN_MILLISECONDS);
Player* plMover = _player->m_mover->ToPlayer();
@@ -354,7 +357,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
uint32 mstime = getMSTime();
/*----------------------*/
- if(m_clientTimeDelay == 0)
+ if (m_clientTimeDelay == 0)
m_clientTimeDelay = mstime - movementInfo.time;
/* process position-change */
@@ -404,7 +407,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
{
uint32 opcode = recvData.GetOpcode();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
+ TC_LOG_DEBUG("network", "WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
/* extract packet */
uint64 guid;
@@ -450,7 +453,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT_BACK; force_move_type = MOVE_FLIGHT_BACK; break;
case CMSG_FORCE_PITCH_RATE_CHANGE_ACK: move_type = MOVE_PITCH_RATE; force_move_type = MOVE_PITCH_RATE; break;
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
+ TC_LOG_ERROR("network", "WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
return;
}
@@ -467,13 +470,13 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
{
if (_player->GetSpeed(move_type) > newspeed) // must be greater - just correct
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value",
+ TC_LOG_ERROR("network", "%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value",
move_type_name[move_type], _player->GetName().c_str(), _player->GetSpeed(move_type), newspeed);
_player->SetSpeed(move_type, _player->GetSpeedRate(move_type), true);
}
else // must be lesser - cheating
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
+ TC_LOG_DEBUG("misc", "Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
_player->GetName().c_str(), _player->GetSession()->GetAccountId(), _player->GetSpeed(move_type), newspeed);
_player->GetSession()->KickPlayer();
}
@@ -482,7 +485,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
uint64 guid;
recvData >> guid;
@@ -490,13 +493,13 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recvData)
if (GetPlayer()->IsInWorld())
{
if (_player->m_mover->GetGUID() != guid)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " (%s - Entry: %u) and should be " UI64FMTD, guid, GetLogNameForGuid(guid), GUID_ENPART(guid), _player->m_mover->GetGUID());
+ TC_LOG_ERROR("network", "HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " (%s - Entry: %u) and should be " UI64FMTD, guid, GetLogNameForGuid(guid), GUID_ENPART(guid), _player->m_mover->GetGUID());
}
}
void WorldSession::HandleMoveNotActiveMover(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
uint64 old_mover_guid;
recvData.readPackGUID(old_mover_guid);
@@ -519,7 +522,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_MOVE_KNOCK_BACK_ACK");
+ TC_LOG_DEBUG("network", "CMSG_MOVE_KNOCK_BACK_ACK");
uint64 guid;
recvData.readPackGUID(guid);
@@ -549,7 +552,7 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
void WorldSession::HandleMoveHoverAck(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_MOVE_HOVER_ACK");
+ TC_LOG_DEBUG("network", "CMSG_MOVE_HOVER_ACK");
uint64 guid; // guid - unused
recvData.readPackGUID(guid);
@@ -564,7 +567,7 @@ void WorldSession::HandleMoveHoverAck(WorldPacket& recvData)
void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_MOVE_WATER_WALK_ACK");
+ TC_LOG_DEBUG("network", "CMSG_MOVE_WATER_WALK_ACK");
uint64 guid; // guid - unused
recvData.readPackGUID(guid);
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index e3921eec02f..39489e75ab3 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -56,7 +56,7 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -78,14 +78,14 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket& recvData)
{
uint64 guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BANKER_ACTIVATE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_BANKER_ACTIVATE");
recvData >> guid;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -119,12 +119,12 @@ void WorldSession::SendTrainerList(uint64 guid)
void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList");
+ TC_LOG_DEBUG("network", "WORLD: SendTrainerList");
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -136,14 +136,14 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
if (!ci)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!", GUID_LOPART(guid));
return;
}
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
if (!trainer_spells)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
+ TC_LOG_DEBUG("network", "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
GUID_LOPART(guid), unit->GetEntry());
return;
}
@@ -237,12 +237,12 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
uint32 spellId = 0;
recvData >> guid >> spellId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u", uint32(GUID_LOPART(guid)), spellId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u", uint32(GUID_LOPART(guid)), spellId);
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -290,7 +290,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GOSSIP_HELLO");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GOSSIP_HELLO");
uint64 guid;
recvData >> guid;
@@ -298,7 +298,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -339,7 +339,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_GOSSIP_SELECT_OPTION");
uint32 option;
uint32 unk;
@@ -350,15 +350,15 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
if (_player->PlayerTalkClass->GossipOptionCoded(option))
{
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "reading string");
+ TC_LOG_DEBUG("network", "reading string");
recvData >> code;
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "string read: %s", code.c_str());
+ TC_LOG_DEBUG("network", "string read: %s", code.c_str());
}
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -380,7 +380,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
uint64 guid;
@@ -389,7 +389,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -444,7 +444,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_INNKEEPER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
+ TC_LOG_DEBUG("network", "WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
return;
}
@@ -476,7 +476,7 @@ void WorldSession::SendBindPoint(Creature* npc)
void WorldSession::HandleListStabledPetsOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recv MSG_LIST_STABLED_PETS");
+ TC_LOG_DEBUG("network", "WORLD: Recv MSG_LIST_STABLED_PETS");
uint64 npcGUID;
recvData >> npcGUID;
@@ -512,7 +512,7 @@ void WorldSession::SendStablePetCallback(PreparedQueryResult result, uint64 guid
if (!GetPlayer())
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recv MSG_LIST_STABLED_PETS Send.");
+ TC_LOG_DEBUG("network", "WORLD: Recv MSG_LIST_STABLED_PETS Send.");
WorldPacket data(MSG_LIST_STABLED_PETS, 200); // guess size
@@ -569,7 +569,7 @@ void WorldSession::SendStableResult(uint8 res)
void WorldSession::HandleStablePet(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_PET");
+ TC_LOG_DEBUG("network", "WORLD: Recv CMSG_STABLE_PET");
uint64 npcGUID;
recvData >> npcGUID;
@@ -644,7 +644,7 @@ void WorldSession::HandleStablePetCallback(PreparedQueryResult result)
void WorldSession::HandleUnstablePet(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_UNSTABLE_PET.");
+ TC_LOG_DEBUG("network", "WORLD: Recv CMSG_UNSTABLE_PET.");
uint64 npcGUID;
uint32 petnumber;
@@ -725,7 +725,7 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32
void WorldSession::HandleBuyStableSlot(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_BUY_STABLE_SLOT.");
+ TC_LOG_DEBUG("network", "WORLD: Recv CMSG_BUY_STABLE_SLOT.");
uint64 npcGUID;
recvData >> npcGUID;
@@ -758,12 +758,12 @@ void WorldSession::HandleBuyStableSlot(WorldPacket& recvData)
void WorldSession::HandleStableRevivePet(WorldPacket &/* recvData */)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "HandleStableRevivePet: Not implemented");
+ TC_LOG_DEBUG("network", "HandleStableRevivePet: Not implemented");
}
void WorldSession::HandleStableSwapPet(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_SWAP_PET.");
+ TC_LOG_DEBUG("network", "WORLD: Recv CMSG_STABLE_SWAP_PET.");
uint64 npcGUID;
uint32 petId;
@@ -855,7 +855,7 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REPAIR_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_REPAIR_ITEM");
uint64 npcGUID, itemGUID;
uint8 guildBank; // new in 2.3.2, bool that means from guild bank money
@@ -865,7 +865,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
+ TC_LOG_DEBUG("network", "WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
return;
}
@@ -878,7 +878,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
if (itemGUID)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID));
+ TC_LOG_DEBUG("network", "ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID));
Item* item = _player->GetItemByGuid(itemGUID);
if (item)
@@ -886,7 +886,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
+ TC_LOG_DEBUG("network", "ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
_player->DurabilityRepairAll(true, discountMod, guildBank);
}
}
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 0badd503c17..ad8cacbd3c0 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -38,13 +38,13 @@ void WorldSession::HandleDismissCritter(WorldPacket& recvData)
uint64 guid;
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD, guid);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD, guid);
Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Vanitypet (guid: %u) does not exist - player '%s' (guid: %u / account: %u) attempted to dismiss it (possibly lagged out)",
+ TC_LOG_DEBUG("network", "Vanitypet (guid: %u) does not exist - player '%s' (guid: %u / account: %u) attempted to dismiss it (possibly lagged out)",
uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow(), GetAccountId());
return;
}
@@ -70,17 +70,17 @@ void WorldSession::HandlePetAction(WorldPacket& recvData)
// used also for charmed creature
Unit* pet= ObjectAccessor::GetUnit(*_player, guid1);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet %u - flag: %u, spellid: %u, target: %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2)));
+ TC_LOG_INFO("network", "HandlePetAction: Pet %u - flag: %u, spellid: %u, target: %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2)));
if (!pet)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) doesn't exist for player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
+ TC_LOG_ERROR("network", "HandlePetAction: Pet (GUID: %u) doesn't exist for player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
return;
}
if (pet != GetPlayer()->GetFirstControlled())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetAction: Pet (GUID: %u) does not belong to player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
+ TC_LOG_ERROR("network", "HandlePetAction: Pet (GUID: %u) does not belong to player %s (GUID: %u)", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
return;
}
@@ -116,19 +116,19 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recvData)
uint64 guid;
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid);
Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid)));
+ TC_LOG_ERROR("network", "HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid)));
return;
}
if (pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s",
+ TC_LOG_ERROR("network", "HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s",
uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str());
return;
}
@@ -144,8 +144,8 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetAction(petGuid: " UI64FMTD ", tagGuid: " UI64FMTD ", spellId: %u, flag: %u): object (entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!",
- guid1, guid2, spellid, flag, pet->GetGUIDLow(), pet->GetTypeId());
+ TC_LOG_ERROR("network", "WorldSession::HandlePetAction(petGuid: " UI64FMTD ", tagGuid: " UI64FMTD ", spellId: %u, flag: %u): object (GUID: %u Entry: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!",
+ guid1, guid2, spellid, flag, pet->GetGUIDLow(), pet->GetEntry(), pet->GetTypeId());
return;
}
@@ -262,7 +262,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
}
break;
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
+ TC_LOG_ERROR("network", "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
}
break;
case ACT_REACTION: // 0x6
@@ -291,7 +291,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellid);
+ TC_LOG_ERROR("network", "WORLD: unknown PET spell id %i", spellid);
return;
}
@@ -392,13 +392,13 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
+ TC_LOG_ERROR("network", "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
}
}
void WorldSession::HandlePetNameQuery(WorldPacket& recvData)
{
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetNameQuery. CMSG_PET_NAME_QUERY");
+ TC_LOG_INFO("network", "HandlePetNameQuery. CMSG_PET_NAME_QUERY");
uint32 petnumber;
uint64 petguid;
@@ -447,7 +447,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
{
if (!GetPlayer()->IsGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid));
return false;
}
}
@@ -456,7 +456,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
{
if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid));
return false;
}
}
@@ -465,7 +465,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
void WorldSession::HandlePetSetAction(WorldPacket& recvData)
{
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetSetAction. CMSG_PET_SET_ACTION");
+ TC_LOG_INFO("network", "HandlePetSetAction. CMSG_PET_SET_ACTION");
uint64 petguid;
uint8 count;
@@ -476,14 +476,14 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
if (!pet || pet != _player->GetFirstControlled())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetSetAction: Unknown pet (GUID: %u) or pet owner (GUID: %u)", GUID_LOPART(petguid), _player->GetGUIDLow());
+ TC_LOG_ERROR("network", "HandlePetSetAction: Unknown pet (GUID: %u) or pet owner (GUID: %u)", GUID_LOPART(petguid), _player->GetGUIDLow());
return;
}
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
+ TC_LOG_ERROR("network", "WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
@@ -545,7 +545,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
uint32 spell_id = UNIT_ACTION_BUTTON_ACTION(data[i]);
uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X",
+ TC_LOG_INFO("network", "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X",
_player->GetName().c_str(), position[i], spell_id, uint32(act_state));
//if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add
@@ -582,7 +582,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
void WorldSession::HandlePetRename(WorldPacket& recvData)
{
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetRename. CMSG_PET_RENAME");
+ TC_LOG_INFO("network", "HandlePetRename. CMSG_PET_RENAME");
uint64 petguid;
uint8 isdeclined;
@@ -671,7 +671,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData)
{
uint64 guid;
recvData >> guid; //pet guid
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid));
+ TC_LOG_INFO("network", "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid));
if (!_player->IsInWorld())
return;
@@ -697,7 +697,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData)
void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
{
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_PET_SPELL_AUTOCAST");
+ TC_LOG_INFO("network", "CMSG_PET_SPELL_AUTOCAST");
uint64 guid;
uint32 spellid;
uint8 state; //1 for on, 0 for off
@@ -713,7 +713,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
if (!pet || (pet != _player->GetGuardianPet() && pet != _player->GetCharm()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
+ TC_LOG_ERROR("network", "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
return;
}
@@ -725,7 +725,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
+ TC_LOG_ERROR("network", "WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
@@ -739,7 +739,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_PET_CAST_SPELL");
uint64 guid;
uint8 castCount;
@@ -748,7 +748,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
recvPacket >> guid >> castCount >> spellId >> castFlags;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags);
+ TC_LOG_DEBUG("network", "WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags);
// This opcode is also sent from charmed and possessed units (players and creatures)
if (!_player->GetGuardianPet() && !_player->GetCharm())
@@ -758,14 +758,14 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
if (!caster || (caster != _player->GetGuardianPet() && caster != _player->GetCharm()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
+ TC_LOG_ERROR("network", "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s (GUID: %u).", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str(), GUID_LOPART(GetPlayer()->GetGUID()));
return;
}
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %i", spellId);
+ TC_LOG_ERROR("network", "WORLD: unknown PET spell id %i", spellId);
return;
}
@@ -841,7 +841,7 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec
void WorldSession::HandlePetLearnTalent(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_LEARN_TALENT");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_PET_LEARN_TALENT");
uint64 guid;
uint32 talentId, requestedRank;
@@ -853,7 +853,7 @@ void WorldSession::HandlePetLearnTalent(WorldPacket& recvData)
void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS_PET");
+ TC_LOG_DEBUG("network", "CMSG_LEARN_PREVIEW_TALENTS_PET");
uint64 guid;
recvData >> guid;
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 3b2a76a4b04..23cd0bdfd94 100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -52,7 +52,7 @@ enum CharterCosts
void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_BUY");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_BUY");
uint64 guidNPC;
uint32 clientIndex; // 1 for guild and arenaslot+1 for arenas in client
@@ -81,13 +81,13 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
recvData >> clientIndex; // index
recvData.read_skip<uint32>(); // 0
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
+ TC_LOG_DEBUG("network", "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
// prevent cheating
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC, UNIT_NPC_FLAG_PETITIONER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
+ TC_LOG_DEBUG("network", "WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
return;
}
@@ -136,7 +136,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
type = ARENA_TEAM_CHARTER_5v5_TYPE;
break;
default:
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "unknown selection at buy arena petition: %u", clientIndex);
+ TC_LOG_DEBUG("network", "unknown selection at buy arena petition: %u", clientIndex);
return;
}
@@ -229,7 +229,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
// delete petitions with the same guid as this one
ssInvalidPetitionGUIDs << '\'' << charter->GetGUIDLow() << '\'';
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
+ TC_LOG_DEBUG("network", "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
CharacterDatabase.EscapeString(name);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
trans->PAppend("DELETE FROM petition WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str());
@@ -247,7 +247,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
uint8 signs = 0;
uint64 petitionguid;
@@ -264,7 +264,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
if (!result)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
+ TC_LOG_DEBUG("entities.player.items", "Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
return;
}
Field* fields = result->Fetch();
@@ -284,7 +284,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
if (result)
signs = uint8(result->GetRowCount());
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionGuidLow);
+ TC_LOG_DEBUG("network", "CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionGuidLow);
WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12));
data << uint64(petitionguid); // petition guid
@@ -307,13 +307,13 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionQueryOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_QUERY"); // ok
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_QUERY"); // ok
uint32 guildguid;
uint64 petitionguid;
recvData >> guildguid; // in Trinity always same as GUID_LOPART(petitionguid)
recvData >> petitionguid; // petition guid
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
+ TC_LOG_DEBUG("network", "CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
SendPetitionQueryOpcode(petitionguid);
}
@@ -339,7 +339,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
+ TC_LOG_DEBUG("network", "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
@@ -382,7 +382,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_RENAME"); // ok
+ TC_LOG_DEBUG("network", "Received opcode MSG_PETITION_RENAME"); // ok
uint64 petitionGuid;
uint32 type;
@@ -408,7 +408,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionGuid));
+ TC_LOG_DEBUG("network", "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionGuid));
return;
}
@@ -446,7 +446,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
CharacterDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionGuid), newName.c_str());
+ TC_LOG_DEBUG("network", "Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionGuid), newName.c_str());
WorldPacket data(MSG_PETITION_RENAME, (8+newName.size()+1));
data << uint64(petitionGuid);
data << newName;
@@ -455,7 +455,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SIGN"); // ok
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_SIGN"); // ok
Field* fields;
uint64 petitionGuid;
@@ -472,7 +472,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Petition %u is not found for player %u %s", GUID_LOPART(petitionGuid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
+ TC_LOG_ERROR("network", "Petition %u is not found for player %u %s", GUID_LOPART(petitionGuid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
return;
}
@@ -570,7 +570,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
CharacterDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionGuid), _player->GetName().c_str(), playerGuid, GetAccountId());
+ TC_LOG_DEBUG("network", "PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionGuid), _player->GetName().c_str(), playerGuid, GetAccountId());
WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4));
data << uint64(petitionGuid);
@@ -592,12 +592,12 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_DECLINE"); // ok
+ TC_LOG_DEBUG("network", "Received opcode MSG_PETITION_DECLINE"); // ok
uint64 petitionguid;
uint64 ownerguid;
recvData >> petitionguid; // petition guid
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION_OWNER_BY_GUID);
@@ -622,7 +622,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_OFFER_PETITION"); // ok
+ TC_LOG_DEBUG("network", "Received opcode CMSG_OFFER_PETITION"); // ok
uint8 signs = 0;
uint64 petitionguid, plguid;
@@ -648,7 +648,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
Field* fields = result->Fetch();
type = fields[0].GetUInt8();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
+ TC_LOG_DEBUG("network", "OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam())
{
@@ -731,7 +731,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_TURN_IN_PETITION");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_TURN_IN_PETITION");
// Get petition guid from packet
WorldPacket data;
@@ -744,7 +744,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
if (!item)
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petition %u turned in by %u", GUID_LOPART(petitionGuid), _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "Petition %u turned in by %u", GUID_LOPART(petitionGuid), _player->GetGUIDLow());
// Get petition data from db
uint32 ownerguidlo;
@@ -764,7 +764,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (guid: %u) tried to turn in petition (guid: %u) that is not present in the database", _player->GetName().c_str(), _player->GetGUIDLow(), GUID_LOPART(petitionGuid));
+ TC_LOG_ERROR("network", "Player %s (guid: %u) tried to turn in petition (guid: %u) that is not present in the database", _player->GetName().c_str(), _player->GetGUIDLow(), GUID_LOPART(petitionGuid));
return;
}
@@ -886,14 +886,14 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
// Register arena team
sArenaTeamMgr->AddArenaTeam(arenaTeam);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "PetitonsHandler: Arena team (guid: %u) added to ObjectMgr", arenaTeam->GetId());
+ TC_LOG_DEBUG("network", "PetitonsHandler: Arena team (guid: %u) added to ObjectMgr", arenaTeam->GetId());
// Add members
for (uint8 i = 0; i < signatures; ++i)
{
Field* fields = result->Fetch();
uint32 memberGUID = fields[0].GetUInt32();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "PetitionsHandler: Adding arena team (guid: %u) member %u", arenaTeam->GetId(), memberGUID);
+ TC_LOG_DEBUG("network", "PetitionsHandler: Adding arena team (guid: %u) member %u", arenaTeam->GetId(), memberGUID);
arenaTeam->AddMember(MAKE_NEW_GUID(memberGUID, 0, HIGHGUID_PLAYER));
result->NextRow();
}
@@ -912,7 +912,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
CharacterDatabase.CommitTransaction(trans);
// created
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "TURN IN PETITION GUID %u", GUID_LOPART(petitionGuid));
+ TC_LOG_DEBUG("network", "TURN IN PETITION GUID %u", GUID_LOPART(petitionGuid));
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << (uint32)PETITION_TURN_OK;
@@ -921,7 +921,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionShowListOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received CMSG_PETITION_SHOWLIST");
+ TC_LOG_DEBUG("network", "Received CMSG_PETITION_SHOWLIST");
uint64 guid;
recvData >> guid;
@@ -934,7 +934,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -978,5 +978,5 @@ void WorldSession::SendPetitionShowList(uint64 guid)
}
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Sent SMSG_PETITION_SHOWLIST");
+ TC_LOG_DEBUG("network", "Sent SMSG_PETITION_SHOWLIST");
}
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 4638e05ee3d..01dbf201a82 100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -70,7 +70,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recvData)
recvData >> guid;
// This is disable by default to prevent lots of console spam
- // TC_LOG_INFO(LOG_FILTER_NETWORKIO, "HandleNameQueryOpcode %u", guid);
+ // TC_LOG_INFO("network", "HandleNameQueryOpcode %u", guid);
SendNameQueryOpcode(guid);
}
@@ -113,7 +113,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
ObjectMgr::GetLocaleString(cl->SubName, loc_idx, SubName);
}
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name.c_str(), entry);
+ TC_LOG_DEBUG("network", "WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name.c_str(), entry);
// guess size
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 100);
data << uint32(entry); // creature entry
@@ -138,16 +138,16 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
data << uint32(ci->questItems[i]); // itemId[6], quest drop
data << uint32(ci->movementId); // CreatureMovementInfo.dbc
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)",
+ TC_LOG_DEBUG("network", "WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)",
GUID_LOPART(guid), entry);
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 4);
data << uint32(entry | 0x80000000);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
}
}
@@ -179,7 +179,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
ObjectMgr::GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption);
}
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
+ TC_LOG_DEBUG("network", "WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 150);
data << uint32(entry);
data << uint32(info->type);
@@ -194,22 +194,22 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
for (uint32 i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i)
data << uint32(info->questItems[i]); // itemId[6], quest drop
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
+ TC_LOG_DEBUG("network", "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
GUID_LOPART(guid), entry);
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 4);
data << uint32(entry | 0x80000000);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
}
}
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_CORPSE_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Received MSG_CORPSE_QUERY");
Corpse* corpse = GetPlayer()->GetCorpse();
@@ -264,7 +264,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData)
uint64 guid;
recvData >> textID;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
+ TC_LOG_DEBUG("network", "WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
recvData >> guid;
@@ -337,13 +337,13 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData)
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_NPC_TEXT_UPDATE");
}
/// Only _static_ data is sent in this packet !!!
void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_PAGE_TEXT_QUERY");
uint32 pageID;
recvData >> pageID;
@@ -377,13 +377,13 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
}
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
}
}
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
uint32 unk;
recvData >> unk;
@@ -437,7 +437,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recvData)
data << int32(itr->ObjectiveIndex); // objective index
data << uint32(itr->MapId); // mapid
data << uint32(itr->AreaId); // areaid
- data << uint32(itr->Unk2); // unknown
+ data << uint32(itr->FloorId); // floorid
data << uint32(itr->Unk3); // unknown
data << uint32(itr->Unk4); // unknown
data << uint32(itr->points.size()); // POI points count
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index e032c82ab1f..1e2d3aff4ee 100644
--- a/src/server/game/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
@@ -42,7 +42,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
Object* questgiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!questgiver)
{
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for non-existing questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid));
+ TC_LOG_INFO("network", "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for non-existing questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid));
return;
}
@@ -50,7 +50,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
{
case TYPEID_UNIT:
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u", uint32(GUID_LOPART(guid)));
Creature* cr_questgiver=questgiver->ToCreature();
if (!cr_questgiver->IsHostileTo(_player)) // do not show quest status to enemies
{
@@ -62,7 +62,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
}
case TYPEID_GAMEOBJECT:
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u", uint32(GUID_LOPART(guid)));
GameObject* go_questgiver=(GameObject*)questgiver;
questStatus = sScriptMgr->GetDialogStatus(_player, go_questgiver);
if (questStatus > 6)
@@ -70,7 +70,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "QuestGiver called for unexpected type %u", questgiver->GetTypeId());
+ TC_LOG_ERROR("network", "QuestGiver called for unexpected type %u", questgiver->GetTypeId());
break;
}
@@ -83,12 +83,12 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket& recvData)
uint64 guid;
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.",
+ TC_LOG_DEBUG("network", "WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.",
GUID_LOPART(guid));
return;
}
@@ -115,7 +115,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket& recvData)
uint32 unk1;
recvData >> guid >> questId >> unk1;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), questId, unk1);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), questId, unk1);
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM|TYPEMASK_PLAYER);
@@ -259,7 +259,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket& recvData)
uint32 questId;
uint8 unk1;
recvData >> guid >> questId >> unk1;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), questId, unk1);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), questId, unk1);
// Verify that the guid is valid and is a questgiver or involved in the requested quest
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT | TYPEMASK_ITEM);
@@ -298,7 +298,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket& recvData)
uint32 questId;
recvData >> questId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_QUERY quest = %u", questId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUEST_QUERY quest = %u", questId);
if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId))
_player->PlayerTalkClass->SendQuestQueryResponse(quest);
@@ -312,11 +312,11 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
if (reward >= QUEST_REWARD_CHOICES_COUNT)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (possible packet-hacking detected)", _player->GetName().c_str(), _player->GetGUIDLow(), reward);
+ TC_LOG_ERROR("network", "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (possible packet-hacking detected)", _player->GetName().c_str(), _player->GetGUIDLow(), reward);
return;
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u", uint32(GUID_LOPART(guid)), questId, reward);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u", uint32(GUID_LOPART(guid)), questId, reward);
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!object || !object->hasInvolvedQuest(questId))
@@ -331,7 +331,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
if ((!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE) ||
(_player->GetQuestStatus(questId) != QUEST_STATUS_COMPLETE && !quest->IsAutoComplete()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Error in QUEST_STATUS_COMPLETE: player %s (guid %u) tried to complete quest %u, but is not allowed to do so (possible packet-hacking or high latency)",
+ TC_LOG_ERROR("network", "Error in QUEST_STATUS_COMPLETE: player %s (guid %u) tried to complete quest %u, but is not allowed to do so (possible packet-hacking or high latency)",
_player->GetName().c_str(), _player->GetGUIDLow(), questId);
return;
}
@@ -394,7 +394,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket& recvData)
uint64 guid;
recvData >> guid >> questId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u", uint32(GUID_LOPART(guid)), questId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u", uint32(GUID_LOPART(guid)), questId);
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!object || !object->hasInvolvedQuest(questId))
@@ -416,7 +416,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket& recvData)
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_CANCEL");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_CANCEL");
_player->PlayerTalkClass->SendCloseGossip();
}
@@ -429,7 +429,7 @@ void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recvData)
if (slot1 == slot2 || slot1 >= MAX_QUEST_LOG_SIZE || slot2 >= MAX_QUEST_LOG_SIZE)
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2);
GetPlayer()->SwapQuestSlot(slot1, slot2);
}
@@ -439,7 +439,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recvData)
uint8 slot;
recvData >> slot;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u", slot);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u", slot);
if (slot < MAX_QUEST_LOG_SIZE)
{
@@ -464,7 +464,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recvData)
_player->RemoveActiveQuest(questId);
_player->RemoveTimedAchievement(ACHIEVEMENT_TIMED_TYPE_QUEST, questId);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Player %u abandoned quest %u", _player->GetGUIDLow(), questId);
+ TC_LOG_INFO("network", "Player %u abandoned quest %u", _player->GetGUIDLow(), questId);
}
_player->SetQuestSlot(slot, 0);
@@ -478,7 +478,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
uint32 questId;
recvData >> questId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", questId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", questId);
if (const Quest* quest = sObjectMgr->GetQuestTemplate(questId))
{
@@ -507,7 +507,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
recvData >> guid >> questId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u", uint32(GUID_LOPART(guid)), questId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u", uint32(GUID_LOPART(guid)), questId);
Quest const* quest = sObjectMgr->GetQuestTemplate(questId);
if (!quest)
@@ -523,7 +523,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
if (!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Possible hacking attempt: Player %s [guid: %u] tried to complete quest [entry: %u] without being in possession of the quest!",
+ TC_LOG_ERROR("network", "Possible hacking attempt: Player %s [guid: %u] tried to complete quest [entry: %u] without being in possession of the quest!",
_player->GetName().c_str(), _player->GetGUIDLow(), questId);
return;
}
@@ -552,7 +552,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
void WorldSession::HandleQuestgiverQuestAutoLaunch(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH");
}
void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
@@ -563,7 +563,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
if (!_player->CanShareQuest(questId))
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PUSHQUESTTOPARTY questId = %u", questId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_PUSHQUESTTOPARTY questId = %u", questId);
Quest const* quest = sObjectMgr->GetQuestTemplate(questId);
if (!quest)
@@ -638,7 +638,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
uint8 msg;
recvPacket >> guid >> questId >> msg;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_QUEST_PUSH_RESULT");
+ TC_LOG_DEBUG("network", "WORLD: Received MSG_QUEST_PUSH_RESULT");
if (_player->GetDivider() && _player->GetDivider() == guid)
{
@@ -677,7 +677,7 @@ uint32 WorldSession::getDialogStatus(Player* player, Object* questgiver, uint32
}
default:
//its imposible, but check ^)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Warning: GetDialogStatus called for unexpected type %u", questgiver->GetTypeId());
+ TC_LOG_ERROR("network", "Warning: GetDialogStatus called for unexpected type %u", questgiver->GetTypeId());
return DIALOG_STATUS_NONE;
}
@@ -754,7 +754,7 @@ uint32 WorldSession::getDialogStatus(Player* player, Object* questgiver, uint32
void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
uint32 count = 0;
diff --git a/src/server/game/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp
index 4f4fe226a54..9e0b877f64b 100644
--- a/src/server/game/Handlers/ReferAFriendHandler.cpp
+++ b/src/server/game/Handlers/ReferAFriendHandler.cpp
@@ -23,7 +23,7 @@
void WorldSession::HandleGrantLevel(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GRANT_LEVEL");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_GRANT_LEVEL");
uint64 guid;
recvData.readPackGUID(guid);
@@ -65,7 +65,7 @@ void WorldSession::HandleGrantLevel(WorldPacket& recvData)
void WorldSession::HandleAcceptGrantLevel(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ACCEPT_LEVEL_GRANT");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_ACCEPT_LEVEL_GRANT");
uint64 guid;
recvData.readPackGUID(guid);
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index 04cc468f216..7e2bc11e1b2 100644
--- a/src/server/game/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
@@ -38,7 +38,7 @@ void WorldSession::HandleLearnTalentOpcode(WorldPacket& recvData)
void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS");
+ TC_LOG_DEBUG("network", "CMSG_LEARN_PREVIEW_TALENTS");
uint32 talentsCount;
recvPacket >> talentsCount;
@@ -57,14 +57,14 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "MSG_TALENT_WIPE_CONFIRM");
+ TC_LOG_DEBUG("network", "MSG_TALENT_WIPE_CONFIRM");
uint64 guid;
recvData >> guid;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 418709c8407..b264b0d2fff 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -93,7 +93,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
+ TC_LOG_DEBUG("network", "WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
ItemTemplate const* proto = pItem->GetTemplate();
if (!proto)
@@ -169,7 +169,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
+ TC_LOG_DEBUG("network", "WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
Player* pUser = _player;
@@ -181,7 +181,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
recvPacket >> bagIndex >> slot;
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "bagIndex: %u, slot: %u", bagIndex, slot);
+ TC_LOG_INFO("network", "bagIndex: %u, slot: %u", bagIndex, slot);
Item* item = pUser->GetItemByPos(bagIndex, slot);
if (!item)
@@ -201,7 +201,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
if (!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE) && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
{
pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
+ TC_LOG_ERROR("network", "Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
pUser->GetName().c_str(), pUser->GetGUIDLow(), item->GetGUIDLow(), proto->ItemId);
return;
}
@@ -215,7 +215,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
if (!lockInfo)
{
pUser->SendEquipError(EQUIP_ERR_ITEM_LOCKED, item, NULL);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD::OpenItem: item [guid = %u] has an unknown lockId: %u!", item->GetGUIDLow(), lockId);
+ TC_LOG_ERROR("network", "WORLD::OpenItem: item [guid = %u] has an unknown lockId: %u!", item->GetGUIDLow(), lockId);
return;
}
@@ -248,7 +248,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Wrapped item %u don't have record in character_gifts table and will deleted", item->GetGUIDLow());
+ TC_LOG_ERROR("network", "Wrapped item %u don't have record in character_gifts table and will deleted", item->GetGUIDLow());
pUser->DestroyItem(item->GetBagSlot(), item->GetSlot(), true);
return;
}
@@ -269,7 +269,7 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData)
recvData >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
if (GameObject* obj = GetPlayer()->GetMap()->GetGameObject(guid))
{
@@ -287,7 +287,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
uint64 guid;
recvPacket >> guid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid));
// ignore for remote control state
if (_player->m_mover != _player)
@@ -312,7 +312,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
uint8 castCount, castFlags;
recvPacket >> castCount >> spellId >> castFlags;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size());
+ TC_LOG_DEBUG("network", "WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size());
// ignore for remote control state (for player case)
Unit* mover = _player->m_mover;
@@ -325,7 +325,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown spell id %u", spellId);
+ TC_LOG_ERROR("network", "WORLD: unknown spell id %u", spellId);
recvPacket.rfinish(); // prevent spam at ignore packet
return;
}
@@ -447,7 +447,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WORLD: unknown PET spell id %u", spellId);
+ TC_LOG_ERROR("network", "WORLD: unknown PET spell id %u", spellId);
return;
}
@@ -455,13 +455,13 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
if (!pet)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetCancelAura: Attempt to cancel an aura for non-existant pet %u by player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str());
+ TC_LOG_ERROR("network", "HandlePetCancelAura: Attempt to cancel an aura for non-existant pet %u by player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str());
return;
}
if (pet != GetPlayer()->GetGuardianPet() && pet != GetPlayer()->GetCharm())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandlePetCancelAura: Pet %u is not a pet of player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str());
+ TC_LOG_ERROR("network", "HandlePetCancelAura: Pet %u is not a pet of player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str());
return;
}
@@ -476,9 +476,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
pet->AddCreatureSpellCooldown(spellId);
}
-void WorldSession::HandleCancelGrowthAuraOpcode(WorldPacket& /*recvPacket*/)
-{
-}
+void WorldSession::HandleCancelGrowthAuraOpcode(WorldPacket& /*recvPacket*/) { }
void WorldSession::HandleCancelAutoRepeatSpellOpcode(WorldPacket& /*recvPacket*/)
{
@@ -524,7 +522,7 @@ void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket)
void WorldSession::HandleSelfResOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SELF_RES"); // empty opcode
+ TC_LOG_DEBUG("network", "WORLD: CMSG_SELF_RES"); // empty opcode
if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION))
return; // silent return, client should display error by itself and not send this opcode
@@ -559,7 +557,7 @@ void WorldSession::HandleSpellClick(WorldPacket& recvData)
void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GET_MIRRORIMAGE_DATA");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_GET_MIRRORIMAGE_DATA");
uint64 guid;
recvData >> guid;
@@ -646,7 +644,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_PROJECTILE_POSITION");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_UPDATE_PROJECTILE_POSITION");
uint64 casterGuid;
uint32 spellId;
diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp
index ae25d9f4750..6b42c1a8011 100644
--- a/src/server/game/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Handlers/TaxiHandler.cpp
@@ -30,7 +30,7 @@
void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
uint64 guid;
@@ -44,7 +44,7 @@ void WorldSession::SendTaxiStatus(uint64 guid)
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid)));
return;
}
@@ -54,18 +54,18 @@ void WorldSession::SendTaxiStatus(uint64 guid)
if (curloc == 0)
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: current location %u ", curloc);
+ TC_LOG_DEBUG("network", "WORLD: current location %u ", curloc);
WorldPacket data(SMSG_TAXINODE_STATUS, 9);
data << guid;
data << uint8(GetPlayer()->m_taxi.IsTaximaskNodeKnown(curloc) ? 1 : 0);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_TAXINODE_STATUS");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_TAXINODE_STATUS");
}
void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES");
uint64 guid;
recvData >> guid;
@@ -74,7 +74,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -101,7 +101,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater();
if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it.
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ", curloc);
+ TC_LOG_DEBUG("network", "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ", curloc);
WorldPacket data(SMSG_SHOWTAXINODES, (4 + 8 + 4 + 8 * 4));
data << uint32(1);
@@ -110,7 +110,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
GetPlayer()->m_taxi.AppendTaximaskTo(data, GetPlayer()->isTaxiCheater());
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_SHOWTAXINODES");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_SHOWTAXINODES");
GetPlayer()->SetTaxiCheater(lastTaxiCheaterState);
}
@@ -165,7 +165,7 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid)
void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
uint64 guid;
uint32 node_count;
@@ -175,7 +175,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)));
return;
}
std::vector<uint32> nodes;
@@ -190,14 +190,14 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
if (nodes.empty())
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d", nodes.front(), nodes.back());
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d", nodes.front(), nodes.back());
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_MOVE_SPLINE_DONE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_MOVE_SPLINE_DONE");
uint64 guid; // used only for proper packet read
recvData.readPackGUID(guid);
@@ -251,7 +251,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
}
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
+ TC_LOG_DEBUG("network", "WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
@@ -275,18 +275,18 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXI");
uint64 guid;
std::vector<uint32> nodes;
nodes.resize(2);
recvData >> guid >> nodes[0] >> nodes[1];
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d", nodes[0], nodes[1]);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXI from %d to %d", nodes[0], nodes[1]);
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)));
return;
}
@@ -299,5 +299,5 @@ void WorldSession::SendActivateTaxiReply(ActivateTaxiReply reply)
data << uint32(reply);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ACTIVATETAXIREPLY");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_ACTIVATETAXIREPLY");
}
diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp
index 57d41be9e23..ceeac75e34e 100644
--- a/src/server/game/Handlers/TicketHandler.cpp
+++ b/src/server/game/Handlers/TicketHandler.cpp
@@ -81,7 +81,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CMSG_GMTICKET_CREATE possibly corrupt. Uncompression failed.");
+ TC_LOG_ERROR("network", "CMSG_GMTICKET_CREATE possibly corrupt. Uncompression failed.");
recvData.rfinish();
delete ticket;
return;
diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index b555aee4544..8befde46550 100644
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
@@ -70,13 +70,13 @@ void WorldSession::SendTradeStatus(TradeStatus status)
void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Ignore Trade %u", _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "WORLD: Ignore Trade %u", _player->GetGUIDLow());
// recvPacket.print_storage();
}
void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Busy Trade %u", _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "WORLD: Busy Trade %u", _player->GetGUIDLow());
// recvPacket.print_storage();
}
@@ -151,7 +151,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
// logging
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "partner storing: %u", myItems[i]->GetGUIDLow());
+ TC_LOG_DEBUG("network", "partner storing: %u", myItems[i]->GetGUIDLow());
if (HasPermission(rbac::RBAC_PERM_LOG_GM_TRADE))
{
sLog->outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
@@ -169,7 +169,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (hisItems[i])
{
// logging
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "player storing: %u", hisItems[i]->GetGUIDLow());
+ TC_LOG_DEBUG("network", "player storing: %u", hisItems[i]->GetGUIDLow());
if (HasPermission(rbac::RBAC_PERM_LOG_GM_TRADE))
{
sLog->outCommand(trader->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
@@ -192,21 +192,21 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
if (!traderCanTrade)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "trader can't store item: %u", myItems[i]->GetGUIDLow());
+ TC_LOG_ERROR("network", "trader can't store item: %u", myItems[i]->GetGUIDLow());
if (_player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, myItems[i], false) == EQUIP_ERR_OK)
_player->MoveItemToInventory(playerDst, myItems[i], true, true);
else
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "player can't take item back: %u", myItems[i]->GetGUIDLow());
+ TC_LOG_ERROR("network", "player can't take item back: %u", myItems[i]->GetGUIDLow());
}
// return the already removed items to the original owner
if (hisItems[i])
{
if (!playerCanTrade)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "player can't store item: %u", hisItems[i]->GetGUIDLow());
+ TC_LOG_ERROR("network", "player can't store item: %u", hisItems[i]->GetGUIDLow());
if (trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false) == EQUIP_ERR_OK)
trader->MoveItemToInventory(traderDst, hisItems[i], true, true);
else
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "trader can't take item back: %u", hisItems[i]->GetGUIDLow());
+ TC_LOG_ERROR("network", "trader can't take item back: %u", hisItems[i]->GetGUIDLow());
}
}
}
@@ -224,7 +224,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item* *m
{
if (Item* item = myTrade->GetItem(TradeSlots(i)))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
+ TC_LOG_DEBUG("network", "player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
//Can return NULL
myItems[i] = item;
myItems[i]->SetInTrade();
@@ -232,7 +232,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item* *m
if (Item* item = hisTrade->GetItem(TradeSlots(i)))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
+ TC_LOG_DEBUG("network", "partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
hisItems[i] = item;
hisItems[i]->SetInTrade();
}
diff --git a/src/server/game/Handlers/VehicleHandler.cpp b/src/server/game/Handlers/VehicleHandler.cpp
index b099ba96060..a0beadc644c 100644
--- a/src/server/game/Handlers/VehicleHandler.cpp
+++ b/src/server/game/Handlers/VehicleHandler.cpp
@@ -25,7 +25,7 @@
void WorldSession::HandleDismissControlledVehicle(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
uint64 vehicleGUID = _player->GetCharmGUID();
@@ -50,7 +50,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recvData)
void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
Unit* vehicle_base = GetPlayer()->GetVehicleBase();
if (!vehicle_base)
@@ -63,7 +63,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recvData)
if (!seat->CanSwitchFromSeat())
{
recvData.rfinish(); // prevent warnings spam
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %u tried to switch seats but current seatflags %u don't permit that.",
+ TC_LOG_ERROR("network", "HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %u tried to switch seats but current seatflags %u don't permit that.",
recvData.GetOpcode(), GetPlayer()->GetGUIDLow(), seat->m_flags);
return;
}
@@ -150,7 +150,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
if (!vehicle)
{
data.rfinish(); // prevent warnings spam
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleEjectPassenger: Player %u is not in a vehicle!", GetPlayer()->GetGUIDLow());
+ TC_LOG_ERROR("network", "HandleEjectPassenger: Player %u is not in a vehicle!", GetPlayer()->GetGUIDLow());
return;
}
@@ -162,13 +162,13 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
Player* player = ObjectAccessor::FindPlayer(guid);
if (!player)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %u tried to eject player %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
+ TC_LOG_ERROR("network", "Player %u tried to eject player %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
return;
}
if (!player->IsOnVehicle(vehicle->GetBase()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %u tried to eject player %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
+ TC_LOG_ERROR("network", "Player %u tried to eject player %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
return;
}
@@ -177,7 +177,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
if (seat->IsEjectable())
player->ExitVehicle();
else
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %u attempted to eject player %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
+ TC_LOG_ERROR("network", "Player %u attempted to eject player %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
}
else if (IS_CREATURE_GUID(guid))
@@ -185,13 +185,13 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
if (!unit) // creatures can be ejected too from player mounts
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %u tried to eject creature guid %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
+ TC_LOG_ERROR("network", "Player %u tried to eject creature guid %u from vehicle, but the latter was not found in world!", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
return;
}
if (!unit->IsOnVehicle(vehicle->GetBase()))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %u tried to eject unit %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
+ TC_LOG_ERROR("network", "Player %u tried to eject unit %u, but they are not in the same vehicle", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
return;
}
@@ -203,15 +203,15 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
unit->ExitVehicle();
}
else
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %u attempted to eject creature GUID %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
+ TC_LOG_ERROR("network", "Player %u attempted to eject creature GUID %u from non-ejectable seat.", GetPlayer()->GetGUIDLow(), GUID_LOPART(guid));
}
else
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleEjectPassenger: Player %u tried to eject invalid GUID " UI64FMTD, GetPlayer()->GetGUIDLow(), guid);
+ TC_LOG_ERROR("network", "HandleEjectPassenger: Player %u tried to eject invalid GUID " UI64FMTD, GetPlayer()->GetGUIDLow(), guid);
}
void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT");
if (Vehicle* vehicle = GetPlayer()->GetVehicle())
{
@@ -220,7 +220,7 @@ void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recvData*/)
if (seat->CanEnterOrExit())
GetPlayer()->ExitVehicle();
else
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %u tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.",
+ TC_LOG_ERROR("network", "Player %u tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.",
GetPlayer()->GetGUIDLow(), seat->m_ID, seat->m_flags);
}
}
diff --git a/src/server/game/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp
index 36e9d4e716d..456848bf6cc 100644
--- a/src/server/game/Handlers/VoiceChatHandler.cpp
+++ b/src/server/game/Handlers/VoiceChatHandler.cpp
@@ -24,7 +24,7 @@
void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_VOICE_SESSION_ENABLE");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_VOICE_SESSION_ENABLE");
// uint8 isVoiceEnabled, uint8 isMicrophoneEnabled
recvData.read_skip<uint8>();
recvData.read_skip<uint8>();
@@ -32,13 +32,13 @@ void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket& recvData)
void WorldSession::HandleChannelVoiceOnOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CHANNEL_VOICE_ON");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_CHANNEL_VOICE_ON");
// Enable Voice button in channel context menu
}
void WorldSession::HandleSetActiveVoiceChannel(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
recvData.read_skip<uint32>();
recvData.read_skip<char*>();
}
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index d7ffb70ccfa..ee962621048 100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
@@ -74,19 +74,19 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
const MapEntry* entry = sMapStore.LookupEntry(mapId);
if (!entry)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId);
+ TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId);
return NULL;
}
if (instanceId == 0)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId);
+ TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId);
return NULL;
}
if (difficulty >= (entry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty);
+ TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty);
return NULL;
}
@@ -104,7 +104,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
}
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId);
+ TC_LOG_DEBUG("maps", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId);
InstanceSave* save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset);
if (!load)
@@ -163,9 +163,7 @@ void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId)
InstanceSave::InstanceSave(uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, bool canReset)
: m_resetTime(resetTime), m_instanceid(InstanceId), m_mapid(MapId),
- m_difficulty(difficulty), m_canReset(canReset), m_toDelete(false)
-{
-}
+ m_difficulty(difficulty), m_canReset(canReset), m_toDelete(false) { }
InstanceSave::~InstanceSave()
{
@@ -274,7 +272,7 @@ void InstanceSaveManager::LoadInstances()
// Load reset times and clean expired instances
sInstanceSaveMgr->LoadResetTimes();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
@@ -364,7 +362,7 @@ void InstanceSaveManager::LoadResetTimes()
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
if (!mapDiff)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty);
+ TC_LOG_ERROR("misc", "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);
continue;
}
@@ -457,7 +455,7 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev
}
if (itr == m_resetTimeQueue.end())
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId);
+ TC_LOG_ERROR("misc", "InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId);
}
}
else
@@ -526,7 +524,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
+ TC_LOG_DEBUG("maps", "InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
Map const* map = sMapMgr->CreateBaseMap(mapid);
if (!map->Instanceable())
return;
@@ -565,7 +563,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
if (!mapDiff || !mapDiff->resetTime)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid);
+ TC_LOG_ERROR("misc", "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid);
return;
}
diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h
index e3717a934c3..5dda4eb620e 100644
--- a/src/server/game/Instances/InstanceSaveMgr.h
+++ b/src/server/game/Instances/InstanceSaveMgr.h
@@ -148,7 +148,7 @@ class InstanceSaveManager
friend class InstanceSave;
private:
- InstanceSaveManager() : lock_instLists(false) {};
+ InstanceSaveManager() : lock_instLists(false) { };
~InstanceSaveManager();
public:
@@ -163,9 +163,9 @@ class InstanceSaveManager
uint16 mapid;
uint16 instanceId;
- InstResetEvent() : type(0), difficulty(DUNGEON_DIFFICULTY_NORMAL), mapid(0), instanceId(0) {}
+ InstResetEvent() : type(0), difficulty(DUNGEON_DIFFICULTY_NORMAL), mapid(0), instanceId(0) { }
InstResetEvent(uint8 t, uint32 _mapid, Difficulty d, uint16 _instanceid)
- : type(t), difficulty(d), mapid(_mapid), instanceId(_instanceid) {}
+ : type(t), difficulty(d), mapid(_mapid), instanceId(_instanceid) { }
bool operator == (const InstResetEvent& e) const { return e.instanceId == instanceId; }
};
typedef std::multimap<time_t /*resetTime*/, InstResetEvent> ResetTimeQueue;
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index c8b57c9924e..2e5ed1d487e 100644
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
@@ -50,7 +50,7 @@ void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject* go)
if (go)
go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
else
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "InstanceScript: HandleGameObject failed");
+ TC_LOG_DEBUG("scripts", "InstanceScript: HandleGameObject failed");
}
bool InstanceScript::IsEncounterInProgress() const
@@ -71,7 +71,7 @@ void InstanceScript::LoadMinionData(const MinionData* data)
++data;
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size()));
+ TC_LOG_DEBUG("scripts", "InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size()));
}
void InstanceScript::LoadDoorData(const DoorData* data)
@@ -83,7 +83,7 @@ void InstanceScript::LoadDoorData(const DoorData* data)
++data;
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size()));
+ TC_LOG_DEBUG("scripts", "InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size()));
}
void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state)
@@ -200,7 +200,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
if (bossInfo->state == TO_BE_DECIDED) // loading
{
bossInfo->state = state;
- //TC_LOG_ERROR(LOG_FILTER_GENERAL, "Inialize boss %u state as %u.", id, (uint32)state);
+ //TC_LOG_ERROR("misc", "Inialize boss %u state as %u.", id, (uint32)state);
return false;
}
else
@@ -270,7 +270,7 @@ void InstanceScript::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime,
go->ResetDoorOrButton();
}
else
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType());
+ TC_LOG_ERROR("misc", "SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType());
}
}
@@ -301,7 +301,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
player->SendUpdateWorldState(uiStateId, uiStateData);
}
else
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "DoUpdateWorldState attempt send data but no players in map.");
+ TC_LOG_DEBUG("scripts", "DoUpdateWorldState attempt send data but no players in map.");
}
// Send Notify to all players in instance
@@ -387,7 +387,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= NULL*/, uint32 /*miscvalue1*/ /*= 0*/)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
+ TC_LOG_ERROR("misc", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
instance->GetId(), criteria_id);
return false;
}
@@ -442,7 +442,7 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi
if (encounter->lastEncounterDungeon)
{
dungeonId = encounter->lastEncounterDungeon;
- TC_LOG_DEBUG(LOG_FILTER_LFG, "UpdateEncounterState: Instance %s (instanceId %u) completed encounter %s. Credit Dungeon: %u", instance->GetMapName(), instance->GetInstanceId(), encounter->dbcEntry->encounterName[0], dungeonId);
+ TC_LOG_DEBUG("lfg", "UpdateEncounterState: Instance %s (instanceId %u) completed encounter %s. Credit Dungeon: %u", instance->GetMapName(), instance->GetInstanceId(), encounter->dbcEntry->encounterName[0], dungeonId);
break;
}
}
diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h
index 943ae672046..acc8012bbbc 100644
--- a/src/server/game/Instances/InstanceScript.h
+++ b/src/server/game/Instances/InstanceScript.h
@@ -23,11 +23,11 @@
#include "World.h"
#include "ObjectMgr.h"
-#define OUT_SAVE_INST_DATA TC_LOG_DEBUG(LOG_FILTER_TSCR, "Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
-#define OUT_SAVE_INST_DATA_COMPLETE TC_LOG_DEBUG(LOG_FILTER_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) TC_LOG_DEBUG(LOG_FILTER_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 TC_LOG_DEBUG(LOG_FILTER_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 TC_LOG_ERROR(LOG_FILTER_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 TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
+#define OUT_SAVE_INST_DATA_COMPLETE TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
+#define OUT_LOAD_INST_DATA(a) TC_LOG_DEBUG("scripts", "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 TC_LOG_DEBUG("scripts", "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 TC_LOG_ERROR("scripts", "Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
class Map;
class Unit;
@@ -101,7 +101,7 @@ struct MinionData
struct BossInfo
{
- BossInfo() : state(TO_BE_DECIDED) {}
+ BossInfo() : state(TO_BE_DECIDED) { }
EncounterState state;
DoorSet door[MAX_DOOR_TYPES];
MinionSet minion;
@@ -111,7 +111,7 @@ struct BossInfo
struct DoorInfo
{
explicit DoorInfo(BossInfo* _bossInfo, DoorType _type, BoundaryType _boundary)
- : bossInfo(_bossInfo), type(_type), boundary(_boundary) {}
+ : bossInfo(_bossInfo), type(_type), boundary(_boundary) { }
BossInfo* bossInfo;
DoorType type;
BoundaryType boundary;
@@ -119,7 +119,7 @@ struct DoorInfo
struct MinionInfo
{
- explicit MinionInfo(BossInfo* _bossInfo) : bossInfo(_bossInfo) {}
+ explicit MinionInfo(BossInfo* _bossInfo) : bossInfo(_bossInfo) { }
BossInfo* bossInfo;
};
@@ -131,14 +131,14 @@ typedef std::map<uint32 /*entry*/, MinionInfo> MinionInfoMap;
class InstanceScript : public ZoneScript
{
public:
- explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) {}
+ explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) { }
- virtual ~InstanceScript() {}
+ virtual ~InstanceScript() { }
Map* instance;
//On creation, NOT load.
- virtual void Initialize() {}
+ virtual void Initialize() { }
//On load
virtual void Load(char const* data) { LoadBossState(data); }
@@ -148,14 +148,14 @@ class InstanceScript : public ZoneScript
void SaveToDB();
- virtual void Update(uint32 /*diff*/) {}
+ virtual void Update(uint32 /*diff*/) { }
//Used by the map's CanEnter function.
//This is to prevent players from entering during boss encounters.
virtual bool IsEncounterInProgress() const;
//Called when a player successfully enters the instance.
- virtual void OnPlayerEnter(Player* /*player*/) {}
+ virtual void OnPlayerEnter(Player* /*player*/) { }
//Handle open / close objects
//use HandleGameObject(0, boolen, GO); in OnObjectCreate in instance scripts
@@ -212,7 +212,7 @@ class InstanceScript : public ZoneScript
void SendEncounterUnit(uint32 type, Unit* unit = NULL, uint8 param1 = 0, uint8 param2 = 0);
- virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
+ virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
protected:
void SetBossNumber(uint32 number) { bosses.resize(number); }
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index cb2e2a8682b..3505722b08b 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -154,13 +154,13 @@ uint32 LootStore::LoadLootTable()
if (maxcount > std::numeric_limits<uint8>::max())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: maxcount value (%u) to large. must be less %u - skipped", GetName(), entry, item, maxcount, std::numeric_limits<uint8>::max());
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: maxcount value (%u) to large. must be less %u - skipped", GetName(), entry, item, maxcount, std::numeric_limits<uint8>::max());
continue; // error already printed to log/console.
}
if (group >= 1 << 7) // it stored in 7 bit field
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: group (%u) must be less %u - skipped", GetName(), entry, item, group, 1 << 7);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: group (%u) must be less %u - skipped", GetName(), entry, item, group, 1 << 7);
return false;
}
@@ -267,12 +267,12 @@ void LootStore::ReportUnusedIds(LootIdSet const& lootIdSet) const
{
// all still listed ids isn't referenced
for (LootIdSet::const_iterator itr = lootIdSet.begin(); itr != lootIdSet.end(); ++itr)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d isn't %s and not referenced from loot, and then useless.", GetName(), *itr, GetEntryName());
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d isn't %s and not referenced from loot, and then useless.", GetName(), *itr, GetEntryName());
}
void LootStore::ReportNotExistedId(uint32 id) const
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d (%s) does not exist but used as loot id in DB.", GetName(), id, GetEntryName());
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d (%s) does not exist but used as loot id in DB.", GetName(), id, GetEntryName());
}
//
@@ -301,7 +301,7 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const
{
if (mincountOrRef == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: wrong mincountOrRef (%d) - skipped", store.GetName(), entry, itemid, mincountOrRef);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: wrong mincountOrRef (%d) - skipped", store.GetName(), entry, itemid, mincountOrRef);
return false;
}
@@ -310,36 +310,36 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid);
if (!proto)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid);
return false;
}
if (chance == 0 && group == 0) // Zero chance is allowed for grouped entries only
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: equal-chanced grouped entry, but group not defined - skipped", store.GetName(), entry, itemid);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: equal-chanced grouped entry, but group not defined - skipped", store.GetName(), entry, itemid);
return false;
}
if (chance != 0 && chance < 0.000001f) // loot with low chance
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: low chance (%f) - skipped",
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: low chance (%f) - skipped",
store.GetName(), entry, itemid, chance);
return false;
}
if (maxcount < mincountOrRef) // wrong max count
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: max count (%u) less that min count (%i) - skipped", store.GetName(), entry, itemid, int32(maxcount), mincountOrRef);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: max count (%u) less that min count (%i) - skipped", store.GetName(), entry, itemid, int32(maxcount), mincountOrRef);
return false;
}
}
else // mincountOrRef < 0
{
if (needs_quest)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: quest chance will be treated as non-quest chance", store.GetName(), entry, itemid);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: quest chance will be treated as non-quest chance", store.GetName(), entry, itemid);
else if (chance == 0) // no chance for the reference
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: zero chance is specified for a reference, skipped", store.GetName(), entry, itemid);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %d item %d: zero chance is specified for a reference, skipped", store.GetName(), entry, itemid);
return false;
}
}
@@ -449,7 +449,7 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
if (!tab)
{
if (!noEmptyError)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' loot id #%u used but it doesn't have records.", store.GetName(), lootId);
+ TC_LOG_ERROR("sql.sql", "Table '%s' loot id #%u used but it doesn't have records.", store.GetName(), lootId);
return false;
}
@@ -1186,10 +1186,10 @@ void LootTemplate::LootGroup::Verify(LootStore const& lootstore, uint32 id, uint
{
float chance = RawTotalChance();
if (chance > 101.0f) /// @todo replace with 100% when DBs will be ready
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %u group %d has total chance > 100%% (%f)", lootstore.GetName(), id, group_id, chance);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %u group %d has total chance > 100%% (%f)", lootstore.GetName(), id, group_id, chance);
if (chance >= 100.0f && !EqualChanced.empty())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %u group %d has items with chance=0%% but group total chance >= 100%% (%f)", lootstore.GetName(), id, group_id, chance);
+ TC_LOG_ERROR("sql.sql", "Table '%s' entry %u group %d has items with chance=0%% but group total chance >= 100%% (%f)", lootstore.GetName(), id, group_id, chance);
}
void LootTemplate::LootGroup::CheckLootRefs(LootTemplateMap const& /*store*/, LootIdSet* ref_set) const
@@ -1428,7 +1428,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
if (!cond || !cond->isLoaded())//should never happen, checked at loading
{
- TC_LOG_ERROR(LOG_FILTER_LOOT, "LootTemplate::addConditionItem: condition is null");
+ TC_LOG_ERROR("loot", "LootTemplate::addConditionItem: condition is null");
return false;
}
@@ -1493,7 +1493,7 @@ bool LootTemplate::isReference(uint32 id)
void LoadLootTemplates_Creature()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading creature loot templates...");
+ TC_LOG_INFO("server.loading", "Loading creature loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1520,14 +1520,14 @@ void LoadLootTemplates_Creature()
LootTemplates_Creature.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty");
}
void LoadLootTemplates_Disenchant()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading disenchanting loot templates...");
+ TC_LOG_INFO("server.loading", "Loading disenchanting loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1553,14 +1553,14 @@ void LoadLootTemplates_Disenchant()
LootTemplates_Disenchant.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty");
}
void LoadLootTemplates_Fishing()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading fishing loot templates...");
+ TC_LOG_INFO("server.loading", "Loading fishing loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1577,14 +1577,14 @@ void LoadLootTemplates_Fishing()
LootTemplates_Fishing.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty");
}
void LoadLootTemplates_Gameobject()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading gameobject loot templates...");
+ TC_LOG_INFO("server.loading", "Loading gameobject loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1611,14 +1611,14 @@ void LoadLootTemplates_Gameobject()
LootTemplates_Gameobject.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty");
}
void LoadLootTemplates_Item()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading item loot templates...");
+ TC_LOG_INFO("server.loading", "Loading item loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1635,14 +1635,14 @@ void LoadLootTemplates_Item()
LootTemplates_Item.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty");
}
void LoadLootTemplates_Milling()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading milling loot templates...");
+ TC_LOG_INFO("server.loading", "Loading milling loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1664,14 +1664,14 @@ void LoadLootTemplates_Milling()
LootTemplates_Milling.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty");
}
void LoadLootTemplates_Pickpocketing()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading pickpocketing loot templates...");
+ TC_LOG_INFO("server.loading", "Loading pickpocketing loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1698,14 +1698,14 @@ void LoadLootTemplates_Pickpocketing()
LootTemplates_Pickpocketing.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty");
}
void LoadLootTemplates_Prospecting()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading prospecting loot templates...");
+ TC_LOG_INFO("server.loading", "Loading prospecting loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1727,14 +1727,14 @@ void LoadLootTemplates_Prospecting()
LootTemplates_Prospecting.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty");
}
void LoadLootTemplates_Mail()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading mail loot templates...");
+ TC_LOG_INFO("server.loading", "Loading mail loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1751,14 +1751,14 @@ void LoadLootTemplates_Mail()
LootTemplates_Mail.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty");
}
void LoadLootTemplates_Skinning()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading skinning loot templates...");
+ TC_LOG_INFO("server.loading", "Loading skinning loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1785,14 +1785,14 @@ void LoadLootTemplates_Skinning()
LootTemplates_Skinning.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty");
}
void LoadLootTemplates_Spell()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading spell loot templates...");
+ TC_LOG_INFO("server.loading", "Loading spell loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1827,14 +1827,14 @@ void LoadLootTemplates_Spell()
LootTemplates_Spell.ReportUnusedIds(lootIdSet);
if (count)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty");
}
void LoadLootTemplates_Reference()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading reference loot templates...");
+ TC_LOG_INFO("server.loading", "Loading reference loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1857,5 +1857,5 @@ void LoadLootTemplates_Reference()
// output error for any still listed ids (not referenced from any loot table)
LootTemplates_Reference.ReportUnusedIds(lootIdSet);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h
index c2f74aab701..895d09fe7ad 100644
--- a/src/server/game/Loot/LootMgr.h
+++ b/src/server/game/Loot/LootMgr.h
@@ -117,7 +117,7 @@ struct LootStoreItem
LootStoreItem(uint32 _itemid, float _chanceOrQuestChance, uint16 _lootmode, uint8 _group, int32 _mincountOrRef, uint8 _maxcount)
: itemid(_itemid), chance(fabs(_chanceOrQuestChance)), mincountOrRef(_mincountOrRef), lootmode(_lootmode),
group(_group), needs_quest(_chanceOrQuestChance < 0), maxcount(_maxcount)
- {}
+ { }
bool Roll(bool rate) const; // Checks if the entry takes it's chance (at loot generation)
bool IsValid(LootStore const& store, uint32 entry) const;
@@ -148,7 +148,7 @@ struct LootItem
explicit LootItem(LootStoreItem const& li);
// Empty constructor for creating an empty LootItem to be filled in with DB data
- LootItem() : canSave(true){};
+ LootItem() : canSave(true){ };
// Basic checks for player/item compatibility - if false no chance to see the item in the loot
bool AllowedForPlayer(Player const* player) const;
@@ -162,10 +162,10 @@ struct QuestItem
bool is_looted;
QuestItem()
- : index(0), is_looted(false) {}
+ : index(0), is_looted(false) { }
QuestItem(uint8 _index, bool _islooted = false)
- : index(_index), is_looted(_islooted) {}
+ : index(_index), is_looted(_islooted) { }
};
struct Loot;
@@ -183,7 +183,7 @@ class LootStore
{
public:
explicit LootStore(char const* name, char const* entryName, bool ratesAllowed)
- : m_name(name), m_entryName(entryName), m_ratesAllowed(ratesAllowed) {}
+ : m_name(name), m_entryName(entryName), m_ratesAllowed(ratesAllowed) { }
virtual ~LootStore() { Clear(); }
@@ -256,9 +256,9 @@ class LootTemplate
class LootValidatorRef : public Reference<Loot, LootValidatorRef>
{
public:
- LootValidatorRef() {}
- void targetObjectDestroyLink() {}
- void sourceObjectDestroyLink() {}
+ LootValidatorRef() { }
+ void targetObjectDestroyLink() { }
+ void sourceObjectDestroyLink() { }
};
//=====================================================
@@ -303,7 +303,7 @@ struct Loot
// Only set for inventory items that can be right-click looted
uint32 containerID;
- Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0), loot_type(LOOT_CORPSE), maxDuplicates(1), containerID(0) {}
+ Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0), loot_type(LOOT_CORPSE), maxDuplicates(1), containerID(0) { }
~Loot() { clear(); }
// For deleting items at loot removal since there is no backward interface to the Item()
@@ -381,7 +381,7 @@ struct LootView
Player* viewer;
PermissionTypes permission;
LootView(Loot &_loot, Player* _viewer, PermissionTypes _permission = ALL_PERMISSION)
- : loot(_loot), viewer(_viewer), permission(_permission) {}
+ : loot(_loot), viewer(_viewer), permission(_permission) { }
};
extern LootStore LootTemplates_Creature;
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 2fa0a03e63f..2b47348e5f6 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -51,7 +51,7 @@ MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery
default:
m_messageType = MAIL_NORMAL;
m_senderId = 0; // will show mail from not existed player
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "MailSender::MailSender - Mail have unexpected sender typeid (%u)", sender->GetTypeId());
+ TC_LOG_ERROR("misc", "MailSender::MailSender - Mail have unexpected sender typeid (%u)", sender->GetTypeId());
break;
}
}
@@ -62,9 +62,7 @@ MailSender::MailSender(CalendarEvent* sender)
}
MailSender::MailSender(AuctionEntry* sender)
- : m_messageType(MAIL_AUCTION), m_senderId(sender->GetHouseId()), m_stationery(MAIL_STATIONERY_AUCTION)
-{
-}
+ : m_messageType(MAIL_AUCTION), m_senderId(sender->GetHouseId()), m_stationery(MAIL_STATIONERY_AUCTION) { }
MailSender::MailSender(Player* sender)
{
@@ -73,9 +71,7 @@ MailSender::MailSender(Player* sender)
m_senderId = sender->GetGUIDLow();
}
-MailReceiver::MailReceiver(Player* receiver) : m_receiver(receiver), m_receiver_lowguid(receiver->GetGUIDLow())
-{
-}
+MailReceiver::MailReceiver(Player* receiver) : m_receiver(receiver), m_receiver_lowguid(receiver->GetGUIDLow()) { }
MailReceiver::MailReceiver(Player* receiver, uint32 receiver_lowguid) : m_receiver(receiver), m_receiver_lowguid(receiver_lowguid)
{
diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h
index 6357d70e4a7..d4553233b64 100644
--- a/src/server/game/Mails/Mail.h
+++ b/src/server/game/Mails/Mail.h
@@ -102,7 +102,7 @@ class MailSender
class MailReceiver
{
public: // Constructors
- explicit MailReceiver(uint32 receiver_lowguid) : m_receiver(NULL), m_receiver_lowguid(receiver_lowguid) {}
+ explicit MailReceiver(uint32 receiver_lowguid) : m_receiver(NULL), m_receiver_lowguid(receiver_lowguid) { }
MailReceiver(Player* receiver);
MailReceiver(Player* receiver, uint32 receiver_lowguid);
public: // Accessors
@@ -120,9 +120,9 @@ class MailDraft
public: // Constructors
explicit MailDraft(uint16 mailTemplateId, bool need_items = true)
: m_mailTemplateId(mailTemplateId), m_mailTemplateItemsNeed(need_items), m_money(0), m_COD(0)
- {}
+ { }
MailDraft(std::string const& subject, std::string const& body)
- : m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject), m_body(body), m_money(0), m_COD(0) {}
+ : m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject), m_body(body), m_money(0), m_COD(0) { }
public: // Accessors
uint16 GetMailTemplateId() const { return m_mailTemplateId; }
std::string const& GetSubject() const { return m_subject; }
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 9abb78187a9..6f99ee07c05 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -63,9 +63,11 @@ Map::~Map()
obj->ResetMap();
}
- for (TransportsContainer::iterator itr = _transports.begin(); itr != _transports.end(); ++itr)
+ for (TransportsContainer::iterator itr = _transports.begin(); itr != _transports.end();)
{
Transport* transport = *itr;
+ ++itr;
+
// Destroy local transports
if (transport->GetTransportTemplate()->inInstance)
{
@@ -90,14 +92,14 @@ bool Map::ExistMap(uint32 mapid, int gx, int gy)
FILE* pf = fopen(fileName, "rb");
if (!pf)
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map file '%s': does not exist!", fileName);
+ TC_LOG_ERROR("maps", "Map file '%s': does not exist!", fileName);
else
{
map_fileheader header;
if (fread(&header, sizeof(header), 1, pf) == 1)
{
if (header.mapMagic.asUInt != MapMagic.asUInt || header.versionMagic.asUInt != MapVersionMagic.asUInt)
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please recreate using the mapextractor.",
+ TC_LOG_ERROR("maps", "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please recreate using the mapextractor.",
fileName, 4, header.mapMagic.asChar, 4, header.versionMagic.asChar, 4, MapMagic.asChar, 4, MapVersionMagic.asChar);
else
ret = true;
@@ -119,7 +121,7 @@ bool Map::ExistVMap(uint32 mapid, int gx, int gy)
if (!exists)
{
std::string name = vmgr->getDirFileName(mapid, gx, gy);
- TC_LOG_ERROR(LOG_FILTER_MAPS, "VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld->GetDataPath()+"vmaps/"+name).c_str());
+ TC_LOG_ERROR("maps", "VMap file '%s' is missing or points to wrong version of vmap file. Redo vmaps with latest version of vmap_assembler.exe.", (sWorld->GetDataPath()+"vmaps/"+name).c_str());
return false;
}
}
@@ -133,9 +135,9 @@ void Map::LoadMMap(int gx, int gy)
bool mmapLoadResult = MMAP::MMapFactory::createOrGetMMapManager()->loadMap((sWorld->GetDataPath() + "mmaps").c_str(), GetId(), gx, gy);
if (mmapLoadResult)
- TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP loaded name:%s, id:%d, x:%d, y:%d (mmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
+ TC_LOG_INFO("maps", "MMAP loaded name:%s, id:%d, x:%d, y:%d (mmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
else
- TC_LOG_INFO(LOG_FILTER_MAPS, "Could not load MMAP name:%s, id:%d, x:%d, y:%d (mmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
+ TC_LOG_INFO("maps", "Could not load MMAP name:%s, id:%d, x:%d, y:%d (mmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
}
void Map::LoadVMap(int gx, int gy)
@@ -145,13 +147,13 @@ void Map::LoadVMap(int gx, int gy)
switch (vmapLoadResult)
{
case VMAP::VMAP_LOAD_RESULT_OK:
- TC_LOG_INFO(LOG_FILTER_MAPS, "VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
+ TC_LOG_INFO("maps", "VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
break;
case VMAP::VMAP_LOAD_RESULT_ERROR:
- TC_LOG_INFO(LOG_FILTER_MAPS, "Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
+ TC_LOG_INFO("maps", "Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
break;
case VMAP::VMAP_LOAD_RESULT_IGNORED:
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
+ TC_LOG_DEBUG("maps", "Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
break;
}
}
@@ -178,7 +180,7 @@ void Map::LoadMap(int gx, int gy, bool reload)
//map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?)
if (GridMaps[gx][gy])
{
- TC_LOG_INFO(LOG_FILTER_MAPS, "Unloading previously loaded map %u before reloading.", GetId());
+ TC_LOG_INFO("maps", "Unloading previously loaded map %u before reloading.", GetId());
sScriptMgr->OnUnloadGridMap(this, GridMaps[gx][gy], gx, gy);
delete (GridMaps[gx][gy]);
@@ -190,11 +192,11 @@ void Map::LoadMap(int gx, int gy, bool reload)
int len = sWorld->GetDataPath().length() + strlen("maps/%03u%02u%02u.map") + 1;
tmp = new char[len];
snprintf(tmp, len, (char *)(sWorld->GetDataPath() + "maps/%03u%02u%02u.map").c_str(), GetId(), gx, gy);
- TC_LOG_INFO(LOG_FILTER_MAPS, "Loading map %s", tmp);
+ TC_LOG_INFO("maps", "Loading map %s", tmp);
// loading data
GridMaps[gx][gy] = new GridMap();
if (!GridMaps[gx][gy]->loadData(tmp))
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Error loading map file: \n %s\n", tmp);
+ TC_LOG_ERROR("maps", "Error loading map file: \n %s\n", tmp);
delete[] tmp;
sScriptMgr->OnLoadGridMap(this, GridMaps[gx][gy], gx, gy);
@@ -293,9 +295,7 @@ void Map::AddToGrid(GameObject* obj, Cell const& cell)
}
template<class T>
-void Map::SwitchGridContainers(T* /*obj*/, bool /*on*/)
-{
-}
+void Map::SwitchGridContainers(T* /*obj*/, bool /*on*/) { }
template<>
void Map::SwitchGridContainers(Creature* obj, bool on)
@@ -304,7 +304,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on)
CellCoord p = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if (!p.IsCoordValid())
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
+ TC_LOG_ERROR("maps", "Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@@ -312,7 +312,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on)
if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y)))
return;
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
+ TC_LOG_DEBUG("maps", "Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(ngrid != NULL);
@@ -341,7 +341,7 @@ void Map::SwitchGridContainers(GameObject* obj, bool on)
CellCoord p = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if (!p.IsCoordValid())
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
+ TC_LOG_ERROR("maps", "Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@@ -349,7 +349,7 @@ void Map::SwitchGridContainers(GameObject* obj, bool on)
if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y)))
return;
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
+ TC_LOG_DEBUG("maps", "Switch object " UI64FMTD " from grid[%u, %u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(ngrid != NULL);
@@ -396,7 +396,7 @@ void Map::EnsureGridCreated_i(const GridCoord &p)
{
if (!getNGrid(p.x_coord, p.y_coord))
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
+ TC_LOG_DEBUG("maps", "Creating grid[%u, %u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId);
setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)),
p.x_coord, p.y_coord);
@@ -425,7 +425,7 @@ void Map::EnsureGridLoadedForActiveObject(const Cell &cell, WorldObject* object)
// refresh grid state & timer
if (grid->GetGridState() != GRID_STATE_ACTIVE)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Active object " UI64FMTD " triggers loading of grid [%u, %u] on map %u", object->GetGUID(), cell.GridX(), cell.GridY(), GetId());
+ TC_LOG_DEBUG("maps", "Active object " UI64FMTD " triggers loading of grid [%u, %u] on map %u", object->GetGUID(), cell.GridX(), cell.GridY(), GetId());
ResetGridExpiry(*grid, 0.1f);
grid->SetGridState(GRID_STATE_ACTIVE);
}
@@ -440,7 +440,7 @@ bool Map::EnsureGridLoaded(const Cell &cell)
ASSERT(grid != NULL);
if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY()))
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Loading grid[%u, %u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId);
+ TC_LOG_DEBUG("maps", "Loading grid[%u, %u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId);
setGridObjectDataLoaded(true, cell.GridX(), cell.GridY());
@@ -466,7 +466,7 @@ bool Map::AddPlayerToMap(Player* player)
CellCoord cellCoord = Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY());
if (!cellCoord.IsCoordValid())
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
+ TC_LOG_ERROR("maps", "Map::Add: Player (GUID: %u) has invalid coordinates X:%f Y:%f grid cell [%u:%u]", player->GetGUIDLow(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return false;
}
@@ -490,9 +490,7 @@ bool Map::AddPlayerToMap(Player* player)
}
template<class T>
-void Map::InitializeObject(T* /*obj*/)
-{
-}
+void Map::InitializeObject(T* /*obj*/) { }
template<>
void Map::InitializeObject(Creature* obj)
@@ -524,7 +522,7 @@ bool Map::AddToMap(T* obj)
ASSERT(cellCoord.IsCoordValid());
if (!cellCoord.IsCoordValid())
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
+ TC_LOG_ERROR("maps", "Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return false; //Should delete object
}
@@ -534,7 +532,7 @@ bool Map::AddToMap(T* obj)
else
EnsureGridCreated(GridCoord(cell.GridX(), cell.GridY()));
AddToGrid(obj, cell);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY());
+ TC_LOG_DEBUG("maps", "Object %u enters grid[%u, %u]", GUID_LOPART(obj->GetGUID()), cell.GridX(), cell.GridY());
//Must already be set before AddToMap. Usually during obj->Create.
//obj->SetMap(this);
@@ -561,7 +559,7 @@ bool Map::AddToMap(Transport* obj)
CellCoord cellCoord = Trinity::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if (!cellCoord.IsCoordValid())
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
+ TC_LOG_ERROR("maps", "Map::Add: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return false; //Should delete object
}
@@ -691,7 +689,7 @@ struct ResetNotifier
for (typename GridRefManager<T>::iterator iter=m.begin(); iter != m.end(); ++iter)
iter->GetSource()->ResetAllNotifies();
}
- template<class T> void Visit(GridRefManager<T> &) {}
+ template<class T> void Visit(GridRefManager<T> &) { }
void Visit(CreatureMapType &m) { resetNotify<Creature>(m);}
void Visit(PlayerMapType &m) { resetNotify<Player>(m);}
};
@@ -858,7 +856,7 @@ void Map::PlayerRelocation(Player* player, float x, float y, float z, float orie
if (old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell))
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Player %s relocation grid[%u, %u]cell[%u, %u]->grid[%u, %u]cell[%u, %u]", player->GetName().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "Player %s relocation grid[%u, %u]cell[%u, %u]->grid[%u, %u]cell[%u, %u]", player->GetName().c_str(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
player->RemoveFromGrid();
@@ -891,7 +889,7 @@ void Map::CreatureRelocation(Creature* creature, float x, float y, float z, floa
if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell))
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) added to moving list from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", creature->GetGUIDLow(), creature->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u Entry: %u) added to moving list from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", creature->GetGUIDLow(), creature->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
AddCreatureToMoveList(creature, x, y, z, ang);
// in diffcell/diffgrid case notifiers called at finishing move creature in Map::MoveAllCreaturesInMoveList
@@ -923,7 +921,7 @@ void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float
if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell))
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) added to moving list from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u Entry: %u) added to moving list from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
AddGameObjectToMoveList(go, x, y, z, orientation);
// in diffcell/diffgrid case notifiers called at finishing move go in Map::MoveAllGameObjectsInMoveList
@@ -1015,7 +1013,7 @@ void Map::MoveAllCreaturesInMoveList()
{
// ... or unload (if respawn grid also not loaded)
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.", c->GetGUIDLow(), c->GetEntry());
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.", c->GetGUIDLow(), c->GetEntry());
#endif
//AddObjectToRemoveList(Pet*) should only be called in Pet::Remove
//This may happen when a player just logs in and a pet moves to a nearby unloaded cell
@@ -1068,7 +1066,7 @@ void Map::MoveAllGameObjectsInMoveList()
{
// ... or unload (if respawn grid also not loaded)
#ifdef TRINITY_DEBUG
- sLog->outDebug(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.", go->GetGUIDLow(), go->GetEntry());
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.", go->GetGUIDLow(), go->GetEntry());
#endif
AddObjectToRemoveList(go);
}
@@ -1087,7 +1085,7 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
if (old_cell.DiffCell(new_cell))
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved in grid[%u, %u] from cell[%u, %u] to cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u Entry: %u) moved in grid[%u, %u] from cell[%u, %u] to cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY());
#endif
c->RemoveFromGrid();
@@ -1096,7 +1094,7 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
else
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved in same grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY());
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u Entry: %u) moved in same grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY());
#endif
}
@@ -1109,7 +1107,7 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
EnsureGridLoadedForActiveObject(new_cell, c);
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "Active creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
c->RemoveFromGrid();
@@ -1122,7 +1120,7 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY())))
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
c->RemoveFromGrid();
@@ -1134,7 +1132,7 @@ bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
// fail to move: normal creature attempt move to unloaded grid
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) attempted to move from grid[%u, %u]cell[%u, %u] to unloaded grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u Entry: %u) attempted to move from grid[%u, %u]cell[%u, %u] to unloaded grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
return false;
}
@@ -1148,7 +1146,7 @@ bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell)
if (old_cell.DiffCell(new_cell))
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved in grid[%u, %u] from cell[%u, %u] to cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u Entry: %u) moved in grid[%u, %u] from cell[%u, %u] to cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY());
#endif
go->RemoveFromGrid();
@@ -1157,7 +1155,7 @@ bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell)
else
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved in same grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY());
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u Entry: %u) moved in same grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY());
#endif
}
@@ -1170,7 +1168,7 @@ bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell)
EnsureGridLoadedForActiveObject(new_cell, go);
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Active GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "Active GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
go->RemoveFromGrid();
@@ -1183,7 +1181,7 @@ bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell)
if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY())))
{
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
go->RemoveFromGrid();
@@ -1195,7 +1193,7 @@ bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell)
// fail to move: normal GameObject attempt move to unloaded grid
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) attempted to move from grid[%u, %u]cell[%u, %u] to unloaded grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u Entry: %u) attempted to move from grid[%u, %u]cell[%u, %u] to unloaded grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
#endif
return false;
}
@@ -1214,7 +1212,7 @@ bool Map::CreatureRespawnRelocation(Creature* c, bool diffGridOnly)
c->GetMotionMaster()->Clear();
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to respawn grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY());
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to respawn grid[%u, %u]cell[%u, %u].", c->GetGUIDLow(), c->GetEntry(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY());
#endif
// teleport it to respawn point (like normal respawn if player see)
@@ -1241,7 +1239,7 @@ bool Map::GameObjectRespawnRelocation(GameObject* go, bool diffGridOnly)
return true;
#ifdef TRINITY_DEBUG
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to respawn grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), go->GetCurrentCell().GridX(), go->GetCurrentCell().GridY(), go->GetCurrentCell().CellX(), go->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY());
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u Entry: %u) moved from grid[%u, %u]cell[%u, %u] to respawn grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), go->GetEntry(), go->GetCurrentCell().GridX(), go->GetCurrentCell().GridY(), go->GetCurrentCell().CellX(), go->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY());
#endif
// teleport it to respawn point (like normal respawn if player see)
@@ -1271,7 +1269,7 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll)
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Unloading grid[%u, %u] for map %u", x, y, GetId());
+ TC_LOG_DEBUG("maps", "Unloading grid[%u, %u] for map %u", x, y, GetId());
if (!unloadAll)
{
@@ -1330,7 +1328,7 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll)
GridMaps[gx][gy] = NULL;
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Unloading grid[%u, %u] for map %u finished", x, y, GetId());
+ TC_LOG_DEBUG("maps", "Unloading grid[%u, %u] for map %u finished", x, y, GetId());
return true;
}
@@ -1344,7 +1342,7 @@ void Map::RemoveAllPlayers()
if (!player->IsBeingTeleportedFar())
{
// this is happening for bg
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName().c_str(), GetId());
+ TC_LOG_ERROR("maps", "Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName().c_str(), GetId());
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation());
}
}
@@ -1418,21 +1416,21 @@ bool GridMap::loadData(char* filename)
// load up area data
if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize))
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Error loading map area data\n");
+ TC_LOG_ERROR("maps", "Error loading map area data\n");
fclose(in);
return false;
}
// load up height data
if (header.heightMapOffset && !loadHeightData(in, header.heightMapOffset, header.heightMapSize))
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Error loading map height data\n");
+ TC_LOG_ERROR("maps", "Error loading map height data\n");
fclose(in);
return false;
}
// load up liquid data
if (header.liquidMapOffset && !loadLiquidData(in, header.liquidMapOffset, header.liquidMapSize))
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Error loading map liquids data\n");
+ TC_LOG_ERROR("maps", "Error loading map liquids data\n");
fclose(in);
return false;
}
@@ -1440,7 +1438,7 @@ bool GridMap::loadData(char* filename)
return true;
}
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please recreate using the mapextractor.",
+ TC_LOG_ERROR("maps", "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please recreate using the mapextractor.",
filename, 4, header.mapMagic.asChar, 4, header.versionMagic.asChar, 4, MapMagic.asChar, 4, MapVersionMagic.asChar);
fclose(in);
return false;
@@ -2031,7 +2029,7 @@ bool Map::IsOutdoors(float x, float y, float z) const
WMOAreaTableEntry const* wmoEntry= GetWMOAreaTableEntryByTripple(rootId, adtId, groupId);
if (wmoEntry)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId);
+ TC_LOG_DEBUG("maps", "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId);
atEntry = GetAreaEntryByAreaID(wmoEntry->areaId);
}
return IsOutdoorWMO(mogpFlags, adtId, rootId, groupId, wmoEntry, atEntry);
@@ -2112,7 +2110,7 @@ ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidTyp
uint32 liquid_type = 0;
if (vmgr->GetLiquidLevel(GetId(), x, y, z, ReqLiquidType, liquid_level, ground_level, liquid_type))
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "getLiquidStatus(): vmap liquid level: %f ground: %f type: %u", liquid_level, ground_level, liquid_type);
+ TC_LOG_DEBUG("maps", "getLiquidStatus(): vmap liquid level: %f ground: %f type: %u", liquid_level, ground_level, liquid_type);
// Check water level and ground level
if (liquid_level > ground_level && z > ground_level - 2)
{
@@ -2267,7 +2265,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const
Cell xy_cell(c->GetPositionX(), c->GetPositionY());
if (xy_cell != cur_cell)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u, %u]cell[%u, %u] instead of grid[%u, %u]cell[%u, %u]",
+ TC_LOG_DEBUG("maps", "Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u, %u]cell[%u, %u] instead of grid[%u, %u]cell[%u, %u]",
c->GetGUIDLow(),
c->GetPositionX(), c->GetPositionY(), (moved ? "final" : "original"),
cur_cell.GridX(), cur_cell.GridY(), cur_cell.CellX(), cur_cell.CellY(),
@@ -2307,7 +2305,7 @@ void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpa
void Map::SendInitSelf(Player* player)
{
- TC_LOG_INFO(LOG_FILTER_MAPS, "Creating player data for himself %u", player->GetGUIDLow());
+ TC_LOG_INFO("maps", "Creating player data for himself %u", player->GetGUIDLow());
UpdateData data;
@@ -2367,7 +2365,7 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y)
{
if (x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y);
+ TC_LOG_ERROR("maps", "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y);
ASSERT(false);
}
i_grids[x][y] = grid;
@@ -2399,7 +2397,7 @@ void Map::AddObjectToRemoveList(WorldObject* obj)
obj->CleanupsBeforeDelete(false); // remove or simplify at least cross referenced links
i_objectsToRemove.insert(obj);
- //TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object (GUID: %u TypeId: %u) added to removing list.", obj->GetGUIDLow(), obj->GetTypeId());
+ //TC_LOG_DEBUG("maps", "Object (GUID: %u TypeId: %u) added to removing list.", obj->GetGUIDLow(), obj->GetTypeId());
}
void Map::AddObjectToSwitchList(WorldObject* obj, bool on)
@@ -2428,11 +2426,23 @@ void Map::RemoveAllObjectsInRemoveList()
bool on = itr->second;
i_objectsToSwitch.erase(itr);
- if ((obj->GetTypeId() == TYPEID_UNIT || obj->GetTypeId() == TYPEID_GAMEOBJECT) && !obj->IsPermanentWorldObject())
- SwitchGridContainers(obj, on);
+ if (!obj->IsPermanentWorldObject())
+ {
+ switch (obj->GetTypeId())
+ {
+ case TYPEID_UNIT:
+ SwitchGridContainers<Creature>(obj->ToCreature(), on);
+ break;
+ case TYPEID_GAMEOBJECT:
+ SwitchGridContainers<GameObject>(obj->ToGameObject(), on);
+ break;
+ default:
+ break;
+ }
+ }
}
- //TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object remover 1 check.");
+ //TC_LOG_DEBUG("maps", "Object remover 1 check.");
while (!i_objectsToRemove.empty())
{
std::set<WorldObject*>::iterator itr = i_objectsToRemove.begin();
@@ -2444,7 +2454,7 @@ void Map::RemoveAllObjectsInRemoveList()
{
Corpse* corpse = ObjectAccessor::GetCorpse(*obj, obj->GetGUID());
if (!corpse)
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow());
+ TC_LOG_ERROR("maps", "Tried to delete corpse/bones %u that is not in map.", obj->GetGUIDLow());
else
RemoveFromMap(corpse, true);
break;
@@ -2462,14 +2472,14 @@ void Map::RemoveAllObjectsInRemoveList()
RemoveFromMap(obj->ToCreature(), true);
break;
default:
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
+ TC_LOG_ERROR("maps", "Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
break;
}
i_objectsToRemove.erase(itr);
}
- //TC_LOG_DEBUG(LOG_FILTER_MAPS, "Object remover 2 check.");
+ //TC_LOG_DEBUG("maps", "Object remover 2 check.");
}
uint32 Map::GetPlayersCountExceptGMs() const
@@ -2546,7 +2556,7 @@ void Map::AddToActive(Creature* c)
else
{
GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY());
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
+ TC_LOG_ERROR("maps", "Active creature (GUID: %u Entry: %u) added to grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord);
}
}
@@ -2559,9 +2569,7 @@ void Map::AddToActive(DynamicObject* d)
}
template<class T>
-void Map::RemoveFromActive(T* /*obj*/)
-{
-}
+void Map::RemoveFromActive(T* /*obj*/) { }
template <>
void Map::RemoveFromActive(Creature* c)
@@ -2579,7 +2587,7 @@ void Map::RemoveFromActive(Creature* c)
else
{
GridCoord p2 = Trinity::ComputeGridCoord(c->GetPositionX(), c->GetPositionY());
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
+ TC_LOG_ERROR("maps", "Active creature (GUID: %u Entry: %u) removed from grid[%u, %u] but spawn grid[%u, %u] was not loaded.",
c->GetGUIDLow(), c->GetEntry(), p.x_coord, p.y_coord, p2.x_coord, p2.y_coord);
}
}
@@ -2636,7 +2644,7 @@ bool InstanceMap::CanEnter(Player* player)
{
if (player->GetMapRef().getTarget() == this)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "InstanceMap::CanEnter - player %s(%u) already in map %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode());
+ TC_LOG_ERROR("maps", "InstanceMap::CanEnter - player %s(%u) already in map %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), GetId(), GetInstanceId(), GetSpawnMode());
ASSERT(false);
return false;
}
@@ -2649,7 +2657,7 @@ bool InstanceMap::CanEnter(Player* player)
uint32 maxPlayers = GetMaxPlayers();
if (GetPlayersCountExceptGMs() >= maxPlayers)
{
- TC_LOG_INFO(LOG_FILTER_MAPS, "MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName().c_str());
+ TC_LOG_INFO("maps", "MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName().c_str());
player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS);
return false;
}
@@ -2719,7 +2727,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
InstanceSave* mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId());
if (!mapSave)
{
- TC_LOG_INFO(LOG_FILTER_MAPS, "InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
+ TC_LOG_INFO("maps", "InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
mapSave = sInstanceSaveMgr->AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
}
@@ -2732,7 +2740,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
// cannot enter other instances if bound permanently
if (playerBind->save != mapSave)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is permanently bound to instance %s %d, %d, %d, %d, %d, %d but he is being put into instance %s %d, %d, %d, %d, %d, %d", player->GetName().c_str(), player->GetGUIDLow(), GetMapName(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), GetMapName(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset());
+ TC_LOG_ERROR("maps", "InstanceMap::Add: player %s(%d) is permanently bound to instance %s %d, %d, %d, %d, %d, %d but he is being put into instance %s %d, %d, %d, %d, %d, %d", player->GetName().c_str(), player->GetGUIDLow(), GetMapName(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset(), GetMapName(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset());
return false;
}
}
@@ -2744,9 +2752,9 @@ bool InstanceMap::AddPlayerToMap(Player* player)
InstanceGroupBind* groupBind = group->GetBoundInstance(this);
if (playerBind && playerBind->save != mapSave)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is being put into instance %s %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), GetMapName(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset());
+ TC_LOG_ERROR("maps", "InstanceMap::Add: player %s(%d) is being put into instance %s %d, %d, %d, %d, %d, %d but he is in group %d and is bound to instance %d, %d, %d, %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), GetMapName(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->GetPlayerCount(), mapSave->GetGroupCount(), mapSave->CanReset(), GUID_LOPART(group->GetLeaderGUID()), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(), playerBind->save->GetPlayerCount(), playerBind->save->GetGroupCount(), playerBind->save->CanReset());
if (groupBind)
- TC_LOG_ERROR(LOG_FILTER_MAPS, "InstanceMap::Add: the group is bound to the instance %s %d, %d, %d, %d, %d, %d", GetMapName(), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset());
+ TC_LOG_ERROR("maps", "InstanceMap::Add: the group is bound to the instance %s %d, %d, %d, %d, %d, %d", GetMapName(), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty(), groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount(), groupBind->save->CanReset());
//ASSERT(false);
return false;
}
@@ -2758,12 +2766,12 @@ bool InstanceMap::AddPlayerToMap(Player* player)
// cannot jump to a different instance without resetting it
if (groupBind->save != mapSave)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d but he is in group %d which is bound to instance %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(group->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty());
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount());
+ TC_LOG_ERROR("maps", "InstanceMap::Add: player %s(%d) is being put into instance %d, %d, %d but he is in group %d which is bound to instance %d, %d, %d!", player->GetName().c_str(), player->GetGUIDLow(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), GUID_LOPART(group->GetLeaderGUID()), groupBind->save->GetMapId(), groupBind->save->GetInstanceId(), groupBind->save->GetDifficulty());
+ TC_LOG_ERROR("maps", "MapSave players: %d, group count: %d", mapSave->GetPlayerCount(), mapSave->GetGroupCount());
if (groupBind->save)
- TC_LOG_ERROR(LOG_FILTER_MAPS, "GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount());
+ TC_LOG_ERROR("maps", "GroupBind save players: %d, group count: %d", groupBind->save->GetPlayerCount(), groupBind->save->GetGroupCount());
else
- TC_LOG_ERROR(LOG_FILTER_MAPS, "GroupBind save NULL");
+ TC_LOG_ERROR("maps", "GroupBind save NULL");
return false;
}
// if the group/leader is permanently bound to the instance
@@ -2795,7 +2803,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
// first player enters (no players yet)
SetResetSchedule(false);
- TC_LOG_INFO(LOG_FILTER_MAPS, "MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName().c_str(), GetInstanceId(), GetMapName());
+ TC_LOG_INFO("maps", "MAP: Player '%s' entered instance '%u' of map '%s'", player->GetName().c_str(), GetInstanceId(), GetMapName());
// initialize unload state
m_unloadTimer = 0;
m_resetAfterUnload = false;
@@ -2821,7 +2829,7 @@ void InstanceMap::Update(const uint32 t_diff)
void InstanceMap::RemovePlayerFromMap(Player* player, bool remove)
{
- TC_LOG_INFO(LOG_FILTER_MAPS, "MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName().c_str(), GetInstanceId(), GetMapName());
+ TC_LOG_INFO("maps", "MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to another map", player->GetName().c_str(), GetInstanceId(), GetMapName());
//if last player set unload timer
if (!m_unloadTimer && m_mapRefManager.getSize() == 1)
m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
@@ -2862,7 +2870,7 @@ void InstanceMap::CreateInstanceData(bool load)
i_data->SetCompletedEncountersMask(fields[1].GetUInt32());
if (data != "")
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Loading instance data for `%s` with id %u", sObjectMgr->GetScriptName(i_script_id), i_InstanceId);
+ TC_LOG_DEBUG("maps", "Loading instance data for `%s` with id %u", sObjectMgr->GetScriptName(i_script_id), i_InstanceId);
i_data->Load(data.c_str());
}
}
@@ -2916,7 +2924,7 @@ void InstanceMap::PermBindAllPlayers(Player* source)
InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId());
if (!save)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Cannot bind player (GUID: %u, Name: %s), because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", source->GetGUIDLow(), source->GetName().c_str(), source->GetMap()->GetMapName(), source->GetMapId(), GetInstanceId());
+ TC_LOG_ERROR("maps", "Cannot bind player (GUID: %u, Name: %s), because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", source->GetGUIDLow(), source->GetName().c_str(), source->GetMap()->GetMapName(), source->GetMapId(), GetInstanceId());
return;
}
@@ -2970,7 +2978,7 @@ void InstanceMap::SetResetSchedule(bool on)
if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId()))
sInstanceSaveMgr->ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId()));
else
- TC_LOG_ERROR(LOG_FILTER_MAPS, "InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u, difficulty: %u)",
+ TC_LOG_ERROR("maps", "InstanceMap::SetResetSchedule: cannot turn schedule %s, there is no save information for instance (map [id: %u, name: %s], instance id: %u, difficulty: %u)",
on ? "on" : "off", GetId(), GetMapName(), GetInstanceId(), Difficulty(GetSpawnMode()));
}
}
@@ -3032,7 +3040,7 @@ bool BattlegroundMap::CanEnter(Player* player)
{
if (player->GetMapRef().getTarget() == this)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow());
+ TC_LOG_ERROR("maps", "BGMap::CanEnter - player %u is already in map!", player->GetGUIDLow());
ASSERT(false);
return false;
}
@@ -3060,7 +3068,7 @@ bool BattlegroundMap::AddPlayerToMap(Player* player)
void BattlegroundMap::RemovePlayerFromMap(Player* player, bool remove)
{
- TC_LOG_INFO(LOG_FILTER_MAPS, "MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName().c_str(), GetInstanceId(), GetMapName());
+ TC_LOG_INFO("maps", "MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to another map", player->GetName().c_str(), GetInstanceId(), GetMapName());
Map::RemovePlayerFromMap(player, remove);
}
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index 385683d66af..667f94fb53a 100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -193,20 +193,20 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
const MapEntry* entry = sMapStore.LookupEntry(GetId());
if (!entry)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "CreateInstance: no entry for map %d", GetId());
+ TC_LOG_ERROR("maps", "CreateInstance: no entry for map %d", GetId());
ASSERT(false);
}
const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(GetId());
if (!iTemplate)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "CreateInstance: no instance template for map %d", GetId());
+ TC_LOG_ERROR("maps", "CreateInstance: no instance template for map %d", GetId());
ASSERT(false);
}
// some instances only have one difficulty
GetDownscaledMapDifficultyData(GetId(), difficulty);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal");
+ TC_LOG_DEBUG("maps", "MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal");
InstanceMap* map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this);
ASSERT(map->IsDungeon());
@@ -225,7 +225,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun
// load/create a map
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());
+ TC_LOG_DEBUG("maps", "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), bg->GetMinLevel());
diff --git a/src/server/game/Maps/MapInstanced.h b/src/server/game/Maps/MapInstanced.h
index 06a5f3e04a5..0955acc1432 100644
--- a/src/server/game/Maps/MapInstanced.h
+++ b/src/server/game/Maps/MapInstanced.h
@@ -30,7 +30,7 @@ class MapInstanced : public Map
typedef UNORDERED_MAP< uint32, Map*> InstancedMaps;
MapInstanced(uint32 id, time_t expiry);
- ~MapInstanced() {}
+ ~MapInstanced() { }
// functions overwrite Map versions
void Update(const uint32);
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 5aa8b85fbca..2e034f5a254 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -45,9 +45,7 @@ MapManager::MapManager()
i_timer.SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_MAPUPDATE));
}
-MapManager::~MapManager()
-{
-}
+MapManager::~MapManager() { }
void MapManager::Initialize()
{
@@ -80,7 +78,7 @@ void MapManager::checkAndCorrectGridStatesArray()
{
if (i_GridStates[i] != si_GridStates[i])
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "MapManager::checkGridStates(), GridState: si_GridStates is currupt !!!");
+ TC_LOG_ERROR("maps", "MapManager::checkGridStates(), GridState: si_GridStates is currupt !!!");
ok = false;
si_GridStates[i] = i_GridStates[i];
}
@@ -197,7 +195,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
// 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
player->GetSession()->SendAreaTriggerMessage(player->GetSession()->GetTrinityString(LANG_INSTANCE_RAID_GROUP_ONLY), mapName);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MAP: Player '%s' must be in a raid group to enter instance '%s'", player->GetName().c_str(), mapName);
+ TC_LOG_DEBUG("maps", "MAP: Player '%s' must be in a raid group to enter instance '%s'", player->GetName().c_str(), mapName);
return false;
}
}
@@ -221,15 +219,15 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
{
WorldPacket data(SMSG_CORPSE_NOT_IN_INSTANCE);
player->GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MAP: Player '%s' does not have a corpse in instance '%s' and cannot enter.", player->GetName().c_str(), mapName);
+ TC_LOG_DEBUG("maps", "MAP: Player '%s' does not have a corpse in instance '%s' and cannot enter.", player->GetName().c_str(), mapName);
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName().c_str(), mapName);
+ TC_LOG_DEBUG("maps", "MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName().c_str(), mapName);
player->ResurrectPlayer(0.5f, false);
player->SpawnCorpseBones();
}
else
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName().c_str());
+ TC_LOG_DEBUG("maps", "Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName().c_str());
}
//Get instance where player's group is bound & its map
@@ -296,9 +294,7 @@ void MapManager::Update(uint32 diff)
i_timer.SetCurrent(0);
}
-void MapManager::DoDelayedMovesAndRemoves()
-{
-}
+void MapManager::DoDelayedMovesAndRemoves() { }
bool MapManager::ExistMapAndVMap(uint32 mapid, float x, float y)
{
@@ -408,7 +404,7 @@ uint32 MapManager::GenerateInstanceId()
if (newInstanceId == _nextInstanceId)
{
- TC_LOG_ERROR(LOG_FILTER_MAPS, "Instance ID overflow!! Can't continue, shutting down server. ");
+ TC_LOG_ERROR("maps", "Instance ID overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
diff --git a/src/server/game/Maps/MapReference.h b/src/server/game/Maps/MapReference.h
index f2f35e0955e..25c4b3870c5 100644
--- a/src/server/game/Maps/MapReference.h
+++ b/src/server/game/Maps/MapReference.h
@@ -42,7 +42,7 @@ class MapReference : public Reference<Map, Player>
getTarget()->m_mapRefManager.decSize();
}
public:
- MapReference() : Reference<Map, Player>() {}
+ MapReference() : Reference<Map, Player>() { }
~MapReference() { unlink(); }
MapReference* next() { return (MapReference*)Reference<Map, Player>::next(); }
MapReference const* next() const { return (MapReference const*)Reference<Map, Player>::next(); }
diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp
index 5e5f520505c..f3a5a66bf66 100644
--- a/src/server/game/Maps/MapUpdater.cpp
+++ b/src/server/game/Maps/MapUpdater.cpp
@@ -58,9 +58,7 @@ class MapUpdateRequest : public ACE_Method_Request
};
MapUpdater::MapUpdater():
-m_executor(), m_mutex(), m_condition(m_mutex), pending_requests(0)
-{
-}
+m_executor(), m_mutex(), m_condition(m_mutex), pending_requests(0) { }
MapUpdater::~MapUpdater()
{
diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp
index bd79cd793d5..b84a8ddb217 100644
--- a/src/server/game/Maps/TransportMgr.cpp
+++ b/src/server/game/Maps/TransportMgr.cpp
@@ -32,13 +32,9 @@ TransportTemplate::~TransportTemplate()
delete *itr;
}
-TransportMgr::TransportMgr()
-{
-}
+TransportMgr::TransportMgr() { }
-TransportMgr::~TransportMgr()
-{
-}
+TransportMgr::~TransportMgr() { }
void TransportMgr::Unload()
{
@@ -53,7 +49,7 @@ void TransportMgr::LoadTransportTemplates()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
return;
}
@@ -66,7 +62,7 @@ void TransportMgr::LoadTransportTemplates()
GameObjectTemplate const* goInfo = sObjectMgr->GetGameObjectTemplate(entry);
if (goInfo->moTransport.taxiPathId >= sTaxiPathNodesByPath.size())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Transport %u (name: %s) has an invalid path specified in `gameobject_template`.`data0` (%u) field, skipped.", entry, goInfo->name.c_str(), goInfo->moTransport.taxiPathId);
+ TC_LOG_ERROR("sql.sql", "Transport %u (name: %s) has an invalid path specified in `gameobject_template`.`data0` (%u) field, skipped.", entry, goInfo->name.c_str(), goInfo->moTransport.taxiPathId);
continue;
}
@@ -82,7 +78,7 @@ void TransportMgr::LoadTransportTemplates()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTemplate* transport)
@@ -93,12 +89,12 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
Movement::PointsArray splinePath;
bool mapChange = false;
bool cyclic = true;
- for (size_t i = 1; i < path.size() - 1; ++i)
+ for (size_t i = 0; i < path.size(); ++i)
{
if (!mapChange)
{
TaxiPathNodeEntry const& node_i = path[i];
- if (node_i.actionFlag == 1 || node_i.mapid != path[i + 1].mapid)
+ if (i != path.size() - 1 && (node_i.actionFlag == 1 || node_i.mapid != path[i + 1].mapid))
{
cyclic = false;
keyFrames.back().Teleport = true;
@@ -116,6 +112,24 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
mapChange = false;
}
+ // Not sure if data8 means the transport can be stopped or that its path in dbc does not contain extra spline points
+ if (!goInfo->moTransport.canBeStopped && splinePath.size() >= 2)
+ {
+ // Remove special catmull-rom spline points
+ splinePath.erase(splinePath.begin());
+ keyFrames.erase(keyFrames.begin());
+ splinePath.pop_back();
+ keyFrames.pop_back();
+ // Cyclic spline has one more extra point
+ if (cyclic && !splinePath.empty())
+ {
+ splinePath.pop_back();
+ keyFrames.pop_back();
+ }
+ }
+
+ ASSERT(!keyFrames.empty());
+
if (transport->mapsUsed.size() > 1)
{
for (std::set<uint32>::const_iterator itr = transport->mapsUsed.begin(); itr != transport->mapsUsed.end(); ++itr)
@@ -157,11 +171,12 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
spline->initLengths();
keyFrames[0].DistFromPrev = spline->length(spline->last() - 2, spline->last() - 1);
keyFrames[0].Spline = spline;
- for (size_t i = 1; i < keyFrames.size(); ++i)
+ for (size_t i = 0; i < keyFrames.size(); ++i)
{
keyFrames[i].Index = i + 1;
keyFrames[i].DistFromPrev = spline->length(i, i + 1);
- keyFrames[i - 1].NextDistFromPrev = keyFrames[i].DistFromPrev;
+ if (i > 0)
+ keyFrames[i - 1].NextDistFromPrev = keyFrames[i].DistFromPrev;
keyFrames[i].Spline = spline;
if (keyFrames[i].IsStopFrame())
{
@@ -215,6 +230,9 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
keyFrames.back().NextDistFromPrev = keyFrames.front().DistFromPrev;
+ if (firstStop == -1 || lastStop == -1)
+ firstStop = lastStop = 0;
+
// at stopping keyframes, we define distSinceStop == 0,
// and distUntilStop is to the next stopping keyframe.
// this is required to properly handle cases of two stopping frames in a row (yes they do exist)
@@ -222,7 +240,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
for (size_t i = 0; i < keyFrames.size(); ++i)
{
int32 j = (i + lastStop) % keyFrames.size();
- if (keyFrames[j].IsStopFrame())
+ if (keyFrames[j].IsStopFrame() || j == lastStop)
tmpDist = 0.0f;
else
tmpDist += keyFrames[j].DistFromPrev;
@@ -235,7 +253,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
int32 j = (i + firstStop) % keyFrames.size();
tmpDist += keyFrames[(j + 1) % keyFrames.size()].DistFromPrev;
keyFrames[j].DistUntilStop = tmpDist;
- if (keyFrames[j].IsStopFrame())
+ if (keyFrames[j].IsStopFrame() || j == firstStop)
tmpDist = 0.0f;
}
@@ -272,7 +290,7 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
for (size_t i = 0; i < keyFrames.size(); ++i)
{
int32 j = (i + lastStop) % keyFrames.size();
- if (keyFrames[j].IsStopFrame())
+ if (keyFrames[j].IsStopFrame() || j == lastStop)
segmentTime = keyFrames[j].TimeTo;
keyFrames[j].TimeFrom = segmentTime - keyFrames[j].TimeTo;
}
@@ -288,12 +306,12 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
for (size_t i = 1; i < keyFrames.size(); ++i)
{
- curPathTime += keyFrames[i-1].TimeTo;
+ curPathTime += keyFrames[i - 1].TimeTo;
if (keyFrames[i].IsStopFrame())
{
keyFrames[i].ArriveTime = uint32(curPathTime * IN_MILLISECONDS);
keyFrames[i - 1].NextArriveTime = keyFrames[i].ArriveTime;
- curPathTime += (float)keyFrames[i].Node->delay;
+ curPathTime += float(keyFrames[i].Node->delay);
keyFrames[i].DepartureTime = uint32(curPathTime * IN_MILLISECONDS);
}
else
@@ -304,10 +322,10 @@ void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTempl
keyFrames[i].DepartureTime = keyFrames[i].ArriveTime;
}
}
+
keyFrames.back().NextArriveTime = keyFrames.back().DepartureTime;
transport->pathTime = keyFrames.back().DepartureTime;
- //WorldDatabase.DirectPExecute("UPDATE `transports` SET `period_gen`=%u WHERE `entry`=%u", transport->pathTime, transport->entry);
}
void TransportMgr::AddPathNodeToTransport(uint32 transportEntry, uint32 timeSeg, TransportAnimationEntry const* node)
@@ -336,7 +354,7 @@ Transport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map*
TransportTemplate const* tInfo = GetTransportTemplate(entry);
if (!tInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Transport %u will not be loaded, `transport_template` missing", entry);
+ TC_LOG_ERROR("sql.sql", "Transport %u will not be loaded, `transport_template` missing", entry);
return NULL;
}
@@ -363,7 +381,7 @@ Transport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/, Map*
{
if (mapEntry->Instanceable() != tInfo->inInstance)
{
- TC_LOG_ERROR(LOG_FILTER_TRANSPORTS, "Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId);
+ TC_LOG_ERROR("entities.transport", "Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId);
delete trans;
return NULL;
}
@@ -406,7 +424,7 @@ void TransportMgr::SpawnContinentTransports()
} while (result->NextRow());
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Spawned %u continent transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Spawned %u continent transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void TransportMgr::CreateInstanceTransports(Map* map)
diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h
index ce7168a4040..a745b94f466 100644
--- a/src/server/game/Maps/ZoneScript.h
+++ b/src/server/game/Maps/ZoneScript.h
@@ -26,8 +26,8 @@ class GameObject;
class ZoneScript
{
public:
- ZoneScript() {}
- virtual ~ZoneScript() {}
+ ZoneScript() { }
+ virtual ~ZoneScript() { }
virtual uint32 GetCreatureEntry(uint32 /*guidlow*/, CreatureData const* data) { return data->id; }
virtual uint32 GetGameObjectEntry(uint32 /*guidlow*/, uint32 entry) { return entry; }
@@ -42,13 +42,13 @@ class ZoneScript
//All-purpose data storage 64 bit
virtual uint64 GetData64(uint32 /*DataId*/) const { return 0; }
- virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) {}
+ virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) { }
//All-purpose data storage 32 bit
virtual uint32 GetData(uint32 /*DataId*/) const { return 0; }
- virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) {}
+ virtual void SetData(uint32 /*DataId*/, uint32 /*Value*/) { }
- virtual void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/) {}
+ virtual void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/) { }
};
#endif
diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index f779e3dcb78..715a1f5f2c0 100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -129,7 +129,7 @@ namespace Trinity
nBaseExp = 580;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "BaseGain: Unsupported content level %u", content);
+ TC_LOG_ERROR("misc", "BaseGain: Unsupported content level %u", content);
nBaseExp = 45;
break;
}
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 02f5965836f..a3be268110c 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -3553,7 +3553,7 @@ struct MmapTileHeader
bool usesLiquids : 1;
MmapTileHeader() : mmapMagic(MMAP_MAGIC), dtVersion(DT_NAVMESH_VERSION),
- mmapVersion(MMAP_VERSION), size(0), usesLiquids(true) {}
+ mmapVersion(MMAP_VERSION), size(0), usesLiquids(true) { }
};
enum NavTerrain
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index e9b0087712b..60855710218 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -190,7 +190,7 @@ void MotionMaster::MoveRandom(float spawndist)
{
if (_owner->GetTypeId() == TYPEID_UNIT)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (GUID: %u) start moving random", _owner->GetGUIDLow());
+ TC_LOG_DEBUG("misc", "Creature (GUID: %u) start moving random", _owner->GetGUIDLow());
Mutate(new RandomMovementGenerator<Creature>(spawndist), MOTION_SLOT_IDLE);
}
}
@@ -201,22 +201,22 @@ void MotionMaster::MoveTargetedHome()
if (_owner->GetTypeId() == TYPEID_UNIT && !_owner->ToCreature()->GetCharmerOrOwnerGUID())
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) targeted home", _owner->GetEntry(), _owner->GetGUIDLow());
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) targeted home", _owner->GetEntry(), _owner->GetGUIDLow());
Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE);
}
else if (_owner->GetTypeId() == TYPEID_UNIT && _owner->ToCreature()->GetCharmerOrOwnerGUID())
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow());
+ TC_LOG_DEBUG("misc", "Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow());
Unit* target = _owner->ToCreature()->GetCharmerOrOwner();
if (target)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow());
+ TC_LOG_DEBUG("misc", "Following %s (GUID: %u)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : ((Creature*)target)->GetDBTableGUIDLow());
Mutate(new FollowMovementGenerator<Creature>(target, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE), MOTION_SLOT_ACTIVE);
}
}
else
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Player (GUID: %u) attempt targeted home", _owner->GetGUIDLow());
+ TC_LOG_ERROR("misc", "Player (GUID: %u) attempt targeted home", _owner->GetGUIDLow());
}
}
@@ -224,12 +224,12 @@ void MotionMaster::MoveConfused()
{
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player (GUID: %u) move confused", _owner->GetGUIDLow());
+ TC_LOG_DEBUG("misc", "Player (GUID: %u) move confused", _owner->GetGUIDLow());
Mutate(new ConfusedMovementGenerator<Player>(), MOTION_SLOT_CONTROLLED);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) move confused",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) move confused",
_owner->GetEntry(), _owner->GetGUIDLow());
Mutate(new ConfusedMovementGenerator<Creature>(), MOTION_SLOT_CONTROLLED);
}
@@ -244,7 +244,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle)
//_owner->ClearUnitState(UNIT_STATE_FOLLOW);
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player (GUID: %u) chase to %s (GUID: %u)",
+ TC_LOG_DEBUG("misc", "Player (GUID: %u) chase to %s (GUID: %u)",
_owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
@@ -252,7 +252,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)",
_owner->GetEntry(), _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
@@ -269,14 +269,14 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
//_owner->AddUnitState(UNIT_STATE_FOLLOW);
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player (GUID: %u) follow to %s (GUID: %u)", _owner->GetGUIDLow(),
+ TC_LOG_DEBUG("misc", "Player (GUID: %u) follow to %s (GUID: %u)", _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
Mutate(new FollowMovementGenerator<Player>(target, dist, angle), slot);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)",
_owner->GetEntry(), _owner->GetGUIDLow(),
target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow());
@@ -288,12 +288,12 @@ void MotionMaster::MovePoint(uint32 id, float x, float y, float z, bool generate
{
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), id, x, y, z);
+ TC_LOG_DEBUG("misc", "Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), id, x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z, generatePath), MOTION_SLOT_ACTIVE);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)",
_owner->GetEntry(), _owner->GetGUIDLow(), id, x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z, generatePath), MOTION_SLOT_ACTIVE);
}
@@ -304,7 +304,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos)
float x, y, z;
pos.GetPosition(x, y, z);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
Movement::MoveSplineInit init(_owner);
init.MoveTo(x, y, z);
@@ -318,7 +318,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos)
float x, y, z;
pos.GetPosition(x, y, z);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
Movement::MoveSplineInit init(_owner);
init.MoveTo(x, y, z);
@@ -365,7 +365,7 @@ void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ)
void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
+ TC_LOG_DEBUG("misc", "Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
float moveTimeHalf = speedZ / Movement::gravity;
float max_height = -Movement::computeFallElevation(moveTimeHalf, false, -speedZ);
@@ -384,7 +384,7 @@ void MotionMaster::MoveFall(uint32 id /*=0*/)
float tz = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz <= INVALID_HEIGHT)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
+ TC_LOG_DEBUG("misc", "MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
_owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ());
return;
}
@@ -413,12 +413,12 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id,
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
+ TC_LOG_DEBUG("misc", "Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", _owner->GetGUIDLow(), x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z, generatePath, speed), MOTION_SLOT_CONTROLLED);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)",
_owner->GetEntry(), _owner->GetGUIDLow(), x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z, generatePath, speed), MOTION_SLOT_CONTROLLED);
}
@@ -441,11 +441,11 @@ void MotionMaster::MoveSeekAssistance(float x, float y, float z)
{
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Player (GUID: %u) attempt to seek assistance", _owner->GetGUIDLow());
+ TC_LOG_ERROR("misc", "Player (GUID: %u) attempt to seek assistance", _owner->GetGUIDLow());
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)",
_owner->GetEntry(), _owner->GetGUIDLow(), x, y, z);
_owner->AttackStop();
_owner->ToCreature()->SetReactState(REACT_PASSIVE);
@@ -457,11 +457,11 @@ void MotionMaster::MoveSeekAssistanceDistract(uint32 time)
{
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Player (GUID: %u) attempt to call distract after assistance", _owner->GetGUIDLow());
+ TC_LOG_ERROR("misc", "Player (GUID: %u) attempt to call distract after assistance", _owner->GetGUIDLow());
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)",
_owner->GetEntry(), _owner->GetGUIDLow(), time);
Mutate(new AssistanceDistractMovementGenerator(time), MOTION_SLOT_ACTIVE);
}
@@ -477,14 +477,14 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player (GUID: %u) flee from %s (GUID: %u)", _owner->GetGUIDLow(),
+ TC_LOG_DEBUG("misc", "Player (GUID: %u) flee from %s (GUID: %u)", _owner->GetGUIDLow(),
enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow());
Mutate(new FleeingMovementGenerator<Player>(enemy->GetGUID()), MOTION_SLOT_CONTROLLED);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s",
_owner->GetEntry(), _owner->GetGUIDLow(),
enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature",
enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow(),
@@ -502,19 +502,19 @@ void MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode)
{
if (path < sTaxiPathNodesByPath.size())
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "%s taxi to (Path %u node %u)", _owner->GetName().c_str(), path, pathnode);
+ TC_LOG_DEBUG("misc", "%s taxi to (Path %u node %u)", _owner->GetName().c_str(), path, pathnode);
FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path], pathnode);
Mutate(mgen, MOTION_SLOT_CONTROLLED);
}
else
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "%s attempt taxi to (not existed Path %u node %u)",
+ TC_LOG_ERROR("misc", "%s attempt taxi to (not existed Path %u node %u)",
_owner->GetName().c_str(), path, pathnode);
}
}
else
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)",
+ TC_LOG_ERROR("misc", "Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)",
_owner->GetEntry(), _owner->GetGUIDLow(), path, pathnode);
}
}
@@ -526,11 +526,11 @@ void MotionMaster::MoveDistract(uint32 timer)
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Player (GUID: %u) distracted (timer: %u)", _owner->GetGUIDLow(), timer);
+ TC_LOG_DEBUG("misc", "Player (GUID: %u) distracted (timer: %u)", _owner->GetGUIDLow(), timer);
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Creature (Entry: %u GUID: %u) (timer: %u)",
+ TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) (timer: %u)",
_owner->GetEntry(), _owner->GetGUIDLow(), timer);
}
@@ -582,7 +582,7 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable)
//Mutate(new WaypointMovementGenerator<Player>(path_id, repeatable)):
Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)",
+ TC_LOG_DEBUG("misc", "%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)",
_owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature",
_owner->GetGUIDLow(), path_id, repeatable ? "YES" : "NO");
}
@@ -641,7 +641,7 @@ void MotionMaster::DirectDelete(_Ty curr)
void MotionMaster::DelayedDelete(_Ty curr)
{
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "Unit (Entry %u) is trying to delete its updating MG (Type %u)!", _owner->GetEntry(), curr->GetMovementGeneratorType());
+ TC_LOG_FATAL("misc", "Unit (Entry %u) is trying to delete its updating MG (Type %u)!", _owner->GetEntry(), curr->GetMovementGeneratorType());
if (isStatic(curr))
return;
if (!_expList)
diff --git a/src/server/game/Movement/MovementGenerator.cpp b/src/server/game/Movement/MovementGenerator.cpp
index 408614833bb..b102f554c2f 100644
--- a/src/server/game/Movement/MovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerator.cpp
@@ -18,6 +18,4 @@
#include "MovementGenerator.h"
-MovementGenerator::~MovementGenerator()
-{
-}
+MovementGenerator::~MovementGenerator() { }
diff --git a/src/server/game/Movement/MovementGenerator.h b/src/server/game/Movement/MovementGenerator.h
index 39394a75513..92195037e23 100755
--- a/src/server/game/Movement/MovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerator.h
@@ -79,13 +79,13 @@ class MovementGeneratorMedium : public MovementGenerator
struct SelectableMovement : public FactoryHolder<MovementGenerator, MovementGeneratorType>
{
- SelectableMovement(MovementGeneratorType mgt) : FactoryHolder<MovementGenerator, MovementGeneratorType>(mgt) {}
+ SelectableMovement(MovementGeneratorType mgt) : FactoryHolder<MovementGenerator, MovementGeneratorType>(mgt) { }
};
template<class REAL_MOVEMENT>
struct MovementGeneratorFactory : public SelectableMovement
{
- MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) {}
+ MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) { }
MovementGenerator* Create(void *) const;
};
diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
index da29b8aa12e..1fa9465d6e8 100755
--- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
@@ -26,7 +26,7 @@ template<class T>
class ConfusedMovementGenerator : public MovementGeneratorMedium< T, ConfusedMovementGenerator<T> >
{
public:
- explicit ConfusedMovementGenerator() : i_nextMoveTime(0) {}
+ explicit ConfusedMovementGenerator() : i_nextMoveTime(0) { }
void DoInitialize(T*);
void DoFinalize(T*);
diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
index 33a7c705564..b44bebdbfdf 100755
--- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
@@ -25,7 +25,7 @@ template<class T>
class FleeingMovementGenerator : public MovementGeneratorMedium< T, FleeingMovementGenerator<T> >
{
public:
- FleeingMovementGenerator(uint64 fright) : i_frightGUID(fright), i_nextCheckTime(0) {}
+ FleeingMovementGenerator(uint64 fright) : i_frightGUID(fright), i_nextCheckTime(0) { }
void DoInitialize(T*);
void DoFinalize(T*);
@@ -47,7 +47,7 @@ class TimedFleeingMovementGenerator : public FleeingMovementGenerator<Creature>
public:
TimedFleeingMovementGenerator(uint64 fright, uint32 time) :
FleeingMovementGenerator<Creature>(fright),
- i_totalFleeTime(time) {}
+ i_totalFleeTime(time) { }
MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; }
bool Update(Unit*, uint32);
diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
index a94ef5d4f87..2d9fe4dd27f 100644
--- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
@@ -39,9 +39,7 @@ void HomeMovementGenerator<Creature>::DoFinalize(Creature* owner)
}
}
-void HomeMovementGenerator<Creature>::DoReset(Creature*)
-{
-}
+void HomeMovementGenerator<Creature>::DoReset(Creature*) { }
void HomeMovementGenerator<Creature>::_setTargetLocation(Creature* owner)
{
diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
index 3d6c6ab18c9..c5bf8879b7b 100644
--- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
@@ -31,8 +31,8 @@ class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature
{
public:
- HomeMovementGenerator() : arrived(false) {}
- ~HomeMovementGenerator() {}
+ HomeMovementGenerator() : arrived(false) { }
+ ~HomeMovementGenerator() { }
void DoInitialize(Creature*);
void DoFinalize(Creature*);
diff --git a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
index 0043891db2c..3c5b9c6d20f 100755
--- a/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/IdleMovementGenerator.h
@@ -37,7 +37,7 @@ extern IdleMovementGenerator si_idleMovement;
class RotateMovementGenerator : public MovementGenerator
{
public:
- explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_maxDuration(time), m_direction(direction) {}
+ explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_maxDuration(time), m_direction(direction) { }
void Initialize(Unit*);
void Finalize(Unit*);
@@ -53,7 +53,7 @@ class RotateMovementGenerator : public MovementGenerator
class DistractMovementGenerator : public MovementGenerator
{
public:
- explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) {}
+ explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) { }
void Initialize(Unit*);
void Finalize(Unit*);
@@ -69,7 +69,7 @@ class AssistanceDistractMovementGenerator : public DistractMovementGenerator
{
public:
AssistanceDistractMovementGenerator(uint32 timer) :
- DistractMovementGenerator(timer) {}
+ DistractMovementGenerator(timer) { }
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
void Finalize(Unit*);
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
index 917872c5960..f4968b21bd8 100755
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
@@ -102,9 +102,7 @@ void PointMovementGenerator<T>::DoReset(T* unit)
}
template<class T>
-void PointMovementGenerator<T>::MovementInform(T* /*unit*/)
-{
-}
+void PointMovementGenerator<T>::MovementInform(T* /*unit*/) { }
template <> void PointMovementGenerator<Creature>::MovementInform(Creature* unit)
{
diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
index 421736ca4ec..35e4afacb1a 100644
--- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
@@ -27,7 +27,7 @@ class PointMovementGenerator : public MovementGeneratorMedium< T, PointMovementG
{
public:
PointMovementGenerator(uint32 _id, float _x, float _y, float _z, bool _generatePath, float _speed = 0.0f) : id(_id),
- i_x(_x), i_y(_y), i_z(_z), speed(_speed), m_generatePath(_generatePath), i_recalculateSpeed(false) {}
+ i_x(_x), i_y(_y), i_z(_z), speed(_speed), m_generatePath(_generatePath), i_recalculateSpeed(false) { }
void DoInitialize(T*);
void DoFinalize(T*);
@@ -53,7 +53,7 @@ class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
{
public:
AssistanceMovementGenerator(float _x, float _y, float _z) :
- PointMovementGenerator<Creature>(0, _x, _y, _z, true) {}
+ PointMovementGenerator<Creature>(0, _x, _y, _z, true) { }
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_MOTION_TYPE; }
void Finalize(Unit*);
@@ -63,10 +63,10 @@ class AssistanceMovementGenerator : public PointMovementGenerator<Creature>
class EffectMovementGenerator : public MovementGenerator
{
public:
- explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) {}
- void Initialize(Unit*) {}
+ explicit EffectMovementGenerator(uint32 Id) : m_Id(Id) { }
+ void Initialize(Unit*) { }
void Finalize(Unit*);
- void Reset(Unit*) {}
+ void Reset(Unit*) { }
bool Update(Unit*, uint32);
MovementGeneratorType GetMovementGeneratorType() { return EFFECT_MOTION_TYPE; }
private:
diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
index a6159e995fe..ef2807a5f48 100644
--- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
@@ -25,7 +25,7 @@ template<class T>
class RandomMovementGenerator : public MovementGeneratorMedium< T, RandomMovementGenerator<T> >
{
public:
- RandomMovementGenerator(float spawn_dist = 0.0f) : i_nextMoveTime(0), wander_distance(spawn_dist) {}
+ RandomMovementGenerator(float spawn_dist = 0.0f) : i_nextMoveTime(0), wander_distance(spawn_dist) { }
void _setRandomLocation(T*);
void DoInitialize(T*);
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index f457443dc8c..f71eddd2f89 100644
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -216,9 +216,7 @@ void ChaseMovementGenerator<T>::DoReset(T* owner)
}
template<class T>
-void ChaseMovementGenerator<T>::MovementInform(T* /*unit*/)
-{
-}
+void ChaseMovementGenerator<T>::MovementInform(T* /*unit*/) { }
template<>
void ChaseMovementGenerator<Creature>::MovementInform(Creature* unit)
@@ -290,9 +288,7 @@ void FollowMovementGenerator<T>::DoReset(T* owner)
}
template<class T>
-void FollowMovementGenerator<T>::MovementInform(T* /*unit*/)
-{
-}
+void FollowMovementGenerator<T>::MovementInform(T* /*unit*/) { }
template<>
void FollowMovementGenerator<Creature>::MovementInform(Creature* unit)
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
index 14d0ab0ec66..6358aa19cde 100755
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
@@ -68,10 +68,10 @@ class ChaseMovementGenerator : public TargetedMovementGeneratorMedium<T, ChaseMo
{
public:
ChaseMovementGenerator(Unit* target)
- : TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target) {}
+ : TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target) { }
ChaseMovementGenerator(Unit* target, float offset, float angle)
- : TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target, offset, angle) {}
- ~ChaseMovementGenerator() {}
+ : TargetedMovementGeneratorMedium<T, ChaseMovementGenerator<T> >(target, offset, angle) { }
+ ~ChaseMovementGenerator() { }
MovementGeneratorType GetMovementGeneratorType() { return CHASE_MOTION_TYPE; }
@@ -92,10 +92,10 @@ class FollowMovementGenerator : public TargetedMovementGeneratorMedium<T, Follow
{
public:
FollowMovementGenerator(Unit* target)
- : TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target){}
+ : TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target){ }
FollowMovementGenerator(Unit* target, float offset, float angle)
- : TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target, offset, angle) {}
- ~FollowMovementGenerator() {}
+ : TargetedMovementGeneratorMedium<T, FollowMovementGenerator<T> >(target, offset, angle) { }
+ ~FollowMovementGenerator() { }
MovementGeneratorType GetMovementGeneratorType() { return FOLLOW_MOTION_TYPE; }
@@ -108,7 +108,7 @@ class FollowMovementGenerator : public TargetedMovementGeneratorMedium<T, Follow
static void _addUnitStateMove(T* u) { u->AddUnitState(UNIT_STATE_FOLLOW_MOVE); }
bool EnableWalking() const;
bool _lostTarget(T*) const { return false; }
- void _reachTarget(T*) {}
+ void _reachTarget(T*) { }
private:
void _updateSpeed(T* owner);
};
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index 5506f74b221..45b61c828f9 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -42,7 +42,7 @@ void WaypointMovementGenerator<Creature>::LoadPath(Creature* creature)
if (!i_path)
{
// No path id found for entry
- TC_LOG_ERROR(LOG_FILTER_SQL, "WaypointMovementGenerator::LoadPath: creature %s (Entry: %u GUID: %u DB GUID: %u) doesn't have waypoint path id: %u", creature->GetName().c_str(), creature->GetEntry(), creature->GetGUIDLow(), creature->GetDBTableGUIDLow(), path_id);
+ TC_LOG_ERROR("sql.sql", "WaypointMovementGenerator::LoadPath: creature %s (Entry: %u GUID: %u DB GUID: %u) doesn't have waypoint path id: %u", creature->GetName().c_str(), creature->GetEntry(), creature->GetGUIDLow(), creature->GetDBTableGUIDLow(), path_id);
return;
}
@@ -79,7 +79,7 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* creature)
if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPSCRIPTS, "Creature movement start script %u at point %u for " UI64FMTD ".", i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID());
+ TC_LOG_DEBUG("maps.script", "Creature movement start script %u at point %u for " UI64FMTD ".", i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID());
creature->GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, creature, NULL);
}
@@ -321,7 +321,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player* player, TaxiPathNodeEntry
{
if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player->GetName().c_str());
+ TC_LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player->GetName().c_str());
player->GetMap()->ScriptsStart(sEventScripts, eventid, player, player);
}
}
@@ -352,9 +352,9 @@ void FlightPathMovementGenerator::PreloadEndGrid()
// Load the grid
if (endMap)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path->size()-1));
+ TC_LOG_INFO("misc", "Preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path->size()-1));
endMap->LoadGrid(_endGridX, _endGridY);
}
else
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Unable to determine map to preload flightmaster grid");
+ TC_LOG_INFO("misc", "Unable to determine map to preload flightmaster grid");
}
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
index 72650570e12..c22b0c5296f 100755
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
@@ -42,8 +42,8 @@ template<class T, class P>
class PathMovementBase
{
public:
- PathMovementBase() : i_path(NULL), i_currentNode(0) {}
- virtual ~PathMovementBase() {};
+ PathMovementBase() : i_path(NULL), i_currentNode(0) { }
+ virtual ~PathMovementBase() { };
// template pattern, not defined .. override required
void LoadPath(T &);
@@ -63,7 +63,7 @@ class WaypointMovementGenerator<Creature> : public MovementGeneratorMedium< Crea
{
public:
WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true)
- : i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) {}
+ : i_nextMoveTime(0), m_isArrivalDone(false), path_id(_path_id), repeating(_repeating) { }
~WaypointMovementGenerator() { i_path = NULL; }
void DoInitialize(Creature*);
void DoFinalize(Creature*);
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp
index c902eb850f6..85a08e49fd3 100644
--- a/src/server/game/Movement/PathGenerator.cpp
+++ b/src/server/game/Movement/PathGenerator.cpp
@@ -33,7 +33,7 @@ PathGenerator::PathGenerator(const Unit* owner) :
_endPosition(G3D::Vector3::zero()), _sourceUnit(owner), _navMesh(NULL),
_navMeshQuery(NULL)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ PathGenerator::PathGenerator for %u \n", _sourceUnit->GetGUIDLow());
+ TC_LOG_DEBUG("maps", "++ PathGenerator::PathGenerator for %u \n", _sourceUnit->GetGUIDLow());
uint32 mapId = _sourceUnit->GetMapId();
if (MMAP::MMapFactory::IsPathfindingEnabled(mapId))
@@ -48,7 +48,7 @@ PathGenerator::PathGenerator(const Unit* owner) :
PathGenerator::~PathGenerator()
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ PathGenerator::~PathGenerator() for %u \n", _sourceUnit->GetGUIDLow());
+ TC_LOG_DEBUG("maps", "++ PathGenerator::~PathGenerator() for %u \n", _sourceUnit->GetGUIDLow());
}
bool PathGenerator::CalculatePath(float destX, float destY, float destZ, bool forceDest)
@@ -67,7 +67,7 @@ bool PathGenerator::CalculatePath(float destX, float destY, float destZ, bool fo
_forceDestination = forceDest;
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ PathGenerator::CalculatePath() for %u \n", _sourceUnit->GetGUIDLow());
+ TC_LOG_DEBUG("maps", "++ PathGenerator::CalculatePath() for %u \n", _sourceUnit->GetGUIDLow());
// make sure navMesh works - we can run on map w/o mmap
// check if the start and end point have a .mmtile loaded (can we pass via not loaded tile on the way?)
@@ -168,7 +168,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
// its up to caller how he will use this info
if (startPoly == INVALID_POLYREF || endPoly == INVALID_POLYREF)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: (startPoly == 0 || endPoly == 0)\n");
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: (startPoly == 0 || endPoly == 0)\n");
BuildShortcut();
bool path = _sourceUnit->GetTypeId() == TYPEID_UNIT && _sourceUnit->ToCreature()->CanFly();
@@ -196,7 +196,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
bool farFromPoly = (distToStartPoly > 7.0f || distToEndPoly > 7.0f);
if (farFromPoly)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: farFromPoly distToStartPoly=%.3f distToEndPoly=%.3f\n", distToStartPoly, distToEndPoly);
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: farFromPoly distToStartPoly=%.3f distToEndPoly=%.3f\n", distToStartPoly, distToEndPoly);
bool buildShotrcut = false;
if (_sourceUnit->GetTypeId() == TYPEID_UNIT)
@@ -206,13 +206,13 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
G3D::Vector3 const& p = (distToStartPoly > 7.0f) ? startPos : endPos;
if (_sourceUnit->GetBaseMap()->IsUnderWater(p.x, p.y, p.z))
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: underWater case\n");
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: underWater case\n");
if (owner->CanSwim())
buildShotrcut = true;
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: flying case\n");
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: flying case\n");
if (owner->CanFly())
buildShotrcut = true;
}
@@ -244,7 +244,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
// just need to move in straight line
if (startPoly == endPoly)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: (startPoly == endPoly)\n");
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: (startPoly == endPoly)\n");
BuildShortcut();
@@ -252,7 +252,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
_polyLength = 1;
_type = farFromPoly ? PATHFIND_INCOMPLETE : PATHFIND_NORMAL;
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: path type %d\n", _type);
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: path type %d\n", _type);
return;
}
@@ -287,7 +287,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
if (startPolyFound && endPolyFound)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: (startPolyFound && endPolyFound)\n");
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: (startPolyFound && endPolyFound)\n");
// we moved along the path and the target did not move out of our old poly-path
// our path is a simple subpath case, we have all the data we need
@@ -298,7 +298,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
}
else if (startPolyFound && !endPolyFound)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: (startPolyFound && !endPolyFound)\n");
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: (startPolyFound && !endPolyFound)\n");
// we are moving on the old path but target moved out
// so we have atleast part of poly-path ready
@@ -351,17 +351,17 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
// this is probably an error state, but we'll leave it
// and hopefully recover on the next Update
// we still need to copy our preffix
- TC_LOG_ERROR(LOG_FILTER_MAPS, "%u's Path Build failed: 0 length path", _sourceUnit->GetGUIDLow());
+ TC_LOG_ERROR("maps", "%u's Path Build failed: 0 length path", _sourceUnit->GetGUIDLow());
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ m_polyLength=%u prefixPolyLength=%u suffixPolyLength=%u \n", _polyLength, prefixPolyLength, suffixPolyLength);
+ TC_LOG_DEBUG("maps", "++ m_polyLength=%u prefixPolyLength=%u suffixPolyLength=%u \n", _polyLength, prefixPolyLength, suffixPolyLength);
// new path = prefix + suffix - overlap
_polyLength = prefixPolyLength + suffixPolyLength - 1;
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildPolyPath :: (!startPolyFound && !endPolyFound)\n");
+ TC_LOG_DEBUG("maps", "++ BuildPolyPath :: (!startPolyFound && !endPolyFound)\n");
// either we have no path at all -> first run
// or something went really wrong -> we aren't moving along the path to the target
@@ -383,7 +383,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
if (!_polyLength || dtStatusFailed(dtResult))
{
// only happens if we passed bad data to findPath(), or navmesh is messed up
- TC_LOG_ERROR(LOG_FILTER_MAPS, "%u's Path Build failed: 0 length path", _sourceUnit->GetGUIDLow());
+ TC_LOG_ERROR("maps", "%u's Path Build failed: 0 length path", _sourceUnit->GetGUIDLow());
BuildShortcut();
_type = PATHFIND_NOPATH;
return;
@@ -435,14 +435,14 @@ void PathGenerator::BuildPointPath(const float *startPoint, const float *endPoin
// only happens if pass bad data to findStraightPath or navmesh is broken
// single point paths can be generated here
/// @todo check the exact cases
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ PathGenerator::BuildPointPath FAILED! path sized %d returned\n", pointCount);
+ TC_LOG_DEBUG("maps", "++ PathGenerator::BuildPointPath FAILED! path sized %d returned\n", pointCount);
BuildShortcut();
_type = PATHFIND_NOPATH;
return;
}
else if (pointCount == _pointPathLimit)
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ PathGenerator::BuildPointPath FAILED! path sized %d returned, lower than limit set to %d\n", pointCount, _pointPathLimit);
+ TC_LOG_DEBUG("maps", "++ PathGenerator::BuildPointPath FAILED! path sized %d returned, lower than limit set to %d\n", pointCount, _pointPathLimit);
BuildShortcut();
_type = PATHFIND_SHORT;
return;
@@ -476,7 +476,7 @@ void PathGenerator::BuildPointPath(const float *startPoint, const float *endPoin
_type = PathType(PATHFIND_NORMAL | PATHFIND_NOT_USING_PATH);
}
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ PathGenerator::BuildPointPath path type %d size %d poly-size %d\n", _type, pointCount, _polyLength);
+ TC_LOG_DEBUG("maps", "++ PathGenerator::BuildPointPath path type %d size %d poly-size %d\n", _type, pointCount, _polyLength);
}
void PathGenerator::NormalizePath()
@@ -487,7 +487,7 @@ void PathGenerator::NormalizePath()
void PathGenerator::BuildShortcut()
{
- TC_LOG_DEBUG(LOG_FILTER_MAPS, "++ BuildShortcut :: making shortcut\n");
+ TC_LOG_DEBUG("maps", "++ BuildShortcut :: making shortcut\n");
Clear();
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index e786b78143a..7291c6849c5 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -92,7 +92,7 @@ inline uint32 computeDuration(float length, float velocity)
struct FallInitializer
{
- FallInitializer(float _start_elevation) : start_elevation(_start_elevation) {}
+ FallInitializer(float _start_elevation) : start_elevation(_start_elevation) { }
float start_elevation;
inline int32 operator()(Spline<int32>& s, int32 i)
{
@@ -106,7 +106,7 @@ enum{
struct CommonInitializer
{
- CommonInitializer(float _velocity) : velocityInv(1000.f/_velocity), time(minimal_duration) {}
+ CommonInitializer(float _velocity) : velocityInv(1000.f/_velocity), time(minimal_duration) { }
float velocityInv;
int32 time;
inline int32 operator()(Spline<int32>& s, int32 i)
@@ -147,7 +147,7 @@ void MoveSpline::init_spline(const MoveSplineInitArgs& args)
/// @todo what to do in such cases? problem is in input data (all points are at same coords)
if (spline.length() < minimal_duration)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "MoveSpline::init_spline: zero length spline, wrong input data?");
+ TC_LOG_ERROR("misc", "MoveSpline::init_spline: zero length spline, wrong input data?");
spline.set_length(spline.last(), spline.isCyclic() ? 1000 : 1);
}
point_Idx = spline.first();
@@ -165,6 +165,13 @@ void MoveSpline::Initialize(MoveSplineInitArgs const& args)
vertical_acceleration = 0.f;
effect_start_time = 0;
+ // Check if its a stop spline
+ if (args.flags.done)
+ {
+ spline.clear();
+ return;
+ }
+
init_spline(args);
// init parabolic / animation
@@ -194,7 +201,7 @@ bool MoveSplineInitArgs::Validate(Unit* unit) const
#define CHECK(exp) \
if (!(exp))\
{\
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "MoveSplineInitArgs::Validate: expression '%s' failed for GUID: %u Entry: %u", #exp, unit->GetTypeId() == TYPEID_PLAYER ? unit->GetGUIDLow() : unit->ToCreature()->GetDBTableGUIDLow(), unit->GetEntry());\
+ TC_LOG_ERROR("misc", "MoveSplineInitArgs::Validate: expression '%s' failed for GUID: %u Entry: %u", #exp, unit->GetTypeId() == TYPEID_PLAYER ? unit->GetGUIDLow() : unit->ToCreature()->GetDBTableGUIDLow(), unit->GetEntry());\
return false;\
}
CHECK(path.size() > 1);
@@ -221,7 +228,7 @@ bool MoveSplineInitArgs::_checkPathBounds() const
offset = path[i] - middle;
if (fabs(offset.x) >= MAX_OFFSET || fabs(offset.y) >= MAX_OFFSET || fabs(offset.z) >= MAX_OFFSET)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "MoveSplineInitArgs::_checkPathBounds check failed");
+ TC_LOG_ERROR("misc", "MoveSplineInitArgs::_checkPathBounds check failed");
return false;
}
}
@@ -259,7 +266,7 @@ MoveSpline::UpdateResult MoveSpline::_updateState(int32& ms_time_diff)
{
point_Idx = spline.first();
time_passed = time_passed % Duration();
- result = Result_NextSegment;
+ result = Result_NextCycle;
}
else
{
diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h
index 75ea89bee81..209f978d658 100644
--- a/src/server/game/Movement/Spline/MoveSpline.h
+++ b/src/server/game/Movement/Spline/MoveSpline.h
@@ -26,10 +26,10 @@ namespace Movement
{
struct Location : public Vector3
{
- Location() : orientation(0) {}
- Location(float x, float y, float z, float o) : Vector3(x, y, z), orientation(o) {}
- Location(const Vector3& v) : Vector3(v), orientation(0) {}
- Location(const Vector3& v, float o) : Vector3(v), orientation(o) {}
+ Location() : orientation(0) { }
+ Location(float x, float y, float z, float o) : Vector3(x, y, z), orientation(o) { }
+ Location(const Vector3& v) : Vector3(v), orientation(0) { }
+ Location(const Vector3& v, float o) : Vector3(v), orientation(o) { }
float orientation;
};
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp
index 4209b9dd202..f6ef219522c 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.cpp
+++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp
@@ -109,13 +109,14 @@ namespace Movement
if (!args.Validate(unit))
return 0;
- unit->m_movementInfo.SetMovementFlags((MovementFlags)moveFlags);
+ unit->m_movementInfo.SetMovementFlags(moveFlags);
move_spline.Initialize(args);
- WorldPacket data(!transport ? SMSG_MONSTER_MOVE : SMSG_MONSTER_MOVE_TRANSPORT, 64);
+ WorldPacket data(SMSG_MONSTER_MOVE, 64);
data.append(unit->GetPackGUID());
if (transport)
{
+ data.SetOpcode(SMSG_MONSTER_MOVE_TRANSPORT);
data.appendPackGUID(unit->GetTransGUID());
data << int8(unit->GetTransSeat());
}
@@ -126,6 +127,32 @@ namespace Movement
return move_spline.Duration();
}
+ void MoveSplineInit::Stop()
+ {
+ MoveSpline& move_spline = *unit->movespline;
+
+ // No need to stop if we are not moving
+ if (move_spline.Finalized())
+ return;
+
+ Location loc = move_spline.ComputePosition();
+ args.flags = MoveSplineFlag::Done;
+ unit->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_SPLINE_ENABLED);
+ move_spline.Initialize(args);
+
+ WorldPacket data(SMSG_MONSTER_MOVE, 64);
+ data.append(unit->GetPackGUID());
+ if (unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT) && unit->GetTransGUID())
+ {
+ data.SetOpcode(SMSG_MONSTER_MOVE_TRANSPORT);
+ data.appendPackGUID(unit->GetTransGUID());
+ data << int8(unit->GetTransSeat());
+ }
+
+ PacketBuilder::WriteStopMovement(loc, args.splineId, data);
+ unit->SendMessageToSet(&data, true);
+ }
+
MoveSplineInit::MoveSplineInit(Unit* m) : unit(m)
{
args.splineId = splineIdGen.NewId();
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.h b/src/server/game/Movement/Spline/MoveSplineInit.h
index 7b0527bb3a0..a94c84d92f3 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.h
+++ b/src/server/game/Movement/Spline/MoveSplineInit.h
@@ -59,6 +59,10 @@ namespace Movement
*/
int32 Launch();
+ /* Final pass of initialization that stops movement.
+ */
+ void Stop();
+
/* Adds movement by parabolic trajectory
* @param amplitude - the maximum height of parabola, value could be negative and positive
* @param start_time - delay between movement starting time and beginning to move by parabolic trajectory
diff --git a/src/server/game/Movement/Spline/MoveSplineInitArgs.h b/src/server/game/Movement/Spline/MoveSplineInitArgs.h
index 474541cbf15..12c22898b6d 100644
--- a/src/server/game/Movement/Spline/MoveSplineInitArgs.h
+++ b/src/server/game/Movement/Spline/MoveSplineInitArgs.h
@@ -36,9 +36,9 @@ namespace Movement
uint64 target;
float angle;
- FacingInfo(float o) : angle(o) {}
- FacingInfo(uint64 t) : target(t) {}
- FacingInfo() {}
+ FacingInfo(float o) : angle(o) { }
+ FacingInfo(uint64 t) : target(t) { }
+ FacingInfo() { }
};
struct MoveSplineInitArgs
diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
index 29d1bb50a8f..ae62dc8b447 100644
--- a/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
+++ b/src/server/game/Movement/Spline/MovementPacketBuilder.cpp
@@ -19,7 +19,7 @@
#include "MovementPacketBuilder.h"
#include "MoveSpline.h"
-#include "WorldPacket.h"
+#include "ByteBuffer.h"
namespace Movement
{
@@ -42,7 +42,7 @@ namespace Movement
MonsterMoveFacingAngle = 4
};
- void PacketBuilder::WriteCommonMonsterMovePart(const MoveSpline& move_spline, WorldPacket& data)
+ void PacketBuilder::WriteCommonMonsterMovePart(const MoveSpline& move_spline, ByteBuffer& data)
{
MoveSplineFlag splineflags = move_spline.splineflags;
@@ -88,6 +88,14 @@ namespace Movement
}
}
+ void PacketBuilder::WriteStopMovement(Vector3 const& pos, uint32 splineId, ByteBuffer& data)
+ {
+ data << uint8(0); // sets/unsets MOVEMENTFLAG2_UNK7 (0x40)
+ data << pos;
+ data << splineId;
+ data << uint8(MonsterMoveStop);
+ }
+
void WriteLinearPath(const Spline<int32>& spline, ByteBuffer& data)
{
uint32 last_idx = spline.getPointCount() - 3;
@@ -123,7 +131,7 @@ namespace Movement
data.append<Vector3>(&spline.getPoint(1), count);
}
- void PacketBuilder::WriteMonsterMove(const MoveSpline& move_spline, WorldPacket& data)
+ void PacketBuilder::WriteMonsterMove(const MoveSpline& move_spline, ByteBuffer& data)
{
WriteCommonMonsterMovePart(move_spline, data);
diff --git a/src/server/game/Movement/Spline/MovementPacketBuilder.h b/src/server/game/Movement/Spline/MovementPacketBuilder.h
index b502e203656..3643abd2eca 100644
--- a/src/server/game/Movement/Spline/MovementPacketBuilder.h
+++ b/src/server/game/Movement/Spline/MovementPacketBuilder.h
@@ -20,18 +20,26 @@
#ifndef TRINITYSERVER_PACKET_BUILDER_H
#define TRINITYSERVER_PACKET_BUILDER_H
+#include "Define.h"
+
class ByteBuffer;
-class WorldPacket;
+namespace G3D
+{
+ class Vector3;
+}
namespace Movement
{
+ using G3D::Vector3;
+
class MoveSpline;
class PacketBuilder
{
- static void WriteCommonMonsterMovePart(const MoveSpline& mov, WorldPacket& data);
+ static void WriteCommonMonsterMovePart(const MoveSpline& mov, ByteBuffer& data);
public:
- static void WriteMonsterMove(const MoveSpline& mov, WorldPacket& data);
+ static void WriteMonsterMove(const MoveSpline& mov, ByteBuffer& data);
+ static void WriteStopMovement(Vector3 const& loc, uint32 splineId, ByteBuffer& data);
static void WriteCreate(const MoveSpline& mov, ByteBuffer& data);
};
}
diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp
index f68a776d485..375859263ab 100644
--- a/src/server/game/Movement/Spline/MovementUtil.cpp
+++ b/src/server/game/Movement/Spline/MovementUtil.cpp
@@ -77,7 +77,7 @@ namespace Movement
{
result = termVel * (t_passed - terminal_time) +
start_velocity * terminal_time +
- gravity * terminal_time * terminal_time*0.5f;
+ gravity * terminal_time * terminal_time * 0.5f;
}
else
result = t_passed * (start_velocity + t_passed * gravity * 0.5f);
diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h
index d4b100ee46e..dab31e957f1 100644
--- a/src/server/game/Movement/Spline/Spline.h
+++ b/src/server/game/Movement/Spline/Spline.h
@@ -86,7 +86,7 @@ protected:
public:
- explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false) {}
+ explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false) { }
/** Caclulates the position for given segment Idx, and percent of segment length t
@param t - percent of segment length, assumes that t in range [0, 1]
@@ -144,7 +144,7 @@ protected:
index_type computeIndexInBounds(length_type length) const;
public:
- explicit Spline(){}
+ explicit Spline(){ }
/** Calculates the position for given t
@param t - percent of spline's length, assumes that t in range [0, 1]. */
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp
index 27df7b8a47f..7fc8ae1a63c 100644
--- a/src/server/game/Movement/Waypoints/WaypointManager.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp
@@ -22,9 +22,7 @@
#include "MapManager.h"
#include "Log.h"
-WaypointMgr::WaypointMgr()
-{
-}
+WaypointMgr::WaypointMgr() { }
WaypointMgr::~WaypointMgr()
{
@@ -48,7 +46,7 @@ void WaypointMgr::Load()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 waypoints. DB table `waypoint_data` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 waypoints. DB table `waypoint_data` is empty!");
return;
}
@@ -85,7 +83,7 @@ void WaypointMgr::Load()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void WaypointMgr::ReloadPath(uint32 id)
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 73b5399fa89..8daafc44d3a 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -116,13 +116,13 @@ bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 team, uint3
bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
{
- TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "Creating capture point %u", entry);
+ TC_LOG_DEBUG("outdoorpvp", "Creating capture point %u", entry);
// check info existence
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
{
- TC_LOG_ERROR(LOG_FILTER_OUTDOORPVP, "OutdoorPvP: GO %u is not capture point!", entry);
+ TC_LOG_ERROR("outdoorpvp", "OutdoorPvP: GO %u is not capture point!", entry);
return false;
}
@@ -143,7 +143,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
{
if (!m_Creatures[type])
{
- TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "opvp creature type %u was already deleted", type);
+ TC_LOG_DEBUG("outdoorpvp", "opvp creature type %u was already deleted", type);
return false;
}
@@ -154,7 +154,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
m_Creatures[type] = 0;
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "deleting opvp creature type %u", type);
+ TC_LOG_DEBUG("outdoorpvp", "deleting opvp creature type %u", type);
uint32 guid = cr->GetDBTableGUIDLow();
// Don't save respawn time
cr->SetRespawnTime(0);
@@ -231,9 +231,7 @@ void OutdoorPvP::DeleteSpawns()
m_capturePoints.clear();
}
-OutdoorPvP::OutdoorPvP() : m_sendUpdate(true)
-{
-}
+OutdoorPvP::OutdoorPvP() : m_sendUpdate(true) { }
OutdoorPvP::~OutdoorPvP()
{
@@ -254,12 +252,10 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player* player, uint32 /*zone*/)
if (!player->GetSession()->PlayerLogout())
SendRemoveWorldStates(player);
m_players[player->GetTeamId()].erase(player->GetGUID());
- TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "Player %s left an outdoorpvp zone", player->GetName().c_str());
+ TC_LOG_DEBUG("outdoorpvp", "Player %s left an outdoorpvp zone", player->GetName().c_str());
}
-void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/)
-{
-}
+void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/) { }
bool OutdoorPvP::Update(uint32 diff)
{
@@ -384,7 +380,7 @@ bool OPvPCapturePoint::Update(uint32 diff)
if (m_OldState != m_State)
{
- //TC_LOG_ERROR(LOG_FILTER_OUTDOORPVP, "%u->%u", m_OldState, m_State);
+ //TC_LOG_ERROR("outdoorpvp", "%u->%u", m_OldState, m_State);
if (oldTeam != m_team)
ChangeTeam(oldTeam);
ChangeState();
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index 1e23f87a52e..30b9d5c58fc 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -93,9 +93,9 @@ class OPvPCapturePoint
OPvPCapturePoint(OutdoorPvP* pvp);
- virtual ~OPvPCapturePoint() {}
+ virtual ~OPvPCapturePoint() { }
- virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
+ virtual void FillInitialWorldStates(WorldPacket & /*data*/) { }
// send world state update to all players present
void SendUpdateWorldState(uint32 field, uint32 value);
@@ -119,7 +119,7 @@ class OPvPCapturePoint
virtual void ChangeState() = 0;
- virtual void ChangeTeam(TeamId /*oldTeam*/) {}
+ virtual void ChangeTeam(TeamId /*oldTeam*/) { }
virtual void SendChangePhase();
@@ -205,7 +205,7 @@ class OutdoorPvP : public ZoneScript
typedef std::map<uint32/*lowguid*/, OPvPCapturePoint*> OPvPCapturePointMap;
- virtual void FillInitialWorldStates(WorldPacket & /*data*/) {}
+ virtual void FillInitialWorldStates(WorldPacket & /*data*/) { }
// called when a player triggers an areatrigger
virtual bool HandleAreaTrigger(Player* player, uint32 trigger);
@@ -221,7 +221,7 @@ class OutdoorPvP : public ZoneScript
void OnGameObjectCreate(GameObject* go);
void OnGameObjectRemove(GameObject* go);
- void OnCreatureCreate(Creature*) {}
+ void OnCreatureCreate(Creature*) { }
// send world state update to all players present
void SendUpdateWorldState(uint32 field, uint32 value);
@@ -231,13 +231,13 @@ class OutdoorPvP : public ZoneScript
// handle npc/player kill
virtual void HandleKill(Player* killer, Unit* killed);
- virtual void HandleKillImpl(Player* /*killer*/, Unit* /*killed*/) {}
+ virtual void HandleKillImpl(Player* /*killer*/, Unit* /*killed*/) { }
// checks if player is in range of a capture credit marker
bool IsInsideObjective(Player* player) const;
// awards rewards for player kill
- virtual void AwardKillBonus(Player* /*player*/) {}
+ virtual void AwardKillBonus(Player* /*player*/) { }
uint32 GetTypeId() {return m_TypeId;}
@@ -261,7 +261,7 @@ class OutdoorPvP : public ZoneScript
bool m_sendUpdate;
// world state stuff
- virtual void SendRemoveWorldStates(Player* /*player*/) {}
+ virtual void SendRemoveWorldStates(Player* /*player*/) { }
void BroadcastPacket(WorldPacket & data) const;
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index e5673351aa7..c5e441e079d 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
@@ -24,12 +24,12 @@
OutdoorPvPMgr::OutdoorPvPMgr()
{
m_UpdateTimer = 0;
- //TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "Instantiating OutdoorPvPMgr");
+ //TC_LOG_DEBUG("outdoorpvp", "Instantiating OutdoorPvPMgr");
}
void OutdoorPvPMgr::Die()
{
- //TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "Deleting OutdoorPvPMgr");
+ //TC_LOG_DEBUG("outdoorpvp", "Deleting OutdoorPvPMgr");
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
delete *itr;
@@ -46,7 +46,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
return;
}
@@ -64,7 +64,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
if (typeId >= MAX_OUTDOORPVP_TYPES)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Invalid OutdoorPvPTypes value %u in outdoorpvp_template; skipped.", typeId);
+ TC_LOG_ERROR("sql.sql", "Invalid OutdoorPvPTypes value %u in outdoorpvp_template; skipped.", typeId);
continue;
}
@@ -84,20 +84,20 @@ void OutdoorPvPMgr::InitOutdoorPvP()
OutdoorPvPDataMap::iterator iter = m_OutdoorPvPDatas.find(OutdoorPvPTypes(i));
if (iter == m_OutdoorPvPDatas.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Could not initialize OutdoorPvP object for type ID %u; no entry in database.", uint32(i));
+ TC_LOG_ERROR("sql.sql", "Could not initialize OutdoorPvP object for type ID %u; no entry in database.", uint32(i));
continue;
}
pvp = sScriptMgr->CreateOutdoorPvP(iter->second);
if (!pvp)
{
- TC_LOG_ERROR(LOG_FILTER_OUTDOORPVP, "Could not initialize OutdoorPvP object for type ID %u; got NULL pointer from script.", uint32(i));
+ TC_LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; got NULL pointer from script.", uint32(i));
continue;
}
if (!pvp->SetupOutdoorPvP())
{
- TC_LOG_ERROR(LOG_FILTER_OUTDOORPVP, "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i));
+ TC_LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i));
delete pvp;
continue;
}
@@ -105,7 +105,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
m_OutdoorPvPSet.push_back(pvp);
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle)
@@ -123,7 +123,7 @@ void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
return;
itr->second->HandlePlayerEnterZone(player, zoneid);
- TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
+ TC_LOG_DEBUG("outdoorpvp", "Player %u entered outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
}
void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
@@ -137,7 +137,7 @@ void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
return;
itr->second->HandlePlayerLeaveZone(player, zoneid);
- TC_LOG_DEBUG(LOG_FILTER_OUTDOORPVP, "Player %u left outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
+ TC_LOG_DEBUG("outdoorpvp", "Player %u left outdoorpvp id %u", player->GetGUIDLow(), itr->second->GetTypeId());
}
OutdoorPvP* OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid)
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
index 8a93987c878..2d8acb56252 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.h
@@ -42,7 +42,7 @@ class OutdoorPvPMgr
private:
OutdoorPvPMgr();
- ~OutdoorPvPMgr() {};
+ ~OutdoorPvPMgr() { };
public:
// create outdoor pvp events
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp
index 1ea2ff9894a..d4211f83a11 100644
--- a/src/server/game/Pools/PoolMgr.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
@@ -365,7 +365,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
Creature* creature = new Creature;
- //TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "Spawning creature %u", guid);
+ //TC_LOG_DEBUG("pool", "Spawning creature %u", guid);
if (!creature->LoadCreatureFromDB(obj->guid, map))
{
delete creature;
@@ -389,7 +389,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
- //TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "Spawning gameobject %u", guid);
+ //TC_LOG_DEBUG("pool", "Spawning gameobject %u", guid);
if (!pGameobject->LoadGameObjectFromDB(obj->guid, map, false))
{
delete pGameobject;
@@ -420,7 +420,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
PooledQuestRelationBoundsNC qr = sPoolMgr->mQuestCreatureRelation.equal_range(obj->guid);
for (PooledQuestRelation::iterator itr = qr.first; itr != qr.second; ++itr)
{
- TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Adding quest %u to creature %u", itr->first, itr->second);
+ TC_LOG_DEBUG("pool", "PoolGroup<Quest>: Adding quest %u to creature %u", itr->first, itr->second);
questMap->insert(QuestRelations::value_type(itr->second, itr->first));
}
@@ -429,7 +429,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
qr = sPoolMgr->mQuestGORelation.equal_range(obj->guid);
for (PooledQuestRelation::iterator itr = qr.first; itr != qr.second; ++itr)
{
- TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Adding quest %u to GO %u", itr->first, itr->second);
+ TC_LOG_DEBUG("pool", "PoolGroup<Quest>: Adding quest %u to GO %u", itr->first, itr->second);
questMap->insert(QuestRelations::value_type(itr->second, itr->first));
}
}
@@ -437,7 +437,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
template <>
void PoolGroup<Quest>::SpawnObject(ActivePoolData& spawns, uint32 limit, uint32 triggerFrom)
{
- TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Spawning pool %u", poolId);
+ TC_LOG_DEBUG("pool", "PoolGroup<Quest>: Spawning pool %u", poolId);
// load state from db
if (!triggerFrom)
{
@@ -525,22 +525,16 @@ void PoolGroup<GameObject>::ReSpawn1Object(PoolObject* obj)
// Nothing to do for a child Pool
template <>
-void PoolGroup<Pool>::ReSpawn1Object(PoolObject* /*obj*/)
-{
-}
+void PoolGroup<Pool>::ReSpawn1Object(PoolObject* /*obj*/) { }
// Nothing to do for a quest
template <>
-void PoolGroup<Quest>::ReSpawn1Object(PoolObject* /*obj*/)
-{
-}
+void PoolGroup<Quest>::ReSpawn1Object(PoolObject* /*obj*/) { }
////////////////////////////////////////////////////////////
// Methods of class PoolMgr
-PoolMgr::PoolMgr() : max_pool_id(0)
-{
-}
+PoolMgr::PoolMgr() : max_pool_id(0) { }
void PoolMgr::Initialize()
{
@@ -572,7 +566,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
mPoolTemplate.clear();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 object pools. DB table `pool_template` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 object pools. DB table `pool_template` is empty.");
return;
}
@@ -590,12 +584,12 @@ void PoolMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
// Creatures
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creatures Pooling Data...");
+ TC_LOG_INFO("server.loading", "Loading Creatures Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -604,7 +598,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
}
else
{
@@ -620,17 +614,17 @@ void PoolMgr::LoadFromDB()
CreatureData const* data = sObjectMgr->GetCreatureData(guid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
continue;
}
if (pool_id > max_pool_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_creature` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_creature` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
continue;
}
if (chance < 0 || chance > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_creature` has an invalid chance (%f) for creature guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_creature` has an invalid chance (%f) for creature guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
continue;
}
PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id];
@@ -645,13 +639,13 @@ void PoolMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// Gameobjects
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Gameobject Pooling Data...");
+ TC_LOG_INFO("server.loading", "Loading Gameobject Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -660,7 +654,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
}
else
{
@@ -676,7 +670,7 @@ void PoolMgr::LoadFromDB()
GameObjectData const* data = sObjectMgr->GetGOData(guid);
if (!data)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_gameobject` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
continue;
}
@@ -685,19 +679,19 @@ void PoolMgr::LoadFromDB()
goinfo->type != GAMEOBJECT_TYPE_GOOBER &&
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", guid, goinfo->type, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_gameobject` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", guid, goinfo->type, pool_id);
continue;
}
if (pool_id > max_pool_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_gameobject` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
continue;
}
if (chance < 0 || chance > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` has an invalid chance (%f) for gameobject guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_gameobject` has an invalid chance (%f) for gameobject guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
continue;
}
@@ -713,13 +707,13 @@ void PoolMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// Pool of pools
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Mother Pooling Data...");
+ TC_LOG_INFO("server.loading", "Loading Mother Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -728,7 +722,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pools in pools");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 pools in pools");
}
else
{
@@ -743,22 +737,22 @@ void PoolMgr::LoadFromDB()
if (mother_pool_id > max_pool_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` mother_pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_pool` mother_pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id);
continue;
}
if (child_pool_id > max_pool_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` included pool_id (%u) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_pool` included pool_id (%u) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id);
continue;
}
if (mother_pool_id == child_pool_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` pool_id (%u) includes itself, dead-lock detected, skipped.", child_pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_pool` pool_id (%u) includes itself, dead-lock detected, skipped.", child_pool_id);
continue;
}
if (chance < 0 || chance > 100)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` has an invalid chance (%f) for pool id (%u) in mother pool id (%u), skipped.", chance, child_pool_id, mother_pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_pool` has an invalid chance (%f) for pool id (%u) in mother pool id (%u), skipped.", chance, child_pool_id, mother_pool_id);
continue;
}
PoolTemplateData* pPoolTemplateMother = &mPoolTemplate[mother_pool_id];
@@ -788,7 +782,7 @@ void PoolMgr::LoadFromDB()
ss << *itr << ' ';
ss << "create(s) a circular reference, which can cause the server to freeze.\nRemoving the last link between mother pool "
<< poolItr->first << " and child pool " << poolItr->second;
- TC_LOG_ERROR(LOG_FILTER_SQL, "%s", ss.str().c_str());
+ TC_LOG_ERROR("sql.sql", "%s", ss.str().c_str());
mPoolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first);
mPoolSearchMap.erase(poolItr);
--count;
@@ -797,11 +791,11 @@ void PoolMgr::LoadFromDB()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quest Pooling Data...");
+ TC_LOG_INFO("server.loading", "Loading Quest Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -810,7 +804,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests in pools");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 quests in pools");
}
else
{
@@ -836,19 +830,19 @@ void PoolMgr::LoadFromDB()
Quest const* quest = sObjectMgr->GetQuestTemplate(entry);
if (!quest)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` has a non existing quest template (Entry: %u) defined for pool id (%u), skipped.", entry, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_quest` has a non existing quest template (Entry: %u) defined for pool id (%u), skipped.", entry, pool_id);
continue;
}
if (pool_id > max_pool_id)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_quest` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
continue;
}
if (!quest->IsDailyOrWeekly())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` has an quest (%u) which is not daily or weekly in pool id (%u), use ExclusiveGroup instead, skipped.", entry, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_quest` has an quest (%u) which is not daily or weekly in pool id (%u), use ExclusiveGroup instead, skipped.", entry, pool_id);
continue;
}
@@ -859,7 +853,7 @@ void PoolMgr::LoadFromDB()
if (poolTypeMap[pool_id] != currType)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` quest %u is %s but pool (%u) is specified for %s, mixing not allowed, skipped.",
+ TC_LOG_ERROR("sql.sql", "`pool_quest` quest %u is %s but pool (%u) is specified for %s, mixing not allowed, skipped.",
entry, currType == QUEST_DAILY ? "QUEST_DAILY" : "QUEST_WEEKLY", pool_id, poolTypeMap[pool_id] == QUEST_DAILY ? "QUEST_DAILY" : "QUEST_WEEKLY");
continue;
}
@@ -869,7 +863,7 @@ void PoolMgr::LoadFromDB()
if (creBounds.first == creBounds.second && goBounds.first == goBounds.second)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` lists entry (%u) as member of pool (%u) but is not started anywhere, skipped.", entry, pool_id);
+ TC_LOG_ERROR("sql.sql", "`pool_quest` lists entry (%u) as member of pool (%u) but is not started anywhere, skipped.", entry, pool_id);
continue;
}
@@ -885,12 +879,12 @@ void PoolMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 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
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting objects pooling system...");
+ TC_LOG_INFO("server.loading", "Starting objects pooling system...");
{
uint32 oldMSTime = getMSTime();
@@ -900,7 +894,7 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Pool handling system initialized, 0 pools spawned.");
+ TC_LOG_INFO("server.loading", ">> Pool handling system initialized, 0 pools spawned.");
}
else
{
@@ -916,9 +910,9 @@ void PoolMgr::LoadFromDB()
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.
- TC_LOG_ERROR(LOG_FILTER_SQL, "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].GetUInt32());
+ TC_LOG_ERROR("sql.sql", "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].GetUInt32());
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "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);
+ TC_LOG_ERROR("sql.sql", "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;
}
@@ -931,7 +925,7 @@ void PoolMgr::LoadFromDB()
}
while (result->NextRow());
- TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_DEBUG("pool", "Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
diff --git a/src/server/game/Pools/PoolMgr.h b/src/server/game/Pools/PoolMgr.h
index 8a9b4a953dd..c5ded289215 100644
--- a/src/server/game/Pools/PoolMgr.h
+++ b/src/server/game/Pools/PoolMgr.h
@@ -34,7 +34,7 @@ struct PoolObject
{
uint32 guid;
float chance;
- PoolObject(uint32 _guid, float _chance): guid(_guid), chance(fabs(_chance)) {}
+ PoolObject(uint32 _guid, float _chance): guid(_guid), chance(fabs(_chance)) { }
};
class Pool // for Pool of Pool case
@@ -73,7 +73,7 @@ class PoolGroup
public:
explicit PoolGroup() : poolId(0) { }
void SetPoolId(uint32 pool_id) { poolId = pool_id; }
- ~PoolGroup() {};
+ ~PoolGroup() { };
bool isEmpty() const { return ExplicitlyChanced.empty() && EqualChanced.empty(); }
void AddEntry(PoolObject& poolitem, uint32 maxentries);
bool CheckPool() const;
@@ -108,7 +108,7 @@ class PoolMgr
private:
PoolMgr();
- ~PoolMgr() {};
+ ~PoolMgr() { };
public:
void LoadFromDB();
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 9c996a9c386..272e1bd7a1e 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -46,7 +46,7 @@ bool ReputationMgr::IsAtWar(uint32 faction_id) const
if (!factionEntry)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName().c_str(), faction_id);
+ TC_LOG_ERROR("misc", "ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName().c_str(), faction_id);
return 0;
}
@@ -69,7 +69,7 @@ int32 ReputationMgr::GetReputation(uint32 faction_id) const
if (!factionEntry)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", _player->GetName().c_str(), faction_id);
+ TC_LOG_ERROR("misc", "ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", _player->GetName().c_str(), faction_id);
return 0;
}
diff --git a/src/server/game/Reputation/ReputationMgr.h b/src/server/game/Reputation/ReputationMgr.h
index adc1df32f8a..e02cc5b62e0 100644
--- a/src/server/game/Reputation/ReputationMgr.h
+++ b/src/server/game/Reputation/ReputationMgr.h
@@ -65,8 +65,8 @@ class ReputationMgr
{
public: // constructors and global modifiers
explicit ReputationMgr(Player* owner) : _player(owner),
- _visibleFactionCount(0), _honoredFactionCount(0), _reveredFactionCount(0), _exaltedFactionCount(0), _sendFactionIncreased(false) {}
- ~ReputationMgr() {}
+ _visibleFactionCount(0), _honoredFactionCount(0), _reveredFactionCount(0), _exaltedFactionCount(0), _sendFactionIncreased(false) { }
+ ~ReputationMgr() { }
void SaveToDB(SQLTransaction& trans);
void LoadFromDB(PreparedQueryResult result);
diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp
index ff133272724..41c18b850a1 100644
--- a/src/server/game/Scripting/MapScripts.cpp
+++ b/src/server/game/Scripting/MapScripts.cpp
@@ -103,7 +103,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
{
Player* player = NULL;
if (!source && !target)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
else
{
// Check target first, then source.
@@ -113,7 +113,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
player = source->ToPlayer();
if (!player)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(),
source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0,
target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0);
@@ -125,7 +125,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
{
Creature* creature = NULL;
if (!source && !target)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source and target objects are NULL.", scriptInfo->GetDebugInfo().c_str());
else
{
if (bReverse)
@@ -146,7 +146,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
}
if (!creature)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(),
source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0,
target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0);
@@ -158,15 +158,15 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* s
{
Unit* unit = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else if (!obj->isType(TYPEMASK_UNIT))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
else
{
unit = obj->ToUnit();
if (!unit)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object could not be casted to unit.",
+ TC_LOG_ERROR("scripts", "%s %s object could not be casted to unit.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
}
return unit;
@@ -176,12 +176,12 @@ inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, const ScriptInf
{
Player* player = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
player = obj->ToPlayer();
if (!player)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).",
+ TC_LOG_ERROR("scripts", "%s %s object is not a player (TypeId: %u, Entry: %u, GUID: %u).",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
}
return player;
@@ -191,12 +191,12 @@ inline Creature* Map::_GetScriptCreature(Object* obj, bool isSource, const Scrip
{
Creature* creature = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
creature = obj->ToCreature();
if (!creature)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(),
+ TC_LOG_ERROR("scripts", "%s %s object is not a creature (TypeId: %u, Entry: %u, GUID: %u).", scriptInfo->GetDebugInfo().c_str(),
isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
}
return creature;
@@ -206,13 +206,13 @@ inline WorldObject* Map::_GetScriptWorldObject(Object* obj, bool isSource, const
{
WorldObject* pWorldObject = NULL;
if (!obj)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is NULL.",
+ TC_LOG_ERROR("scripts", "%s %s object is NULL.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
pWorldObject = dynamic_cast<WorldObject*>(obj);
if (!pWorldObject)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).",
+ TC_LOG_ERROR("scripts", "%s %s object is not a world object (TypeId: %u, Entry: %u, GUID: %u).",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUIDLow());
}
return pWorldObject;
@@ -228,29 +228,29 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script
case SCRIPT_COMMAND_OPEN_DOOR: bOpen = true; break;
case SCRIPT_COMMAND_CLOSE_DOOR: break;
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str());
return;
}
if (!guid)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str());
else if (!source)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object is NULL.", scriptInfo->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source object is NULL.", scriptInfo->GetDebugInfo().c_str());
else if (!source->isType(TYPEMASK_UNIT))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(),
+ TC_LOG_ERROR("scripts", "%s source object is not unit (TypeId: %u, Entry: %u, GUID: %u), skipping.", scriptInfo->GetDebugInfo().c_str(),
source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
else
{
WorldObject* wSource = dynamic_cast <WorldObject*> (source);
if (!wSource)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.",
scriptInfo->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
else
{
GameObject* pDoor = _FindGameObject(wSource, guid);
if (!pDoor)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid);
+ TC_LOG_ERROR("scripts", "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid);
else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).",
+ TC_LOG_ERROR("scripts", "%s gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).",
scriptInfo->GetDebugInfo().c_str(), pDoor->GetGoType(), pDoor->GetEntry(), pDoor->GetGUIDLow());
else if (bOpen == (pDoor->GetGoState() == GO_STATE_READY))
{
@@ -329,7 +329,7 @@ void Map::ScriptsProcess()
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
+ TC_LOG_ERROR("scripts", "%s source with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
step.script->GetDebugInfo().c_str(), step.sourceGUID, GUID_HIPART(step.sourceGUID));
break;
}
@@ -364,7 +364,7 @@ void Map::ScriptsProcess()
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
+ TC_LOG_ERROR("scripts", "%s target with unsupported high guid (GUID: " UI64FMTD ", high guid: %u).",
step.script->GetDebugInfo().c_str(), step.targetGUID, GUID_HIPART(step.targetGUID));
break;
}
@@ -375,7 +375,7 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_TALK:
if (step.script->Talk.ChatType > CHAT_TYPE_WHISPER && step.script->Talk.ChatType != CHAT_MSG_RAID_BOSS_WHISPER)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType);
+ TC_LOG_ERROR("scripts", "%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType);
break;
}
if (step.script->Talk.Flags & SF_TALK_USE_PLAYER)
@@ -402,7 +402,7 @@ void Map::ScriptsProcess()
{
uint64 targetGUID = target ? target->GetGUID() : 0;
if (!targetGUID || !IS_PLAYER_GUID(targetGUID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
player->Whisper(text, LANG_UNIVERSAL, targetGUID);
break;
@@ -434,13 +434,13 @@ void Map::ScriptsProcess()
break;
case CHAT_TYPE_WHISPER:
if (!targetGUID || !IS_PLAYER_GUID(targetGUID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
cSource->Whisper(step.script->Talk.TextID, targetGUID);
break;
case CHAT_MSG_RAID_BOSS_WHISPER:
if (!targetGUID || !IS_PLAYER_GUID(targetGUID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
cSource->MonsterWhisper(step.script->Talk.TextID, targetGUID, true);
break;
@@ -468,7 +468,7 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FieldSet.FieldID <= OBJECT_FIELD_ENTRY || step.script->FieldSet.FieldID >= cSource->GetValuesCount())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
+ TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FieldSet.FieldID,
cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow());
else
@@ -497,9 +497,9 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
+ TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID,
- source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
+ cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow());
else
cSource->SetFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue);
}
@@ -511,9 +511,9 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
+ TC_LOG_ERROR("scripts", "%s wrong field %u (max count: %u) in object (TypeId: %u, Entry: %u, GUID: %u) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID,
- source->GetValuesCount(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
+ cSource->GetValuesCount(), cSource->GetTypeId(), cSource->GetEntry(), cSource->GetGUIDLow());
else
cSource->RemoveFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue);
}
@@ -538,12 +538,12 @@ void Map::ScriptsProcess()
{
if (!source)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object is NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source object is NULL.", step.script->GetDebugInfo().c_str());
break;
}
if (!target)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target object is NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s target object is NULL.", step.script->GetDebugInfo().c_str());
break;
}
@@ -554,7 +554,7 @@ void Map::ScriptsProcess()
{
if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s source is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow());
break;
}
@@ -567,7 +567,7 @@ void Map::ScriptsProcess()
{
if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s target is not unit, gameobject or player (TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow());
break;
}
@@ -575,7 +575,7 @@ void Map::ScriptsProcess()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), source->GetTypeId(), source->GetEntry(), source->GetGUIDLow(),
target->GetTypeId(), target->GetEntry(), target->GetGUIDLow());
break;
@@ -606,7 +606,7 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_RESPAWN_GAMEOBJECT:
if (!step.script->RespawnGameobject.GOGuid)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str());
break;
}
@@ -616,7 +616,7 @@ void Map::ScriptsProcess()
GameObject* pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid);
if (!pGO)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid);
+ TC_LOG_ERROR("scripts", "%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid);
break;
}
@@ -625,7 +625,7 @@ void Map::ScriptsProcess()
pGO->GetGoType() == GAMEOBJECT_TYPE_BUTTON ||
pGO->GetGoType() == GAMEOBJECT_TYPE_TRAP)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s can not be used with gameobject of type %u (guid: %u).",
+ TC_LOG_ERROR("scripts", "%s can not be used with gameobject of type %u (guid: %u).",
step.script->GetDebugInfo().c_str(), uint32(pGO->GetGoType()), step.script->RespawnGameobject.GOGuid);
break;
}
@@ -648,7 +648,7 @@ void Map::ScriptsProcess()
if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script))
{
if (!step.script->TempSummonCreature.CreatureEntry)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str());
else
{
float x = step.script->TempSummonCreature.PosX;
@@ -657,7 +657,7 @@ void Map::ScriptsProcess()
float o = step.script->TempSummonCreature.Orientation;
if (!pSummoner->SummonCreature(step.script->TempSummonCreature.CreatureEntry, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->TempSummonCreature.DespawnDelay))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry);
+ TC_LOG_ERROR("scripts", "%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry);
}
}
break;
@@ -675,13 +675,13 @@ void Map::ScriptsProcess()
// Target must be GameObject.
if (!target)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target object is NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s target object is NULL.", step.script->GetDebugInfo().c_str());
break;
}
if (target->GetTypeId() != TYPEID_GAMEOBJECT)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.",
+ TC_LOG_ERROR("scripts", "%s target object is not gameobject (TypeId: %u, Entry: %u, GUID: %u), skipping.",
step.script->GetDebugInfo().c_str(), target->GetTypeId(), target->GetEntry(), target->GetGUIDLow());
break;
}
@@ -705,7 +705,7 @@ void Map::ScriptsProcess()
/// @todo Allow gameobjects to be targets and casters
if (!source && !target)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source and target objects are NULL.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s source and target objects are NULL.", step.script->GetDebugInfo().c_str());
break;
}
@@ -738,13 +738,13 @@ void Map::ScriptsProcess()
if (!uSource || !uSource->isType(TYPEMASK_UNIT))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
+ TC_LOG_ERROR("scripts", "%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
break;
}
if (!uTarget || !uTarget->isType(TYPEMASK_UNIT))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
+ TC_LOG_ERROR("scripts", "%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
break;
}
@@ -804,7 +804,7 @@ void Map::ScriptsProcess()
if (Unit* unit = _GetScriptUnit(source, true, step.script))
{
if (!sWaypointMgr->GetPath(step.script->LoadPath.PathID))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID);
+ TC_LOG_ERROR("scripts", "%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID);
else
unit->GetMotionMaster()->MovePath(step.script->LoadPath.PathID, step.script->LoadPath.IsRepeatable);
}
@@ -814,12 +814,12 @@ void Map::ScriptsProcess()
{
if (!step.script->CallScript.CreatureEntry)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str());
break;
}
if (!step.script->CallScript.ScriptID)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str());
break;
}
@@ -845,7 +845,7 @@ void Map::ScriptsProcess()
if (!cTarget)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry);
+ TC_LOG_ERROR("scripts", "%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry);
break;
}
@@ -854,7 +854,7 @@ void Map::ScriptsProcess()
//if no scriptmap present...
if (!datamap)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType);
+ TC_LOG_ERROR("scripts", "%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType);
break;
}
@@ -868,7 +868,7 @@ void Map::ScriptsProcess()
if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script))
{
if (cSource->isDead())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "%s creature is already dead (Entry: %u, GUID: %u)",
+ TC_LOG_ERROR("scripts", "%s creature is already dead (Entry: %u, GUID: %u)",
step.script->GetDebugInfo().c_str(), cSource->GetEntry(), cSource->GetGUIDLow());
else
{
@@ -922,7 +922,7 @@ void Map::ScriptsProcess()
break;
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Unknown script command %s.", step.script->GetDebugInfo().c_str());
+ TC_LOG_ERROR("scripts", "Unknown script command %s.", step.script->GetDebugInfo().c_str());
break;
}
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 31323a66ba9..28fe883feb9 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -272,7 +272,6 @@ void AddSC_ironforge();
void AddSC_isle_of_queldanas();
void AddSC_loch_modan();
void AddSC_redridge_mountains();
-void AddSC_silvermoon_city();
void AddSC_silverpine_forest();
void AddSC_stormwind_city();
void AddSC_stranglethorn_vale();
@@ -576,7 +575,8 @@ void AddSC_boss_grandmaster_vorpil();
void AddSC_boss_murmur();
void AddSC_instance_shadow_labyrinth();
-void AddSC_black_temple(); //Black Temple
+// Black Temple
+void AddSC_black_temple();
void AddSC_boss_illidan();
void AddSC_boss_shade_of_akama();
void AddSC_boss_supremus();
@@ -587,22 +587,35 @@ void AddSC_boss_teron_gorefiend();
void AddSC_boss_najentus();
void AddSC_boss_illidari_council();
void AddSC_instance_black_temple();
-void AddSC_boss_fathomlord_karathress(); //CR Serpent Shrine Cavern
+
+// Coilfang Reservoir - Serpent Shrine Cavern
+void AddSC_boss_fathomlord_karathress();
void AddSC_boss_hydross_the_unstable();
void AddSC_boss_lady_vashj();
void AddSC_boss_leotheras_the_blind();
void AddSC_boss_morogrim_tidewalker();
void AddSC_instance_serpentshrine_cavern();
void AddSC_boss_the_lurker_below();
-void AddSC_boss_hydromancer_thespia(); //CR Steam Vault
+
+// Coilfang Reservoir - The Steam Vault
+void AddSC_boss_hydromancer_thespia();
void AddSC_boss_mekgineer_steamrigger();
void AddSC_boss_warlord_kalithresh();
void AddSC_instance_steam_vault();
-void AddSC_instance_the_slave_pens(); //The Slave Pens
-void AddSC_boss_hungarfen(); //CR Underbog
-void AddSC_boss_the_black_stalker();
+
+// Coilfang Reservoir - The Slave Pens
+void AddSC_instance_the_slave_pens();
+void AddSC_boss_mennu_the_betrayer();
+void AddSC_boss_rokmar_the_crackler();
+void AddSC_boss_quagmirran();
+
+// Coilfang Reservoir - The Underbog
void AddSC_instance_the_underbog();
-void AddSC_boss_gruul(); //Gruul's Lair
+void AddSC_boss_hungarfen();
+void AddSC_boss_the_black_stalker();
+
+// Gruul's Lair
+void AddSC_boss_gruul();
void AddSC_boss_high_king_maulgar();
void AddSC_instance_gruuls_lair();
void AddSC_boss_broggok(); //HC Blood Furnace
@@ -620,6 +633,9 @@ void AddSC_boss_omor_the_unscarred();
void AddSC_boss_vazruden_the_herald();
void AddSC_instance_ramparts();
void AddSC_arcatraz(); //TK Arcatraz
+void AddSC_boss_zereketh_the_unbound();
+void AddSC_boss_dalliah_the_doomsayer();
+void AddSC_boss_wrath_scryer_soccothrates();
void AddSC_boss_harbinger_skyriss();
void AddSC_instance_arcatraz();
void AddSC_boss_high_botanist_freywinn(); //TK Botanica
@@ -963,7 +979,6 @@ void AddEasternKingdomsScripts()
AddSC_isle_of_queldanas();
AddSC_loch_modan();
AddSC_redridge_mountains();
- AddSC_silvermoon_city();
AddSC_silverpine_forest();
AddSC_stormwind_city();
AddSC_stranglethorn_vale();
@@ -1098,7 +1113,8 @@ void AddOutlandScripts()
AddSC_boss_murmur();
AddSC_instance_shadow_labyrinth();
- AddSC_black_temple(); //Black Temple
+ // Black Temple
+ AddSC_black_temple();
AddSC_boss_illidan();
AddSC_boss_shade_of_akama();
AddSC_boss_supremus();
@@ -1109,22 +1125,35 @@ void AddOutlandScripts()
AddSC_boss_najentus();
AddSC_boss_illidari_council();
AddSC_instance_black_temple();
- AddSC_boss_fathomlord_karathress(); //CR Serpent Shrine Cavern
+
+ // Coilfang Reservoir - Serpent Shrine Cavern
+ AddSC_boss_fathomlord_karathress();
AddSC_boss_hydross_the_unstable();
AddSC_boss_lady_vashj();
AddSC_boss_leotheras_the_blind();
AddSC_boss_morogrim_tidewalker();
AddSC_instance_serpentshrine_cavern();
AddSC_boss_the_lurker_below();
- AddSC_boss_hydromancer_thespia(); //CR Steam Vault
+
+ // Coilfang Reservoir - The Steam Vault
+ AddSC_instance_steam_vault();
+ AddSC_boss_hydromancer_thespia();
AddSC_boss_mekgineer_steamrigger();
AddSC_boss_warlord_kalithresh();
- AddSC_instance_steam_vault();
- AddSC_instance_the_slave_pens(); //The Slave Pens
- AddSC_boss_hungarfen(); //CR Underbog
- AddSC_boss_the_black_stalker();
+
+ // Coilfang Reservoir - The Slave Pens
+ AddSC_instance_the_slave_pens();
+ AddSC_boss_mennu_the_betrayer();
+ AddSC_boss_rokmar_the_crackler();
+ AddSC_boss_quagmirran();
+
+ // Coilfang Reservoir - The Underbog
AddSC_instance_the_underbog();
- AddSC_boss_gruul(); //Gruul's Lair
+ AddSC_boss_hungarfen();
+ AddSC_boss_the_black_stalker();
+
+ // Gruul's Lair
+ AddSC_boss_gruul();
AddSC_boss_high_king_maulgar();
AddSC_instance_gruuls_lair();
AddSC_boss_broggok(); //HC Blood Furnace
@@ -1142,6 +1171,9 @@ void AddOutlandScripts()
AddSC_boss_vazruden_the_herald();
AddSC_instance_ramparts();
AddSC_arcatraz(); //TK Arcatraz
+ AddSC_boss_zereketh_the_unbound();
+ AddSC_boss_dalliah_the_doomsayer();
+ AddSC_boss_wrath_scryer_soccothrates();
AddSC_boss_harbinger_skyriss();
AddSC_instance_arcatraz();
AddSC_boss_high_botanist_freywinn(); //TK Botanica
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 26b3bb5f78f..3674f8fe15e 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -62,7 +62,7 @@ class ScriptRegistry
{
if (it->second == script)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script '%s' has same memory pointer as '%s'.",
+ TC_LOG_ERROR("scripts", "Script '%s' has same memory pointer as '%s'.",
script->GetName().c_str(), it->second->GetName().c_str());
return;
@@ -98,7 +98,7 @@ class ScriptRegistry
else
{
// If the script is already assigned -> delete it!
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script '%s' already assigned with the same script name, so the script can't work.",
+ TC_LOG_ERROR("scripts", "Script '%s' already assigned with the same script name, so the script can't work.",
script->GetName().c_str());
ASSERT(false); // Error that should be fixed ASAP.
@@ -108,7 +108,7 @@ class ScriptRegistry
{
// The script uses a script name from database, but isn't assigned to anything.
if (script->GetName().find("example") == std::string::npos && script->GetName().find("Smart") == std::string::npos)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Script named '%s' does not have a script name assigned in database.",
+ TC_LOG_ERROR("sql.sql", "Script named '%s' does not have a script name assigned in database.",
script->GetName().c_str());
// These scripts don't get stored anywhere so throw them into this to avoid leaking memory
@@ -176,13 +176,9 @@ struct TSpellSummary
} *SpellSummary;
ScriptMgr::ScriptMgr()
- : _scriptCount(0), _scheduledScripts(0)
-{
-}
+ : _scriptCount(0), _scheduledScripts(0) { }
-ScriptMgr::~ScriptMgr()
-{
-}
+ScriptMgr::~ScriptMgr() { }
void ScriptMgr::Initialize()
{
@@ -190,12 +186,12 @@ void ScriptMgr::Initialize()
LoadDatabase();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading C++ scripts");
+ TC_LOG_INFO("server.loading", "Loading C++ scripts");
FillSpellSummary();
AddScripts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
void ScriptMgr::Unload()
@@ -1423,7 +1419,7 @@ WorldMapScript::WorldMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<Map>(mapId)
{
if (GetEntry() && !GetEntry()->IsWorldMap())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "WorldMapScript for map %u is invalid.", mapId);
+ TC_LOG_ERROR("scripts", "WorldMapScript for map %u is invalid.", mapId);
ScriptRegistry<WorldMapScript>::AddScript(this);
}
@@ -1432,7 +1428,7 @@ InstanceMapScript::InstanceMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<InstanceMap>(mapId)
{
if (GetEntry() && !GetEntry()->IsDungeon())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "InstanceMapScript for map %u is invalid.", mapId);
+ TC_LOG_ERROR("scripts", "InstanceMapScript for map %u is invalid.", mapId);
ScriptRegistry<InstanceMapScript>::AddScript(this);
}
@@ -1441,7 +1437,7 @@ BattlegroundMapScript::BattlegroundMapScript(const char* name, uint32 mapId)
: ScriptObject(name), MapScript<BattlegroundMap>(mapId)
{
if (GetEntry() && !GetEntry()->IsBattleground())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "BattlegroundMapScript for map %u is invalid.", mapId);
+ TC_LOG_ERROR("scripts", "BattlegroundMapScript for map %u is invalid.", mapId);
ScriptRegistry<BattlegroundMapScript>::AddScript(this);
}
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 37a95c77254..401be45a4e1 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -311,7 +311,7 @@ template<class TMap> class MapScript : public UpdatableScript<TMap>
: _mapEntry(sMapStore.LookupEntry(mapId))
{
if (!_mapEntry)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Invalid MapScript for %u; no such map ID.", mapId);
+ TC_LOG_ERROR("scripts", "Invalid MapScript for %u; no such map ID.", mapId);
}
public:
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index d44eeabd254..921ae7cbda6 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -37,14 +37,14 @@ void SystemMgr::LoadScriptWaypoints()
if (result)
uiCreatureCount = result->GetRowCount();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount);
+ TC_LOG_INFO("server.loading", "Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount);
// 0 1 2 3 4 5
result = WorldDatabase.Query("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
return;
}
@@ -67,17 +67,17 @@ void SystemMgr::LoadScriptWaypoints()
if (!pCInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", temp.uiCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TSCR: DB table script_waypoint has waypoint for non-existant creature entry %u", temp.uiCreatureEntry);
continue;
}
if (!pCInfo->ScriptID)
- TC_LOG_ERROR(LOG_FILTER_SQL, "TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", temp.uiCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TSCR: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", temp.uiCreatureEntry);
m_mPointMoveMap[uiEntry].push_back(temp);
++count;
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
diff --git a/src/server/game/Scripting/ScriptSystem.h b/src/server/game/Scripting/ScriptSystem.h
index 0641cebd18f..af2e50bae36 100644
--- a/src/server/game/Scripting/ScriptSystem.h
+++ b/src/server/game/Scripting/ScriptSystem.h
@@ -49,8 +49,8 @@ typedef std::vector<ScriptPointMove> ScriptPointVector;
class SystemMgr
{
friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
- SystemMgr() {}
- ~SystemMgr() {}
+ SystemMgr() { }
+ ~SystemMgr() { }
public:
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap;
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index c33c12ae5d4..82cc1c963a6 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -212,8 +212,8 @@ void WorldSession::SendPacket(WorldPacket const* packet)
{
uint64 minTime = uint64(cur_time - lastTime);
uint64 fullTime = uint64(lastTime - firstTime);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime));
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime);
+ TC_LOG_INFO("misc", "Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime));
+ TC_LOG_INFO("misc", "Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime);
lastTime = cur_time;
sendLastPacketCount = 1;
@@ -234,17 +234,17 @@ void WorldSession::QueuePacket(WorldPacket* new_packet)
/// Logging helper for unexpected opcodes
void WorldSession::LogUnexpectedOpcode(WorldPacket* packet, const char* status, const char *reason)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received unexpected opcode %s Status: %s Reason: %s from %s",
+ TC_LOG_ERROR("network.opcode", "Received unexpected opcode %s Status: %s Reason: %s from %s",
GetOpcodeNameForLogging(packet->GetOpcode()).c_str(), status, reason, GetPlayerInfo().c_str());
}
/// Logging helper for unexpected opcodes
void WorldSession::LogUnprocessedTail(WorldPacket* packet)
{
- if (!sLog->ShouldLog(LOG_FILTER_OPCODES, LOG_LEVEL_TRACE) || packet->rpos() >= packet->wpos())
+ if (!sLog->ShouldLog("network.opcode", LOG_LEVEL_TRACE) || packet->rpos() >= packet->wpos())
return;
- TC_LOG_TRACE(LOG_FILTER_OPCODES, "Unprocessed tail data (read stop at %u from %u) Opcode %s from %s",
+ TC_LOG_TRACE("network.opcode", "Unprocessed tail data (read stop at %u from %u) Opcode %s from %s",
uint32(packet->rpos()), uint32(packet->wpos()), GetOpcodeNameForLogging(packet->GetOpcode()).c_str(), GetPlayerInfo().c_str());
packet->print_storage();
}
@@ -284,7 +284,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
}
else if (packet->GetOpcode() >= NUM_MSG_TYPES)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received non-existed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
+ TC_LOG_ERROR("network.opcode", "Received non-existed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
, GetPlayerInfo().c_str());
sScriptMgr->OnUnknownPacketReceive(m_Socket, WorldPacket(*packet));
}
@@ -310,7 +310,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
deletePacket = false;
QueuePacket(packet);
//! Log
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Re-enqueueing packet with opcode %s with with status STATUS_LOGGEDIN. "
+ TC_LOG_DEBUG("network", "Re-enqueueing packet with opcode %s with with status STATUS_LOGGEDIN. "
"Player is currently not in world yet.", GetOpcodeNameForLogging(packet->GetOpcode()).c_str());
}
}
@@ -364,18 +364,18 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
LogUnprocessedTail(packet);
break;
case STATUS_NEVER:
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received not allowed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
+ TC_LOG_ERROR("network.opcode", "Received not allowed opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
, GetPlayerInfo().c_str());
break;
case STATUS_UNHANDLED:
- TC_LOG_DEBUG(LOG_FILTER_OPCODES, "Received not handled opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
+ TC_LOG_DEBUG("network.opcode", "Received not handled opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
, GetPlayerInfo().c_str());
break;
}
}
catch (ByteBufferException const&)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.",
+ TC_LOG_ERROR("misc", "WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.",
packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId());
packet->hexlike();
}
@@ -543,7 +543,7 @@ void WorldSession::LogoutPlayer(bool save)
// e.g if he got disconnected during a transfer to another map
// calls to GetMap in this case may cause crashes
_player->CleanupsBeforeDelete();
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d",
+ TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Logout Character:[%s] (GUID: %u) Level: %d",
GetAccountId(), GetRemoteAddress().c_str(), _player->GetName().c_str(), _player->GetGUIDLow(), _player->getLevel());
if (Map* _map = _player->FindMap())
_map->RemovePlayerFromMap(_player, true);
@@ -554,7 +554,7 @@ void WorldSession::LogoutPlayer(bool save)
//! Client will respond by sending 3x CMSG_CANCEL_TRADE, which we currently dont handle
WorldPacket data(SMSG_LOGOUT_COMPLETE, 0);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
+ TC_LOG_DEBUG("network", "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
//! Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ACCOUNT_ONLINE);
@@ -618,25 +618,25 @@ const char *WorldSession::GetTrinityString(int32 entry) const
void WorldSession::Handle_NULL(WorldPacket& recvPacket)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received unhandled opcode %s from %s"
+ TC_LOG_ERROR("network.opcode", "Received unhandled opcode %s from %s"
, GetOpcodeNameForLogging(recvPacket.GetOpcode()).c_str(), GetPlayerInfo().c_str());
}
void WorldSession::Handle_EarlyProccess(WorldPacket& recvPacket)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received opcode %s that must be processed in WorldSocket::OnRead from %s"
+ TC_LOG_ERROR("network.opcode", "Received opcode %s that must be processed in WorldSocket::OnRead from %s"
, GetOpcodeNameForLogging(recvPacket.GetOpcode()).c_str(), GetPlayerInfo().c_str());
}
void WorldSession::Handle_ServerSide(WorldPacket& recvPacket)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received server-side opcode %s from %s"
+ TC_LOG_ERROR("network.opcode", "Received server-side opcode %s from %s"
, GetOpcodeNameForLogging(recvPacket.GetOpcode()).c_str(), GetPlayerInfo().c_str());
}
void WorldSession::Handle_Deprecated(WorldPacket& recvPacket)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Received deprecated opcode %s from %s"
+ TC_LOG_ERROR("network.opcode", "Received deprecated opcode %s from %s"
, GetOpcodeNameForLogging(recvPacket.GetOpcode()).c_str(), GetPlayerInfo().c_str());
}
@@ -680,14 +680,14 @@ void WorldSession::LoadAccountData(PreparedQueryResult result, uint32 mask)
uint32 type = fields[0].GetUInt8();
if (type >= NUM_ACCOUNT_DATA_TYPES)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Table `%s` have invalid account data type (%u), ignore.",
+ TC_LOG_ERROR("misc", "Table `%s` have invalid account data type (%u), ignore.",
mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type);
continue;
}
if ((mask & (1 << type)) == 0)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Table `%s` have non appropriate for table account data type (%u), ignore.",
+ TC_LOG_ERROR("misc", "Table `%s` have non appropriate for table account data type (%u), ignore.",
mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type);
continue;
}
@@ -821,7 +821,7 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi)
{ \
if (check) \
{ \
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "WorldSession::ReadMovementInfo: Violation of MovementFlags found (%s). " \
+ TC_LOG_DEBUG("entities.unit", "WorldSession::ReadMovementInfo: Violation of MovementFlags found (%s). " \
"MovementFlags: %u, MovementFlags2: %u for player GUID: %u. Mask %u will be removed.", \
STRINGIZE(check), mi->GetMovementFlags(), mi->GetExtraMovementFlags(), GetPlayer()->GetGUIDLow(), maskToRemove); \
mi->RemoveMovementFlag((maskToRemove)); \
@@ -942,7 +942,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
if (size > 0xFFFFF)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "WorldSession::ReadAddonsInfo addon info too big, size %u", size);
+ TC_LOG_ERROR("misc", "WorldSession::ReadAddonsInfo addon info too big, size %u", size);
return;
}
@@ -972,7 +972,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
addonInfo >> enabled >> crc >> unk1;
- TC_LOG_INFO(LOG_FILTER_GENERAL, "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
+ TC_LOG_INFO("misc", "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
AddonInfo addon(addonName, enabled, crc, 2, true);
@@ -980,15 +980,15 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
if (savedAddon)
{
if (addon.CRC != savedAddon->CRC)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
+ TC_LOG_INFO("misc", "ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
else
- TC_LOG_INFO(LOG_FILTER_GENERAL, "ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
+ TC_LOG_INFO("misc", "ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
}
else
{
AddonMgr::SaveAddon(addon);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
+ TC_LOG_INFO("misc", "ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
}
/// @todo Find out when to not use CRC/pubkey, and other possible states.
@@ -997,10 +997,10 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
uint32 currentTime;
addonInfo >> currentTime;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "ADDON: CurrentTime: %u", currentTime);
+ TC_LOG_DEBUG("network", "ADDON: CurrentTime: %u", currentTime);
}
else
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Addon packet uncompress error!");
+ TC_LOG_ERROR("misc", "Addon packet uncompress error!");
}
void WorldSession::SendAddonsInfo()
@@ -1039,7 +1039,7 @@ void WorldSession::SendAddonsInfo()
data << uint8(usepk);
if (usepk) // if CRC is wrong, add public key (client need it)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
+ TC_LOG_INFO("misc", "ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
itr->CRC, itr->Name.c_str(), STANDARD_ADDON_CRC);
data.append(addonPublicKey, sizeof(addonPublicKey));
@@ -1200,7 +1200,7 @@ void WorldSession::LoadPermissions()
_RBACData = new rbac::RBACData(id, name, realmID, secLevel);
_RBACData->LoadFromDB();
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "WorldSession::LoadPermissions [AccountId: %u, Name: %s, realmId: %d, secLevel: %u]",
+ TC_LOG_DEBUG("rbac", "WorldSession::LoadPermissions [AccountId: %u, Name: %s, realmId: %d, secLevel: %u]",
id, name.c_str(), realmID, secLevel);
}
@@ -1215,7 +1215,7 @@ bool WorldSession::HasPermission(uint32 permission)
LoadPermissions();
bool hasPermission = _RBACData->HasPermission(permission);
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "WorldSession::HasPermission [AccountId: %u, Name: %s, realmId: %d]",
+ TC_LOG_DEBUG("rbac", "WorldSession::HasPermission [AccountId: %u, Name: %s, realmId: %d]",
_RBACData->GetId(), _RBACData->GetName().c_str(), realmID);
return hasPermission;
@@ -1223,7 +1223,7 @@ bool WorldSession::HasPermission(uint32 permission)
void WorldSession::InvalidateRBACData()
{
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "WorldSession::Invalidaterbac::RBACData [AccountId: %u, Name: %s, realmId: %d]",
+ TC_LOG_DEBUG("rbac", "WorldSession::Invalidaterbac::RBACData [AccountId: %u, Name: %s, realmId: %d]",
_RBACData->GetId(), _RBACData->GetName().c_str(), realmID);
delete _RBACData;
_RBACData = NULL;
@@ -1235,7 +1235,7 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p) const
return true;
// Opcode not allowed, let the punishment begin
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "AntiDOS: Account %u, IP: %s, sent unacceptable packet (opc: %u, size: %u)",
+ TC_LOG_INFO("network", "AntiDOS: Account %u, IP: %s, sent unacceptable packet (opc: %u, size: %u)",
Session->GetAccountId(), Session->GetRemoteAddress().c_str(), p.GetOpcode(), (uint32)p.size());
switch (_policy)
@@ -1243,7 +1243,7 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p) const
case POLICY_LOG:
return true;
case POLICY_KICK:
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "AntiDOS: Player kicked!");
+ TC_LOG_INFO("network", "AntiDOS: Player kicked!");
return false;
case POLICY_BAN:
{
@@ -1257,7 +1257,7 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p) const
case BAN_IP: nameOrIp = Session->GetRemoteAddress(); break;
}
sWorld->BanAccount(bm, nameOrIp, duration, "DOS (Packet Flooding/Spoofing", "Server: AutoDOS");
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "AntiDOS: Player automatically banned for %u seconds.", duration);
+ TC_LOG_INFO("network", "AntiDOS: Player automatically banned for %u seconds.", duration);
return false;
}
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 3842a4577de..2d7ec9c68c6 100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -86,7 +86,7 @@ enum AccountDataType
struct AccountData
{
- AccountData() : Time(0), Data("") {}
+ AccountData() : Time(0), Data("") { }
time_t Time;
std::string Data;
@@ -130,8 +130,8 @@ enum CharterTypes
class PacketFilter
{
public:
- explicit PacketFilter(WorldSession* pSession) : m_pSession(pSession) {}
- virtual ~PacketFilter() {}
+ explicit PacketFilter(WorldSession* pSession) : m_pSession(pSession) { }
+ virtual ~PacketFilter() { }
virtual bool Process(WorldPacket* /*packet*/) { return true; }
virtual bool ProcessLogout() const { return true; }
@@ -143,8 +143,8 @@ protected:
class MapSessionFilter : public PacketFilter
{
public:
- explicit MapSessionFilter(WorldSession* pSession) : PacketFilter(pSession) {}
- ~MapSessionFilter() {}
+ explicit MapSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
+ ~MapSessionFilter() { }
virtual bool Process(WorldPacket* packet);
//in Map::Update() we do not process player logout!
@@ -156,8 +156,8 @@ public:
class WorldSessionFilter : public PacketFilter
{
public:
- explicit WorldSessionFilter(WorldSession* pSession) : PacketFilter(pSession) {}
- ~WorldSessionFilter() {}
+ explicit WorldSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
+ ~WorldSessionFilter() { }
virtual bool Process(WorldPacket* packet);
};
@@ -173,7 +173,7 @@ class CharacterCreateInfo
CharacterCreateInfo(std::string const& name, uint8 race, uint8 cclass, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId,
WorldPacket& data) : Name(name), Race(race), Class(cclass), Gender(gender), Skin(skin), Face(face), HairStyle(hairStyle), HairColor(hairColor), FacialHair(facialHair),
OutfitId(outfitId), Data(data), CharCount(0)
- {}
+ { }
/// User specified variables
std::string Name;
@@ -359,10 +359,10 @@ class WorldSession
void ResetClientTimeDelay() { m_clientTimeDelay = 0; }
uint32 getDialogStatus(Player* player, Object* questgiver, uint32 defstatus);
- time_t m_timeOutTime;
+ ACE_Atomic_Op<ACE_Thread_Mutex, time_t> m_timeOutTime;
void UpdateTimeOutTime(uint32 diff)
{
- if (time_t(diff) > m_timeOutTime)
+ if (time_t(diff) > m_timeOutTime.value())
m_timeOutTime = 0;
else
m_timeOutTime -= diff;
@@ -923,7 +923,7 @@ class WorldSession
{
friend class World;
public:
- DosProtection(WorldSession* s) : Session(s), _policy((Policy)sWorld->getIntConfig(CONFIG_PACKET_SPOOF_POLICY)) {}
+ DosProtection(WorldSession* s) : Session(s), _policy((Policy)sWorld->getIntConfig(CONFIG_PACKET_SPOOF_POLICY)) { }
bool EvaluateOpcode(WorldPacket& p) const;
void AllowOpcode(uint16 opcode, bool allow) { _isOpcodeAllowed[opcode] = allow; }
protected:
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index b7c34f1c28d..1384ba3cc4b 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -62,7 +62,7 @@ struct ServerPktHeader
uint8 headerIndex=0;
if (isLargePacket())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "initializing large server to client packet. Size: %u, cmd: %u", size, cmd);
+ TC_LOG_DEBUG("network", "initializing large server to client packet. Size: %u, cmd: %u", size, cmd);
header[headerIndex++] = 0x80 | (0xFF & (size >> 16));
}
header[headerIndex++] = 0xFF &(size >> 8);
@@ -167,7 +167,7 @@ int WorldSocket::SendPacket(WorldPacket const& pct)
if (m_Session)
- TC_LOG_TRACE(LOG_FILTER_OPCODES, "S->C: %s %s", m_Session->GetPlayerInfo().c_str(), GetOpcodeNameForLogging(pkt->GetOpcode()).c_str());
+ TC_LOG_TRACE("network.opcode", "S->C: %s %s", m_Session->GetPlayerInfo().c_str(), GetOpcodeNameForLogging(pkt->GetOpcode()).c_str());
sScriptMgr->OnPacketSend(this, *pkt);
@@ -198,7 +198,7 @@ int WorldSocket::SendPacket(WorldPacket const& pct)
if (msg_queue()->enqueue_tail(mb, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::SendPacket enqueue_tail failed");
+ TC_LOG_ERROR("network", "WorldSocket::SendPacket enqueue_tail failed");
mb->release();
return -1;
}
@@ -241,7 +241,7 @@ int WorldSocket::open (void *a)
if (peer().get_remote_addr(remote_addr) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
+ TC_LOG_ERROR("network", "WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
return -1;
}
@@ -253,7 +253,7 @@ int WorldSocket::open (void *a)
// Register with ACE Reactor
if (reactor()->register_handler(this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::WRITE_MASK) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
+ TC_LOG_ERROR("network", "WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
return -1;
}
@@ -289,14 +289,14 @@ int WorldSocket::handle_input (ACE_HANDLE)
return Update(); // interesting line, isn't it ?
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
+ TC_LOG_DEBUG("network", "WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
errno = ECONNRESET;
return -1;
}
case 0:
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSocket::handle_input: Peer has closed connection");
+ TC_LOG_DEBUG("network", "WorldSocket::handle_input: Peer has closed connection");
errno = ECONNRESET;
return -1;
@@ -365,7 +365,7 @@ int WorldSocket::handle_output_queue (GuardType& g)
if (msg_queue()->dequeue_head(mblk, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::handle_output_queue dequeue_head");
+ TC_LOG_ERROR("network", "WorldSocket::handle_output_queue dequeue_head");
return -1;
}
@@ -400,7 +400,7 @@ int WorldSocket::handle_output_queue (GuardType& g)
if (msg_queue()->enqueue_head(mblk, (ACE_Time_Value*) &ACE_Time_Value::zero) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::handle_output_queue enqueue_head");
+ TC_LOG_ERROR("network", "WorldSocket::handle_output_queue enqueue_head");
mblk->release();
return -1;
}
@@ -478,7 +478,7 @@ int WorldSocket::handle_input_header (void)
if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240))
{
Player* _player = m_Session ? m_Session->GetPlayer() : NULL;
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)",
+ TC_LOG_ERROR("network", "WorldSocket::handle_input_header(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %d, cmd: %d)",
m_Session ? m_Session->GetAccountId() : 0,
_player ? _player->GetGUIDLow() : 0,
_player ? _player->GetName().c_str() : "<none>",
@@ -584,7 +584,7 @@ int WorldSocket::handle_input_missing_data (void)
// hope this is not hack, as proper m_RecvWPct is asserted around
if (!m_RecvWPct)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Forcing close on input m_RecvWPct = NULL");
+ TC_LOG_ERROR("network", "Forcing close on input m_RecvWPct = NULL");
errno = EINVAL;
return -1;
}
@@ -630,7 +630,7 @@ int WorldSocket::cancel_wakeup_output (GuardType& g)
(this, ACE_Event_Handler::WRITE_MASK) == -1)
{
// would be good to store errno from reactor with errno guard
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::cancel_wakeup_output");
+ TC_LOG_ERROR("network", "WorldSocket::cancel_wakeup_output");
return -1;
}
@@ -649,7 +649,7 @@ int WorldSocket::schedule_wakeup_output (GuardType& g)
if (reactor()->schedule_wakeup
(this, ACE_Event_Handler::WRITE_MASK) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::schedule_wakeup_output");
+ TC_LOG_ERROR("network", "WorldSocket::schedule_wakeup_output");
return -1;
}
@@ -674,7 +674,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
std::string opcodeName = GetOpcodeNameForLogging(opcode);
if (m_Session)
- TC_LOG_TRACE(LOG_FILTER_OPCODES, "C->S: %s %s", m_Session->GetPlayerInfo().c_str(), opcodeName.c_str());
+ TC_LOG_TRACE("network.opcode", "C->S: %s %s", m_Session->GetPlayerInfo().c_str(), opcodeName.c_str());
try
{
@@ -685,14 +685,14 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
case CMSG_AUTH_SESSION:
if (m_Session)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::ProcessIncoming: received duplicate CMSG_AUTH_SESSION from %s", m_Session->GetPlayerInfo().c_str());
+ TC_LOG_ERROR("network", "WorldSocket::ProcessIncoming: received duplicate CMSG_AUTH_SESSION from %s", m_Session->GetPlayerInfo().c_str());
return -1;
}
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
return HandleAuthSession(*new_pct);
case CMSG_KEEP_ALIVE:
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "%s", opcodeName.c_str());
+ TC_LOG_DEBUG("network", "%s", opcodeName.c_str());
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
return 0;
default:
@@ -700,7 +700,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
ACE_GUARD_RETURN(LockType, Guard, m_SessionLock, -1);
if (!m_Session)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
+ TC_LOG_ERROR("network.opcode", "ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
return -1;
}
@@ -719,7 +719,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
}
catch (ByteBufferException &)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet %s from client %s, accountid=%i. Disconnected client.",
+ TC_LOG_ERROR("network", "WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet %s from client %s, accountid=%i. Disconnected client.",
opcodeName.c_str(), GetRemoteAddress().c_str(), m_Session ? int32(m_Session->GetAccountId()) : -1);
new_pct->hexlike();
return -1;
@@ -762,7 +762,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
if (sWorld->IsClosed())
{
SendAuthResponseError(AUTH_REJECT);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
+ TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
return -1;
}
@@ -776,7 +776,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
recvPacket >> unk4;
recvPacket.read(digest, 20);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
+ TC_LOG_DEBUG("network", "WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
clientBuild,
unk2,
account.c_str(),
@@ -796,7 +796,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
if (!result)
{
SendAuthResponseError(AUTH_UNKNOWN_ACCOUNT);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
+ TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
return -1;
}
@@ -813,7 +813,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
if (strcmp (fields[2].GetCString(), GetRemoteAddress().c_str()))
{
SendAuthResponseError(AUTH_FAILED);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
+ TC_LOG_DEBUG("network", "WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
return -1;
}
}
@@ -847,7 +847,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED) && os != "Win" && os != "OSX")
{
SendAuthResponseError(AUTH_REJECT);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Client %s attempted to log in using invalid client OS (%s).", GetRemoteAddress().c_str(), os.c_str());
+ TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Client %s attempted to log in using invalid client OS (%s).", GetRemoteAddress().c_str(), os.c_str());
return -1;
}
@@ -878,17 +878,17 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
if (banresult) // if account banned
{
SendAuthResponseError(AUTH_BANNED);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
+ TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
return -1;
}
// Check locked state for server
AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security));
+ TC_LOG_DEBUG("network", "Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security));
if (allowedAccountType > SEC_PLAYER && AccountTypes(security) < allowedAccountType)
{
SendAuthResponseError(AUTH_UNAVAILABLE);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
+ TC_LOG_INFO("network", "WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
return -1;
}
@@ -908,11 +908,11 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
if (memcmp(sha.GetDigest(), digest, 20))
{
SendAuthResponseError(AUTH_FAILED);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Authentication failed for account: %u ('%s') address: %s", id, account.c_str(), address.c_str());
+ TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Authentication failed for account: %u ('%s') address: %s", id, account.c_str(), address.c_str());
return -1;
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
+ TC_LOG_DEBUG("network", "WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
account.c_str(),
address.c_str());
@@ -988,7 +988,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
if (m_Session && !m_Session->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_OVERSPEED_PING))
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::HandlePing: %s kicked for over-speed pings (address: %s)",
+ TC_LOG_ERROR("network", "WorldSocket::HandlePing: %s kicked for over-speed pings (address: %s)",
m_Session->GetPlayerInfo().c_str(), GetRemoteAddress().c_str());
return -1;
@@ -1010,7 +1010,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "WorldSocket::HandlePing: peer sent CMSG_PING, "
+ TC_LOG_ERROR("network", "WorldSocket::HandlePing: peer sent CMSG_PING, "
"but is not authenticated or got recently kicked, "
" address = %s",
GetRemoteAddress().c_str());
diff --git a/src/server/game/Server/WorldSocketAcceptor.h b/src/server/game/Server/WorldSocketAcceptor.h
index 041b9778cee..518cf90d17f 100644
--- a/src/server/game/Server/WorldSocketAcceptor.h
+++ b/src/server/game/Server/WorldSocketAcceptor.h
@@ -44,7 +44,7 @@ protected:
virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Resuming acceptor");
+ TC_LOG_DEBUG("misc", "Resuming acceptor");
reactor()->cancel_timer(this, 1);
return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK);
}
@@ -54,7 +54,7 @@ protected:
#if defined(ENFILE) && defined(EMFILE)
if (errno == ENFILE || errno == EMFILE)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Out of file descriptors, suspending incoming connections for 10 seconds");
+ TC_LOG_ERROR("misc", "Out of file descriptors, suspending incoming connections for 10 seconds");
reactor()->remove_handler(this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
reactor()->schedule_timer(this, NULL, ACE_Time_Value(10));
}
diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp
index 57a77773d52..5b7b24666e2 100644
--- a/src/server/game/Server/WorldSocketMgr.cpp
+++ b/src/server/game/Server/WorldSocketMgr.cpp
@@ -155,7 +155,7 @@ class ReactorRunnable : protected ACE_Task_Base
virtual int svc()
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Network Thread Starting");
+ TC_LOG_DEBUG("misc", "Network Thread Starting");
ACE_ASSERT (m_Reactor);
@@ -192,7 +192,7 @@ class ReactorRunnable : protected ACE_Task_Base
}
}
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Network Thread exits");
+ TC_LOG_DEBUG("misc", "Network Thread exits");
return 0;
}
@@ -217,9 +217,7 @@ WorldSocketMgr::WorldSocketMgr() :
m_SockOutKBuff(-1),
m_SockOutUBuff(65536),
m_UseNoDelay(true),
- m_Acceptor (0)
-{
-}
+ m_Acceptor (0) { }
WorldSocketMgr::~WorldSocketMgr()
{
@@ -236,7 +234,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
if (num_threads <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Network.Threads is wrong in your config file");
+ TC_LOG_ERROR("misc", "Network.Threads is wrong in your config file");
return -1;
}
@@ -244,7 +242,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
m_NetThreads = new ReactorRunnable[m_NetThreadsCount];
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Max allowed socket connections %d", ACE::max_handles());
+ TC_LOG_DEBUG("misc", "Max allowed socket connections %d", ACE::max_handles());
// -1 means use default
m_SockOutKBuff = sConfigMgr->GetIntDefault ("Network.OutKBuff", -1);
@@ -253,7 +251,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
if (m_SockOutUBuff <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Network.OutUBuff is wrong in your config file");
+ TC_LOG_ERROR("misc", "Network.OutUBuff is wrong in your config file");
return -1;
}
@@ -263,7 +261,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
if (m_Acceptor->open(listen_addr, m_NetThreads[0].GetReactor(), ACE_NONBLOCK) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Failed to open acceptor, check if the port is free");
+ TC_LOG_ERROR("misc", "Failed to open acceptor, check if the port is free");
return -1;
}
@@ -276,7 +274,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
int
WorldSocketMgr::StartNetwork (ACE_UINT16 port, const char* address)
{
- if (!sLog->ShouldLog(LOG_FILTER_GENERAL, LOG_LEVEL_DEBUG))
+ if (!sLog->ShouldLog("misc", LOG_LEVEL_DEBUG))
ACE_Log_Msg::instance()->priority_mask (LM_ERROR, ACE_Log_Msg::PROCESS);
if (StartReactiveIO(port, address) == -1)
@@ -327,7 +325,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
(void*) & m_SockOutKBuff,
sizeof (int)) == -1 && errno != ENOTSUP)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
+ TC_LOG_ERROR("misc", "WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
return -1;
}
}
@@ -342,7 +340,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
(void*)&ndoption,
sizeof (int)) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
+ TC_LOG_ERROR("misc", "WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
return -1;
}
}
diff --git a/src/server/game/Skills/SkillDiscovery.cpp b/src/server/game/Skills/SkillDiscovery.cpp
index 27e7f66fd1a..d911a20081a 100644
--- a/src/server/game/Skills/SkillDiscovery.cpp
+++ b/src/server/game/Skills/SkillDiscovery.cpp
@@ -33,10 +33,10 @@ struct SkillDiscoveryEntry
float chance; // chance
SkillDiscoveryEntry()
- : spellId(0), reqSkillValue(0), chance(0) {}
+ : spellId(0), reqSkillValue(0), chance(0) { }
SkillDiscoveryEntry(uint32 _spellId, uint32 req_skill_val, float _chance)
- : spellId(_spellId), reqSkillValue(req_skill_val), chance(_chance) {}
+ : spellId(_spellId), reqSkillValue(req_skill_val), chance(_chance) { }
};
typedef std::list<SkillDiscoveryEntry> SkillDiscoveryList;
@@ -55,7 +55,7 @@ void LoadSkillDiscoveryTable()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
return;
}
@@ -88,7 +88,7 @@ void LoadSkillDiscoveryTable()
{
if (reportedReqSpells.find(absReqSkillOrSpell) == reportedReqSpells.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (ID: %u) have not existed spell (ID: %i) in `reqSpell` field in `skill_discovery_template` table", spellId, reqSkillOrSpell);
+ TC_LOG_ERROR("sql.sql", "Spell (ID: %u) have not existed spell (ID: %i) in `reqSpell` field in `skill_discovery_template` table", spellId, reqSkillOrSpell);
reportedReqSpells.insert(absReqSkillOrSpell);
}
continue;
@@ -101,7 +101,7 @@ void LoadSkillDiscoveryTable()
{
if (reportedReqSpells.find(absReqSkillOrSpell) == reportedReqSpells.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc"
+ TC_LOG_ERROR("sql.sql", "Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc"
" and not 100%% chance random discovery ability but listed for spellId %u (and maybe more) in `skill_discovery_template` table",
absReqSkillOrSpell, spellId);
reportedReqSpells.insert(absReqSkillOrSpell);
@@ -117,7 +117,7 @@ void LoadSkillDiscoveryTable()
if (bounds.first == bounds.second)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (ID: %u) not listed in `SkillLineAbility.dbc` but listed with `reqSpell`=0 in `skill_discovery_template` table", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell (ID: %u) not listed in `SkillLineAbility.dbc` but listed with `reqSpell`=0 in `skill_discovery_template` table", spellId);
continue;
}
@@ -126,7 +126,7 @@ void LoadSkillDiscoveryTable()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (ID: %u) have negative value in `reqSpell` field in `skill_discovery_template` table", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell (ID: %u) have negative value in `reqSpell` field in `skill_discovery_template` table", spellId);
continue;
}
@@ -135,7 +135,7 @@ void LoadSkillDiscoveryTable()
while (result->NextRow());
if (!ssNonDiscoverableEntries.str().empty())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s", ssNonDiscoverableEntries.str().c_str());
+ TC_LOG_ERROR("sql.sql", "Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s", ssNonDiscoverableEntries.str().c_str());
// report about empty data for explicit discovery spells
for (uint32 spell_id = 1; spell_id < sSpellMgr->GetSpellInfoStoreSize(); ++spell_id)
@@ -149,10 +149,10 @@ void LoadSkillDiscoveryTable()
continue;
if (SkillDiscoveryStore.find(int32(spell_id)) == SkillDiscoveryStore.end())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table", spell_id);
+ TC_LOG_ERROR("sql.sql", "Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table", spell_id);
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp
index 66ad6fc190a..fec0c1c7c88 100644
--- a/src/server/game/Skills/SkillExtraItems.cpp
+++ b/src/server/game/Skills/SkillExtraItems.cpp
@@ -37,10 +37,10 @@ struct SkillExtraItemEntry
uint8 additionalMaxNum;
SkillExtraItemEntry()
- : requiredSpecialization(0), additionalCreateChance(0.0f), additionalMaxNum(0) {}
+ : requiredSpecialization(0), additionalCreateChance(0.0f), additionalMaxNum(0) { }
SkillExtraItemEntry(uint32 rS, float aCC, uint8 aMN)
- : requiredSpecialization(rS), additionalCreateChance(aCC), additionalMaxNum(aMN) {}
+ : requiredSpecialization(rS), additionalCreateChance(aCC), additionalMaxNum(aMN) { }
};
// map to store the extra item creation info, the key is the spellId of the creation spell, the mapped value is the assigned SkillExtraItemEntry
@@ -60,7 +60,7 @@ void LoadSkillExtraItemTable()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
return;
}
@@ -74,28 +74,28 @@ void LoadSkillExtraItemTable()
if (!sSpellMgr->GetSpellInfo(spellId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Skill specialization %u has non-existent spell id in `skill_extra_item_template`!", spellId);
+ TC_LOG_ERROR("sql.sql", "Skill specialization %u has non-existent spell id in `skill_extra_item_template`!", spellId);
continue;
}
uint32 requiredSpecialization = fields[1].GetUInt32();
if (!sSpellMgr->GetSpellInfo(requiredSpecialization))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Skill specialization %u have not existed required specialization spell id %u in `skill_extra_item_template`!", spellId, requiredSpecialization);
+ TC_LOG_ERROR("sql.sql", "Skill specialization %u have not existed required specialization spell id %u in `skill_extra_item_template`!", spellId, requiredSpecialization);
continue;
}
float additionalCreateChance = fields[2].GetFloat();
if (additionalCreateChance <= 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId);
+ TC_LOG_ERROR("sql.sql", "Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId);
continue;
}
uint8 additionalMaxNum = fields[3].GetUInt8();
if (!additionalMaxNum)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId);
+ TC_LOG_ERROR("sql.sql", "Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId);
continue;
}
@@ -109,7 +109,7 @@ void LoadSkillExtraItemTable()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
bool CanCreateExtraItems(Player* player, uint32 spellId, float &additionalChance, uint8 &additionalMax)
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 630d2f28376..2a6d53089b9 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -350,7 +350,7 @@ 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::HandleAuraOpenStable, //292 SPELL_AURA_OPEN_STABLE
- &AuraEffect::HandleAuraOverrideSpells, //293 auras which probably add set of abilities to their target based on it's miscvalue
+ &AuraEffect::HandleAuraOverrideSpells, //293 SPELL_AURA_OVERRIDE_SPELLS 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::HandleUnused, //295 0 spells in 3.3.5
&AuraEffect::HandleAuraSetVehicle, //296 SPELL_AURA_SET_VEHICLE_ID sets vehicle on target
@@ -802,7 +802,7 @@ void AuraEffect::UpdatePeriodic(Unit* caster)
if (aurEff->GetAuraType() != SPELL_AURA_MOD_POWER_REGEN)
{
m_isPeriodic = false;
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
+ TC_LOG_ERROR("spells", "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
}
else
{
@@ -1633,7 +1633,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
case FORM_SPIRITOFREDEMPTION: // 0x20
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
+ TC_LOG_ERROR("spells", "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
}
modelid = target->GetModelForForm(form);
@@ -1993,7 +1993,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode,
if (!ci)
{
target->SetDisplayId(16358); // pig pink ^_^
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId());
+ TC_LOG_ERROR("spells", "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId());
}
else
{
@@ -3564,7 +3564,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo
if (GetMiscValue() < -2 || GetMiscValue() > 4)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
+ TC_LOG_ERROR("spells", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
return;
}
@@ -3590,7 +3590,7 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode,
if (GetMiscValue() < -1 || GetMiscValue() > 4)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
+ TC_LOG_ERROR("spells", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
return;
}
@@ -3688,7 +3688,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8
if (GetMiscValue() < -1 || GetMiscValue() > 4)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
+ TC_LOG_ERROR("spells", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
return;
}
@@ -3726,7 +3726,7 @@ void AuraEffect::HandleAuraModResistenceOfStatPercent(AuraApplication const* aur
{
// support required adding replace UpdateArmor by loop by UpdateResistence at intellect update
// and include in UpdateResistence same code as in UpdateArmor for aura mod apply.
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
+ TC_LOG_ERROR("spells", "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
return;
}
@@ -5739,7 +5739,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
if (Unit* triggerCaster = triggeredSpellInfo->NeedsToBeTriggeredByCaster(m_spellInfo) ? caster : target)
{
triggerCaster->CastSpell(target, triggeredSpellInfo, true, NULL, this);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
+ TC_LOG_DEBUG("spells", "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
}
}
else
@@ -5747,7 +5747,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
Creature* c = target->ToCreature();
if (!c || !caster || !sScriptMgr->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), target->ToCreature()) ||
!c->AI()->sOnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex())))
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
}
}
@@ -5760,11 +5760,11 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
{
int32 basepoints = GetAmount();
triggerCaster->CastCustomSpell(target, triggerSpellId, &basepoints, &basepoints, &basepoints, true, 0, this);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
+ TC_LOG_DEBUG("spells", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
}
}
else
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS,"AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
+ TC_LOG_DEBUG("spells","AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
}
void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
@@ -5887,7 +5887,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, GetSpellInfo());
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
+ TC_LOG_INFO("spells", "PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(), absorb);
caster->DealDamageMods(target, damage, &absorb);
@@ -5957,7 +5957,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
if (target->GetHealth() < damage)
damage = uint32(target->GetHealth());
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
+ TC_LOG_INFO("spells", "PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(), absorb);
caster->SendSpellNonMeleeDamageLog(target, GetId(), damage, GetSpellInfo()->GetSchoolMask(), absorb, resist, false, 0, crit);
@@ -6003,7 +6003,7 @@ void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster)
return;
caster->ModifyHealth(-(int32)damage);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: donator %u target %u damage %u.", caster->GetEntry(), target->GetEntry(), damage);
+ TC_LOG_DEBUG("spells", "PeriodicTick: donator %u target %u damage %u.", caster->GetEntry(), target->GetEntry(), damage);
float gainMultiplier = GetSpellInfo()->Effects[GetEffIndex()].CalcValueMultiplier(caster);
@@ -6089,7 +6089,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
if (crit)
damage = caster->SpellCriticalHealingBonus(m_spellInfo, damage, target);
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u",
+ TC_LOG_INFO("spells", "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId());
uint32 absorb = 0;
@@ -6158,7 +6158,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
drainAmount = maxmana;
}
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",
+ TC_LOG_INFO("spells", "PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), drainAmount, GetId());
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
@@ -6219,7 +6219,7 @@ void AuraEffect::HandleObsModPowerAuraTick(Unit* target, Unit* caster) const
// ignore negative values (can be result apply spellmods to aura damage
uint32 amount = std::max(m_amount, 0) * target->GetMaxPower(powerType) /100;
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
+ TC_LOG_INFO("spells", "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), amount, GetId());
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
@@ -6254,7 +6254,7 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
target->SendPeriodicAuraLog(&pInfo);
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
+ TC_LOG_INFO("spells", "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), amount, GetId());
int32 gain = target->ModifyPower(powerType, amount);
@@ -6317,11 +6317,11 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
uint32 triggerSpellId = GetSpellInfo()->Effects[GetEffIndex()].TriggerSpell;
if (SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggerSpellId))
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, NULL, this);
}
else
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS,"AuraEffect::HandleProcTriggerSpellAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
+ TC_LOG_DEBUG("spells","AuraEffect::HandleProcTriggerSpellAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
}
void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
@@ -6333,11 +6333,11 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
if (SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggerSpellId))
{
int32 basepoints0 = GetAmount();
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, NULL, NULL, true, NULL, this);
}
else
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS,"AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
+ TC_LOG_DEBUG("spells","AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
}
void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
@@ -6350,7 +6350,7 @@ void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEv
target->CalculateSpellDamageTaken(&damageInfo, damage, GetSpellInfo());
target->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
target->SendSpellNonMeleeDamageLog(&damageInfo);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerDamageAuraProc: Triggering %u spell damage from aura %u proc", damage, GetId());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandleProcTriggerDamageAuraProc: Triggering %u spell damage from aura %u proc", damage, GetId());
target->DealSpellDamage(&damageInfo, true);
}
@@ -6372,7 +6372,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
triggerSpellId = 43594;
break;
default:
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeAuraProc: received not handled spell: %u", GetId());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandleRaidProcFromChargeAuraProc: received not handled spell: %u", GetId());
return;
}
@@ -6398,7 +6398,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
}
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
target->CastSpell(target, triggerSpellId, true, NULL, this, GetCasterGUID());
}
@@ -6410,7 +6410,7 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
// Currently only Prayer of Mending
if (!(GetSpellInfo()->SpellFamilyName == SPELLFAMILY_PRIEST && GetSpellInfo()->SpellFamilyFlags[1] & 0x20))
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: received not handled spell: %u", GetId());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: received not handled spell: %u", GetId());
return;
}
uint32 triggerSpellId = 33110;
@@ -6439,6 +6439,6 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
}
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
+ TC_LOG_DEBUG("spells", "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
target->CastCustomSpell(target, triggerSpellId, &value, NULL, NULL, true, NULL, this, GetCasterGUID());
}
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index 7cfb1e04850..ddd6c1127e1 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -317,11 +317,11 @@ namespace Trinity
// Wards
if ((spellProtoA->SpellFamilyName == SPELLFAMILY_MAGE) ||
(spellProtoA->SpellFamilyName == SPELLFAMILY_WARLOCK))
- if (spellProtoA->Category == 56)
+ if (spellProtoA->GetCategory() == 56)
return true;
if ((spellProtoB->SpellFamilyName == SPELLFAMILY_MAGE) ||
(spellProtoB->SpellFamilyName == SPELLFAMILY_WARLOCK))
- if (spellProtoB->Category == 56)
+ if (spellProtoB->GetCategory() == 56)
return false;
// Sacred Shield
@@ -343,9 +343,9 @@ namespace Trinity
return false;
// Ice Barrier
- if (spellProtoA->Category == 471)
+ if (spellProtoA->GetCategory() == 471)
return true;
- if (spellProtoB->Category == 471)
+ if (spellProtoB->GetCategory() == 471)
return false;
// Sacrifice
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index d7b8003f19a..efacdd151db 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -73,10 +73,10 @@ _flags(AFLAG_NONE), _effectsToApply(effMask), _needClientUpdate(false)
_slot = slot;
GetTarget()->SetVisibleAura(slot, this);
SetNeedClientUpdate();
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
+ TC_LOG_DEBUG("spells", "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
}
else
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
+ TC_LOG_DEBUG("spells", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
}
_InitFlags(caster, effMask);
@@ -155,7 +155,7 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
ASSERT(aurEff);
ASSERT(HasEffect(effIndex) == (!apply));
ASSERT((1<<effIndex) & _effectsToApply);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
+ TC_LOG_DEBUG("spells", "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
if (apply)
{
@@ -413,7 +413,7 @@ void Aura::_ApplyForTarget(Unit* target, Unit* caster, AuraApplication * auraApp
// set infinity cooldown state for spells
if (caster && caster->GetTypeId() == TYPEID_PLAYER)
{
- if (m_spellInfo->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (m_spellInfo->IsCooldownStartedOnEvent())
{
Item* castItem = m_castItemGuid ? caster->ToPlayer()->GetItemByGuid(m_castItemGuid) : NULL;
caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellInfo, castItem ? castItem->GetEntry() : 0, NULL, true);
@@ -432,7 +432,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * auraA
/// @todo Figure out why this happens
if (itr == m_applications.end())
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!",
+ TC_LOG_ERROR("spells", "Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!",
target->GetGUIDLow(), caster ? caster->GetGUIDLow() : 0, auraApp->GetBase()->GetSpellInfo()->Id);
ASSERT(false);
}
@@ -446,7 +446,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication * auraA
// reset cooldown state for spells
if (caster && caster->GetTypeId() == TYPEID_PLAYER)
{
- if (GetSpellInfo()->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
+ if (GetSpellInfo()->IsCooldownStartedOnEvent())
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
caster->ToPlayer()->SendCooldownEvent(GetSpellInfo());
}
@@ -574,7 +574,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
if (!GetOwner()->IsSelfOrInSameMap(itr->first))
{
/// @todo There is a crash caused by shadowfiend load addon
- TC_LOG_FATAL(LOG_FILTER_SPELLS_AURAS, "Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
+ TC_LOG_FATAL("spells", "Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
GetOwner()->GetName().c_str(), GetOwner()->IsInWorld() ? GetOwner()->GetMap()->GetId() : uint32(-1),
itr->first->GetName().c_str(), itr->first->IsInWorld() ? itr->first->GetMap()->GetId() : uint32(-1));
ASSERT(false);
@@ -1225,7 +1225,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
case 31571: spellId = 57529; break;
case 31572: spellId = 57531; break;
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
+ TC_LOG_ERROR("spells", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
}
if (spellId)
caster->CastSpell(caster, spellId, true);
@@ -1279,7 +1279,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
break;
case SPELLFAMILY_ROGUE:
// Sprint (skip non player casted spells by category)
- if (GetSpellInfo()->SpellFamilyFlags[0] & 0x40 && GetSpellInfo()->Category == 44)
+ if (GetSpellInfo()->SpellFamilyFlags[0] & 0x40 && GetSpellInfo()->GetCategory() == 44)
// in official maybe there is only one icon?
if (target->HasAura(58039)) // Glyph of Blurred Speed
target->CastSpell(target, 61922, true); // Sprint (waterwalk)
@@ -1321,7 +1321,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
case 49631: spellId = 50509; break;
case 49032: spellId = 50508; break;
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
+ TC_LOG_ERROR("spells", "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
}
caster->CastSpell(target, spellId, true, 0, GetEffect(0));
}
@@ -1428,7 +1428,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
case 53759: spellId = 60947; break;
case 53754: spellId = 60946; break;
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
+ TC_LOG_ERROR("spells", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
}
if (spellId)
caster->CastSpell(target, spellId, true);
@@ -1969,7 +1969,7 @@ void Aura::LoadScripts()
m_loadedScripts.erase(bitr);
continue;
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
+ TC_LOG_DEBUG("spells", "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
(*itr)->Register();
++itr;
}
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index aa629b46e28..c6ac5c21d55 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -99,9 +99,7 @@ SpellCastTargets::SpellCastTargets() : m_elevation(0), m_speed(0), m_strTarget()
m_targetMask = 0;
}
-SpellCastTargets::~SpellCastTargets()
-{
-}
+SpellCastTargets::~SpellCastTargets() { }
void SpellCastTargets::Read(ByteBuffer& data, Unit* caster)
{
@@ -459,23 +457,23 @@ void SpellCastTargets::Update(Unit* caster)
void SpellCastTargets::OutDebug() const
{
if (!m_targetMask)
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "No targets");
+ TC_LOG_INFO("spells", "No targets");
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "target mask: %u", m_targetMask);
+ TC_LOG_INFO("spells", "target mask: %u", m_targetMask);
if (m_targetMask & (TARGET_FLAG_UNIT_MASK | TARGET_FLAG_CORPSE_MASK | TARGET_FLAG_GAMEOBJECT_MASK))
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Object target: " UI64FMTD, m_objectTargetGUID);
+ TC_LOG_INFO("spells", "Object target: " UI64FMTD, m_objectTargetGUID);
if (m_targetMask & TARGET_FLAG_ITEM)
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Item target: " UI64FMTD, m_itemTargetGUID);
+ TC_LOG_INFO("spells", "Item target: " UI64FMTD, m_itemTargetGUID);
if (m_targetMask & TARGET_FLAG_TRADE_ITEM)
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Trade item target: " UI64FMTD, m_itemTargetGUID);
+ TC_LOG_INFO("spells", "Trade item target: " UI64FMTD, m_itemTargetGUID);
if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION)
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Source location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_src._transportGUID, m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str());
+ TC_LOG_INFO("spells", "Source location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_src._transportGUID, m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str());
if (m_targetMask & TARGET_FLAG_DEST_LOCATION)
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Destination location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dst._transportGUID, m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str());
+ TC_LOG_INFO("spells", "Destination location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dst._transportGUID, m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str());
if (m_targetMask & TARGET_FLAG_STRING)
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "String: %s", m_strTarget.c_str());
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "speed: %f", m_speed);
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "elevation: %f", m_elevation);
+ TC_LOG_INFO("spells", "String: %s", m_strTarget.c_str());
+ TC_LOG_INFO("spells", "speed: %f", m_speed);
+ TC_LOG_INFO("spells", "elevation: %f", m_elevation);
}
SpellValue::SpellValue(SpellInfo const* proto)
@@ -604,7 +602,7 @@ Spell::~Spell()
{
// Clean the reference to avoid later crash.
// If this error is repeating, we may have to add an ASSERT to better track down how we get into this case.
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
+ TC_LOG_ERROR("spells", "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
*m_selfContainer = NULL;
}
@@ -898,7 +896,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
}
break;
case TARGET_SELECT_CATEGORY_NYI:
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, effIndex, targetType.GetTarget());
+ TC_LOG_DEBUG("spells", "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, effIndex, targetType.GetTarget());
break;
default:
ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target category");
@@ -917,7 +915,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
Spell* channeledSpell = m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
if (!channeledSpell)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitChannelTargets: cannot find channel spell for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ TC_LOG_DEBUG("spells", "Spell::SelectImplicitChannelTargets: cannot find channel spell for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
return;
}
switch (targetType.GetTarget())
@@ -930,7 +928,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
if (target && target->ToUnit())
AddUnitTarget(target->ToUnit(), 1 << effIndex);
else
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ TC_LOG_DEBUG("spells", "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
break;
}
case TARGET_DEST_CHANNEL_TARGET:
@@ -943,7 +941,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
m_targets.SetDst(*target);
}
else
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SPELL: cannot find channel spell destination for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ TC_LOG_DEBUG("spells", "SPELL: cannot find channel spell destination for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
break;
case TARGET_DEST_CHANNEL_CASTER:
m_targets.SetDst(*channeledSpell->GetCaster());
@@ -988,7 +986,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
// handle emergency case - try to use other provided targets if no conditions provided
if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && (!condList || condList->empty()))
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
+ TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
switch (targetType.GetObjectType())
{
case TARGET_OBJECT_TYPE_GOBJ:
@@ -1015,7 +1013,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
WorldObject* target = SearchNearbyTarget(range, targetType.GetObjectType(), targetType.GetCheckType(), condList);
if (!target)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
+ TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
return;
}
@@ -1402,7 +1400,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
+ TC_LOG_DEBUG("spells", "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
WorldObject* target = m_targets.GetObjectTarget();
m_targets.SetDst(target ? *target : *m_caster);
}
@@ -1660,7 +1658,7 @@ void Spell::SelectImplicitTrajTargets()
float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d);
if (a > -0.0001f)
a = 0;
- DEBUG_TRAJ(TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: a %f b %f", a, b);)
+ DEBUG_TRAJ(TC_LOG_ERROR("spells", "Spell::SelectTrajTargets: a %f b %f", a, b);)
float bestDist = m_spellInfo->GetMaxRange(false);
@@ -1676,11 +1674,11 @@ void Spell::SelectImplicitTrajTargets()
const float objDist2d = m_targets.GetSrcPos()->GetExactDist2d(*itr) * std::cos(m_targets.GetSrcPos()->GetRelativeAngle(*itr));
const float dz = (*itr)->GetPositionZ() - m_targets.GetSrcPos()->m_positionZ;
- DEBUG_TRAJ(TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);)
+ DEBUG_TRAJ(TC_LOG_ERROR("spells", "Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);)
float dist = objDist2d - size;
float height = dist * (a * dist + b);
- DEBUG_TRAJ(TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)
+ DEBUG_TRAJ(TC_LOG_ERROR("spells", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)
if (dist < bestDist && height < dz + size && height > dz - size)
{
bestDist = dist > 0 ? dist : 0;
@@ -1688,7 +1686,7 @@ void Spell::SelectImplicitTrajTargets()
}
#define CHECK_DIST {\
- DEBUG_TRAJ(TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
+ DEBUG_TRAJ(TC_LOG_ERROR("spells", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
if (dist > bestDist)\
continue;\
if (dist < objDist2d + size && dist > objDist2d - size)\
@@ -1750,7 +1748,7 @@ void Spell::SelectImplicitTrajTargets()
float distSq = (*itr)->GetExactDistSq(x, y, z);
float sizeSq = (*itr)->GetObjectSize();
sizeSq *= sizeSq;
- DEBUG_TRAJ(TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
+ DEBUG_TRAJ(TC_LOG_ERROR("spells", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
if (distSq > sizeSq)
{
float factor = 1 - sqrt(sizeSq / distSq);
@@ -1759,7 +1757,7 @@ void Spell::SelectImplicitTrajTargets()
z += factor * ((*itr)->GetPositionZ() - z);
distSq = (*itr)->GetExactDistSq(x, y, z);
- DEBUG_TRAJ(TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
+ DEBUG_TRAJ(TC_LOG_ERROR("spells", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
}
}
@@ -2819,7 +2817,7 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
if (CanExecuteTriggersOnHit(effMask, i->triggeredByAura) && roll_chance_i(i->chance))
{
m_caster->CastSpell(unit, i->triggeredSpell, true);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->triggeredSpell->Id);
+ TC_LOG_DEBUG("spells", "Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->triggeredSpell->Id);
// SPELL_AURA_ADD_TARGET_TRIGGER auras shouldn't trigger auras without duration
// set duration of current aura to the triggered spell
@@ -3069,7 +3067,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
// set timer base at cast time
ReSetTimer();
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::prepare: spell id %u source %u caster %d customCastFlags %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
+ TC_LOG_DEBUG("spells", "Spell::prepare: spell id %u source %u caster %d customCastFlags %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
//Containers for channeled spells have to be set
/// @todoApply this to all casted spells if needed
@@ -3552,7 +3550,7 @@ void Spell::SendSpellCooldown()
return;
// mana/health/etc potions, disabled by client (until combat out as declarate)
- if (m_CastItem && m_CastItem->IsPotion())
+ if (m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent()))
{
// need in some way provided data for Spell::finish SendCooldownEvent
_player->SetLastPotionId(m_CastItem->GetEntry());
@@ -3560,7 +3558,7 @@ void Spell::SendSpellCooldown()
}
// have infinity cooldown but set at aura apply // do not set cooldown for triggered spells (needed by reincarnation)
- if (m_spellInfo->Attributes & (SPELL_ATTR0_DISABLED_WHILE_ACTIVE | SPELL_ATTR0_PASSIVE) || (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD))
+ if (m_spellInfo->IsCooldownStartedOnEvent() || m_spellInfo->IsPassive() || (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD))
return;
_player->AddSpellAndCategoryCooldowns(m_spellInfo, m_CastItem ? m_CastItem->GetEntry() : 0, this);
@@ -3573,7 +3571,7 @@ void Spell::update(uint32 difftime)
if (m_targets.GetUnitTargetGUID() && !m_targets.GetUnitTarget())
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell %u is cancelled due to removal of target.", m_spellInfo->Id);
+ TC_LOG_DEBUG("spells", "Spell %u is cancelled due to removal of target.", m_spellInfo->Id);
cancel();
return;
}
@@ -3612,7 +3610,7 @@ void Spell::update(uint32 difftime)
// check if there are alive targets left
if (!UpdateChanneledTargetList())
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id);
+ TC_LOG_DEBUG("spells", "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id);
SendChannelUpdate(0);
finish();
}
@@ -3676,7 +3674,7 @@ void Spell::finish(bool ok)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell);
if (spellInfo && spellInfo->SpellIconID == 2056)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id);
+ TC_LOG_DEBUG("spells", "Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id);
m_caster->setDeathState(JUST_DIED);
return;
}
@@ -3878,7 +3876,7 @@ void Spell::SendSpellStart()
if (!IsNeedSendToClient())
return;
- //TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
+ //TC_LOG_DEBUG("spells", "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
uint32 castFlags = CAST_FLAG_UNKNOWN_2;
@@ -3930,7 +3928,7 @@ void Spell::SendSpellGo()
if (!IsNeedSendToClient())
return;
- //TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
+ //TC_LOG_DEBUG("spells", "Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
uint32 castFlags = CAST_FLAG_UNKNOWN_9;
@@ -4355,7 +4353,7 @@ void Spell::TakeCastItem()
{
// This code is to avoid a crash
// I'm not sure, if this is really an error, but I guess every item needs a prototype
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Cast item has no item prototype highId=%d, lowId=%d", m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow());
+ TC_LOG_ERROR("spells", "Cast item has no item prototype highId=%d, lowId=%d", m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow());
return;
}
@@ -4452,7 +4450,7 @@ void Spell::TakePower()
if (powerType >= MAX_POWERS)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::TakePower: Unknown power type '%d'", powerType);
+ TC_LOG_ERROR("spells", "Spell::TakePower: Unknown power type '%d'", powerType);
return;
}
@@ -4701,7 +4699,7 @@ void Spell::HandleThreatSpells()
target->AddThreat(m_caster, threat, m_spellInfo->GetSchoolMask(), m_spellInfo);
}
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell %u, added an additional %f threat for %s %u target(s)", m_spellInfo->Id, threat, m_spellInfo->_IsPositiveSpell() ? "assisting" : "harming", uint32(m_UniqueTargetInfo.size()));
+ TC_LOG_DEBUG("spells", "Spell %u, added an additional %f threat for %s %u target(s)", m_spellInfo->Id, threat, m_spellInfo->_IsPositiveSpell() ? "assisting" : "harming", uint32(m_UniqueTargetInfo.size()));
}
void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOTarget, uint32 i, SpellEffectHandleMode mode)
@@ -4714,7 +4712,7 @@ void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOT
uint8 eff = m_spellInfo->Effects[i].Effect;
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell: %u Effect : %u", m_spellInfo->Id, eff);
+ TC_LOG_DEBUG("spells", "Spell: %u Effect : %u", m_spellInfo->Id, eff);
// we do not need DamageMultiplier here.
damage = CalculateDamage(i, NULL);
@@ -5839,7 +5837,7 @@ SpellCastResult Spell::CheckPower()
// Check valid power type
if (m_spellInfo->PowerType >= MAX_POWERS)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType);
+ TC_LOG_ERROR("spells", "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType);
return SPELL_FAILED_UNKNOWN;
}
@@ -6380,7 +6378,7 @@ void Spell::Delayed() // only called in DealDamage()
else
m_timer += delaytime;
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
+ TC_LOG_INFO("spells", "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
WorldPacket data(SMSG_SPELL_DELAYED, 8+4);
data.append(m_caster->GetPackGUID());
@@ -6415,7 +6413,7 @@ void Spell::DelayedChannel()
else
m_timer -= delaytime;
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
+ TC_LOG_DEBUG("spells", "Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
for (std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if ((*ihit).missCondition == SPELL_MISS_NONE)
@@ -6596,7 +6594,7 @@ SpellEvent::~SpellEvent()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
+ TC_LOG_ERROR("spells", "~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
(m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUIDLow(), m_Spell->m_spellInfo->Id);
ASSERT(false);
}
@@ -6955,7 +6953,7 @@ void Spell::LoadScripts()
m_loadedScripts.erase(bitr);
continue;
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::LoadScripts: Script `%s` for spell `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
+ TC_LOG_DEBUG("spells", "Spell::LoadScripts: Script `%s` for spell `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
(*itr)->Register();
++itr;
}
@@ -7375,9 +7373,7 @@ bool WorldObjectSpellTargetCheck::operator()(WorldObject* target)
WorldObjectSpellNearbyTargetCheck::WorldObjectSpellNearbyTargetCheck(float range, Unit* caster, SpellInfo const* spellInfo,
SpellTargetCheckTypes selectionType, ConditionList* condList)
- : WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster)
-{
-}
+ : WorldObjectSpellTargetCheck(caster, caster, spellInfo, selectionType, condList), _range(range), _position(caster) { }
bool WorldObjectSpellNearbyTargetCheck::operator()(WorldObject* target)
{
@@ -7392,9 +7388,7 @@ bool WorldObjectSpellNearbyTargetCheck::operator()(WorldObject* target)
WorldObjectSpellAreaTargetCheck::WorldObjectSpellAreaTargetCheck(float range, Position const* position, Unit* caster,
Unit* referer, SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList)
- : WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position)
-{
-}
+ : WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position) { }
bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target)
{
@@ -7405,9 +7399,7 @@ bool WorldObjectSpellAreaTargetCheck::operator()(WorldObject* target)
WorldObjectSpellConeTargetCheck::WorldObjectSpellConeTargetCheck(float coneAngle, float range, Unit* caster,
SpellInfo const* spellInfo, SpellTargetCheckTypes selectionType, ConditionList* condList)
- : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle)
-{
-}
+ : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle) { }
bool WorldObjectSpellConeTargetCheck::operator()(WorldObject* target)
{
@@ -7430,9 +7422,7 @@ bool WorldObjectSpellConeTargetCheck::operator()(WorldObject* target)
}
WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck(float range, Position const* position, Unit* caster, SpellInfo const* spellInfo)
- : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, TARGET_CHECK_DEFAULT, NULL)
-{
-}
+ : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, TARGET_CHECK_DEFAULT, NULL) { }
bool WorldObjectSpellTrajTargetCheck::operator()(WorldObject* target)
{
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 0732c389bfa..868dc3f941c 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -235,7 +235,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
void Spell::EffectNULL(SpellEffIndex /*effIndex*/)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "WORLD: Spell Effect DUMMY");
+ TC_LOG_DEBUG("spells", "WORLD: Spell Effect DUMMY");
}
void Spell::EffectUnused(SpellEffIndex /*effIndex*/)
@@ -369,7 +369,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
case SPELLFAMILY_WARRIOR:
{
// Shield Slam
- if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209)
+ if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->GetCategory() == 1209)
{
uint8 level = m_caster->getLevel();
uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 24.5f), uint32(float(level) * 34.5f));
@@ -767,7 +767,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "EffectDummy of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id, spell_id);
+ TC_LOG_ERROR("spells", "EffectDummy of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id, spell_id);
return;
}
@@ -785,7 +785,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
}
// normal DB scripted effect
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
+ TC_LOG_DEBUG("spells", "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
// Script based implementation. Must be used only for not good for implementation in core spell effects
@@ -910,7 +910,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id);
if (!spellInfo)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTriggerSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
+ TC_LOG_DEBUG("spells", "Spell::EffectTriggerSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
return;
}
@@ -943,7 +943,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
// Remove spell cooldown (not category) if spell triggering spell with cooldown and same category
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime
- && m_spellInfo->Category == spellInfo->Category)
+ && m_spellInfo->GetCategory() == spellInfo->GetCategory())
m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id);
// original caster guid only for GO cast
@@ -962,7 +962,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id);
if (!spellInfo)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTriggerMissileSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
+ TC_LOG_DEBUG("spells", "Spell::EffectTriggerMissileSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
return;
}
@@ -996,7 +996,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
// Remove spell cooldown (not category) if spell triggering spell with cooldown and same category
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime
- && m_spellInfo->Category == spellInfo->Category)
+ && m_spellInfo->GetCategory() == spellInfo->GetCategory())
m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id);
// original caster guid only for GO cast
@@ -1018,7 +1018,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
+ TC_LOG_ERROR("spells", "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
return;
}
@@ -1066,7 +1066,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
+ TC_LOG_ERROR("spells", "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
return;
}
@@ -1136,7 +1136,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
// If not exist data for dest location - return
if (!m_targets.HasDst())
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - does not have destination for spellId %u.", m_spellInfo->Id);
+ TC_LOG_ERROR("spells", "Spell::EffectTeleportUnits - does not have destination for spellId %u.", m_spellInfo->Id);
return;
}
@@ -1148,7 +1148,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
destTarget->GetPosition(x, y, z, orientation);
if (!orientation && m_targets.GetUnitTarget())
orientation = m_targets.GetUnitTarget()->GetOrientation();
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
+ TC_LOG_DEBUG("spells", "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL : 0);
@@ -1156,7 +1156,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster);
else
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
+ TC_LOG_ERROR("spells", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
return;
}
@@ -1292,7 +1292,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
player->removeSpell(spellToUnlearn);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
+ TC_LOG_DEBUG("spells", "Spell: Player %u has unlearned spell %u from NpcGUID: %u", player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
}
void Spell::EffectPowerDrain(SpellEffIndex effIndex)
@@ -1364,7 +1364,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
/// @todo there should be a possibility to pass dest target to event script
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->Effects[effIndex].MiscValue, m_spellInfo->Id);
+ TC_LOG_DEBUG("spells", "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->Effects[effIndex].MiscValue, m_spellInfo->Id);
if (ZoneScript* zoneScript = m_caster->GetZoneScript())
zoneScript->ProcessEvent(target, m_spellInfo->Effects[effIndex].MiscValue);
@@ -1467,7 +1467,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
if (!targetAura)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID());
+ TC_LOG_ERROR("spells", "Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID());
return;
}
@@ -1572,7 +1572,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex)
damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE);
damage = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "HealthLeech :%i", damage);
+ TC_LOG_DEBUG("spells", "HealthLeech :%i", damage);
float healMultiplier = m_spellInfo->Effects[effIndex].CalcValueMultiplier(m_originalCaster, this);
@@ -1937,7 +1937,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
// Players shouldn't be able to loot gameobjects that are currently despawned
if (!gameObjTarget->isSpawned() && !player->IsGameMaster())
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!",
+ TC_LOG_ERROR("spells", "Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!",
player->GetName().c_str(), player->GetGUIDLow(), gameObjTarget->GetEntry(), gameObjTarget->GetGUIDLow());
return;
}
@@ -1976,7 +1976,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
/// @todo possible must be moved to loot release (in different from linked triggering)
if (gameObjTarget->GetGOInfo()->chest.eventId)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId, gameObjTarget->GetDBTableGUIDLow());
+ TC_LOG_DEBUG("spells", "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId, gameObjTarget->GetDBTableGUIDLow());
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
}
@@ -2001,7 +2001,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No Player Caster!");
+ TC_LOG_DEBUG("spells", "WORLD: Open Lock - No Player Caster!");
return;
}
@@ -2057,7 +2057,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No GameObject/Item Target!");
+ TC_LOG_DEBUG("spells", "WORLD: Open Lock - No GameObject/Item Target!");
return;
}
@@ -2236,7 +2236,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[effIndex].MiscValueB);
if (!properties)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
+ TC_LOG_ERROR("spells", "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
return;
}
@@ -2423,7 +2423,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex)
uint32 spellToLearn = (m_spellInfo->Id == 483 || m_spellInfo->Id == 55884) ? damage : m_spellInfo->Effects[effIndex].TriggerSpell;
player->learnSpell(spellToLearn, false);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
+ TC_LOG_DEBUG("spells", "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
}
typedef std::list< std::pair<uint32, uint64> > DispelList;
@@ -2521,7 +2521,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex)
// On success dispel
// Devour Magic
- if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->Category == SPELLCATEGORY_DEVOUR_MAGIC)
+ if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->GetCategory() == SPELLCATEGORY_DEVOUR_MAGIC)
{
int32 heal_amount = m_spellInfo->Effects[EFFECT_1].CalcValue();
m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true);
@@ -2669,7 +2669,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
if (m_CastItem)
{
unitTarget->ToPlayer()->RewardHonor(NULL, 1, damage/10);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(), unitTarget->ToPlayer()->GetGUIDLow());
+ TC_LOG_DEBUG("spells", "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(), unitTarget->ToPlayer()->GetGUIDLow());
return;
}
@@ -2678,13 +2678,13 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
{
uint32 honor_reward = Trinity::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage));
unitTarget->ToPlayer()->RewardHonor(NULL, 1, honor_reward);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow());
+ TC_LOG_DEBUG("spells", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow());
}
else
{
//maybe we have correct honor_gain in damage already
unitTarget->ToPlayer()->RewardHonor(NULL, 1, damage);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow());
+ TC_LOG_DEBUG("spells", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow());
}
}
@@ -2797,7 +2797,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
}
if (!add_socket)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.",
+ TC_LOG_ERROR("spells", "Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.",
m_spellInfo->Id, SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC, ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET);
return;
}
@@ -2862,14 +2862,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
case 10: spell_id = 36758; break; // 14%
case 11: spell_id = 36760; break; // 20%
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
+ TC_LOG_ERROR("spells", "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
return;
}
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
+ TC_LOG_ERROR("spells", "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
return;
}
@@ -2896,14 +2896,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
if (!enchant_id)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex);
+ TC_LOG_ERROR("spells", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex);
return;
}
SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
if (!pEnchant)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
+ TC_LOG_ERROR("spells", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
return;
}
@@ -4023,7 +4023,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
case 31893: spell_heal = 48084; break;
case 31883: spell_heal = 48085; break;
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Unknown Lightwell spell caster %u", m_caster->GetEntry());
+ TC_LOG_ERROR("spells", "Unknown Lightwell spell caster %u", m_caster->GetEntry());
return;
}
@@ -4106,7 +4106,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
case SPELLFAMILY_PALADIN:
{
// Judgement (seal trigger)
- if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT)
+ if (m_spellInfo->GetCategory() == SPELLCATEGORY_JUDGEMENT)
{
if (!unitTarget || !unitTarget->IsAlive())
return;
@@ -4121,7 +4121,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
case 57774: spellId1 = 20185; break; // Judgement of Light
case 53408: spellId1 = 20186; break; // Judgement of Wisdom
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect", m_spellInfo->Id);
+ TC_LOG_ERROR("spells", "Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect", m_spellInfo->Id);
return;
}
// all seals have aura dummy in 2 effect
@@ -4185,7 +4185,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
// normal DB scripted effect
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
+ TC_LOG_DEBUG("spells", "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
}
@@ -4340,8 +4340,8 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
if (!player)
return;
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell Effect: Stuck");
- TC_LOG_INFO(LOG_FILTER_SPELLS_AURAS, "Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", player->GetName().c_str(), player->GetGUIDLow(), player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
+ TC_LOG_DEBUG("spells", "Spell Effect: Stuck");
+ TC_LOG_INFO("spells", "Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", player->GetName().c_str(), player->GetGUIDLow(), player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
if (player->IsInFlight())
return;
@@ -5055,28 +5055,43 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
- Player* player = m_caster->ToPlayer();
- if (!player)
+ if (damage < 0)
return;
- Pet* pet = player->GetPet();
- if (pet && pet->IsAlive())
+ Player* player = m_caster->ToPlayer();
+ if (!player)
return;
- if (damage < 0)
- return;
- float x, y, z;
- player->GetPosition(x, y, z);
- if (!pet)
+ // Maybe player dismissed dead pet or pet despawned?
+ bool hadPet = true;
+ if (!player->GetPet())
{
- player->SummonPet(0, x, y, z, player->GetOrientation(), SUMMON_PET, 0);
- pet = player->GetPet();
+ // Position passed to SummonPet is irrelevant with current implementation,
+ // pet will be relocated without using these coords in Pet::LoadPetFromDB
+ player->SummonPet(0, 0.0f, 0.0f, 0.0f, 0.0f, SUMMON_PET, 0);
+ hadPet = false;
}
+
+ // TODO: Better to fail Hunter's "Revive Pet" at cast instead of here when casting ends
+ Pet* pet = player->GetPet(); // Attempt to get current pet
if (!pet)
return;
- player->GetMap()->CreatureRelocation(pet, x, y, z, player->GetOrientation());
+ // TODO: Better to fail Hunter's "Revive Pet" at cast instead of here when casting ends
+ if (pet->IsAlive())
+ return;
+
+ // If player did have a pet before reviving, teleport it
+ if (hadPet)
+ {
+ // Reposition the pet's corpse before reviving so as not to grab aggro
+ // We can use a different, more accurate version of GetClosePoint() since we have a pet
+ float x, y, z; // Will be used later to reposition the pet if we have one
+ player->GetClosePoint(x, y, z, pet->GetObjectSize(), PET_FOLLOW_DIST, pet->GetFollowAngle());
+ pet->NearTeleportTo(x, y, z, player->GetOrientation());
+ pet->Relocate(x, y, z, player->GetOrientation()); // This is needed so SaveStayPosition() will get the proper coords.
+ }
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
@@ -5084,8 +5099,20 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
pet->ClearUnitState(uint32(UNIT_STATE_ALL_STATE));
pet->SetHealth(pet->CountPctFromMaxHealth(damage));
- //pet->AIM_Initialize();
- //player->PetSpellInitialize();
+ // Reset things for when the AI to takes over
+ CharmInfo *ci = pet->GetCharmInfo();
+ if (ci)
+ {
+ // In case the pet was at stay, we don't want it running back
+ ci->SaveStayPosition();
+ ci->SetIsAtStay(ci->HasCommandState(COMMAND_STAY));
+
+ ci->SetIsFollowing(false);
+ ci->SetIsCommandAttack(false);
+ ci->SetIsCommandFollow(false);
+ ci->SetIsReturning(false);
+ }
+
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
}
@@ -5198,7 +5225,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
if (!goinfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast", name_id, m_spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast", name_id, m_spellInfo->Id);
return;
}
@@ -5286,7 +5313,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "AddObject at SpellEfects.cpp EffectTransmitted");
+ TC_LOG_DEBUG("spells", "AddObject at SpellEfects.cpp EffectTransmitted");
//m_caster->AddGameObject(pGameObj);
//m_ObjToDel.push_back(pGameObj);
@@ -5371,7 +5398,7 @@ void Spell::EffectSkill(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "WORLD: SkillEFFECT");
+ TC_LOG_DEBUG("spells", "WORLD: SkillEFFECT");
}
/* There is currently no need for this effect. We handle it in Battleground.cpp
@@ -5402,7 +5429,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Effect: SkinPlayerCorpse");
+ TC_LOG_DEBUG("spells", "Effect: SkinPlayerCorpse");
Player* player = m_caster->ToPlayer();
Player* target = unitTarget->ToPlayer();
@@ -5417,7 +5444,7 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Effect: StealBeneficialBuff");
+ TC_LOG_DEBUG("spells", "Effect: StealBeneficialBuff");
if (!unitTarget || unitTarget == m_caster) // can't steal from self
return;
@@ -5832,7 +5859,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex)
if (!sSoundEntriesStore.LookupEntry(soundid))
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
+ TC_LOG_ERROR("spells", "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
return;
}
@@ -5885,7 +5912,7 @@ void Spell::EffectPlaySound(SpellEffIndex effIndex)
if (!sSoundEntriesStore.LookupEntry(soundId))
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "EffectPlaySound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
+ TC_LOG_ERROR("spells", "EffectPlaySound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
return;
}
@@ -6013,7 +6040,7 @@ void Spell::EffectBind(SpellEffIndex effIndex)
data << uint32(areaId);
player->SendDirectMessage(&data);
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
+ TC_LOG_DEBUG("spells", "EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
homeLoc.GetPositionX(), homeLoc.GetPositionY(), homeLoc.GetPositionZ(), homeLoc.GetMapId(), areaId);
// zone update
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index a0e1ec065cc..6b54df27596 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -763,7 +763,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] =
SpellInfo::SpellInfo(SpellEntry const* spellEntry)
{
Id = spellEntry->Id;
- Category = spellEntry->Category;
+ CategoryEntry = spellEntry->Category ? sSpellCategoryStore.LookupEntry(spellEntry->Category) : NULL;
Dispel = spellEntry->Dispel;
Mechanic = spellEntry->Mechanic;
Attributes = spellEntry->Attributes;
@@ -859,6 +859,11 @@ SpellInfo::~SpellInfo()
_UnloadImplicitTargetConditionLists();
}
+uint32 SpellInfo::GetCategory() const
+{
+ return CategoryEntry ? CategoryEntry->Id : 0;
+}
+
bool SpellInfo::HasEffect(SpellEffects effect) const
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -1103,6 +1108,11 @@ bool SpellInfo::IsStackableOnOneSlotWithDifferentCasters() const
return StackAmount > 1 && !IsChanneled() && !(AttributesEx3 & SPELL_ATTR3_STACK_FOR_DIFF_CASTERS);
}
+bool SpellInfo::IsCooldownStartedOnEvent() const
+{
+ return Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE || (CategoryEntry && CategoryEntry->Flags & SPELL_CATEGORY_FLAG_COOLDOWN_STARTS_ON_EVENT);
+}
+
bool SpellInfo::IsDeathPersistent() const
{
return AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT;
@@ -1314,7 +1324,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
shapeInfo = sSpellShapeshiftStore.LookupEntry(form);
if (!shapeInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
+ TC_LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
return SPELL_CAST_OK;
}
actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells
@@ -1712,7 +1722,7 @@ SpellCastResult SpellInfo::CheckVehicle(Unit const* caster) const
bool SpellInfo::CheckTargetCreatureType(Unit const* target) const
{
// Curse of Doom & Exorcism: not find another way to fix spell target check :/
- if (SpellFamilyName == SPELLFAMILY_WARLOCK && Category == 1179)
+ if (SpellFamilyName == SPELLFAMILY_WARLOCK && GetCategory() == 1179)
{
// not allow cast at player
if (target->GetTypeId() == TYPEID_PLAYER)
@@ -1816,7 +1826,7 @@ AuraStateType SpellInfo::GetAuraState() const
return AURA_STATE_FAERIE_FIRE;
// Sting (hunter's pet ability)
- if (Category == 1133)
+ if (GetCategory() == 1133)
return AURA_STATE_FAERIE_FIRE;
// Victorious
@@ -2132,7 +2142,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) c
// Else drain all power
if (PowerType < MAX_POWERS)
return caster->GetPower(Powers(PowerType));
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
+ TC_LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
return 0;
}
@@ -2158,10 +2168,10 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) c
break;
case POWER_RUNE:
case POWER_RUNIC_POWER:
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "CalculateManaCost: Not implemented yet!");
+ TC_LOG_DEBUG("spells", "CalculateManaCost: Not implemented yet!");
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id);
+ TC_LOG_ERROR("spells", "CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id);
return 0;
}
}
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index c2ca938d26f..2b1dd6a147a 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -250,7 +250,7 @@ public:
flag96 SpellClassMask;
std::list<Condition*>* ImplicitTargetConditions;
- SpellEffectInfo() {}
+ SpellEffectInfo() { }
SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex);
bool IsEffect() const;
@@ -290,7 +290,7 @@ class SpellInfo
{
public:
uint32 Id;
- uint32 Category;
+ SpellCategoryEntry const* CategoryEntry;
uint32 Dispel;
uint32 Mechanic;
uint32 Attributes;
@@ -368,6 +368,7 @@ public:
SpellInfo(SpellEntry const* spellEntry);
~SpellInfo();
+ uint32 GetCategory() const;
bool HasEffect(SpellEffects effect) const;
bool HasAura(AuraType aura) const;
bool HasAreaAuraEffect() const;
@@ -393,6 +394,7 @@ public:
bool IsPassiveStackableWithRanks() const;
bool IsMultiSlotAura() const;
bool IsStackableOnOneSlotWithDifferentCasters() const;
+ bool IsCooldownStartedOnEvent() const;
bool IsDeathPersistent() const;
bool IsRequiringDeadTarget() const;
bool IsAllowingDeadTarget() const;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 52ffb2ff525..994050b2374 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -347,9 +347,7 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group)
}
}
-SpellMgr::SpellMgr()
-{
-}
+SpellMgr::SpellMgr() { }
SpellMgr::~SpellMgr()
{
@@ -387,7 +385,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (player)
ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Craft spell %u not have create item entry.", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "Craft spell %u not have create item entry.", spellInfo->Id);
}
return false;
}
@@ -401,7 +399,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (player)
ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
+ TC_LOG_ERROR("sql.sql", "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
}
return false;
}
@@ -419,7 +417,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (player)
ChatHandler(player->GetSession()).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
+ TC_LOG_ERROR("sql.sql", "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
}
return false;
}
@@ -439,7 +437,7 @@ bool SpellMgr::IsSpellValid(SpellInfo const* spellInfo, Player* player, bool msg
if (player)
ChatHandler(player->GetSession()).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
+ TC_LOG_ERROR("sql.sql", "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
}
return false;
}
@@ -471,7 +469,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
uint32 mode = uint32(caster->GetMap()->GetSpawnMode());
if (mode >= MAX_DIFFICULTY)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
+ TC_LOG_ERROR("spells", "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
return spellId; //return source spell
}
@@ -482,23 +480,23 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
SpellDifficultyEntry const* difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId);
if (!difficultyEntry)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
+ TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
return spellId; //return source spell
}
if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is NULL, using mode %u", spellId, mode, mode - 2);
+ TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is NULL, using mode %u", spellId, mode, mode - 2);
mode -= 2;
}
if (difficultyEntry->SpellID[mode] <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode);
+ TC_LOG_ERROR("sql.sql", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode);
return spellId;
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]);
+ TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]);
return uint32(difficultyEntry->SpellID[mode]);
}
@@ -511,11 +509,11 @@ SpellInfo const* SpellMgr::GetSpellForDifficultyFromSpell(SpellInfo const* spell
SpellInfo const* newSpell = GetSpellInfo(newSpellId);
if (!newSpell)
{
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellForDifficultyFromSpell: spell %u not found. Check spelldifficulty_dbc!", newSpellId);
+ TC_LOG_DEBUG("spells", "SpellMgr::GetSpellForDifficultyFromSpell: spell %u not found. Check spelldifficulty_dbc!", newSpellId);
return spell;
}
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellForDifficultyFromSpell: Spell id for instance mode is %u (original %u)", newSpell->Id, spell->Id);
+ TC_LOG_DEBUG("spells", "SpellMgr::GetSpellForDifficultyFromSpell: Spell id for instance mode is %u (original %u)", newSpell->Id, spell->Id);
return newSpell;
}
@@ -1218,7 +1216,7 @@ void SpellMgr::LoadSpellTalentRanks()
SpellInfo const* firstSpell = GetSpellInfo(talentInfo->RankID[0]);
if (!firstSpell)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "SpellMgr::LoadSpellTalentRanks: First Rank Spell %u for TalentEntry %u does not exist.", talentInfo->RankID[0], i);
+ TC_LOG_ERROR("spells", "SpellMgr::LoadSpellTalentRanks: First Rank Spell %u for TalentEntry %u does not exist.", talentInfo->RankID[0], i);
continue;
}
@@ -1232,7 +1230,7 @@ void SpellMgr::LoadSpellTalentRanks()
SpellInfo const* currentSpell = GetSpellInfo(spellId);
if (!currentSpell)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "SpellMgr::LoadSpellTalentRanks: Spell %u (Rank: %u) for TalentEntry %u does not exist.", spellId, rank + 1, i);
+ TC_LOG_ERROR("spells", "SpellMgr::LoadSpellTalentRanks: Spell %u (Rank: %u) for TalentEntry %u does not exist.", spellId, rank + 1, i);
break;
}
@@ -1264,7 +1262,7 @@ void SpellMgr::LoadSpellRanks()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
return;
}
@@ -1303,13 +1301,13 @@ void SpellMgr::LoadSpellRanks()
SpellInfo const* first = GetSpellInfo(lastSpell);
if (!first)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell);
+ TC_LOG_ERROR("sql.sql", "Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell);
continue;
}
// check if chain is long enough
if (rankChain.size() < 2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell);
+ TC_LOG_ERROR("sql.sql", "There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell);
continue;
}
int32 curRank = 0;
@@ -1320,14 +1318,14 @@ void SpellMgr::LoadSpellRanks()
SpellInfo const* spell = GetSpellInfo(itr->first);
if (!spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell);
+ TC_LOG_ERROR("sql.sql", "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell);
valid = false;
break;
}
++curRank;
if (itr->second != curRank)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank);
+ TC_LOG_ERROR("sql.sql", "Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank);
valid = false;
break;
}
@@ -1343,7 +1341,7 @@ void SpellMgr::LoadSpellRanks()
int32 addedSpell = itr->first;
if (mSpellInfoMap[addedSpell]->ChainEntry)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u (rank: %u, first: %u) listed in `spell_ranks` has already ChainEntry from dbc.", addedSpell, itr->second, lastSpell);
+ TC_LOG_ERROR("sql.sql", "Spell %u (rank: %u, first: %u) listed in `spell_ranks` has already ChainEntry from dbc.", addedSpell, itr->second, lastSpell);
mSpellChains[addedSpell].first = GetSpellInfo(lastSpell);
mSpellChains[addedSpell].last = GetSpellInfo(rankChain.back().first);
@@ -1365,7 +1363,7 @@ void SpellMgr::LoadSpellRanks()
}
while (!finished);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellRequired()
@@ -1380,7 +1378,7 @@ void SpellMgr::LoadSpellRequired()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
return;
}
@@ -1397,26 +1395,26 @@ void SpellMgr::LoadSpellRequired()
SpellInfo const* spell = GetSpellInfo(spell_id);
if (!spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id);
+ TC_LOG_ERROR("sql.sql", "spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id);
continue;
}
SpellInfo const* reqSpell = GetSpellInfo(spell_req);
if (!reqSpell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req);
+ TC_LOG_ERROR("sql.sql", "req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req);
continue;
}
if (spell->IsRankOf(reqSpell))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id);
+ TC_LOG_ERROR("sql.sql", "req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id);
continue;
}
if (IsSpellRequiringSpell(spell_id, spell_req))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id);
+ TC_LOG_ERROR("sql.sql", "duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id);
continue;
}
@@ -1425,7 +1423,7 @@ void SpellMgr::LoadSpellRequired()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
@@ -1463,7 +1461,7 @@ void SpellMgr::LoadSpellLearnSkills()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellLearnSpells()
@@ -1476,7 +1474,7 @@ void SpellMgr::LoadSpellLearnSpells()
QueryResult result = WorldDatabase.Query("SELECT entry, SpellID, Active FROM spell_learn_spell");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty.");
return;
}
@@ -1494,19 +1492,19 @@ void SpellMgr::LoadSpellLearnSpells()
if (!GetSpellInfo(spell_id))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` does not exist", spell_id);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_learn_spell` does not exist", spell_id);
continue;
}
if (!GetSpellInfo(node.spell))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell);
continue;
}
if (GetTalentSpellCost(node.spell))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell);
continue;
}
@@ -1548,7 +1546,7 @@ void SpellMgr::LoadSpellLearnSpells()
{
if (itr->second.spell == dbc_node.spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.",
+ TC_LOG_ERROR("sql.sql", "Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.",
spell, dbc_node.spell);
found = true;
break;
@@ -1564,7 +1562,7 @@ void SpellMgr::LoadSpellLearnSpells()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellTargetPositions()
@@ -1577,7 +1575,7 @@ void SpellMgr::LoadSpellTargetPositions()
QueryResult result = WorldDatabase.Query("SELECT id, effIndex, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM spell_target_position");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
return;
}
@@ -1600,20 +1598,20 @@ void SpellMgr::LoadSpellTargetPositions()
MapEntry const* mapEntry = sMapStore.LookupEntry(st.target_mapId);
if (!mapEntry)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (Id: %u, effIndex: %u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, effIndex, st.target_mapId);
+ TC_LOG_ERROR("sql.sql", "Spell (Id: %u, effIndex: %u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, effIndex, st.target_mapId);
continue;
}
if (st.target_X==0 && st.target_Y==0 && st.target_Z==0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (Id: %u, effIndex: %u) target coordinates not provided.", Spell_ID, effIndex);
+ TC_LOG_ERROR("sql.sql", "Spell (Id: %u, effIndex: %u) target coordinates not provided.", Spell_ID, effIndex);
continue;
}
SpellInfo const* spellInfo = GetSpellInfo(Spell_ID);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (Id: %u) listed in `spell_target_position` does not exist.", Spell_ID);
+ TC_LOG_ERROR("sql.sql", "Spell (Id: %u) listed in `spell_target_position` does not exist.", Spell_ID);
continue;
}
@@ -1625,7 +1623,7 @@ void SpellMgr::LoadSpellTargetPositions()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (Id: %u, effIndex: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID, effIndex);
+ TC_LOG_ERROR("sql.sql", "Spell (Id: %u, effIndex: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID, effIndex);
continue;
}
@@ -1662,11 +1660,11 @@ void SpellMgr::LoadSpellTargetPositions()
if (found)
{
if (!sSpellMgr->GetSpellTargetPosition(i))
- TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) does not have record in `spell_target_position`", i);
+ TC_LOG_DEBUG("spells", "Spell (ID: %u) does not have record in `spell_target_position`", i);
}
}*/
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellGroups()
@@ -1680,7 +1678,7 @@ void SpellMgr::LoadSpellGroups()
QueryResult result = WorldDatabase.Query("SELECT id, spell_id FROM spell_group");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
return;
}
@@ -1693,7 +1691,7 @@ void SpellMgr::LoadSpellGroups()
uint32 group_id = fields[0].GetUInt32();
if (group_id <= SPELL_GROUP_DB_RANGE_MIN && group_id >= SPELL_GROUP_CORE_RANGE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group` is in core range, but is not defined in core!", group_id);
+ TC_LOG_ERROR("sql.sql", "SpellGroup id %u listed in `spell_group` is in core range, but is not defined in core!", group_id);
continue;
}
int32 spell_id = fields[1].GetInt32();
@@ -1709,7 +1707,7 @@ void SpellMgr::LoadSpellGroups()
{
if (groups.find(abs(itr->second)) == groups.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group` does not exist", abs(itr->second));
+ TC_LOG_ERROR("sql.sql", "SpellGroup id %u listed in `spell_group` does not exist", abs(itr->second));
mSpellGroupSpell.erase(itr++);
}
else
@@ -1721,12 +1719,12 @@ void SpellMgr::LoadSpellGroups()
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_group` does not exist", itr->second);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_group` does not exist", itr->second);
mSpellGroupSpell.erase(itr++);
}
else if (spellInfo->GetRank() > 1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_group` is not first rank of spell", itr->second);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_group` is not first rank of spell", itr->second);
mSpellGroupSpell.erase(itr++);
}
else
@@ -1746,7 +1744,7 @@ void SpellMgr::LoadSpellGroups()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellGroupStackRules()
@@ -1759,7 +1757,7 @@ void SpellMgr::LoadSpellGroupStackRules()
QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
return;
}
@@ -1772,7 +1770,7 @@ void SpellMgr::LoadSpellGroupStackRules()
uint8 stack_rule = fields[1].GetInt8();
if (stack_rule >= SPELL_GROUP_STACK_RULE_MAX)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule);
+ TC_LOG_ERROR("sql.sql", "SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule);
continue;
}
@@ -1780,7 +1778,7 @@ void SpellMgr::LoadSpellGroupStackRules()
if (spellGroup.first == spellGroup.second)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id);
+ TC_LOG_ERROR("sql.sql", "SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id);
continue;
}
@@ -1789,7 +1787,7 @@ void SpellMgr::LoadSpellGroupStackRules()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellProcEvents()
@@ -1802,7 +1800,7 @@ void SpellMgr::LoadSpellProcEvents()
QueryResult result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
return;
}
@@ -1824,18 +1822,18 @@ void SpellMgr::LoadSpellProcEvents()
SpellInfo const* spellInfo = GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` does not exist", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` does not exist", spellId);
continue;
}
if (allRanks)
{
if (!spellInfo->IsRanked())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` with all ranks, but spell has no ranks.", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` with all ranks, but spell has no ranks.", spellId);
if (spellInfo->GetFirstRankSpell()->Id != uint32(spellId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` is not first rank of spell.", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` is not first rank of spell.", spellId);
continue;
}
}
@@ -1857,12 +1855,12 @@ void SpellMgr::LoadSpellProcEvents()
{
if (mSpellProcEventMap.find(spellInfo->Id) != mSpellProcEventMap.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` already has its first rank in table.", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` already has its first rank in table.", spellInfo->Id);
break;
}
if (!spellInfo->ProcFlags && !spellProcEvent.procFlags)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc_event` probably not triggered spell", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` probably not triggered spell", spellInfo->Id);
mSpellProcEventMap[spellInfo->Id] = spellProcEvent;
@@ -1876,7 +1874,7 @@ void SpellMgr::LoadSpellProcEvents()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellProcs()
@@ -1889,7 +1887,7 @@ void SpellMgr::LoadSpellProcs()
QueryResult result = WorldDatabase.Query("SELECT spellId, schoolMask, spellFamilyName, spellFamilyMask0, spellFamilyMask1, spellFamilyMask2, typeMask, spellTypeMask, spellPhaseMask, hitMask, attributesMask, ratePerMinute, chance, cooldown, charges FROM spell_proc");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
return;
}
@@ -1910,18 +1908,18 @@ void SpellMgr::LoadSpellProcs()
SpellInfo const* spellInfo = GetSpellInfo(spellId);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` does not exist", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc` does not exist", spellId);
continue;
}
if (allRanks)
{
if (!spellInfo->IsRanked())
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` with all ranks, but spell has no ranks.", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc` with all ranks, but spell has no ranks.", spellId);
if (spellInfo->GetFirstRankSpell()->Id != uint32(spellId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` is not first rank of spell.", spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc` is not first rank of spell.", spellId);
continue;
}
}
@@ -1948,7 +1946,7 @@ void SpellMgr::LoadSpellProcs()
{
if (mSpellProcMap.find(spellInfo->Id) != mSpellProcMap.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` already has its first rank in table.", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc` already has its first rank in table.", spellInfo->Id);
break;
}
@@ -1964,47 +1962,47 @@ void SpellMgr::LoadSpellProcs()
// validate data
if (procEntry.schoolMask & ~SPELL_SCHOOL_MASK_ALL)
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellInfo->Id, procEntry.schoolMask);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellInfo->Id, procEntry.schoolMask);
if (procEntry.spellFamilyName && (procEntry.spellFamilyName < 3 || procEntry.spellFamilyName > 17 || procEntry.spellFamilyName == 14 || procEntry.spellFamilyName == 16))
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellInfo->Id, procEntry.spellFamilyName);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellInfo->Id, procEntry.spellFamilyName);
if (procEntry.chance < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellInfo->Id);
procEntry.chance = 0;
}
if (procEntry.ratePerMinute < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellInfo->Id);
procEntry.ratePerMinute = 0;
}
if (cooldown < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellInfo->Id);
procEntry.cooldown = 0;
}
if (procEntry.chance == 0 && procEntry.ratePerMinute == 0)
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellInfo->Id);
if (procEntry.charges > 99)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellInfo->Id);
procEntry.charges = 99;
}
if (!procEntry.typeMask)
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellInfo->Id);
if (procEntry.spellTypeMask & ~PROC_SPELL_TYPE_MASK_ALL)
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellInfo->Id, procEntry.spellTypeMask);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellInfo->Id, procEntry.spellTypeMask);
if (procEntry.spellTypeMask && !(procEntry.typeMask & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK)))
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id);
if (!procEntry.spellPhaseMask && procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK)
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellInfo->Id);
if (procEntry.spellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL)
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellInfo->Id, procEntry.spellPhaseMask);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellInfo->Id, procEntry.spellPhaseMask);
if (procEntry.spellPhaseMask && !(procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK))
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id);
if (procEntry.hitMask & ~PROC_HIT_MASK_ALL)
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellInfo->Id, procEntry.hitMask);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellInfo->Id, procEntry.hitMask);
if (procEntry.hitMask && !(procEntry.typeMask & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.typeMask & DONE_HIT_PROC_FLAG_MASK && (!procEntry.spellPhaseMask || procEntry.spellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH)))))
- TC_LOG_ERROR(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellInfo->Id);
+ TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellInfo->Id);
mSpellProcMap[spellInfo->Id] = procEntry;
@@ -2017,7 +2015,7 @@ void SpellMgr::LoadSpellProcs()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellBonusess()
@@ -2030,7 +2028,7 @@ void SpellMgr::LoadSpellBonusess()
QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
return;
}
@@ -2043,7 +2041,7 @@ void SpellMgr::LoadSpellBonusess()
SpellInfo const* spell = GetSpellInfo(entry);
if (!spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_bonus_data` does not exist", entry);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_bonus_data` does not exist", entry);
continue;
}
@@ -2056,7 +2054,7 @@ void SpellMgr::LoadSpellBonusess()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellThreats()
@@ -2069,7 +2067,7 @@ void SpellMgr::LoadSpellThreats()
QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
return;
}
@@ -2082,7 +2080,7 @@ void SpellMgr::LoadSpellThreats()
if (!GetSpellInfo(entry))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_threat` does not exist", entry);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_threat` does not exist", entry);
continue;
}
@@ -2095,7 +2093,7 @@ void SpellMgr::LoadSpellThreats()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSkillLineAbilityMap()
@@ -2116,7 +2114,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
++count;
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellPetAuras()
@@ -2129,7 +2127,7 @@ void SpellMgr::LoadSpellPetAuras()
QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
return;
}
@@ -2151,21 +2149,21 @@ void SpellMgr::LoadSpellPetAuras()
SpellInfo const* spellInfo = GetSpellInfo(spell);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_pet_auras` does not exist", spell);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_pet_auras` does not exist", spell);
continue;
}
if (spellInfo->Effects[eff].Effect != SPELL_EFFECT_DUMMY &&
(spellInfo->Effects[eff].Effect != SPELL_EFFECT_APPLY_AURA ||
spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_DUMMY))
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
+ TC_LOG_ERROR("spells", "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
continue;
}
SpellInfo const* spellInfo2 = GetSpellInfo(aura);
if (!spellInfo2)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Aura %u listed in `spell_pet_auras` does not exist", aura);
+ TC_LOG_ERROR("sql.sql", "Aura %u listed in `spell_pet_auras` does not exist", aura);
continue;
}
@@ -2176,7 +2174,7 @@ void SpellMgr::LoadSpellPetAuras()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
// Fill custom data about enchancments
@@ -2216,7 +2214,7 @@ void SpellMgr::LoadEnchantCustomAttr()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellEnchantProcData()
@@ -2229,7 +2227,7 @@ void SpellMgr::LoadSpellEnchantProcData()
QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
return;
}
@@ -2243,7 +2241,7 @@ void SpellMgr::LoadSpellEnchantProcData()
SpellItemEnchantmentEntry const* ench = sSpellItemEnchantmentStore.LookupEntry(enchantId);
if (!ench)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId);
+ TC_LOG_ERROR("sql.sql", "Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId);
continue;
}
@@ -2258,7 +2256,7 @@ void SpellMgr::LoadSpellEnchantProcData()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellLinked()
@@ -2271,7 +2269,7 @@ void SpellMgr::LoadSpellLinked()
QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
return;
}
@@ -2287,13 +2285,13 @@ void SpellMgr::LoadSpellLinked()
SpellInfo const* spellInfo = GetSpellInfo(abs(trigger));
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_linked_spell` does not exist", abs(trigger));
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_linked_spell` does not exist", abs(trigger));
continue;
}
spellInfo = GetSpellInfo(abs(effect));
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_linked_spell` does not exist", abs(effect));
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_linked_spell` does not exist", abs(effect));
continue;
}
@@ -2309,7 +2307,7 @@ void SpellMgr::LoadSpellLinked()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadPetLevelupSpellMap()
@@ -2365,7 +2363,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime));
}
bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells)
@@ -2449,9 +2447,9 @@ void SpellMgr::LoadPetDefaultSpells()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading summonable creature templates...");
+ TC_LOG_INFO("server.loading", "Loading summonable creature templates...");
oldMSTime = getMSTime();
// different summon spells
@@ -2492,7 +2490,7 @@ void SpellMgr::LoadPetDefaultSpells()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellAreas()
@@ -2508,7 +2506,7 @@ void SpellMgr::LoadSpellAreas()
QueryResult result = WorldDatabase.Query("SELECT spell, area, quest_start, quest_start_status, quest_end_status, quest_end, aura_spell, racemask, gender, autocast FROM spell_area");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
return;
}
@@ -2538,7 +2536,7 @@ void SpellMgr::LoadSpellAreas()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` does not exist", spell);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` does not exist", spell);
continue;
}
@@ -2567,20 +2565,20 @@ void SpellMgr::LoadSpellAreas()
if (!ok)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` already listed with similar requirements.", spell);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` already listed with similar requirements.", spell);
continue;
}
}
if (spellArea.areaId && !GetAreaEntryByAreaID(spellArea.areaId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId);
continue;
}
if (spellArea.questStart && !sObjectMgr->GetQuestTemplate(spellArea.questStart))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart);
continue;
}
@@ -2588,7 +2586,7 @@ void SpellMgr::LoadSpellAreas()
{
if (!sObjectMgr->GetQuestTemplate(spellArea.questEnd))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd);
continue;
}
}
@@ -2598,13 +2596,13 @@ void SpellMgr::LoadSpellAreas()
SpellInfo const* spellInfo = GetSpellInfo(abs(spellArea.auraSpell));
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell));
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell));
continue;
}
if (uint32(abs(spellArea.auraSpell)) == spellArea.spellId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell));
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell));
continue;
}
@@ -2624,7 +2622,7 @@ void SpellMgr::LoadSpellAreas()
if (chain)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
continue;
}
@@ -2640,7 +2638,7 @@ void SpellMgr::LoadSpellAreas()
if (chain)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
continue;
}
}
@@ -2648,13 +2646,13 @@ void SpellMgr::LoadSpellAreas()
if (spellArea.raceMask && (spellArea.raceMask & RACEMASK_ALL_PLAYABLE) == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell, spellArea.raceMask);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell, spellArea.raceMask);
continue;
}
if (spellArea.gender != GENDER_NONE && spellArea.gender != GENDER_FEMALE && spellArea.gender != GENDER_MALE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender);
+ TC_LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender);
continue;
}
@@ -2679,7 +2677,7 @@ void SpellMgr::LoadSpellAreas()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellInfoStore()
@@ -2693,7 +2691,7 @@ void SpellMgr::LoadSpellInfoStore()
if (SpellEntry const* spellEntry = sSpellStore.LookupEntry(i))
mSpellInfoMap[i] = new SpellInfo(spellEntry);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded SpellInfo store in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded SpellInfo store in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::UnloadSpellInfoStore()
@@ -3004,7 +3002,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
spellInfo->_InitializeExplicitTargetMask();
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded SpellInfo custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded SpellInfo custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellInfoCorrections()
@@ -3148,6 +3146,7 @@ void SpellMgr::LoadSpellInfoCorrections()
case 61588: // Blazing Harpoon
case 52479: // Gift of the Harvester
case 48246: // Ball of Flame
+ case 36327: // Shoot Arcane Explosion Arrow
spellInfo->MaxAffectedTargets = 1;
break;
case 36384: // Skartax Purple Beam
@@ -3785,5 +3784,5 @@ void SpellMgr::LoadSpellInfoCorrections()
if (SummonPropertiesEntry* properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647))) // 52893
properties->Type = SUMMON_TYPE_TOTEM;
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded SpellInfo corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded SpellInfo corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index bb9aab023af..3eae3f3d698 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -25,7 +25,7 @@ bool _SpellScript::_Validate(SpellInfo const* entry)
{
if (!Validate(entry))
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell", entry->Id, m_scriptName->c_str());
return false;
}
return true;
@@ -204,9 +204,7 @@ void SpellScript::HitHandler::Call(SpellScript* spellScript)
}
SpellScript::TargetHook::TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area)
- : _SpellScript::EffectHook(_effectIndex), targetType(_targetType), area(_area)
-{
-}
+ : _SpellScript::EffectHook(_effectIndex), targetType(_targetType), area(_area) { }
std::string SpellScript::TargetHook::ToString()
{
@@ -286,27 +284,27 @@ bool SpellScript::_Validate(SpellInfo const* entry)
{
for (std::list<EffectHandler>::iterator itr = OnEffectLaunch.begin(); itr != OnEffectLaunch.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectLaunchTarget.begin(); itr != OnEffectLaunchTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectHit.begin(); itr != OnEffectHit.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectHitTarget.begin(); itr != OnEffectHitTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<ObjectAreaTargetSelectHandler>::iterator itr = OnObjectAreaTargetSelect.begin(); itr != OnObjectAreaTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<ObjectTargetSelectHandler>::iterator itr = OnObjectTargetSelect.begin(); itr != OnObjectTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
return _SpellScript::_Validate(entry);
}
@@ -414,7 +412,7 @@ Unit* SpellScript::GetHitUnit()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->unitTarget;
@@ -424,7 +422,7 @@ Creature* SpellScript::GetHitCreature()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
if (m_spell->unitTarget)
@@ -437,7 +435,7 @@ Player* SpellScript::GetHitPlayer()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
if (m_spell->unitTarget)
@@ -450,7 +448,7 @@ Item* SpellScript::GetHitItem()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->itemTarget;
@@ -460,7 +458,7 @@ GameObject* SpellScript::GetHitGObj()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->gameObjTarget;
@@ -470,7 +468,7 @@ WorldLocation* SpellScript::GetHitDest()
{
if (!IsInEffectHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
return m_spell->destTarget;
@@ -480,7 +478,7 @@ int32 SpellScript::GetHitDamage()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->m_damage;
@@ -490,7 +488,7 @@ void SpellScript::SetHitDamage(int32 damage)
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->m_damage = damage;
@@ -500,7 +498,7 @@ int32 SpellScript::GetHitHeal()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->m_healing;
@@ -510,7 +508,7 @@ void SpellScript::SetHitHeal(int32 heal)
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->m_healing = heal;
@@ -520,7 +518,7 @@ Aura* SpellScript::GetHitAura()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return NULL;
}
if (!m_spell->m_spellAura)
@@ -534,7 +532,7 @@ void SpellScript::PreventHitAura()
{
if (!IsInTargetHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
if (m_spell->m_spellAura)
@@ -545,7 +543,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_hitPreventEffectMask |= 1 << effIndex;
@@ -556,7 +554,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_hitPreventDefaultEffectMask |= 1 << effIndex;
@@ -566,7 +564,7 @@ int32 SpellScript::GetEffectValue()
{
if (!IsInEffectHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->damage;
@@ -597,7 +595,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result)
{
if (!IsInCheckCastHook())
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
@@ -613,95 +611,95 @@ bool AuraScript::_Validate(SpellInfo const* entry)
{
for (std::list<CheckAreaTargetHandler>::iterator itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr)
if (!entry->HasAreaAuraEffect() && !entry->HasEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraDispelHandler>::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraDispelHandler>::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectRemove.begin(); itr != OnEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectApply.begin(); itr != AfterEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectRemove.begin(); itr != AfterEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectPeriodicHandler>::iterator itr = OnEffectPeriodic.begin(); itr != OnEffectPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectUpdatePeriodicHandler>::iterator itr = OnEffectUpdatePeriodic.begin(); itr != OnEffectUpdatePeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectCalcAmountHandler>::iterator itr = DoEffectCalcAmount.begin(); itr != DoEffectCalcAmount.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectCalcPeriodicHandler>::iterator itr = DoEffectCalcPeriodic.begin(); itr != DoEffectCalcPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectCalcSpellModHandler>::iterator itr = DoEffectCalcSpellMod.begin(); itr != DoEffectCalcSpellMod.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectAbsorbHandler>::iterator itr = OnEffectAbsorb.begin(); itr != OnEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectAbsorbHandler>::iterator itr = AfterEffectAbsorb.begin(); itr != AfterEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectManaShieldHandler>::iterator itr = OnEffectManaShield.begin(); itr != OnEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectManaShieldHandler>::iterator itr = AfterEffectManaShield.begin(); itr != AfterEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectSplitHandler>::iterator itr = OnEffectSplit.begin(); itr != OnEffectSplit.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<CheckProcHandler>::iterator itr = DoCheckProc.begin(); itr != DoCheckProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraProcHandler>::iterator itr = DoPrepareProc.begin(); itr != DoPrepareProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraProcHandler>::iterator itr = OnProc.begin(); itr != OnProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraProcHandler>::iterator itr = AfterProc.begin(); itr != AfterProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<EffectProcHandler>::iterator itr = OnEffectProc.begin(); itr != OnEffectProc.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
for (std::list<EffectProcHandler>::iterator itr = AfterEffectProc.begin(); itr != AfterEffectProc.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
return _SpellScript::_Validate(entry);
}
@@ -727,9 +725,7 @@ void AuraScript::AuraDispelHandler::Call(AuraScript* auraScript, DispelInfo* _di
}
AuraScript::EffectBase::EffectBase(uint8 _effIndex, uint16 _effName)
- : _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex)
-{
-}
+ : _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex) { }
bool AuraScript::EffectBase::CheckEffect(SpellInfo const* spellEntry, uint8 effIndex)
{
@@ -933,7 +929,7 @@ void AuraScript::PreventDefaultAction()
m_defaultActionPrevented = true;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
break;
}
}
@@ -1120,7 +1116,7 @@ Unit* AuraScript::GetTarget() const
case AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC:
return m_auraApplication->GetTarget();
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
}
return NULL;
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index f7940b2b8da..fe5f102dbe9 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -60,8 +60,8 @@ class _SpellScript
virtual bool _Validate(SpellInfo const* entry);
public:
- _SpellScript() : m_currentScriptState(SPELL_SCRIPT_STATE_NONE) {}
- virtual ~_SpellScript() {}
+ _SpellScript() : m_currentScriptState(SPELL_SCRIPT_STATE_NONE) { }
+ virtual ~_SpellScript() { }
virtual void _Register();
virtual void _Unload();
virtual void _Init(std::string const* scriptname, uint32 spellId);
@@ -230,12 +230,12 @@ class SpellScript : public _SpellScript
};
#define SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
- class CastHandlerFunction : public SpellScript::CastHandler { public: CastHandlerFunction(SpellCastFnType _pCastHandlerScript) : SpellScript::CastHandler((SpellScript::SpellCastFnType)_pCastHandlerScript) {} }; \
- class CheckCastHandlerFunction : public SpellScript::CheckCastHandler { public: CheckCastHandlerFunction(SpellCheckCastFnType _checkCastHandlerScript) : SpellScript::CheckCastHandler((SpellScript::SpellCheckCastFnType)_checkCastHandlerScript) {} }; \
- class EffectHandlerFunction : public SpellScript::EffectHandler { public: EffectHandlerFunction(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : SpellScript::EffectHandler((SpellScript::SpellEffectFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
- class HitHandlerFunction : public SpellScript::HitHandler { public: HitHandlerFunction(SpellHitFnType _pHitHandlerScript) : SpellScript::HitHandler((SpellScript::SpellHitFnType)_pHitHandlerScript) {} }; \
- class ObjectAreaTargetSelectHandlerFunction : public SpellScript::ObjectAreaTargetSelectHandler { public: ObjectAreaTargetSelectHandlerFunction(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectAreaTargetSelectHandler((SpellScript::SpellObjectAreaTargetSelectFnType)_pObjectAreaTargetSelectHandlerScript, _effIndex, _targetType) {} }; \
- class ObjectTargetSelectHandlerFunction : public SpellScript::ObjectTargetSelectHandler { public: ObjectTargetSelectHandlerFunction(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectTargetSelectHandler((SpellScript::SpellObjectTargetSelectFnType)_pObjectTargetSelectHandlerScript, _effIndex, _targetType) {} };
+ class CastHandlerFunction : public SpellScript::CastHandler { public: CastHandlerFunction(SpellCastFnType _pCastHandlerScript) : SpellScript::CastHandler((SpellScript::SpellCastFnType)_pCastHandlerScript) { } }; \
+ class CheckCastHandlerFunction : public SpellScript::CheckCastHandler { public: CheckCastHandlerFunction(SpellCheckCastFnType _checkCastHandlerScript) : SpellScript::CheckCastHandler((SpellScript::SpellCheckCastFnType)_checkCastHandlerScript) { } }; \
+ class EffectHandlerFunction : public SpellScript::EffectHandler { public: EffectHandlerFunction(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : SpellScript::EffectHandler((SpellScript::SpellEffectFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
+ class HitHandlerFunction : public SpellScript::HitHandler { public: HitHandlerFunction(SpellHitFnType _pHitHandlerScript) : SpellScript::HitHandler((SpellScript::SpellHitFnType)_pHitHandlerScript) { } }; \
+ class ObjectAreaTargetSelectHandlerFunction : public SpellScript::ObjectAreaTargetSelectHandler { public: ObjectAreaTargetSelectHandlerFunction(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectAreaTargetSelectHandler((SpellScript::SpellObjectAreaTargetSelectFnType)_pObjectAreaTargetSelectHandlerScript, _effIndex, _targetType) { } }; \
+ class ObjectTargetSelectHandlerFunction : public SpellScript::ObjectTargetSelectHandler { public: ObjectTargetSelectHandlerFunction(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectTargetSelectHandler((SpellScript::SpellObjectTargetSelectFnType)_pObjectTargetSelectHandlerScript, _effIndex, _targetType) { } };
#define PrepareSpellScript(CLASSNAME) SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
public:
@@ -589,26 +589,26 @@ class AuraScript : public _SpellScript
};
#define AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
- class CheckAreaTargetFunction : public AuraScript::CheckAreaTargetHandler { public: CheckAreaTargetFunction(AuraCheckAreaTargetFnType _pHandlerScript) : AuraScript::CheckAreaTargetHandler((AuraScript::AuraCheckAreaTargetFnType)_pHandlerScript) {} }; \
- class AuraDispelFunction : public AuraScript::AuraDispelHandler { public: AuraDispelFunction(AuraDispelFnType _pHandlerScript) : AuraScript::AuraDispelHandler((AuraScript::AuraDispelFnType)_pHandlerScript) {} }; \
- class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
- class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
- class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
- class EffectCalcPeriodicHandlerFunction : public AuraScript::EffectCalcPeriodicHandler { public: EffectCalcPeriodicHandlerFunction(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcPeriodicHandler((AuraScript::AuraEffectCalcPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
- class EffectCalcSpellModHandlerFunction : public AuraScript::EffectCalcSpellModHandler { public: EffectCalcSpellModHandlerFunction(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcSpellModHandler((AuraScript::AuraEffectCalcSpellModFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
- class EffectApplyHandlerFunction : public AuraScript::EffectApplyHandler { public: EffectApplyHandlerFunction(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode) : AuraScript::EffectApplyHandler((AuraScript::AuraEffectApplicationModeFnType)_pEffectHandlerScript, _effIndex, _effName, _mode) {} }; \
- class EffectAbsorbFunction : public AuraScript::EffectAbsorbHandler { public: EffectAbsorbFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectAbsorbHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
- class EffectManaShieldFunction : public AuraScript::EffectManaShieldHandler { public: EffectManaShieldFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectManaShieldHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
- class EffectSplitFunction : public AuraScript::EffectSplitHandler { public: EffectSplitFunction(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectSplitHandler((AuraScript::AuraEffectSplitFnType)_pEffectHandlerScript, _effIndex) {} }; \
- class CheckProcHandlerFunction : public AuraScript::CheckProcHandler { public: CheckProcHandlerFunction(AuraCheckProcFnType handlerScript) : AuraScript::CheckProcHandler((AuraScript::AuraCheckProcFnType)handlerScript) {} }; \
- class AuraProcHandlerFunction : public AuraScript::AuraProcHandler { public: AuraProcHandlerFunction(AuraProcFnType handlerScript) : AuraScript::AuraProcHandler((AuraScript::AuraProcFnType)handlerScript) {} }; \
- class EffectProcHandlerFunction : public AuraScript::EffectProcHandler { public: EffectProcHandlerFunction(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName) : AuraScript::EffectProcHandler((AuraScript::AuraEffectProcFnType)effectHandlerScript, effIndex, effName) {} }; \
+ class CheckAreaTargetFunction : public AuraScript::CheckAreaTargetHandler { public: CheckAreaTargetFunction(AuraCheckAreaTargetFnType _pHandlerScript) : AuraScript::CheckAreaTargetHandler((AuraScript::AuraCheckAreaTargetFnType)_pHandlerScript) { } }; \
+ class AuraDispelFunction : public AuraScript::AuraDispelHandler { public: AuraDispelFunction(AuraDispelFnType _pHandlerScript) : AuraScript::AuraDispelHandler((AuraScript::AuraDispelFnType)_pHandlerScript) { } }; \
+ class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
+ class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
+ class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
+ class EffectCalcPeriodicHandlerFunction : public AuraScript::EffectCalcPeriodicHandler { public: EffectCalcPeriodicHandlerFunction(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcPeriodicHandler((AuraScript::AuraEffectCalcPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
+ class EffectCalcSpellModHandlerFunction : public AuraScript::EffectCalcSpellModHandler { public: EffectCalcSpellModHandlerFunction(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcSpellModHandler((AuraScript::AuraEffectCalcSpellModFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
+ class EffectApplyHandlerFunction : public AuraScript::EffectApplyHandler { public: EffectApplyHandlerFunction(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode) : AuraScript::EffectApplyHandler((AuraScript::AuraEffectApplicationModeFnType)_pEffectHandlerScript, _effIndex, _effName, _mode) { } }; \
+ class EffectAbsorbFunction : public AuraScript::EffectAbsorbHandler { public: EffectAbsorbFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectAbsorbHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) { } }; \
+ class EffectManaShieldFunction : public AuraScript::EffectManaShieldHandler { public: EffectManaShieldFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectManaShieldHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) { } }; \
+ class EffectSplitFunction : public AuraScript::EffectSplitHandler { public: EffectSplitFunction(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectSplitHandler((AuraScript::AuraEffectSplitFnType)_pEffectHandlerScript, _effIndex) { } }; \
+ class CheckProcHandlerFunction : public AuraScript::CheckProcHandler { public: CheckProcHandlerFunction(AuraCheckProcFnType handlerScript) : AuraScript::CheckProcHandler((AuraScript::AuraCheckProcFnType)handlerScript) { } }; \
+ class AuraProcHandlerFunction : public AuraScript::AuraProcHandler { public: AuraProcHandlerFunction(AuraProcFnType handlerScript) : AuraScript::AuraProcHandler((AuraScript::AuraProcFnType)handlerScript) { } }; \
+ class EffectProcHandlerFunction : public AuraScript::EffectProcHandler { public: EffectProcHandlerFunction(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName) : AuraScript::EffectProcHandler((AuraScript::AuraEffectProcFnType)effectHandlerScript, effIndex, effName) { } }; \
#define PrepareAuraScript(CLASSNAME) AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
public:
AuraScript() : _SpellScript(), m_aura(NULL), m_auraApplication(NULL), m_defaultActionPrevented(false)
- {}
+ { }
bool _Validate(SpellInfo const* entry);
bool _Load(Aura* aura);
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const* aurApp = NULL);
@@ -627,7 +627,7 @@ class AuraScript : public _SpellScript
bool _defaultActionPrevented;
ScriptStateStore(uint8 currentScriptState, AuraApplication const* auraApplication, bool defaultActionPrevented)
: _auraApplication(auraApplication), _currentScriptState(currentScriptState), _defaultActionPrevented(defaultActionPrevented)
- {}
+ { }
};
typedef std::stack<ScriptStateStore> ScriptStateStack;
ScriptStateStack m_scriptStates;
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 06989544f55..264b69750f0 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -118,7 +118,7 @@ void CreatureTextMgr::LoadCreatureTexts()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 ceature texts. DB table `creature_texts` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 ceature texts. DB table `creature_texts` is empty.");
return;
}
@@ -145,25 +145,25 @@ void CreatureTextMgr::LoadCreatureTexts()
if (temp.sound)
{
if (!sSoundEntriesStore.LookupEntry(temp.sound)){
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Sound %u but sound does not exist.", temp.entry, temp.group, temp.sound);
+ TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Sound %u but sound does not exist.", temp.entry, temp.group, temp.sound);
temp.sound = 0;
}
}
if (!GetLanguageDescByID(temp.lang))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` using Language %u but Language does not exist.", temp.entry, temp.group, uint32(temp.lang));
+ TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` using Language %u but Language does not exist.", temp.entry, temp.group, uint32(temp.lang));
temp.lang = LANG_UNIVERSAL;
}
if (temp.type >= MAX_CHAT_MSG_TYPE)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Type %u but this Chat Type does not exist.", temp.entry, temp.group, uint32(temp.type));
+ TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Type %u but this Chat Type does not exist.", temp.entry, temp.group, uint32(temp.type));
temp.type = CHAT_MSG_SAY;
}
if (temp.emote)
{
if (!sEmotesStore.LookupEntry(temp.emote))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Emote %u but emote does not exist.", temp.entry, temp.group, uint32(temp.emote));
+ TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_texts` has Emote %u but emote does not exist.", temp.entry, temp.group, uint32(temp.emote));
temp.emote = EMOTE_ONESHOT_NONE;
}
}
@@ -177,7 +177,7 @@ void CreatureTextMgr::LoadCreatureTexts()
++textCount;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature texts for %u creatures in %u ms", textCount, creatureCount, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature texts for %u creatures in %u ms", textCount, creatureCount, GetMSTimeDiffToNow(oldMSTime));
}
@@ -207,7 +207,7 @@ void CreatureTextMgr::LoadCreatureTextLocales()
++textCount;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creature localized texts in %u ms", textCount, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u creature localized texts in %u ms", textCount, GetMSTimeDiffToNow(oldMSTime));
}
@@ -219,7 +219,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp
CreatureTextMap::const_iterator sList = mTextMap.find(source->GetEntry());
if (sList == mTextMap.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureTextMgr: Could not find Text for Creature(%s) Entry %u in 'creature_text' table. Ignoring.", source->GetName().c_str(), source->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Could not find Text for Creature(%s) Entry %u in 'creature_text' table. Ignoring.", source->GetName().c_str(), source->GetEntry());
return 0;
}
@@ -227,7 +227,7 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, uint64 whisp
CreatureTextHolder::const_iterator itr = textHolder.find(textGroup);
if (itr == textHolder.end())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureTextMgr: Could not find TextGroup %u for Creature(%s) GuidLow %u Entry %u. Ignoring.", uint32(textGroup), source->GetName().c_str(), source->GetGUIDLow(), source->GetEntry());
+ TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Could not find TextGroup %u for Creature(%s) GuidLow %u Entry %u. Ignoring.", uint32(textGroup), source->GetName().c_str(), source->GetGUIDLow(), source->GetEntry());
return 0;
}
@@ -432,7 +432,7 @@ void CreatureTextMgr::SetRepeatId(Creature* source, uint8 textGroup, uint8 id)
if (std::find(repeats.begin(), repeats.end(), id) == repeats.end())
repeats.push_back(id);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "CreatureTextMgr: TextGroup %u for Creature(%s) GuidLow %u Entry %u, id %u already added", uint32(textGroup), source->GetName().c_str(), source->GetGUIDLow(), source->GetEntry(), uint32(id));
+ TC_LOG_ERROR("sql.sql", "CreatureTextMgr: TextGroup %u for Creature(%s) GuidLow %u Entry %u, id %u already added", uint32(textGroup), source->GetName().c_str(), source->GetGUIDLow(), source->GetEntry(), uint32(id));
}
CreatureTextRepeatIds CreatureTextMgr::GetRepeatGroup(Creature* source, uint8 textGroup)
@@ -458,7 +458,7 @@ bool CreatureTextMgr::TextExist(uint32 sourceEntry, uint8 textGroup)
CreatureTextMap::const_iterator sList = mTextMap.find(sourceEntry);
if (sList == mTextMap.end())
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "CreatureTextMgr::TextExist: Could not find Text for Creature (entry %u) in 'creature_text' table.", sourceEntry);
+ TC_LOG_DEBUG("entities.unit", "CreatureTextMgr::TextExist: Could not find Text for Creature (entry %u) in 'creature_text' table.", sourceEntry);
return false;
}
@@ -466,7 +466,7 @@ bool CreatureTextMgr::TextExist(uint32 sourceEntry, uint8 textGroup)
CreatureTextHolder::const_iterator itr = textHolder.find(textGroup);
if (itr == textHolder.end())
{
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "CreatureTextMgr::TextExist: Could not find TextGroup %u for Creature (entry %u).", uint32(textGroup), sourceEntry);
+ TC_LOG_DEBUG("entities.unit", "CreatureTextMgr::TextExist: Could not find TextGroup %u for Creature (entry %u).", uint32(textGroup), sourceEntry);
return false;
}
diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h
index c32e35e8770..198877bfe86 100644
--- a/src/server/game/Texts/CreatureTextMgr.h
+++ b/src/server/game/Texts/CreatureTextMgr.h
@@ -82,10 +82,10 @@ typedef UNORDERED_MAP<uint64, CreatureTextRepeatGroup> CreatureTextRepeatMap;//g
class CreatureTextMgr
{
friend class ACE_Singleton<CreatureTextMgr, ACE_Null_Mutex>;
- CreatureTextMgr() {};
+ CreatureTextMgr() { };
public:
- ~CreatureTextMgr() {};
+ ~CreatureTextMgr() { };
void LoadCreatureTexts();
void LoadCreatureTextLocales();
CreatureTextMap const& GetTextMap() const { return mTextMap; }
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index 4cb7a8ffc18..03e8401ce63 100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
@@ -240,9 +240,7 @@ void GmTicket::SetChatLog(std::list<uint32> time, std::string const& log)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Ticket manager
TicketMgr::TicketMgr() : _status(true), _lastTicketId(0), _lastSurveyId(0), _openTicketCount(0),
- _lastChange(time(NULL))
-{
-}
+ _lastChange(time(NULL)) { }
TicketMgr::~TicketMgr()
{
@@ -291,7 +289,7 @@ void TicketMgr::LoadTickets()
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 GM tickets. DB table `gm_tickets` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 GM tickets. DB table `gm_tickets` is empty!");
return;
}
@@ -318,7 +316,7 @@ void TicketMgr::LoadTickets()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
@@ -331,7 +329,7 @@ void TicketMgr::LoadSurveys()
if (QueryResult result = CharacterDatabase.Query("SELECT MAX(surveyId) FROM gm_surveys"))
_lastSurveyId = (*result)[0].GetUInt32();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
index b14bd585b8b..9f3787e5943 100644
--- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp
+++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
@@ -30,7 +30,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
if (!sWorld->getBoolConfig(CONFIG_CLEAN_CHARACTER_DB))
return;
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Cleaning character database...");
+ TC_LOG_INFO("misc", "Cleaning character database...");
uint32 oldMSTime = getMSTime();
@@ -64,7 +64,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
sWorld->SetCleaningFlags(flags);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32))
@@ -72,7 +72,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table
QueryResult result = CharacterDatabase.PQuery("SELECT DISTINCT %s FROM %s", column, table);
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Table %s is empty.", table);
+ TC_LOG_INFO("misc", "Table %s is empty.", table);
return;
}
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index f7c7414fb6f..087233c5c80 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -321,7 +321,7 @@ bool PlayerDumpWriter::DumpTable(std::string& dump, uint32 guid, char const*tabl
case DTT_CHARACTER:
{
if (result->GetFieldCount() <= 68) // avoid crashes on next check
- TC_LOG_FATAL(LOG_FILTER_GENERAL, "PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table.");
+ TC_LOG_FATAL("misc", "PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table.");
if (result->Fetch()[68].GetUInt32()) // characters.deleteInfos_Account - if filled error
return false;
@@ -497,7 +497,7 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
std::string tn = gettablename(line);
if (tn.empty())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str());
+ TC_LOG_ERROR("misc", "LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str());
ROLLBACK(DUMP_FILE_BROKEN);
}
@@ -514,7 +514,7 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
if (i == DUMP_TABLE_COUNT)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "LoadPlayerDump: Unknown table: '%s'!", tn.c_str());
+ TC_LOG_ERROR("misc", "LoadPlayerDump: Unknown table: '%s'!", tn.c_str());
ROLLBACK(DUMP_FILE_BROKEN);
}
@@ -664,7 +664,7 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
break;
}
default:
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Unknown dump table type: %u", type);
+ TC_LOG_ERROR("misc", "Unknown dump table type: %u", type);
break;
}
diff --git a/src/server/game/Tools/PlayerDump.h b/src/server/game/Tools/PlayerDump.h
index 895676eb5db..4fd411d02ac 100644
--- a/src/server/game/Tools/PlayerDump.h
+++ b/src/server/game/Tools/PlayerDump.h
@@ -64,13 +64,13 @@ enum DumpReturn
class PlayerDump
{
protected:
- PlayerDump() {}
+ PlayerDump() { }
};
class PlayerDumpWriter : public PlayerDump
{
public:
- PlayerDumpWriter() {}
+ PlayerDumpWriter() { }
bool GetDump(uint32 guid, std::string& dump);
DumpReturn WriteDump(std::string const& file, uint32 guid);
@@ -89,7 +89,7 @@ class PlayerDumpWriter : public PlayerDump
class PlayerDumpReader : public PlayerDump
{
public:
- PlayerDumpReader() {}
+ PlayerDumpReader() { }
DumpReturn LoadDump(std::string const& file, uint32 account, std::string name, uint32 guid);
};
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
index f02cbf321b3..f7f71647d71 100644
--- a/src/server/game/Warden/Warden.cpp
+++ b/src/server/game/Warden/Warden.cpp
@@ -30,9 +30,7 @@
#include "Warden.h"
#include "AccountMgr.h"
-Warden::Warden() : _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), _dataSent(false), _initialized(false)
-{
-}
+Warden::Warden() : _inputCrypto(16), _outputCrypto(16), _checkTimer(10000/*10 sec*/), _clientResponseTimer(0), _dataSent(false), _initialized(false) { }
Warden::~Warden()
{
@@ -44,7 +42,7 @@ Warden::~Warden()
void Warden::SendModuleToClient()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Send module to client");
+ TC_LOG_DEBUG("warden", "Send module to client");
// Create packet structure
WardenModuleTransfer packet;
@@ -70,7 +68,7 @@ void Warden::SendModuleToClient()
void Warden::RequestModule()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Request module");
+ TC_LOG_DEBUG("warden", "Request module");
// Create packet structure
WardenModuleUse request;
@@ -105,7 +103,7 @@ void Warden::Update()
// Kick player if client response delays more than set in config
if (_clientResponseTimer > maxClientResponseDelay * IN_MILLISECONDS)
{
- TC_LOG_WARN(LOG_FILTER_WARDEN, "%s (latency: %u, IP: %s) exceeded Warden module response delay for more than %s - disconnecting client",
+ TC_LOG_WARN("warden", "%s (latency: %u, IP: %s) exceeded Warden module response delay for more than %s - disconnecting client",
_session->GetPlayerInfo().c_str(), _session->GetLatency(), _session->GetRemoteAddress().c_str(), secsToTimeString(maxClientResponseDelay, true).c_str());
_session->KickPlayer();
}
@@ -141,12 +139,12 @@ bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 le
if (checksum != newChecksum)
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "CHECKSUM IS NOT VALID");
+ TC_LOG_DEBUG("warden", "CHECKSUM IS NOT VALID");
return false;
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "CHECKSUM IS VALID");
+ TC_LOG_DEBUG("warden", "CHECKSUM IS VALID");
return true;
}
}
@@ -222,7 +220,7 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
_warden->DecryptData(recvData.contents(), recvData.size());
uint8 opcode;
recvData >> opcode;
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Got packet, opcode %02X, size %u", opcode, uint32(recvData.size()));
+ TC_LOG_DEBUG("warden", "Got packet, opcode %02X, size %u", opcode, uint32(recvData.size()));
recvData.hexlike();
switch (opcode)
@@ -237,17 +235,17 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
_warden->HandleData(recvData);
break;
case WARDEN_CMSG_MEM_CHECKS_RESULT:
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "NYI WARDEN_CMSG_MEM_CHECKS_RESULT received!");
+ TC_LOG_DEBUG("warden", "NYI WARDEN_CMSG_MEM_CHECKS_RESULT received!");
break;
case WARDEN_CMSG_HASH_RESULT:
_warden->HandleHashResult(recvData);
_warden->InitializeModule();
break;
case WARDEN_CMSG_MODULE_FAILED:
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "NYI WARDEN_CMSG_MODULE_FAILED received!");
+ TC_LOG_DEBUG("warden", "NYI WARDEN_CMSG_MODULE_FAILED received!");
break;
default:
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Got unknown warden opcode %02X of size %u.", opcode, uint32(recvData.size() - 1));
+ TC_LOG_DEBUG("warden", "Got unknown warden opcode %02X of size %u.", opcode, uint32(recvData.size() - 1));
break;
}
}
diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp
index a8bcd61db73..0aac3711137 100644
--- a/src/server/game/Warden/WardenCheckMgr.cpp
+++ b/src/server/game/Warden/WardenCheckMgr.cpp
@@ -25,9 +25,7 @@
#include "WardenCheckMgr.h"
#include "Warden.h"
-WardenCheckMgr::WardenCheckMgr()
-{
-}
+WardenCheckMgr::WardenCheckMgr() { }
WardenCheckMgr::~WardenCheckMgr()
{
@@ -43,7 +41,7 @@ void WardenCheckMgr::LoadWardenChecks()
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
- TC_LOG_INFO(LOG_FILTER_WARDEN, ">> Warden disabled, loading checks skipped.");
+ TC_LOG_INFO("warden", ">> Warden disabled, loading checks skipped.");
return;
}
@@ -51,7 +49,7 @@ void WardenCheckMgr::LoadWardenChecks()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
return;
}
@@ -143,7 +141,7 @@ void WardenCheckMgr::LoadWardenChecks()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u warden checks.", count);
+ TC_LOG_INFO("server.loading", ">> Loaded %u warden checks.", count);
}
void WardenCheckMgr::LoadWardenOverrides()
@@ -151,7 +149,7 @@ void WardenCheckMgr::LoadWardenOverrides()
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
- TC_LOG_INFO(LOG_FILTER_WARDEN, ">> Warden disabled, loading check overrides skipped.");
+ TC_LOG_INFO("warden", ">> Warden disabled, loading check overrides skipped.");
return;
}
@@ -160,7 +158,7 @@ void WardenCheckMgr::LoadWardenOverrides()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
return;
}
@@ -177,10 +175,10 @@ void WardenCheckMgr::LoadWardenOverrides()
// Check if action value is in range (0-2, see WardenActions enum)
if (action > WARDEN_ACTION_BAN)
- TC_LOG_ERROR(LOG_FILTER_WARDEN, "Warden check override action out of range (ID: %u, action: %u)", checkId, action);
+ TC_LOG_ERROR("warden", "Warden check override action out of range (ID: %u, action: %u)", checkId, action);
// Check if check actually exists before accessing the CheckStore vector
else if (checkId > CheckStore.size())
- TC_LOG_ERROR(LOG_FILTER_WARDEN, "Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action);
+ TC_LOG_ERROR("warden", "Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action);
else
{
CheckStore[checkId]->Action = WardenActions(action);
@@ -189,7 +187,7 @@ void WardenCheckMgr::LoadWardenOverrides()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u warden action overrides.", count);
+ TC_LOG_INFO("server.loading", ">> Loaded %u warden action overrides.", count);
}
WardenCheck* WardenCheckMgr::GetWardenDataById(uint16 Id)
diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp
index 27e859e741d..a232a0e0b39 100644
--- a/src/server/game/Warden/WardenMac.cpp
+++ b/src/server/game/Warden/WardenMac.cpp
@@ -30,13 +30,9 @@
#include "WardenMac.h"
#include "WardenModuleMac.h"
-WardenMac::WardenMac() : Warden()
-{
-}
+WardenMac::WardenMac() : Warden() { }
-WardenMac::~WardenMac()
-{
-}
+WardenMac::~WardenMac() { }
void WardenMac::Init(WorldSession* pClient, BigNumber* K)
{
@@ -58,16 +54,16 @@ void WardenMac::Init(WorldSession* pClient, BigNumber* K)
_inputCrypto.Init(_inputKey);
_outputCrypto.Init(_outputKey);
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", pClient->GetAccountId());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "C->S Key: %s", ByteArrayToHexStr(_inputKey, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "S->C Key: %s", ByteArrayToHexStr(_outputKey, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, " Seed: %s", ByteArrayToHexStr(_seed, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Loading Module...");
+ TC_LOG_DEBUG("warden", "Server side warden for client %u initializing...", pClient->GetAccountId());
+ TC_LOG_DEBUG("warden", "C->S Key: %s", ByteArrayToHexStr(_inputKey, 16).c_str());
+ TC_LOG_DEBUG("warden", "S->C Key: %s", ByteArrayToHexStr(_outputKey, 16).c_str());
+ TC_LOG_DEBUG("warden", " Seed: %s", ByteArrayToHexStr(_seed, 16).c_str());
+ TC_LOG_DEBUG("warden", "Loading Module...");
_module = GetModuleForClient();
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Module Key: %s", ByteArrayToHexStr(_module->Key, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Module ID: %s", ByteArrayToHexStr(_module->Id, 16).c_str());
+ TC_LOG_DEBUG("warden", "Module Key: %s", ByteArrayToHexStr(_module->Key, 16).c_str());
+ TC_LOG_DEBUG("warden", "Module ID: %s", ByteArrayToHexStr(_module->Id, 16).c_str());
RequestModule();
}
@@ -94,12 +90,12 @@ ClientWardenModule* WardenMac::GetModuleForClient()
void WardenMac::InitializeModule()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Initialize module");
+ TC_LOG_DEBUG("warden", "Initialize module");
}
void WardenMac::RequestHash()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Request hash");
+ TC_LOG_DEBUG("warden", "Request hash");
// Create packet structure
WardenHashRequest Request;
@@ -167,11 +163,11 @@ void WardenMac::HandleHashResult(ByteBuffer &buff)
// Verify key
if (memcmp(buff.contents() + 1, sha1.GetDigest(), 20) != 0)
{
- TC_LOG_WARN(LOG_FILTER_WARDEN, "%s failed hash reply. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
+ TC_LOG_WARN("warden", "%s failed hash reply. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
return;
}
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Request hash reply: succeed");
+ TC_LOG_DEBUG("warden", "Request hash reply: succeed");
// client 7F96EEFDA5B63D20A4DF8E00CBF48304
//const uint8 client_key[16] = { 0x7F, 0x96, 0xEE, 0xFD, 0xA5, 0xB6, 0x3D, 0x20, 0xA4, 0xDF, 0x8E, 0x00, 0xCB, 0xF4, 0x83, 0x04 };
@@ -193,7 +189,7 @@ void WardenMac::HandleHashResult(ByteBuffer &buff)
void WardenMac::RequestData()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Request data");
+ TC_LOG_DEBUG("warden", "Request data");
ByteBuffer buff;
buff << uint8(WARDEN_SMSG_CHEAT_CHECKS_REQUEST);
@@ -217,7 +213,7 @@ void WardenMac::RequestData()
void WardenMac::HandleData(ByteBuffer &buff)
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Handle data");
+ TC_LOG_DEBUG("warden", "Handle data");
_dataSent = false;
_clientResponseTimer = 0;
@@ -250,7 +246,7 @@ void WardenMac::HandleData(ByteBuffer &buff)
if (memcmp(sha1Hash, sha1.GetDigest(), 20))
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Handle data failed: SHA1 hash is wrong!");
+ TC_LOG_DEBUG("warden", "Handle data failed: SHA1 hash is wrong!");
//found = true;
}
@@ -265,7 +261,7 @@ void WardenMac::HandleData(ByteBuffer &buff)
if (memcmp(ourMD5Hash, theirsMD5Hash, 16))
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Handle data failed: MD5 hash is wrong!");
+ TC_LOG_DEBUG("warden", "Handle data failed: MD5 hash is wrong!");
//found = true;
}
diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp
index 60a1fecedc9..ca20f4ca8e3 100644
--- a/src/server/game/Warden/WardenWin.cpp
+++ b/src/server/game/Warden/WardenWin.cpp
@@ -34,13 +34,9 @@
#include "WardenCheckMgr.h"
#include "AccountMgr.h"
-WardenWin::WardenWin() : Warden()
-{
-}
+WardenWin::WardenWin() : Warden() { }
-WardenWin::~WardenWin()
-{
-}
+WardenWin::~WardenWin() { }
void WardenWin::Init(WorldSession* session, BigNumber* k)
{
@@ -54,16 +50,16 @@ void WardenWin::Init(WorldSession* session, BigNumber* k)
_inputCrypto.Init(_inputKey);
_outputCrypto.Init(_outputKey);
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", session->GetAccountId());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "C->S Key: %s", ByteArrayToHexStr(_inputKey, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "S->C Key: %s", ByteArrayToHexStr(_outputKey, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, " Seed: %s", ByteArrayToHexStr(_seed, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Loading Module...");
+ TC_LOG_DEBUG("warden", "Server side warden for client %u initializing...", session->GetAccountId());
+ TC_LOG_DEBUG("warden", "C->S Key: %s", ByteArrayToHexStr(_inputKey, 16).c_str());
+ TC_LOG_DEBUG("warden", "S->C Key: %s", ByteArrayToHexStr(_outputKey, 16).c_str());
+ TC_LOG_DEBUG("warden", " Seed: %s", ByteArrayToHexStr(_seed, 16).c_str());
+ TC_LOG_DEBUG("warden", "Loading Module...");
_module = GetModuleForClient();
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Module Key: %s", ByteArrayToHexStr(_module->Key, 16).c_str());
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Module ID: %s", ByteArrayToHexStr(_module->Id, 16).c_str());
+ TC_LOG_DEBUG("warden", "Module Key: %s", ByteArrayToHexStr(_module->Key, 16).c_str());
+ TC_LOG_DEBUG("warden", "Module ID: %s", ByteArrayToHexStr(_module->Id, 16).c_str());
RequestModule();
}
@@ -90,7 +86,7 @@ ClientWardenModule* WardenWin::GetModuleForClient()
void WardenWin::InitializeModule()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Initialize module");
+ TC_LOG_DEBUG("warden", "Initialize module");
// Create packet structure
WardenInitModuleRequest Request;
@@ -134,7 +130,7 @@ void WardenWin::InitializeModule()
void WardenWin::RequestHash()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Request hash");
+ TC_LOG_DEBUG("warden", "Request hash");
// Create packet structure
WardenHashRequest Request;
@@ -156,11 +152,11 @@ void WardenWin::HandleHashResult(ByteBuffer &buff)
// Verify key
if (memcmp(buff.contents() + 1, Module.ClientKeySeedHash, 20) != 0)
{
- TC_LOG_WARN(LOG_FILTER_WARDEN, "%s failed hash reply. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
+ TC_LOG_WARN("warden", "%s failed hash reply. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
return;
}
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Request hash reply: succeed");
+ TC_LOG_DEBUG("warden", "Request hash reply: succeed");
// Change keys here
memcpy(_inputKey, Module.ClientKeySeed, 16);
@@ -176,7 +172,7 @@ void WardenWin::HandleHashResult(ByteBuffer &buff)
void WardenWin::RequestData()
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Request data");
+ TC_LOG_DEBUG("warden", "Request data");
// If all checks were done, fill the todo list again
if (_memChecksTodo.empty())
@@ -323,12 +319,12 @@ void WardenWin::RequestData()
for (std::list<uint16>::iterator itr = _currentChecks.begin(); itr != _currentChecks.end(); ++itr)
stream << *itr << " ";
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "%s", stream.str().c_str());
+ TC_LOG_DEBUG("warden", "%s", stream.str().c_str());
}
void WardenWin::HandleData(ByteBuffer &buff)
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Handle data");
+ TC_LOG_DEBUG("warden", "Handle data");
_dataSent = false;
_clientResponseTimer = 0;
@@ -341,7 +337,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (!IsValidCheckSum(Checksum, buff.contents() + buff.rpos(), Length))
{
buff.rpos(buff.wpos());
- TC_LOG_WARN(LOG_FILTER_WARDEN, "%s failed checksum. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
+ TC_LOG_WARN("warden", "%s failed checksum. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
return;
}
@@ -352,7 +348,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
/// @todo test it.
if (result == 0x00)
{
- TC_LOG_WARN(LOG_FILTER_WARDEN, "%s failed timing check. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
+ TC_LOG_WARN("warden", "%s failed timing check. Action: %s", _session->GetPlayerInfo().c_str(), Penalty().c_str());
return;
}
@@ -362,10 +358,10 @@ void WardenWin::HandleData(ByteBuffer &buff)
uint32 ticksNow = getMSTime();
uint32 ourTicks = newClientTicks + (ticksNow - _serverTicks);
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "ServerTicks %u", ticksNow); // Now
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RequestTicks %u", _serverTicks); // At request
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Ticks %u", newClientTicks); // At response
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Ticks diff %u", ourTicks - newClientTicks);
+ TC_LOG_DEBUG("warden", "ServerTicks %u", ticksNow); // Now
+ TC_LOG_DEBUG("warden", "RequestTicks %u", _serverTicks); // At request
+ TC_LOG_DEBUG("warden", "Ticks %u", newClientTicks); // At response
+ TC_LOG_DEBUG("warden", "Ticks diff %u", ourTicks - newClientTicks);
}
WardenCheckResult* rs;
@@ -390,21 +386,21 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (Mem_Result != 0)
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MEM_CHECK not 0x00, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MEM_CHECK not 0x00, CheckId %u account Id %u", *itr, _session->GetAccountId());
checkFailed = *itr;
continue;
}
if (memcmp(buff.contents() + buff.rpos(), rs->Result.AsByteArray(0, false).get(), rd->Length) != 0)
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MEM_CHECK fail CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MEM_CHECK fail CheckId %u account Id %u", *itr, _session->GetAccountId());
checkFailed = *itr;
buff.rpos(buff.rpos() + rd->Length);
continue;
}
buff.rpos(buff.rpos() + rd->Length);
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MEM_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MEM_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
break;
}
case PAGE_CHECK_A:
@@ -416,11 +412,11 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (memcmp(buff.contents() + buff.rpos(), &byte, sizeof(uint8)) != 0)
{
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT PAGE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
if (type == MODULE_CHECK)
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MODULE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
if (type == DRIVER_CHECK)
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
checkFailed = *itr;
buff.rpos(buff.rpos() + 1);
continue;
@@ -428,11 +424,11 @@ void WardenWin::HandleData(ByteBuffer &buff)
buff.rpos(buff.rpos() + 1);
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT PAGE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
else if (type == MODULE_CHECK)
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MODULE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
else if (type == DRIVER_CHECK)
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT DRIVER_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
break;
}
case LUA_STR_CHECK:
@@ -442,7 +438,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (Lua_Result != 0)
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT LUA_STR_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT LUA_STR_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
checkFailed = *itr;
continue;
}
@@ -455,11 +451,11 @@ void WardenWin::HandleData(ByteBuffer &buff)
char *str = new char[luaStrLen + 1];
memcpy(str, buff.contents() + buff.rpos(), luaStrLen);
str[luaStrLen] = '\0'; // null terminator
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "Lua string: %s", str);
+ TC_LOG_DEBUG("warden", "Lua string: %s", str);
delete[] str;
}
buff.rpos(buff.rpos() + luaStrLen); // Skip string
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT LUA_STR_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT LUA_STR_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
break;
}
case MPQ_CHECK:
@@ -469,21 +465,21 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (Mpq_Result != 0)
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK not 0x00 account id %u", _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MPQ_CHECK not 0x00 account id %u", _session->GetAccountId());
checkFailed = *itr;
continue;
}
if (memcmp(buff.contents() + buff.rpos(), rs->Result.AsByteArray(0, false).get(), 20) != 0) // SHA1
{
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MPQ_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
checkFailed = *itr;
buff.rpos(buff.rpos() + 20); // 20 bytes SHA1
continue;
}
buff.rpos(buff.rpos() + 20); // 20 bytes SHA1
- TC_LOG_DEBUG(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
+ TC_LOG_DEBUG("warden", "RESULT MPQ_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
break;
}
default: // Should never happen
@@ -494,7 +490,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (checkFailed > 0)
{
WardenCheck* check = sWardenCheckMgr->GetWardenDataById(checkFailed);
- TC_LOG_WARN(LOG_FILTER_WARDEN, "%s failed Warden check %u. Action: %s", _session->GetPlayerInfo().c_str(), checkFailed, Penalty(check).c_str());
+ TC_LOG_WARN("warden", "%s failed Warden check %u. Action: %s", _session->GetPlayerInfo().c_str(), checkFailed, Penalty(check).c_str());
}
// Set hold off timer, minimum timer should at least be 1 second
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp
index 0457dc7e033..5c03c816e6d 100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
@@ -38,7 +38,7 @@ Weather::Weather(uint32 zone, WeatherData const* weatherChances)
m_type = WEATHER_TYPE_FINE;
m_grade = 0;
- TC_LOG_INFO(LOG_FILTER_GENERAL, "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)));
+ TC_LOG_INFO("misc", "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)));
}
/// Launch a weather update
@@ -99,7 +99,7 @@ bool Weather::ReGenerate()
static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" };
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Generating a change in %s weather for zone %u.", seasonName[season], m_zone);
+ TC_LOG_INFO("misc", "Generating a change in %s weather for zone %u.", seasonName[season], m_zone);
if ((u < 60) && (m_grade < 0.33333334f)) // Get fair
{
@@ -263,7 +263,7 @@ bool Weather::UpdateWeather()
wthstr = "fine";
break;
}
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Change the weather of zone %u to %s.", m_zone, wthstr);
+ TC_LOG_INFO("misc", "Change the weather of zone %u to %s.", m_zone, wthstr);
sScriptMgr->OnWeatherChange(this, state, m_grade);
return true;
diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp
index 0a09d8a5dff..1b36bc4653c 100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -96,7 +96,7 @@ void LoadWeatherData()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
return;
}
@@ -117,19 +117,19 @@ void LoadWeatherData()
if (wzc.data[season].rainChance > 100)
{
wzc.data[season].rainChance = 25;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Weather for zone %u season %u has wrong rain chance > 100%%", zone_id, season);
+ TC_LOG_ERROR("sql.sql", "Weather for zone %u season %u has wrong rain chance > 100%%", zone_id, season);
}
if (wzc.data[season].snowChance > 100)
{
wzc.data[season].snowChance = 25;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Weather for zone %u season %u has wrong snow chance > 100%%", zone_id, season);
+ TC_LOG_ERROR("sql.sql", "Weather for zone %u season %u has wrong snow chance > 100%%", zone_id, season);
}
if (wzc.data[season].stormChance > 100)
{
wzc.data[season].stormChance = 25;
- TC_LOG_ERROR(LOG_FILTER_SQL, "Weather for zone %u season %u has wrong storm chance > 100%%", zone_id, season);
+ TC_LOG_ERROR("sql.sql", "Weather for zone %u season %u has wrong storm chance > 100%%", zone_id, season);
}
}
@@ -139,7 +139,7 @@ void LoadWeatherData()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void SendFineWeatherUpdateToPlayer(Player* player)
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 7ad7b68b210..83083778e32 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -272,7 +272,7 @@ void World::AddSession_(WorldSession* s)
{
AddQueuedPlayer(s);
UpdateMaxSessionCounters();
- TC_LOG_INFO(LOG_FILTER_GENERAL, "PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId(), ++QueueSize);
+ TC_LOG_INFO("misc", "PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId(), ++QueueSize);
return;
}
@@ -289,7 +289,7 @@ void World::AddSession_(WorldSession* s)
float popu = (float)GetActiveSessionCount(); // updated number of users on the server
popu /= pLimit;
popu *= 2;
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Server Population (%f).", popu);
+ TC_LOG_INFO("misc", "Server Population (%f).", popu);
}
}
@@ -400,7 +400,7 @@ void World::LoadConfigSettings(bool reload)
{
if (!sConfigMgr->Reload())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "World settings reload fail: can't read settings from %s.", sConfigMgr->GetFilename().c_str());
+ TC_LOG_ERROR("misc", "World settings reload fail: can't read settings from %s.", sConfigMgr->GetFilename().c_str());
return;
}
sLog->LoadFromConfig();
@@ -423,27 +423,27 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_HEALTH] = sConfigMgr->GetFloatDefault("Rate.Health", 1);
if (rate_values[RATE_HEALTH] < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Rate.Health (%f) must be > 0. Using 1 instead.", rate_values[RATE_HEALTH]);
+ TC_LOG_ERROR("server.loading", "Rate.Health (%f) must be > 0. Using 1 instead.", rate_values[RATE_HEALTH]);
rate_values[RATE_HEALTH] = 1;
}
rate_values[RATE_POWER_MANA] = sConfigMgr->GetFloatDefault("Rate.Mana", 1);
if (rate_values[RATE_POWER_MANA] < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Rate.Mana (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_MANA]);
+ TC_LOG_ERROR("server.loading", "Rate.Mana (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_MANA]);
rate_values[RATE_POWER_MANA] = 1;
}
rate_values[RATE_POWER_RAGE_INCOME] = sConfigMgr->GetFloatDefault("Rate.Rage.Income", 1);
rate_values[RATE_POWER_RAGE_LOSS] = sConfigMgr->GetFloatDefault("Rate.Rage.Loss", 1);
if (rate_values[RATE_POWER_RAGE_LOSS] < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Rate.Rage.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RAGE_LOSS]);
+ TC_LOG_ERROR("server.loading", "Rate.Rage.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RAGE_LOSS]);
rate_values[RATE_POWER_RAGE_LOSS] = 1;
}
rate_values[RATE_POWER_RUNICPOWER_INCOME] = sConfigMgr->GetFloatDefault("Rate.RunicPower.Income", 1);
rate_values[RATE_POWER_RUNICPOWER_LOSS] = sConfigMgr->GetFloatDefault("Rate.RunicPower.Loss", 1);
if (rate_values[RATE_POWER_RUNICPOWER_LOSS] < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Rate.RunicPower.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RUNICPOWER_LOSS]);
+ TC_LOG_ERROR("server.loading", "Rate.RunicPower.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RUNICPOWER_LOSS]);
rate_values[RATE_POWER_RUNICPOWER_LOSS] = 1;
}
rate_values[RATE_POWER_FOCUS] = sConfigMgr->GetFloatDefault("Rate.Focus", 1.0f);
@@ -467,7 +467,7 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_REPAIRCOST] = sConfigMgr->GetFloatDefault("Rate.RepairCost", 1.0f);
if (rate_values[RATE_REPAIRCOST] < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Rate.RepairCost (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_REPAIRCOST]);
+ TC_LOG_ERROR("server.loading", "Rate.RepairCost (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_REPAIRCOST]);
rate_values[RATE_REPAIRCOST] = 0.0f;
}
rate_values[RATE_REPUTATION_GAIN] = sConfigMgr->GetFloatDefault("Rate.Reputation.Gain", 1.0f);
@@ -502,13 +502,13 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_TALENT] = sConfigMgr->GetFloatDefault("Rate.Talent", 1.0f);
if (rate_values[RATE_TALENT] < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Rate.Talent (%f) must be > 0. Using 1 instead.", rate_values[RATE_TALENT]);
+ TC_LOG_ERROR("server.loading", "Rate.Talent (%f) must be > 0. Using 1 instead.", rate_values[RATE_TALENT]);
rate_values[RATE_TALENT] = 1.0f;
}
rate_values[RATE_MOVESPEED] = sConfigMgr->GetFloatDefault("Rate.MoveSpeed", 1.0f);
if (rate_values[RATE_MOVESPEED] < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Rate.MoveSpeed (%f) must be > 0. Using 1 instead.", rate_values[RATE_MOVESPEED]);
+ TC_LOG_ERROR("server.loading", "Rate.MoveSpeed (%f) must be > 0. Using 1 instead.", rate_values[RATE_MOVESPEED]);
rate_values[RATE_MOVESPEED] = 1.0f;
}
for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i) playerBaseMoveSpeed[i] = baseMoveSpeed[i] * rate_values[RATE_MOVESPEED];
@@ -517,12 +517,12 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = sConfigMgr->GetFloatDefault("TargetPosRecalculateRange", 1.5f);
if (rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] < CONTACT_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "TargetPosRecalculateRange (%f) must be >= %f. Using %f instead.", rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], CONTACT_DISTANCE, CONTACT_DISTANCE);
+ TC_LOG_ERROR("server.loading", "TargetPosRecalculateRange (%f) must be >= %f. Using %f instead.", rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], CONTACT_DISTANCE, CONTACT_DISTANCE);
rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = CONTACT_DISTANCE;
}
else if (rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] > NOMINAL_MELEE_RANGE)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "TargetPosRecalculateRange (%f) must be <= %f. Using %f instead.",
+ TC_LOG_ERROR("server.loading", "TargetPosRecalculateRange (%f) must be <= %f. Using %f instead.",
rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], NOMINAL_MELEE_RANGE, NOMINAL_MELEE_RANGE);
rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = NOMINAL_MELEE_RANGE;
}
@@ -530,12 +530,12 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = sConfigMgr->GetFloatDefault("DurabilityLoss.OnDeath", 10.0f);
if (rate_values[RATE_DURABILITY_LOSS_ON_DEATH] < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "DurabilityLoss.OnDeath (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
+ TC_LOG_ERROR("server.loading", "DurabilityLoss.OnDeath (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = 0.0f;
}
if (rate_values[RATE_DURABILITY_LOSS_ON_DEATH] > 100.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "DurabilityLoss.OnDeath (%f) must be <= 100. Using 100.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
+ TC_LOG_ERROR("server.loading", "DurabilityLoss.OnDeath (%f) must be <= 100. Using 100.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = 0.0f;
}
rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = rate_values[RATE_DURABILITY_LOSS_ON_DEATH] / 100.0f;
@@ -543,25 +543,25 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_DURABILITY_LOSS_DAMAGE] = sConfigMgr->GetFloatDefault("DurabilityLossChance.Damage", 0.5f);
if (rate_values[RATE_DURABILITY_LOSS_DAMAGE] < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "DurabilityLossChance.Damage (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_DAMAGE]);
+ TC_LOG_ERROR("server.loading", "DurabilityLossChance.Damage (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_DAMAGE]);
rate_values[RATE_DURABILITY_LOSS_DAMAGE] = 0.0f;
}
rate_values[RATE_DURABILITY_LOSS_ABSORB] = sConfigMgr->GetFloatDefault("DurabilityLossChance.Absorb", 0.5f);
if (rate_values[RATE_DURABILITY_LOSS_ABSORB] < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "DurabilityLossChance.Absorb (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ABSORB]);
+ TC_LOG_ERROR("server.loading", "DurabilityLossChance.Absorb (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ABSORB]);
rate_values[RATE_DURABILITY_LOSS_ABSORB] = 0.0f;
}
rate_values[RATE_DURABILITY_LOSS_PARRY] = sConfigMgr->GetFloatDefault("DurabilityLossChance.Parry", 0.05f);
if (rate_values[RATE_DURABILITY_LOSS_PARRY] < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "DurabilityLossChance.Parry (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_PARRY]);
+ TC_LOG_ERROR("server.loading", "DurabilityLossChance.Parry (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_PARRY]);
rate_values[RATE_DURABILITY_LOSS_PARRY] = 0.0f;
}
rate_values[RATE_DURABILITY_LOSS_BLOCK] = sConfigMgr->GetFloatDefault("DurabilityLossChance.Block", 0.05f);
if (rate_values[RATE_DURABILITY_LOSS_BLOCK] < 0.0f)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "DurabilityLossChance.Block (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_BLOCK]);
+ TC_LOG_ERROR("server.loading", "DurabilityLossChance.Block (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_BLOCK]);
rate_values[RATE_DURABILITY_LOSS_BLOCK] = 0.0f;
}
///- Read other configuration items from the config file
@@ -571,7 +571,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_COMPRESSION] = sConfigMgr->GetIntDefault("Compression", 1);
if (m_int_configs[CONFIG_COMPRESSION] < 1 || m_int_configs[CONFIG_COMPRESSION] > 9)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Compression level (%i) must be in range 1..9. Using default compression level (1).", m_int_configs[CONFIG_COMPRESSION]);
+ TC_LOG_ERROR("server.loading", "Compression level (%i) must be in range 1..9. Using default compression level (1).", m_int_configs[CONFIG_COMPRESSION]);
m_int_configs[CONFIG_COMPRESSION] = 1;
}
m_bool_configs[CONFIG_ADDON_CHANNEL] = sConfigMgr->GetBoolDefault("AddonChannel", true);
@@ -594,14 +594,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = sConfigMgr->GetIntDefault("PlayerSave.Stats.MinLevel", 0);
if (m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] > MAX_LEVEL)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "PlayerSave.Stats.MinLevel (%i) must be in range 0..80. Using default, do not save character stats (0).", m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]);
+ TC_LOG_ERROR("server.loading", "PlayerSave.Stats.MinLevel (%i) must be in range 0..80. Using default, do not save character stats (0).", m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]);
m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = 0;
}
m_int_configs[CONFIG_INTERVAL_GRIDCLEAN] = sConfigMgr->GetIntDefault("GridCleanUpDelay", 5 * MINUTE * IN_MILLISECONDS);
if (m_int_configs[CONFIG_INTERVAL_GRIDCLEAN] < MIN_GRID_DELAY)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "GridCleanUpDelay (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY);
+ TC_LOG_ERROR("server.loading", "GridCleanUpDelay (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_GRIDCLEAN], MIN_GRID_DELAY);
m_int_configs[CONFIG_INTERVAL_GRIDCLEAN] = MIN_GRID_DELAY;
}
if (reload)
@@ -610,7 +610,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetIntDefault("MapUpdateInterval", 100);
if (m_int_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MapUpdateInterval (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY);
+ TC_LOG_ERROR("server.loading", "MapUpdateInterval (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY);
m_int_configs[CONFIG_INTERVAL_MAPUPDATE] = MIN_MAP_UPDATE_DELAY;
}
if (reload)
@@ -622,7 +622,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetIntDefault("WorldServerPort", 8085);
if (val != m_int_configs[CONFIG_PORT_WORLD])
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "WorldServerPort option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_PORT_WORLD]);
+ TC_LOG_ERROR("server.loading", "WorldServerPort option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_PORT_WORLD]);
}
else
m_int_configs[CONFIG_PORT_WORLD] = sConfigMgr->GetIntDefault("WorldServerPort", 8085);
@@ -641,7 +641,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetIntDefault("GameType", 0);
if (val != m_int_configs[CONFIG_GAME_TYPE])
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "GameType option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_GAME_TYPE]);
+ TC_LOG_ERROR("server.loading", "GameType option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_GAME_TYPE]);
}
else
m_int_configs[CONFIG_GAME_TYPE] = sConfigMgr->GetIntDefault("GameType", 0);
@@ -650,7 +650,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT);
if (val != m_int_configs[CONFIG_REALM_ZONE])
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "RealmZone option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_REALM_ZONE]);
+ TC_LOG_ERROR("server.loading", "RealmZone option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_REALM_ZONE]);
}
else
m_int_configs[CONFIG_REALM_ZONE] = sConfigMgr->GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT);
@@ -668,21 +668,21 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MIN_PLAYER_NAME] = sConfigMgr->GetIntDefault ("MinPlayerName", 2);
if (m_int_configs[CONFIG_MIN_PLAYER_NAME] < 1 || m_int_configs[CONFIG_MIN_PLAYER_NAME] > MAX_PLAYER_NAME)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MinPlayerName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PLAYER_NAME], MAX_PLAYER_NAME);
+ TC_LOG_ERROR("server.loading", "MinPlayerName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PLAYER_NAME], MAX_PLAYER_NAME);
m_int_configs[CONFIG_MIN_PLAYER_NAME] = 2;
}
m_int_configs[CONFIG_MIN_CHARTER_NAME] = sConfigMgr->GetIntDefault ("MinCharterName", 2);
if (m_int_configs[CONFIG_MIN_CHARTER_NAME] < 1 || m_int_configs[CONFIG_MIN_CHARTER_NAME] > MAX_CHARTER_NAME)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MinCharterName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_CHARTER_NAME], MAX_CHARTER_NAME);
+ TC_LOG_ERROR("server.loading", "MinCharterName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_CHARTER_NAME], MAX_CHARTER_NAME);
m_int_configs[CONFIG_MIN_CHARTER_NAME] = 2;
}
m_int_configs[CONFIG_MIN_PET_NAME] = sConfigMgr->GetIntDefault ("MinPetName", 2);
if (m_int_configs[CONFIG_MIN_PET_NAME] < 1 || m_int_configs[CONFIG_MIN_PET_NAME] > MAX_PET_NAME)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MinPetName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PET_NAME], MAX_PET_NAME);
+ TC_LOG_ERROR("server.loading", "MinPetName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PET_NAME], MAX_PET_NAME);
m_int_configs[CONFIG_MIN_PET_NAME] = 2;
}
@@ -693,7 +693,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CHARACTERS_PER_REALM] = sConfigMgr->GetIntDefault("CharactersPerRealm", 10);
if (m_int_configs[CONFIG_CHARACTERS_PER_REALM] < 1 || m_int_configs[CONFIG_CHARACTERS_PER_REALM] > 10)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "CharactersPerRealm (%i) must be in range 1..10. Set to 10.", m_int_configs[CONFIG_CHARACTERS_PER_REALM]);
+ TC_LOG_ERROR("server.loading", "CharactersPerRealm (%i) must be in range 1..10. Set to 10.", m_int_configs[CONFIG_CHARACTERS_PER_REALM]);
m_int_configs[CONFIG_CHARACTERS_PER_REALM] = 10;
}
@@ -701,14 +701,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = sConfigMgr->GetIntDefault("CharactersPerAccount", 50);
if (m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] < m_int_configs[CONFIG_CHARACTERS_PER_REALM])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "CharactersPerAccount (%i) can't be less than CharactersPerRealm (%i).", m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT], m_int_configs[CONFIG_CHARACTERS_PER_REALM]);
+ TC_LOG_ERROR("server.loading", "CharactersPerAccount (%i) can't be less than CharactersPerRealm (%i).", m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT], m_int_configs[CONFIG_CHARACTERS_PER_REALM]);
m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = m_int_configs[CONFIG_CHARACTERS_PER_REALM];
}
m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = sConfigMgr->GetIntDefault("HeroicCharactersPerRealm", 1);
if (int32(m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]) < 0 || m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.", m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
+ TC_LOG_ERROR("server.loading", "HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.", m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = 1;
}
@@ -717,7 +717,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_SKIP_CINEMATICS] = sConfigMgr->GetIntDefault("SkipCinematics", 0);
if (int32(m_int_configs[CONFIG_SKIP_CINEMATICS]) < 0 || m_int_configs[CONFIG_SKIP_CINEMATICS] > 2)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "SkipCinematics (%i) must be in range 0..2. Set to 0.", m_int_configs[CONFIG_SKIP_CINEMATICS]);
+ TC_LOG_ERROR("server.loading", "SkipCinematics (%i) must be in range 0..2. Set to 0.", m_int_configs[CONFIG_SKIP_CINEMATICS]);
m_int_configs[CONFIG_SKIP_CINEMATICS] = 0;
}
@@ -725,14 +725,14 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
if (val != m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MaxPlayerLevel option can't be changed at config reload, using current value (%u).", m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ TC_LOG_ERROR("server.loading", "MaxPlayerLevel option can't be changed at config reload, using current value (%u).", m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
}
else
m_int_configs[CONFIG_MAX_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
if (m_int_configs[CONFIG_MAX_PLAYER_LEVEL] > MAX_LEVEL)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MaxPlayerLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_MAX_PLAYER_LEVEL], MAX_LEVEL, MAX_LEVEL);
+ TC_LOG_ERROR("server.loading", "MaxPlayerLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_MAX_PLAYER_LEVEL], MAX_LEVEL, MAX_LEVEL);
m_int_configs[CONFIG_MAX_PLAYER_LEVEL] = MAX_LEVEL;
}
@@ -741,25 +741,25 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("StartPlayerLevel", 1);
if (m_int_configs[CONFIG_START_PLAYER_LEVEL] < 1)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 1.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ TC_LOG_ERROR("server.loading", "StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 1.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
m_int_configs[CONFIG_START_PLAYER_LEVEL] = 1;
}
else if (m_int_configs[CONFIG_START_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ TC_LOG_ERROR("server.loading", "StartPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.", m_int_configs[CONFIG_START_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
m_int_configs[CONFIG_START_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL];
}
m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("StartHeroicPlayerLevel", 55);
if (m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] < 1)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.",
+ TC_LOG_ERROR("server.loading", "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.",
m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = 55;
}
else if (m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.",
+ TC_LOG_ERROR("server.loading", "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to %u.",
m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = m_int_configs[CONFIG_MAX_PLAYER_LEVEL];
}
@@ -767,12 +767,12 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_PLAYER_MONEY] = sConfigMgr->GetIntDefault("StartPlayerMoney", 0);
if (int32(m_int_configs[CONFIG_START_PLAYER_MONEY]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0);
+ TC_LOG_ERROR("server.loading", "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0);
m_int_configs[CONFIG_START_PLAYER_MONEY] = 0;
}
else if (m_int_configs[CONFIG_START_PLAYER_MONEY] > MAX_MONEY_AMOUNT)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.",
+ TC_LOG_ERROR("server.loading", "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.",
m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, MAX_MONEY_AMOUNT);
m_int_configs[CONFIG_START_PLAYER_MONEY] = MAX_MONEY_AMOUNT;
}
@@ -780,20 +780,20 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MAX_HONOR_POINTS] = sConfigMgr->GetIntDefault("MaxHonorPoints", 75000);
if (int32(m_int_configs[CONFIG_MAX_HONOR_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MaxHonorPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_HONOR_POINTS]);
+ TC_LOG_ERROR("server.loading", "MaxHonorPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_HONOR_POINTS]);
m_int_configs[CONFIG_MAX_HONOR_POINTS] = 0;
}
m_int_configs[CONFIG_START_HONOR_POINTS] = sConfigMgr->GetIntDefault("StartHonorPoints", 0);
if (int32(m_int_configs[CONFIG_START_HONOR_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.",
+ TC_LOG_ERROR("server.loading", "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.",
m_int_configs[CONFIG_START_HONOR_POINTS], m_int_configs[CONFIG_MAX_HONOR_POINTS], 0);
m_int_configs[CONFIG_START_HONOR_POINTS] = 0;
}
else if (m_int_configs[CONFIG_START_HONOR_POINTS] > m_int_configs[CONFIG_MAX_HONOR_POINTS])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.",
+ TC_LOG_ERROR("server.loading", "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.",
m_int_configs[CONFIG_START_HONOR_POINTS], m_int_configs[CONFIG_MAX_HONOR_POINTS], m_int_configs[CONFIG_MAX_HONOR_POINTS]);
m_int_configs[CONFIG_START_HONOR_POINTS] = m_int_configs[CONFIG_MAX_HONOR_POINTS];
}
@@ -801,20 +801,20 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MAX_ARENA_POINTS] = sConfigMgr->GetIntDefault("MaxArenaPoints", 10000);
if (int32(m_int_configs[CONFIG_MAX_ARENA_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MaxArenaPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_ARENA_POINTS]);
+ TC_LOG_ERROR("server.loading", "MaxArenaPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_ARENA_POINTS]);
m_int_configs[CONFIG_MAX_ARENA_POINTS] = 0;
}
m_int_configs[CONFIG_START_ARENA_POINTS] = sConfigMgr->GetIntDefault("StartArenaPoints", 0);
if (int32(m_int_configs[CONFIG_START_ARENA_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.",
+ TC_LOG_ERROR("server.loading", "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.",
m_int_configs[CONFIG_START_ARENA_POINTS], m_int_configs[CONFIG_MAX_ARENA_POINTS], 0);
m_int_configs[CONFIG_START_ARENA_POINTS] = 0;
}
else if (m_int_configs[CONFIG_START_ARENA_POINTS] > m_int_configs[CONFIG_MAX_ARENA_POINTS])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.",
+ TC_LOG_ERROR("server.loading", "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.",
m_int_configs[CONFIG_START_ARENA_POINTS], m_int_configs[CONFIG_MAX_ARENA_POINTS], m_int_configs[CONFIG_MAX_ARENA_POINTS]);
m_int_configs[CONFIG_START_ARENA_POINTS] = m_int_configs[CONFIG_MAX_ARENA_POINTS];
}
@@ -822,7 +822,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] = sConfigMgr->GetIntDefault("RecruitAFriend.MaxLevel", 60);
if (m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "RecruitAFriend.MaxLevel (%i) must be in the range 0..MaxLevel(%u). Set to %u.",
+ TC_LOG_ERROR("server.loading", "RecruitAFriend.MaxLevel (%i) must be in the range 0..MaxLevel(%u). Set to %u.",
m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL], m_int_configs[CONFIG_MAX_PLAYER_LEVEL], 60);
m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] = 60;
}
@@ -842,7 +842,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MIN_PETITION_SIGNS] = sConfigMgr->GetIntDefault("MinPetitionSigns", 9);
if (m_int_configs[CONFIG_MIN_PETITION_SIGNS] > 9)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MinPetitionSigns (%i) must be in range 0..9. Set to 9.", m_int_configs[CONFIG_MIN_PETITION_SIGNS]);
+ TC_LOG_ERROR("server.loading", "MinPetitionSigns (%i) must be in range 0..9. Set to 9.", m_int_configs[CONFIG_MIN_PETITION_SIGNS]);
m_int_configs[CONFIG_MIN_PETITION_SIGNS] = 9;
}
@@ -856,13 +856,13 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_GM_LEVEL] = sConfigMgr->GetIntDefault("GM.StartLevel", 1);
if (m_int_configs[CONFIG_START_GM_LEVEL] < m_int_configs[CONFIG_START_PLAYER_LEVEL])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "GM.StartLevel (%i) must be in range StartPlayerLevel(%u)..%u. Set to %u.",
+ TC_LOG_ERROR("server.loading", "GM.StartLevel (%i) must be in range StartPlayerLevel(%u)..%u. Set to %u.",
m_int_configs[CONFIG_START_GM_LEVEL], m_int_configs[CONFIG_START_PLAYER_LEVEL], MAX_LEVEL, m_int_configs[CONFIG_START_PLAYER_LEVEL]);
m_int_configs[CONFIG_START_GM_LEVEL] = m_int_configs[CONFIG_START_PLAYER_LEVEL];
}
else if (m_int_configs[CONFIG_START_GM_LEVEL] > MAX_LEVEL)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "GM.StartLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_START_GM_LEVEL], MAX_LEVEL, MAX_LEVEL);
+ TC_LOG_ERROR("server.loading", "GM.StartLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_START_GM_LEVEL], MAX_LEVEL, MAX_LEVEL);
m_int_configs[CONFIG_START_GM_LEVEL] = MAX_LEVEL;
}
m_bool_configs[CONFIG_ALLOW_GM_GROUP] = sConfigMgr->GetBoolDefault("GM.AllowInvite", false);
@@ -876,7 +876,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_UPTIME_UPDATE] = sConfigMgr->GetIntDefault("UpdateUptimeInterval", 10);
if (int32(m_int_configs[CONFIG_UPTIME_UPDATE]) <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "UpdateUptimeInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_UPTIME_UPDATE]);
+ TC_LOG_ERROR("server.loading", "UpdateUptimeInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_UPTIME_UPDATE]);
m_int_configs[CONFIG_UPTIME_UPDATE] = 10;
}
if (reload)
@@ -889,7 +889,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_LOGDB_CLEARINTERVAL] = sConfigMgr->GetIntDefault("LogDB.Opt.ClearInterval", 10);
if (int32(m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]) <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "LogDB.Opt.ClearInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]);
+ TC_LOG_ERROR("server.loading", "LogDB.Opt.ClearInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]);
m_int_configs[CONFIG_LOGDB_CLEARINTERVAL] = 10;
}
if (reload)
@@ -898,7 +898,7 @@ void World::LoadConfigSettings(bool reload)
m_timers[WUPDATE_CLEANDB].Reset();
}
m_int_configs[CONFIG_LOGDB_CLEARTIME] = sConfigMgr->GetIntDefault("LogDB.Opt.ClearTime", 1209600); // 14 days default
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Will clear `logs` table of entries older than %i seconds every %u minutes.",
+ TC_LOG_INFO("server.loading", "Will clear `logs` table of entries older than %i seconds every %u minutes.",
m_int_configs[CONFIG_LOGDB_CLEARTIME], m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]);
m_int_configs[CONFIG_SKILL_CHANCE_ORANGE] = sConfigMgr->GetIntDefault("SkillChance.Orange", 100);
@@ -923,7 +923,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] = sConfigMgr->GetIntDefault("MaxOverspeedPings", 2);
if (m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] != 0 && m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] < 2)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "MaxOverspeedPings (%i) must be in range 2..infinity (or 0 to disable check). Set to 2.", m_int_configs[CONFIG_MAX_OVERSPEED_PINGS]);
+ TC_LOG_ERROR("server.loading", "MaxOverspeedPings (%i) must be in range 2..infinity (or 0 to disable check). Set to 2.", m_int_configs[CONFIG_MAX_OVERSPEED_PINGS]);
m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] = 2;
}
@@ -938,7 +938,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetIntDefault("Expansion", 1);
if (val != m_int_configs[CONFIG_EXPANSION])
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Expansion option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_EXPANSION]);
+ TC_LOG_ERROR("server.loading", "Expansion option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_EXPANSION]);
}
else
m_int_configs[CONFIG_EXPANSION] = sConfigMgr->GetIntDefault("Expansion", 1);
@@ -970,14 +970,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = sConfigMgr->GetIntDefault("Battleground.Random.ResetHour", 6);
if (m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Battleground.Random.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR]);
+ TC_LOG_ERROR("server.loading", "Battleground.Random.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR]);
m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = 6;
}
m_int_configs[CONFIG_GUILD_RESET_HOUR] = sConfigMgr->GetIntDefault("Guild.ResetHour", 6);
if (m_int_configs[CONFIG_GUILD_RESET_HOUR] > 23)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Guild.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_GUILD_RESET_HOUR]);
+ TC_LOG_ERROR("misc", "Guild.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_GUILD_RESET_HOUR]);
m_int_configs[CONFIG_GUILD_RESET_HOUR] = 6;
}
@@ -1042,10 +1042,10 @@ void World::LoadConfigSettings(bool reload)
if (clientCacheId > 0)
{
m_int_configs[CONFIG_CLIENTCACHE_VERSION] = clientCacheId;
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Client cache version set to: %u", clientCacheId);
+ TC_LOG_INFO("server.loading", "Client cache version set to: %u", clientCacheId);
}
else
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "ClientCacheVersion can't be negative %d, ignored.", clientCacheId);
+ TC_LOG_ERROR("server.loading", "ClientCacheVersion can't be negative %d, ignored.", clientCacheId);
}
m_int_configs[CONFIG_GUILD_EVENT_LOG_COUNT] = sConfigMgr->GetIntDefault("Guild.EventLogRecordsCount", GUILD_EVENTLOG_MAX_RECORDS);
@@ -1059,12 +1059,12 @@ void World::LoadConfigSettings(bool reload)
m_MaxVisibleDistanceOnContinents = sConfigMgr->GetFloatDefault("Visibility.Distance.Continents", DEFAULT_VISIBILITY_DISTANCE);
if (m_MaxVisibleDistanceOnContinents < 45*sWorld->getRate(RATE_CREATURE_AGGRO))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Visibility.Distance.Continents can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO));
+ TC_LOG_ERROR("server.loading", "Visibility.Distance.Continents can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO));
m_MaxVisibleDistanceOnContinents = 45*sWorld->getRate(RATE_CREATURE_AGGRO);
}
else if (m_MaxVisibleDistanceOnContinents > MAX_VISIBILITY_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Visibility.Distance.Continents can't be greater %f", MAX_VISIBILITY_DISTANCE);
+ TC_LOG_ERROR("server.loading", "Visibility.Distance.Continents can't be greater %f", MAX_VISIBILITY_DISTANCE);
m_MaxVisibleDistanceOnContinents = MAX_VISIBILITY_DISTANCE;
}
@@ -1072,12 +1072,12 @@ void World::LoadConfigSettings(bool reload)
m_MaxVisibleDistanceInInstances = sConfigMgr->GetFloatDefault("Visibility.Distance.Instances", DEFAULT_VISIBILITY_INSTANCE);
if (m_MaxVisibleDistanceInInstances < 45*sWorld->getRate(RATE_CREATURE_AGGRO))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Visibility.Distance.Instances can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO));
+ TC_LOG_ERROR("server.loading", "Visibility.Distance.Instances can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO));
m_MaxVisibleDistanceInInstances = 45*sWorld->getRate(RATE_CREATURE_AGGRO);
}
else if (m_MaxVisibleDistanceInInstances > MAX_VISIBILITY_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Visibility.Distance.Instances can't be greater %f", MAX_VISIBILITY_DISTANCE);
+ TC_LOG_ERROR("server.loading", "Visibility.Distance.Instances can't be greater %f", MAX_VISIBILITY_DISTANCE);
m_MaxVisibleDistanceInInstances = MAX_VISIBILITY_DISTANCE;
}
@@ -1085,12 +1085,12 @@ void World::LoadConfigSettings(bool reload)
m_MaxVisibleDistanceInBGArenas = sConfigMgr->GetFloatDefault("Visibility.Distance.BGArenas", DEFAULT_VISIBILITY_BGARENAS);
if (m_MaxVisibleDistanceInBGArenas < 45*sWorld->getRate(RATE_CREATURE_AGGRO))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Visibility.Distance.BGArenas can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO));
+ TC_LOG_ERROR("server.loading", "Visibility.Distance.BGArenas can't be less max aggro radius %f", 45*sWorld->getRate(RATE_CREATURE_AGGRO));
m_MaxVisibleDistanceInBGArenas = 45*sWorld->getRate(RATE_CREATURE_AGGRO);
}
else if (m_MaxVisibleDistanceInBGArenas > MAX_VISIBILITY_DISTANCE)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Visibility.Distance.BGArenas can't be greater %f", MAX_VISIBILITY_DISTANCE);
+ TC_LOG_ERROR("server.loading", "Visibility.Distance.BGArenas can't be greater %f", MAX_VISIBILITY_DISTANCE);
m_MaxVisibleDistanceInBGArenas = MAX_VISIBILITY_DISTANCE;
}
@@ -1121,16 +1121,16 @@ void World::LoadConfigSettings(bool reload)
if (reload)
{
if (dataPath != m_dataPath)
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "DataDir option can't be changed at worldserver.conf reload, using current value (%s).", m_dataPath.c_str());
+ TC_LOG_ERROR("server.loading", "DataDir option can't be changed at worldserver.conf reload, using current value (%s).", m_dataPath.c_str());
}
else
{
m_dataPath = dataPath;
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Using DataDir %s", m_dataPath.c_str());
+ TC_LOG_INFO("server.loading", "Using DataDir %s", m_dataPath.c_str());
}
m_bool_configs[CONFIG_ENABLE_MMAPS] = sConfigMgr->GetBoolDefault("mmap.enablePathFinding", false);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "WORLD: MMap data directory is: %smmaps", m_dataPath.c_str());
+ TC_LOG_INFO("server.loading", "WORLD: MMap data directory is: %smmaps", m_dataPath.c_str());
m_bool_configs[CONFIG_VMAP_INDOOR_CHECK] = sConfigMgr->GetBoolDefault("vmap.enableIndoorCheck", 0);
bool enableIndoor = sConfigMgr->GetBoolDefault("vmap.enableIndoorCheck", true);
@@ -1138,17 +1138,17 @@ void World::LoadConfigSettings(bool reload)
bool enableHeight = sConfigMgr->GetBoolDefault("vmap.enableHeight", true);
if (!enableHeight)
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
+ TC_LOG_ERROR("server.loading", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
VMAP::VMapFactory::createOrGetVMapManager()->setEnableLineOfSightCalc(enableLOS);
VMAP::VMapFactory::createOrGetVMapManager()->setEnableHeightCalc(enableHeight);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "VMap support included. LineOfSight: %i, getHeight: %i, indoorCheck: %i", enableLOS, enableHeight, enableIndoor);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "VMap data directory is: %svmaps", m_dataPath.c_str());
+ TC_LOG_INFO("server.loading", "VMap support included. LineOfSight: %i, getHeight: %i, indoorCheck: %i", enableLOS, enableHeight, enableIndoor);
+ TC_LOG_INFO("server.loading", "VMap data directory is: %svmaps", m_dataPath.c_str());
m_int_configs[CONFIG_MAX_WHO] = sConfigMgr->GetIntDefault("MaxWhoListReturns", 49);
m_bool_configs[CONFIG_START_ALL_SPELLS] = sConfigMgr->GetBoolDefault("PlayerStart.AllSpells", false);
if (m_bool_configs[CONFIG_START_ALL_SPELLS])
- TC_LOG_WARN(LOG_FILTER_SERVER_LOADING, "PlayerStart.AllSpells enabled - may not function as intended!");
+ TC_LOG_WARN("server.loading", "PlayerStart.AllSpells enabled - may not function as intended!");
m_int_configs[CONFIG_HONOR_AFTER_DUEL] = sConfigMgr->GetIntDefault("HonorPointsAfterDuel", 0);
m_bool_configs[CONFIG_START_ALL_EXPLORED] = sConfigMgr->GetBoolDefault("PlayerStart.MapsExplored", false);
m_bool_configs[CONFIG_START_ALL_REP] = sConfigMgr->GetBoolDefault("PlayerStart.AllReputation", false);
@@ -1291,7 +1291,7 @@ void World::SetInitialWorldSettings()
!MapManager::ExistMapAndVMap(530, 10349.6f, -6357.29f) ||
!MapManager::ExistMapAndVMap(530, -3961.64f, -13931.2f))))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "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());
+ TC_LOG_ERROR("server.loading", "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);
}
@@ -1303,7 +1303,7 @@ void World::SetInitialWorldSettings()
///- Loading strings. Getting no records means core load has to be canceled because no error message can be output.
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Trinity strings...");
+ TC_LOG_INFO("server.loading", "Loading Trinity strings...");
if (!sObjectMgr->LoadTrinityStrings())
exit(1); // Error message displayed in function already
@@ -1322,36 +1322,36 @@ void World::SetInitialWorldSettings()
CharacterDatabase.Execute(stmt);
///- Load the DBC files
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Initialize data stores...");
+ TC_LOG_INFO("server.loading", "Initialize data stores...");
LoadDBCStores(m_dataPath);
DetectDBCLang();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading SpellInfo store...");
+ TC_LOG_INFO("server.loading", "Loading SpellInfo store...");
sSpellMgr->LoadSpellInfoStore();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading SpellInfo corrections...");
+ TC_LOG_INFO("server.loading", "Loading SpellInfo corrections...");
sSpellMgr->LoadSpellInfoCorrections();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading SkillLineAbilityMultiMap Data...");
+ TC_LOG_INFO("server.loading", "Loading SkillLineAbilityMultiMap Data...");
sSpellMgr->LoadSkillLineAbilityMap();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading SpellInfo custom attributes...");
+ TC_LOG_INFO("server.loading", "Loading SpellInfo custom attributes...");
sSpellMgr->LoadSpellInfoCustomAttributes();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GameObject models...");
+ TC_LOG_INFO("server.loading", "Loading GameObject models...");
LoadGameObjectModelList();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Script Names...");
+ TC_LOG_INFO("server.loading", "Loading Script Names...");
sObjectMgr->LoadScriptNames();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Instance Template...");
+ TC_LOG_INFO("server.loading", "Loading Instance Template...");
sObjectMgr->LoadInstanceTemplate();
// Must be called before `creature_respawn`/`gameobject_respawn` tables
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading instances...");
+ TC_LOG_INFO("server.loading", "Loading instances...");
sInstanceSaveMgr->LoadInstances();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Localization strings...");
+ TC_LOG_INFO("server.loading", "Loading Localization strings...");
uint32 oldMSTime = getMSTime();
sObjectMgr->LoadCreatureLocales();
sObjectMgr->LoadGameObjectLocales();
@@ -1364,324 +1364,324 @@ void World::SetInitialWorldSettings()
sObjectMgr->LoadPointOfInterestLocales();
sObjectMgr->SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Localization strings loaded in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Localization strings loaded in %u ms", GetMSTimeDiffToNow(oldMSTime));
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Account Roles and Permissions...");
+ TC_LOG_INFO("server.loading", "Loading Account Roles and Permissions...");
sAccountMgr->LoadRBAC();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Page Texts...");
+ TC_LOG_INFO("server.loading", "Loading Page Texts...");
sObjectMgr->LoadPageTexts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Object Templates..."); // must be after LoadPageTexts
+ TC_LOG_INFO("server.loading", "Loading Game Object Templates..."); // must be after LoadPageTexts
sObjectMgr->LoadGameObjectTemplate();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Transport templates...");
+ TC_LOG_INFO("server.loading", "Loading Transport templates...");
sTransportMgr->LoadTransportTemplates();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Rank Data...");
+ TC_LOG_INFO("server.loading", "Loading Spell Rank Data...");
sSpellMgr->LoadSpellRanks();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Required Data...");
+ TC_LOG_INFO("server.loading", "Loading Spell Required Data...");
sSpellMgr->LoadSpellRequired();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Group types...");
+ TC_LOG_INFO("server.loading", "Loading Spell Group types...");
sSpellMgr->LoadSpellGroups();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Learn Skills...");
+ TC_LOG_INFO("server.loading", "Loading Spell Learn Skills...");
sSpellMgr->LoadSpellLearnSkills(); // must be after LoadSpellRanks
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Learn Spells...");
+ TC_LOG_INFO("server.loading", "Loading Spell Learn Spells...");
sSpellMgr->LoadSpellLearnSpells();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Proc Event conditions...");
+ TC_LOG_INFO("server.loading", "Loading Spell Proc Event conditions...");
sSpellMgr->LoadSpellProcEvents();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Proc conditions and data...");
+ TC_LOG_INFO("server.loading", "Loading Spell Proc conditions and data...");
sSpellMgr->LoadSpellProcs();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Bonus Data...");
+ TC_LOG_INFO("server.loading", "Loading Spell Bonus Data...");
sSpellMgr->LoadSpellBonusess();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Aggro Spells Definitions...");
+ TC_LOG_INFO("server.loading", "Loading Aggro Spells Definitions...");
sSpellMgr->LoadSpellThreats();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell Group Stack Rules...");
+ TC_LOG_INFO("server.loading", "Loading Spell Group Stack Rules...");
sSpellMgr->LoadSpellGroupStackRules();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading NPC Texts...");
+ TC_LOG_INFO("server.loading", "Loading NPC Texts...");
sObjectMgr->LoadGossipText();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Enchant Spells Proc datas...");
+ TC_LOG_INFO("server.loading", "Loading Enchant Spells Proc datas...");
sSpellMgr->LoadSpellEnchantProcData();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Item Random Enchantments Table...");
+ TC_LOG_INFO("server.loading", "Loading Item Random Enchantments Table...");
LoadRandomEnchantmentsTable();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Disables"); // must be before loading quests and items
+ TC_LOG_INFO("server.loading", "Loading Disables"); // must be before loading quests and items
DisableMgr::LoadDisables();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
+ TC_LOG_INFO("server.loading", "Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
sObjectMgr->LoadItemTemplates();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Item set names..."); // must be after LoadItemPrototypes
+ TC_LOG_INFO("server.loading", "Loading Item set names..."); // must be after LoadItemPrototypes
sObjectMgr->LoadItemSetNames();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Model Based Info Data...");
+ TC_LOG_INFO("server.loading", "Loading Creature Model Based Info Data...");
sObjectMgr->LoadCreatureModelInfo();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature templates...");
+ TC_LOG_INFO("server.loading", "Loading Creature templates...");
sObjectMgr->LoadCreatureTemplates();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Equipment templates..."); // must be after LoadCreatureTemplates
+ TC_LOG_INFO("server.loading", "Loading Equipment templates..."); // must be after LoadCreatureTemplates
sObjectMgr->LoadEquipmentTemplates();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature template addons...");
+ TC_LOG_INFO("server.loading", "Loading Creature template addons...");
sObjectMgr->LoadCreatureTemplateAddons();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Reputation Reward Rates...");
+ TC_LOG_INFO("server.loading", "Loading Reputation Reward Rates...");
sObjectMgr->LoadReputationRewardRate();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Reputation OnKill Data...");
+ TC_LOG_INFO("server.loading", "Loading Creature Reputation OnKill Data...");
sObjectMgr->LoadReputationOnKill();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Reputation Spillover Data...");
+ TC_LOG_INFO("server.loading", "Loading Reputation Spillover Data...");
sObjectMgr->LoadReputationSpilloverTemplate();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Points Of Interest Data...");
+ TC_LOG_INFO("server.loading", "Loading Points Of Interest Data...");
sObjectMgr->LoadPointsOfInterest();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Base Stats...");
+ TC_LOG_INFO("server.loading", "Loading Creature Base Stats...");
sObjectMgr->LoadCreatureClassLevelStats();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Data...");
+ TC_LOG_INFO("server.loading", "Loading Creature Data...");
sObjectMgr->LoadCreatures();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Temporary Summon Data...");
+ TC_LOG_INFO("server.loading", "Loading Temporary Summon Data...");
sObjectMgr->LoadTempSummons(); // must be after LoadCreatureTemplates() and LoadGameObjectTemplates()
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading pet levelup spells...");
+ TC_LOG_INFO("server.loading", "Loading pet levelup spells...");
sSpellMgr->LoadPetLevelupSpellMap();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading pet default spells additional to levelup spells...");
+ TC_LOG_INFO("server.loading", "Loading pet default spells additional to levelup spells...");
sSpellMgr->LoadPetDefaultSpells();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Addon Data...");
+ TC_LOG_INFO("server.loading", "Loading Creature Addon Data...");
sObjectMgr->LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Gameobject Data...");
+ TC_LOG_INFO("server.loading", "Loading Gameobject Data...");
sObjectMgr->LoadGameobjects();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Linked Respawn...");
+ TC_LOG_INFO("server.loading", "Loading Creature Linked Respawn...");
sObjectMgr->LoadLinkedRespawn(); // must be after LoadCreatures(), LoadGameObjects()
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Weather Data...");
+ TC_LOG_INFO("server.loading", "Loading Weather Data...");
WeatherMgr::LoadWeatherData();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quests...");
+ TC_LOG_INFO("server.loading", "Loading Quests...");
sObjectMgr->LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Checking Quest Disables");
+ TC_LOG_INFO("server.loading", "Checking Quest Disables");
DisableMgr::CheckQuestDisables(); // must be after loading quests
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quest POI");
+ TC_LOG_INFO("server.loading", "Loading Quest POI");
sObjectMgr->LoadQuestPOI();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quests Starters and Enders...");
+ TC_LOG_INFO("server.loading", "Loading Quests Starters and Enders...");
sObjectMgr->LoadQuestStartersAndEnders(); // must be after quest load
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Objects Pooling Data...");
+ TC_LOG_INFO("server.loading", "Loading Objects Pooling Data...");
sPoolMgr->LoadFromDB();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Game Event Data..."); // must be after loading pools fully
+ TC_LOG_INFO("server.loading", "Loading Game Event Data..."); // must be after loading pools fully
sGameEventMgr->LoadFromDB();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); // must be after LoadQuests
+ TC_LOG_INFO("server.loading", "Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); // must be after LoadQuests
sObjectMgr->LoadNPCSpellClickSpells();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Vehicle Template Accessories...");
+ TC_LOG_INFO("server.loading", "Loading Vehicle Template Accessories...");
sObjectMgr->LoadVehicleTemplateAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells()
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Vehicle Accessories...");
+ TC_LOG_INFO("server.loading", "Loading Vehicle Accessories...");
sObjectMgr->LoadVehicleAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells()
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading SpellArea Data..."); // must be after quest load
+ TC_LOG_INFO("server.loading", "Loading SpellArea Data..."); // must be after quest load
sSpellMgr->LoadSpellAreas();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading AreaTrigger definitions...");
+ TC_LOG_INFO("server.loading", "Loading AreaTrigger definitions...");
sObjectMgr->LoadAreaTriggerTeleports();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Access Requirements...");
+ TC_LOG_INFO("server.loading", "Loading Access Requirements...");
sObjectMgr->LoadAccessRequirements(); // must be after item template load
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quest Area Triggers...");
+ TC_LOG_INFO("server.loading", "Loading Quest Area Triggers...");
sObjectMgr->LoadQuestAreaTriggers(); // must be after LoadQuests
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Tavern Area Triggers...");
+ TC_LOG_INFO("server.loading", "Loading Tavern Area Triggers...");
sObjectMgr->LoadTavernAreaTriggers();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading AreaTrigger script names...");
+ TC_LOG_INFO("server.loading", "Loading AreaTrigger script names...");
sObjectMgr->LoadAreaTriggerScripts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading LFG entrance positions..."); // Must be after areatriggers
+ TC_LOG_INFO("server.loading", "Loading LFG entrance positions..."); // Must be after areatriggers
sLFGMgr->LoadLFGDungeons();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Dungeon boss data...");
+ TC_LOG_INFO("server.loading", "Loading Dungeon boss data...");
sObjectMgr->LoadInstanceEncounters();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading LFG rewards...");
+ TC_LOG_INFO("server.loading", "Loading LFG rewards...");
sLFGMgr->LoadRewards();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Graveyard-zone links...");
+ TC_LOG_INFO("server.loading", "Loading Graveyard-zone links...");
sObjectMgr->LoadGraveyardZones();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading spell pet auras...");
+ TC_LOG_INFO("server.loading", "Loading spell pet auras...");
sSpellMgr->LoadSpellPetAuras();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Spell target coordinates...");
+ TC_LOG_INFO("server.loading", "Loading Spell target coordinates...");
sSpellMgr->LoadSpellTargetPositions();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading enchant custom attributes...");
+ TC_LOG_INFO("server.loading", "Loading enchant custom attributes...");
sSpellMgr->LoadEnchantCustomAttr();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading linked spells...");
+ TC_LOG_INFO("server.loading", "Loading linked spells...");
sSpellMgr->LoadSpellLinked();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Create Data...");
+ TC_LOG_INFO("server.loading", "Loading Player Create Data...");
sObjectMgr->LoadPlayerInfo();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Exploration BaseXP Data...");
+ TC_LOG_INFO("server.loading", "Loading Exploration BaseXP Data...");
sObjectMgr->LoadExplorationBaseXP();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Pet Name Parts...");
+ TC_LOG_INFO("server.loading", "Loading Pet Name Parts...");
sObjectMgr->LoadPetNames();
CharacterDatabaseCleaner::CleanDatabase();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading the max pet number...");
+ TC_LOG_INFO("server.loading", "Loading the max pet number...");
sObjectMgr->LoadPetNumber();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading pet level stats...");
+ TC_LOG_INFO("server.loading", "Loading pet level stats...");
sObjectMgr->LoadPetLevelInfo();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player Corpses...");
+ TC_LOG_INFO("server.loading", "Loading Player Corpses...");
sObjectMgr->LoadCorpses();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Player level dependent mail rewards...");
+ TC_LOG_INFO("server.loading", "Loading Player level dependent mail rewards...");
sObjectMgr->LoadMailLevelRewards();
// Loot tables
LoadLootTables();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Skill Discovery Table...");
+ TC_LOG_INFO("server.loading", "Loading Skill Discovery Table...");
LoadSkillDiscoveryTable();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Skill Extra Item Table...");
+ TC_LOG_INFO("server.loading", "Loading Skill Extra Item Table...");
LoadSkillExtraItemTable();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Skill Fishing base level requirements...");
+ TC_LOG_INFO("server.loading", "Loading Skill Fishing base level requirements...");
sObjectMgr->LoadFishingBaseSkillLevel();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Achievements...");
+ TC_LOG_INFO("server.loading", "Loading Achievements...");
sAchievementMgr->LoadAchievementReferenceList();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Achievement Criteria Lists...");
+ TC_LOG_INFO("server.loading", "Loading Achievement Criteria Lists...");
sAchievementMgr->LoadAchievementCriteriaList();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Achievement Criteria Data...");
+ TC_LOG_INFO("server.loading", "Loading Achievement Criteria Data...");
sAchievementMgr->LoadAchievementCriteriaData();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Achievement Rewards...");
+ TC_LOG_INFO("server.loading", "Loading Achievement Rewards...");
sAchievementMgr->LoadRewards();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Achievement Reward Locales...");
+ TC_LOG_INFO("server.loading", "Loading Achievement Reward Locales...");
sAchievementMgr->LoadRewardLocales();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Completed Achievements...");
+ TC_LOG_INFO("server.loading", "Loading Completed Achievements...");
sAchievementMgr->LoadCompletedAchievements();
// Delete expired auctions before loading
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Deleting expired auctions...");
+ TC_LOG_INFO("server.loading", "Deleting expired auctions...");
sAuctionMgr->DeleteExpiredAuctionsAtStartup();
///- Load dynamic data tables from the database
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Item Auctions...");
+ TC_LOG_INFO("server.loading", "Loading Item Auctions...");
sAuctionMgr->LoadAuctionItems();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Auctions...");
+ TC_LOG_INFO("server.loading", "Loading Auctions...");
sAuctionMgr->LoadAuctions();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Guilds...");
+ TC_LOG_INFO("server.loading", "Loading Guilds...");
sGuildMgr->LoadGuilds();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading ArenaTeams...");
+ TC_LOG_INFO("server.loading", "Loading ArenaTeams...");
sArenaTeamMgr->LoadArenaTeams();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Groups...");
+ TC_LOG_INFO("server.loading", "Loading Groups...");
sGroupMgr->LoadGroups();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading ReservedNames...");
+ TC_LOG_INFO("server.loading", "Loading ReservedNames...");
sObjectMgr->LoadReservedPlayersNames();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GameObjects for quests...");
+ TC_LOG_INFO("server.loading", "Loading GameObjects for quests...");
sObjectMgr->LoadGameObjectForQuests();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading BattleMasters...");
+ TC_LOG_INFO("server.loading", "Loading BattleMasters...");
sBattlegroundMgr->LoadBattleMastersEntry();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GameTeleports...");
+ TC_LOG_INFO("server.loading", "Loading GameTeleports...");
sObjectMgr->LoadGameTele();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Gossip menu...");
+ TC_LOG_INFO("server.loading", "Loading Gossip menu...");
sObjectMgr->LoadGossipMenu();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Gossip menu options...");
+ TC_LOG_INFO("server.loading", "Loading Gossip menu options...");
sObjectMgr->LoadGossipMenuItems();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Vendors...");
+ TC_LOG_INFO("server.loading", "Loading Vendors...");
sObjectMgr->LoadVendors(); // must be after load CreatureTemplate and ItemTemplate
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Trainers...");
+ TC_LOG_INFO("server.loading", "Loading Trainers...");
sObjectMgr->LoadTrainerSpell(); // must be after load CreatureTemplate
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Waypoints...");
+ TC_LOG_INFO("server.loading", "Loading Waypoints...");
sWaypointMgr->Load();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading SmartAI Waypoints...");
+ TC_LOG_INFO("server.loading", "Loading SmartAI Waypoints...");
sSmartWaypointMgr->LoadFromDB();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Formations...");
+ TC_LOG_INFO("server.loading", "Loading Creature Formations...");
sFormationMgr->LoadCreatureFormations();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
+ TC_LOG_INFO("server.loading", "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
LoadWorldStates();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Conditions...");
+ TC_LOG_INFO("server.loading", "Loading Conditions...");
sConditionMgr->LoadConditions();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading faction change achievement pairs...");
+ TC_LOG_INFO("server.loading", "Loading faction change achievement pairs...");
sObjectMgr->LoadFactionChangeAchievements();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading faction change spell pairs...");
+ TC_LOG_INFO("server.loading", "Loading faction change spell pairs...");
sObjectMgr->LoadFactionChangeSpells();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading faction change item pairs...");
+ TC_LOG_INFO("server.loading", "Loading faction change item pairs...");
sObjectMgr->LoadFactionChangeItems();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading faction change reputation pairs...");
+ TC_LOG_INFO("server.loading", "Loading faction change reputation pairs...");
sObjectMgr->LoadFactionChangeReputations();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading faction change title pairs...");
+ TC_LOG_INFO("server.loading", "Loading faction change title pairs...");
sObjectMgr->LoadFactionChangeTitles();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GM tickets...");
+ TC_LOG_INFO("server.loading", "Loading GM tickets...");
sTicketMgr->LoadTickets();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GM surveys...");
+ TC_LOG_INFO("server.loading", "Loading GM surveys...");
sTicketMgr->LoadSurveys();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading client addons...");
+ TC_LOG_INFO("server.loading", "Loading client addons...");
AddonMgr::LoadFromDB();
///- Handle outdated emails (delete/return)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Returning old mails...");
+ TC_LOG_INFO("server.loading", "Returning old mails...");
sObjectMgr->ReturnOrDeleteOldMails(false);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Autobroadcasts...");
+ TC_LOG_INFO("server.loading", "Loading Autobroadcasts...");
LoadAutobroadcasts();
///- Load and initialize scripts
@@ -1689,39 +1689,39 @@ void World::SetInitialWorldSettings()
sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr->LoadWaypointScripts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Scripts text locales..."); // must be after Load*Scripts calls
+ TC_LOG_INFO("server.loading", "Loading Scripts text locales..."); // must be after Load*Scripts calls
sObjectMgr->LoadDbScriptStrings();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading CreatureEventAI Texts...");
+ TC_LOG_INFO("server.loading", "Loading CreatureEventAI Texts...");
sEventAIMgr->LoadCreatureEventAI_Texts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading CreatureEventAI Scripts...");
+ TC_LOG_INFO("server.loading", "Loading CreatureEventAI Scripts...");
sEventAIMgr->LoadCreatureEventAI_Scripts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading spell script names...");
+ TC_LOG_INFO("server.loading", "Loading spell script names...");
sObjectMgr->LoadSpellScriptNames();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Texts...");
+ TC_LOG_INFO("server.loading", "Loading Creature Texts...");
sCreatureTextMgr->LoadCreatureTexts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Text Locales...");
+ TC_LOG_INFO("server.loading", "Loading Creature Text Locales...");
sCreatureTextMgr->LoadCreatureTextLocales();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Initializing Scripts...");
+ TC_LOG_INFO("server.loading", "Initializing Scripts...");
sScriptMgr->Initialize();
sScriptMgr->OnConfigLoad(false); // must be done after the ScriptMgr has been properly initialized
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Validating spell scripts...");
+ TC_LOG_INFO("server.loading", "Validating spell scripts...");
sObjectMgr->ValidateSpellScripts();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading SmartAI scripts...");
+ TC_LOG_INFO("server.loading", "Loading SmartAI scripts...");
sSmartScriptMgr->LoadSmartAIFromDB();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Calendar data...");
+ TC_LOG_INFO("server.loading", "Loading Calendar data...");
sCalendarMgr->LoadFromDB();
///- Initialize game time and timers
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Initialize game time and timers");
+ TC_LOG_INFO("server.loading", "Initialize game time and timers");
m_gameTime = time(NULL);
m_startTime = m_gameTime;
@@ -1750,16 +1750,16 @@ void World::SetInitialWorldSettings()
mail_timer = ((((localTm.tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval());
//1440
mail_timer_expires = ((DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval()));
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires));
+ TC_LOG_INFO("server.loading", "Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires));
///- Initilize static helper structures
AIRegistry::Initialize();
///- Initialize MapManager
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting Map System");
+ TC_LOG_INFO("server.loading", "Starting Map System");
sMapMgr->Initialize();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting Game Event system...");
+ TC_LOG_INFO("server.loading", "Starting Game Event system...");
uint32 nextGameEvent = sGameEventMgr->StartSystem();
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event
@@ -1769,57 +1769,57 @@ void World::SetInitialWorldSettings()
// Delete all custom channels which haven't been used for PreserveCustomChannelDuration days.
Channel::CleanOldChannelsInDB();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting Arena Season...");
+ TC_LOG_INFO("server.loading", "Starting Arena Season...");
sGameEventMgr->StartArenaSeason();
sTicketMgr->Initialize();
///- Initialize Battlegrounds
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting Battleground System");
+ TC_LOG_INFO("server.loading", "Starting Battleground System");
sBattlegroundMgr->CreateInitialBattlegrounds();
sBattlegroundMgr->InitAutomaticArenaPointDistribution();
///- Initialize outdoor pvp
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting Outdoor PvP System");
+ TC_LOG_INFO("server.loading", "Starting Outdoor PvP System");
sOutdoorPvPMgr->InitOutdoorPvP();
///- Initialize Battlefield
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting Battlefield System");
+ TC_LOG_INFO("server.loading", "Starting Battlefield System");
sBattlefieldMgr->InitBattlefield();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Transports...");
+ TC_LOG_INFO("server.loading", "Loading Transports...");
sTransportMgr->SpawnContinentTransports();
///- Initialize Warden
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Warden Checks...");
+ TC_LOG_INFO("server.loading", "Loading Warden Checks...");
sWardenCheckMgr->LoadWardenChecks();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Warden Action Overrides...");
+ TC_LOG_INFO("server.loading", "Loading Warden Action Overrides...");
sWardenCheckMgr->LoadWardenOverrides();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Deleting expired bans...");
+ TC_LOG_INFO("server.loading", "Deleting expired bans...");
LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); // One-time query
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Calculate next daily quest reset time...");
+ TC_LOG_INFO("server.loading", "Calculate next daily quest reset time...");
InitDailyQuestResetTime();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Calculate next weekly quest reset time...");
+ TC_LOG_INFO("server.loading", "Calculate next weekly quest reset time...");
InitWeeklyQuestResetTime();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Calculate next monthly quest reset time...");
+ TC_LOG_INFO("server.loading", "Calculate next monthly quest reset time...");
InitMonthlyQuestResetTime();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Calculate random battleground reset time...");
+ TC_LOG_INFO("server.loading", "Calculate random battleground reset time...");
InitRandomBGResetTime();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Calculate guild limitation(s) reset time...");
+ TC_LOG_INFO("server.loading", "Calculate guild limitation(s) reset time...");
InitGuildResetTime();
LoadCharacterNameData();
uint32 startupDuration = GetMSTimeDiffToNow(startupBegin);
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000));
+ TC_LOG_INFO("server.worldserver", "World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000));
if (uint32 realmId = sConfigMgr->GetIntDefault("RealmID", 0)) // 0 reserved for auth
sLog->SetRealmId(realmId);
@@ -1831,7 +1831,7 @@ void World::DetectDBCLang()
if (m_lang_confid != 255 && m_lang_confid >= TOTAL_LOCALES)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)", TOTAL_LOCALES);
+ TC_LOG_ERROR("server.loading", "Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)", TOTAL_LOCALES);
m_lang_confid = LOCALE_enUS;
}
@@ -1859,13 +1859,13 @@ void World::DetectDBCLang()
if (default_locale >= TOTAL_LOCALES)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Unable to determine your DBC Locale! (corrupt DBC?)");
+ TC_LOG_ERROR("server.loading", "Unable to determine your DBC Locale! (corrupt DBC?)");
exit(1);
}
m_defaultDbcLocale = LocaleConstant(default_locale);
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[m_defaultDbcLocale], availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());
+ TC_LOG_INFO("server.loading", "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[m_defaultDbcLocale], availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());
}
void World::RecordTimeDiff(const char *text, ...)
@@ -1888,7 +1888,7 @@ void World::RecordTimeDiff(const char *text, ...)
va_start(ap, text);
vsnprintf(str, 256, text, ap);
va_end(ap);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Difftime %s: %u.", str, diff);
+ TC_LOG_INFO("misc", "Difftime %s: %u.", str, diff);
}
m_currentTime = thisTime;
@@ -1908,7 +1908,7 @@ void World::LoadAutobroadcasts()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty for this realm!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty for this realm!");
return;
}
@@ -1925,7 +1925,7 @@ void World::LoadAutobroadcasts()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u autobroadcast definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u autobroadcast definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
/// Update the World !
@@ -1937,7 +1937,7 @@ void World::Update(uint32 diff)
{
if (m_updateTimeSum > m_int_configs[CONFIG_INTERVAL_LOG_UPDATE])
{
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Update time diff: %u. Players online: %u.", m_updateTimeSum / m_updateTimeCount, GetActiveSessionCount());
+ TC_LOG_DEBUG("misc", "Update time diff: %u. Players online: %u.", m_updateTimeSum / m_updateTimeCount, GetActiveSessionCount());
m_updateTimeSum = m_updateTime;
m_updateTimeCount = 1;
}
@@ -2102,7 +2102,7 @@ void World::Update(uint32 diff)
if (m_timers[WUPDATE_PINGDB].Passed())
{
m_timers[WUPDATE_PINGDB].Reset();
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Ping MySQL to keep connection alive");
+ TC_LOG_DEBUG("misc", "Ping MySQL to keep connection alive");
CharacterDatabase.KeepAlive();
LoginDatabase.KeepAlive();
WorldDatabase.KeepAlive();
@@ -2169,7 +2169,7 @@ namespace Trinity
{
public:
typedef std::vector<WorldPacket*> WorldPacketList;
- explicit WorldWorldTextBuilder(int32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) {}
+ explicit WorldWorldTextBuilder(int32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) { }
void operator()(WorldPacketList& data_list, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx);
@@ -2589,7 +2589,7 @@ void World::ShutdownMsg(bool show, Player* player)
ServerMessageType msgid = (m_ShutdownMask & SHUTDOWN_MASK_RESTART) ? SERVER_MSG_RESTART_TIME : SERVER_MSG_SHUTDOWN_TIME;
SendServerMessage(msgid, str.c_str(), player);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Server is %s in %s", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"), str.c_str());
+ TC_LOG_DEBUG("misc", "Server is %s in %s", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"), str.c_str());
}
}
@@ -2607,7 +2607,7 @@ void World::ShutdownCancel()
m_ExitCode = SHUTDOWN_EXIT_CODE; // to default value
SendServerMessage(msgid);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Server %s cancelled.", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"));
+ TC_LOG_DEBUG("misc", "Server %s cancelled.", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"));
sScriptMgr->OnShutdownCancel();
}
@@ -2663,7 +2663,7 @@ void World::ProcessCliCommands()
CliCommandHolder* command = NULL;
while (cliCmdQueue.next(command))
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "CLI command under processing...");
+ TC_LOG_INFO("misc", "CLI command under processing...");
zprint = command->m_print;
callbackArg = command->m_callbackArg;
CliHandler handler(callbackArg, zprint);
@@ -2728,7 +2728,7 @@ void World::SendAutoBroadcast()
sWorld->SendGlobalMessage(&data);
}
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "AutoBroadcast: '%s'", msg.c_str());
+ TC_LOG_DEBUG("misc", "AutoBroadcast: '%s'", msg.c_str());
}
void World::UpdateRealmCharCount(uint32 accountId)
@@ -2867,7 +2867,7 @@ void World::InitGuildResetTime()
void World::ResetDailyQuests()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Daily quests reset for all characters.");
+ TC_LOG_INFO("misc", "Daily quests reset for all characters.");
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_DAILY);
CharacterDatabase.Execute(stmt);
@@ -2901,7 +2901,7 @@ void World::SetPlayerSecurityLimit(AccountTypes _sec)
void World::ResetWeeklyQuests()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Weekly quests reset for all characters.");
+ TC_LOG_INFO("misc", "Weekly quests reset for all characters.");
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_WEEKLY);
CharacterDatabase.Execute(stmt);
@@ -2919,7 +2919,7 @@ void World::ResetWeeklyQuests()
void World::ResetMonthlyQuests()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Monthly quests reset for all characters.");
+ TC_LOG_INFO("misc", "Monthly quests reset for all characters.");
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_MONTHLY);
CharacterDatabase.Execute(stmt);
@@ -2974,7 +2974,7 @@ void World::ResetEventSeasonalQuests(uint16 event_id)
void World::ResetRandomBG()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Random BG status reset for all characters.");
+ TC_LOG_INFO("misc", "Random BG status reset for all characters.");
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_BATTLEGROUND_RANDOM);
CharacterDatabase.Execute(stmt);
@@ -2989,7 +2989,7 @@ void World::ResetRandomBG()
void World::ResetGuildCap()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Guild Daily Cap reset.");
+ TC_LOG_INFO("misc", "Guild Daily Cap reset.");
m_NextGuildReset = time_t(m_NextGuildReset + DAY);
sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint64(m_NextGuildReset));
@@ -3047,7 +3047,7 @@ void World::LoadWorldStates()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 world states. DB table `worldstates` is empty!");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 world states. DB table `worldstates` is empty!");
return;
}
@@ -3062,7 +3062,7 @@ void World::LoadWorldStates()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u world states in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u world states in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
@@ -3140,12 +3140,12 @@ void World::ProcessQueryCallbacks()
void World::LoadCharacterNameData()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading character name data");
+ TC_LOG_INFO("server.loading", "Loading character name data");
QueryResult result = CharacterDatabase.Query("SELECT guid, name, race, gender, class, level FROM characters WHERE deleteDate IS NULL");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "No character name data loaded, empty query");
+ TC_LOG_INFO("server.loading", "No character name data loaded, empty query");
return;
}
@@ -3159,7 +3159,7 @@ void World::LoadCharacterNameData()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loaded name data for %u characters", count);
+ TC_LOG_INFO("server.loading", "Loaded name data for %u characters", count);
}
void World::AddCharacterNameData(uint32 guid, std::string const& name, uint8 gender, uint8 race, uint8 playerClass, uint8 level)
@@ -3208,7 +3208,7 @@ CharacterNameData const* World::GetCharacterNameData(uint32 guid) const
void World::ReloadRBAC()
{
// Passive reload, we mark the data as invalidated and next time a permission is checked it will be reloaded
- TC_LOG_INFO(LOG_FILTER_RBAC, "World::ReloadRBAC()");
+ TC_LOG_INFO("rbac", "World::ReloadRBAC()");
for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
if (WorldSession* session = itr->second)
session->InvalidateRBACData();
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 45ab88e9688..6e9dbea8b21 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -133,7 +133,7 @@ public:
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName);
if (handler->GetSession())
{
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Character:[%s] (GUID: %u) created Account %s (Email: '%s')",
+ TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Character:[%s] (GUID: %u) created Account %s (Email: '%s')",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
accountName, email.c_str());
@@ -298,7 +298,7 @@ public:
else
{
handler->PSendSysMessage("[IP2NATION] Table empty");
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "[IP2NATION] Table empty");
+ TC_LOG_DEBUG("server.authserver", "[IP2NATION] Table empty");
}
}
else if (param == "off")
@@ -378,7 +378,7 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL);
handler->SetSentErrorMessage(true);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided email [%s] is not equal to registration email [%s].",
+ TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided email [%s] is not equal to registration email [%s].",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
email, oldEmail);
@@ -389,7 +389,7 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
handler->SetSentErrorMessage(true);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided password is wrong.",
+ TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided password is wrong.",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
return false;
@@ -406,7 +406,7 @@ public:
{
handler->SendSysMessage(LANG_NEW_EMAILS_NOT_MATCH);
handler->SetSentErrorMessage(true);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided password is wrong.",
+ TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change email, but the provided password is wrong.",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
return false;
@@ -418,7 +418,7 @@ public:
{
case AOR_OK:
handler->SendSysMessage(LANG_COMMAND_EMAIL);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Email from [%s] to [%s].",
+ TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Email from [%s] to [%s].",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
oldEmail, email);
@@ -470,7 +470,7 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGOLDPASSWORD);
handler->SetSentErrorMessage(true);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the provided old password is wrong.",
+ TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the provided old password is wrong.",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
return false;
@@ -482,7 +482,7 @@ public:
{
handler->SendSysMessage(LANG_COMMAND_WRONGEMAIL);
handler->SetSentErrorMessage(true);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the entered email [%s] is wrong.",
+ TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Tried to change password, but the entered email [%s] is wrong.",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(),
emailConfirmation);
@@ -503,7 +503,7 @@ public:
{
case AOR_OK:
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.",
+ TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Character:[%s] (GUID: %u) Changed Password.",
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
break;
@@ -845,7 +845,7 @@ public:
{
case AOR_OK:
handler->SendSysMessage(LANG_COMMAND_EMAIL);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "ChangeEmail: Account %s [Id: %u] had it's email changed to %s.",
+ TC_LOG_INFO("entities.player.character", "ChangeEmail: Account %s [Id: %u] had it's email changed to %s.",
accountName.c_str(), targetAccountId, email);
break;
case AOR_NAME_NOT_EXIST:
@@ -921,7 +921,7 @@ public:
{
case AOR_OK:
handler->SendSysMessage(LANG_COMMAND_EMAIL);
- TC_LOG_INFO(LOG_FILTER_CHARACTER, "ChangeRegEmail: Account %s [Id: %u] had it's Registration Email changed to %s.",
+ TC_LOG_INFO("entities.player.character", "ChangeRegEmail: Account %s [Id: %u] had it's Registration Email changed to %s.",
accountName.c_str(), targetAccountId, email);
break;
case AOR_NAME_NOT_EXIST:
diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp
index 57eb87d0ef8..42cfa50bc05 100644
--- a/src/server/scripts/Commands/cs_arena.cpp
+++ b/src/server/scripts/Commands/cs_arena.cpp
@@ -143,10 +143,10 @@ public:
std::string name = arena->GetName();
arena->Disband();
if (handler->GetSession())
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "GameMaster: %s [GUID: %u] disbanded arena team type: %u [Id: %u].",
+ TC_LOG_DEBUG("bg.arena", "GameMaster: %s [GUID: %u] disbanded arena team type: %u [Id: %u].",
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), arena->GetType(), teamId);
else
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Console: disbanded arena team type: %u [Id: %u].", arena->GetType(), teamId);
+ TC_LOG_DEBUG("bg.arena", "Console: disbanded arena team type: %u [Id: %u].", arena->GetType(), teamId);
delete(arena);
@@ -208,10 +208,10 @@ public:
handler->PSendSysMessage(LANG_ARENA_RENAME, arena->GetId(), oldArenaStr, newArenaStr);
if (handler->GetSession())
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "GameMaster: %s [GUID: %u] rename arena team \"%s\"[Id: %u] to \"%s\"",
+ TC_LOG_DEBUG("bg.arena", "GameMaster: %s [GUID: %u] rename arena team \"%s\"[Id: %u] to \"%s\"",
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), oldArenaStr, arena->GetId(), newArenaStr);
else
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Console: rename arena team \"%s\"[Id: %u] to \"%s\"", oldArenaStr, arena->GetId(), newArenaStr);
+ TC_LOG_DEBUG("bg.arena", "Console: rename arena team \"%s\"[Id: %u] to \"%s\"", oldArenaStr, arena->GetId(), newArenaStr);
return true;
}
@@ -284,10 +284,10 @@ public:
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName().c_str(), arena->GetId(), oldCaptainNameData->m_name.c_str(), target->GetName().c_str());
if (handler->GetSession())
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "GameMaster: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team \"%s\"[Id: %u]",
+ TC_LOG_DEBUG("bg.arena", "GameMaster: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team \"%s\"[Id: %u]",
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), target->GetName().c_str(), target->GetGUIDLow(), arena->GetName().c_str(), arena->GetId());
else
- TC_LOG_DEBUG(LOG_FILTER_ARENAS, "Console: promoted player: %s [GUID: %u] to leader of arena team \"%s\"[Id: %u]",
+ TC_LOG_DEBUG("bg.arena", "Console: promoted player: %s [GUID: %u] to leader of arena team \"%s\"[Id: %u]",
target->GetName().c_str(), target->GetGUIDLow(), arena->GetName().c_str(), arena->GetId());
return true;
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index f33e583522e..a4ccbc40211 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -413,11 +413,11 @@ public:
}
else
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Sending opcode that has unknown type '%s'", type.c_str());
+ TC_LOG_ERROR("misc", "Sending opcode that has unknown type '%s'", type.c_str());
break;
}
}
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Sending opcode %u", data.GetOpcode());
+ TC_LOG_DEBUG("network", "Sending opcode %u", data.GetOpcode());
data.hexlike();
player->GetSession()->SendPacket(&data);
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName().c_str());
@@ -1360,7 +1360,7 @@ public:
{
Player* player = handler->GetSession()->GetPlayer();
- TC_LOG_INFO(LOG_FILTER_SQL_DEV, "(@PATH, XX, %.3f, %.3f, %.5f, 0, 0, 0, 100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
+ TC_LOG_INFO("sql.dev", "(@PATH, XX, %.3f, %.3f, %.5f, 0, 0, 0, 100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
handler->PSendSysMessage("Waypoint SQL written to SQL Developer log");
return true;
diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp
index cdc67b884ca..6bb927fec5e 100644
--- a/src/server/scripts/Commands/cs_gobject.cpp
+++ b/src/server/scripts/Commands/cs_gobject.cpp
@@ -136,7 +136,7 @@ public:
if (objectInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(objectInfo->displayId))
{
// report to DB errors log as in loading case
- TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", objectId, objectInfo->type, objectInfo->displayId);
+ TC_LOG_ERROR("sql.sql", "Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", objectId, objectInfo->type, objectInfo->displayId);
handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, objectId);
handler->SetSentErrorMessage(true);
return false;
diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp
index 1c0949398b9..fda34586f0c 100644
--- a/src/server/scripts/Commands/cs_group.cpp
+++ b/src/server/scripts/Commands/cs_group.cpp
@@ -263,7 +263,6 @@ public:
// Get ALL the variables!
Player* playerTarget;
uint32 phase = 0;
- uint32 groupCounter = 0;
uint64 guidTarget;
std::string nameTarget;
std::string zoneName;
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 3d531cee1f5..019a962c4b1 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1110,7 +1110,7 @@ public:
if (!playerTarget)
playerTarget = player;
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_ADDITEM), itemId, count);
+ TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_ADDITEM), itemId, count);
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId);
if (!itemTemplate)
@@ -1189,7 +1189,7 @@ public:
if (!playerTarget)
playerTarget = player;
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_ADDITEMSET), itemSetId);
+ TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_ADDITEMSET), itemSetId);
bool found = false;
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
@@ -1655,7 +1655,7 @@ public:
// Output III. LANG_PINFO_BANNED if ban exists and is applied
if (banTime >= 0)
- handler->PSendSysMessage(LANG_PINFO_BANNED, banType.c_str(), banTime > 0 ? secsToTimeString(banTime - time(NULL), true).c_str() : "permanently", banReason.c_str(), bannedBy.c_str());
+ handler->PSendSysMessage(LANG_PINFO_BANNED, banType.c_str(), banReason.c_str(), banTime > 0 ? secsToTimeString(banTime - time(NULL), true).c_str() : "permanently", bannedBy.c_str());
// Output IV. LANG_PINFO_MUTED if mute is applied
if (muteTime > 0)
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index 81a440ad42c..4aa7c19fea6 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -203,7 +203,7 @@ public:
target->SetMaxPower(POWER_ENERGY, energym);
target->SetPower(POWER_ENERGY, energy);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
+ TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
return true;
}
@@ -1009,7 +1009,7 @@ public:
{
int32 newmoney = int32(targetMoney) + moneyToAdd;
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
+ TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
if (newmoney <= 0)
{
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
@@ -1044,7 +1044,7 @@ public:
target->ModifyMoney(moneyToAdd);
}
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
+ TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
return true;
}
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index a1b23fd5935..b472ba48a5c 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -965,7 +965,7 @@ public:
if (dontdel_str)
{
- //TC_LOG_ERROR(LOG_FILTER_GENERAL, "DEBUG: All 3 params are set");
+ //TC_LOG_ERROR("misc", "DEBUG: All 3 params are set");
// All 3 params are set
// GUID
@@ -973,7 +973,7 @@ public:
// doNotDEL
if (stricmp(dontdel_str, "NODEL") == 0)
{
- //TC_LOG_ERROR(LOG_FILTER_GENERAL, "DEBUG: doNotDelete = true;");
+ //TC_LOG_ERROR("misc", "DEBUG: doNotDelete = true;");
doNotDelete = true;
}
}
@@ -982,10 +982,10 @@ public:
// Only 2 params - but maybe NODEL is set
if (type_str)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "DEBUG: Only 2 params ");
+ TC_LOG_ERROR("misc", "DEBUG: Only 2 params ");
if (stricmp(type_str, "NODEL") == 0)
{
- //TC_LOG_ERROR(LOG_FILTER_GENERAL, "DEBUG: type_str, NODEL ");
+ //TC_LOG_ERROR("misc", "DEBUG: type_str, NODEL ");
doNotDelete = true;
type_str = NULL;
}
diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp
index 963537f0320..9a61250d193 100644
--- a/src/server/scripts/Commands/cs_pet.cpp
+++ b/src/server/scripts/Commands/cs_pet.cpp
@@ -90,7 +90,7 @@ public:
if (!pet->InitStatsForLevel(creatureTarget->getLevel()))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
+ TC_LOG_ERROR("misc", "InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
handler->PSendSysMessage("Error 2");
delete pet;
return false;
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index fe0f3ee6ce3..039766177c1 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -225,7 +225,7 @@ public:
static bool HandleReloadAllLootCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables...");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables...");
LoadLootTables();
handler->SendGlobalGMSysMessage("DB tables `*_loot_template` reloaded.");
sConditionMgr->LoadConditions(true);
@@ -248,7 +248,7 @@ public:
HandleReloadQuestPOICommand(handler, "a");
HandleReloadQuestTemplateCommand(handler, "a");
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Quests Relations...");
+ TC_LOG_INFO("misc", "Re-Loading Quests Relations...");
sObjectMgr->LoadQuestStartersAndEnders();
handler->SendGlobalGMSysMessage("DB tables `*_queststarter` and `*_questender` reloaded.");
return true;
@@ -263,7 +263,7 @@ public:
return false;
}
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Scripts...");
+ TC_LOG_INFO("misc", "Re-Loading Scripts...");
HandleReloadEventScriptsCommand(handler, "a");
HandleReloadSpellScriptsCommand(handler, "a");
handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded.");
@@ -332,7 +332,7 @@ public:
static bool HandleReloadConfigCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading config settings...");
+ TC_LOG_INFO("misc", "Re-Loading config settings...");
sWorld->LoadConfigSettings(true);
sMapMgr->InitializeVisibilityDistanceInfo();
handler->SendGlobalGMSysMessage("World config settings reloaded.");
@@ -341,7 +341,7 @@ public:
static bool HandleReloadAccessRequirementCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Access Requirement definitions...");
+ TC_LOG_INFO("misc", "Re-Loading Access Requirement definitions...");
sObjectMgr->LoadAccessRequirements();
handler->SendGlobalGMSysMessage("DB table `access_requirement` reloaded.");
return true;
@@ -349,7 +349,7 @@ public:
static bool HandleReloadAchievementCriteriaDataCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Additional Achievement Criteria Data...");
+ TC_LOG_INFO("misc", "Re-Loading Additional Achievement Criteria Data...");
sAchievementMgr->LoadAchievementCriteriaData();
handler->SendGlobalGMSysMessage("DB table `achievement_criteria_data` reloaded.");
return true;
@@ -357,7 +357,7 @@ public:
static bool HandleReloadAchievementRewardCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Achievement Reward Data...");
+ TC_LOG_INFO("misc", "Re-Loading Achievement Reward Data...");
sAchievementMgr->LoadRewards();
handler->SendGlobalGMSysMessage("DB table `achievement_reward` reloaded.");
return true;
@@ -365,7 +365,7 @@ public:
static bool HandleReloadAreaTriggerTavernCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Tavern Area Triggers...");
+ TC_LOG_INFO("misc", "Re-Loading Tavern Area Triggers...");
sObjectMgr->LoadTavernAreaTriggers();
handler->SendGlobalGMSysMessage("DB table `areatrigger_tavern` reloaded.");
return true;
@@ -373,7 +373,7 @@ public:
static bool HandleReloadAreaTriggerTeleportCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading AreaTrigger teleport definitions...");
+ TC_LOG_INFO("misc", "Re-Loading AreaTrigger teleport definitions...");
sObjectMgr->LoadAreaTriggerTeleports();
handler->SendGlobalGMSysMessage("DB table `areatrigger_teleport` reloaded.");
return true;
@@ -381,7 +381,7 @@ public:
static bool HandleReloadAutobroadcastCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Autobroadcasts...");
+ TC_LOG_INFO("misc", "Re-Loading Autobroadcasts...");
sWorld->LoadAutobroadcasts();
handler->SendGlobalGMSysMessage("DB table `autobroadcast` reloaded.");
return true;
@@ -396,7 +396,7 @@ public:
static bool HandleReloadOnKillReputationCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading creature award reputation definitions...");
+ TC_LOG_INFO("misc", "Re-Loading creature award reputation definitions...");
sObjectMgr->LoadReputationOnKill();
handler->SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded.");
return true;
@@ -404,7 +404,7 @@ public:
static bool HandleReloadCreatureSummonGroupsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Reloading creature summon groups...");
+ TC_LOG_INFO("misc", "Reloading creature summon groups...");
sObjectMgr->LoadTempSummons();
handler->SendGlobalGMSysMessage("DB table `creature_summon_groups` reloaded.");
return true;
@@ -438,7 +438,7 @@ public:
continue;
}
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Reloading creature template entry %u", entry);
+ TC_LOG_INFO("misc", "Reloading creature template entry %u", entry);
Field* fields = result->Fetch();
@@ -534,7 +534,7 @@ public:
static bool HandleReloadCreatureQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_queststarter`)");
+ TC_LOG_INFO("misc", "Loading Quests Relations... (`creature_queststarter`)");
sObjectMgr->LoadCreatureQuestStarters();
handler->SendGlobalGMSysMessage("DB table `creature_queststarter` reloaded.");
return true;
@@ -542,7 +542,7 @@ public:
static bool HandleReloadLinkedRespawnCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Linked Respawns... (`creature_linked_respawn`)");
+ TC_LOG_INFO("misc", "Loading Linked Respawns... (`creature_linked_respawn`)");
sObjectMgr->LoadLinkedRespawn();
handler->SendGlobalGMSysMessage("DB table `creature_linked_respawn` (creature linked respawns) reloaded.");
return true;
@@ -550,7 +550,7 @@ public:
static bool HandleReloadCreatureQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_questender`)");
+ TC_LOG_INFO("misc", "Loading Quests Relations... (`creature_questender`)");
sObjectMgr->LoadCreatureQuestEnders();
handler->SendGlobalGMSysMessage("DB table `creature_questender` reloaded.");
return true;
@@ -558,7 +558,7 @@ public:
static bool HandleReloadGossipMenuCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu` Table!");
+ TC_LOG_INFO("misc", "Re-Loading `gossip_menu` Table!");
sObjectMgr->LoadGossipMenu();
handler->SendGlobalGMSysMessage("DB table `gossip_menu` reloaded.");
sConditionMgr->LoadConditions(true);
@@ -567,7 +567,7 @@ public:
static bool HandleReloadGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu_option` Table!");
+ TC_LOG_INFO("misc", "Re-Loading `gossip_menu_option` Table!");
sObjectMgr->LoadGossipMenuItems();
handler->SendGlobalGMSysMessage("DB table `gossip_menu_option` reloaded.");
sConditionMgr->LoadConditions(true);
@@ -576,7 +576,7 @@ public:
static bool HandleReloadGOQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_queststarter`)");
+ TC_LOG_INFO("misc", "Loading Quests Relations... (`gameobject_queststarter`)");
sObjectMgr->LoadGameobjectQuestStarters();
handler->SendGlobalGMSysMessage("DB table `gameobject_queststarter` reloaded.");
return true;
@@ -584,7 +584,7 @@ public:
static bool HandleReloadGOQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_questender`)");
+ TC_LOG_INFO("misc", "Loading Quests Relations... (`gameobject_questender`)");
sObjectMgr->LoadGameobjectQuestEnders();
handler->SendGlobalGMSysMessage("DB table `gameobject_questender` reloaded.");
return true;
@@ -592,7 +592,7 @@ public:
static bool HandleReloadQuestAreaTriggersCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Quest Area Triggers...");
+ TC_LOG_INFO("misc", "Re-Loading Quest Area Triggers...");
sObjectMgr->LoadQuestAreaTriggers();
handler->SendGlobalGMSysMessage("DB table `areatrigger_involvedrelation` (quest area triggers) reloaded.");
return true;
@@ -600,12 +600,12 @@ public:
static bool HandleReloadQuestTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Quest Templates...");
+ TC_LOG_INFO("misc", "Re-Loading Quest Templates...");
sObjectMgr->LoadQuests();
handler->SendGlobalGMSysMessage("DB table `quest_template` (quest definitions) reloaded.");
/// dependent also from `gameobject` but this table not reloaded anyway
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading GameObjects for quests...");
+ TC_LOG_INFO("misc", "Re-Loading GameObjects for quests...");
sObjectMgr->LoadGameObjectForQuests();
handler->SendGlobalGMSysMessage("Data GameObjects for quests reloaded.");
return true;
@@ -613,7 +613,7 @@ public:
static bool HandleReloadLootTemplatesCreatureCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`creature_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`creature_loot_template`)");
LoadLootTemplates_Creature();
LootTemplates_Creature.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `creature_loot_template` reloaded.");
@@ -623,7 +623,7 @@ public:
static bool HandleReloadLootTemplatesDisenchantCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`disenchant_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`disenchant_loot_template`)");
LoadLootTemplates_Disenchant();
LootTemplates_Disenchant.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `disenchant_loot_template` reloaded.");
@@ -633,7 +633,7 @@ public:
static bool HandleReloadLootTemplatesFishingCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`fishing_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`fishing_loot_template`)");
LoadLootTemplates_Fishing();
LootTemplates_Fishing.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `fishing_loot_template` reloaded.");
@@ -643,7 +643,7 @@ public:
static bool HandleReloadLootTemplatesGameobjectCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`gameobject_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`gameobject_loot_template`)");
LoadLootTemplates_Gameobject();
LootTemplates_Gameobject.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `gameobject_loot_template` reloaded.");
@@ -653,7 +653,7 @@ public:
static bool HandleReloadLootTemplatesItemCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`item_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`item_loot_template`)");
LoadLootTemplates_Item();
LootTemplates_Item.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `item_loot_template` reloaded.");
@@ -663,7 +663,7 @@ public:
static bool HandleReloadLootTemplatesMillingCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`milling_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`milling_loot_template`)");
LoadLootTemplates_Milling();
LootTemplates_Milling.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `milling_loot_template` reloaded.");
@@ -673,7 +673,7 @@ public:
static bool HandleReloadLootTemplatesPickpocketingCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`pickpocketing_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`pickpocketing_loot_template`)");
LoadLootTemplates_Pickpocketing();
LootTemplates_Pickpocketing.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `pickpocketing_loot_template` reloaded.");
@@ -683,7 +683,7 @@ public:
static bool HandleReloadLootTemplatesProspectingCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`prospecting_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`prospecting_loot_template`)");
LoadLootTemplates_Prospecting();
LootTemplates_Prospecting.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `prospecting_loot_template` reloaded.");
@@ -693,7 +693,7 @@ public:
static bool HandleReloadLootTemplatesMailCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`mail_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`mail_loot_template`)");
LoadLootTemplates_Mail();
LootTemplates_Mail.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `mail_loot_template` reloaded.");
@@ -703,7 +703,7 @@ public:
static bool HandleReloadLootTemplatesReferenceCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`reference_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`reference_loot_template`)");
LoadLootTemplates_Reference();
handler->SendGlobalGMSysMessage("DB table `reference_loot_template` reloaded.");
sConditionMgr->LoadConditions(true);
@@ -712,7 +712,7 @@ public:
static bool HandleReloadLootTemplatesSkinningCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`skinning_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`skinning_loot_template`)");
LoadLootTemplates_Skinning();
LootTemplates_Skinning.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `skinning_loot_template` reloaded.");
@@ -722,7 +722,7 @@ public:
static bool HandleReloadLootTemplatesSpellCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Loot Tables... (`spell_loot_template`)");
+ TC_LOG_INFO("misc", "Re-Loading Loot Tables... (`spell_loot_template`)");
LoadLootTemplates_Spell();
LootTemplates_Spell.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `spell_loot_template` reloaded.");
@@ -732,7 +732,7 @@ public:
static bool HandleReloadTrinityStringCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading trinity_string Table!");
+ TC_LOG_INFO("misc", "Re-Loading trinity_string Table!");
sObjectMgr->LoadTrinityStrings();
handler->SendGlobalGMSysMessage("DB table `trinity_string` reloaded.");
return true;
@@ -747,7 +747,7 @@ public:
return false;
}
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading warden_action Table!");
+ TC_LOG_INFO("misc", "Re-Loading warden_action Table!");
sWardenCheckMgr->LoadWardenOverrides();
handler->SendGlobalGMSysMessage("DB table `warden_action` reloaded.");
return true;
@@ -755,7 +755,7 @@ public:
static bool HandleReloadNpcTrainerCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `npc_trainer` Table!");
+ TC_LOG_INFO("misc", "Re-Loading `npc_trainer` Table!");
sObjectMgr->LoadTrainerSpell();
handler->SendGlobalGMSysMessage("DB table `npc_trainer` reloaded.");
return true;
@@ -763,7 +763,7 @@ public:
static bool HandleReloadNpcVendorCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `npc_vendor` Table!");
+ TC_LOG_INFO("misc", "Re-Loading `npc_vendor` Table!");
sObjectMgr->LoadVendors();
handler->SendGlobalGMSysMessage("DB table `npc_vendor` reloaded.");
return true;
@@ -771,7 +771,7 @@ public:
static bool HandleReloadPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `points_of_interest` Table!");
+ TC_LOG_INFO("misc", "Re-Loading `points_of_interest` Table!");
sObjectMgr->LoadPointsOfInterest();
handler->SendGlobalGMSysMessage("DB table `points_of_interest` reloaded.");
return true;
@@ -779,7 +779,7 @@ public:
static bool HandleReloadQuestPOICommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Quest POI ..." );
+ TC_LOG_INFO("misc", "Re-Loading Quest POI ..." );
sObjectMgr->LoadQuestPOI();
handler->SendGlobalGMSysMessage("DB Table `quest_poi` and `quest_poi_points` reloaded.");
return true;
@@ -787,7 +787,7 @@ public:
static bool HandleReloadSpellClickSpellsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `npc_spellclick_spells` Table!");
+ TC_LOG_INFO("misc", "Re-Loading `npc_spellclick_spells` Table!");
sObjectMgr->LoadNPCSpellClickSpells();
handler->SendGlobalGMSysMessage("DB table `npc_spellclick_spells` reloaded.");
return true;
@@ -795,7 +795,7 @@ public:
static bool HandleReloadReservedNameCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading ReservedNames... (`reserved_name`)");
+ TC_LOG_INFO("misc", "Loading ReservedNames... (`reserved_name`)");
sObjectMgr->LoadReservedPlayersNames();
handler->SendGlobalGMSysMessage("DB table `reserved_name` (player reserved names) reloaded.");
return true;
@@ -803,7 +803,7 @@ public:
static bool HandleReloadReputationRewardRateCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `reputation_reward_rate` Table!" );
+ TC_LOG_INFO("misc", "Re-Loading `reputation_reward_rate` Table!" );
sObjectMgr->LoadReputationRewardRate();
handler->SendGlobalSysMessage("DB table `reputation_reward_rate` reloaded.");
return true;
@@ -811,7 +811,7 @@ public:
static bool HandleReloadReputationSpilloverTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading `reputation_spillover_template` Table!" );
+ TC_LOG_INFO("misc", "Re-Loading `reputation_spillover_template` Table!" );
sObjectMgr->LoadReputationSpilloverTemplate();
handler->SendGlobalSysMessage("DB table `reputation_spillover_template` reloaded.");
return true;
@@ -819,7 +819,7 @@ public:
static bool HandleReloadSkillDiscoveryTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Skill Discovery Table...");
+ TC_LOG_INFO("misc", "Re-Loading Skill Discovery Table...");
LoadSkillDiscoveryTable();
handler->SendGlobalGMSysMessage("DB table `skill_discovery_template` (recipes discovered at crafting) reloaded.");
return true;
@@ -827,7 +827,7 @@ public:
static bool HandleReloadSkillExtraItemTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Skill Extra Item Table...");
+ TC_LOG_INFO("misc", "Re-Loading Skill Extra Item Table...");
LoadSkillExtraItemTable();
handler->SendGlobalGMSysMessage("DB table `skill_extra_item_template` (extra item creation when crafting) reloaded.");
return true;
@@ -835,7 +835,7 @@ public:
static bool HandleReloadSkillFishingBaseLevelCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Skill Fishing base level requirements...");
+ TC_LOG_INFO("misc", "Re-Loading Skill Fishing base level requirements...");
sObjectMgr->LoadFishingBaseSkillLevel();
handler->SendGlobalGMSysMessage("DB table `skill_fishing_base_level` (fishing base level for zone/subzone) reloaded.");
return true;
@@ -843,7 +843,7 @@ public:
static bool HandleReloadSpellAreaCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading SpellArea Data...");
+ TC_LOG_INFO("misc", "Re-Loading SpellArea Data...");
sSpellMgr->LoadSpellAreas();
handler->SendGlobalGMSysMessage("DB table `spell_area` (spell dependences from area/quest/auras state) reloaded.");
return true;
@@ -851,7 +851,7 @@ public:
static bool HandleReloadSpellRequiredCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Required Data... ");
+ TC_LOG_INFO("misc", "Re-Loading Spell Required Data... ");
sSpellMgr->LoadSpellRequired();
handler->SendGlobalGMSysMessage("DB table `spell_required` reloaded.");
return true;
@@ -859,7 +859,7 @@ public:
static bool HandleReloadSpellGroupsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Groups...");
+ TC_LOG_INFO("misc", "Re-Loading Spell Groups...");
sSpellMgr->LoadSpellGroups();
handler->SendGlobalGMSysMessage("DB table `spell_group` (spell groups) reloaded.");
return true;
@@ -867,7 +867,7 @@ public:
static bool HandleReloadSpellLearnSpellCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Learn Spells...");
+ TC_LOG_INFO("misc", "Re-Loading Spell Learn Spells...");
sSpellMgr->LoadSpellLearnSpells();
handler->SendGlobalGMSysMessage("DB table `spell_learn_spell` reloaded.");
return true;
@@ -875,7 +875,7 @@ public:
static bool HandleReloadSpellLinkedSpellCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Linked Spells...");
+ TC_LOG_INFO("misc", "Re-Loading Spell Linked Spells...");
sSpellMgr->LoadSpellLinked();
handler->SendGlobalGMSysMessage("DB table `spell_linked_spell` reloaded.");
return true;
@@ -883,7 +883,7 @@ public:
static bool HandleReloadSpellProcEventCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Proc Event conditions...");
+ TC_LOG_INFO("misc", "Re-Loading Spell Proc Event conditions...");
sSpellMgr->LoadSpellProcEvents();
handler->SendGlobalGMSysMessage("DB table `spell_proc_event` (spell proc trigger requirements) reloaded.");
return true;
@@ -891,7 +891,7 @@ public:
static bool HandleReloadSpellProcsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Proc conditions and data...");
+ TC_LOG_INFO("misc", "Re-Loading Spell Proc conditions and data...");
sSpellMgr->LoadSpellProcs();
handler->SendGlobalGMSysMessage("DB table `spell_proc` (spell proc conditions and data) reloaded.");
return true;
@@ -899,7 +899,7 @@ public:
static bool HandleReloadSpellBonusesCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Bonus Data...");
+ TC_LOG_INFO("misc", "Re-Loading Spell Bonus Data...");
sSpellMgr->LoadSpellBonusess();
handler->SendGlobalGMSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded.");
return true;
@@ -907,7 +907,7 @@ public:
static bool HandleReloadSpellTargetPositionCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell target coordinates...");
+ TC_LOG_INFO("misc", "Re-Loading Spell target coordinates...");
sSpellMgr->LoadSpellTargetPositions();
handler->SendGlobalGMSysMessage("DB table `spell_target_position` (destination coordinates for spell targets) reloaded.");
return true;
@@ -915,7 +915,7 @@ public:
static bool HandleReloadSpellThreatsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Aggro Spells Definitions...");
+ TC_LOG_INFO("misc", "Re-Loading Aggro Spells Definitions...");
sSpellMgr->LoadSpellThreats();
handler->SendGlobalGMSysMessage("DB table `spell_threat` (spell aggro definitions) reloaded.");
return true;
@@ -923,7 +923,7 @@ public:
static bool HandleReloadSpellGroupStackRulesCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell Group Stack Rules...");
+ TC_LOG_INFO("misc", "Re-Loading Spell Group Stack Rules...");
sSpellMgr->LoadSpellGroupStackRules();
handler->SendGlobalGMSysMessage("DB table `spell_group_stack_rules` (spell stacking definitions) reloaded.");
return true;
@@ -931,7 +931,7 @@ public:
static bool HandleReloadSpellPetAurasCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Spell pet auras...");
+ TC_LOG_INFO("misc", "Re-Loading Spell pet auras...");
sSpellMgr->LoadSpellPetAuras();
handler->SendGlobalGMSysMessage("DB table `spell_pet_auras` reloaded.");
return true;
@@ -939,7 +939,7 @@ public:
static bool HandleReloadPageTextsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Page Texts...");
+ TC_LOG_INFO("misc", "Re-Loading Page Texts...");
sObjectMgr->LoadPageTexts();
handler->SendGlobalGMSysMessage("DB table `page_texts` reloaded.");
return true;
@@ -947,7 +947,7 @@ public:
static bool HandleReloadItemEnchantementsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Item Random Enchantments Table...");
+ TC_LOG_INFO("misc", "Re-Loading Item Random Enchantments Table...");
LoadRandomEnchantmentsTable();
handler->SendGlobalGMSysMessage("DB table `item_enchantment_template` reloaded.");
return true;
@@ -955,7 +955,7 @@ public:
static bool HandleReloadItemSetNamesCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Item set names...");
+ TC_LOG_INFO("misc", "Re-Loading Item set names...");
sObjectMgr->LoadItemSetNames();
handler->SendGlobalGMSysMessage("DB table `item_set_names` reloaded.");
return true;
@@ -971,7 +971,7 @@ public:
}
if (*args != 'a')
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Scripts from `event_scripts`...");
+ TC_LOG_INFO("misc", "Re-Loading Scripts from `event_scripts`...");
sObjectMgr->LoadEventScripts();
@@ -991,7 +991,7 @@ public:
}
if (*args != 'a')
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Scripts from `waypoint_scripts`...");
+ TC_LOG_INFO("misc", "Re-Loading Scripts from `waypoint_scripts`...");
sObjectMgr->LoadWaypointScripts();
@@ -1004,7 +1004,7 @@ public:
static bool HandleReloadWpCommand(ChatHandler* handler, const char* args)
{
if (*args != 'a')
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Waypoints data from 'waypoints_data'");
+ TC_LOG_INFO("misc", "Re-Loading Waypoints data from 'waypoints_data'");
sWaypointMgr->Load();
@@ -1017,7 +1017,7 @@ public:
static bool HandleReloadEventAITextsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Texts from `creature_ai_texts`...");
+ TC_LOG_INFO("misc", "Re-Loading Texts from `creature_ai_texts`...");
sEventAIMgr->LoadCreatureEventAI_Texts();
handler->SendGlobalGMSysMessage("DB table `creature_ai_texts` reloaded.");
return true;
@@ -1025,7 +1025,7 @@ public:
static bool HandleReloadEventAIScriptsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Scripts from `creature_ai_scripts`...");
+ TC_LOG_INFO("misc", "Re-Loading Scripts from `creature_ai_scripts`...");
sEventAIMgr->LoadCreatureEventAI_Scripts();
handler->SendGlobalGMSysMessage("DB table `creature_ai_scripts` reloaded.");
return true;
@@ -1041,7 +1041,7 @@ public:
}
if (*args != 'a')
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Scripts from `spell_scripts`...");
+ TC_LOG_INFO("misc", "Re-Loading Scripts from `spell_scripts`...");
sObjectMgr->LoadSpellScripts();
@@ -1053,7 +1053,7 @@ public:
static bool HandleReloadDbScriptStringCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Script strings from `db_script_string`...");
+ TC_LOG_INFO("misc", "Re-Loading Script strings from `db_script_string`...");
sObjectMgr->LoadDbScriptStrings();
handler->SendGlobalGMSysMessage("DB table `db_script_string` reloaded.");
return true;
@@ -1061,7 +1061,7 @@ public:
static bool HandleReloadGameGraveyardZoneCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Graveyard-zone links...");
+ TC_LOG_INFO("misc", "Re-Loading Graveyard-zone links...");
sObjectMgr->LoadGraveyardZones();
@@ -1072,7 +1072,7 @@ public:
static bool HandleReloadGameTeleCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Game Tele coordinates...");
+ TC_LOG_INFO("misc", "Re-Loading Game Tele coordinates...");
sObjectMgr->LoadGameTele();
@@ -1083,9 +1083,9 @@ public:
static bool HandleReloadDisablesCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading disables table...");
+ TC_LOG_INFO("misc", "Re-Loading disables table...");
DisableMgr::LoadDisables();
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Checking quest disables...");
+ TC_LOG_INFO("misc", "Checking quest disables...");
DisableMgr::CheckQuestDisables();
handler->SendGlobalGMSysMessage("DB table `disables` reloaded.");
return true;
@@ -1093,7 +1093,7 @@ public:
static bool HandleReloadLocalesAchievementRewardCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Achievement Reward Data...");
+ TC_LOG_INFO("misc", "Re-Loading Locales Achievement Reward Data...");
sAchievementMgr->LoadRewardLocales();
handler->SendGlobalGMSysMessage("DB table `locales_achievement_reward` reloaded.");
return true;
@@ -1101,7 +1101,7 @@ public:
static bool HandleReloadLfgRewardsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading lfg dungeon rewards...");
+ TC_LOG_INFO("misc", "Re-Loading lfg dungeon rewards...");
sLFGMgr->LoadRewards();
handler->SendGlobalGMSysMessage("DB table `lfg_dungeon_rewards` reloaded.");
return true;
@@ -1109,7 +1109,7 @@ public:
static bool HandleReloadLocalesCreatureCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Creature ...");
+ TC_LOG_INFO("misc", "Re-Loading Locales Creature ...");
sObjectMgr->LoadCreatureLocales();
handler->SendGlobalGMSysMessage("DB table `locales_creature` reloaded.");
return true;
@@ -1117,7 +1117,7 @@ public:
static bool HandleReloadLocalesCreatureTextCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Creature Texts...");
+ TC_LOG_INFO("misc", "Re-Loading Locales Creature Texts...");
sCreatureTextMgr->LoadCreatureTextLocales();
handler->SendGlobalGMSysMessage("DB table `locales_creature_text` reloaded.");
return true;
@@ -1125,7 +1125,7 @@ public:
static bool HandleReloadLocalesGameobjectCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Gameobject ... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales Gameobject ... ");
sObjectMgr->LoadGameObjectLocales();
handler->SendGlobalGMSysMessage("DB table `locales_gameobject` reloaded.");
return true;
@@ -1133,7 +1133,7 @@ public:
static bool HandleReloadLocalesGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Gossip Menu Option ... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales Gossip Menu Option ... ");
sObjectMgr->LoadGossipMenuItemsLocales();
handler->SendGlobalGMSysMessage("DB table `locales_gossip_menu_option` reloaded.");
return true;
@@ -1141,7 +1141,7 @@ public:
static bool HandleReloadLocalesItemCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Item ... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales Item ... ");
sObjectMgr->LoadItemLocales();
handler->SendGlobalGMSysMessage("DB table `locales_item` reloaded.");
return true;
@@ -1149,7 +1149,7 @@ public:
static bool HandleReloadLocalesItemSetNameCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Item set name... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales Item set name... ");
sObjectMgr->LoadItemSetNameLocales();
handler->SendGlobalGMSysMessage("DB table `locales_item_set_name` reloaded.");
return true;
@@ -1157,7 +1157,7 @@ public:
static bool HandleReloadLocalesNpcTextCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales NPC Text ... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales NPC Text ... ");
sObjectMgr->LoadNpcTextLocales();
handler->SendGlobalGMSysMessage("DB table `locales_npc_text` reloaded.");
return true;
@@ -1165,7 +1165,7 @@ public:
static bool HandleReloadLocalesPageTextCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Page Text ... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales Page Text ... ");
sObjectMgr->LoadPageTextLocales();
handler->SendGlobalGMSysMessage("DB table `locales_page_text` reloaded.");
return true;
@@ -1173,7 +1173,7 @@ public:
static bool HandleReloadLocalesPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Points Of Interest ... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales Points Of Interest ... ");
sObjectMgr->LoadPointOfInterestLocales();
handler->SendGlobalGMSysMessage("DB table `locales_points_of_interest` reloaded.");
return true;
@@ -1181,7 +1181,7 @@ public:
static bool HandleReloadLocalesQuestCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Locales Quest ... ");
+ TC_LOG_INFO("misc", "Re-Loading Locales Quest ... ");
sObjectMgr->LoadQuestLocales();
handler->SendGlobalGMSysMessage("DB table `locales_quest` reloaded.");
return true;
@@ -1189,7 +1189,7 @@ public:
static bool HandleReloadMailLevelRewardCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Player level dependent mail rewards...");
+ TC_LOG_INFO("misc", "Re-Loading Player level dependent mail rewards...");
sObjectMgr->LoadMailLevelRewards();
handler->SendGlobalGMSysMessage("DB table `mail_level_reward` reloaded.");
return true;
@@ -1198,7 +1198,7 @@ public:
static bool HandleReloadAuctionsCommand(ChatHandler* handler, const char* /*args*/)
{
///- Reload dynamic data tables from the database
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Auctions...");
+ TC_LOG_INFO("misc", "Re-Loading Auctions...");
sAuctionMgr->LoadAuctionItems();
sAuctionMgr->LoadAuctions();
handler->SendGlobalGMSysMessage("Auctions reloaded.");
@@ -1207,7 +1207,7 @@ public:
static bool HandleReloadConditions(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Conditions...");
+ TC_LOG_INFO("misc", "Re-Loading Conditions...");
sConditionMgr->LoadConditions(true);
handler->SendGlobalGMSysMessage("Conditions reloaded.");
return true;
@@ -1215,7 +1215,7 @@ public:
static bool HandleReloadCreatureText(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Creature Texts...");
+ TC_LOG_INFO("misc", "Re-Loading Creature Texts...");
sCreatureTextMgr->LoadCreatureTexts();
handler->SendGlobalGMSysMessage("Creature Texts reloaded.");
return true;
@@ -1223,7 +1223,7 @@ public:
static bool HandleReloadSmartScripts(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Smart Scripts...");
+ TC_LOG_INFO("misc", "Re-Loading Smart Scripts...");
sSmartScriptMgr->LoadSmartAIFromDB();
handler->SendGlobalGMSysMessage("Smart Scripts reloaded.");
return true;
@@ -1231,7 +1231,7 @@ public:
static bool HandleReloadVehicleAccessoryCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Reloading vehicle_accessory table...");
+ TC_LOG_INFO("misc", "Reloading vehicle_accessory table...");
sObjectMgr->LoadVehicleAccessories();
handler->SendGlobalGMSysMessage("Vehicle accessories reloaded.");
return true;
@@ -1239,7 +1239,7 @@ public:
static bool HandleReloadVehicleTemplateAccessoryCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Reloading vehicle_template_accessory table...");
+ TC_LOG_INFO("misc", "Reloading vehicle_template_accessory table...");
sObjectMgr->LoadVehicleTemplateAccessories();
handler->SendGlobalGMSysMessage("Vehicle template accessories reloaded.");
return true;
@@ -1247,7 +1247,7 @@ public:
static bool HandleReloadRBACCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Reloading RBAC tables...");
+ TC_LOG_INFO("misc", "Reloading RBAC tables...");
sAccountMgr->LoadRBAC();
sWorld->ReloadRBAC();
handler->SendGlobalGMSysMessage("RBAC data reloaded.");
diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp
index 891445df976..2b27fcf56fd 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -92,7 +92,7 @@ public:
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(player->getClass());
if (!classEntry)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Class %u not found in DBC (Wrong DBC files?)", player->getClass());
+ TC_LOG_ERROR("misc", "Class %u not found in DBC (Wrong DBC files?)", player->getClass());
return false;
}
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp
index 154da04db6a..ca9f4a59045 100644
--- a/src/server/scripts/Commands/cs_tele.cpp
+++ b/src/server/scripts/Commands/cs_tele.cpp
@@ -65,7 +65,7 @@ public:
std::string name = args;
- if (sObjectMgr->GetGameTele(name))
+ if (sObjectMgr->GetGameTeleExactName(name))
{
handler->SendSysMessage(LANG_COMMAND_TP_ALREADYEXIST);
handler->SetSentErrorMessage(true);
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index 1b5a42a83ef..6dbcdffca72 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -50,7 +50,7 @@ public:
struct npc_water_elementalAI : public ScriptedAI
{
- npc_water_elementalAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_water_elementalAI(Creature* creature) : ScriptedAI(creature) { }
uint32 waterBoltTimer;
uint64 balindaGUID;
@@ -99,7 +99,7 @@ public:
struct boss_balindaAI : public ScriptedAI
{
- boss_balindaAI(Creature* creature) : ScriptedAI(creature), summons(me) {}
+ boss_balindaAI(Creature* creature) : ScriptedAI(creature), summons(me) { }
uint32 arcaneExplosionTimer;
uint32 coneOfColdTimer;
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
index 8bddff621fa..7559d71bf78 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
@@ -45,7 +45,7 @@ public:
struct boss_drektharAI : public ScriptedAI
{
- boss_drektharAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_drektharAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WhirlwindTimer;
uint32 Whirlwind2Timer;
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
index 1dcf70d28b9..4f91e57be50 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp
@@ -40,7 +40,7 @@ public:
struct boss_galvangarAI : public ScriptedAI
{
- boss_galvangarAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_galvangarAI(Creature* creature) : ScriptedAI(creature) { }
uint32 CleaveTimer;
uint32 FrighteningShoutTimer;
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
index f2ba479ac86..0e5370f0f07 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
@@ -42,7 +42,7 @@ public:
struct boss_vanndarAI : public ScriptedAI
{
- boss_vanndarAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_vanndarAI(Creature* creature) : ScriptedAI(creature) { }
uint32 AvatarTimer;
uint32 ThunderclapTimer;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
index e9a6b15dcf8..ee8f22ca66c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
@@ -211,7 +211,7 @@ public:
{
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, NPC_GRIMSTONE, me);
instance->SetData(TYPE_RING_OF_LAW, DONE);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_grimstone: event reached end and set complete.");
+ TC_LOG_DEBUG("scripts", "npc_grimstone: event reached end and set complete.");
}
break;
}
@@ -359,7 +359,7 @@ public:
struct npc_phalanxAI : public ScriptedAI
{
- npc_phalanxAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_phalanxAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ThunderClap_Timer;
uint32 FireballVolley_Timer;
@@ -613,7 +613,7 @@ public:
struct npc_dughal_stormwingAI : public npc_escortAI
{
- npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -634,8 +634,8 @@ public:
}
}
- void EnterCombat(Unit* who) OVERRIDE {}
- void Reset() OVERRIDE {}
+ void EnterCombat(Unit* who) OVERRIDE { }
+ void Reset() OVERRIDE { }
void JustDied(Unit* killer) OVERRIDE
{
@@ -804,7 +804,7 @@ public:
}
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void JustDied(Unit* slayer) OVERRIDE
{
@@ -1019,7 +1019,7 @@ public:
break;
}
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void JustDied(Unit* slayer) OVERRIDE
{
@@ -1125,10 +1125,10 @@ public:
struct npc_tobias_seecherAI : public npc_escortAI
{
- npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) { }
- void EnterCombat(Unit* who) OVERRIDE {}
- void Reset() OVERRIDE {}
+ void EnterCombat(Unit* who) OVERRIDE { }
+ void Reset() OVERRIDE { }
void JustDied(Unit* killer) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
index 3a4f734429c..75f85ace2bd 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
@@ -36,7 +36,7 @@ public:
struct boss_ambassador_flamelashAI : public ScriptedAI
{
- boss_ambassador_flamelashAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_ambassador_flamelashAI(Creature* creature) : ScriptedAI(creature) { }
uint32 FireBlast_Timer;
uint32 Spirit_Timer;
@@ -47,7 +47,7 @@ public:
Spirit_Timer = 24000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SummonSpirits(Unit* victim)
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
index 63a94ca616a..84964ba375a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
@@ -40,7 +40,7 @@ public:
struct boss_anubshiahAI : public ScriptedAI
{
- boss_anubshiahAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_anubshiahAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ShadowBolt_Timer;
uint32 CurseOfTongues_Timer;
@@ -57,7 +57,7 @@ public:
EnvelopingWeb_Timer = 16000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
index 80bfa651301..869479a7ae0 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
@@ -38,7 +38,7 @@ public:
struct boss_general_angerforgeAI : public ScriptedAI
{
- boss_general_angerforgeAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_general_angerforgeAI(Creature* creature) : ScriptedAI(creature) { }
uint32 MightyBlow_Timer;
uint32 HamString_Timer;
@@ -55,7 +55,7 @@ public:
Medics = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SummonAdds(Unit* victim)
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
index d79c4d191b6..f865a6f6742 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
@@ -37,7 +37,7 @@ public:
struct boss_gorosh_the_dervishAI : public ScriptedAI
{
- boss_gorosh_the_dervishAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_gorosh_the_dervishAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WhirlWind_Timer;
uint32 MortalStrike_Timer;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
index 504fca44c4c..1c2953a6a22 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
@@ -38,7 +38,7 @@ public:
struct boss_grizzleAI : public ScriptedAI
{
- boss_grizzleAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_grizzleAI(Creature* creature) : ScriptedAI(creature) { }
uint32 GroundTremor_Timer;
uint32 Frenzy_Timer;
@@ -49,7 +49,7 @@ public:
Frenzy_Timer =0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
index 7a98cc321dc..86748977749 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
@@ -39,7 +39,7 @@ public:
struct boss_high_interrogator_gerstahnAI : public ScriptedAI
{
- boss_high_interrogator_gerstahnAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_high_interrogator_gerstahnAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ShadowWordPain_Timer;
uint32 ManaBurn_Timer;
@@ -54,7 +54,7 @@ public:
ShadowShield_Timer = 8000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
index 998e7b17897..f4c63f630c3 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
@@ -42,7 +42,7 @@ public:
struct boss_magmusAI : public ScriptedAI
{
- boss_magmusAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_magmusAI(Creature* creature) : ScriptedAI(creature) { }
uint32 FieryBurst_Timer;
uint32 WarStomp_Timer;
@@ -53,7 +53,7 @@ public:
WarStomp_Timer =0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
index 9021649a61e..c647737bea9 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
@@ -41,7 +41,7 @@ public:
struct boss_moira_bronzebeardAI : public ScriptedAI
{
- boss_moira_bronzebeardAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_moira_bronzebeardAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Heal_Timer;
uint32 MindBlast_Timer;
@@ -56,7 +56,7 @@ public:
Smite_Timer = 8000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
index a080e117583..f1ccf35e490 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
@@ -76,7 +76,7 @@ public:
struct instance_blackrock_depths_InstanceMapScript : public InstanceScript
{
- instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 encounter[MAX_ENCOUNTER];
std::string str_data;
@@ -214,7 +214,7 @@ public:
void SetData64(uint32 type, uint64 data) OVERRIDE
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
+ TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
switch (type)
{
@@ -230,7 +230,7 @@ public:
void SetData(uint32 type, uint32 data) OVERRIDE
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
+ TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
switch (type)
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
index 59581204b05..009c22e40b3 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
@@ -43,7 +43,7 @@ public:
struct boss_drakkisathAI : public BossAI
{
- boss_drakkisathAI(Creature* creature) : BossAI(creature, DATA_GENERAL_DRAKKISATH) {}
+ boss_drakkisathAI(Creature* creature) : BossAI(creature, DATA_GENERAL_DRAKKISATH) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp
index f1bd81f2e6a..9f22c2c1e85 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp
@@ -46,7 +46,7 @@ public:
struct boss_gizrul_the_slavenerAI : public BossAI
{
- boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) {}
+ boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
index 630d6ff2a0d..b79a6e4733e 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
@@ -45,7 +45,7 @@ public:
struct boss_halyconAI : public BossAI
{
- boss_halyconAI(Creature* creature) : BossAI(creature, DATA_HALYCON) {}
+ boss_halyconAI(Creature* creature) : BossAI(creature, DATA_HALYCON) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
index 54ed5d44e34..5b5e9bc082a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
@@ -44,7 +44,7 @@ public:
struct boss_highlordomokkAI : public BossAI
{
- boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_HIGHLORD_OMOKK) {}
+ boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_HIGHLORD_OMOKK) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
index b54c8f11f34..26540eb38a6 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
@@ -46,7 +46,7 @@ public:
struct boss_lord_valthalakAI : public BossAI
{
- boss_lord_valthalakAI(Creature* creature) : BossAI(creature, DATA_LORD_VALTHALAK) {}
+ boss_lord_valthalakAI(Creature* creature) : BossAI(creature, DATA_LORD_VALTHALAK) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp
index 608cb75bbb2..f9b0441af77 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp
@@ -45,7 +45,7 @@ public:
struct boss_mothersmolderwebAI : public BossAI
{
- boss_mothersmolderwebAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SMOLDERWEB) {}
+ boss_mothersmolderwebAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SMOLDERWEB) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
index 2b68b640720..2a448898813 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
@@ -57,7 +57,7 @@ public:
struct boss_overlordwyrmthalakAI : public BossAI
{
- boss_overlordwyrmthalakAI(Creature* creature) : BossAI(creature, DATA_OVERLORD_WYRMTHALAK) {}
+ boss_overlordwyrmthalakAI(Creature* creature) : BossAI(creature, DATA_OVERLORD_WYRMTHALAK) { }
bool Summoned;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
index 57c3dfac7ff..1c40385c0fd 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -75,7 +75,7 @@ public:
struct boss_pyroguard_emberseerAI : public BossAI
{
- boss_pyroguard_emberseerAI(Creature* creature) : BossAI(creature, DATA_PYROGAURD_EMBERSEER) {}
+ boss_pyroguard_emberseerAI(Creature* creature) : BossAI(creature, DATA_PYROGAURD_EMBERSEER) { }
void Reset() OVERRIDE
{
@@ -340,7 +340,7 @@ public:
struct npc_blackhand_incarceratorAI : public ScriptedAI
{
- npc_blackhand_incarceratorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_blackhand_incarceratorAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
index a20822839e6..4dbade9e07b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
@@ -40,7 +40,7 @@ public:
struct boss_quatermasterzigrisAI : public BossAI
{
- boss_quatermasterzigrisAI(Creature* creature) : BossAI(creature, DATA_QUARTERMASTER_ZIGRIS) {}
+ boss_quatermasterzigrisAI(Creature* creature) : BossAI(creature, DATA_QUARTERMASTER_ZIGRIS) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
index 1936e5e72d0..7fcb201a5ad 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
@@ -46,7 +46,7 @@ public:
struct boss_shadowvoshAI : public BossAI
{
- boss_shadowvoshAI(Creature* creature) : BossAI(creature, DATA_SHADOW_HUNTER_VOSHGAJIN) {}
+ boss_shadowvoshAI(Creature* creature) : BossAI(creature, DATA_SHADOW_HUNTER_VOSHGAJIN) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
index c4abaac158c..8cb0dfbce64 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
@@ -46,7 +46,7 @@ public:
struct boss_thebeastAI : public BossAI
{
- boss_thebeastAI(Creature* creature) : BossAI(creature, DATA_THE_BEAST) {}
+ boss_thebeastAI(Creature* creature) : BossAI(creature, DATA_THE_BEAST) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
index afee357aad5..76b673eed06 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
@@ -46,7 +46,7 @@ public:
struct boss_urok_doomhowlAI : public BossAI
{
- boss_urok_doomhowlAI(Creature* creature) : BossAI(creature, DATA_UROK_DOOMHOWL) {}
+ boss_urok_doomhowlAI(Creature* creature) : BossAI(creature, DATA_UROK_DOOMHOWL) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
index e3423fd02b6..ccd74b204ce 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
@@ -52,7 +52,7 @@ public:
struct boss_warmastervooneAI : public BossAI
{
- boss_warmastervooneAI(Creature* creature) : BossAI(creature, DATA_WARMASTER_VOONE) {}
+ boss_warmastervooneAI(Creature* creature) : BossAI(creature, DATA_WARMASTER_VOONE) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
index d49cca2045f..f3a788918f2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
@@ -218,7 +218,7 @@ public:
}
}
- void JustSummoned(Creature* /*summon*/) OVERRIDE {}
+ void JustSummoned(Creature* /*summon*/) OVERRIDE { }
void SetData(uint32 type, uint32 data) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
index 5eabc11618b..420c9fcc290 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
@@ -108,7 +108,7 @@ class npc_firesworn : public CreatureScript
struct npc_fireswornAI : public ScriptedAI
{
- npc_fireswornAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_fireswornAI(Creature* creature) : ScriptedAI(creature) { }
uint32 immolateTimer;
diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt
index a0377cea0fd..8622949b3fe 100644
--- a/src/server/scripts/EasternKingdoms/CMakeLists.txt
+++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt
@@ -172,7 +172,6 @@ set(scripts_STAT_SRCS
EasternKingdoms/ScarletMonastery/boss_herod.cpp
EasternKingdoms/ScarletMonastery/boss_scorn.cpp
EasternKingdoms/zone_undercity.cpp
- EasternKingdoms/zone_silvermoon_city.cpp
EasternKingdoms/zone_loch_modan.cpp
EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
index 7e7d1b72415..f029e8505d4 100644
--- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
+++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp
@@ -57,7 +57,7 @@ class instance_deadmines : public InstanceMapScript
struct instance_deadmines_InstanceMapScript : public InstanceScript
{
- instance_deadmines_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_deadmines_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 FactoryDoorGUID;
uint64 IronCladDoorGUID;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
index 6599af7c2aa..04b9ebffbf7 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
@@ -60,7 +60,7 @@ public:
struct boss_curatorAI : public ScriptedAI
{
- boss_curatorAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_curatorAI(Creature* creature) : ScriptedAI(creature) { }
uint32 AddTimer;
uint32 HatefulBoltTimer;
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 0a9aee6269c..a04953cb3f5 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp
@@ -52,7 +52,7 @@ public:
struct boss_maiden_of_virtueAI : public ScriptedAI
{
- boss_maiden_of_virtueAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_maiden_of_virtueAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Repentance_Timer;
uint32 Holyfire_Timer;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index 0b11d425e85..071a5e83d2f 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -90,7 +90,7 @@ public:
ResetTimer = 2000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
@@ -126,7 +126,7 @@ public:
struct boss_midnightAI : public ScriptedAI
{
- boss_midnightAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_midnightAI(Creature* creature) : ScriptedAI(creature) { }
uint64 Attumen;
uint8 Phase;
@@ -142,7 +142,7 @@ public:
me->SetVisible(true);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
index 780f781f58d..fc37c42be85 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp
@@ -399,7 +399,7 @@ public:
struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI
{
//Shadow Priest
- boss_baroness_dorothea_millstipeAI(Creature* creature) : boss_moroes_guestAI(creature) {}
+ boss_baroness_dorothea_millstipeAI(Creature* creature) : boss_moroes_guestAI(creature) { }
uint32 ManaBurn_Timer;
uint32 MindFlay_Timer;
@@ -462,7 +462,7 @@ public:
struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI
{
//Retr Pally
- boss_baron_rafe_dreugerAI(Creature* creature) : boss_moroes_guestAI(creature){}
+ boss_baron_rafe_dreugerAI(Creature* creature) : boss_moroes_guestAI(creature){ }
uint32 HammerOfJustice_Timer;
uint32 SealOfCommand_Timer;
@@ -519,7 +519,7 @@ public:
struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI
{
//Holy Priest
- boss_lady_catriona_von_indiAI(Creature* creature) : boss_moroes_guestAI(creature) {}
+ boss_lady_catriona_von_indiAI(Creature* creature) : boss_moroes_guestAI(creature) { }
uint32 DispelMagic_Timer;
uint32 GreaterHeal_Timer;
@@ -589,7 +589,7 @@ public:
struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI
{
//Holy Pally
- boss_lady_keira_berrybuckAI(Creature* creature) : boss_moroes_guestAI(creature) {}
+ boss_lady_keira_berrybuckAI(Creature* creature) : boss_moroes_guestAI(creature) { }
uint32 Cleanse_Timer;
uint32 GreaterBless_Timer;
@@ -663,7 +663,7 @@ public:
struct boss_lord_robin_darisAI : public boss_moroes_guestAI
{
//Arms Warr
- boss_lord_robin_darisAI(Creature* creature) : boss_moroes_guestAI(creature) {}
+ boss_lord_robin_darisAI(Creature* creature) : boss_moroes_guestAI(creature) { }
uint32 Hamstring_Timer;
uint32 MortalStrike_Timer;
@@ -719,7 +719,7 @@ public:
struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI
{
//Arms Warr
- boss_lord_crispin_ferenceAI(Creature* creature) : boss_moroes_guestAI(creature) {}
+ boss_lord_crispin_ferenceAI(Creature* creature) : boss_moroes_guestAI(creature) { }
uint32 Disarm_Timer;
uint32 HeroicStrike_Timer;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index 8f292f2d008..7c6cdd4cb3e 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -110,16 +110,16 @@ public:
struct netherspite_infernalAI : public ScriptedAI
{
netherspite_infernalAI(Creature* creature) : ScriptedAI(creature),
- HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) {}
+ HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) { }
uint32 HellfireTimer;
uint32 CleanupTimer;
uint64 malchezaar;
InfernalPoint *point;
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
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 7999524f853..2d3fabb810b 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -520,7 +520,7 @@ public:
struct water_elementalAI : public ScriptedAI
{
- water_elementalAI(Creature* creature) : ScriptedAI(creature) {}
+ water_elementalAI(Creature* creature) : ScriptedAI(creature) { }
uint32 CastTimer;
@@ -529,7 +529,7 @@ public:
CastTimer = 2000 + (rand()%3000);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index f348cf95a82..9e7897cd56a 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -148,7 +148,7 @@ public:
struct npc_demon_chainAI : public ScriptedAI
{
- npc_demon_chainAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_demon_chainAI(Creature* creature) : ScriptedAI(creature) { }
uint64 SacrificeGUID;
@@ -157,9 +157,9 @@ public:
SacrificeGUID = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
@@ -186,7 +186,7 @@ public:
struct npc_fiendish_portalAI : public PassiveAI
{
- npc_fiendish_portalAI(Creature* creature) : PassiveAI(creature), summons(me){}
+ npc_fiendish_portalAI(Creature* creature) : PassiveAI(creature), summons(me){ }
SummonList summons;
@@ -220,7 +220,7 @@ public:
struct npc_fiendish_impAI : public ScriptedAI
{
- npc_fiendish_impAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_fiendish_impAI(Creature* creature) : ScriptedAI(creature) { }
uint32 FireboltTimer;
@@ -231,7 +231,7 @@ public:
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 29ae4890fdc..504b3bc6e97 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -238,7 +238,7 @@ public:
struct npc_titoAI : public ScriptedAI
{
- npc_titoAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_titoAI(Creature* creature) : ScriptedAI(creature) { }
uint64 DorotheeGUID;
uint32 YipTimer;
@@ -249,7 +249,7 @@ public:
YipTimer = 10000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -724,7 +724,7 @@ public:
struct npc_cycloneAI : public ScriptedAI
{
- npc_cycloneAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_cycloneAI(Creature* creature) : ScriptedAI(creature) { }
uint32 MoveTimer;
@@ -733,7 +733,7 @@ public:
MoveTimer = 1000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE
@@ -1073,7 +1073,7 @@ public:
RomuloDead = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void AttackStart(Unit* who) OVERRIDE
{
@@ -1237,7 +1237,7 @@ public:
}
}
- TC_LOG_ERROR(LOG_FILTER_TSCR, "boss_romuloAI: DamageTaken reach end of code, that should not happen.");
+ TC_LOG_ERROR("scripts", "boss_romuloAI: DamageTaken reach end of code, that should not happen.");
}
void EnterCombat(Unit* /*who*/) OVERRIDE
@@ -1483,7 +1483,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama
if (Phase == PHASE_ROMULO)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
+ TC_LOG_ERROR("scripts", "boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
damage = 0;
return;
}
@@ -1517,7 +1517,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama
return;
}
}
- TC_LOG_ERROR(LOG_FILTER_TSCR, "boss_julianneAI: DamageTaken reach end of code, that should not happen.");
+ TC_LOG_ERROR("scripts", "boss_julianneAI: DamageTaken reach end of code, that should not happen.");
}
void AddSC_bosses_opera()
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
index 82dc85861da..bf213e68f10 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp
@@ -56,7 +56,7 @@ public:
struct instance_karazhan_InstanceMapScript : public InstanceScript
{
- instance_karazhan_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_karazhan_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 m_auiEncounter[MAX_ENCOUNTER];
std::string strSaveData;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 679f52343eb..8efcbf29d30 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -176,7 +176,7 @@ public:
Start(false, false);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -247,7 +247,7 @@ public:
void PrepareEncounter()
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
+ TC_LOG_DEBUG("scripts", "Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
uint8 index = 0;
uint8 count = 0;
@@ -361,17 +361,17 @@ public:
case GOSSIP_ACTION_INFO_DEF+3:
player->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_OZ;
- TC_LOG_INFO(LOG_FILTER_TSCR, "player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", player->GetGUID());
+ TC_LOG_INFO("scripts", "player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", player->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
player->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_HOOD;
- TC_LOG_INFO(LOG_FILTER_TSCR, "player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", player->GetGUID());
+ TC_LOG_INFO("scripts", "player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", player->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
player->CLOSE_GOSSIP_MENU();
pBarnesAI->m_uiEventId = EVENT_RAJ;
- TC_LOG_INFO(LOG_FILTER_TSCR, "player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", player->GetGUID());
+ TC_LOG_INFO("scripts", "player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", player->GetGUID());
break;
}
@@ -512,7 +512,7 @@ public:
me->RemoveCorpse();
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
index d50aac36bca..f47d2aa46fb 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h
@@ -62,5 +62,5 @@ enum OperaEvents
EVENT_RAJ = 3
};
-#define ERROR_INST_DATA(a) TC_LOG_ERROR(LOG_FILTER_TSCR, "Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry());
+#define ERROR_INST_DATA(a) TC_LOG_ERROR("scripts", "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 74d65480611..074ad3f1b96 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -461,8 +461,8 @@ public:
DoCast(me, SPELL_FLAMESTRIKE2, true);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -509,7 +509,7 @@ public:
FakeDeath = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DamageTaken(Unit* /*killer*/, uint32 &damage) OVERRIDE
{
@@ -600,7 +600,7 @@ public:
struct npc_felkael_phoenix_eggAI : public ScriptedAI
{
- npc_felkael_phoenix_eggAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_felkael_phoenix_eggAI(Creature* creature) : ScriptedAI(creature) { }
uint32 HatchTimer;
@@ -609,8 +609,8 @@ public:
HatchTimer = 10000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
@@ -652,7 +652,7 @@ public:
DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 03c06664edf..c8ab4a147ff 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -510,7 +510,7 @@ public:
struct boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI
{
//Rogue
- boss_kagani_nightstrikeAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
+ boss_kagani_nightstrikeAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) { }
uint32 Gouge_Timer;
uint32 Kick_Timer;
@@ -614,7 +614,7 @@ public:
struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
{
//Warlock
- boss_ellris_duskhallowAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
+ boss_ellris_duskhallowAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) { }
uint32 Immolate_Timer;
uint32 Shadow_Bolt_Timer;
@@ -705,7 +705,7 @@ public:
struct boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI
{
//Monk
- boss_eramas_brightblazeAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
+ boss_eramas_brightblazeAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) { }
uint32 Knockdown_Timer;
uint32 Snap_Kick_Timer;
@@ -766,7 +766,7 @@ public:
struct boss_yazzaiAI : public boss_priestess_lackey_commonAI
{
//Mage
- boss_yazzaiAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
+ boss_yazzaiAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) { }
bool HasIceBlocked;
@@ -896,7 +896,7 @@ public:
struct boss_warlord_salarisAI : public boss_priestess_lackey_commonAI
{
//Warrior
- boss_warlord_salarisAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
+ boss_warlord_salarisAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) { }
uint32 Intercept_Stun_Timer;
uint32 Disarm_Timer;
@@ -1127,7 +1127,7 @@ public:
struct boss_apokoAI : public boss_priestess_lackey_commonAI
{
//Shaman
- boss_apokoAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
+ boss_apokoAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) { }
uint32 Totem_Timer;
uint8 Totem_Amount;
@@ -1225,7 +1225,7 @@ public:
struct boss_zelfanAI : public boss_priestess_lackey_commonAI
{
//Engineer
- boss_zelfanAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) {}
+ boss_zelfanAI(Creature* creature) : boss_priestess_lackey_commonAI(creature) { }
uint32 Goblin_Dragon_Gun_Timer;
uint32 Rocket_Launch_Timer;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 668f7ec58f4..849713d72bf 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -84,7 +84,7 @@ public:
{
instance->SetData64(DATA_FEL_CRYSTAL, i);
uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
+ TC_LOG_DEBUG("scripts", "Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
Crystals.push_back(guid);
}
}
@@ -125,7 +125,7 @@ public:
// Set Inst data for encounter
instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
- } else TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ } else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
DrainLifeTimer = urand(3000, 7000);
DrainManaTimer = DrainLifeTimer + 5000;
@@ -225,7 +225,7 @@ public:
else
{
// Make an error message in case something weird happened here
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Selin Fireheart unable to drain crystal as the crystal is either dead or despawned");
+ TC_LOG_ERROR("scripts", "Selin Fireheart unable to drain crystal as the crystal is either dead or despawned");
DrainingCrystal = false;
}
}
@@ -332,14 +332,14 @@ public:
struct npc_fel_crystalAI : public ScriptedAI
{
- npc_fel_crystalAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_fel_crystalAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -361,7 +361,7 @@ public:
}
}
}
- } else TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ } else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
}
};
};
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
index 3694fa4a864..24b48112bb6 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
@@ -222,7 +222,7 @@ public:
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void JustDied(Unit* slayer) OVERRIDE
{
@@ -233,10 +233,10 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index 54323b5c133..41261549e38 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -62,7 +62,7 @@ public:
struct instance_magisters_terrace_InstanceMapScript : public InstanceScript
{
- instance_magisters_terrace_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_magisters_terrace_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 Encounter[MAX_ENCOUNTER];
uint32 DelrissaDeathCount;
@@ -291,7 +291,7 @@ public:
case DATA_FEL_CRYSTAL:
if (FelCrystals.size() < felCristalIndex)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Magisters Terrace: No Fel Crystals loaded in Inst Data");
+ TC_LOG_ERROR("scripts", "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 6fcc050a55e..c9e530bce56 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp
@@ -115,7 +115,7 @@ public:
struct npc_kalecgosAI : public ScriptedAI
{
- npc_kalecgosAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_kalecgosAI(Creature* creature) : ScriptedAI(creature) { }
uint32 m_uiTransformTimer;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 7feb0e47926..4dc62cc431d 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -180,7 +180,7 @@ public:
anchorGUID = anchor->GetGUID();
}
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "npc_unworthy_initiateAI: unable to find anchor!");
+ TC_LOG_ERROR("scripts", "npc_unworthy_initiateAI: unable to find anchor!");
float dist = 99.0f;
GameObject* prison = NULL;
@@ -200,7 +200,7 @@ public:
if (prison)
prison->ResetDoorOrButton();
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "npc_unworthy_initiateAI: unable to find prison!");
+ TC_LOG_ERROR("scripts", "npc_unworthy_initiateAI: unable to find prison!");
}
break;
case PHASE_TO_EQUIP:
@@ -211,7 +211,7 @@ public:
else
{
me->GetMotionMaster()->MovePoint(1, anchorX, anchorY, me->GetPositionZ());
- //TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
+ //TC_LOG_DEBUG("scripts", "npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
phase = PHASE_EQUIPING;
wait_timer = 0;
}
@@ -288,7 +288,7 @@ public:
struct npc_unworthy_initiate_anchorAI : public PassiveAI
{
- npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature), prisonerGUID(0) {}
+ npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature), prisonerGUID(0) { }
uint64 prisonerGUID;
@@ -615,7 +615,7 @@ public:
struct npc_salanar_the_horsemanAI : public ScriptedAI
{
- npc_salanar_the_horsemanAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_salanar_the_horsemanAI(Creature* creature) : ScriptedAI(creature) { }
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
@@ -687,7 +687,7 @@ public:
struct npc_ros_dark_riderAI : public ScriptedAI
{
- npc_ros_dark_riderAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_ros_dark_riderAI(Creature* creature) : ScriptedAI(creature) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
@@ -742,7 +742,7 @@ public:
struct npc_dkc1_gothikAI : public ScriptedAI
{
- npc_dkc1_gothikAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_dkc1_gothikAI(Creature* creature) : ScriptedAI(creature) { }
void MoveInLineOfSight(Unit* who) OVERRIDE
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index ba6f0f23656..20a7ccedb17 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -51,7 +51,7 @@ public:
struct npc_crusade_persuadedAI : public ScriptedAI
{
- npc_crusade_persuadedAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_crusade_persuadedAI(Creature* creature) : ScriptedAI(creature) { }
uint32 speechTimer;
uint32 speechCounter;
@@ -375,7 +375,7 @@ public:
struct npc_scarlet_courierAI : public ScriptedAI
{
- npc_scarlet_courierAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_scarlet_courierAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiStage;
uint32 uiStage_timer;
@@ -467,7 +467,7 @@ public:
struct npc_high_inquisitor_valrothAI : public ScriptedAI
{
- npc_high_inquisitor_valrothAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_high_inquisitor_valrothAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiRenew_timer;
uint32 uiInquisitor_Penance_timer;
@@ -603,7 +603,7 @@ public:
struct npc_a_special_surpriseAI : public ScriptedAI
{
- npc_a_special_surpriseAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_a_special_surpriseAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ExecuteSpeech_Timer;
uint32 ExecuteSpeech_Counter;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index ab1367ed684..97359ba65a9 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1678,10 +1678,10 @@ public:
struct npc_the_lich_king_tirion_dawnAI : public ScriptedAI
{
npc_the_lich_king_tirion_dawnAI(Creature* creature) : ScriptedAI(creature) { Reset(); }
- void Reset() OVERRIDE {}
- void AttackStart(Unit* /*who*/) {} // very sample, just don't make them aggreesive OVERRIDE
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
- void JustDied(Unit* /*killer*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void AttackStart(Unit* /*who*/) { } // very sample, just don't make them aggreesive OVERRIDE
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
+ void JustDied(Unit* /*killer*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
index aa4be5d2523..2bb187692fa 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
@@ -46,7 +46,7 @@ public:
struct npc_valkyr_battle_maidenAI : public PassiveAI
{
- npc_valkyr_battle_maidenAI(Creature* creature) : PassiveAI(creature) {}
+ npc_valkyr_battle_maidenAI(Creature* creature) : PassiveAI(creature) { }
uint32 FlyBackTimer;
float x, y, z;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
index 4cf6c069648..694fdf9d84e 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
@@ -53,7 +53,7 @@ public:
struct boss_arcanist_doanAI : public ScriptedAI
{
- boss_arcanist_doanAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_arcanist_doanAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Polymorph_Timer;
uint32 AoESilence_Timer;
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 a88ff8b2977..6f028e33726 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
@@ -45,7 +45,7 @@ public:
struct boss_azshir_the_sleeplessAI : public ScriptedAI
{
- boss_azshir_the_sleeplessAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_azshir_the_sleeplessAI(Creature* creature) : ScriptedAI(creature) { }
uint32 SoulSiphon_Timer;
uint32 CallOftheGrave_Timer;
@@ -58,7 +58,7 @@ public:
Terrify_Timer = 20000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
index f10ac0b5ba2..b3375d9448f 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
@@ -53,7 +53,7 @@ public:
struct boss_bloodmage_thalnosAI : public ScriptedAI
{
- boss_bloodmage_thalnosAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_bloodmage_thalnosAI(Creature* creature) : ScriptedAI(creature) { }
bool HpYell;
uint32 FlameShock_Timer;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 1b5d0a80eda..463e88b670b 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -162,8 +162,8 @@ public:
uint32 delay;
uint32 spell;
uint32 spell2;
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SetType(uint32 _type)
{
switch (Creaturetype = _type)
@@ -233,7 +233,7 @@ public:
struct npc_headAI : public ScriptedAI
{
- npc_headAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_headAI(Creature* creature) : ScriptedAI(creature) { }
uint64 bodyGUID;
@@ -254,7 +254,7 @@ public:
laugh = urand(15000, 30000);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SaySound(uint8 textEntry, Unit* target = 0)
{
@@ -796,7 +796,7 @@ public:
struct npc_pulsing_pumpkinAI : public ScriptedAI
{
- npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature) { }
bool sprouted;
uint64 debuffGUID;
@@ -821,7 +821,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
index 3c662fae9f8..40fe93155a5 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
@@ -62,7 +62,7 @@ public:
struct boss_herodAI : public ScriptedAI
{
- boss_herodAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_herodAI(Creature* creature) : ScriptedAI(creature) { }
bool Enrage;
@@ -148,9 +148,9 @@ public:
uint32 Start_Timer;
- void Reset() OVERRIDE {}
- void WaypointReached(uint32 /*waypointId*/) OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void WaypointReached(uint32 /*waypointId*/) OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
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 38fb663a073..46680730f7e 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
@@ -48,7 +48,7 @@ public:
struct boss_high_inquisitor_fairbanksAI : public ScriptedAI
{
- boss_high_inquisitor_fairbanksAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_high_inquisitor_fairbanksAI(Creature* creature) : ScriptedAI(creature) { }
uint32 CurseOfBlood_Timer;
uint32 DispelMagic_Timer;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
index 10d60eb15cd..4a0d8ff4796 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
@@ -49,7 +49,7 @@ public:
struct boss_houndmaster_lokseyAI : public ScriptedAI
{
- boss_houndmaster_lokseyAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_houndmaster_lokseyAI(Creature* creature) : ScriptedAI(creature) { }
uint32 BloodLust_Timer;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
index fcd0975fbc0..b2289f324f3 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
@@ -46,7 +46,7 @@ public:
struct boss_scornAI : public ScriptedAI
{
- boss_scornAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_scornAI(Creature* creature) : ScriptedAI(creature) { }
uint32 LichSlap_Timer;
uint32 FrostboltVolley_Timer;
@@ -61,7 +61,7 @@ public:
FrostNova_Timer = 30000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index 05664a946ed..b91a54e5afc 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -49,7 +49,7 @@ public:
struct instance_scarlet_monastery_InstanceMapScript : public InstanceScript
{
- instance_scarlet_monastery_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_scarlet_monastery_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 PumpkinShrineGUID;
uint64 HorsemanGUID;
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
index cb6da60bf28..2277c53ae6b 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
@@ -54,7 +54,7 @@ class boss_darkmaster_gandling : public CreatureScript
struct boss_darkmaster_gandlingAI : public BossAI
{
- boss_darkmaster_gandlingAI(Creature* creature) : BossAI(creature, DATA_DARKMASTERGANDLING) {}
+ boss_darkmaster_gandlingAI(Creature* creature) : BossAI(creature, DATA_DARKMASTERGANDLING) { }
void Reset() OVERRIDE
{
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 8ca8f04f33a..108dcc92f22 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp
@@ -38,7 +38,7 @@ public:
struct boss_death_knight_darkreaverAI : public ScriptedAI
{
- boss_death_knight_darkreaverAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_death_knight_darkreaverAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
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 3dae50ebf44..bcf5e82bc66 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp
@@ -51,7 +51,7 @@ class boss_doctor_theolen_krastinov : public CreatureScript
struct boss_theolenkrastinovAI : public BossAI
{
- boss_theolenkrastinovAI(Creature* creature) : BossAI(creature, DATA_DOCTORTHEOLENKRASTINOV) {}
+ boss_theolenkrastinovAI(Creature* creature) : BossAI(creature, DATA_DOCTORTHEOLENKRASTINOV) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
index 5da1bf14c7d..c3255ba9c65 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
@@ -48,7 +48,7 @@ class boss_illucia_barov : public CreatureScript
struct boss_illuciabarovAI : public BossAI
{
- boss_illuciabarovAI(Creature* creature) : BossAI(creature, DATA_LADYILLUCIABAROV) {}
+ boss_illuciabarovAI(Creature* creature) : BossAI(creature, DATA_LADYILLUCIABAROV) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
index c3bd97c9a0b..88f95df69c4 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
@@ -50,7 +50,7 @@ class boss_instructor_malicia : public CreatureScript
struct boss_instructormaliciaAI : public BossAI
{
- boss_instructormaliciaAI(Creature* creature) : BossAI(creature, DATA_INSTRUCTORMALICIA) {}
+ boss_instructormaliciaAI(Creature* creature) : BossAI(creature, DATA_INSTRUCTORMALICIA) { }
uint32 FlashCounter;
uint32 TouchCounter;
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
index ab259680c07..2663146317a 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
@@ -47,7 +47,7 @@ public:
struct boss_jandicebarovAI : public ScriptedAI
{
- boss_jandicebarovAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_jandicebarovAI(Creature* creature) : ScriptedAI(creature) { }
uint32 CurseOfBlood_Timer;
uint32 Illusion_Timer;
@@ -169,7 +169,7 @@ public:
struct npc_illusionofjandicebarovAI : public ScriptedAI
{
- npc_illusionofjandicebarovAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_illusionofjandicebarovAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Cleave_Timer;
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
index 0ba0ab4cb92..57cfeb7dc33 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp
@@ -44,7 +44,7 @@ public:
struct boss_kormokAI : public ScriptedAI
{
- boss_kormokAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_kormokAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ShadowVolley_Timer;
uint32 BoneShield_Timer;
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 26028590f5c..e06c0d6bfbb 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
@@ -44,7 +44,7 @@ class boss_lord_alexei_barov : public CreatureScript
struct boss_lordalexeibarovAI : public BossAI
{
- boss_lordalexeibarovAI(Creature* creature) : BossAI(creature, DATA_LORDALEXEIBAROV) {}
+ boss_lordalexeibarovAI(Creature* creature) : BossAI(creature, DATA_LORDALEXEIBAROV) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp
index bc6646be633..f41f456d24a 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp
@@ -48,7 +48,7 @@ class boss_lorekeeper_polkelt : public CreatureScript
struct boss_lorekeeperpolkeltAI : public BossAI
{
- boss_lorekeeperpolkeltAI(Creature* creature) : BossAI(creature, DATA_LOREKEEPERPOLKELT) {}
+ boss_lorekeeperpolkeltAI(Creature* creature) : BossAI(creature, DATA_LOREKEEPERPOLKELT) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
index 62922289821..451fd46938d 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp
@@ -48,7 +48,7 @@ public:
struct boss_rasfrostAI : public ScriptedAI
{
- boss_rasfrostAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_rasfrostAI(Creature* creature) : ScriptedAI(creature) { }
uint32 IceArmor_Timer;
uint32 Frostbolt_Timer;
@@ -69,7 +69,7 @@ public:
DoCast(me, SPELL_ICEARMOR, true);
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/)OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp
index 1e2c38fc487..9af473d4b4c 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp
@@ -48,7 +48,7 @@ class boss_the_ravenian : public CreatureScript
struct boss_theravenianAI : public BossAI
{
- boss_theravenianAI(Creature* creature) : BossAI(creature, DATA_THERAVENIAN) {}
+ boss_theravenianAI(Creature* creature) : BossAI(creature, DATA_THERAVENIAN) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
index e426fb4ec11..395581b3562 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp
@@ -51,7 +51,7 @@ public:
struct boss_vectusAI : public ScriptedAI
{
- boss_vectusAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_vectusAI(Creature* creature) : ScriptedAI(creature) { }
uint32 m_uiFireShield_Timer;
uint32 m_uiBlastWave_Timer;
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
index fde5bffd07a..8c022c98ba7 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
@@ -78,7 +78,7 @@ public:
struct instance_shadowfang_keep_InstanceMapScript : public InstanceScript
{
- instance_shadowfang_keep_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_shadowfang_keep_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 m_auiEncounter[MAX_ENCOUNTER];
std::string str_data;
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
index d5c3d27eed3..8d89592090e 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp
@@ -145,8 +145,8 @@ public:
}
}
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
};
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 319afb3deb2..42714c3f12e 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp
@@ -92,7 +92,7 @@ public:
struct boss_cannon_master_willeyAI : public ScriptedAI
{
- boss_cannon_master_willeyAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_cannon_master_willeyAI(Creature* creature) : ScriptedAI(creature) { }
uint32 KnockAway_Timer;
uint32 Pummel_Timer;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
index 21320ed738f..5847f7b132b 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
@@ -81,7 +81,7 @@ public:
struct boss_dathrohan_balnazzarAI : public ScriptedAI
{
- boss_dathrohan_balnazzarAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_dathrohan_balnazzarAI(Creature* creature) : ScriptedAI(creature) { }
uint32 m_uiCrusadersHammer_Timer;
uint32 m_uiCrusaderStrike_Timer;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp
index 1c5f0c72153..150d134da07 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp
@@ -53,7 +53,7 @@ public:
struct boss_magistrate_barthilasAI : public ScriptedAI
{
- boss_magistrate_barthilasAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_magistrate_barthilasAI(Creature* creature) : ScriptedAI(creature) { }
uint32 DrainingBlow_Timer;
uint32 CrowdPummel_Timer;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp
index 5f169ece0d5..b67c039ec74 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp
@@ -59,9 +59,9 @@ class boss_postmaster_malown : public CreatureScript
struct boss_postmaster_malownAI : public BossAI
{
- boss_postmaster_malownAI(Creature* creature) : BossAI(creature, TYPE_MALOWN) {}
+ boss_postmaster_malownAI(Creature* creature) : BossAI(creature, TYPE_MALOWN) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
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 020b14f4823..6d4ba8a1631 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp
@@ -48,7 +48,7 @@ public:
struct boss_timmy_the_cruelAI : public ScriptedAI
{
- boss_timmy_the_cruelAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_timmy_the_cruelAI(Creature* creature) : ScriptedAI(creature) { }
uint32 RavenousClaw_Timer;
bool HasYelled;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
index 85eabe70cfa..732cdd0d4f4 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -107,7 +107,7 @@ class instance_stratholme : public InstanceMapScript
return true;
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Stratholme: Cannot open slaugther square yet.");
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: Cannot open slaugther square yet.");
return false;
}
@@ -225,7 +225,7 @@ class instance_stratholme : public InstanceMapScript
break;
EncounterState[0] = data;
events.ScheduleEvent(EVENT_BARON_RUN, 2700000);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Stratholme: Baron run in progress.");
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: Baron run in progress.");
break;
case FAIL:
DoRemoveAurasDueToSpellOnPlayers(SPELL_BARON_ULTIMATUM);
@@ -289,10 +289,10 @@ class instance_stratholme : public InstanceMapScript
//UpdateGoState(ziggurat4GUID, 0, true);
if (Creature* pBaron = instance->GetCreature(baronGUID))
pBaron->SummonCreature(NPC_RAMSTEIN, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Stratholme: Ramstein spawned.");
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: Ramstein spawned.");
}
else
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Stratholme: %u Abomnation left to kill.", count);
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: %u Abomnation left to kill.", count);
}
if (data == NOT_STARTED)
@@ -301,7 +301,7 @@ class instance_stratholme : public InstanceMapScript
if (data == DONE)
{
events.ScheduleEvent(EVENT_SLAUGHTER_SQUARE, 60000);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Stratholme: Slaugther event will continue in 1 minute.");
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: Slaugther event will continue in 1 minute.");
}
EncounterState[4] = data;
break;
@@ -437,7 +437,7 @@ class instance_stratholme : public InstanceMapScript
case EVENT_BARON_RUN:
if (GetData(TYPE_BARON_RUN) != DONE)
SetData(TYPE_BARON_RUN, FAIL);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN));
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN));
break;
case EVENT_SLAUGHTER_SQUARE:
if (Creature* baron = instance->GetCreature(baronGUID))
@@ -447,7 +447,7 @@ class instance_stratholme : public InstanceMapScript
HandleGameObject(ziggurat4GUID, true);
HandleGameObject(ziggurat5GUID, true);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
+ TC_LOG_DEBUG("scripts", "Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
}
break;
default:
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
index ff2bc1cb15c..1b15f30353b 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp
@@ -100,14 +100,14 @@ public:
struct npc_freed_soulAI : public ScriptedAI
{
- npc_freed_soulAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_freed_soulAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
Talk(SAY_ZAPPED);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
};
@@ -142,7 +142,7 @@ public:
struct npc_restless_soulAI : public ScriptedAI
{
- npc_restless_soulAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_restless_soulAI(Creature* creature) : ScriptedAI(creature) { }
uint64 Tagger;
uint32 Die_Timer;
@@ -155,7 +155,7 @@ public:
Tagged = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
@@ -224,7 +224,7 @@ public:
struct npc_spectral_ghostly_citizenAI : public ScriptedAI
{
- npc_spectral_ghostly_citizenAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_spectral_ghostly_citizenAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Die_Timer;
bool Tagged;
@@ -235,7 +235,7 @@ public:
Tagged = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
index 4460fb99f2b..3fd346d6816 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
@@ -44,7 +44,7 @@ enum Quotes
YELL_MADR_INTRO = 1,
YELL_MADR_ICE_BLOCK = 2,
YELL_MADR_TRAP = 3,
- YELL_MADR_DEATH = 4,
+ YELL_MADR_DEATH = 4
};
enum Spells
@@ -61,18 +61,11 @@ enum Spells
SPELL_INTRO_ENCAPSULATE_CHANELLING = 45661
};
-#define FELMYST 25038
-
class boss_brutallus : public CreatureScript
{
public:
boss_brutallus() : CreatureScript("boss_brutallus") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_brutallusAI(creature);
- }
-
struct boss_brutallusAI : public ScriptedAI
{
boss_brutallusAI(Creature* creature) : ScriptedAI(creature)
@@ -112,16 +105,14 @@ public:
DoCast(me, SPELL_DUAL_WIELD, true);
- if (instance)
- instance->SetData(DATA_BRUTALLUS_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_BRUTALLUS, NOT_STARTED);
}
void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(YELL_AGGRO);
- if (instance)
- instance->SetData(DATA_BRUTALLUS_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_BRUTALLUS, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
@@ -133,13 +124,10 @@ public:
{
Talk(YELL_DEATH);
- if (instance)
- {
- instance->SetData(DATA_BRUTALLUS_EVENT, DONE);
- float x, y, z;
- me->GetPosition(x, y, z);
- me->SummonCreature(FELMYST, x, y, z+30, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
- }
+ instance->SetBossState(DATA_BRUTALLUS, DONE);
+ float x, y, z;
+ me->GetPosition(x, y, z);
+ me->SummonCreature(NPC_FELMYST, x, y, z + 30, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
}
void EnterEvadeMode() OVERRIDE
@@ -152,8 +140,8 @@ public:
{
if (!Intro || IsIntro)
return;
- Creature* Madrigosa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0);
- if (Madrigosa)
+
+ if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MADRIGOSA)))
{
Madrigosa->Respawn();
Madrigosa->setActive(true);
@@ -166,8 +154,8 @@ public:
}
else
{
- //Madrigosa not found, end intro
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Madrigosa was not found");
+ // Madrigosa not found, end intro
+ TC_LOG_ERROR("scripts", "Madrigosa was not found");
EndIntro();
}
}
@@ -188,7 +176,7 @@ public:
void DoIntro()
{
- Creature* Madrigosa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0);
+ Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0);
if (!Madrigosa)
return;
@@ -265,15 +253,16 @@ public:
}
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
if (!me->IsValidAttackTarget(who))
return;
- if (instance && Intro)
- instance->SetData(DATA_BRUTALLUS_EVENT, SPECIAL);
+
+ if (Intro)
+ instance->SetBossState(DATA_BRUTALLUS, SPECIAL);
if (Intro && !IsIntro)
StartIntro();
+
if (!Intro)
ScriptedAI::MoveInLineOfSight(who);
}
@@ -290,15 +279,19 @@ public:
{
if (IntroFrostBoltTimer <= diff)
{
- if (Creature* Madrigosa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0))
+ if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MADRIGOSA)))
{
Madrigosa->CastSpell(me, SPELL_INTRO_FROSTBOLT, true);
IntroFrostBoltTimer = 2000;
}
- } else IntroFrostBoltTimer -= diff;
+ }
+ else
+ IntroFrostBoltTimer -= diff;
}
+
if (!UpdateVictim())
return;
+
DoMeleeAttackIfReady();
}
@@ -341,6 +334,11 @@ public:
DoMeleeAttackIfReady();
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_brutallusAI>(creature);
+ }
};
void AddSC_boss_brutallus()
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
index d402eccedd4..e68d834b20d 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
@@ -15,12 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Eredar_Twins
-SD%Complete: 100
-SDComment:
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "sunwell_plateau.h"
@@ -48,35 +42,35 @@ enum Quotes
YELL_ALY_DEAD = 6,
YELL_SISTER_SACROLASH_DEAD = 7,
YELL_CANFLAGRATION = 8,
- YELL_BERSERK = 9,
+ YELL_BERSERK = 9
};
enum Spells
{
//Lady Sacrolash spells
- SPELL_DARK_TOUCHED = 45347,
- SPELL_SHADOW_BLADES = 45248, //10 secs
- SPELL_DARK_STRIKE = 45271,
- SPELL_SHADOW_NOVA = 45329, //30-35 secs
- SPELL_CONFOUNDING_BLOW = 45256, //25 secs
+ SPELL_DARK_TOUCHED = 45347,
+ SPELL_SHADOW_BLADES = 45248, //10 secs
+ SPELL_DARK_STRIKE = 45271,
+ SPELL_SHADOW_NOVA = 45329, //30-35 secs
+ SPELL_CONFOUNDING_BLOW = 45256, //25 secs
//Shadow Image spells
- SPELL_SHADOW_FURY = 45270,
- SPELL_IMAGE_VISUAL = 45263,
+ SPELL_SHADOW_FURY = 45270,
+ SPELL_IMAGE_VISUAL = 45263,
//Misc spells
- SPELL_ENRAGE = 46587,
- SPELL_EMPOWER = 45366,
- SPELL_DARK_FLAME = 45345,
+ SPELL_ENRAGE = 46587,
+ SPELL_EMPOWER = 45366,
+ SPELL_DARK_FLAME = 45345,
//Grand Warlock Alythess spells
- SPELL_PYROGENICS = 45230, //15secs
- SPELL_FLAME_TOUCHED = 45348,
- SPELL_CONFLAGRATION = 45342, //30-35 secs
- SPELL_BLAZE = 45235, //on main target every 3 secs
- SPELL_FLAME_SEAR = 46771,
- SPELL_BLAZE_SUMMON = 45236, //187366 GO
- SPELL_BLAZE_BURN = 45246
+ SPELL_PYROGENICS = 45230, //15secs
+ SPELL_FLAME_TOUCHED = 45348,
+ SPELL_CONFLAGRATION = 45342, //30-35 secs
+ SPELL_BLAZE = 45235, //on main target every 3 secs
+ SPELL_FLAME_SEAR = 46771,
+ SPELL_BLAZE_SUMMON = 45236, //187366 GO
+ SPELL_BLAZE_BURN = 45246
};
class boss_sacrolash : public CreatureScript
@@ -84,11 +78,6 @@ class boss_sacrolash : public CreatureScript
public:
boss_sacrolash() : CreatureScript("boss_sacrolash") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_sacrolashAI(creature);
- };
-
struct boss_sacrolashAI : public ScriptedAI
{
boss_sacrolashAI(Creature* creature) : ScriptedAI(creature)
@@ -112,15 +101,12 @@ public:
{
Enraged = false;
- if (instance)
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)))
{
- if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)))
- {
- if (temp->isDead())
- temp->Respawn();
- else if (temp->GetVictim())
- me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
- }
+ if (temp->isDead())
+ temp->Respawn();
+ else if (temp->GetVictim())
+ me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
}
if (!me->IsInCombat())
@@ -131,27 +117,21 @@ public:
ShadowimageTimer = 20000;
ConflagrationTimer = 30000;
EnrageTimer = 360000;
-
SisterDeath = false;
}
- if (instance)
- instance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_EREDAR_TWINS, NOT_STARTED);
}
void EnterCombat(Unit* who) OVERRIDE
{
DoZoneInCombat();
- if (instance)
- {
- Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS));
- if (temp && temp->IsAlive() && !temp->GetVictim())
- temp->AI()->AttackStart(who);
- }
+ Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALYTHESS));
+ if (temp && temp->IsAlive() && !temp->GetVictim())
+ temp->AI()->AttackStart(who);
- if (instance)
- instance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_EREDAR_TWINS, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
@@ -167,8 +147,7 @@ public:
{
Talk(YELL_SAC_DEAD);
- if (instance)
- instance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
+ instance->SetBossState(DATA_EREDAR_TWINS, DONE);
}
else
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
@@ -178,15 +157,15 @@ public:
{
switch (spell->Id)
{
- case SPELL_SHADOW_BLADES:
- case SPELL_SHADOW_NOVA:
- case SPELL_CONFOUNDING_BLOW:
- case SPELL_SHADOW_FURY:
- HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
- break;
- case SPELL_CONFLAGRATION:
- HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
- break;
+ case SPELL_SHADOW_BLADES:
+ case SPELL_SHADOW_NOVA:
+ case SPELL_CONFOUNDING_BLOW:
+ case SPELL_SHADOW_FURY:
+ HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
+ break;
+ case SPELL_CONFLAGRATION:
+ HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
+ break;
}
}
@@ -194,26 +173,26 @@ public:
{
switch (TouchedType)
{
- case SPELL_FLAME_TOUCHED:
- if (!target->HasAura(SPELL_DARK_FLAME))
- {
- if (target->HasAura(SPELL_DARK_TOUCHED))
+ case SPELL_FLAME_TOUCHED:
+ if (!target->HasAura(SPELL_DARK_FLAME))
{
- target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
- target->CastSpell(target, SPELL_DARK_FLAME, true);
- } else target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
- }
- break;
- case SPELL_DARK_TOUCHED:
- if (!target->HasAura(SPELL_DARK_FLAME))
- {
- if (target->HasAura(SPELL_FLAME_TOUCHED))
+ if (target->HasAura(SPELL_DARK_TOUCHED))
+ {
+ target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
+ target->CastSpell(target, SPELL_DARK_FLAME, true);
+ } else target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
+ }
+ break;
+ case SPELL_DARK_TOUCHED:
+ if (!target->HasAura(SPELL_DARK_FLAME))
{
- target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
- target->CastSpell(target, SPELL_DARK_FLAME, true);
- } else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
- }
- break;
+ if (target->HasAura(SPELL_FLAME_TOUCHED))
+ {
+ target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
+ target->CastSpell(target, SPELL_DARK_FLAME, true);
+ } else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
+ }
+ break;
}
}
@@ -221,17 +200,13 @@ public:
{
if (!SisterDeath)
{
- if (instance)
+ Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ALYTHESS));
+ if (Temp && Temp->isDead())
{
- Unit* Temp = NULL;
- Temp = Unit::GetUnit(*me, instance->GetData64(DATA_ALYTHESS));
- if (Temp && Temp->isDead())
- {
- Talk(YELL_SISTER_ALYTHESS_DEAD);
- DoCast(me, SPELL_EMPOWER);
- me->InterruptSpell(CURRENT_GENERIC_SPELL);
- SisterDeath = true;
- }
+ Talk(YELL_SISTER_ALYTHESS_DEAD);
+ DoCast(me, SPELL_EMPOWER);
+ me->InterruptSpell(CURRENT_GENERIC_SPELL);
+ SisterDeath = true;
}
}
@@ -245,9 +220,7 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
- Unit* target = NULL;
- target = SelectTarget(SELECT_TARGET_RANDOM, 0);
- if (target)
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_CONFLAGRATION);
ConflagrationTimer = 30000+(rand()%5000);
}
@@ -259,8 +232,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
- Unit* target = NULL;
- target = SelectTarget(SELECT_TARGET_RANDOM, 0);
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (target)
DoCast(target, SPELL_SHADOW_NOVA);
@@ -279,9 +251,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
- Unit* target = NULL;
- target = SelectTarget(SELECT_TARGET_RANDOM, 0);
- if (target)
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_CONFOUNDING_BLOW);
ConfoundingblowTimer = 20000 + (rand()%5000);
}
@@ -297,7 +267,7 @@ public:
temp = DoSpawnCreature(NPC_SHADOW_IMAGE, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 10000);
if (temp && target)
{
- temp->AddThreat(target, 1000000);//don't change target(healers)
+ temp->AddThreat(target, 1000000); //don't change target(healers)
temp->AI()->AttackStart(target);
}
}
@@ -333,6 +303,11 @@ public:
}
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_sacrolashAI>(creature);
+ };
};
class boss_alythess : public CreatureScript
@@ -340,11 +315,6 @@ class boss_alythess : public CreatureScript
public:
boss_alythess() : CreatureScript("boss_alythess") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_alythessAI(creature);
- };
-
struct boss_alythessAI : public ScriptedAI
{
boss_alythessAI(Creature* creature) : ScriptedAI(creature)
@@ -374,15 +344,12 @@ public:
{
Enraged = false;
- if (instance)
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH)))
{
- if (Creature* temp = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH)))
- {
- if (temp->isDead())
- temp->Respawn();
- else if (temp->GetVictim())
- me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
- }
+ if (temp->isDead())
+ temp->Respawn();
+ else if (temp->GetVictim())
+ me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
}
if (!me->IsInCombat())
@@ -398,23 +365,18 @@ public:
SisterDeath = false;
}
- if (instance)
- instance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_EREDAR_TWINS, NOT_STARTED);
}
void EnterCombat(Unit* who) OVERRIDE
{
DoZoneInCombat();
- if (instance)
- {
- Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
- if (temp && temp->IsAlive() && !temp->GetVictim())
- temp->AI()->AttackStart(who);
- }
+ Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
+ if (temp && temp->IsAlive() && !temp->GetVictim())
+ temp->AI()->AttackStart(who);
- if (instance)
- instance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_EREDAR_TWINS, IN_PROGRESS);
}
void AttackStart(Unit* who) OVERRIDE
@@ -424,7 +386,6 @@ public:
}
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
if (!who || me->GetVictim())
return;
@@ -441,17 +402,13 @@ public:
}
}
else if (IntroStepCounter == 10 && me->IsWithinLOSInMap(who)&& me->IsWithinDistInMap(who, 30))
- {
IntroStepCounter = 0;
- }
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (rand()%4 == 0)
- {
Talk(YELL_ALY_KILL);
- }
}
void JustDied(Unit* /*killer*/) OVERRIDE
@@ -459,9 +416,7 @@ public:
if (SisterDeath)
{
Talk(YELL_ALY_DEAD);
-
- if (instance)
- instance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
+ instance->SetBossState(DATA_EREDAR_TWINS, DONE);
}
else
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
@@ -471,16 +426,16 @@ public:
{
switch (spell->Id)
{
- case SPELL_BLAZE:
- target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
- break;
- case SPELL_CONFLAGRATION:
- case SPELL_FLAME_SEAR:
- HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
- break;
- case SPELL_SHADOW_NOVA:
- HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
- break;
+ case SPELL_BLAZE:
+ target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
+ break;
+ case SPELL_CONFLAGRATION:
+ case SPELL_FLAME_SEAR:
+ HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
+ break;
+ case SPELL_SHADOW_NOVA:
+ HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
+ break;
}
}
@@ -488,58 +443,68 @@ public:
{
switch (TouchedType)
{
- case SPELL_FLAME_TOUCHED:
- if (!target->HasAura(SPELL_DARK_FLAME))
- {
- if (target->HasAura(SPELL_DARK_TOUCHED))
- {
- target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
- target->CastSpell(target, SPELL_DARK_FLAME, true);
- }else
+ case SPELL_FLAME_TOUCHED:
+ if (!target->HasAura(SPELL_DARK_FLAME))
{
- target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
+ if (target->HasAura(SPELL_DARK_TOUCHED))
+ {
+ target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
+ target->CastSpell(target, SPELL_DARK_FLAME, true);
+ }
+ else
+ target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
}
- }
- break;
- case SPELL_DARK_TOUCHED:
- if (!target->HasAura(SPELL_DARK_FLAME))
- {
- if (target->HasAura(SPELL_FLAME_TOUCHED))
+ break;
+ case SPELL_DARK_TOUCHED:
+ if (!target->HasAura(SPELL_DARK_FLAME))
{
- target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
- target->CastSpell(target, SPELL_DARK_FLAME, true);
- } else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
- }
- break;
+ if (target->HasAura(SPELL_FLAME_TOUCHED))
+ {
+ target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
+ target->CastSpell(target, SPELL_DARK_FLAME, true);
+ }
+ else
+ target->CastSpell(target, SPELL_DARK_TOUCHED, true);
+ }
+ break;
}
}
uint32 IntroStep(uint32 step)
{
- Creature* Sacrolash = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_SACROLASH) : 0);
+ Creature* Sacrolash = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
switch (step)
{
- case 0: return 0;
- case 1:
- if (Sacrolash)
- Sacrolash->AI()->Talk(YELL_INTRO_SAC_1);
- return 1000;
- case 2: Talk(YELL_INTRO_ALY_2); return 1000;
- case 3:
- if (Sacrolash)
- Sacrolash->AI()->Talk(YELL_INTRO_SAC_3);
- return 2000;
- case 4: Talk(YELL_INTRO_ALY_4); return 1000;
- case 5:
- if (Sacrolash)
- Sacrolash->AI()->Talk(YELL_INTRO_SAC_5);
- return 2000;
- case 6: Talk(YELL_INTRO_ALY_6); return 1000;
- case 7:
- if (Sacrolash)
- Sacrolash->AI()->Talk(YELL_INTRO_SAC_7);
- return 3000;
- case 8: Talk(YELL_INTRO_ALY_8); return 900000;
+ case 0:
+ return 0;
+ case 1:
+ if (Sacrolash)
+ Sacrolash->AI()->Talk(YELL_INTRO_SAC_1);
+ return 1000;
+ case 2:
+ Talk(YELL_INTRO_ALY_2);
+ return 1000;
+ case 3:
+ if (Sacrolash)
+ Sacrolash->AI()->Talk(YELL_INTRO_SAC_3);
+ return 2000;
+ case 4:
+ Talk(YELL_INTRO_ALY_4);
+ return 1000;
+ case 5:
+ if (Sacrolash)
+ Sacrolash->AI()->Talk(YELL_INTRO_SAC_5);
+ return 2000;
+ case 6:
+ Talk(YELL_INTRO_ALY_6);
+ return 1000;
+ case 7:
+ if (Sacrolash)
+ Sacrolash->AI()->Talk(YELL_INTRO_SAC_7);
+ return 3000;
+ case 8:
+ Talk(YELL_INTRO_ALY_8);
+ return 900000;
}
return 10000;
}
@@ -556,30 +521,23 @@ public:
if (!SisterDeath)
{
- if (instance)
+ Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SACROLASH));
+ if (Temp && Temp->isDead())
{
- Unit* Temp = NULL;
- Temp = Unit::GetUnit(*me, instance->GetData64(DATA_SACROLASH));
- if (Temp && Temp->isDead())
- {
- Talk(YELL_SISTER_SACROLASH_DEAD);
- DoCast(me, SPELL_EMPOWER);
- me->InterruptSpell(CURRENT_GENERIC_SPELL);
- SisterDeath = true;
- }
+ Talk(YELL_SISTER_SACROLASH_DEAD);
+ DoCast(me, SPELL_EMPOWER);
+ me->InterruptSpell(CURRENT_GENERIC_SPELL);
+ SisterDeath = true;
}
}
if (!me->GetVictim())
{
- if (instance)
+ Creature* sisiter = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
+ if (sisiter && !sisiter->isDead() && sisiter->GetVictim())
{
- Creature* sisiter = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH));
- if (sisiter && !sisiter->isDead() && sisiter->GetVictim())
- {
- me->AddThreat(sisiter->GetVictim(), 0.0f);
- DoStartNoMovement(sisiter->GetVictim());
- me->Attack(sisiter->GetVictim(), false);
- }
+ me->AddThreat(sisiter->GetVictim(), 0.0f);
+ DoStartNoMovement(sisiter->GetVictim());
+ me->Attack(sisiter->GetVictim(), false);
}
}
@@ -592,9 +550,7 @@ public:
{
if (!me->IsNonMeleeSpellCasted(false))
{
- Unit* target = NULL;
- target = SelectTarget(SELECT_TARGET_RANDOM, 0);
- if (target)
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_SHADOW_NOVA);
ShadownovaTimer= 30000+(rand()%5000);
}
@@ -607,8 +563,7 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
- Unit* target = NULL;
- target = SelectTarget(SELECT_TARGET_RANDOM, 0);
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (target)
DoCast(target, SPELL_CONFLAGRATION);
ConflagrationTimer = 30000+(rand()%5000);
@@ -661,6 +616,11 @@ public:
} else EnrageTimer -= diff;
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_alythessAI>(creature);
+ };
};
class npc_shadow_image : public CreatureScript
@@ -675,7 +635,7 @@ public:
struct npc_shadow_imageAI : public ScriptedAI
{
- npc_shadow_imageAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_shadow_imageAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ShadowfuryTimer;
uint32 KillTimer;
@@ -689,23 +649,23 @@ public:
KillTimer = 15000;
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE
{
switch (spell->Id)
{
- case SPELL_SHADOW_FURY:
- case SPELL_DARK_STRIKE:
- if (!target->HasAura(SPELL_DARK_FLAME))
- {
- if (target->HasAura(SPELL_FLAME_TOUCHED))
+ case SPELL_SHADOW_FURY:
+ case SPELL_DARK_STRIKE:
+ if (!target->HasAura(SPELL_DARK_FLAME))
{
- target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
- target->CastSpell(target, SPELL_DARK_FLAME, true);
- } else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
- }
- break;
+ if (target->HasAura(SPELL_FLAME_TOUCHED))
+ {
+ target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
+ target->CastSpell(target, SPELL_DARK_FLAME, true);
+ } else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
+ }
+ break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index a74e2cc87b1..ca5dcf5360e 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -81,14 +81,14 @@ enum Spells
//Other
SPELL_BERSERK = 45078,
SPELL_CLOUD_VISUAL = 45212,
- SPELL_CLOUD_SUMMON = 45884,
+ SPELL_CLOUD_SUMMON = 45884
};
enum PhaseFelmyst
{
PHASE_NONE,
PHASE_GROUND,
- PHASE_FLIGHT,
+ PHASE_FLIGHT
};
enum EventFelmyst
@@ -104,7 +104,7 @@ enum EventFelmyst
EVENT_FLIGHT_SEQUENCE,
EVENT_SUMMON_DEAD,
- EVENT_SUMMON_FOG,
+ EVENT_SUMMON_FOG
};
class boss_felmyst : public CreatureScript
@@ -112,11 +112,6 @@ class boss_felmyst : public CreatureScript
public:
boss_felmyst() : CreatureScript("boss_felmyst") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_felmystAI(creature);
- }
-
struct boss_felmystAI : public ScriptedAI
{
boss_felmystAI(Creature* creature) : ScriptedAI(creature)
@@ -148,8 +143,7 @@ public:
DespawnSummons(NPC_VAPOR_TRAIL);
me->setActive(false);
- if (instance)
- instance->SetData(DATA_FELMYST_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_FELMYST, NOT_STARTED);
}
void EnterCombat(Unit* /*who*/) OVERRIDE
@@ -162,8 +156,7 @@ public:
DoCast(me, AURA_NOXIOUS_FUMES, true);
EnterPhase(PHASE_GROUND);
- if (instance)
- instance->SetData(DATA_FELMYST_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_FELMYST, IN_PROGRESS);
}
void AttackStart(Unit* who) OVERRIDE
@@ -173,7 +166,6 @@ public:
}
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
if (phase != PHASE_FLIGHT)
ScriptedAI::MoveInLineOfSight(who);
@@ -193,8 +185,7 @@ public:
{
Talk(YELL_DEATH);
- if (instance)
- instance->SetData(DATA_FELMYST_EVENT, DONE);
+ instance->SetBossState(DATA_FELMYST, DONE);
}
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
@@ -246,26 +237,26 @@ public:
{
switch (NextPhase)
{
- case PHASE_GROUND:
- me->CastStop(SPELL_FOG_BREATH);
- me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
- me->StopMoving();
- me->SetSpeed(MOVE_RUN, 2.0f);
-
- events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
- events.ScheduleEvent(EVENT_CORROSION, urand(10000, 20000));
- events.ScheduleEvent(EVENT_GAS_NOVA, urand(15000, 20000));
- events.ScheduleEvent(EVENT_ENCAPSULATE, urand(20000, 25000));
- events.ScheduleEvent(EVENT_FLIGHT, 60000);
- break;
- case PHASE_FLIGHT:
- me->SetDisableGravity(true);
- events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1000);
- uiFlightCount = 0;
- uiBreathCount = 0;
- break;
- default:
- break;
+ case PHASE_GROUND:
+ me->CastStop(SPELL_FOG_BREATH);
+ me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
+ me->StopMoving();
+ me->SetSpeed(MOVE_RUN, 2.0f);
+
+ events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
+ events.ScheduleEvent(EVENT_CORROSION, urand(10000, 20000));
+ events.ScheduleEvent(EVENT_GAS_NOVA, urand(15000, 20000));
+ events.ScheduleEvent(EVENT_ENCAPSULATE, urand(20000, 25000));
+ events.ScheduleEvent(EVENT_FLIGHT, 60000);
+ break;
+ case PHASE_FLIGHT:
+ me->SetDisableGravity(true);
+ events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1000);
+ uiFlightCount = 0;
+ uiBreathCount = 0;
+ break;
+ default:
+ break;
}
phase = NextPhase;
}
@@ -274,133 +265,131 @@ public:
{
switch (uiFlightCount)
{
- case 0:
- //me->AttackStop();
- me->GetMotionMaster()->Clear(false);
- me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
- me->StopMoving();
- Talk(YELL_TAKEOFF);
- events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 2000);
- break;
- case 1:
- me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+1, me->GetPositionY(), me->GetPositionZ()+10);
- break;
- case 2:
- {
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
- if (!target)
- target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);
-
- if (!target)
+ case 0:
+ //me->AttackStop();
+ me->GetMotionMaster()->Clear(false);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
+ me->StopMoving();
+ Talk(YELL_TAKEOFF);
+ events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 2000);
+ break;
+ case 1:
+ me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+1, me->GetPositionY(), me->GetPositionZ()+10);
+ break;
+ case 2:
{
- EnterEvadeMode();
- return;
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
+ if (!target)
+ target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
+
+ if (!target)
+ {
+ EnterEvadeMode();
+ return;
+ }
+
+ if (Creature* Vapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000))
+ {
+ Vapor->AI()->AttackStart(target);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
+ Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
+ }
+
+ events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
+ break;
}
-
- Creature* Vapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
- if (Vapor)
+ case 3:
{
- Vapor->AI()->AttackStart(target);
- me->InterruptNonMeleeSpells(false);
- DoCast(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
- Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
+ DespawnSummons(NPC_VAPOR_TRAIL);
+ //DoCast(me, SPELL_VAPOR_SELECT); need core support
+
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
+ if (!target)
+ target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
+
+ if (!target)
+ {
+ EnterEvadeMode();
+ return;
+ }
+
+ //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
+ if (Creature* pVapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000))
+ {
+ if (pVapor->AI())
+ pVapor->AI()->AttackStart(target);
+ me->InterruptNonMeleeSpells(false);
+ DoCast(pVapor, SPELL_VAPOR_CHANNEL, false); // core bug
+ pVapor->CastSpell(pVapor, SPELL_VAPOR_TRIGGER, true);
+ }
+
+ events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
+ break;
}
-
- events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
- break;
- }
- case 3:
- {
- DespawnSummons(NPC_VAPOR_TRAIL);
- //DoCast(me, SPELL_VAPOR_SELECT); need core support
-
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
- if (!target)
- target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);
-
- if (!target)
+ case 4:
+ DespawnSummons(NPC_VAPOR_TRAIL);
+ events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
+ break;
+ case 5:
{
- EnterEvadeMode();
- return;
+ Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
+ if (!target)
+ target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
+
+ if (!target)
+ {
+ EnterEvadeMode();
+ return;
+ }
+
+ breathX = target->GetPositionX();
+ breathY = target->GetPositionY();
+ float x, y, z;
+ target->GetContactPoint(me, x, y, z, 70);
+ me->GetMotionMaster()->MovePoint(0, x, y, z+10);
+ break;
}
-
- //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
- Creature* pVapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
- if (pVapor)
+ case 6:
+ me->SetOrientation(me->GetAngle(breathX, breathY));
+ me->StopMoving();
+ //DoTextEmote("takes a deep breath.", NULL);
+ events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
+ break;
+ case 7:
{
- if (pVapor->AI())
- pVapor->AI()->AttackStart(target);
- me->InterruptNonMeleeSpells(false);
- DoCast(pVapor, SPELL_VAPOR_CHANNEL, false); // core bug
- pVapor->CastSpell(pVapor, SPELL_VAPOR_TRIGGER, true);
+ DoCast(me, SPELL_FOG_BREATH, true);
+ float x, y, z;
+ me->GetPosition(x, y, z);
+ x = 2 * breathX - x;
+ y = 2 * breathY - y;
+ me->GetMotionMaster()->MovePoint(0, x, y, z);
+ events.ScheduleEvent(EVENT_SUMMON_FOG, 1);
+ break;
}
-
- events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
- break;
- }
- case 4:
- DespawnSummons(NPC_VAPOR_TRAIL);
- events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
- break;
- case 5:
- {
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
- if (!target)
- target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);
-
- if (!target)
- {
- EnterEvadeMode();
- return;
- }
-
- breathX = target->GetPositionX();
- breathY = target->GetPositionY();
- float x, y, z;
- target->GetContactPoint(me, x, y, z, 70);
- me->GetMotionMaster()->MovePoint(0, x, y, z+10);
- break;
- }
- case 6:
- me->SetOrientation(me->GetAngle(breathX, breathY));
- me->StopMoving();
- //DoTextEmote("takes a deep breath.", NULL);
- events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
- break;
- case 7:
- {
- DoCast(me, SPELL_FOG_BREATH, true);
- float x, y, z;
- me->GetPosition(x, y, z);
- x = 2 * breathX - x;
- y = 2 * breathY - y;
- me->GetMotionMaster()->MovePoint(0, x, y, z);
- events.ScheduleEvent(EVENT_SUMMON_FOG, 1);
- break;
- }
- case 8:
- me->CastStop(SPELL_FOG_BREATH);
- me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
- ++uiBreathCount;
- events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
- if (uiBreathCount < 3)
- uiFlightCount = 4;
- break;
- case 9:
- if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO))
- DoStartMovement(target);
- else
- {
- EnterEvadeMode();
- return;
- }
- break;
- case 10:
- me->SetDisableGravity(false);
- me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
- EnterPhase(PHASE_GROUND);
- AttackStart(SelectTarget(SELECT_TARGET_TOPAGGRO));
- break;
+ case 8:
+ me->CastStop(SPELL_FOG_BREATH);
+ me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
+ ++uiBreathCount;
+ events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
+ if (uiBreathCount < 3)
+ uiFlightCount = 4;
+ break;
+ case 9:
+ if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO))
+ DoStartMovement(target);
+ else
+ {
+ EnterEvadeMode();
+ return;
+ }
+ break;
+ case 10:
+ me->SetDisableGravity(false);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
+ EnterPhase(PHASE_GROUND);
+ AttackStart(SelectTarget(SELECT_TARGET_TOPAGGRO));
+ break;
}
++uiFlightCount;
}
@@ -512,6 +501,11 @@ public:
}
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_felmystAI>(creature);
+ }
};
class npc_felmyst_vapor : public CreatureScript
@@ -531,12 +525,14 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetSpeed(MOVE_RUN, 0.8f);
}
- void Reset() OVERRIDE {}
+
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoZoneInCombat();
//DoCast(me, SPELL_VAPOR_FORCE, true); core bug
}
+
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!me->GetVictim())
@@ -565,12 +561,13 @@ public:
me->SetTarget(me->GetGUID());
me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 0.01f); // core bug
}
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
+
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 2895e85de71..2a2574ea256 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -44,7 +44,7 @@ enum Yells
SAY_GOOD_AGGRO = 0,
SAY_GOOD_NEAR_DEATH = 1,
- SAY_GOOD_NEAR_DEATH2 = 2,
+ SAY_GOOD_NEAR_DEATH2 = 2
};
enum Spells
@@ -76,20 +76,20 @@ enum Spells
enum SWPActions
{
DO_ENRAGE = 1,
- DO_BANISH = 2,
+ DO_BANISH = 2
};
#define GO_FAILED "You are unable to use this currently."
#define EMOTE_UNABLE_TO_FIND "is unable to find Kalecgos"
-#define FLY_X 1679
-#define FLY_Y 900
-#define FLY_Z 82
+#define FLY_X 1679
+#define FLY_Y 900
+#define FLY_Z 82
-#define CENTER_X 1705
-#define CENTER_Y 930
-#define RADIUS 30
+#define CENTER_X 1705
+#define CENTER_Y 930
+#define RADIUS 30
#define DRAGON_REALM_Z 53.079f
#define DEMON_REALM_Z -74.558f
@@ -103,11 +103,6 @@ class boss_kalecgos : public CreatureScript
public:
boss_kalecgos() : CreatureScript("boss_kalecgos") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_kalecgosAI(creature);
- }
-
struct boss_kalecgosAI : public ScriptedAI
{
boss_kalecgosAI(Creature* creature) : ScriptedAI(creature)
@@ -141,13 +136,10 @@ public:
void Reset() OVERRIDE
{
- if (instance)
- {
- SathGUID = instance->GetData64(DATA_SATHROVARR);
- instance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
- }
+ SathGUID = instance->GetData64(DATA_SATHROVARR);
+ instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
- if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
+ if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
Sath->AI()->EnterEvadeMode();
me->setFaction(14);
@@ -158,7 +150,7 @@ public:
me->SetVisible(true);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
}
- me->SetFullHealth();//dunno why it does not resets health at evade..
+ me->SetFullHealth(); //dunno why it does not resets health at evade..
ArcaneBuffetTimer = 8000;
FrostBreathTimer = 15000;
WildMagicTimer = 10000;
@@ -234,6 +226,7 @@ public:
} else ResetTimer -= diff;
return;
}
+
if (!UpdateVictim())
return;
@@ -246,13 +239,13 @@ public:
}
if (HealthBelowPct(10) && !isEnraged)
{
- if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
+ if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
Sath->AI()->DoAction(DO_ENRAGE);
DoAction(DO_ENRAGE);
}
if (!isBanished && HealthBelowPct(1))
{
- if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
+ if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
{
if (Sath->HasAura(SPELL_BANISH))
{
@@ -264,7 +257,7 @@ public:
}
else
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Didn't find Shathrowar. Kalecgos event reseted.");
+ TC_LOG_ERROR("scripts", "Didn't find Shathrowar. Kalecgos event reseted.");
EnterEvadeMode();
return;
}
@@ -317,6 +310,7 @@ public:
SpectralBlastTimer = 1000;
return;
}
+
std::list<Unit*>::const_iterator i = targetList.begin();
advance(i, rand()%targetList.size());
if ((*i))
@@ -331,7 +325,6 @@ public:
}
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
if (bJustReset)//boss is invisible, don't attack
return;
@@ -356,8 +349,7 @@ public:
Talk(SAY_EVIL_AGGRO);
DoZoneInCombat();
- if (instance)
- instance->SetData(DATA_KALECGOS_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_KALECGOS, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
@@ -396,21 +388,21 @@ public:
{
switch (TalkSequence)
{
- case 1:
- me->setFaction(35);
- TalkTimer = 1000;
- break;
- case 2:
- Talk(SAY_GOOD_PLRWIN);
- TalkTimer = 10000;
- break;
- case 3:
- me->SetDisableGravity(true);
- me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
- TalkTimer = 600000;
- break;
- default:
- break;
+ case 1:
+ me->setFaction(35);
+ TalkTimer = 1000;
+ break;
+ case 2:
+ Talk(SAY_GOOD_PLRWIN);
+ TalkTimer = 10000;
+ break;
+ case 3:
+ me->SetDisableGravity(true);
+ me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
+ TalkTimer = 600000;
+ break;
+ default:
+ break;
}
}
@@ -418,23 +410,28 @@ public:
{
switch (TalkSequence)
{
- case 1:
- Talk(SAY_EVIL_ENRAGE);
- TalkTimer = 3000;
- break;
- case 2:
- me->SetDisableGravity(true);
- me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
- TalkTimer = 15000;
- break;
- case 3:
- EnterEvadeMode();
- break;
- default:
- break;
+ case 1:
+ Talk(SAY_EVIL_ENRAGE);
+ TalkTimer = 3000;
+ break;
+ case 2:
+ me->SetDisableGravity(true);
+ me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
+ TalkTimer = 15000;
+ break;
+ case 3:
+ EnterEvadeMode();
+ break;
+ default:
+ break;
}
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_kalecgosAI>(creature);
+ }
};
class boss_kalec : public CreatureScript
@@ -490,6 +487,7 @@ public:
{
if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true);
+
if (!UpdateVictim())
return;
@@ -497,26 +495,26 @@ public:
{
switch (YellSequence)
{
- case 0:
- Talk(SAY_GOOD_AGGRO);
- ++YellSequence;
- break;
- case 1:
- if (HealthBelowPct(50))
- {
- Talk(SAY_GOOD_NEAR_DEATH);
+ case 0:
+ Talk(SAY_GOOD_AGGRO);
++YellSequence;
- }
- break;
- case 2:
- if (HealthBelowPct(10))
- {
- Talk(SAY_GOOD_NEAR_DEATH2);
- ++YellSequence;
- }
- break;
- default:
- break;
+ break;
+ case 1:
+ if (HealthBelowPct(50))
+ {
+ Talk(SAY_GOOD_NEAR_DEATH);
+ ++YellSequence;
+ }
+ break;
+ case 2:
+ if (HealthBelowPct(10))
+ {
+ Talk(SAY_GOOD_NEAR_DEATH2);
+ ++YellSequence;
+ }
+ break;
+ default:
+ break;
}
YellTimer = 5000;
}
@@ -610,11 +608,11 @@ public:
if (instance)
{
KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON);
- instance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
}
if (KalecGUID)
{
- if (Creature* Kalec = Unit::GetCreature(*me, KalecGUID))
+ if (Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID))
Kalec->setDeathState(JUST_DIED);
KalecGUID = 0;
}
@@ -654,7 +652,7 @@ public:
if (target->GetGUID() == KalecGUID)
{
TeleportAllPlayersBack();
- if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
+ if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
{
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = false;
@@ -670,14 +668,14 @@ public:
Talk(SAY_SATH_DEATH);
me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
TeleportAllPlayersBack();
- if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
+ if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
{
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = true;
}
if (instance)
- instance->SetData(DATA_KALECGOS_EVENT, DONE);
+ instance->SetBossState(DATA_KALECGOS, DONE);
}
void TeleportAllPlayersBack()
@@ -716,27 +714,28 @@ public:
{
if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true);
+
if (!UpdateVictim())
return;
if (CheckTimer <= diff)
{
- Creature* Kalec = Unit::GetCreature(*me, KalecGUID);
+ Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID);
if (!Kalec || !Kalec->IsAlive())
{
- if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
+ if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
Kalecgos->AI()->EnterEvadeMode();
return;
}
if (HealthBelowPct(10) && !isEnraged)
{
- if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
+ if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
Kalecgos->AI()->DoAction(DO_ENRAGE);
DoAction(DO_ENRAGE);
}
- Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID);
+ Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID);
if (Kalecgos && !Kalecgos->IsInCombat())
{
me->AI()->EnterEvadeMode();
@@ -778,7 +777,8 @@ public:
if (ShadowBoltTimer <= diff)
{
- if (!(rand()%5))Talk(SAY_SATH_SPELL1);
+ if (!(rand()%5))
+ Talk(SAY_SATH_SPELL1);
DoCast(me, SPELL_SHADOW_BOLT);
ShadowBoltTimer = 7000+(rand()%3000);
} else ShadowBoltTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 855ed46e5cf..b3982200a10 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -60,7 +60,7 @@ enum Yells
SAY_ANVEENA_IMPRISONED = 0,
SAY_ANVEENA_LOST = 1,
SAY_ANVEENA_KALEC = 2,
- SAY_ANVEENA_GOODBYE = 3,
+ SAY_ANVEENA_GOODBYE = 3
};
/*** Spells used during the encounter ***/
@@ -156,7 +156,7 @@ enum Phase
PHASE_NORMAL = 2, // Kil'Jaeden emerges from the sunwell
PHASE_DARKNESS = 3, // At 85%, he gains few abilities; Kalecgos joins the fight
PHASE_ARMAGEDDON = 4, // At 55%, he gains even more abilities
- PHASE_SACRIFICE = 5, // At 25%, Anveena sacrifices herself into the Sunwell; at this point he becomes enraged and has *significally* shorter cooldowns.
+ PHASE_SACRIFICE = 5 // At 25%, Anveena sacrifices herself into the Sunwell; at this point he becomes enraged and has *significally* shorter cooldowns.
};
//Timers
@@ -185,7 +185,7 @@ Position DeceiverLocations[3]=
{
{1682.045f, 631.299f, 5.936f, 0.0f},
{1684.099f, 618.848f, 0.589f, 0.0f},
- {1694.170f, 612.272f, 1.416f, 0.0f},
+ {1694.170f, 612.272f, 1.416f, 0.0f}
};
// Locations, where Shield Orbs will spawn
@@ -225,7 +225,7 @@ static Speech Speeches[]=
{SAY_KJ_PHASE5, DATA_KILJAEDEN, 5500},
// use in End sequence?
- {SAY_KALECGOS_GOODBYE, DATA_KALECGOS_KJ, 12000},
+ {SAY_KALECGOS_GOODBYE, DATA_KALECGOS_KJ, 12000}
};
//AI for Kalecgos
@@ -271,13 +271,13 @@ public:
switch (index)
{
case 0:
- return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1));
+ return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1));
case 1:
- return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2));
+ return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2));
case 2:
- return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3));
+ return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3));
case 3:
- return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4));
+ return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4));
}
return NULL;
@@ -368,11 +368,11 @@ public:
if (go->GetUInt32Value(GAMEOBJECT_FACTION) == 35)
{
InstanceScript* instance = go->GetInstanceScript();
- player->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
+ player->SummonCreature(NPC_POWER_OF_THE_BLUE_DRAGONFLIGHT, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
player->CastSpell(player, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, false);
go->SetUInt32Value(GAMEOBJECT_FACTION, 0);
- if (Creature* pKalec = Unit::GetCreature(*player, instance->GetData64(DATA_KALECGOS_KJ)))
+ if (Creature* pKalec = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_KALECGOS_KJ)))
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->SetRingOfBlueFlames();
go->Refresh();
@@ -425,7 +425,7 @@ public:
phase = PHASE_DECEIVERS;
if (instance)
- if (Creature* pKalecKJ = Unit::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ)))
+ if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ)))
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs();
deceiverDeathCount = 0;
bSummonedDeceivers = false;
@@ -438,15 +438,15 @@ public:
{
switch (summoned->GetEntry())
{
- case CREATURE_HAND_OF_THE_DECEIVER:
+ case NPC_HAND_OF_THE_DECEIVER:
summoned->CastSpell(summoned, SPELL_SHADOW_CHANNELING, false);
break;
- case CREATURE_ANVEENA:
+ case NPC_ANVEENA:
summoned->SetDisableGravity(true);
summoned->CastSpell(summoned, SPELL_ANVEENA_PRISON, true);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
break;
- case CREATURE_KILJAEDEN:
+ case NPC_KILJAEDEN:
summoned->CastSpell(summoned, SPELL_REBIRTH, false);
summoned->AddThreat(me->GetVictim(), 1.0f);
break;
@@ -458,7 +458,7 @@ public:
{
if (uiRandomSayTimer < diff)
{
- if (instance && instance->GetData(DATA_MURU_EVENT) != DONE && instance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED)
+ if (instance && instance->GetBossState(DATA_MURU) != DONE && instance->GetBossState(DATA_KILJAEDEN) == NOT_STARTED)
Talk(SAY_KJ_OFFCOMBAT);
uiRandomSayTimer = 30000;
} else uiRandomSayTimer -= diff;
@@ -466,9 +466,9 @@ public:
if (!bSummonedDeceivers)
{
for (uint8 i = 0; i < 3; ++i)
- me->SummonCreature(CREATURE_HAND_OF_THE_DECEIVER, DeceiverLocations[i], TEMPSUMMON_DEAD_DESPAWN, 0);
+ me->SummonCreature(NPC_HAND_OF_THE_DECEIVER, DeceiverLocations[i], TEMPSUMMON_DEAD_DESPAWN, 0);
- DoSpawnCreature(CREATURE_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
+ DoSpawnCreature(NPC_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
DoCast(me, SPELL_ANVEENA_ENERGY_DRAIN);
bSummonedDeceivers = true;
}
@@ -477,7 +477,7 @@ public:
{
me->RemoveAurasDueToSpell(SPELL_ANVEENA_ENERGY_DRAIN);
phase = PHASE_NORMAL;
- DoSpawnCreature(CREATURE_KILJAEDEN, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
+ DoSpawnCreature(NPC_KILJAEDEN, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
}
}
};
@@ -489,11 +489,6 @@ class boss_kiljaeden : public CreatureScript
public:
boss_kiljaeden() : CreatureScript("boss_kiljaeden") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_kiljaedenAI(creature);
- }
-
struct boss_kiljaedenAI : public ScriptedAI
{
boss_kiljaedenAI(Creature* creature) : ScriptedAI(creature), summons(me)
@@ -559,11 +554,9 @@ public:
OrbActivated = false;
SpeechBegins = true;
- if (instance)
- {
- if (Creature* pKalec = Unit::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
- pKalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
- }
+ if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
+ pKalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
+
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 12);
ChangeTimers(false, 0);
summons.DespawnAll();
@@ -590,7 +583,7 @@ public:
void JustSummoned(Creature* summoned) OVERRIDE
{
- if (summoned->GetEntry() == CREATURE_ARMAGEDDON_TARGET)
+ if (summoned->GetEntry() == NPC_ARMAGEDDON_TARGET)
{
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -607,9 +600,7 @@ public:
{
Talk(SAY_KJ_DEATH);
summons.DespawnAll();
-
- if (instance)
- instance->SetData(DATA_KILJAEDEN_EVENT, DONE);
+ instance->SetBossState(DATA_KILJAEDEN, DONE);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
@@ -624,11 +615,8 @@ public:
summons.DespawnAll();
// Reset the controller
- if (instance)
- {
- if (Creature* pControl = Unit::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
- CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->Reset();
- }
+ if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
+ CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->Reset();
}
void EnterCombat(Unit* /*who*/) OVERRIDE
@@ -657,7 +645,7 @@ public:
{
float x, y, z;
target->GetPosition(x, y, z);
- if (Creature* pSinisterReflection = me->SummonCreature(CREATURE_SINISTER_REFLECTION, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ if (Creature* pSinisterReflection = me->SummonCreature(NPC_SINISTER_REFLECTION, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0))
{
pSinisterReflection->SetDisplayId(target->GetDisplayId());
pSinisterReflection->AI()->AttackStart(target);
@@ -709,15 +697,12 @@ public:
if (Speeches[speechCount].timer < SpeechTimer)
{
SpeechTimer = 0;
- if (instance)
- {
- if (Creature* speechCreature = Unit::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
- speechCreature->AI()->Talk(Speeches[speechCount].textid);
- if (speechCount == 12)
- if (Creature* pAnveena = Unit::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
- pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
- // ChangeTimers(true, 10000); // Kil should do an emote while screaming without attacking for 10 seconds
- }
+ if (Creature* speechCreature = ObjectAccessor::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
+ speechCreature->AI()->Talk(Speeches[speechCount].textid);
+ if (speechCount == 12)
+ if (Creature* pAnveena = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
+ pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
+ // ChangeTimers(true, 10000); // Kil should do an emote while screaming without attacking for 10 seconds
if (speechCount == speechPhaseEnd)
TimerIsDeactivated[TIMER_SPEECH]=true;
speechCount++;
@@ -748,7 +733,7 @@ public:
if (pRandomPlayer)
DoCast(pRandomPlayer, SPELL_LEGION_LIGHTNING, false);
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "try to cast SPELL_LEGION_LIGHTNING on invalid target");
+ TC_LOG_ERROR("scripts", "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;
@@ -769,7 +754,7 @@ public:
float sx, sy;
sx = ShieldOrbLocations[0][0] + std::sin(ShieldOrbLocations[i][0]);
sy = ShieldOrbLocations[0][1] + std::sin(ShieldOrbLocations[i][1]);
- me->SummonCreature(CREATURE_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
+ me->SummonCreature(NPC_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
}
Timer[TIMER_SUMMON_SHILEDORB] = urand(30000, 60000); // 30-60seconds cooldown
Timer[TIMER_SOUL_FLAY] = 2000;
@@ -814,19 +799,18 @@ public:
}
break;
case TIMER_ORBS_EMPOWER: //Phase 3
- if (instance)
- if (Creature* pKalec = Unit::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
+ if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
+ {
+ switch (Phase)
{
- switch (Phase)
- {
case PHASE_SACRIFICE:
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->EmpowerOrb(true);
break;
default:
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->EmpowerOrb(false);
break;
- }
}
+ }
OrbActivated = true;
TimerIsDeactivated[TIMER_ORBS_EMPOWER] = true;
break;
@@ -841,7 +825,7 @@ public:
{
float x, y, z;
target->GetPosition(x, y, z);
- me->SummonCreature(CREATURE_ARMAGEDDON_TARGET, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
+ me->SummonCreature(NPC_ARMAGEDDON_TARGET, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
}
Timer[TIMER_ARMAGEDDON] = 2000; // No, I'm not kidding
break;
@@ -893,6 +877,11 @@ public:
}
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_kiljaedenAI>(creature);
+ }
};
//AI for Hand of the Deceiver
@@ -901,11 +890,6 @@ class npc_hand_of_the_deceiver : public CreatureScript
public:
npc_hand_of_the_deceiver() : CreatureScript("npc_hand_of_the_deceiver") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_hand_of_the_deceiverAI(creature);
- }
-
struct npc_hand_of_the_deceiverAI : public ScriptedAI
{
npc_hand_of_the_deceiverAI(Creature* creature) : ScriptedAI(creature)
@@ -923,8 +907,7 @@ public:
/// @todo Timers!
ShadowBoltVolleyTimer = urand(8000, 14000); // So they don't all cast it in the same moment.
FelfirePortalTimer = 20000;
- if (instance)
- instance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_KILJAEDEN, NOT_STARTED);
}
void JustSummoned(Creature* summoned) OVERRIDE
@@ -935,12 +918,10 @@ public:
void EnterCombat(Unit* who) OVERRIDE
{
- if (instance)
- {
- instance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS);
- if (Creature* pControl = Unit::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
- pControl->AddThreat(who, 1.0f);
- }
+ instance->SetBossState(DATA_KILJAEDEN, IN_PROGRESS);
+ if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
+ pControl->AddThreat(who, 1.0f);
+
me->InterruptNonMeleeSpells(true);
}
@@ -949,7 +930,7 @@ public:
if (!instance)
return;
- if (Creature* pControl = Unit::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
+ if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
++(CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->deceiverDeathCount);
}
@@ -977,7 +958,7 @@ public:
// Felfire Portal - Creatres a portal, that spawns Volatile Felfire Fiends, which do suicide bombing.
if (FelfirePortalTimer <= diff)
{
- if (Creature* pPortal = DoSpawnCreature(CREATURE_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
+ if (Creature* pPortal = DoSpawnCreature(NPC_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
{
ThreatContainer::StorageType const &threatlist = me->getThreatManager().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
@@ -993,6 +974,11 @@ public:
DoMeleeAttackIfReady();
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<npc_hand_of_the_deceiverAI>(creature);
+ }
};
//AI for Felfire Portal
@@ -1034,7 +1020,7 @@ public:
if (uiSpawnFiendTimer <= diff)
{
- if (Creature* pFiend = DoSpawnCreature(CREATURE_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
+ if (Creature* pFiend = DoSpawnCreature(NPC_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
pFiend->AddThreat(SelectTarget(SELECT_TARGET_RANDOM, 0), 100000.0f);
uiSpawnFiendTimer = urand(4000, 8000);
} else uiSpawnFiendTimer -= diff;
@@ -1055,7 +1041,7 @@ public:
struct npc_volatile_felfire_fiendAI : public ScriptedAI
{
- npc_volatile_felfire_fiendAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_volatile_felfire_fiendAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiExplodeTimer;
@@ -1256,7 +1242,7 @@ public:
struct npc_sinster_reflectionAI : public ScriptedAI
{
- npc_sinster_reflectionAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_sinster_reflectionAI(Creature* creature) : ScriptedAI(creature) { }
uint8 victimClass;
uint32 uiTimer[3];
@@ -1406,7 +1392,7 @@ public:
DoMeleeAttackIfReady();
break;
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Sinister-Timer");
+ TC_LOG_DEBUG("scripts", "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 c3d00ddba53..8da162bae14 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -30,55 +30,56 @@ SDComment: all sounds, black hole effect triggers to often (46228)
// Muru & Entropius's spells
enum Spells
{
- SPELL_ENRAGE = 26662,
+ SPELL_ENRAGE = 26662,
// Muru's spells
SPELL_NEGATIVE_ENERGY = 46009, //(this trigger 46008)
- SPELL_DARKNESS = 45999,
- SPELL_OPEN_ALL_PORTALS = 46177,
+ SPELL_DARKNESS = 45999,
+ SPELL_OPEN_ALL_PORTALS = 46177,
SPELL_OPEN_PORTAL = 45977,
- SPELL_OPEN_PORTAL_2 = 45976,
- SPELL_SUMMON_BERSERKER = 46037,
- SPELL_SUMNON_FURY_MAGE = 46038,
- SPELL_SUMMON_VOID_SENTINEL = 45988,
- SPELL_SUMMON_ENTROPIUS = 46217,
+ SPELL_OPEN_PORTAL_2 = 45976,
+ SPELL_SUMMON_BERSERKER = 46037,
+ SPELL_SUMNON_FURY_MAGE = 46038,
+ SPELL_SUMMON_VOID_SENTINEL = 45988,
+ SPELL_SUMMON_ENTROPIUS = 46217,
// Entropius's spells
- SPELL_DARKNESS_E = 46269,
- SPELL_BLACKHOLE = 46282,
- SPELL_NEGATIVE_ENERGY_E = 46284,
+ SPELL_DARKNESS_E = 46269,
+ SPELL_BLACKHOLE = 46282,
+ SPELL_NEGATIVE_ENERGY_E = 46284,
SPELL_ENTROPIUS_SPAWN = 46223,
// Shadowsword Berserker's spells
- SPELL_FLURRY = 46160,
- SPELL_DUAL_WIELD = 29651,
+ SPELL_FLURRY = 46160,
+ SPELL_DUAL_WIELD = 29651,
// Shadowsword Fury Mage's spells
- SPELL_FEL_FIREBALL = 46101,
- SPELL_SPELL_FURY = 46102,
+ SPELL_FEL_FIREBALL = 46101,
+ SPELL_SPELL_FURY = 46102,
// Void Sentinel's spells
- SPELL_SHADOW_PULSE = 46087,
- SPELL_VOID_BLAST = 46161,
+ SPELL_SHADOW_PULSE = 46087,
+ SPELL_VOID_BLAST = 46161,
// Void Spawn's spells
- SPELL_SHADOW_BOLT_VOLLEY = 46082,
+ SPELL_SHADOW_BOLT_VOLLEY = 46082,
//Dark Fiend Spells
- SPELL_DARKFIEND_AOE = 45944,
- SPELL_DARKFIEND_VISUAL = 45936,
- SPELL_DARKFIEND_SKIN = 45934,
+ SPELL_DARKFIEND_AOE = 45944,
+ SPELL_DARKFIEND_VISUAL = 45936,
+ SPELL_DARKFIEND_SKIN = 45934,
//Black Hole Spells
SPELL_BLACKHOLE_SPAWN = 46242,
- SPELL_BLACKHOLE_GROW = 46228
+ SPELL_BLACKHOLE_GROW = 46228
};
-enum BossTimers{
- TIMER_DARKNESS = 0,
- TIMER_HUMANOIDES = 1,
- TIMER_PHASE = 2,
- TIMER_SENTINEL = 3
+enum BossTimers
+{
+ TIMER_DARKNESS = 0,
+ TIMER_HUMANOIDES = 1,
+ TIMER_PHASE = 2,
+ TIMER_SENTINEL = 3
};
float DarkFiends[8][4] =
@@ -88,32 +89,28 @@ float DarkFiends[8][4] =
{1801.98f, 633.62f, 69.74f, 5.71f},
{1830.88f, 629.99f, 69.73f, 3.52f},
{1800.38f, 621.41f, 69.74f, 0.22f},
- {1808.3f, 612.45f, 69.73f, 1.02f},
- {1823.9f, 639.69f, 69.74f, 4.12f},
+ {1808.3f, 612.45f, 69.73f, 1.02f},
+ {1823.9f, 639.69f, 69.74f, 4.12f},
{1811.85f, 640.46f, 69.73f, 4.97f}
};
float Humanoides[6][5] =
{
- {CREATURE_FURY_MAGE, 1780.16f, 666.83f, 71.19f, 5.21f},
- {CREATURE_FURY_MAGE, 1847.93f, 600.30f, 71.30f, 2.57f},
- {CREATURE_BERSERKER, 1779.97f, 660.64f, 71.19f, 5.28f},
- {CREATURE_BERSERKER, 1786.2f, 661.01f, 71.19f, 4.51f},
- {CREATURE_BERSERKER, 1845.17f, 602.63f, 71.28f, 2.43f},
- {CREATURE_BERSERKER, 1842.91f, 599.93f, 71.23f, 2.44f}
+ {NPC_FURY_MAGE, 1780.16f, 666.83f, 71.19f, 5.21f},
+ {NPC_FURY_MAGE, 1847.93f, 600.30f, 71.30f, 2.57f},
+ {NPC_BERSERKER, 1779.97f, 660.64f, 71.19f, 5.28f},
+ {NPC_BERSERKER, 1786.2f, 661.01f, 71.19f, 4.51f},
+ {NPC_BERSERKER, 1845.17f, 602.63f, 71.28f, 2.43f},
+ {NPC_BERSERKER, 1842.91f, 599.93f, 71.23f, 2.44f}
};
uint32 EnrageTimer = 600000;
+
class boss_entropius : public CreatureScript
{
public:
boss_entropius() : CreatureScript("boss_entropius") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_entropiusAI(creature);
- }
-
struct boss_entropiusAI : public ScriptedAI
{
boss_entropiusAI(Creature* creature) : ScriptedAI(creature), Summons(me)
@@ -133,8 +130,7 @@ public:
Summons.DespawnAll();
- if (instance)
- instance->SetData(DATA_MURU_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_MURU, NOT_STARTED);
}
void EnterCombat(Unit* /*who*/) OVERRIDE
@@ -142,22 +138,21 @@ public:
DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true);
DoCast(me, SPELL_ENTROPIUS_SPAWN, false);
- if (instance)
- instance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_MURU, IN_PROGRESS);
}
void JustSummoned(Creature* summoned) OVERRIDE
{
switch (summoned->GetEntry())
{
- case CREATURE_DARK_FIENDS:
+ case NPC_DARK_FIENDS:
summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false);
break;
- case CREATURE_DARKNESS:
+ case NPC_DARKNESS:
summoned->AddUnitState(UNIT_STATE_STUNNED);
float x, y, z, o;
summoned->GetHomePosition(x, y, z, o);
- me->SummonCreature(CREATURE_DARK_FIENDS, x, y, z, o, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ me->SummonCreature(NPC_DARK_FIENDS, x, y, z, o, TEMPSUMMON_CORPSE_DESPAWN, 0);
break;
}
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
@@ -167,9 +162,7 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
Summons.DespawnAll();
-
- if (instance)
- instance->SetData(DATA_MURU_EVENT, DONE);
+ instance->SetBossState(DATA_MURU, DONE);
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -201,6 +194,11 @@ public:
DoMeleeAttackIfReady();
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_entropiusAI>(creature);
+ }
};
class boss_muru : public CreatureScript
@@ -208,11 +206,6 @@ class boss_muru : public CreatureScript
public:
boss_muru() : CreatureScript("boss_muru") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_muruAI(creature);
- }
-
struct boss_muruAI : public ScriptedAI
{
boss_muruAI(Creature* creature) : ScriptedAI(creature), Summons(creature)
@@ -244,17 +237,13 @@ public:
me->SetVisible(true);
Summons.DespawnAll();
-
- if (instance)
- instance->SetData(DATA_MURU_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_MURU, NOT_STARTED);
}
void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoCastAOE(SPELL_NEGATIVE_ENERGY, false);
-
- if (instance)
- instance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_MURU, IN_PROGRESS);
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
@@ -275,10 +264,10 @@ public:
{
switch (summoned->GetEntry())
{
- case BOSS_ENTROPIUS:
+ case NPC_ENTROPIUS:
me->SetVisible(false);
break;
- case CREATURE_DARK_FIENDS:
+ case NPC_DARK_FIENDS:
summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false);
break;
}
@@ -295,9 +284,7 @@ public:
{
if (Timer[TIMER_PHASE] <= diff)
{
- if (!instance)
- return;
- switch (instance->GetData(DATA_MURU_EVENT))
+ switch (instance->GetBossState(DATA_MURU))
{
case NOT_STARTED:
Reset();
@@ -306,6 +293,8 @@ public:
Phase = 4;
me->DisappearAndDie();
break;
+ default:
+ break;
}
Timer[TIMER_PHASE] = 3000;
} else Timer[TIMER_PHASE] -= diff;
@@ -334,7 +323,7 @@ public:
{
DarkFiend = false;
for (uint8 j = 0; j < 8; ++j)
- me->SummonCreature(CREATURE_DARK_FIENDS, DarkFiends[j][0], DarkFiends[j][1], DarkFiends[j][2], DarkFiends[j][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
+ me->SummonCreature(NPC_DARK_FIENDS, DarkFiends[j][0], DarkFiends[j][1], DarkFiends[j][2], DarkFiends[j][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
Timer[TIMER_DARKNESS] = 42000;
}
break;
@@ -358,14 +347,21 @@ public:
}
}
- //Timer
+ // Timer
for (uint8 i = 0; i < 4; ++i)
{
- if (i != TIMER_PHASE)Timer[i] -= diff;
- else if (Phase == 2) Timer[i] -= diff;
+ if (i != TIMER_PHASE)
+ Timer[i] -= diff;
+ else if (Phase == 2)
+ Timer[i] -= diff;
}
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetSunwellPlateauAI<boss_muruAI>(creature);
+ }
};
class npc_muru_portal : public CreatureScript
@@ -438,7 +434,7 @@ public:
{
if (!SummonSentinel)
{
- if (InAction && instance && instance->GetData(DATA_MURU_EVENT) == NOT_STARTED)
+ if (InAction && instance && instance->GetBossState(DATA_MURU) == NOT_STARTED)
Reset();
return;
}
@@ -464,7 +460,7 @@ public:
struct npc_dark_fiendAI : public ScriptedAI
{
- npc_dark_fiendAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_dark_fiendAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WaitTimer;
bool InAction;
@@ -525,7 +521,7 @@ public:
struct npc_void_sentinelAI : public ScriptedAI
{
- npc_void_sentinelAI(Creature* creature) : ScriptedAI(creature){}
+ npc_void_sentinelAI(Creature* creature) : ScriptedAI(creature) { }
uint32 PulseTimer;
uint32 VoidBlastTimer;
@@ -543,7 +539,7 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
for (uint8 i = 0; i < 8; ++i)
- me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
+ me->SummonCreature(NPC_VOID_SPAWN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
}
void UpdateAI(uint32 diff) OVERRIDE
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
index f1febf07bb7..4bc42921402 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -16,19 +15,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Instance_Sunwell_Plateau
-SD%Complete: 25
-SDComment: VERIFY SCRIPT
-SDCategory: Sunwell_Plateau
-EndScriptData */
-
#include "ScriptMgr.h"
#include "InstanceScript.h"
-#include "sunwell_plateau.h"
#include "Player.h"
-
-#define MAX_ENCOUNTER 6
+#include "sunwell_plateau.h"
/* Sunwell Plateau:
0 - Kalecgos and Sathrovarr
@@ -39,268 +29,256 @@ EndScriptData */
5 - Kil'Jaeden
*/
-class instance_sunwell_plateau : public InstanceMapScript
+DoorData const doorData[] =
{
-public:
- instance_sunwell_plateau() : InstanceMapScript("instance_sunwell_plateau", 580) { }
-
- InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
- {
- return new instance_sunwell_plateau_InstanceMapScript(map);
- }
-
- struct instance_sunwell_plateau_InstanceMapScript : public InstanceScript
- {
- instance_sunwell_plateau_InstanceMapScript(Map* map) : InstanceScript(map) {}
-
- uint32 m_auiEncounter[MAX_ENCOUNTER];
-
- /** Creatures **/
- uint64 Kalecgos_Dragon;
- uint64 Kalecgos_Human;
- uint64 Sathrovarr;
- uint64 Brutallus;
- uint64 Madrigosa;
- uint64 Felmyst;
- uint64 Alythess;
- uint64 Sacrolash;
- uint64 Muru;
- uint64 KilJaeden;
- uint64 KilJaedenController;
- uint64 Anveena;
- uint64 KalecgosKJ;
- uint32 SpectralPlayers;
-
- /** GameObjects **/
- uint64 ForceField; // Kalecgos Encounter
- uint64 KalecgosWall[2];
- uint64 FireBarrier; // Felmysts Encounter
- uint64 MurusGate[2]; // Murus Encounter
+ { GO_FIRE_BARRIER, DATA_FELMYST, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
+ { GO_MURUS_GATE_1, DATA_MURU, DOOR_TYPE_ROOM, BOUNDARY_NONE },
+ { GO_MURUS_GATE_2, DATA_MURU, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
+ { GO_BOSS_COLLISION_1, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
+ { GO_BOSS_COLLISION_2, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
+ { GO_FORCE_FIELD, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
+ { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
+};
- /*** Misc ***/
- uint32 SpectralRealmTimer;
- std::vector<uint64> SpectralRealmList;
+class instance_sunwell_plateau : public InstanceMapScript
+{
+ public:
+ instance_sunwell_plateau() : InstanceMapScript(SunwellPlateauScriptName, 580) { }
- void Initialize() OVERRIDE
+ struct instance_sunwell_plateau_InstanceMapScript : public InstanceScript
{
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
-
- /*** Creatures ***/
- Kalecgos_Dragon = 0;
- Kalecgos_Human = 0;
- Sathrovarr = 0;
- Brutallus = 0;
- Madrigosa = 0;
- Felmyst = 0;
- Alythess = 0;
- Sacrolash = 0;
- Muru = 0;
- KilJaeden = 0;
- KilJaedenController = 0;
- Anveena = 0;
- KalecgosKJ = 0;
- SpectralPlayers = 0;
+ instance_sunwell_plateau_InstanceMapScript(Map* map) : InstanceScript(map)
+ {
+ SetBossNumber(EncounterCount);
+ LoadDoorData(doorData);
- /*** GameObjects ***/
- ForceField = 0;
- FireBarrier = 0;
- MurusGate[0] = 0;
- MurusGate[1] = 0;
- KalecgosWall[0] = 0;
- KalecgosWall[1] = 0;
+ KalecgosDragonGUID = 0;
+ KalecgosHumanGUID = 0;
+ SathrovarrGUID = 0;
+ BrutallusGUID = 0;
+ MadrigosaGUID = 0;
+ FelmystGUID = 0;
+ AlythessGUID = 0;
+ SacrolashGUID = 0;
+ MuruGUID = 0;
+ KilJaedenGUID = 0;
+ KilJaedenControllerGUID = 0;
+ AnveenaGUID = 0;
+ KalecgosKjGUID = 0;
+ SpectralPlayers = 0;
- /*** Misc ***/
- SpectralRealmTimer = 5000;
- }
+ SpectralRealmTimer = 5000;
+ }
- bool IsEncounterInProgress() const OVERRIDE
- {
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS)
- return true;
+ Player const* GetPlayerInMap() const
+ {
+ Map::PlayerList const& players = instance->GetPlayers();
- return false;
- }
+ if (!players.isEmpty())
+ {
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ {
+ Player* player = itr->GetSource();
+ if (player && !player->HasAura(45839, 0))
+ return player;
+ }
+ }
+ else
+ TC_LOG_DEBUG("scripts", "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
- Player const* GetPlayerInMap() const
- {
- Map::PlayerList const& players = instance->GetPlayers();
+ return NULL;
+ }
- if (!players.isEmpty())
+ void OnCreatureCreate(Creature* creature) OVERRIDE
{
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ switch (creature->GetEntry())
{
- Player* player = itr->GetSource();
- if (player && !player->HasAura(45839, 0))
- return player;
+ case NPC_KALECGOS:
+ KalecgosDragonGUID = creature->GetGUID();
+ break;
+ case NPC_KALEC:
+ KalecgosHumanGUID = creature->GetGUID();
+ break;
+ case NPC_SATHROVARR:
+ SathrovarrGUID = creature->GetGUID();
+ break;
+ case NPC_BRUTALLUS:
+ BrutallusGUID = creature->GetGUID();
+ break;
+ case NPC_MADRIGOSA:
+ MadrigosaGUID = creature->GetGUID();
+ break;
+ case NPC_FELMYST:
+ FelmystGUID = creature->GetGUID();
+ break;
+ case NPC_GRAND_WARLOCK_ALYTHESS:
+ AlythessGUID = creature->GetGUID();
+ break;
+ case NPC_LADY_SACROLASH:
+ SacrolashGUID = creature->GetGUID();
+ break;
+ case NPC_MURU:
+ MuruGUID = creature->GetGUID();
+ break;
+ case NPC_KILJAEDEN:
+ KilJaedenGUID = creature->GetGUID();
+ break;
+ case NPC_KILJAEDEN_CONTROLLER:
+ KilJaedenControllerGUID = creature->GetGUID();
+ break;
+ case NPC_ANVEENA:
+ AnveenaGUID = creature->GetGUID();
+ break;
+ case NPC_KALECGOS_KJ:
+ KalecgosKjGUID = creature->GetGUID();
+ break;
+ default:
+ break;
}
}
- else
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
-
- return NULL;
- }
- void OnCreatureCreate(Creature* creature) OVERRIDE
- {
- switch (creature->GetEntry())
+ void OnGameObjectCreate(GameObject* go) OVERRIDE
{
- case 24850: Kalecgos_Dragon = creature->GetGUID(); break;
- case 24891: Kalecgos_Human = creature->GetGUID(); break;
- case 24892: Sathrovarr = creature->GetGUID(); break;
- case 24882: Brutallus = creature->GetGUID(); break;
- case 24895: Madrigosa = creature->GetGUID(); break;
- case 25038: Felmyst = creature->GetGUID(); break;
- case 25166: Alythess = creature->GetGUID(); break;
- case 25165: Sacrolash = creature->GetGUID(); break;
- case 25741: Muru = creature->GetGUID(); break;
- case 25315: KilJaeden = creature->GetGUID(); break;
- case 25608: KilJaedenController = creature->GetGUID(); break;
- case 26046: Anveena = creature->GetGUID(); break;
- case 25319: KalecgosKJ = creature->GetGUID(); break;
+ switch (go->GetEntry())
+ {
+ case GO_FORCE_FIELD:
+ case GO_BOSS_COLLISION_1:
+ case GO_BOSS_COLLISION_2:
+ case GO_FIRE_BARRIER:
+ case GO_MURUS_GATE_1:
+ case GO_MURUS_GATE_2:
+ AddDoor(go, true);
+ break;
+ default:
+ break;
+ }
}
- }
- void OnGameObjectCreate(GameObject* go) OVERRIDE
- {
- switch (go->GetEntry())
+ void OnGameObjectRemove(GameObject* go) OVERRIDE
{
- case 188421: ForceField = go->GetGUID(); break;
- case 188523: KalecgosWall[0] = go->GetGUID(); break;
- case 188524: KalecgosWall[0] = go->GetGUID(); break;
- case 188075:
- if (m_auiEncounter[2] == DONE)
- HandleGameObject(0, true, go);
- FireBarrier = go->GetGUID();
- break;
- case 187990: MurusGate[0] = go->GetGUID(); break;
- case 188118:
- if (m_auiEncounter[4] == DONE)
- HandleGameObject(0, true, go);
- MurusGate[1]= go->GetGUID();
- break;
+ switch (go->GetEntry())
+ {
+ case GO_FIRE_BARRIER:
+ case GO_MURUS_GATE_1:
+ case GO_MURUS_GATE_2:
+ case GO_BOSS_COLLISION_1:
+ case GO_BOSS_COLLISION_2:
+ case GO_FORCE_FIELD:
+ AddDoor(go, false);
+ break;
+ default:
+ break;
+ }
}
- }
- uint32 GetData(uint32 id) const OVERRIDE
- {
- switch (id)
+ uint64 GetData64(uint32 id) const OVERRIDE
{
- case DATA_KALECGOS_EVENT: return m_auiEncounter[0];
- case DATA_BRUTALLUS_EVENT: return m_auiEncounter[1];
- case DATA_FELMYST_EVENT: return m_auiEncounter[2];
- case DATA_EREDAR_TWINS_EVENT: return m_auiEncounter[3];
- case DATA_MURU_EVENT: return m_auiEncounter[4];
- case DATA_KILJAEDEN_EVENT: return m_auiEncounter[5];
+ switch (id)
+ {
+ case DATA_KALECGOS_DRAGON:
+ return KalecgosDragonGUID;
+ case DATA_KALECGOS_HUMAN:
+ return KalecgosHumanGUID;
+ case DATA_SATHROVARR:
+ return SathrovarrGUID;
+ case DATA_BRUTALLUS:
+ return BrutallusGUID;
+ case DATA_MADRIGOSA:
+ return MadrigosaGUID;
+ case DATA_FELMYST:
+ return FelmystGUID;
+ case DATA_ALYTHESS:
+ return AlythessGUID;
+ case DATA_SACROLASH:
+ return SacrolashGUID;
+ case DATA_MURU:
+ return MuruGUID;
+ case DATA_KILJAEDEN:
+ return KilJaedenGUID;
+ case DATA_KILJAEDEN_CONTROLLER:
+ return KilJaedenControllerGUID;
+ case DATA_ANVEENA:
+ return AnveenaGUID;
+ case DATA_KALECGOS_KJ:
+ return KalecgosKjGUID;
+ case DATA_PLAYER_GUID:
+ {
+ Player const* target = GetPlayerInMap();
+ return target ? target->GetGUID() : 0;
+ }
+ default:
+ break;
+ }
+ return 0;
}
- return 0;
- }
- uint64 GetData64(uint32 id) const OVERRIDE
- {
- switch (id)
+ std::string GetSaveData() OVERRIDE
{
- case DATA_KALECGOS_DRAGON: return Kalecgos_Dragon;
- case DATA_KALECGOS_HUMAN: return Kalecgos_Human;
- case DATA_SATHROVARR: return Sathrovarr;
- case DATA_GO_FORCEFIELD: return ForceField;
- case DATA_BRUTALLUS: return Brutallus;
- case DATA_MADRIGOSA: return Madrigosa;
- case DATA_FELMYST: return Felmyst;
- case DATA_ALYTHESS: return Alythess;
- case DATA_SACROLASH: return Sacrolash;
- case DATA_MURU: return Muru;
- case DATA_KILJAEDEN: return KilJaeden;
- case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController;
- case DATA_ANVEENA: return Anveena;
- case DATA_KALECGOS_KJ: return KalecgosKJ;
- case DATA_PLAYER_GUID:
- Player const* target = GetPlayerInMap();
- return target ? target->GetGUID() : 0;
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "S P " << GetBossSaveData();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
}
- return 0;
- }
- void SetData(uint32 id, uint32 data) OVERRIDE
- {
- switch (id)
+ void Load(char const* str) OVERRIDE
{
- case DATA_KALECGOS_EVENT:
- {
- if (data == NOT_STARTED || data == DONE)
- {
- HandleGameObject(ForceField, true);
- HandleGameObject(KalecgosWall[0], true);
- HandleGameObject(KalecgosWall[1], true);
- }
- else if (data == IN_PROGRESS)
- {
- HandleGameObject(ForceField, false);
- HandleGameObject(KalecgosWall[0], false);
- HandleGameObject(KalecgosWall[1], false);
- }
- m_auiEncounter[0] = data;
- }
- break;
- case DATA_BRUTALLUS_EVENT: m_auiEncounter[1] = data; break;
- case DATA_FELMYST_EVENT:
- if (data == DONE)
- HandleGameObject(FireBarrier, true);
- m_auiEncounter[2] = data; break;
- case DATA_EREDAR_TWINS_EVENT: m_auiEncounter[3] = data; break;
- case DATA_MURU_EVENT:
- switch (data)
+ if (!str)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
+
+ OUT_LOAD_INST_DATA(str);
+
+ char dataHead1, dataHead2;
+
+ std::istringstream loadStream(str);
+ loadStream >> dataHead1 >> dataHead2;
+
+ if (dataHead1 == 'S' && dataHead2 == 'P')
+ {
+ for (uint32 i = 0; i < EncounterCount; ++i)
{
- case DONE:
- HandleGameObject(MurusGate[0], true);
- HandleGameObject(MurusGate[1], true);
- break;
- case IN_PROGRESS:
- HandleGameObject(MurusGate[0], false);
- HandleGameObject(MurusGate[1], false);
- break;
- case NOT_STARTED:
- HandleGameObject(MurusGate[0], true);
- HandleGameObject(MurusGate[1], false);
- break;
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
}
- m_auiEncounter[4] = data; break;
- case DATA_KILJAEDEN_EVENT: m_auiEncounter[5] = data; break;
- }
+ }
+ else
+ OUT_LOAD_INST_DATA_FAIL;
- if (data == DONE)
- SaveToDB();
- }
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
- std::string GetSaveData() OVERRIDE
- {
- OUT_SAVE_INST_DATA;
- std::ostringstream stream;
- stream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' << m_auiEncounter[3] << ' '
- << m_auiEncounter[4] << ' ' << m_auiEncounter[5];
+ protected:
+ uint64 KalecgosDragonGUID;
+ uint64 KalecgosHumanGUID;
+ uint64 SathrovarrGUID;
+ uint64 BrutallusGUID;
+ uint64 MadrigosaGUID;
+ uint64 FelmystGUID;
+ uint64 AlythessGUID;
+ uint64 SacrolashGUID;
+ uint64 MuruGUID;
+ uint64 KilJaedenGUID;
+ uint64 KilJaedenControllerGUID;
+ uint64 AnveenaGUID;
+ uint64 KalecgosKjGUID;
+ uint32 SpectralPlayers;
- OUT_SAVE_INST_DATA_COMPLETE;
- return stream.str();
- }
+ uint32 SpectralRealmTimer;
+ std::vector<uint64> SpectralRealmList;
+ };
- void Load(char const* in) OVERRIDE
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
- if (!in)
- {
- OUT_LOAD_INST_DATA_FAIL;
- return;
- }
-
- OUT_LOAD_INST_DATA(in);
- std::istringstream stream(in);
- stream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
- >> m_auiEncounter[4] >> m_auiEncounter[5];
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
- m_auiEncounter[i] = NOT_STARTED;
- OUT_LOAD_INST_DATA_COMPLETE;
+ return new instance_sunwell_plateau_InstanceMapScript(map);
}
- };
};
void AddSC_instance_sunwell_plateau()
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp
index 2db77197eb0..4b190f04a70 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp
@@ -62,6 +62,4 @@ enum LiadrinnSpeeches
#define CS_GOSSIP3 "Why did they stop?"
#define CS_GOSSIP4 "Your insight is appreciated."
-void AddSC_sunwell_plateau()
-{
-}
+void AddSC_sunwell_plateau() { }
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
index 343720dbdb1..d2025a7b2b9 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -16,94 +15,105 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef DEF_SUNWELLPLATEAU_H
-#define DEF_SUNWELLPLATEAU_H
+#ifndef SUNWELL_PLATEAU_H
+#define SUNWELL_PLATEAU_H
-/*** Encounters ***/
-enum Data
-{
- DATA_KALECGOS_EVENT,
- DATA_BRUTALLUS_EVENT,
- DATA_FELMYST_EVENT,
- DATA_EREDAR_TWINS_EVENT,
- DATA_MURU_EVENT,
- DATA_KILJAEDEN_EVENT,
-};
+#define SunwellPlateauScriptName "instance_sunwell_plateau"
+
+uint32 const EncounterCount = 6;
-enum Data64
+enum DataTypes
{
- /*** Creatures ***/
+ // Encounter States/Boss GUIDs
+ DATA_KALECGOS = 0,
+ DATA_BRUTALLUS = 1,
+ DATA_FELMYST = 2,
+ DATA_EREDAR_TWINS = 3,
+ DATA_MURU = 4,
+ DATA_KILJAEDEN = 5,
+
DATA_KALECGOS_DRAGON,
DATA_KALECGOS_HUMAN,
DATA_SATHROVARR,
- DATA_BRUTALLUS,
DATA_MADRIGOSA,
- DATA_FELMYST,
DATA_ALYTHESS,
DATA_SACROLASH,
- DATA_MURU,
- DATA_KILJAEDEN,
DATA_KILJAEDEN_CONTROLLER,
DATA_ANVEENA,
DATA_KALECGOS_KJ,
- /*** GameObjects ***/
- DATA_GO_FORCEFIELD,
+ // GameObject GUIDs
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1,
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2,
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3,
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4,
- /*** Misc ***/
- DATA_PLAYER_GUID,
+ // Misc
+ DATA_PLAYER_GUID
};
-enum Creatures
+enum CreatureIds
{
- BOSS_MURU = 25741,
- BOSS_ENTROPIUS = 25840,
- NPC_KALECGOS = 24850,
- NPC_KALEC = 24891,
- NPC_SATHROVARR = 24892,
+ NPC_MURU = 25741,
+ NPC_ENTROPIUS = 25840,
+ NPC_KALECGOS = 24850,
+ NPC_KALEC = 24891,
+ NPC_SATHROVARR = 24892,
+ NPC_BRUTALLUS = 24882,
+ NPC_MADRIGOSA = 24895,
+ NPC_FELMYST = 25038,
- NPC_DEAD = 25268,
- NPC_FLIGHT_LEFT = 25357,
- NPC_FLIGHT_RIGHT = 25358,
- NPC_DEATH_CLOUD = 25703,
- NPC_VAPOR = 25265,
- NPC_VAPOR_TRAIL = 25267,
+ NPC_DEAD = 25268,
+ NPC_FLIGHT_LEFT = 25357,
+ NPC_FLIGHT_RIGHT = 25358,
+ NPC_DEATH_CLOUD = 25703,
+ NPC_VAPOR = 25265,
+ NPC_VAPOR_TRAIL = 25267,
- NPC_GRAND_WARLOCK_ALYTHESS = 25166,
- NPC_SHADOW_IMAGE = 25214,
- NPC_LADY_SACROLASH = 25165,
+ NPC_GRAND_WARLOCK_ALYTHESS = 25166,
+ NPC_SHADOW_IMAGE = 25214,
+ NPC_LADY_SACROLASH = 25165,
- CREATURE_ANVEENA = 26046, // Embodiment of the Sunwell
- CREATURE_KALECGOS = 25319, // Helps the raid throughout the fight
- CREATURE_PROPHET = 26246, // Outro
- CREATURE_KILJAEDEN = 25315, // Give it to 'em KJ!
- CREATURE_HAND_OF_THE_DECEIVER = 25588, // Adds found before KJ emerges
- CREATURE_FELFIRE_PORTAL = 25603, // Portal spawned be Hand of the Deceivers
- CREATURE_VOLATILE_FELFIRE_FIEND = 25598, // Fiends spawned by the above portal
- CREATURE_ARMAGEDDON_TARGET = 25735, // This mob casts meteor on itself.. I think
- CREATURE_SHIELD_ORB = 25502, // Shield orbs circle the room raining shadow bolts on raid
- CREATURE_THE_CORE_OF_ENTROPIUS = 26262, // Used in the ending cinematic?
- CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT = 25653, // NPC that players possess when using the Orb of the Blue Dragonflight
- CREATURE_SPIKE_TARGET1 = 30598, // Should summon these under Shadow Spike Channel on targets place
- CREATURE_SPIKE_TARGET2 = 30614,
- CREATURE_SINISTER_REFLECTION = 25708, // Sinister Relection spawnd on Phase swichtes
+ NPC_ANVEENA = 26046, // Embodiment of the Sunwell
+ NPC_KALECGOS_KJ = 25319, // Helps the raid throughout the fight
+ NPC_PROPHET = 26246, // Outro
+ NPC_KILJAEDEN = 25315, // Give it to 'em KJ!
+ NPC_KILJAEDEN_CONTROLLER = 25608,
+ NPC_HAND_OF_THE_DECEIVER = 25588, // Adds found before KJ emerges
+ NPC_FELFIRE_PORTAL = 25603, // Portal spawned be Hand of the Deceivers
+ NPC_VOLATILE_FELFIRE_FIEND = 25598, // Fiends spawned by the above portal
+ NPC_ARMAGEDDON_TARGET = 25735, // This mob casts meteor on itself.. I think
+ NPC_SHIELD_ORB = 25502, // Shield orbs circle the room raining shadow bolts on raid
+ NPC_THE_CORE_OF_ENTROPIUS = 26262, // Used in the ending cinematic?
+ NPC_POWER_OF_THE_BLUE_DRAGONFLIGHT = 25653, // NPC that players possess when using the Orb of the Blue Dragonflight
+ NPC_SPIKE_TARGET1 = 30598, // Should summon these under Shadow Spike Channel on targets place
+ NPC_SPIKE_TARGET2 = 30614,
+ NPC_SINISTER_REFLECTION = 25708, // Sinister Relection spawnd on Phase swichtes
- CREATURE_DARKNESS = 25879,
- CREATURE_DARK_FIENDS = 25744,
- CREATURE_BERSERKER = 25798,
- CREATURE_FURY_MAGE = 25799,
- CREATURE_VOID_SENTINEL = 25772,
- CREATURE_VOID_SPAWN = 25824,
- CREATURE_BLACK_HOLE = 25855,
+ NPC_DARKNESS = 25879,
+ NPC_DARK_FIENDS = 25744,
+ NPC_BERSERKER = 25798,
+ NPC_FURY_MAGE = 25799,
+ NPC_VOID_SENTINEL = 25772,
+ NPC_VOID_SPAWN = 25824,
+ NPC_BLACK_HOLE = 25855
};
-enum GameObjects
+enum GameObjectIds
{
- GAMEOBJECT_ORB_OF_THE_BLUE_DRAGONFLIGHT = 188415,
+ GO_ORB_OF_THE_BLUE_DRAGONFLIGHT = 188415,
+ GO_FORCE_FIELD = 188421,
+ GO_BOSS_COLLISION_1 = 188523,
+ GO_BOSS_COLLISION_2 = 188524,
+ GO_FIRE_BARRIER = 188075,
+ GO_MURUS_GATE_1 = 187990,
+ GO_MURUS_GATE_2 = 188118
};
-#endif
+template<class AI>
+AI* GetSunwellPlateauAI(Creature* creature)
+{
+ return GetInstanceAI<AI>(creature, SunwellPlateauScriptName);
+}
+
+#endif // SUNWELL_PLATEAU_H
diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp
index 9550ac13208..50d4f0d1578 100644
--- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp
+++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp
@@ -37,7 +37,7 @@ public:
struct instance_the_stockade_InstanceMapScript : public InstanceScript
{
- instance_the_stockade_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_the_stockade_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
index 1a41becfad5..830942ae2c3 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
@@ -45,7 +45,7 @@ class boss_ironaya : public CreatureScript
struct boss_ironayaAI : public ScriptedAI
{
- boss_ironayaAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_ironayaAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiArcingTimer;
bool bHasCastedWstomp;
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
index 7d17a339d5f..f221355b1c8 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
@@ -41,11 +41,11 @@ enum Events
class instance_uldaman : public InstanceMapScript
{
public:
- instance_uldaman() : InstanceMapScript("instance_uldaman", 70) {}
+ instance_uldaman() : InstanceMapScript("instance_uldaman", 70) { }
struct instance_uldaman_InstanceMapScript : public InstanceScript
{
- instance_uldaman_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_uldaman_InstanceMapScript(Map* map) : InstanceScript(map) { }
void Initialize() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
index 4dcb6af2392..1dfb48f746f 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
@@ -54,7 +54,7 @@ class npc_jadespine_basilisk : public CreatureScript
struct npc_jadespine_basiliskAI : public ScriptedAI
{
- npc_jadespine_basiliskAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_jadespine_basiliskAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiCslumberTimer;
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index 380293d743c..526daaffee1 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -261,11 +261,14 @@ class boss_akilzon : public CreatureScript
DoCast(target, SPELL_ELECTRICAL_STORM, false); // storm cyclon + visual
float x, y, z;
target->GetPosition(x, y, z);
+ /// @todo: fix it in correct way, that causes player to can fly until logout
+ /*
if (target)
{
target->SetDisableGravity(true);
target->MonsterMoveWithSpeed(x, y, me->GetPositionZ()+15, 0);
}
+ */
Unit* Cloud = me->SummonTrigger(x, y, me->GetPositionZ()+16, 0, 15000);
if (Cloud)
@@ -389,7 +392,7 @@ class npc_akilzon_eagle : public CreatureScript
DoZoneInCombat();
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void MovementInform(uint32, uint32) OVERRIDE
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
index 8bfe45a7f17..a174b4833b4 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
@@ -359,7 +359,7 @@ class npc_halazzi_lynx : public CreatureScript
struct npc_halazzi_lynxAI : public ScriptedAI
{
- npc_halazzi_lynxAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_halazzi_lynxAI(Creature* creature) : ScriptedAI(creature) { }
uint32 FrenzyTimer;
uint32 shredder_timer;
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index 8a13e072be8..c2975bdf9da 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -222,7 +222,7 @@ struct boss_hexlord_addAI : public ScriptedAI
instance = creature->GetInstanceScript();
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
@@ -526,7 +526,7 @@ class boss_thurg : public CreatureScript
struct boss_thurgAI : public boss_hexlord_addAI
{
- boss_thurgAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_thurgAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 bloodlust_timer;
uint32 cleave_timer;
@@ -583,7 +583,7 @@ class boss_alyson_antille : public CreatureScript
struct boss_alyson_antilleAI : public boss_hexlord_addAI
{
//Holy Priest
- boss_alyson_antilleAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_alyson_antilleAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 flashheal_timer;
uint32 dispelmagic_timer;
@@ -670,7 +670,7 @@ class boss_alyson_antille : public CreatureScript
struct boss_gazakrothAI : public boss_hexlord_addAI
{
- boss_gazakrothAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_gazakrothAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 firebolt_timer;
@@ -721,7 +721,7 @@ class boss_lord_raadan : public CreatureScript
struct boss_lord_raadanAI : public boss_hexlord_addAI
{
- boss_lord_raadanAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_lord_raadanAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 flamebreath_timer;
uint32 thunderclap_timer;
@@ -772,7 +772,7 @@ class boss_darkheart : public CreatureScript
struct boss_darkheartAI : public boss_hexlord_addAI
{
- boss_darkheartAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_darkheartAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 psychicwail_timer;
@@ -814,7 +814,7 @@ class boss_slither : public CreatureScript
struct boss_slitherAI : public boss_hexlord_addAI
{
- boss_slitherAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_slitherAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 venomspit_timer;
@@ -872,7 +872,7 @@ class boss_fenstalker : public CreatureScript
struct boss_fenstalkerAI : public boss_hexlord_addAI
{
- boss_fenstalkerAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_fenstalkerAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 volatileinf_timer;
@@ -915,7 +915,7 @@ class boss_koragg : public CreatureScript
struct boss_koraggAI : public boss_hexlord_addAI
{
- boss_koraggAI(Creature* creature) : boss_hexlord_addAI(creature) {}
+ boss_koraggAI(Creature* creature) : boss_hexlord_addAI(creature) { }
uint32 coldstare_timer;
uint32 mightyblow_timer;
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
index 329034a7682..e429f27aa48 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
@@ -252,7 +252,7 @@ class boss_janalai : public CreatureScript
cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
}
- //TC_LOG_ERROR(LOG_FILTER_TSCR, "Eggs %d at middle", templist.size());
+ //TC_LOG_ERROR("scripts", "Eggs %d at middle", templist.size());
if (templist.empty())
return false;
@@ -457,9 +457,9 @@ class npc_janalai_firebomb : public CreatureScript
struct npc_janalai_firebombAI : public ScriptedAI
{
- npc_janalai_firebombAI(Creature* creature) : ScriptedAI(creature){}
+ npc_janalai_firebombAI(Creature* creature) : ScriptedAI(creature){ }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
@@ -467,14 +467,14 @@ class npc_janalai_firebomb : public CreatureScript
DoCast(me, SPELL_FIRE_BOMB_DUMMY, true);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
@@ -539,7 +539,7 @@ class npc_janalai_hatcher : public CreatureScript
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
}
- //TC_LOG_ERROR(LOG_FILTER_TSCR, "Eggs %d at %d", templist.size(), side);
+ //TC_LOG_ERROR("scripts", "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)
@@ -551,9 +551,9 @@ class npc_janalai_hatcher : public CreatureScript
return num == 0; // if num == 0, no more templist
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void MovementInform(uint32, uint32) OVERRIDE
{
@@ -678,7 +678,7 @@ class npc_janalai_hatchling : public CreatureScript
class npc_janalai_egg : public CreatureScript
{
public:
- npc_janalai_egg(): CreatureScript("npc_janalai_egg") {}
+ npc_janalai_egg(): CreatureScript("npc_janalai_egg") { }
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
@@ -687,11 +687,11 @@ public:
struct npc_janalai_eggAI : public ScriptedAI
{
- npc_janalai_eggAI(Creature* creature) : ScriptedAI(creature){}
+ npc_janalai_eggAI(Creature* creature) : ScriptedAI(creature){ }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
index 11b18e9e5cc..6281bcef5df 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
@@ -570,11 +570,11 @@ class npc_zuljin_vortex : public CreatureScript
struct npc_zuljin_vortexAI : public ScriptedAI
{
- npc_zuljin_vortexAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_zuljin_vortexAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*target*/) OVERRIDE {}
+ void EnterCombat(Unit* /*target*/) OVERRIDE { }
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
index 5803f1b981c..854679339c3 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
@@ -66,7 +66,7 @@ class instance_zulaman : public InstanceMapScript
struct instance_zulaman_InstanceMapScript : public InstanceScript
{
- instance_zulaman_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_zulaman_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 HarkorsSatchelGUID;
uint64 TanzarsTrunkGUID;
@@ -218,17 +218,17 @@ class instance_zulaman : public InstanceMapScript
return;
std::istringstream ss(load);
- //TC_LOG_ERROR(LOG_FILTER_TSCR, "Zul'aman loaded, %s.", ss.str().c_str());
+ //TC_LOG_ERROR("scripts", "Zul'aman loaded, %s.", ss.str().c_str());
char dataHead; // S
uint16 data1, data2, data3;
ss >> dataHead >> data1 >> data2 >> data3;
- //TC_LOG_ERROR(LOG_FILTER_TSCR, "Zul'aman loaded, %d %d %d.", data1, data2, data3);
+ //TC_LOG_ERROR("scripts", "Zul'aman loaded, %d %d %d.", data1, data2, data3);
if (dataHead == 'S')
{
BossKilled = data1;
ChestLooted = data2;
QuestMinute = data3;
- } else TC_LOG_ERROR(LOG_FILTER_TSCR, "Zul'aman: corrupted save data.");
+ } else TC_LOG_ERROR("scripts", "Zul'aman: corrupted save data.");
}
void SetData(uint32 type, uint32 data) OVERRIDE
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
index 4c3b50e4c3a..a4176322288 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
@@ -68,9 +68,9 @@ class npc_forest_frog : public CreatureScript
InstanceScript* instance;
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DoSpawnRandom()
{
@@ -144,9 +144,9 @@ class npc_zulaman_hostage : public CreatureScript
bool IsLoot;
uint64 PlayerGUID;
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -295,7 +295,7 @@ class npc_harrison_jones : public CreatureScript
uiTargetGUID = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index 2c48d18d112..7fe80c12fd2 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -88,7 +88,7 @@ Position const PosMoveOnSpawn[1] =
class boss_arlokk : public CreatureScript
{
- public: boss_arlokk() : CreatureScript("boss_arlokk") {}
+ public: boss_arlokk() : CreatureScript("boss_arlokk") { }
struct boss_arlokkAI : public BossAI
{
@@ -338,7 +338,7 @@ Position const PosProwlerCenter[1] =
class npc_zulian_prowler : public CreatureScript
{
- public: npc_zulian_prowler() : CreatureScript("npc_zulian_prowler") {}
+ public: npc_zulian_prowler() : CreatureScript("npc_zulian_prowler") { }
struct npc_zulian_prowlerAI : public ScriptedAI
{
@@ -433,7 +433,7 @@ Position const PosSummonArlokk[1] =
class go_gong_of_bethekk : public GameObjectScript
{
- public: go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk") {}
+ public: go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk") { }
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
index a6ed3b72146..017730f1186 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp
@@ -43,11 +43,11 @@ enum Events
class boss_gahzranka : public CreatureScript // gahzranka
{
- public: boss_gahzranka() : CreatureScript("boss_gahzranka") {}
+ public: boss_gahzranka() : CreatureScript("boss_gahzranka") { }
struct boss_gahzrankaAI : public BossAI
{
- boss_gahzrankaAI(Creature* creature) : BossAI(creature, DATA_GAHZRANKA) {}
+ boss_gahzrankaAI(Creature* creature) : BossAI(creature, DATA_GAHZRANKA) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
index 3c472b1e6d5..6d21e6015fe 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
@@ -41,11 +41,11 @@ enum Events
class boss_grilek : public CreatureScript // grilek
{
- public: boss_grilek() : CreatureScript("boss_grilek") {}
+ public: boss_grilek() : CreatureScript("boss_grilek") { }
struct boss_grilekAI : public BossAI
{
- boss_grilekAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) {}
+ boss_grilekAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
index 7603e14ea2a..b25daf85a7c 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -66,11 +66,11 @@ enum Events
class boss_hakkar : public CreatureScript
{
- public: boss_hakkar() : CreatureScript("boss_hakkar") {}
+ public: boss_hakkar() : CreatureScript("boss_hakkar") { }
struct boss_hakkarAI : public BossAI
{
- boss_hakkarAI(Creature* creature) : BossAI(creature, DATA_HAKKAR) {}
+ boss_hakkarAI(Creature* creature) : BossAI(creature, DATA_HAKKAR) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
index 27159a700cb..f988a43f728 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
@@ -42,11 +42,11 @@ enum Events
class boss_hazzarah : public CreatureScript
{
- public: boss_hazzarah() : CreatureScript("boss_hazzarah") {}
+ public: boss_hazzarah() : CreatureScript("boss_hazzarah") { }
struct boss_hazzarahAI : public BossAI
{
- boss_hazzarahAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) {}
+ boss_hazzarahAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index 2a04a03938d..50b7d277a70 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -50,11 +50,11 @@ enum Spells
class boss_jeklik : public CreatureScript //jeklik
{
- public: boss_jeklik() : CreatureScript("boss_jeklik") {}
+ public: boss_jeklik() : CreatureScript("boss_jeklik") { }
struct boss_jeklikAI : public BossAI
{
- boss_jeklikAI(Creature* creature) : BossAI(creature, DATA_JEKLIK) {}
+ boss_jeklikAI(Creature* creature) : BossAI(creature, DATA_JEKLIK) { }
uint32 Charge_Timer;
uint32 SonicBurst_Timer;
@@ -247,7 +247,7 @@ class npc_batrider : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
index 0bbfefc69fb..886e000c093 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -59,11 +59,11 @@ Position const TeleportLoc = {-11583.7783f, -1249.4278f, 77.5471f, 4.745f};
class boss_jindo : public CreatureScript
{
- public: boss_jindo() : CreatureScript("boss_jindo") {}
+ public: boss_jindo() : CreatureScript("boss_jindo") { }
struct boss_jindoAI : public BossAI
{
- boss_jindoAI(Creature* creature) : BossAI(creature, DATA_JINDO) {}
+ boss_jindoAI(Creature* creature) : BossAI(creature, DATA_JINDO) { }
void Reset() OVERRIDE
{
@@ -248,7 +248,7 @@ class npc_shade_of_jindo : public CreatureScript
struct npc_shade_of_jindoAI : public ScriptedAI
{
- npc_shade_of_jindoAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_shade_of_jindoAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ShadowShock_Timer;
@@ -258,7 +258,7 @@ class npc_shade_of_jindo : public CreatureScript
DoCast(me, SPELL_INVISIBLE, true);
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/)OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index ac65842fa44..08215f6a9de 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -106,7 +106,7 @@ Position const PosMandokir[2] =
class boss_mandokir : public CreatureScript
{
- public: boss_mandokir() : CreatureScript("boss_mandokir") {}
+ public: boss_mandokir() : CreatureScript("boss_mandokir") { }
struct boss_mandokirAI : public BossAI
{
@@ -293,7 +293,7 @@ enum OhganSpells
class npc_ohgan : public CreatureScript
{
- public: npc_ohgan() : CreatureScript("npc_ohgan") {}
+ public: npc_ohgan() : CreatureScript("npc_ohgan") { }
struct npc_ohganAI : public ScriptedAI
{
@@ -304,7 +304,7 @@ class npc_ohgan : public CreatureScript
SunderArmor_Timer = 5000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -345,7 +345,7 @@ enum VilebranchSpells
class npc_vilebranch_speaker : public CreatureScript
{
- public: npc_vilebranch_speaker() : CreatureScript("npc_vilebranch_speaker") {}
+ public: npc_vilebranch_speaker() : CreatureScript("npc_vilebranch_speaker") { }
struct npc_vilebranch_speakerAI : public ScriptedAI
{
@@ -357,7 +357,7 @@ class npc_vilebranch_speaker : public CreatureScript
cleave_Timer = urand(5000, 8000);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index c372cb0324d..3edbe6ff721 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -71,11 +71,11 @@ enum ModelId
class boss_marli : public CreatureScript
{
- public: boss_marli() : CreatureScript("boss_marli") {}
+ public: boss_marli() : CreatureScript("boss_marli") { }
struct boss_marliAI : public BossAI
{
- boss_marliAI(Creature* creature) : BossAI(creature, DATA_MARLI) {}
+ boss_marliAI(Creature* creature) : BossAI(creature, DATA_MARLI) { }
void Reset() OVERRIDE
{
@@ -219,11 +219,11 @@ class boss_marli : public CreatureScript
// Spawn of Marli
class npc_spawn_of_marli : public CreatureScript
{
- public: npc_spawn_of_marli() : CreatureScript("npc_spawn_of_marli") {}
+ public: npc_spawn_of_marli() : CreatureScript("npc_spawn_of_marli") { }
struct npc_spawn_of_marliAI : public ScriptedAI
{
- npc_spawn_of_marliAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_spawn_of_marliAI(Creature* creature) : ScriptedAI(creature) { }
uint32 LevelUp_Timer;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
index 4d9d446d823..581f1de5013 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
@@ -40,11 +40,11 @@ enum Misc
class boss_renataki : public CreatureScript
{
- public: boss_renataki() : CreatureScript("boss_renataki") {}
+ public: boss_renataki() : CreatureScript("boss_renataki") { }
struct boss_renatakiAI : public BossAI
{
- boss_renatakiAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) {}
+ boss_renatakiAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { }
uint32 Invisible_Timer;
uint32 Ambush_Timer;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index 6a945c545a0..d20414705cf 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -78,11 +78,11 @@ enum Phases
class boss_thekal : public CreatureScript
{
- public: boss_thekal() : CreatureScript("boss_thekal") {}
+ public: boss_thekal() : CreatureScript("boss_thekal") { }
struct boss_thekalAI : public BossAI
{
- boss_thekalAI(Creature* creature) : BossAI(creature, DATA_THEKAL) {}
+ boss_thekalAI(Creature* creature) : BossAI(creature, DATA_THEKAL) { }
bool Enraged;
bool WasDead;
@@ -258,7 +258,7 @@ class boss_thekal : public CreatureScript
//Zealot Lor'Khan
class npc_zealot_lorkhan : public CreatureScript
{
- public: npc_zealot_lorkhan() : CreatureScript("npc_zealot_lorkhan") {}
+ public: npc_zealot_lorkhan() : CreatureScript("npc_zealot_lorkhan") { }
struct npc_zealot_lorkhanAI : public ScriptedAI
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
index f57503fcac0..0d3548ae253 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
@@ -85,11 +85,11 @@ enum NPCs
class boss_venoxis : public CreatureScript
{
- public: boss_venoxis() : CreatureScript("boss_venoxis") {}
+ public: boss_venoxis() : CreatureScript("boss_venoxis") { }
struct boss_venoxisAI : public BossAI
{
- boss_venoxisAI(Creature* creature) : BossAI(creature, DATA_VENOXIS) {}
+ boss_venoxisAI(Creature* creature) : BossAI(creature, DATA_VENOXIS) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
index 0e492f57588..8778a306230 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
@@ -41,11 +41,11 @@ enum Events
class boss_wushoolay : public CreatureScript
{
- public: boss_wushoolay() : CreatureScript("boss_wushoolay") {}
+ public: boss_wushoolay() : CreatureScript("boss_wushoolay") { }
struct boss_wushoolayAI : public BossAI
{
- boss_wushoolayAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) {}
+ boss_wushoolayAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
index 797695a70f3..e9a2172040a 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
@@ -29,7 +29,7 @@ EndScriptData */
class instance_zulgurub : public InstanceMapScript
{
- public: instance_zulgurub(): InstanceMapScript(ZGScriptName, 309) {}
+ public: instance_zulgurub(): InstanceMapScript(ZGScriptName, 309) { }
struct instance_zulgurub_InstanceMapScript : public InstanceScript
{
diff --git a/src/server/scripts/EasternKingdoms/boss_kruul.cpp b/src/server/scripts/EasternKingdoms/boss_kruul.cpp
index 02fce8f3cf2..5ac197aa7db 100644
--- a/src/server/scripts/EasternKingdoms/boss_kruul.cpp
+++ b/src/server/scripts/EasternKingdoms/boss_kruul.cpp
@@ -49,7 +49,7 @@ public:
struct boss_kruulAI : public ScriptedAI
{
- boss_kruulAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_kruulAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ShadowVolley_Timer;
uint32 Cleave_Timer;
diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
index 55d3cc927a5..5c760a36e70 100644
--- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
@@ -68,7 +68,7 @@ class npc_professor_phizzlethorpe : public CreatureScript
struct npc_professor_phizzlethorpeAI : public npc_escortAI
{
- npc_professor_phizzlethorpeAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_professor_phizzlethorpeAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
index 94f227a3de0..5a61663a0bb 100644
--- a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
@@ -130,9 +130,9 @@ public:
struct npc_ragged_johnAI : public ScriptedAI
{
- npc_ragged_johnAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_ragged_johnAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -150,7 +150,7 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp
index 23b9d99935b..8f7865dbf71 100644
--- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp
@@ -87,7 +87,7 @@ public:
struct boss_twilight_corrupterAI : public ScriptedAI
{
- boss_twilight_corrupterAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_twilight_corrupterAI(Creature* creature) : ScriptedAI(creature) { }
uint32 SoulCorruption_Timer;
uint32 CreatureOfNightmare_Timer;
diff --git a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp
index ea8f3cd056a..ed14875b36d 100644
--- a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp
@@ -45,9 +45,9 @@ public:
{
npc_ghoul_flayerAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* killer) OVERRIDE
{
@@ -121,7 +121,7 @@ public:
struct npc_darrowshire_spiritAI : public ScriptedAI
{
- npc_darrowshire_spiritAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_darrowshire_spiritAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -129,7 +129,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp
index 5381b19ebf3..6bc9aab3d6f 100644
--- a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp
@@ -18,8 +18,8 @@
/* ScriptData
SDName: Eversong_Woods
-SD%Complete: 100
-SDComment: Quest support: 8488, 8490
+SD%Complete: 95
+SDComment: Quest support: 8487, 8488, 8490
SDCategory: Eversong Woods
EndScriptData */
@@ -37,11 +37,29 @@ EndContentData */
enum UnexpectedResults
{
// Quest
+ QUEST_CORRUPTED_SOIL = 8487,
QUEST_UNEXPECTED_RESULT = 8488,
// Creatures
- NPC_GHARZUL = 15958,
- NPC_ANGERSHADE = 15656
+ NPC_GHARZUL = 15958, // Quest 8488
+ NPC_ANGERSHADE = 15656, // Quest 8488
+
+ // Factions
+ FACTION_NORMAL = 1604, // Quest 8488
+ FACTION_COMBAT = 232, // Quest 8488
+
+ // Spells
+ SPELL_TEST_SOIL = 29535, // Quest 8487
+ SPELL_FIREBALL = 20811, // Quest 8488
+
+ // Text
+ SAY_TEST_SOIL = 0, // Quest 8487
+
+ // Events
+ EVENT_TALK = 1, // Quest 8487
+ EVENT_ADD_QUEST_GIVER_FLAG = 2, // Quest 8487
+ EVENT_SUMMON = 3, // Quest 8488
+ EVENT_FIREBALL = 4 // Quest 8488
};
class npc_apprentice_mirveda : public CreatureScript
@@ -49,47 +67,57 @@ class npc_apprentice_mirveda : public CreatureScript
public:
npc_apprentice_mirveda() : CreatureScript("npc_apprentice_mirveda") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
- {
- if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
- {
- CAST_AI(npc_apprentice_mirveda::npc_apprentice_mirvedaAI, creature->AI())->Summon = true;
- CAST_AI(npc_apprentice_mirveda::npc_apprentice_mirvedaAI, creature->AI())->PlayerGUID = player->GetGUID();
- }
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_apprentice_mirvedaAI(creature);
- }
-
struct npc_apprentice_mirvedaAI : public ScriptedAI
{
- npc_apprentice_mirvedaAI(Creature* creature) : ScriptedAI(creature), Summons(me) {}
+ npc_apprentice_mirvedaAI(Creature* creature) : ScriptedAI(creature), Summons(me) { }
uint32 KillCount;
uint64 PlayerGUID;
- bool Summon;
SummonList Summons;
+ EventMap events;
void Reset() OVERRIDE
{
+ SetCombatMovement(false);
KillCount = 0;
PlayerGUID = 0;
Summons.DespawnAll();
- Summon = false;
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void sQuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) OVERRIDE
+ {
+ if (quest->GetQuestId() == QUEST_CORRUPTED_SOIL)
+ {
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ events.ScheduleEvent(EVENT_TALK, 2000);
+ }
+ }
+
+ void sQuestAccept(Player* player, Quest const* quest) OVERRIDE
+ {
+ if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
+ {
+ me->setFaction(FACTION_COMBAT);
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ events.ScheduleEvent(EVENT_SUMMON, 1000);
+ PlayerGUID = player->GetGUID();
+ }
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_FIREBALL, 1000);
+ }
void JustSummoned(Creature* summoned) OVERRIDE
{
- summoned->AI()->AttackStart(me);
+ // This is the best I can do because AttackStart does nothing
+ summoned->GetMotionMaster()->MovePoint(1, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
+ // summoned->AI()->AttackStart(me);
Summons.Summon(summoned);
}
- void SummonedCreatureDespawn(Creature* summoned) OVERRIDE
+ void SummonedCreatureDies(Creature* summoned, Unit* /*who*/) OVERRIDE
{
Summons.Despawn(summoned);
++KillCount;
@@ -97,26 +125,60 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
+ me->setFaction(FACTION_NORMAL);
+
if (PlayerGUID)
if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID))
player->FailQuest(QUEST_UNEXPECTED_RESULT);
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (KillCount >= 3 && PlayerGUID)
if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID))
- player->CompleteQuest(QUEST_UNEXPECTED_RESULT);
+ if (player->GetQuestStatus(QUEST_UNEXPECTED_RESULT) == QUEST_STATUS_INCOMPLETE)
+ {
+ player->CompleteQuest(QUEST_UNEXPECTED_RESULT);
+ me->setFaction(FACTION_NORMAL);
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ }
+
+ events.Update(diff);
- if (Summon)
+ while (uint32 eventId = events.ExecuteEvent())
{
- me->SummonCreature(NPC_GHARZUL, 8745, -7134.32f, 35.22f, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
- me->SummonCreature(NPC_ANGERSHADE, 8745, -7134.32f, 35.22f, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
- me->SummonCreature(NPC_ANGERSHADE, 8745, -7134.32f, 35.22f, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
- Summon = false;
+ switch (eventId)
+ {
+ case EVENT_TALK:
+ Talk(SAY_TEST_SOIL);
+ events.ScheduleEvent(EVENT_ADD_QUEST_GIVER_FLAG, 7000);
+ break;
+ case EVENT_ADD_QUEST_GIVER_FLAG:
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
+ break;
+ case EVENT_SUMMON:
+ me->SummonCreature(NPC_GHARZUL, 8749.505f, -7132.595f, 35.31983f, 3.816502f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000);
+ me->SummonCreature(NPC_ANGERSHADE, 8755.38f, -7131.521f, 35.30957f, 3.816502f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000);
+ me->SummonCreature(NPC_ANGERSHADE, 8753.199f, -7125.975f, 35.31986f, 3.816502f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000);
+ break;
+ case EVENT_FIREBALL:
+ if (!UpdateVictim())
+ continue;
+ DoCastVictim(SPELL_FIREBALL, true); // Not casting in combat
+ events.ScheduleEvent(EVENT_FIREBALL, 3000);
+ break;
+ default:
+ break;
+ }
}
+ DoMeleeAttackIfReady();
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_apprentice_mirvedaAI(creature);
+ }
};
/*######
diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
index ebbf8ef9f5b..1b181581f5e 100644
--- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
@@ -140,7 +140,7 @@ public:
struct npc_ranger_lilathaAI : public npc_escortAI
{
- npc_ranger_lilathaAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_ranger_lilathaAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
index f68ffb66f30..257e3c21688 100644
--- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
@@ -41,9 +41,9 @@ enum OOX
{
SAY_OOX_START = 0,
SAY_OOX_AGGRO = 1,
- SAY_OOX_AMBUSH = 3,
- SAY_OOX_AMBUSH_REPLY = 4,
- SAY_OOX_END = 5,
+ SAY_OOX_AMBUSH = 2,
+ SAY_OOX_AMBUSH_REPLY = 3,
+ SAY_OOX_END = 4,
QUEST_RESQUE_OOX_09 = 836,
@@ -87,7 +87,7 @@ public:
{
npc_00x09hlAI(Creature* creature) : npc_escortAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
index 32a7feffa72..50b230b836d 100644
--- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
@@ -57,7 +57,7 @@ public:
struct npc_converted_sentryAI : public ScriptedAI
{
- npc_converted_sentryAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_converted_sentryAI(Creature* creature) : ScriptedAI(creature) { }
bool Credit;
uint32 Timer;
@@ -68,9 +68,9 @@ public:
Timer = 2500;
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -111,7 +111,7 @@ public:
struct npc_greengill_slaveAI : public ScriptedAI
{
- npc_greengill_slaveAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_greengill_slaveAI(Creature* creature) : ScriptedAI(creature) { }
void EnterCombat(Unit* /*who*/) OVERRIDE { }
diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
index 6609f8a9d46..604d51f9d8f 100644
--- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
@@ -63,7 +63,7 @@ public:
struct npc_corporal_keeshanAI : public npc_escortAI
{
- npc_corporal_keeshanAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_corporal_keeshanAI(Creature* creature) : npc_escortAI(creature) { }
uint32 uiPhase;
uint32 uiTimer;
diff --git a/src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp
deleted file mode 100644
index b5f85d38105..00000000000
--- a/src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2008-2013 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: Silvermoon_City
-SD%Complete: 100
-SDComment: Quest support: 9685
-SDCategory: Silvermoon City
-EndScriptData */
-
-/* ContentData
-npc_blood_knight_stillblade
-EndContentData */
-
-#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
-#include "Player.h"
-#include "SpellInfo.h"
-
-/*#######
-# npc_blood_knight_stillblade
-#######*/
-enum StillbladeData
-{
- SAY_HEAL = 0,
-
- QUEST_REDEEMING_THE_DEAD = 9685,
- SPELL_SHIMMERING_VESSEL = 31225,
- SPELL_REVIVE_SELF = 32343,
-};
-
-class npc_blood_knight_stillblade : public CreatureScript
-{
-public:
- npc_blood_knight_stillblade() : CreatureScript("npc_blood_knight_stillblade") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_blood_knight_stillbladeAI(creature);
- }
-
- struct npc_blood_knight_stillbladeAI : public ScriptedAI
- {
- npc_blood_knight_stillbladeAI(Creature* creature) : ScriptedAI(creature) {}
-
- uint32 lifeTimer;
- bool spellHit;
-
- void Reset() OVERRIDE
- {
- lifeTimer = 120000;
- me->SetStandState(UNIT_STAND_STATE_DEAD);
- me->SetUInt32Value(UNIT_FIELD_BYTES_1, 7); // lay down
- spellHit = false;
- }
-
- void EnterCombat(Unit* /*who*/) OVERRIDE
- {
- }
-
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE
-
- {
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (me->IsStandState())
- {
- if (lifeTimer <= diff)
- me->AI()->EnterEvadeMode();
- else
- lifeTimer -= diff;
- }
- }
-
- void SpellHit(Unit* caster, const SpellInfo* Spellkind) OVERRIDE
- {
- if (Spellkind->Id != SPELL_SHIMMERING_VESSEL || spellHit)
- return;
-
- Player* player = caster->ToPlayer();
- if (!player || !player->IsActiveQuest(QUEST_REDEEMING_THE_DEAD))
- return;
-
- player->AreaExploredOrEventHappens(QUEST_REDEEMING_THE_DEAD);
- DoCast(me, SPELL_REVIVE_SELF);
- me->SetStandState(UNIT_STAND_STATE_STAND);
- me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
- //me->RemoveAllAuras();
- Talk(SAY_HEAL);
- spellHit = true;
- }
- };
-};
-
-void AddSC_silvermoon_city()
-{
- new npc_blood_knight_stillblade();
-}
diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
index 8ddd609da29..757f2bcff2c 100644
--- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
@@ -65,7 +65,7 @@ public:
struct npc_deathstalker_erlandAI : public npc_escortAI
{
- npc_deathstalker_erlandAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_deathstalker_erlandAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -108,7 +108,7 @@ public:
}
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* who) OVERRIDE
{
@@ -212,7 +212,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustSummoned(Creature* summoned) OVERRIDE
{
@@ -255,7 +255,7 @@ public:
void UpdateAI(uint32 diff) OVERRIDE
{
- //TC_LOG_INFO(LOG_FILTER_TSCR, "DEBUG: p(%i) k(%i) d(%u) W(%i)", Phase, KillCount, diff, WaitTimer);
+ //TC_LOG_INFO("scripts", "DEBUG: p(%i) k(%i) d(%u) W(%i)", Phase, KillCount, diff, WaitTimer);
if (!QuestInProgress)
return;
diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
index 61c8e6aa28e..e4eca2c387f 100644
--- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
@@ -489,7 +489,7 @@ public:
struct npc_tyrion_spybotAI : public npc_escortAI
{
- npc_tyrion_spybotAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_tyrion_spybotAI(Creature* creature) : npc_escortAI(creature) { }
uint32 uiTimer;
uint32 uiPhase;
diff --git a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
index 4dc41e5551c..91bf802abf7 100644
--- a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
@@ -82,7 +82,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
index b06786caf44..7cf7b69a0bc 100644
--- a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
@@ -86,7 +86,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void AttackedBy(Unit* pAttacker) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
index 33f884408e2..d205fe8cb40 100644
--- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
@@ -99,7 +99,7 @@ public:
struct npc_lady_sylvanas_windrunnerAI : public ScriptedAI
{
- npc_lady_sylvanas_windrunnerAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_lady_sylvanas_windrunnerAI(Creature* creature) : ScriptedAI(creature) { }
uint32 LamentEventTimer;
bool LamentEvent;
@@ -124,7 +124,7 @@ public:
MultiShotTimer = 10000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustSummoned(Creature* summoned) OVERRIDE
{
@@ -231,7 +231,7 @@ public:
struct npc_highborne_lamenterAI : public ScriptedAI
{
- npc_highborne_lamenterAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_highborne_lamenterAI(Creature* creature) : ScriptedAI(creature) { }
uint32 EventMoveTimer;
uint32 EventCastTimer;
@@ -246,7 +246,7 @@ public:
EventCast = true;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
index 8937e896faf..6b409012cb0 100644
--- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp
@@ -172,11 +172,11 @@ public:
struct npc_the_scourge_cauldronAI : public ScriptedAI
{
- npc_the_scourge_cauldronAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_the_scourge_cauldronAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DoDie()
{
@@ -189,7 +189,6 @@ public:
}
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
if (!who)
return;
@@ -393,7 +392,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp
index 0ded937d5a8..3869ee5bbb5 100644
--- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp
@@ -84,7 +84,7 @@ public:
struct npc_daphne_stilwellAI : public npc_escortAI
{
- npc_daphne_stilwellAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_daphne_stilwellAI(Creature* creature) : npc_escortAI(creature) { }
uint32 uiWPHolder;
uint32 uiShootTimer;
@@ -269,7 +269,7 @@ public:
Talk(SAY_AGGRO, who->GetGUID());
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
};
};
diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp
index ca9d4cbc49e..75c5ef797e1 100644
--- a/src/server/scripts/Events/childrens_week.cpp
+++ b/src/server/scripts/Events/childrens_week.cpp
@@ -146,11 +146,11 @@ uint64 getOrphanGUID(Player* player, uint32 orphan)
class npc_winterfin_playmate : public CreatureScript
{
public:
- npc_winterfin_playmate() : CreatureScript("npc_winterfin_playmate") {}
+ npc_winterfin_playmate() : CreatureScript("npc_winterfin_playmate") { }
struct npc_winterfin_playmateAI : public ScriptedAI
{
- npc_winterfin_playmateAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_winterfin_playmateAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
@@ -245,11 +245,11 @@ class npc_winterfin_playmate : public CreatureScript
class npc_snowfall_glade_playmate : public CreatureScript
{
public:
- npc_snowfall_glade_playmate() : CreatureScript("npc_snowfall_glade_playmate") {}
+ npc_snowfall_glade_playmate() : CreatureScript("npc_snowfall_glade_playmate") { }
struct npc_snowfall_glade_playmateAI : public ScriptedAI
{
- npc_snowfall_glade_playmateAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_snowfall_glade_playmateAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
@@ -343,7 +343,7 @@ class npc_snowfall_glade_playmate : public CreatureScript
class npc_the_biggest_tree : public CreatureScript
{
public:
- npc_the_biggest_tree() : CreatureScript("npc_the_biggest_tree") {}
+ npc_the_biggest_tree() : CreatureScript("npc_the_biggest_tree") { }
struct npc_the_biggest_treeAI : public ScriptedAI
{
@@ -433,11 +433,11 @@ class npc_the_biggest_tree : public CreatureScript
class npc_high_oracle_soo_roo : public CreatureScript
{
public:
- npc_high_oracle_soo_roo() : CreatureScript("npc_high_oracle_soo_roo") {}
+ npc_high_oracle_soo_roo() : CreatureScript("npc_high_oracle_soo_roo") { }
struct npc_high_oracle_soo_rooAI : public ScriptedAI
{
- npc_high_oracle_soo_rooAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_high_oracle_soo_rooAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
@@ -522,11 +522,11 @@ class npc_high_oracle_soo_roo : public CreatureScript
class npc_elder_kekek : public CreatureScript
{
public:
- npc_elder_kekek() : CreatureScript("npc_elder_kekek") {}
+ npc_elder_kekek() : CreatureScript("npc_elder_kekek") { }
struct npc_elder_kekekAI : public ScriptedAI
{
- npc_elder_kekekAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_elder_kekekAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
@@ -611,11 +611,11 @@ class npc_elder_kekek : public CreatureScript
class npc_the_etymidian : public CreatureScript
{
public:
- npc_the_etymidian() : CreatureScript("npc_the_etymidian") {}
+ npc_the_etymidian() : CreatureScript("npc_the_etymidian") { }
struct npc_the_etymidianAI : public ScriptedAI
{
- npc_the_etymidianAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_the_etymidianAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
@@ -707,11 +707,11 @@ class npc_the_etymidian : public CreatureScript
class npc_alexstraza_the_lifebinder : public CreatureScript
{
public:
- npc_alexstraza_the_lifebinder() : CreatureScript("npc_alexstraza_the_lifebinder") {}
+ npc_alexstraza_the_lifebinder() : CreatureScript("npc_alexstraza_the_lifebinder") { }
struct npc_alexstraza_the_lifebinderAI : public ScriptedAI
{
- npc_alexstraza_the_lifebinderAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_alexstraza_the_lifebinderAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
@@ -924,7 +924,7 @@ class at_bring_your_orphan_to : public AreaTriggerScript
class npc_cw_area_trigger : public CreatureScript
{
public:
- npc_cw_area_trigger() : CreatureScript("npc_cw_area_trigger") {}
+ npc_cw_area_trigger() : CreatureScript("npc_cw_area_trigger") { }
struct npc_cw_area_triggerAI : public ScriptedAI
{
@@ -1021,7 +1021,7 @@ class npc_cw_area_trigger : public CreatureScript
class npc_grizzlemaw_cw_trigger : public CreatureScript
{
public:
- npc_grizzlemaw_cw_trigger() : CreatureScript("npc_grizzlemaw_cw_trigger") {}
+ npc_grizzlemaw_cw_trigger() : CreatureScript("npc_grizzlemaw_cw_trigger") { }
struct npc_grizzlemaw_cw_triggerAI : public ScriptedAI
{
diff --git a/src/server/scripts/Examples/example_creature.cpp b/src/server/scripts/Examples/example_creature.cpp
index 92c248c1fc9..b13ec1e1503 100644
--- a/src/server/scripts/Examples/example_creature.cpp
+++ b/src/server/scripts/Examples/example_creature.cpp
@@ -94,7 +94,7 @@ class example_creature : public CreatureScript
{
// *** HANDLED FUNCTION ***
//This is the constructor, called only once when the Creature is first created
- example_creatureAI(Creature* creature) : ScriptedAI(creature) {}
+ example_creatureAI(Creature* creature) : ScriptedAI(creature) { }
// *** CUSTOM VARIABLES ****
//These variables are for use only by this individual script.
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index 8e22c4b66c8..2c76d9a40b0 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -82,19 +82,19 @@ class spell_ex_5581 : public SpellScriptLoader
{
// this hook is executed before anything about casting the spell is done
// after this hook is executed all the machinery starts
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Caster just finished preparing the spell (cast bar has expired)");
+ TC_LOG_INFO("misc", "Caster just finished preparing the spell (cast bar has expired)");
}
void HandleOnCast()
{
// cast is validated and spell targets are selected at this moment
// this is a last place when the spell can be safely interrupted
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell is about to do take reagents, power, launch missile, do visuals and instant spell effects");
+ TC_LOG_INFO("misc", "Spell is about to do take reagents, power, launch missile, do visuals and instant spell effects");
}
void HandleAfterCast()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "All immediate Actions for the spell are finished now");
+ TC_LOG_INFO("misc", "All immediate Actions for the spell are finished now");
// this is a safe for triggering additional effects for a spell without interfering
// with visuals or with other effects of the spell
//GetCaster()->CastSpell(target, SPELL_TRIGGERED, true);
@@ -112,7 +112,7 @@ class spell_ex_5581 : public SpellScriptLoader
void HandleDummyLaunch(SpellEffIndex /*effIndex*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell %u with SPELL_EFFECT_DUMMY is just launched!", GetSpellInfo()->Id);
+ TC_LOG_INFO("misc", "Spell %u with SPELL_EFFECT_DUMMY is just launched!", GetSpellInfo()->Id);
}
void HandleDummyLaunchTarget(SpellEffIndex /*effIndex*/)
@@ -121,17 +121,17 @@ class spell_ex_5581 : public SpellScriptLoader
if (Unit* unitTarget = GetHitUnit())
targetGUID = unitTarget->GetGUID();
// we're handling SPELL_EFFECT_DUMMY in effIndex 0 here
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID);
+ TC_LOG_INFO("misc", "Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID);
}
void HandleDummyHit(SpellEffIndex /*effIndex*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell %u with SPELL_EFFECT_DUMMY has hit!", GetSpellInfo()->Id);
+ TC_LOG_INFO("misc", "Spell %u with SPELL_EFFECT_DUMMY has hit!", GetSpellInfo()->Id);
}
void HandleDummyHitTarget(SpellEffIndex /*effIndex*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "SPELL_EFFECT_DUMMY is hits it's target!");
+ TC_LOG_INFO("misc", "SPELL_EFFECT_DUMMY is hits it's target!");
// make caster cast a spell on a unit target of effect
if (Unit* target = GetHitUnit())
GetCaster()->CastSpell(target, SPELL_TRIGGERED, true);
@@ -139,23 +139,23 @@ class spell_ex_5581 : public SpellScriptLoader
void HandleBeforeHit()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell is about to hit target!");
+ TC_LOG_INFO("misc", "Spell is about to hit target!");
}
void HandleOnHit()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell just hit target!");
+ TC_LOG_INFO("misc", "Spell just hit target!");
}
void HandleAfterHit()
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell just finished hitting target!");
+ TC_LOG_INFO("misc", "Spell just finished hitting target!");
}
void FilterTargets(std::list<Unit*>& /*targetList*/)
{
// usually you want this call for Area Target spells
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Spell is about to add targets from targetList to final targets!");
+ TC_LOG_INFO("misc", "Spell is about to add targets from targetList to final targets!");
}
// register functions used in spell script - names of these functions do not matter
@@ -230,20 +230,20 @@ class spell_ex_66244 : public SpellScriptLoader
void HandleOnEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Aura Effect is about to be applied on target!");
+ TC_LOG_INFO("misc", "Aura Effect is about to be applied on target!");
// this hook allows you to prevent execution of AuraEffect handler, or to replace it with your own handler
//PreventDefaultAction();
}
void HandleOnEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Aura Effect is about to be removed from target!");
+ TC_LOG_INFO("misc", "Aura Effect is about to be removed from target!");
// this hook allows you to prevent execution of AuraEffect handler, or to replace it with your own handler
//PreventDefaultAction();
}
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Aura Effect has just been applied on target!");
+ TC_LOG_INFO("misc", "Aura Effect has just been applied on target!");
Unit* target = GetTarget();
// cast spell on target on aura apply
target->CastSpell(target, SPELL_TRIGGERED, true);
@@ -251,7 +251,7 @@ class spell_ex_66244 : public SpellScriptLoader
void HandleAfterEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Aura Effect has just been just removed from target!");
+ TC_LOG_INFO("misc", "Aura Effect has just been just removed from target!");
Unit* target = GetTarget();
Unit* caster = GetCaster();
// caster may be not avalible (logged out for example)
@@ -263,7 +263,7 @@ class spell_ex_66244 : public SpellScriptLoader
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Perioidic Aura Effect is does a tick on target!");
+ TC_LOG_INFO("misc", "Perioidic Aura Effect is does a tick on target!");
Unit* target = GetTarget();
// aura targets damage self on tick
target->DealDamage(target, 100);
@@ -271,14 +271,14 @@ class spell_ex_66244 : public SpellScriptLoader
void HandleEffectPeriodicUpdate(AuraEffect* aurEff)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Perioidic Aura Effect is now updated!");
+ TC_LOG_INFO("misc", "Perioidic Aura Effect is now updated!");
// we're doubling aura amount every tick
aurEff->ChangeAmount(aurEff->GetAmount() * 2);
}
void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Amount of Aura Effect is being calculated now!");
+ TC_LOG_INFO("misc", "Amount of Aura Effect is being calculated now!");
// we're setting amount to 100
amount = 100;
// amount will be never recalculated due to applying passive aura
@@ -287,7 +287,7 @@ class spell_ex_66244 : public SpellScriptLoader
void HandleEffectCalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Periodic data of Aura Effect is being calculated now!");
+ TC_LOG_INFO("misc", "Periodic data of Aura Effect is being calculated now!");
// we're setting aura to be periodic and tick every 10 seconds
isPeriodic = true;
amplitude = 2 * IN_MILLISECONDS;
@@ -295,7 +295,7 @@ class spell_ex_66244 : public SpellScriptLoader
void HandleEffectCalcSpellMod(AuraEffect const* /*aurEff*/, SpellModifier*& spellMod)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "SpellMod data of Aura Effect is being calculated now!");
+ TC_LOG_INFO("misc", "SpellMod data of Aura Effect is being calculated now!");
// we don't want spellmod for example
if (spellMod)
{
@@ -368,14 +368,14 @@ class spell_ex_absorb_aura : public SpellScriptLoader
void HandleOnEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Our aura is now absorbing damage done to us!");
+ TC_LOG_INFO("misc", "Our aura is now absorbing damage done to us!");
// absorb whole damage done to us
absorbAmount = dmgInfo.GetDamage();
}
void HandleAfterEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Our aura has absorbed %u damage!", absorbAmount);
+ TC_LOG_INFO("misc", "Our aura has absorbed %u damage!", absorbAmount);
}
// function registering
@@ -404,7 +404,7 @@ class spell_ex_463 : public SpellScriptLoader
bool CheckAreaTarget(Unit* target)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Area aura checks if unit is a valid target for it!");
+ TC_LOG_INFO("misc", "Area aura checks if unit is a valid target for it!");
// in our script we allow only players to be affected
return target->GetTypeId() == TYPEID_PLAYER;
}
@@ -442,7 +442,7 @@ class spell_ex : public SpellScriptLoader
//bool Validate(SpellInfo const* spellEntry){return true;} OVERRIDE
//bool Load(){return true;}
- //void Unload(){}
+ //void Unload(){ }
//void Function(SpellEffIndex effIndex) //OnEffect += SpellEffectFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_EFFECT_ANY);
//void Function() //OnHit += SpellEffectFn(spell_ex_SpellScript::Function);
@@ -469,7 +469,7 @@ class spell_ex : public SpellScriptLoader
PrepareAuraScript(spell_ex)
//bool Validate(SpellInfo const* spellEntry){return true;} OVERRIDE
//bool Load(){return true;}
- //void Unload(){}
+ //void Unload(){ }
//void spell_ex_SpellScript::Function(AuraEffect const* aurEff, AuraEffectHandleModes mode) //OnEffectApply += AuraEffectApplyFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
//void spell_ex_SpellScript::Function(AuraEffect const* aurEff, AuraEffectHandleModes mode) //OnEffectRemove += AuraEffectRemoveFn(spell_ex_SpellScript::Function, EFFECT_ANY, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
diff --git a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
index 6aa12e8ce77..b1d3dba105e 100644
--- a/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
+++ b/src/server/scripts/Kalimdor/BlackfathomDeeps/instance_blackfathom_deeps.cpp
@@ -64,7 +64,7 @@ public:
struct instance_blackfathom_deeps_InstanceMapScript : public InstanceScript
{
- instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 twilightLordKelrisGUID;
uint64 shrine1GUID;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index 3623ad88a0a..41cc1d0241d 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -108,7 +108,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
@@ -146,13 +146,13 @@ public:
struct npc_doomfireAI : public ScriptedAI
{
- npc_doomfireAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_doomfireAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
@@ -175,7 +175,7 @@ public:
struct npc_doomfire_targettingAI : public ScriptedAI
{
- npc_doomfire_targettingAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_doomfire_targettingAI(Creature* creature) : ScriptedAI(creature) { }
uint64 TargetGUID;
uint32 ChangeTargetTimer;
@@ -195,7 +195,7 @@ public:
TargetGUID = who->GetGUID();
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
@@ -638,7 +638,7 @@ public:
DoMeleeAttackIfReady();
}
- void WaypointReached(uint32 /*waypointId*/) OVERRIDE {}
+ void WaypointReached(uint32 /*waypointId*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index 336bee39da5..f4d3f559585 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -72,7 +72,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "HyjalAI - Debug mode has been toggled");
+ TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
break;
}
return true;
@@ -149,7 +149,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "HyjalAI - Debug mode has been toggled");
+ TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
break;
}
return true;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index fb06a5ccaa5..4a491803cb4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -407,7 +407,7 @@ void hyjalAI::Reset()
instance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0);
instance->SetData(DATA_RESET_TRASH_COUNT, 0);
}
- } else TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ } else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
//Visibility
DoHide = true;
@@ -540,7 +540,7 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
if (!instance)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ TC_LOG_ERROR("scripts", ERROR_INST_DATA);
return;
}
InfernalCount = 0;//reset infernal count every new wave
@@ -570,7 +570,7 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
else
{
NextWaveTimer = 15000;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
+ TC_LOG_DEBUG("scripts", "HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
}
}
else
@@ -614,7 +614,7 @@ uint32 hyjalAI::GetInstanceData(uint32 Event)
{
if (instance)
return instance->GetData(Event);
- else TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
return 0;
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index 24d0422e06e..43d75fad876 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -443,7 +443,7 @@ public:
imol = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -594,7 +594,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -697,7 +697,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -820,7 +820,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -918,7 +918,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -1017,7 +1017,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -1107,7 +1107,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -1206,7 +1206,7 @@ public:
me->SetPosition(x, y, z, 0);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index 5f425f780cb..d54ef0c5168 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -54,7 +54,7 @@ public:
struct instance_mount_hyjal_InstanceMapScript : public InstanceScript
{
- instance_mount_hyjal_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_mount_hyjal_InstanceMapScript(Map* map) : InstanceScript(map) { }
void Initialize() OVERRIDE
{
@@ -245,7 +245,7 @@ public:
break;
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
+ TC_LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
if (data == DONE)
{
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 681ed8e447f..c623ff40a10 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
@@ -114,7 +114,7 @@ public:
struct boss_lieutenant_drakeAI : public ScriptedAI
{
- boss_lieutenant_drakeAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_lieutenant_drakeAI(Creature* creature) : ScriptedAI(creature) { }
bool CanPatrol;
uint32 wpId;
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 0cb9c1e454d..8250f1ec3c0 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -52,7 +52,7 @@ public:
struct instance_old_hillsbrad_InstanceMapScript : public InstanceScript
{
- instance_old_hillsbrad_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_old_hillsbrad_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 m_auiEncounter[MAX_ENCOUNTER];
uint32 mBarrelCount;
@@ -86,7 +86,7 @@ public:
}
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
@@ -126,7 +126,7 @@ public:
if (!player)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
return;
}
@@ -142,7 +142,7 @@ public:
++mBarrelCount;
DoUpdateWorldState(WORLD_STATE_OH, mBarrelCount);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", mBarrelCount);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", mBarrelCount);
m_auiEncounter[0] = IN_PROGRESS;
@@ -163,7 +163,7 @@ public:
{
++mThrallEventCount;
m_auiEncounter[1] = NOT_STARTED;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount);
+ TC_LOG_DEBUG("scripts", "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;
@@ -176,29 +176,29 @@ public:
m_auiEncounter[3] = data;
m_auiEncounter[4] = data;
m_auiEncounter[5] = data;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", mThrallEventCount);
}
}
else
m_auiEncounter[1] = data;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall escort event adjusted to data %u.", data);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: Thrall escort event adjusted to data %u.", data);
break;
}
case TYPE_THRALL_PART1:
m_auiEncounter[2] = data;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part I adjusted to data %u.", data);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: Thrall event part I adjusted to data %u.", data);
break;
case TYPE_THRALL_PART2:
m_auiEncounter[3] = data;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part II adjusted to data %u.", data);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: Thrall event part II adjusted to data %u.", data);
break;
case TYPE_THRALL_PART3:
m_auiEncounter[4] = data;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part III adjusted to data %u.", data);
+ TC_LOG_DEBUG("scripts", "Instance Old Hillsbrad: Thrall event part III adjusted to data %u.", data);
break;
case TYPE_THRALL_PART4:
m_auiEncounter[5] = data;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.", data);
+ TC_LOG_DEBUG("scripts", "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 ffa0eea14f6..46978366224 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -639,8 +639,8 @@ public:
}
}
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp
index 0d67426d039..c929a1b6a55 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_aeonus.cpp
@@ -59,7 +59,7 @@ public:
{
boss_aeonusAI(Creature* creature) : BossAI(creature, TYPE_AEONUS) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp
index a181c0fe43e..fe91f3ab712 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp
@@ -60,7 +60,7 @@ public:
{
boss_chrono_lord_dejaAI(Creature* creature) : BossAI(creature, TYPE_CRONO_LORD_DEJA) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp
index 4bd06546a88..4d94edf7339 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_temporus.cpp
@@ -59,7 +59,7 @@ public:
{
boss_temporusAI(Creature* creature) : BossAI(creature, TYPE_TEMPORUS) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
index 19024172aa0..d0178f4874a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/instance_the_black_morass.cpp
@@ -193,7 +193,7 @@ public:
{
if (data == IN_PROGRESS)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Starting event.");
+ TC_LOG_DEBUG("scripts", "Instance The Black Morass: Starting event.");
InitWorldState();
m_auiEncounter[1] = IN_PROGRESS;
ScheduleEventNextPortal(15000);
@@ -202,7 +202,7 @@ public:
if (data == DONE)
{
//this may be completed further out in the post-event
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Event completed.");
+ TC_LOG_DEBUG("scripts", "Instance The Black Morass: Event completed.");
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
@@ -267,7 +267,7 @@ public:
if (entry == RIFT_BOSS)
entry = RandRiftBoss();
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Summoning rift boss entry %u.", entry);
+ TC_LOG_DEBUG("scripts", "Instance The Black Morass: Summoning rift boss entry %u.", entry);
Position pos;
me->GetRandomNearPosition(pos, 10.0f);
@@ -278,7 +278,7 @@ public:
if (Creature* summon = me->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000))
return summon;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: What just happened there? No boss, no loot, no fun...");
+ TC_LOG_DEBUG("scripts", "Instance The Black Morass: What just happened there? No boss, no loot, no fun...");
return NULL;
}
@@ -291,7 +291,7 @@ public:
if (tmp >= _currentRiftId)
++tmp;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance The Black Morass: Creating Time Rift at locationId %i (old locationId was %u).", tmp, _currentRiftId);
+ TC_LOG_DEBUG("scripts", "Instance The Black Morass: Creating Time Rift at locationId %i (old locationId was %u).", tmp, _currentRiftId);
_currentRiftId = tmp;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
index 70c569a3259..cc3cf8192dc 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
@@ -151,7 +151,7 @@ public:
//ScriptedAI::AttackStart(who);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
@@ -303,7 +303,7 @@ public:
else mWaveId = 1;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DoSummonAtRift(uint32 creature_entry)
{
@@ -336,7 +336,7 @@ public:
uint32 entry = 0;
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry);
+ TC_LOG_DEBUG("scripts", "npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry);
++mRiftWaveCount;
@@ -361,7 +361,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
return;
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_time_rift: not casting anylonger, i need to die.");
+ TC_LOG_DEBUG("scripts", "npc_time_rift: not casting anylonger, i need to die.");
me->setDeathState(JUST_DIED);
if (instance->GetData(TYPE_RIFT) == IN_PROGRESS)
diff --git a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
index a478d7aea25..e28e65b6911 100644
--- a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
+++ b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
@@ -37,7 +37,7 @@ public:
struct instance_dire_maul_InstanceMapScript : public InstanceScript
{
- instance_dire_maul_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_dire_maul_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
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 b8c1b4746b2..2a00565e4bd 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_celebras_the_cursed.cpp
@@ -45,7 +45,7 @@ public:
struct celebras_the_cursedAI : public ScriptedAI
{
- celebras_the_cursedAI(Creature* creature) : ScriptedAI(creature) {}
+ celebras_the_cursedAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WrathTimer;
uint32 EntanglingRootsTimer;
@@ -58,7 +58,7 @@ public:
CorruptForcesTimer = 30000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
index 3cf6e3fab33..723070fd18d 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_landslide.cpp
@@ -45,7 +45,7 @@ public:
struct boss_landslideAI : public ScriptedAI
{
- boss_landslideAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_landslideAI(Creature* creature) : ScriptedAI(creature) { }
uint32 KnockAwayTimer;
uint32 TrampleTimer;
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
index d512478a229..6478c6eae75 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
@@ -44,7 +44,7 @@ public:
struct boss_noxxionAI : public ScriptedAI
{
- boss_noxxionAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_noxxionAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ToxicVolleyTimer;
uint32 UppercutTimer;
@@ -61,7 +61,7 @@ public:
Invisible = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SummonAdds(Unit* victim)
{
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
index 7098d0da3fb..654ef986a17 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_princess_theradras.cpp
@@ -47,7 +47,7 @@ public:
struct boss_ptheradrasAI : public ScriptedAI
{
- boss_ptheradrasAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_ptheradrasAI(Creature* creature) : ScriptedAI(creature) { }
uint32 DustfieldTimer;
uint32 BoulderTimer;
@@ -62,7 +62,7 @@ public:
RepulsiveGazeTimer = 23000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp
index a44f4078a9b..53b04c9b4e7 100644
--- a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp
@@ -37,7 +37,7 @@ public:
struct instance_maraudon_InstanceMapScript : public InstanceScript
{
- instance_maraudon_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_maraudon_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
index aaf6b059c3a..fcb6a484a9b 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp
@@ -43,7 +43,7 @@ public:
struct instance_onyxias_lair_InstanceMapScript : public InstanceScript
{
- instance_onyxias_lair_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_onyxias_lair_InstanceMapScript(Map* map) : InstanceScript(map) { }
//Eruption is a BFS graph problem
//One map to remember all floor, one map to keep floor that still need to erupt and one queue to know what needs to be removed
diff --git a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp
index 6b13fecb26a..2205845e6f8 100644
--- a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp
+++ b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp
@@ -37,7 +37,7 @@ public:
struct instance_ragefire_chasm_InstanceMapScript : public InstanceScript
{
- instance_ragefire_chasm_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_ragefire_chasm_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
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 15b1fa51548..4a4d7fe4b07 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
@@ -52,7 +52,7 @@ public:
struct boss_amnennar_the_coldbringerAI : public ScriptedAI
{
- boss_amnennar_the_coldbringerAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_amnennar_the_coldbringerAI(Creature* creature) : ScriptedAI(creature) { }
uint32 AmnenarsWrath_Timer;
uint32 FrostBolt_Timer;
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
index b40429af794..59a24032d5f 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -42,7 +42,7 @@ public:
struct instance_razorfen_kraul_InstanceMapScript : public InstanceScript
{
- instance_razorfen_kraul_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_razorfen_kraul_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 DoorWardGUID;
int WardKeeperDeath;
@@ -65,7 +65,7 @@ public:
return player;
}
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Razorfen Kraul: GetPlayerInMap, but PlayerList is empty!");
+ TC_LOG_DEBUG("scripts", "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 13ce8e8c964..ee8618eacc9 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -66,7 +66,7 @@ public:
struct npc_willixAI : public npc_escortAI
{
- npc_willixAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_willixAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -118,7 +118,7 @@ public:
}
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
@@ -149,7 +149,7 @@ enum SnufflenoseGopher
struct DistanceOrder : public std::binary_function<GameObject, GameObject, bool>
{
- DistanceOrder(Creature* me) : me(me) {}
+ DistanceOrder(Creature* me) : me(me) { }
bool operator() (GameObject* first, GameObject* second)
{
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 52ef2a5430b..0cf56df50e3 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp
@@ -22,7 +22,7 @@
class instance_ruins_of_ahnqiraj : public InstanceMapScript
{
public:
- instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", 509) {}
+ instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", 509) { }
struct instance_ruins_of_ahnqiraj_InstanceMapScript : public InstanceScript
{
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index f98494c7c82..d1f0bb10ecd 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -162,7 +162,7 @@ public:
{
instance = creature->GetInstanceScript();
if (!instance)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI");
+ TC_LOG_ERROR("scripts", "No Instance eye_of_cthunAI");
SetCombatMovement(false);
}
@@ -470,7 +470,7 @@ public:
instance = creature->GetInstanceScript();
if (!instance)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "No Instance eye_of_cthunAI");
+ TC_LOG_ERROR("scripts", "No Instance eye_of_cthunAI");
}
InstanceScript* instance;
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
index 59c7565d060..bc6f03517b8 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp
@@ -53,7 +53,7 @@ public:
struct boss_fankrissAI : public ScriptedAI
{
- boss_fankrissAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_fankrissAI(Creature* creature) : ScriptedAI(creature) { }
uint32 MortalWound_Timer;
uint32 SpawnHatchlings_Timer;
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
index 54da5a30802..2104d7f5837 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp
@@ -51,7 +51,7 @@ public:
struct boss_huhuranAI : public ScriptedAI
{
- boss_huhuranAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_huhuranAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Frenzy_Timer;
uint32 Wyvern_Timer;
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
index 36dd93076e7..33c3f29b94e 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
@@ -48,7 +48,7 @@ public:
struct boss_ouroAI : public ScriptedAI
{
- boss_ouroAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_ouroAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Sweep_Timer;
uint32 SandBlast_Timer;
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
index a12da4fabd1..a3edd9ad83d 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_sartura.cpp
@@ -53,7 +53,7 @@ public:
struct boss_sarturaAI : public ScriptedAI
{
- boss_sarturaAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_sarturaAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WhirlWind_Timer;
uint32 WhirlWindRandom_Timer;
@@ -196,7 +196,7 @@ public:
struct npc_sartura_royal_guardAI : public ScriptedAI
{
- npc_sartura_royal_guardAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_sartura_royal_guardAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WhirlWind_Timer;
uint32 WhirlWindRandom_Timer;
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
index e9cf887f22b..1d888f3ce8b 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
@@ -400,7 +400,7 @@ public:
struct boss_veknilashAI : public boss_twinemperorsAI
{
bool IAmVeklor() {return false;}
- boss_veknilashAI(Creature* creature) : boss_twinemperorsAI(creature) {}
+ boss_veknilashAI(Creature* creature) : boss_twinemperorsAI(creature) { }
uint32 UpperCut_Timer;
uint32 UnbalancingStrike_Timer;
@@ -486,7 +486,7 @@ public:
struct boss_veklorAI : public boss_twinemperorsAI
{
bool IAmVeklor() {return true;}
- boss_veklorAI(Creature* creature) : boss_twinemperorsAI(creature) {}
+ boss_veklorAI(Creature* creature) : boss_twinemperorsAI(creature) { }
uint32 ShadowBolt_Timer;
uint32 Blizzard_Timer;
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 54845c6b746..0a5733f1c7f 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp
@@ -39,7 +39,7 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript
struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
{
- instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) { }
//If Vem is dead...
bool IsBossDied[3];
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
index 5c4fb7bbaba..522345c4fd4 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/instance_wailing_caverns.cpp
@@ -41,7 +41,7 @@ public:
struct instance_wailing_caverns_InstanceMapScript : public InstanceScript
{
- instance_wailing_caverns_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_wailing_caverns_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 m_auiEncounter[MAX_ENCOUNTER];
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
index 8e2d393e6a6..8cb1cfebd15 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp
@@ -108,7 +108,7 @@ public:
struct instance_zulfarrak_InstanceMapScript : public InstanceScript
{
- instance_zulfarrak_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_zulfarrak_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 GahzRillaEncounter;
uint64 ZumrahGUID;
diff --git a/src/server/scripts/Kalimdor/boss_azuregos.cpp b/src/server/scripts/Kalimdor/boss_azuregos.cpp
index 56d380b7b46..e433884c24a 100644
--- a/src/server/scripts/Kalimdor/boss_azuregos.cpp
+++ b/src/server/scripts/Kalimdor/boss_azuregos.cpp
@@ -54,7 +54,7 @@ public:
struct boss_azuregosAI : public ScriptedAI
{
- boss_azuregosAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_azuregosAI(Creature* creature) : ScriptedAI(creature) { }
uint32 MarkOfFrostTimer;
uint32 ManaStormTimer;
@@ -79,7 +79,7 @@ public:
Enraged = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
index bd4c2f893c5..dbcf054f8f4 100644
--- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
@@ -72,7 +72,7 @@ class npc_torek : public CreatureScript
struct npc_torekAI : public npc_escortAI
{
- npc_torekAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_torekAI(Creature* creature) : npc_escortAI(creature) { }
uint32 Rend_Timer;
uint32 Thunderclap_Timer;
@@ -229,7 +229,7 @@ class npc_ruul_snowhoof : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp
index f48bd1f9339..58829abc940 100644
--- a/src/server/scripts/Kalimdor/zone_azshara.cpp
+++ b/src/server/scripts/Kalimdor/zone_azshara.cpp
@@ -52,7 +52,7 @@ public:
struct npc_spitelashesAI : public ScriptedAI
{
- npc_spitelashesAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_spitelashesAI(Creature* creature) : ScriptedAI(creature) { }
uint32 morphtimer;
bool spellhit;
@@ -63,7 +63,7 @@ public:
spellhit = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* unit, const SpellInfo* spell) OVERRIDE
{
@@ -309,7 +309,7 @@ public:
struct npc_rizzle_sprysprocketAI : public ScriptedAI
{
- npc_rizzle_sprysprocketAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_rizzle_sprysprocketAI(Creature* creature) : ScriptedAI(creature) { }
uint32 SpellEscapeTimer;
uint32 TeleportTimer;
@@ -443,7 +443,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
@@ -477,7 +477,7 @@ public:
struct npc_depth_chargeAI : public ScriptedAI
{
- npc_depth_chargeAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_depth_chargeAI(Creature* creature) : ScriptedAI(creature) { }
bool WeMustDie;
uint32 WeMustDieTimer;
@@ -517,9 +517,9 @@ public:
}
}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index e0d181646e1..812aa5a139f 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -68,7 +68,7 @@ public:
struct npc_draenei_survivorAI : public ScriptedAI
{
- npc_draenei_survivorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_draenei_survivorAI(Creature* creature) : ScriptedAI(creature) { }
uint64 pCaster;
@@ -96,7 +96,7 @@ public:
me->SetStandState(UNIT_STAND_STATE_SLEEP);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -301,7 +301,7 @@ public:
struct npc_injured_draeneiAI : public ScriptedAI
{
- npc_injured_draeneiAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_injured_draeneiAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -319,12 +319,12 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
};
@@ -368,7 +368,7 @@ public:
struct npc_magwinAI : public npc_escortAI
{
- npc_magwinAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_magwinAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -399,7 +399,7 @@ public:
Talk(SAY_AGGRO, who->GetGUID());
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
};
};
@@ -442,7 +442,7 @@ public:
struct npc_geezleAI : public ScriptedAI
{
- npc_geezleAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_geezleAI(Creature* creature) : ScriptedAI(creature) { }
uint64 SparkGUID;
@@ -458,7 +458,7 @@ public:
StartEvent();
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void StartEvent()
{
@@ -555,7 +555,7 @@ public:
}
}
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: FlagList is empty!");
+ TC_LOG_ERROR("scripts", "SD2 ERROR: FlagList is empty!");
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -615,7 +615,7 @@ public:
struct npc_death_ravagerAI : public ScriptedAI
{
- npc_death_ravagerAI(Creature* creature) : ScriptedAI(creature){}
+ npc_death_ravagerAI(Creature* creature) : ScriptedAI(creature){ }
uint32 RendTimer;
uint32 EnragingBiteTimer;
@@ -677,7 +677,7 @@ class npc_stillpine_capitive : public CreatureScript
struct npc_stillpine_capitiveAI : public ScriptedAI
{
- npc_stillpine_capitiveAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_stillpine_capitiveAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
index 8ee1de1c8d5..694d63d5295 100644
--- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
@@ -52,11 +52,11 @@ public:
struct npc_webbed_creatureAI : public ScriptedAI
{
- npc_webbed_creatureAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_webbed_creatureAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* killer) OVERRIDE
{
@@ -185,7 +185,7 @@ public:
struct npc_princess_stillpineAI : public ScriptedAI
{
- npc_princess_stillpineAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_princess_stillpineAI(Creature* creature) : ScriptedAI(creature) { }
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp
index 5350693471b..99a693a0eb6 100644
--- a/src/server/scripts/Kalimdor/zone_darkshore.cpp
+++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp
@@ -223,7 +223,7 @@ public:
struct npc_prospector_remtravelAI : public npc_escortAI
{
- npc_prospector_remtravelAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_prospector_remtravelAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -286,7 +286,7 @@ public:
}
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* who) OVERRIDE
{
@@ -358,7 +358,7 @@ public:
{
npc_threshwackonatorAI(Creature* creature) : FollowerAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp
index 05496c0fcda..b748db4592c 100644
--- a/src/server/scripts/Kalimdor/zone_desolace.cpp
+++ b/src/server/scripts/Kalimdor/zone_desolace.cpp
@@ -75,7 +75,7 @@ public:
struct npc_aged_dying_ancient_kodoAI : public ScriptedAI
{
- npc_aged_dying_ancient_kodoAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_aged_dying_ancient_kodoAI(Creature* creature) : ScriptedAI(creature) { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -195,9 +195,9 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp
index 1eec2c826ea..ff96d5e8465 100644
--- a/src/server/scripts/Kalimdor/zone_durotar.cpp
+++ b/src/server/scripts/Kalimdor/zone_durotar.cpp
@@ -51,7 +51,7 @@ public:
struct npc_lazy_peonAI : public ScriptedAI
{
- npc_lazy_peonAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_lazy_peonAI(Creature* creature) : ScriptedAI(creature) { }
uint64 PlayerGUID;
@@ -230,7 +230,7 @@ class npc_tiger_matriarch_credit : public CreatureScript
class npc_tiger_matriarch : public CreatureScript
{
public:
- npc_tiger_matriarch() : CreatureScript("npc_tiger_matriarch") {}
+ npc_tiger_matriarch() : CreatureScript("npc_tiger_matriarch") { }
struct npc_tiger_matriarchAI : public ScriptedAI
{
@@ -443,7 +443,7 @@ typedef npc_troll_volunteer::npc_troll_volunteerAI VolunteerAI;
class spell_mount_check : public SpellScriptLoader
{
public:
- spell_mount_check() : SpellScriptLoader("spell_mount_check") {}
+ spell_mount_check() : SpellScriptLoader("spell_mount_check") { }
class spell_mount_check_AuraScript : public AuraScript
{
@@ -491,7 +491,7 @@ class spell_mount_check : public SpellScriptLoader
class spell_voljin_war_drums : public SpellScriptLoader
{
public:
- spell_voljin_war_drums() : SpellScriptLoader("spell_voljin_war_drums") {}
+ spell_voljin_war_drums() : SpellScriptLoader("spell_voljin_war_drums") { }
class spell_voljin_war_drums_SpellScript : public SpellScript
{
@@ -548,7 +548,7 @@ enum VoodooSpells
class spell_voodoo : public SpellScriptLoader
{
public:
- spell_voodoo() : SpellScriptLoader("spell_voodoo") {}
+ spell_voodoo() : SpellScriptLoader("spell_voodoo") { }
class spell_voodoo_SpellScript : public SpellScript
{
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
index 33cce095abf..9ad9b8dc835 100644
--- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
@@ -568,7 +568,7 @@ public:
Talk(SAY_ATTACKED_1, who->GetGUID());
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp
index 509adb566cd..7fb423f53ee 100644
--- a/src/server/scripts/Kalimdor/zone_moonglade.cpp
+++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp
@@ -667,7 +667,7 @@ public:
struct npc_giant_spotlightAI : public ScriptedAI
{
- npc_giant_spotlightAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_giant_spotlightAI(Creature* creature) : ScriptedAI(creature) { }
EventMap events;
diff --git a/src/server/scripts/Kalimdor/zone_mulgore.cpp b/src/server/scripts/Kalimdor/zone_mulgore.cpp
index 6b42b971531..2cc6f4bfb5b 100644
--- a/src/server/scripts/Kalimdor/zone_mulgore.cpp
+++ b/src/server/scripts/Kalimdor/zone_mulgore.cpp
@@ -98,7 +98,7 @@ public:
struct npc_kyle_frenziedAI : public ScriptedAI
{
- npc_kyle_frenziedAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_kyle_frenziedAI(Creature* creature) : ScriptedAI(creature) { }
bool EventActive;
bool IsMovingToLunch;
@@ -271,7 +271,7 @@ public:
struct npc_plains_visionAI : public ScriptedAI
{
- npc_plains_visionAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_plains_visionAI(Creature* creature) : ScriptedAI(creature) { }
bool newWaypoint;
uint8 WayPointId;
@@ -284,7 +284,7 @@ public:
amountWP = 49;
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
index 7928ab10978..f1887b9f55a 100644
--- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
+++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
@@ -64,7 +64,7 @@ public:
struct npc_shenthulAI : public ScriptedAI
{
- npc_shenthulAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_shenthulAI(Creature* creature) : ScriptedAI(creature) { }
bool CanTalk;
bool CanEmote;
@@ -81,7 +81,7 @@ public:
PlayerGUID = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -211,7 +211,7 @@ public:
struct npc_thrall_warchiefAI : public ScriptedAI
{
- npc_thrall_warchiefAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_thrall_warchiefAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ChainLightningTimer;
uint32 ShockTimer;
@@ -222,7 +222,7 @@ public:
ShockTimer = 8000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index 79bd6f691e6..7e580a29d3b 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -496,7 +496,7 @@ public:
struct npc_anachronos_the_ancientAI : public ScriptedAI
{
- npc_anachronos_the_ancientAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_anachronos_the_ancientAI(Creature* creature) : ScriptedAI(creature) { }
uint32 AnimationTimer;
uint8 AnimationCount;
@@ -824,7 +824,7 @@ public:
struct npc_qiraj_war_spawnAI : public ScriptedAI
{
- npc_qiraj_war_spawnAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_qiraj_war_spawnAI(Creature* creature) : ScriptedAI(creature) { }
uint64 MobGUID;
uint64 PlayerGUID;
@@ -840,7 +840,7 @@ public:
hasTarget = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*slayer*/) OVERRIDE;
void UpdateAI(uint32 diff) OVERRIDE
@@ -937,7 +937,7 @@ public:
struct npc_anachronos_quest_triggerAI : public ScriptedAI
{
- npc_anachronos_quest_triggerAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_anachronos_quest_triggerAI(Creature* creature) : ScriptedAI(creature) { }
uint64 PlayerGUID;
diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
index 058cd19e3b4..891879f2ea6 100644
--- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
@@ -115,7 +115,7 @@ public:
struct npc_kaya_flathoofAI : public npc_escortAI
{
- npc_kaya_flathoofAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_kaya_flathoofAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -144,7 +144,7 @@ public:
summoned->AI()->AttackStart(me);
}
- void Reset()OVERRIDE {}
+ void Reset() OVERRIDE { }
};
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp
index 0b12e6bf48c..5e27d71ea07 100644
--- a/src/server/scripts/Kalimdor/zone_tanaris.cpp
+++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp
@@ -65,7 +65,7 @@ public:
struct npc_aquementasAI : public ScriptedAI
{
- npc_aquementasAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_aquementasAI(Creature* creature) : ScriptedAI(creature) { }
uint32 SendItemTimer;
uint32 SwitchFactionTimer;
@@ -182,7 +182,7 @@ public:
struct npc_custodian_of_timeAI : public npc_escortAI
{
- npc_custodian_of_timeAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_custodian_of_timeAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -270,8 +270,8 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void Reset() OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void Reset() OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -470,7 +470,7 @@ public:
struct npc_OOX17AI : public npc_escortAI
{
- npc_OOX17AI(Creature* creature) : npc_escortAI(creature) {}
+ npc_OOX17AI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -500,7 +500,7 @@ public:
}
}
- void Reset()OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_teldrassil.cpp b/src/server/scripts/Kalimdor/zone_teldrassil.cpp
index 8cf08953fc2..14f8f2a9dac 100644
--- a/src/server/scripts/Kalimdor/zone_teldrassil.cpp
+++ b/src/server/scripts/Kalimdor/zone_teldrassil.cpp
@@ -68,7 +68,7 @@ public:
{
npc_mistAI(Creature* creature) : FollowerAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
index 122ce84091b..292017d2cc4 100644
--- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
@@ -126,7 +126,7 @@ public:
{
npc_giltharesAI(Creature* creature) : npc_escortAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -240,7 +240,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -314,7 +314,7 @@ public:
struct npc_twiggy_flatheadAI : public ScriptedAI
{
- npc_twiggy_flatheadAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_twiggy_flatheadAI(Creature* creature) : ScriptedAI(creature) { }
bool EventInProgress;
bool EventGrate;
@@ -345,7 +345,7 @@ public:
BigWill = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -362,7 +362,7 @@ public:
}
}
- void KilledUnit(Unit* /*victim*/) OVERRIDE {}
+ void KilledUnit(Unit* /*victim*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
index 9afa825972f..1ba9bf2cb54 100644
--- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
@@ -75,7 +75,7 @@ public:
{
npc_kanatiAI(Creature* creature) : npc_escortAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -164,7 +164,7 @@ public:
{
npc_lakota_windsongAI(Creature* creature) : npc_escortAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -247,7 +247,7 @@ public:
{
npc_paoka_swiftmountainAI(Creature* creature) : npc_escortAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -433,7 +433,7 @@ public:
struct npc_enraged_pantherAI : public ScriptedAI
{
- npc_enraged_pantherAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_enraged_pantherAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
index 7dda6ab027f..fee15608884 100644
--- a/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
+++ b/src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
@@ -79,7 +79,7 @@ public:
struct npc_cairne_bloodhoofAI : public ScriptedAI
{
- npc_cairne_bloodhoofAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_cairne_bloodhoofAI(Creature* creature) : ScriptedAI(creature) { }
uint32 BerserkerChargeTimer;
uint32 CleaveTimer;
@@ -96,7 +96,7 @@ public:
UppercutTimer = 10000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
index 3dc77e0cf04..5f19e838c8a 100644
--- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
@@ -77,7 +77,7 @@ public:
struct npc_ameAI : public npc_escortAI
{
- npc_ameAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_ameAI(Creature* creature) : npc_escortAI(creature) { }
uint32 DemoralizingShoutTimer;
diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp
index 92d15322f4c..18df584e64a 100644
--- a/src/server/scripts/Kalimdor/zone_winterspring.cpp
+++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp
@@ -159,7 +159,7 @@ public:
_dialogueArray(dialogueArray),
_currentEntry(NULL),
_actionTimer(0)
- {}
+ { }
// The array MUST be terminated by {0, 0, 0, 0, 0}
/// Function to initialize the dialogue helper for instances. If not used with instances, GetSpeakerByEntry MUST be overwritten to obtain the speakers
@@ -199,7 +199,7 @@ public:
protected:
/// Will be called when a dialogue step was done
- virtual void JustDidDialogueStep(int32 /*entry*/) {}
+ virtual void JustDidDialogueStep(int32 /*entry*/) { }
/// Will be called to get a speaker, MUST be implemented if not used in instances
virtual Creature* GetSpeakerByEntry(int32 /*entry*/) { return NULL; }
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
index 7132ba825f1..977aa97a974 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp
@@ -165,7 +165,7 @@ public:
struct npc_amanitar_mushroomsAI : public ScriptedAI
{
- npc_amanitar_mushroomsAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_amanitar_mushroomsAI(Creature* creature) : ScriptedAI(creature) { }
EventMap events;
@@ -189,8 +189,8 @@ public:
DoCast(me, SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS, true);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*victim*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*victim*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
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 c549de9dda1..a670e14338e 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_elder_nadox.cpp
@@ -235,12 +235,12 @@ public:
creature->UpdateAllStats();
}
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*victim*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*victim*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
@@ -291,7 +291,7 @@ public:
class achievement_respect_your_elders : public AchievementCriteriaScript
{
public:
- achievement_respect_your_elders() : AchievementCriteriaScript("achievement_respect_your_elders") {}
+ achievement_respect_your_elders() : AchievementCriteriaScript("achievement_respect_your_elders") { }
bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
{
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 78513fec486..a68a122bc31 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp
@@ -541,10 +541,10 @@ public:
bool bCasted;
bool bCasted2;
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*victim*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*victim*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 /*diff*/) OVERRIDE
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 c5e40052a9d..143ccc29e0d 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
@@ -206,7 +206,7 @@ public:
struct npc_skittering_infectorAI : public ScriptedAI
{
- npc_skittering_infectorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_skittering_infectorAI(Creature* creature) : ScriptedAI(creature) { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -228,7 +228,7 @@ public:
struct npc_anub_ar_skirmisherAI : public ScriptedAI
{
- npc_anub_ar_skirmisherAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_anub_ar_skirmisherAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiChargeTimer;
uint32 uiBackstabTimer;
@@ -279,7 +279,7 @@ public:
struct npc_anub_ar_shadowcasterAI : public ScriptedAI
{
- npc_anub_ar_shadowcasterAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_anub_ar_shadowcasterAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiShadowBoltTimer;
uint32 uiShadowNovaTimer;
@@ -325,7 +325,7 @@ public:
struct npc_anub_ar_warriorAI : public ScriptedAI
{
- npc_anub_ar_warriorAI(Creature* creature) : ScriptedAI(creature){}
+ npc_anub_ar_warriorAI(Creature* creature) : ScriptedAI(creature){ }
uint32 uiCleaveTimer;
uint32 uiStrikeTimer;
@@ -370,7 +370,7 @@ public:
struct npc_watcher_gashraAI : public ScriptedAI
{
- npc_watcher_gashraAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_watcher_gashraAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiWebWrapTimer;
uint32 uiInfectedBiteTimer;
@@ -421,7 +421,7 @@ public:
struct npc_watcher_narjilAI : public ScriptedAI
{
- npc_watcher_narjilAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_watcher_narjilAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiWebWrapTimer;
uint32 uiInfectedBiteTimer;
@@ -475,7 +475,7 @@ public:
struct npc_watcher_silthikAI : public ScriptedAI
{
- npc_watcher_silthikAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_watcher_silthikAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiWebWrapTimer;
uint32 uiInfectedBiteTimer;
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index 1c1cdbdac53..2088ef2fa2e 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -991,7 +991,7 @@ public:
struct npc_tenebronAI : public dummy_dragonAI
{
- npc_tenebronAI(Creature* creature) : dummy_dragonAI(creature) {}
+ npc_tenebronAI(Creature* creature) : dummy_dragonAI(creature) { }
uint32 m_uiShadowBreathTimer;
uint32 m_uiShadowFissureTimer;
@@ -1082,7 +1082,7 @@ public:
struct npc_shadronAI : public dummy_dragonAI
{
- npc_shadronAI(Creature* creature) : dummy_dragonAI(creature) {}
+ npc_shadronAI(Creature* creature) : dummy_dragonAI(creature) { }
uint32 m_uiShadowBreathTimer;
uint32 m_uiShadowFissureTimer;
@@ -1188,7 +1188,7 @@ public:
struct npc_vesperonAI : public dummy_dragonAI
{
- npc_vesperonAI(Creature* creature) : dummy_dragonAI(creature) {}
+ npc_vesperonAI(Creature* creature) : dummy_dragonAI(creature) { }
uint32 m_uiShadowBreathTimer;
uint32 m_uiShadowFissureTimer;
@@ -1536,8 +1536,8 @@ public:
m_uiHatchEggTimer -= uiDiff;
}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
};
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp
index f5ef0f7cab3..ace2258ac9f 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp
@@ -37,7 +37,7 @@ public:
struct instance_obsidian_sanctum_InstanceMapScript : public InstanceScript
{
- instance_obsidian_sanctum_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_obsidian_sanctum_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 m_auiEncounter[MAX_ENCOUNTER];
uint64 m_uiSartharionGUID;
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index 7561d1c4991..f968add0b5b 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -491,7 +491,7 @@ class boss_twilight_halion : public CreatureScript
}
// Never evade
- void EnterEvadeMode() OVERRIDE {}
+ void EnterEvadeMode() OVERRIDE { }
void KilledUnit(Unit* victim) OVERRIDE
{
@@ -1025,8 +1025,8 @@ class npc_meteor_strike_initial : public CreatureScript
}
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
- void EnterEvadeMode() OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
+ void EnterEvadeMode() OVERRIDE { }
private:
InstanceScript* _instance;
std::list<Creature*> _meteorList;
@@ -1166,7 +1166,7 @@ class npc_combustion_consumption : public CreatureScript
summoner->CastCustomSpell(_explosionSpell, SPELLVALUE_BASE_POINT0, damage, summoner);
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
private:
InstanceScript* _instance;
@@ -1620,7 +1620,7 @@ class spell_halion_clear_debuffs : public SpellScriptLoader
class TwilightCutterSelector
{
public:
- TwilightCutterSelector(Unit* caster, Unit* target) : _caster(caster), _channelTarget(target) {}
+ TwilightCutterSelector(Unit* caster, Unit* target) : _caster(caster), _channelTarget(target) { }
bool operator()(WorldObject* unit)
{
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 9d7a3c17b1b..f6fd1c14a9b 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -417,7 +417,7 @@ public:
struct npc_memoryAI : public ScriptedAI
{
- npc_memoryAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_memoryAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiOldWoundsTimer;
uint32 uiShadowPastTimer;
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 970c53e56ee..1922ad26060 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_black_knight.cpp
@@ -311,7 +311,7 @@ public:
struct npc_risen_ghoulAI : public ScriptedAI
{
- npc_risen_ghoulAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_risen_ghoulAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiAttackTimer;
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 78ee6ba1c6b..2a203b49764 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
@@ -41,7 +41,7 @@ public:
struct instance_trial_of_the_champion_InstanceMapScript : public InstanceScript
{
- instance_trial_of_the_champion_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_trial_of_the_champion_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 m_auiEncounter[MAX_ENCOUNTER];
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index ce0f8e4778c..4c73d1a5f55 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -757,7 +757,7 @@ class npc_toc_druid : public CreatureScript
struct npc_toc_druidAI : public boss_faction_championsAI
{
- npc_toc_druidAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+ npc_toc_druidAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) { }
void Reset() OVERRIDE
{
@@ -850,7 +850,7 @@ class npc_toc_shaman : public CreatureScript
struct npc_toc_shamanAI : public boss_faction_championsAI
{
- npc_toc_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+ npc_toc_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) { }
void Reset() OVERRIDE
{
@@ -943,7 +943,7 @@ class npc_toc_paladin : public CreatureScript
struct npc_toc_paladinAI : public boss_faction_championsAI
{
- npc_toc_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+ npc_toc_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) { }
void Reset() OVERRIDE
{
@@ -1047,7 +1047,7 @@ class npc_toc_priest : public CreatureScript
struct npc_toc_priestAI : public boss_faction_championsAI
{
- npc_toc_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) {}
+ npc_toc_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_HEALER) { }
void Reset() OVERRIDE
{
@@ -1135,7 +1135,7 @@ class npc_toc_shadow_priest : public CreatureScript
struct npc_toc_shadow_priestAI : public boss_faction_championsAI
{
- npc_toc_shadow_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+ npc_toc_shadow_priestAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) { }
void Reset() OVERRIDE
{
@@ -1230,7 +1230,7 @@ class npc_toc_warlock : public CreatureScript
struct npc_toc_warlockAI : public boss_faction_championsAI
{
- npc_toc_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+ npc_toc_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) { }
void Reset() OVERRIDE
{
@@ -1321,7 +1321,7 @@ class npc_toc_mage : public CreatureScript
struct npc_toc_mageAI : public boss_faction_championsAI
{
- npc_toc_mageAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+ npc_toc_mageAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) { }
void Reset() OVERRIDE
{
@@ -1415,7 +1415,7 @@ class npc_toc_hunter : public CreatureScript
struct npc_toc_hunterAI : public boss_faction_championsAI
{
- npc_toc_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+ npc_toc_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) { }
void Reset() OVERRIDE
{
@@ -1517,7 +1517,7 @@ class npc_toc_boomkin : public CreatureScript
struct npc_toc_boomkinAI : public boss_faction_championsAI
{
- npc_toc_boomkinAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) {}
+ npc_toc_boomkinAI(Creature* creature) : boss_faction_championsAI(creature, AI_RANGED) { }
void Reset() OVERRIDE
{
@@ -1612,7 +1612,7 @@ class npc_toc_warrior : public CreatureScript
struct npc_toc_warriorAI : public boss_faction_championsAI
{
- npc_toc_warriorAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+ npc_toc_warriorAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) { }
void Reset() OVERRIDE
{
@@ -1713,7 +1713,7 @@ class npc_toc_dk : public CreatureScript
struct npc_toc_dkAI : public boss_faction_championsAI
{
- npc_toc_dkAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+ npc_toc_dkAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) { }
void Reset() OVERRIDE
{
@@ -1809,7 +1809,7 @@ class npc_toc_rogue : public CreatureScript
struct npc_toc_rogueAI : public boss_faction_championsAI
{
- npc_toc_rogueAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+ npc_toc_rogueAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) { }
void Reset() OVERRIDE
{
@@ -1914,7 +1914,7 @@ class npc_toc_enh_shaman : public CreatureScript
struct npc_toc_enh_shamanAI : public boss_faction_championsAI
{
- npc_toc_enh_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+ npc_toc_enh_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) { }
void Reset() OVERRIDE
{
@@ -2040,7 +2040,7 @@ class npc_toc_retro_paladin : public CreatureScript
struct npc_toc_retro_paladinAI : public boss_faction_championsAI
{
- npc_toc_retro_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) {}
+ npc_toc_retro_paladinAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) { }
void Reset() OVERRIDE
{
@@ -2146,7 +2146,7 @@ class npc_toc_pet_warlock : public CreatureScript
struct npc_toc_pet_warlockAI : public boss_faction_championsAI
{
- npc_toc_pet_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) {}
+ npc_toc_pet_warlockAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) { }
void Reset() OVERRIDE
{
@@ -2198,7 +2198,7 @@ class npc_toc_pet_hunter : public CreatureScript
struct npc_toc_pet_hunterAI : public boss_faction_championsAI
{
- npc_toc_pet_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) {}
+ npc_toc_pet_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 7b0867b771c..4cea1ea5b06 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -296,7 +296,7 @@ class npc_infernal_volcano : public CreatureScript
me->DespawnOrUnsummon();
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
private:
SummonList _summons;
@@ -400,7 +400,7 @@ class npc_nether_portal : public CreatureScript
me->DespawnOrUnsummon();
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
private:
SummonList _summons;
@@ -553,7 +553,7 @@ class MistressKissTargetSelector
class spell_mistress_kiss_area : public SpellScriptLoader
{
public:
- spell_mistress_kiss_area() : SpellScriptLoader("spell_mistress_kiss_area") {}
+ spell_mistress_kiss_area() : SpellScriptLoader("spell_mistress_kiss_area") { }
class spell_mistress_kiss_area_SpellScript : public SpellScript
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index 18cc45657f0..8f6b951d524 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
@@ -830,7 +830,7 @@ class npc_slime_pool : public CreatureScript
class spell_gormok_fire_bomb : public SpellScriptLoader
{
public:
- spell_gormok_fire_bomb() : SpellScriptLoader("spell_gormok_fire_bomb") {}
+ spell_gormok_fire_bomb() : SpellScriptLoader("spell_gormok_fire_bomb") { }
class spell_gormok_fire_bomb_SpellScript : public SpellScript
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
index eb36c35d895..0674696a033 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp
@@ -462,7 +462,7 @@ class boss_eydis : public CreatureScript
struct boss_eydisAI : public boss_twin_baseAI
{
- boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature) {}
+ boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature) { }
void Reset() OVERRIDE
{
@@ -592,7 +592,7 @@ class npc_unleashed_dark : public CreatureScript
struct npc_unleashed_darkAI : public npc_unleashed_ballAI
{
- npc_unleashed_darkAI(Creature* creature) : npc_unleashed_ballAI(creature) {}
+ npc_unleashed_darkAI(Creature* creature) : npc_unleashed_ballAI(creature) { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -624,7 +624,7 @@ class npc_unleashed_light : public CreatureScript
struct npc_unleashed_lightAI : public npc_unleashed_ballAI
{
- npc_unleashed_lightAI(Creature* creature) : npc_unleashed_ballAI(creature) {}
+ npc_unleashed_lightAI(Creature* creature) : npc_unleashed_ballAI(creature) { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
index 43e696f3b3c..a72d3917004 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp
@@ -29,7 +29,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
struct instance_trial_of_the_crusader_InstanceMapScript : public InstanceScript
{
- instance_trial_of_the_crusader_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_trial_of_the_crusader_InstanceMapScript(Map* map) : InstanceScript(map) { }
void Initialize() OVERRIDE
{
@@ -366,7 +366,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
if (type < MAX_ENCOUNTERS)
{
- TC_LOG_INFO(LOG_FILTER_TSCR, "[ToCr] BossState(type %u) %u = state %u;", type, GetBossState(type), state);
+ TC_LOG_INFO("scripts", "[ToCr] BossState(type %u) %u = state %u;", type, GetBossState(type), state);
if (state == FAIL)
{
if (instance->IsHeroic())
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index fdf39519409..ff7092590e7 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -124,7 +124,7 @@ class npc_announcer_toc10 : public CreatureScript
pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
};
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
@@ -547,9 +547,9 @@ class npc_tirion_toc : public CreatureScript
_instance = me->GetInstanceScript();
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 uiDiff) OVERRIDE
{
@@ -835,9 +835,9 @@ class npc_garrosh_toc : public CreatureScript
_instance = me->GetInstanceScript();
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 uiDiff) OVERRIDE
{
@@ -919,9 +919,9 @@ class npc_varian_toc : public CreatureScript
_instance = me->GetInstanceScript();
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 uiDiff) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index 0160359f0f2..71386167d5d 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -276,11 +276,11 @@ public:
class npc_crystal_channel_target : public CreatureScript
{
public:
- npc_crystal_channel_target() : CreatureScript("npc_crystal_channel_target") {}
+ npc_crystal_channel_target() : CreatureScript("npc_crystal_channel_target") { }
struct npc_crystal_channel_targetAI : public ScriptedAI
{
- npc_crystal_channel_targetAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_crystal_channel_targetAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -339,7 +339,7 @@ public:
class achievement_oh_novos : public AchievementCriteriaScript
{
public:
- achievement_oh_novos() : AchievementCriteriaScript("achievement_oh_novos") {}
+ achievement_oh_novos() : AchievementCriteriaScript("achievement_oh_novos") { }
bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
{
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 ae57732e9e2..b1339b13119 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
@@ -43,12 +43,21 @@ class instance_forge_of_souls : public InstanceMapScript
teamInInstance = 0;
}
+ void OnPlayerEnter(Player* player) OVERRIDE
+ {
+ if (!teamInInstance)
+ teamInInstance = player->GetTeam();
+ }
+
void OnCreatureCreate(Creature* creature) OVERRIDE
{
- Map::PlayerList const &players = instance->GetPlayers();
- if (!players.isEmpty())
- if (Player* player = players.begin()->GetSource())
- teamInInstance = player->GetTeam();
+ if (!teamInInstance)
+ {
+ Map::PlayerList const& players = instance->GetPlayers();
+ if (!players.isEmpty())
+ if (Player* player = players.begin()->GetSource())
+ teamInInstance = player->GetTeam();
+ }
switch (creature->GetEntry())
{
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
index 530741ea710..e2d285f7306 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp
@@ -57,7 +57,7 @@ public:
struct boss_falricAI : public boss_horAI
{
- boss_falricAI(Creature* creature) : boss_horAI(creature) {}
+ boss_falricAI(Creature* creature) : boss_horAI(creature) { }
uint8 uiHopelessnessCount;
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
index 49fd7481dde..a87b7b6d93d 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp
@@ -56,7 +56,7 @@ public:
struct boss_marwynAI : public boss_horAI
{
- boss_marwynAI(Creature* creature) : boss_horAI(creature) {}
+ boss_marwynAI(Creature* creature) : boss_horAI(creature) { }
void Reset() OVERRIDE
{
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 04145b8784e..6b746222a72 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -1089,9 +1089,9 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
break;
case EVENT_ESCAPE_27:
if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- me->SummonGameObject(GO_CAPTAIN_CHEST_1, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
+ me->SummonGameObject(IsHeroic() ? GO_CAPTAIN_CHEST_ALLIANCE_HEROIC : GO_CAPTAIN_CHEST_ALLIANCE_NORMAL, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
else
- me->SummonGameObject(GO_CAPTAIN_CHEST_3, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
+ me->SummonGameObject(IsHeroic() ? GO_CAPTAIN_CHEST_HORDE_HEROIC : GO_CAPTAIN_CHEST_HORDE_NORMAL, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
me->SummonGameObject(GO_PORTAL, FinalPortalPos.GetPositionX(), FinalPortalPos.GetPositionY(), FinalPortalPos.GetPositionZ(), FinalPortalPos.GetOrientation(), 0, 0, 0, 0, 720000);
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
lichking->DespawnOrUnsummon(1);
@@ -1363,7 +1363,7 @@ public:
struct npc_phantom_hallucinationAI : public npc_phantom_mage::npc_phantom_mageAI
{
- npc_phantom_hallucinationAI(Creature* creature) : npc_phantom_mage::npc_phantom_mageAI(creature) {}
+ npc_phantom_hallucinationAI(Creature* creature) : npc_phantom_mage::npc_phantom_mageAI(creature) { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -1728,7 +1728,7 @@ public:
class at_hor_intro_start : public AreaTriggerScript
{
public:
- at_hor_intro_start() : AreaTriggerScript("at_hor_intro_start") {}
+ at_hor_intro_start() : AreaTriggerScript("at_hor_intro_start") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
@@ -1747,7 +1747,7 @@ public:
class at_hor_waves_restarter : public AreaTriggerScript
{
public:
- at_hor_waves_restarter() : AreaTriggerScript("at_hor_waves_restarter") {}
+ at_hor_waves_restarter() : AreaTriggerScript("at_hor_waves_restarter") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
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 d8d4f2d5524..9c40cb70141 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
@@ -95,10 +95,10 @@ enum GameObjects
GO_ORGRIM_HAMMER = 201599,
GO_PORTAL = 202079,
- GO_CAPTAIN_CHEST_1 = 202212, //3145
- GO_CAPTAIN_CHEST_2 = 201710, //30357
- GO_CAPTAIN_CHEST_3 = 202337, //3246
- GO_CAPTAIN_CHEST_4 = 202336, //3333
+ GO_CAPTAIN_CHEST_HORDE_NORMAL = 202212, //3145
+ GO_CAPTAIN_CHEST_ALLIANCE_NORMAL = 201710, //30357
+ GO_CAPTAIN_CHEST_HORDE_HEROIC = 202337, //3246
+ GO_CAPTAIN_CHEST_ALLIANCE_HEROIC = 202336, //3333
};
enum HorWorldStates
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 50600453368..0599596fc0a 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
@@ -73,7 +73,7 @@ public:
struct instance_halls_of_reflection_InstanceMapScript : public InstanceScript
{
- instance_halls_of_reflection_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_halls_of_reflection_InstanceMapScript(Map* map) : InstanceScript(map) { }
void Initialize() OVERRIDE
{
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 003b313d28c..48cc6f89a13 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
@@ -385,32 +385,25 @@ class boss_rimefang : public CreatureScript
class player_overlord_brandAI : public PlayerAI
{
public:
- player_overlord_brandAI(Player* player) : PlayerAI(player), _tyrannus(0)
- {
- }
-
- void SetGUID(uint64 guid, int32 /*type*/) OVERRIDE
- {
- _tyrannus = guid;
- }
+ player_overlord_brandAI(Player* player, uint64 casterGUID) : PlayerAI(player), _tyrannusGUID(casterGUID) { }
void DamageDealt(Unit* /*victim*/, uint32& damage, DamageEffectType /*damageType*/) OVERRIDE
{
- if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannus))
- if (tyrannus->GetVictim())
- me->CastCustomSpell(SPELL_OVERLORD_BRAND_DAMAGE, SPELLVALUE_BASE_POINT0, damage, tyrannus->GetVictim(), true, NULL, NULL, tyrannus->GetGUID());
+ if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
+ if (Unit* victim = tyrannus->GetVictim())
+ me->CastCustomSpell(SPELL_OVERLORD_BRAND_DAMAGE, SPELLVALUE_BASE_POINT0, damage, victim, true, NULL, NULL, tyrannus->GetGUID());
}
void HealDone(Unit* /*target*/, uint32& addHealth) OVERRIDE
{
- if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannus))
- me->CastCustomSpell(SPELL_OVERLORD_BRAND_HEAL, SPELLVALUE_BASE_POINT0, int32(addHealth*5.5f), tyrannus, true, NULL, NULL, tyrannus->GetGUID());
+ if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
+ me->CastCustomSpell(SPELL_OVERLORD_BRAND_HEAL, SPELLVALUE_BASE_POINT0, int32(addHealth * 5.5f), tyrannus, true, NULL, NULL, tyrannus->GetGUID());
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
private:
- uint64 _tyrannus;
+ uint64 _tyrannusGUID;
};
class spell_tyrannus_overlord_brand : public SpellScriptLoader
@@ -434,8 +427,8 @@ class spell_tyrannus_overlord_brand : public SpellScriptLoader
oldAI = GetTarget()->GetAI();
oldAIState = GetTarget()->IsAIEnabled;
- GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer()));
- GetTarget()->GetAI()->SetGUID(GetCasterGUID());
+ GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer(), GetCasterGUID()));
+ GetTarget()->IsAIEnabled = true;
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index 0097fe8c4d7..441149c6dd8 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -221,7 +221,7 @@ public:
struct npc_slad_ran_constrictorAI : public ScriptedAI
{
- npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiGripOfSladRanTimer;
@@ -272,7 +272,7 @@ public:
struct npc_slad_ran_viperAI : public ScriptedAI
{
- npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiVenomousBiteTimer;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
index bdab8f3fce6..1e5919536f3 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
@@ -636,7 +636,7 @@ class spell_blood_queen_frenzied_bloodthirst : public SpellScriptLoader
class BloodboltHitCheck
{
public:
- explicit BloodboltHitCheck(LanaThelAI* ai) : _ai(ai) {}
+ explicit BloodboltHitCheck(LanaThelAI* ai) : _ai(ai) { }
bool operator()(WorldObject* object) const
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index 0367a29bb30..027c8823af8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -633,7 +633,7 @@ class npc_cult_fanatic : public CreatureScript
struct npc_cult_fanaticAI : public ScriptedAI
{
- npc_cult_fanaticAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_cult_fanaticAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -710,7 +710,7 @@ class npc_cult_adherent : public CreatureScript
struct npc_cult_adherentAI : public ScriptedAI
{
- npc_cult_adherentAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_cult_adherentAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 96627548848..cdcd8ed796a 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -924,7 +924,7 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
class ExactDistanceCheck
{
public:
- ExactDistanceCheck(Unit* source, float dist) : _source(source), _dist(dist) {}
+ ExactDistanceCheck(Unit* source, float dist) : _source(source), _dist(dist) { }
bool operator()(WorldObject* unit) const
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index fba64a89d83..d8a95d5c1fb 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -2422,7 +2422,7 @@ class spell_the_lich_king_raging_spirit : public SpellScriptLoader
class ExactDistanceCheck
{
public:
- ExactDistanceCheck(Unit* source, float dist) : _source(source), _dist(dist) {}
+ ExactDistanceCheck(Unit* source, float dist) : _source(source), _dist(dist) { }
bool operator()(WorldObject* unit)
{
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index e3e1bfedc44..9116222a4e0 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -288,7 +288,7 @@ enum MovementPoints
class FrostwingVrykulSearcher
{
public:
- FrostwingVrykulSearcher(Creature const* source, float range) : _source(source), _range(range) {}
+ FrostwingVrykulSearcher(Creature const* source, float range) : _source(source), _range(range) { }
bool operator()(Unit* unit)
{
@@ -1833,7 +1833,7 @@ class spell_icc_sprit_alarm : public SpellScriptLoader
class DeathPlagueTargetSelector
{
public:
- explicit DeathPlagueTargetSelector(Unit* caster) : _caster(caster) {}
+ explicit DeathPlagueTargetSelector(Unit* caster) : _caster(caster) { }
bool operator()(WorldObject* object) const
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
index 928ffd14dea..b873b3ee15c 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
@@ -64,7 +64,7 @@ public:
struct boss_anubrekhanAI : public BossAI
{
- boss_anubrekhanAI(Creature* creature) : BossAI(creature, BOSS_ANUBREKHAN) {}
+ boss_anubrekhanAI(Creature* creature) : BossAI(creature, BOSS_ANUBREKHAN) { }
bool hasTaunted;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index 90f14bf43e4..68387279c1d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -145,7 +145,7 @@ float const PosPlatform[4] = {2640.5f, -3360.6f, 285.26f, 0.0f};
// Predicate function to check that the r efzr unit is NOT on the same side as the source.
struct NotOnSameSide : public std::unary_function<Unit*, bool>
{
- NotOnSameSide(Unit* source) : _onLiveSide(IN_LIVE_SIDE(source)) {}
+ NotOnSameSide(Unit* source) : _onLiveSide(IN_LIVE_SIDE(source)) { }
bool operator() (Unit const* target)
{
@@ -163,7 +163,7 @@ class boss_gothik : public CreatureScript
struct boss_gothikAI : public BossAI
{
- boss_gothikAI(Creature* creature) : BossAI(creature, BOSS_GOTHIK) {}
+ boss_gothikAI(Creature* creature) : BossAI(creature, BOSS_GOTHIK) { }
uint32 waveCount;
typedef std::vector<Creature*> TriggerVct;
@@ -200,7 +200,7 @@ class boss_gothik : public CreatureScript
if (LiveTriggerGUID.size() < POS_LIVE || DeadTriggerGUID.size() < POS_DEAD)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Script Gothik: cannot summon triggers!");
+ TC_LOG_ERROR("scripts", "Script Gothik: cannot summon triggers!");
EnterEvadeMode();
return;
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index 14a7a03bd70..a8e2783602f 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -66,7 +66,7 @@ public:
struct boss_heiganAI : public BossAI
{
- boss_heiganAI(Creature* creature) : BossAI(creature, BOSS_HEIGAN) {}
+ boss_heiganAI(Creature* creature) : BossAI(creature, BOSS_HEIGAN) { }
uint32 eruptSection;
bool eruptDirection;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index a77b21a900b..f9efdfce28b 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -248,7 +248,7 @@ const Position PosWeavers[MAX_WEAVERS] =
// predicate function to select not charmed target
struct NotCharmedTargetSelector : public std::unary_function<Unit*, bool>
{
- NotCharmedTargetSelector() {}
+ NotCharmedTargetSelector() { }
bool operator()(Unit const* target) const
{
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
index 468739894f6..588d58c1436 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp
@@ -70,7 +70,7 @@ public:
struct boss_maexxnaAI : public BossAI
{
- boss_maexxnaAI(Creature* creature) : BossAI(creature, BOSS_MAEXXNA) {}
+ boss_maexxnaAI(Creature* creature) : BossAI(creature, BOSS_MAEXXNA) { }
bool enraged;
@@ -161,7 +161,7 @@ public:
struct npc_webwrapAI : public NullCreatureAI
{
- npc_webwrapAI(Creature* creature) : NullCreatureAI(creature), victimGUID(0) {}
+ npc_webwrapAI(Creature* creature) : NullCreatureAI(creature), victimGUID(0) { }
uint64 victimGUID;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
index e01417574bb..d90db5e077e 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp
@@ -80,7 +80,7 @@ public:
struct boss_nothAI : public BossAI
{
- boss_nothAI(Creature* creature) : BossAI(creature, BOSS_NOTH) {}
+ boss_nothAI(Creature* creature) : BossAI(creature, BOSS_NOTH) { }
uint32 waveCount, balconyCount;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
index bf3e7706f4d..96f2d743cac 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
@@ -62,7 +62,7 @@ public:
struct boss_patchwerkAI : public BossAI
{
- boss_patchwerkAI(Creature* creature) : BossAI(creature, BOSS_PATCHWERK) {}
+ boss_patchwerkAI(Creature* creature) : BossAI(creature, BOSS_PATCHWERK) { }
bool Enraged;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
index 5505b83d411..3ac20df24d6 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_razuvious.cpp
@@ -68,7 +68,7 @@ public:
struct boss_razuviousAI : public BossAI
{
- boss_razuviousAI(Creature* creature) : BossAI(creature, BOSS_RAZUVIOUS) {}
+ boss_razuviousAI(Creature* creature) : BossAI(creature, BOSS_RAZUVIOUS) { }
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp
index 175816e3ae7..a864d679b89 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp
@@ -54,12 +54,12 @@ public:
struct boss_commander_kolurgAI : public ScriptedAI
{
- boss_commander_kolurgAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_commander_kolurgAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
@@ -69,7 +69,7 @@ public:
DoMeleeAttackIfReady();
}
- void JustDied(Unit* /*killer*/) OVERRIDE {}
+ void JustDied(Unit* /*killer*/) OVERRIDE { }
};
};
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp
index 2f73c85a9cd..3a74d3408c3 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp
@@ -48,11 +48,11 @@ public:
struct boss_commander_stoutbeardAI : public ScriptedAI
{
- boss_commander_stoutbeardAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_commander_stoutbeardAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 /*diff*/) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index f26e70d6838..423937303b5 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -49,7 +49,7 @@ enum Events
class OrmorokTanglerPredicate
{
public:
- OrmorokTanglerPredicate(Unit* unit) : me(unit) {}
+ OrmorokTanglerPredicate(Unit* unit) : me(unit) { }
bool operator() (WorldObject* object) const
{
@@ -67,7 +67,7 @@ public:
struct boss_ormorokAI : public BossAI
{
- boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT) {}
+ boss_ormorokAI(Creature* creature) : BossAI(creature, DATA_ORMOROK_EVENT) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
@@ -188,7 +188,7 @@ public:
struct npc_crystal_spike_triggerAI : public ScriptedAI
{
- npc_crystal_spike_triggerAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_crystal_spike_triggerAI(Creature* creature) : ScriptedAI(creature) { }
void IsSummonedBy(Unit* owner) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
index 4df7109c16c..109106d4d59 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
@@ -40,7 +40,7 @@ public:
struct instance_nexus_InstanceMapScript : public InstanceScript
{
- instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint32 m_auiEncounter[NUMBER_OF_ENCOUNTERS];
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
index 59652a7d4a1..d22a0bcc79f 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_drakos.cpp
@@ -52,141 +52,141 @@ enum DrakosEvents
class boss_drakos : public CreatureScript
{
-public:
- boss_drakos() : CreatureScript("boss_drakos") { }
+ public:
+ boss_drakos() : CreatureScript("boss_drakos") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_drakosAI(creature);
- }
-
- struct boss_drakosAI : public BossAI
- {
- boss_drakosAI(Creature* creature) : BossAI(creature, DATA_DRAKOS_EVENT) {}
-
- void Reset() OVERRIDE
+ struct boss_drakosAI : public BossAI
{
- _Reset();
+ boss_drakosAI(Creature* creature) : BossAI(creature, DATA_DRAKOS) { }
- events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
- events.ScheduleEvent(EVENT_STOMP, 17000);
- events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
+ void Reset() OVERRIDE
+ {
+ _Reset();
- postPull = false;
- }
+ events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
+ events.ScheduleEvent(EVENT_STOMP, 17000);
+ events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
- void EnterCombat(Unit* /*who*/) OVERRIDE
- {
- _EnterCombat();
- Talk(SAY_AGGRO);
- }
+ postPull = false;
+ }
- void UpdateAI(uint32 diff) OVERRIDE
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ Talk(SAY_AGGRO);
+ }
- events.Update(diff);
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ events.Update(diff);
- while (uint32 eventId = events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_BOMB_SUMMON:
- {
- Position pPosition;
- me->GetPosition(&pPosition);
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- for (uint8 i = 0; i <= (postPull ? 3 : 0); i++)
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_BOMB_SUMMON:
{
- me->GetRandomNearPosition(pPosition, float(urand(0, 10)));
- me->SummonCreature(NPC_UNSTABLE_SPHERE, pPosition);
+ Position position;
+ me->GetPosition(&position);
+
+ for (uint8 i = 0; i <= (postPull ? 3 : 0); i++)
+ {
+ me->GetRandomNearPosition(position, frand(0.0f, 10.0f));
+ me->SummonCreature(NPC_UNSTABLE_SPHERE, position);
+ }
}
- }
- events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
- break;
- case EVENT_MAGIC_PULL:
- DoCast(SPELL_MAGIC_PULL);
- postPull = true;
- events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
- break;
- case EVENT_STOMP:
- Talk(SAY_STOMP);
- DoCast(SPELL_THUNDERING_STOMP);
- events.ScheduleEvent(EVENT_STOMP, 17000);
- break;
+ events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
+ break;
+ case EVENT_MAGIC_PULL:
+ DoCast(SPELL_MAGIC_PULL);
+ postPull = true;
+ events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
+ break;
+ case EVENT_STOMP:
+ Talk(SAY_STOMP);
+ DoCast(SPELL_THUNDERING_STOMP);
+ events.ScheduleEvent(EVENT_STOMP, 17000);
+ break;
+ default:
+ break;
+ }
}
+
+ DoMeleeAttackIfReady();
}
- DoMeleeAttackIfReady();
- }
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
- void JustDied(Unit* /*killer*/) OVERRIDE
- {
- _JustDied();
+ Talk(SAY_DEATH);
- Talk(SAY_DEATH);
+ // start achievement timer (kill Eregos within 20 min)
+ instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
+ }
- // start achievement timer (kill Eregos within 20 min)
- instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
- }
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
+ {
+ Talk(SAY_KILL);
+ }
+
+ private:
+ bool postPull;
+ };
- void KilledUnit(Unit* /*victim*/) OVERRIDE
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- Talk(SAY_KILL);
+ return GetOculusAI<boss_drakosAI>(creature);
}
- private:
- bool postPull;
- };
};
class npc_unstable_sphere : public CreatureScript
{
-public:
- npc_unstable_sphere() : CreatureScript("npc_unstable_sphere") { }
+ public:
+ npc_unstable_sphere() : CreatureScript("npc_unstable_sphere") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_unstable_sphereAI(creature);
- }
+ struct npc_unstable_sphereAI : public ScriptedAI
+ {
+ npc_unstable_sphereAI(Creature* creature) : ScriptedAI(creature) { }
- struct npc_unstable_sphereAI : public ScriptedAI
- {
- npc_unstable_sphereAI(Creature* creature) : ScriptedAI(creature) {}
+ void Reset() OVERRIDE
+ {
+ me->SetReactState(REACT_PASSIVE);
+ me->GetMotionMaster()->MoveRandom(40.0f);
- void Reset() OVERRIDE
- {
- me->SetReactState(REACT_PASSIVE);
- me->GetMotionMaster()->MoveRandom(40.0f);
+ me->AddAura(SPELL_UNSTABLE_SPHERE_PASSIVE, me);
+ me->AddAura(SPELL_UNSTABLE_SPHERE_TIMER, me);
- me->AddAura(SPELL_UNSTABLE_SPHERE_PASSIVE, me);
- me->AddAura(SPELL_UNSTABLE_SPHERE_TIMER, me);
+ pulseTimer = 3000;
- pulseTimer = 3000;
- deathTimer = 19000;
- }
+ me->DespawnOrUnsummon(19000);
+ }
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (pulseTimer <= diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
- DoCast(SPELL_UNSTABLE_SPHERE_PULSE);
- pulseTimer = 3*IN_MILLISECONDS;
- } else pulseTimer -= diff;
+ if (pulseTimer <= diff)
+ {
+ DoCast(SPELL_UNSTABLE_SPHERE_PULSE);
+ pulseTimer = 3 * IN_MILLISECONDS;
+ }
+ else
+ pulseTimer -= diff;
+ }
- if (deathTimer <= diff)
- me->DisappearAndDie();
- else deathTimer -= diff;
- }
- private:
- uint32 pulseTimer;
- uint32 deathTimer;
- };
+ private:
+ uint32 pulseTimer;
+ };
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_unstable_sphereAI(creature);
+ }
};
void AddSC_boss_drakos()
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
index abf0d6537c3..ca6f580633c 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp
@@ -21,8 +21,8 @@
#include "SpellAuraEffects.h"
#include "oculus.h"
-//Types of drake mounts: Ruby(Tank), Amber(DPS), Emerald(Healer)
-//Two Repeating phases
+// Types of drake mounts: Ruby (Tank), Amber (DPS), Emerald (Healer)
+// Two Repeating phases
enum Events
{
@@ -61,8 +61,8 @@ enum Npcs
enum Phases
{
- PHASE_NORMAL = 1,
- PHASE_FIRST_PLANAR = 2,
+ PHASE_NORMAL = 1,
+ PHASE_FIRST_PLANAR = 2,
PHASE_SECOND_PLANAR = 3
};
@@ -80,172 +80,174 @@ enum EregosData
class boss_eregos : public CreatureScript
{
-public:
- boss_eregos() : CreatureScript("boss_eregos") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_eregosAI(creature);
- }
-
- struct boss_eregosAI : public BossAI
- {
- boss_eregosAI(Creature* creature) : BossAI(creature, DATA_EREGOS_EVENT) { }
+ public:
+ boss_eregos() : CreatureScript("boss_eregos") { }
- void Reset() OVERRIDE
+ struct boss_eregosAI : public BossAI
{
- _Reset();
- _phase = PHASE_NORMAL;
-
- _rubyVoid = true;
- _emeraldVoid = true;
- _amberVoid = true;
+ boss_eregosAI(Creature* creature) : BossAI(creature, DATA_EREGOS) { }
- DoAction(ACTION_SET_NORMAL_EVENTS);
- }
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ _phase = PHASE_NORMAL;
- void KilledUnit(Unit* /*victim*/) OVERRIDE
- {
- Talk(SAY_KILL);
- }
+ _rubyVoid = true;
+ _emeraldVoid = true;
+ _amberVoid = true;
- void EnterCombat(Unit* /*who*/) OVERRIDE
- {
- _EnterCombat();
-
- Talk(SAY_AGGRO);
- /* Checks for present drakes vehicles from each type and deactivate achievement that corresponds to each found
- The checks are so big in case some party try weird things like pulling boss down or hiding out of check range, the only thing player need is to get the boss kill credit after the check /even if he or his drake die/
- Drakes mechanic would despawn all after unmount and also drakes should be auto mounted after item use, item use after Eregos is engaged leads to his despawn - based on retail data. */
- if (me->FindNearestCreature(NPC_RUBY_DRAKE_VEHICLE, 500.0f, true))
- _rubyVoid = false;
- if (me->FindNearestCreature(NPC_EMERALD_DRAKE_VEHICLE, 500.0f, true))
- _emeraldVoid = false;
- if (me->FindNearestCreature(NPC_AMBER_DRAKE_VEHICLE, 500.0f, true))
- _amberVoid = false;
- }
+ DoAction(ACTION_SET_NORMAL_EVENTS);
+ }
- uint32 GetData(uint32 type) const OVERRIDE
- {
- switch (type)
- {
- case DATA_RUBY_VOID:
- return _rubyVoid;
- case DATA_EMERALD_VOID:
- return _emeraldVoid;
- case DATA_AMBER_VOID:
- return _amberVoid;
- default:
- break;
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
+ {
+ Talk(SAY_KILL);
}
- return 0;
- }
- void DoAction(int32 action) OVERRIDE
- {
- if (action != ACTION_SET_NORMAL_EVENTS)
- return;
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+
+ Talk(SAY_AGGRO);
+ /* Checks for present drakes vehicles from each type and deactivate achievement that corresponds to each found
+ The checks are so big in case some party try weird things like pulling boss down or hiding out of check range, the only thing player need is to get the boss kill credit after the check /even if he or his drake die/
+ Drakes mechanic would despawn all after unmount and also drakes should be auto mounted after item use, item use after Eregos is engaged leads to his despawn - based on retail data. */
+ if (me->FindNearestCreature(NPC_RUBY_DRAKE_VEHICLE, 500.0f, true))
+ _rubyVoid = false;
+ if (me->FindNearestCreature(NPC_EMERALD_DRAKE_VEHICLE, 500.0f, true))
+ _emeraldVoid = false;
+ if (me->FindNearestCreature(NPC_AMBER_DRAKE_VEHICLE, 500.0f, true))
+ _amberVoid = false;
+ }
- events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- }
+ uint32 GetData(uint32 type) const OVERRIDE
+ {
+ switch (type)
+ {
+ case DATA_RUBY_VOID:
+ return _rubyVoid;
+ case DATA_EMERALD_VOID:
+ return _emeraldVoid;
+ case DATA_AMBER_VOID:
+ return _amberVoid;
+ default:
+ break;
+ }
+ return 0;
+ }
- void JustSummoned(Creature* summon) OVERRIDE
- {
- BossAI::JustSummoned(summon);
+ void DoAction(int32 action) OVERRIDE
+ {
+ if (action != ACTION_SET_NORMAL_EVENTS)
+ return;
+
+ events.SetPhase(PHASE_NORMAL);
+ events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ }
- if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
- return;
+ void JustSummoned(Creature* summon) OVERRIDE
+ {
+ BossAI::JustSummoned(summon);
- summon->CombatStop(true);
- summon->SetReactState(REACT_PASSIVE);
- summon->GetMotionMaster()->MoveRandom(100.0f);
- }
+ if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
+ return;
- void SummonedCreatureDespawn(Creature* summon) OVERRIDE
- {
- if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
- return;
+ summon->CombatStop(true);
+ summon->SetReactState(REACT_PASSIVE);
+ summon->GetMotionMaster()->MoveRandom(100.0f);
+ }
- // TO-DO: See why the spell is not casted
- summon->CastSpell(summon, SPELL_PLANAR_BLAST, true);
- }
+ void SummonedCreatureDespawn(Creature* summon) OVERRIDE
+ {
+ if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
+ return;
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
- {
- if (!me->GetMap()->IsHeroic())
- return;
+ /// @todo: See why the spell is not casted
+ summon->CastSpell(summon, SPELL_PLANAR_BLAST, true);
+ }
- if ( (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f && _phase < PHASE_FIRST_PLANAR)
- || (me->GetHealthPct() < 20.0f && _phase < PHASE_SECOND_PLANAR) )
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
{
- events.Reset();
- _phase = (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f) ? PHASE_FIRST_PLANAR : PHASE_SECOND_PLANAR;
+ if (!IsHeroic())
+ return;
- Talk(SAY_SHIELD);
- DoCast(SPELL_PLANAR_SHIFT);
+ if ( (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f && _phase < PHASE_FIRST_PLANAR)
+ || (me->GetHealthPct() < 20.0f && _phase < PHASE_SECOND_PLANAR) )
+ {
+ events.Reset();
+ _phase = (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f) ? PHASE_FIRST_PLANAR : PHASE_SECOND_PLANAR;
- // not sure about the amount, and if we should despawn previous spawns (dragon trashs)
- summons.DespawnAll();
- for (uint8 i = 0; i < 6; i++)
- DoCast(SPELL_PLANAR_ANOMALIES);
+ Talk(SAY_SHIELD);
+ DoCast(SPELL_PLANAR_SHIFT);
+
+ // not sure about the amount, and if we should despawn previous spawns (dragon trashs)
+ summons.DespawnAll();
+ for (uint8 i = 0; i < 6; i++)
+ DoCast(SPELL_PLANAR_ANOMALIES);
+ }
}
- }
- void UpdateAI(uint32 diff) OVERRIDE
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
- events.Update(diff);
+ events.Update(diff);
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
- while (uint32 eventId = events.ExecuteEvent())
- {
- switch (eventId)
+ while (uint32 eventId = events.ExecuteEvent())
{
- case EVENT_ARCANE_BARRAGE:
- DoCastVictim(SPELL_ARCANE_BARRAGE);
- events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- break;
- case EVENT_ARCANE_VOLLEY:
- DoCastAOE(SPELL_ARCANE_VOLLEY);
- events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- break;
- case EVENT_ENRAGED_ASSAULT:
- Talk(SAY_ENRAGE);
- DoCast(SPELL_ENRAGED_ASSAULT);
- events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- break;
- case EVENT_SUMMON_LEY_WHELP:
- for (uint8 i = 0; i < 3; i++)
- DoCast(SPELL_SUMMON_LEY_WHELP);
- events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
- break;
+ switch (eventId)
+ {
+ case EVENT_ARCANE_BARRAGE:
+ DoCastVictim(SPELL_ARCANE_BARRAGE);
+ events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ break;
+ case EVENT_ARCANE_VOLLEY:
+ DoCastAOE(SPELL_ARCANE_VOLLEY);
+ events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ break;
+ case EVENT_ENRAGED_ASSAULT:
+ Talk(SAY_ENRAGE);
+ DoCast(SPELL_ENRAGED_ASSAULT);
+ events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ break;
+ case EVENT_SUMMON_LEY_WHELP:
+ for (uint8 i = 0; i < 3; i++)
+ DoCast(SPELL_SUMMON_LEY_WHELP);
+ events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
+ break;
+ default:
+ break;
+ }
}
+
+ DoMeleeAttackIfReady();
}
- DoMeleeAttackIfReady();
- }
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ Talk(SAY_DEATH);
- void JustDied(Unit* /*killer*/) OVERRIDE
- {
- Talk(SAY_DEATH);
+ _JustDied();
+ }
- _JustDied();
- }
+ private:
+ uint8 _phase;
+ bool _rubyVoid;
+ bool _emeraldVoid;
+ bool _amberVoid;
+ };
- private:
- uint8 _phase;
- bool _rubyVoid;
- bool _emeraldVoid;
- bool _amberVoid;
- };
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_eregosAI(creature);
+ }
};
class spell_eregos_planar_shift : public SpellScriptLoader
@@ -259,9 +261,8 @@ class spell_eregos_planar_shift : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (Unit* caster = GetCaster())
- if (Creature* creatureCaster = caster->ToCreature())
- creatureCaster->AI()->DoAction(ACTION_SET_NORMAL_EVENTS);
+ if (Creature* creature = GetTarget()->ToCreature())
+ creature->AI()->DoAction(ACTION_SET_NORMAL_EVENTS);
}
void Register() OVERRIDE
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
index 436a978d15e..f7c558879d1 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp
@@ -29,7 +29,6 @@ EndScriptData */
enum Spells
{
-
SPELL_ARCANE_SHIELD = 53813, //Dummy --> Channeled, shields the caster from damage.
SPELL_EMPOWERED_ARCANE_EXPLOSION = 51110,
SPELL_EMPOWERED_ARCANE_EXPLOSION_2 = 59377,
@@ -89,274 +88,242 @@ static uint32 TeleportSpells[]=
class boss_urom : public CreatureScript
{
-public:
- boss_urom() : CreatureScript("boss_urom") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_uromAI(creature);
- }
-
- struct boss_uromAI : public BossAI
- {
- boss_uromAI(Creature* creature) : BossAI(creature, DATA_UROM_EVENT) {}
+ public:
+ boss_urom() : CreatureScript("boss_urom") { }
- void Reset() OVERRIDE
+ struct boss_uromAI : public BossAI
{
- me->CastSpell(me, SPELL_EVOCATE);
-
- _Reset();
-
- if (instance->GetData(DATA_UROM_PLATAFORM) == 0)
+ boss_uromAI(Creature* creature) : BossAI(creature, DATA_UROM)
{
- for (uint8 i = 0; i < 3; i++)
- group[i] = 0;
- }
+ platform = 0;
- x = 0.0f;
- y = 0.0f;
- canCast = false;
- canGoBack = false;
+ for (uint8 i = 0; i < 3; ++i)
+ group[i] = i;
- me->GetMotionMaster()->MoveIdle();
-
- teleportTimer = urand(30000, 35000);
- arcaneExplosionTimer = 9000;
- castArcaneExplosionTimer = 2000;
- frostBombTimer = urand(5000, 8000);
- timeBombTimer = urand(20000, 25000);
- }
+ std::random_shuffle(group, group + 3);
+ }
- void EnterCombat(Unit* /*who*/) OVERRIDE
- {
- _EnterCombat();
+ void Reset() OVERRIDE
+ {
+ me->CastSpell(me, SPELL_EVOCATE);
- SetGroups();
- SummonGroups();
- CastTeleport();
+ _Reset();
- if (instance->GetData(DATA_UROM_PLATAFORM) != 3)
- instance->SetData(DATA_UROM_PLATAFORM, instance->GetData(DATA_UROM_PLATAFORM)+1);
- }
+ x = 0.0f;
+ y = 0.0f;
+ canCast = false;
+ canGoBack = false;
- void AttackStart(Unit* who) OVERRIDE
- {
- if (!who)
- return;
+ me->GetMotionMaster()->MoveIdle();
- if (me->GetPositionZ() > 518.63f)
- DoStartNoMovement(who);
+ teleportTimer = urand(30000, 35000);
+ arcaneExplosionTimer = 9000;
+ castArcaneExplosionTimer = 2000;
+ frostBombTimer = urand(5000, 8000);
+ timeBombTimer = urand(20000, 25000);
+ }
- if (me->GetPositionZ() < 518.63f)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
- if (me->Attack(who, true))
- {
- Talk(SAY_AGGRO);
-
- me->SetInCombatWith(who);
- who->SetInCombatWith(me);
+ _EnterCombat();
- me->GetMotionMaster()->MoveChase(who, 0, 0);
- }
+ StartAttack();
}
- }
-
- void SetGroups()
- {
- if (!instance || instance->GetData(DATA_UROM_PLATAFORM) != 0)
- return;
- while (group[0] == group[1] || group[0] == group[2] || group[1] == group[2])
+ void AttackStart(Unit* who) OVERRIDE
{
- for (uint8 i = 0; i < 3; i++)
- group[i] = urand(0, 2);
- }
- }
+ if (!who)
+ return;
- void SetPosition(uint8 i)
- {
- switch (i)
- {
- case 0:
- x = me->GetPositionX() + 4;
- y = me->GetPositionY() - 4;
- break;
- case 1:
- x = me->GetPositionX() + 4;
- y = me->GetPositionY() + 4;
- break;
- case 2:
- x = me->GetPositionX() - 4;
- y = me->GetPositionY() + 4;
- break;
- case 3:
- x = me->GetPositionX() - 4;
- y = me->GetPositionY() - 4;
- break;
- default:
- break;
+ if (me->GetPositionZ() > 518.63f)
+ DoStartNoMovement(who);
+ else
+ BossAI::AttackStart(who);
}
- }
- void SummonGroups()
- {
- if (!instance || instance->GetData(DATA_UROM_PLATAFORM) > 2)
- return;
-
- for (uint8 i = 0; i < 4; i++)
+ void SetPosition(uint8 i)
{
- SetPosition(i);
- me->SummonCreature(Group[group[instance->GetData(DATA_UROM_PLATAFORM)]].entry[i], x, y, me->GetPositionZ(), me->GetOrientation());
-
- // teleport to next platform and spawn adds
- switch (instance->GetData(DATA_UROM_PLATAFORM))
+ switch (i)
{
+ case 0:
+ x = me->GetPositionX() + 4;
+ y = me->GetPositionY() - 4;
+ break;
case 1:
- Talk(SAY_SUMMON_1);
+ x = me->GetPositionX() + 4;
+ y = me->GetPositionY() + 4;
break;
case 2:
- Talk(SAY_SUMMON_2);
+ x = me->GetPositionX() - 4;
+ y = me->GetPositionY() + 4;
break;
case 3:
- Talk(SAY_SUMMON_3);
+ x = me->GetPositionX() - 4;
+ y = me->GetPositionY() - 4;
break;
default:
break;
}
}
- }
- void CastTeleport()
- {
- if (!instance || instance->GetData(DATA_UROM_PLATAFORM) > 2)
- return;
-
- Talk(instance->GetData(DATA_UROM_PLATAFORM) < 5 ? instance->GetData(DATA_UROM_PLATAFORM) : 0);
- DoCast(TeleportSpells[instance->GetData(DATA_UROM_PLATAFORM)]);
- }
-
- void KilledUnit(Unit* /*victim*/) OVERRIDE
- {
- Talk(SAY_PLAYER_KILL);
- }
-
- void UpdateAI(uint32 uiDiff) OVERRIDE
- {
- if (!UpdateVictim())
- return;
+ void StartAttack()
+ {
+ if (platform > 2)
+ {
+ Talk(SAY_AGGRO);
+ return;
+ }
- if (!instance || instance->GetData(DATA_UROM_PLATAFORM) < 2)
- return;
+ // summon guards and jump to next platform
+ for (uint8 i = 0; i < 4; ++i)
+ {
+ SetPosition(i);
+ me->SummonCreature(Group[group[platform]].entry[i], x, y, me->GetPositionZ(), me->GetOrientation());
+ }
- if (teleportTimer <= uiDiff)
- {
- me->InterruptNonMeleeSpells(false);
- me->GetMotionMaster()->MoveIdle();
- DoCast(SPELL_TELEPORT);
- teleportTimer = urand(30000, 35000);
+ Talk(platform);
+ DoCast(TeleportSpells[platform]);
- } else teleportTimer -= uiDiff;
+ ++platform;
+ }
- if (canCast && !me->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION))
+ void KilledUnit(Unit* who) OVERRIDE
{
- if (castArcaneExplosionTimer <= uiDiff)
- {
- canCast = false;
- canGoBack = true;
- DoCastAOE(SPELL_EMPOWERED_ARCANE_EXPLOSION);
- castArcaneExplosionTimer = 2000;
- }else castArcaneExplosionTimer -= uiDiff;
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_PLAYER_KILL);
}
- if (canGoBack)
+ void UpdateAI(uint32 diff) OVERRIDE
{
- if (arcaneExplosionTimer <= uiDiff)
- {
- Position pPos;
- me->GetVictim()->GetPosition(&pPos);
+ if (!UpdateVictim())
+ return;
- me->NearTeleportTo(pPos.GetPositionX(), pPos.GetPositionY(), pPos.GetPositionZ(), pPos.GetOrientation());
- me->GetMotionMaster()->MoveChase(me->GetVictim(), 0, 0);
- me->SetWalk(true);
+ if (platform < 3)
+ return;
- Talk(EMOTE_ARCANE_EXPLOSION);
- Talk(SAY_ARCANE_EXPLOSION);
+ events.Update(diff);
- canCast = false;
- canGoBack = false;
- arcaneExplosionTimer = 9000;
- } else arcaneExplosionTimer -= uiDiff;
- }
+ if (teleportTimer <= diff)
+ {
+ me->InterruptNonMeleeSpells(false);
+ me->GetMotionMaster()->MoveIdle();
+ DoCast(SPELL_TELEPORT);
+ teleportTimer = urand(30000, 35000);
+ }
+ else
+ teleportTimer -= diff;
- if (!me->IsNonMeleeSpellCasted(false, true, true))
- {
- if (frostBombTimer <= uiDiff)
+ if (canCast && !me->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION))
{
- DoCastVictim(SPELL_FROSTBOMB);
- frostBombTimer = urand(5000, 8000);
- } else frostBombTimer -= uiDiff;
+ if (castArcaneExplosionTimer <= diff)
+ {
+ canCast = false;
+ canGoBack = true;
+ DoCastAOE(SPELL_EMPOWERED_ARCANE_EXPLOSION);
+ castArcaneExplosionTimer = 2000;
+ }
+ else
+ castArcaneExplosionTimer -= diff;
+ }
- if (timeBombTimer <= uiDiff)
+ if (canGoBack)
{
- if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM))
- DoCast(unit, SPELL_TIME_BOMB);
+ if (arcaneExplosionTimer <= diff)
+ {
+ Position pos;
+ me->GetVictim()->GetPosition(&pos);
+
+ me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
+ me->GetMotionMaster()->MoveChase(me->GetVictim());
+ me->SetWalk(true);
+
+ Talk(EMOTE_ARCANE_EXPLOSION);
+ Talk(SAY_ARCANE_EXPLOSION);
+
+ canCast = false;
+ canGoBack = false;
+ arcaneExplosionTimer = 9000;
+ }
+ else
+ arcaneExplosionTimer -= diff;
+ }
- timeBombTimer = urand(20000, 25000);
- } else timeBombTimer -= uiDiff;
- }
+ if (!me->IsNonMeleeSpellCasted(false, true, true))
+ {
+ if (frostBombTimer <= diff)
+ {
+ DoCastVictim(SPELL_FROSTBOMB);
+ frostBombTimer = urand(5000, 8000);
+ }
+ else
+ frostBombTimer -= diff;
+
+ if (timeBombTimer <= diff)
+ {
+ if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM))
+ DoCast(unit, SPELL_TIME_BOMB);
+
+ timeBombTimer = urand(20000, 25000);
+ }
+ else
+ timeBombTimer -= diff;
+ }
- DoMeleeAttackIfReady();
- }
+ DoMeleeAttackIfReady();
+ }
- void JustDied(Unit* /*killer*/) OVERRIDE
- {
- _JustDied();
- Talk(SAY_DEATH);
- DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
- }
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
+ }
- void LeaveCombat()
- {
- me->RemoveAllAuras();
- me->CombatStop(false);
- me->DeleteThreatList();
- }
+ void LeaveCombat()
+ {
+ me->RemoveAllAuras();
+ me->CombatStop(false);
+ me->DeleteThreatList();
+ }
- void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) OVERRIDE
- {
- switch (pSpell->Id)
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) OVERRIDE
{
- case SPELL_SUMMON_MENAGERIE:
- me->SetHomePosition(968.66f, 1042.53f, 527.32f, 0.077f);
- LeaveCombat();
- me->CastSpell(me, SPELL_EVOCATE);
- break;
- case SPELL_SUMMON_MENAGERIE_2:
- me->SetHomePosition(1164.02f, 1170.85f, 527.321f, 3.66f);
- LeaveCombat();
- me->CastSpell(me, SPELL_EVOCATE);
- break;
- case SPELL_SUMMON_MENAGERIE_3:
- me->SetHomePosition(1118.31f, 1080.377f, 508.361f, 4.25f);
- LeaveCombat();
- me->CastSpell(me, SPELL_EVOCATE);
- break;
- case SPELL_TELEPORT:
- //! Unconfirmed, previous below
- me->SetDisableGravity(true);
- //me->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY); // with out it the npc will fall down while is casting
- canCast = true;
- break;
- default:
- break;
+ switch (spellInfo->Id)
+ {
+ case SPELL_SUMMON_MENAGERIE:
+ me->SetHomePosition(968.66f, 1042.53f, 527.32f, 0.077f);
+ LeaveCombat();
+ me->CastSpell(me, SPELL_EVOCATE);
+ break;
+ case SPELL_SUMMON_MENAGERIE_2:
+ me->SetHomePosition(1164.02f, 1170.85f, 527.321f, 3.66f);
+ LeaveCombat();
+ me->CastSpell(me, SPELL_EVOCATE);
+ break;
+ case SPELL_SUMMON_MENAGERIE_3:
+ me->SetHomePosition(1118.31f, 1080.377f, 508.361f, 4.25f);
+ LeaveCombat();
+ me->CastSpell(me, SPELL_EVOCATE);
+ break;
+ case SPELL_TELEPORT:
+ //! Unconfirmed, previous below
+ me->SetDisableGravity(true);
+ //me->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY); // with out it the npc will fall down while is casting
+ canCast = true;
+ break;
+ default:
+ break;
+ }
}
- }
+
private:
float x, y;
bool canCast;
bool canGoBack;
+ uint8 platform;
+
uint8 group[3];
uint32 teleportTimer;
@@ -364,7 +331,12 @@ public:
uint32 castArcaneExplosionTimer;
uint32 frostBombTimer;
uint32 timeBombTimer;
- };
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetOculusAI<boss_uromAI>(creature);
+ }
};
void AddSC_boss_urom()
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
index fbf39a705ee..385f80ae37d 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
@@ -54,105 +54,111 @@ enum Events
class boss_varos : public CreatureScript
{
-public:
- boss_varos() : CreatureScript("boss_varos") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_varosAI(creature);
- }
+ public:
+ boss_varos() : CreatureScript("boss_varos") { }
- struct boss_varosAI : public BossAI
- {
- boss_varosAI(Creature* creature) : BossAI(creature, DATA_VAROS_EVENT)
+ struct boss_varosAI : public BossAI
{
- if (instance->GetBossState(DATA_DRAKOS_EVENT) != DONE)
- DoCast(me, SPELL_CENTRIFUGE_SHIELD);
- }
+ boss_varosAI(Creature* creature) : BossAI(creature, DATA_VAROS) { }
- void Reset() OVERRIDE
- {
- _Reset();
+ void InitializeAI() OVERRIDE
+ {
+ BossAI::InitializeAI();
+ if (instance->GetBossState(DATA_DRAKOS) != DONE)
+ DoCast(me, SPELL_CENTRIFUGE_SHIELD);
+ }
- events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(20, 25) * IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
- // not sure if this is handled by a timer or hp percentage
- events.ScheduleEvent(EVENT_CALL_AZURE, urand(15, 30) * IN_MILLISECONDS);
+ void Reset() OVERRIDE
+ {
+ _Reset();
- firstCoreEnergize = false;
- coreEnergizeOrientation = 0.0f;
- }
+ events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(20, 25) * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
+ // not sure if this is handled by a timer or hp percentage
+ events.ScheduleEvent(EVENT_CALL_AZURE, urand(15, 30) * IN_MILLISECONDS);
- void EnterCombat(Unit* /*who*/) OVERRIDE
- {
- _EnterCombat();
+ firstCoreEnergize = false;
+ coreEnergizeOrientation = 0.0f;
+ }
- Talk(SAY_AGGRO);
- }
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
- float GetCoreEnergizeOrientation()
- {
- return coreEnergizeOrientation;
- }
+ Talk(SAY_AGGRO);
+ }
- void UpdateAI(uint32 diff) OVERRIDE
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ float GetCoreEnergizeOrientation()
+ {
+ return coreEnergizeOrientation;
+ }
- events.Update(diff);
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ events.Update(diff);
- while (uint32 eventId = events.ExecuteEvent())
- {
- switch (eventId)
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- case EVENT_ENERGIZE_CORES:
- DoCast(me, SPELL_ENERGIZE_CORES);
- events.CancelEvent(EVENT_ENERGIZE_CORES);
- break;
- case EVENT_ENERGIZE_CORES_VISUAL:
- if (!firstCoreEnergize)
- {
- coreEnergizeOrientation = me->GetOrientation();
- firstCoreEnergize = true;
- } else
- coreEnergizeOrientation = Position::NormalizeOrientation(coreEnergizeOrientation - 2.0f);
-
- DoCast(me, SPELL_ENERGIZE_CORES_VISUAL);
- events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
- events.ScheduleEvent(EVENT_ENERGIZE_CORES, 4000);
- break;
- case EVENT_CALL_AZURE:
- // not sure how blizz handles this, i cant see any pattern between the differnt spells
- DoCast(me, SPELL_CALL_AZURE_RING_CAPTAIN);
- Talk(SAY_AZURE);
- Talk(SAY_AZURE_EMOTE);
- events.ScheduleEvent(EVENT_CALL_AZURE, urand(20, 25) * IN_MILLISECONDS);
- break;
- case EVENT_AMPLIFY_MAGIC:
- DoCastVictim(SPELL_CALL_AMPLIFY_MAGIC);
- events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(17, 20) * IN_MILLISECONDS);
- break;
+ switch (eventId)
+ {
+ case EVENT_ENERGIZE_CORES:
+ DoCast(me, SPELL_ENERGIZE_CORES);
+ events.CancelEvent(EVENT_ENERGIZE_CORES);
+ break;
+ case EVENT_ENERGIZE_CORES_VISUAL:
+ if (!firstCoreEnergize)
+ {
+ coreEnergizeOrientation = me->GetOrientation();
+ firstCoreEnergize = true;
+ }
+ else
+ coreEnergizeOrientation = Position::NormalizeOrientation(coreEnergizeOrientation - 2.0f);
+
+ DoCast(me, SPELL_ENERGIZE_CORES_VISUAL);
+ events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
+ events.ScheduleEvent(EVENT_ENERGIZE_CORES, 4000);
+ break;
+ case EVENT_CALL_AZURE:
+ // not sure how blizz handles this, i cant see any pattern between the differnt spells
+ DoCast(me, SPELL_CALL_AZURE_RING_CAPTAIN);
+ Talk(SAY_AZURE);
+ Talk(SAY_AZURE_EMOTE);
+ events.ScheduleEvent(EVENT_CALL_AZURE, urand(20, 25) * IN_MILLISECONDS);
+ break;
+ case EVENT_AMPLIFY_MAGIC:
+ DoCastVictim(SPELL_CALL_AMPLIFY_MAGIC);
+ events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(17, 20) * IN_MILLISECONDS);
+ break;
+ default:
+ break;
+ }
}
+
+ DoMeleeAttackIfReady();
}
- DoMeleeAttackIfReady();
- }
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
+ }
- void JustDied(Unit* /*killer*/) OVERRIDE
+ private:
+ bool firstCoreEnergize;
+ float coreEnergizeOrientation;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- _JustDied();
- Talk(SAY_DEATH);
- DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
+ return GetOculusAI<boss_varosAI>(creature);
}
- private:
- bool firstCoreEnergize;
- float coreEnergizeOrientation;
- };
};
class npc_azure_ring_captain : public CreatureScript
@@ -259,7 +265,6 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader
if (Unit* caster = GetCaster())
{
// flags taken from sniffs
- // UNIT_FLAG_UNK_9 -> means passive but it is not yet implemented in core
if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6))
{
caster->ToCreature()->SetReactState(REACT_PASSIVE);
@@ -293,7 +298,7 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader
class spell_varos_energize_core_area_enemy : public SpellScriptLoader
{
public:
- spell_varos_energize_core_area_enemy() : SpellScriptLoader("spell_varos_energize_core_area_enemy") {}
+ spell_varos_energize_core_area_enemy() : SpellScriptLoader("spell_varos_energize_core_area_enemy") { }
class spell_varos_energize_core_area_enemySpellScript : public SpellScript
{
@@ -340,7 +345,7 @@ class spell_varos_energize_core_area_enemy : public SpellScriptLoader
class spell_varos_energize_core_area_entry : public SpellScriptLoader
{
public:
- spell_varos_energize_core_area_entry() : SpellScriptLoader("spell_varos_energize_core_area_entry") {}
+ spell_varos_energize_core_area_entry() : SpellScriptLoader("spell_varos_energize_core_area_entry") { }
class spell_varos_energize_core_area_entrySpellScript : public SpellScript
{
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
index 428d24a38ea..96fadc7002b 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
@@ -18,354 +18,336 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "InstanceScript.h"
+#include "WorldPacket.h"
#include "oculus.h"
-#include "Player.h"
-#define MAX_ENCOUNTER 4
+DoorData const doorData[] =
+{
+ { GO_DRAGON_CAGE_DOOR, DATA_DRAKOS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
+ { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
+};
-/* The Occulus encounters:
-0 - Drakos the Interrogator
-1 - Varos Cloudstrider
-2 - Mage-Lord Urom
-3 - Ley-Guardian Eregos */
+Position const VerdisaMove = { 949.188f, 1032.91f, 359.967f, 1.093027f };
+Position const BelgaristraszMove = { 941.453f, 1044.1f, 359.967f, 0.1984709f };
+Position const EternosMove = { 943.202f, 1059.35f, 359.967f, 5.757278f };
class instance_oculus : public InstanceMapScript
{
-public:
- instance_oculus() : InstanceMapScript("instance_oculus", 578) { }
-
- InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
- {
- return new instance_oculus_InstanceMapScript(map);
- }
-
- struct instance_oculus_InstanceMapScript : public InstanceScript
- {
- instance_oculus_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ public:
+ instance_oculus() : InstanceMapScript(OculusScriptName, 578) { }
- void Initialize() OVERRIDE
+ struct instance_oculus_InstanceMapScript : public InstanceScript
{
- SetBossNumber(MAX_ENCOUNTER);
-
- drakosGUID = 0;
- varosGUID = 0;
- uromGUID = 0;
- eregosGUID = 0;
-
- platformUrom = 0;
- centrifugueConstructCounter = 0;
-
- eregosCacheGUID = 0;
-
- gwhelpList.clear();
- gameObjectList.clear();
+ instance_oculus_InstanceMapScript(Map* map) : InstanceScript(map)
+ {
+ SetBossNumber(EncounterCount);
+ LoadDoorData(doorData);
- belgaristraszGUID = 0;
- eternosGUID = 0;
- verdisaGUID = 0;
-}
+ DrakosGUID = 0;
+ VarosGUID = 0;
+ UromGUID = 0;
+ EregosGUID = 0;
- void OnUnitDeath(Unit* unit) OVERRIDE
- {
- Creature* creature = unit->ToCreature();
- if (!creature)
- return;
+ CentrifugueConstructCounter = 0;
- if (creature->GetEntry() != NPC_CENTRIFUGE_CONSTRUCT)
- return;
+ EregosCacheGUID = 0;
- DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, --centrifugueConstructCounter);
+ GreaterWhelpList.clear();
- if (!centrifugueConstructCounter)
- if (Creature* varos = instance->GetCreature(varosGUID))
- varos->RemoveAllAuras();
- }
+ BelgaristraszGUID = 0;
+ EternosGUID = 0;
+ VerdisaGUID = 0;
+ }
- void OnPlayerEnter(Player* player) OVERRIDE
- {
- if (GetBossState(DATA_DRAKOS_EVENT) == DONE && GetBossState(DATA_VAROS_EVENT) != DONE)
+ void OnCreatureCreate(Creature* creature) OVERRIDE
{
- player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
- player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, centrifugueConstructCounter);
- } else
+ switch (creature->GetEntry())
+ {
+ case NPC_DRAKOS:
+ DrakosGUID = creature->GetGUID();
+ break;
+ case NPC_VAROS:
+ VarosGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS) == DONE)
+ creature->SetPhaseMask(1, true);
+ break;
+ case NPC_UROM:
+ UromGUID = creature->GetGUID();
+ if (GetBossState(DATA_VAROS) == DONE)
+ creature->SetPhaseMask(1, true);
+ break;
+ case NPC_EREGOS:
+ EregosGUID = creature->GetGUID();
+ if (GetBossState(DATA_UROM) == DONE)
+ creature->SetPhaseMask(1, true);
+ break;
+ case NPC_CENTRIFUGE_CONSTRUCT:
+ if (creature->IsAlive())
+ DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, ++CentrifugueConstructCounter);
+ break;
+ case NPC_BELGARISTRASZ:
+ BelgaristraszGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS) == DONE)
+ {
+ creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ creature->Relocate(BelgaristraszMove);
+ }
+ break;
+ case NPC_ETERNOS:
+ EternosGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS) == DONE)
+ {
+ creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ creature->Relocate(EternosMove);
+ }
+ break;
+ case NPC_VERDISA:
+ VerdisaGUID = creature->GetGUID();
+ if (GetBossState(DATA_DRAKOS) == DONE)
+ {
+ creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ creature->Relocate(VerdisaMove);
+ }
+ break;
+ case NPC_GREATER_WHELP:
+ if (GetBossState(DATA_UROM) == DONE)
+ {
+ creature->SetPhaseMask(1, true);
+ GreaterWhelpList.push_back(creature->GetGUID());
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ void OnGameObjectCreate(GameObject* go) OVERRIDE
{
- player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
- player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 0);
+ switch (go->GetEntry())
+ {
+ case GO_DRAGON_CAGE_DOOR:
+ AddDoor(go, true);
+ break;
+ case GO_EREGOS_CACHE_N:
+ case GO_EREGOS_CACHE_H:
+ EregosCacheGUID = go->GetGUID();
+ break;
+ default:
+ break;
+ }
}
- }
- void ProcessEvent(WorldObject* /*unit*/, uint32 eventId)
- {
- if (eventId != EVENT_CALL_DRAGON)
- return;
+ void OnGameObjectRemove(GameObject* go) OVERRIDE
+ {
+ switch (go->GetEntry())
+ {
+ case GO_DRAGON_CAGE_DOOR:
+ AddDoor(go, false);
+ break;
+ default:
+ break;
+ }
+ }
- Creature* varos = instance->GetCreature(varosGUID);
+ void OnUnitDeath(Unit* unit) OVERRIDE
+ {
+ Creature* creature = unit->ToCreature();
+ if (!creature)
+ return;
- if (!varos)
- return;
+ if (creature->GetEntry() == NPC_CENTRIFUGE_CONSTRUCT)
+ {
+ DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, --CentrifugueConstructCounter);
- if (Creature* drake = varos->SummonCreature(NPC_AZURE_RING_GUARDIAN, varos->GetPositionX(), varos->GetPositionY(), varos->GetPositionZ()+40))
- drake->AI()->DoAction(ACTION_CALL_DRAGON_EVENT);
- }
+ if (!CentrifugueConstructCounter)
+ if (Creature* varos = instance->GetCreature(VarosGUID))
+ varos->RemoveAllAuras();
+ }
+ }
- void OnCreatureCreate(Creature* creature) OVERRIDE
- {
- switch (creature->GetEntry())
+ void FillInitialWorldStates(WorldPacket& data) OVERRIDE
{
- case NPC_DRAKOS:
- drakosGUID = creature->GetGUID();
- break;
- case NPC_VAROS:
- varosGUID = creature->GetGUID();
- if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
- creature->SetPhaseMask(1, true);
- break;
- case NPC_UROM:
- uromGUID = creature->GetGUID();
- if (GetBossState(DATA_VAROS_EVENT) == DONE)
- creature->SetPhaseMask(1, true);
- break;
- case NPC_EREGOS:
- eregosGUID = creature->GetGUID();
- if (GetBossState(DATA_UROM_EVENT) == DONE)
- creature->SetPhaseMask(1, true);
- break;
- case NPC_CENTRIFUGE_CONSTRUCT:
- if (creature->IsAlive())
- DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, ++centrifugueConstructCounter);
- break;
- case NPC_BELGARISTRASZ:
- belgaristraszGUID = creature->GetGUID();
- if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
- {
- creature->SetWalk(true),
- creature->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f),
- creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- }
- break;
- case NPC_ETERNOS:
- eternosGUID = creature->GetGUID();
- if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
- {
- creature->SetWalk(true),
- creature->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f),
- creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- }
- break;
- case NPC_VERDISA:
- verdisaGUID = creature->GetGUID();
- if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
- {
- creature->SetWalk(true),
- creature->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f),
- creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- }
- break;
- case NPC_GREATER_WHELP:
- if (GetBossState(DATA_UROM_EVENT) == DONE)
- {
- creature->SetPhaseMask(1, true);
- gwhelpList.push_back(creature->GetGUID());
- }
- break;
+ if (GetBossState(DATA_DRAKOS) == DONE && GetBossState(DATA_VAROS) != DONE)
+ {
+ data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW) << uint32(1);
+ data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT) << uint32(CentrifugueConstructCounter);
+ }
+ else
+ {
+ data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW) << uint32(0);
+ data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT) << uint32(0);
+ }
}
- }
- void OnGameObjectCreate(GameObject* go) OVERRIDE
- {
- switch (go->GetEntry())
+ void ProcessEvent(WorldObject* /*unit*/, uint32 eventId)
{
- case GO_DRAGON_CAGE_DOOR:
- if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
- go->SetGoState(GO_STATE_ACTIVE);
- else
- go->SetGoState(GO_STATE_READY);
- gameObjectList.push_back(go->GetGUID());
- break;
- case GO_EREGOS_CACHE_N:
- case GO_EREGOS_CACHE_H:
- eregosCacheGUID = go->GetGUID();
- break;
- default:
- break;
- }
- }
+ if (eventId != EVENT_CALL_DRAGON)
+ return;
- bool SetBossState(uint32 type, EncounterState state) OVERRIDE
- {
- if (!InstanceScript::SetBossState(type, state))
- return false;
+ if (Creature* varos = instance->GetCreature(VarosGUID))
+ if (Creature* drake = varos->SummonCreature(NPC_AZURE_RING_GUARDIAN, varos->GetPositionX(), varos->GetPositionY(), varos->GetPositionZ() + 40))
+ drake->AI()->DoAction(ACTION_CALL_DRAGON_EVENT);
+ }
- switch (type)
+ bool SetBossState(uint32 type, EncounterState state) OVERRIDE
{
- case DATA_DRAKOS_EVENT:
- if (state == DONE)
- {
- DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
- DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, centrifugueConstructCounter);
- OpenCageDoors();
- FreeDragons();
- if (Creature* varos = instance->GetCreature(varosGUID))
- varos->SetPhaseMask(1, true);
- }
- break;
- case DATA_VAROS_EVENT:
- if (state == DONE)
- DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
- if (Creature* urom = instance->GetCreature(uromGUID))
- urom->SetPhaseMask(1, true);
- break;
- case DATA_UROM_EVENT:
- if (state == DONE)
- {
- if (Creature* eregos = instance->GetCreature(eregosGUID))
+ if (!InstanceScript::SetBossState(type, state))
+ return false;
+
+ switch (type)
+ {
+ case DATA_DRAKOS:
+ if (state == DONE)
{
- eregos->SetPhaseMask(1, true);
- GreaterWhelps();
+ DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
+ DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, CentrifugueConstructCounter);
+ FreeDragons();
+ if (Creature* varos = instance->GetCreature(VarosGUID))
+ varos->SetPhaseMask(1, true);
}
- }
- break;
- case DATA_EREGOS_EVENT:
- if (state == DONE)
- DoRespawnGameObject(eregosCacheGUID, 7*DAY);
- break;
- }
-
- return true;
- }
+ break;
+ case DATA_VAROS:
+ if (state == DONE)
+ DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
+ if (Creature* urom = instance->GetCreature(UromGUID))
+ urom->SetPhaseMask(1, true);
+ break;
+ case DATA_UROM:
+ if (state == DONE)
+ {
+ if (Creature* eregos = instance->GetCreature(EregosGUID))
+ {
+ eregos->SetPhaseMask(1, true);
+ GreaterWhelps();
+ }
+ }
+ break;
+ case DATA_EREGOS:
+ if (state == DONE)
+ {
+ if (GameObject* cache = instance->GetGameObject(EregosCacheGUID))
+ {
+ cache->SetRespawnTime(cache->GetRespawnDelay());
+ cache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ }
+ }
+ break;
+ }
- void SetData(uint32 type, uint32 data) OVERRIDE
- {
- switch (type)
- {
- case DATA_UROM_PLATAFORM:
- platformUrom = data;
- break;
+ return true;
}
- }
- uint32 GetData(uint32 type) const OVERRIDE
- {
- switch (type)
+ uint64 GetData64(uint32 type) const OVERRIDE
{
- case DATA_UROM_PLATAFORM: return platformUrom;
- // used by condition system
- case DATA_UROM_EVENT: return GetBossState(DATA_UROM_EVENT);
- }
+ switch (type)
+ {
+ case DATA_DRAKOS:
+ return DrakosGUID;
+ case DATA_VAROS:
+ return VarosGUID;
+ case DATA_UROM:
+ return UromGUID;
+ case DATA_EREGOS:
+ return EregosGUID;
+ default:
+ break;
+ }
- return 0;
- }
+ return 0;
+ }
- uint64 GetData64(uint32 identifier) const OVERRIDE
- {
- switch (identifier)
+ void FreeDragons()
{
- case DATA_DRAKOS: return drakosGUID;
- case DATA_VAROS: return varosGUID;
- case DATA_UROM: return uromGUID;
- case DATA_EREGOS: return eregosGUID;
- }
+ if (Creature* belgaristrasz = instance->GetCreature(BelgaristraszGUID))
+ {
+ belgaristrasz->SetWalk(true);
+ belgaristrasz->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, BelgaristraszMove);
+ }
- return 0;
- }
+ if (Creature* eternos = instance->GetCreature(EternosGUID))
+ {
+ eternos->SetWalk(true);
+ eternos->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, EternosMove);
+ }
- void OpenCageDoors()
- {
- if (gameObjectList.empty())
- return;
+ if (Creature* verdisa = instance->GetCreature(VerdisaGUID))
+ {
+ verdisa->SetWalk(true);
+ verdisa->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, VerdisaMove);
+ }
+ }
- for (std::list<uint64>::const_iterator itr = gameObjectList.begin(); itr != gameObjectList.end(); ++itr)
+ void GreaterWhelps()
{
- if (GameObject* go = instance->GetGameObject(*itr))
- go->SetGoState(GO_STATE_ACTIVE);
+ for (std::list<uint64>::const_iterator itr = GreaterWhelpList.begin(); itr != GreaterWhelpList.end(); ++itr)
+ if (Creature* gwhelp = instance->GetCreature(*itr))
+ gwhelp->SetPhaseMask(1, true);
}
- }
-
- void FreeDragons()
- {
- if (Creature* belgaristrasz = instance->GetCreature(belgaristraszGUID))
- belgaristrasz->SetWalk(true),
- belgaristrasz->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f);
- if (Creature* eternos = instance->GetCreature(eternosGUID))
- eternos->SetWalk(true),
- eternos->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f);
- if (Creature* verdisa = instance->GetCreature(verdisaGUID))
- verdisa->SetWalk(true),
- verdisa->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f);
- }
- void GreaterWhelps()
- {
- if (gwhelpList.empty())
- return;
-
- for (std::list<uint64>::const_iterator itr = gwhelpList.begin(); itr != gwhelpList.end(); ++itr)
- if (Creature* gwhelp = instance->GetCreature(*itr))
- gwhelp->SetPhaseMask(1, true);
- }
-
- std::string GetSaveData() OVERRIDE
- {
- OUT_SAVE_INST_DATA;
-
- std::ostringstream saveStream;
- saveStream << "T O " << GetBossSaveData();
+ std::string GetSaveData() OVERRIDE
+ {
+ OUT_SAVE_INST_DATA;
- str_data = saveStream.str();
+ std::ostringstream saveStream;
+ saveStream << "T O " << GetBossSaveData();
- OUT_SAVE_INST_DATA_COMPLETE;
- return str_data;
- }
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
+ }
- void Load(const char* in) OVERRIDE
- {
- if (!in)
+ void Load(char const* str) OVERRIDE
{
- OUT_LOAD_INST_DATA_FAIL;
- return;
- }
+ if (!str)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
- OUT_LOAD_INST_DATA(in);
+ OUT_LOAD_INST_DATA(str);
- char dataHead1, dataHead2;
+ char dataHead1, dataHead2;
- std::istringstream loadStream(in);
- loadStream >> dataHead1 >> dataHead2;
+ std::istringstream loadStream(str);
+ loadStream >> dataHead1 >> dataHead2;
- if (dataHead1 == 'T' && dataHead2 == 'O')
- {
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ if (dataHead1 == 'T' && dataHead2 == 'O')
{
- uint32 tmpState;
- loadStream >> tmpState;
- if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
- tmpState = NOT_STARTED;
- SetBossState(i, EncounterState(tmpState));
+ for (uint32 i = 0; i < EncounterCount; ++i)
+ {
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
+ }
}
- } else OUT_LOAD_INST_DATA_FAIL;
+ else
+ OUT_LOAD_INST_DATA_FAIL;
- OUT_LOAD_INST_DATA_COMPLETE;
- }
- private:
- uint64 drakosGUID;
- uint64 varosGUID;
- uint64 uromGUID;
- uint64 eregosGUID;
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
- uint64 belgaristraszGUID;
- uint64 eternosGUID;
- uint64 verdisaGUID;
+ protected:
+ uint64 DrakosGUID;
+ uint64 VarosGUID;
+ uint64 UromGUID;
+ uint64 EregosGUID;
- uint8 platformUrom;
- uint8 centrifugueConstructCounter;
+ uint64 BelgaristraszGUID;
+ uint64 EternosGUID;
+ uint64 VerdisaGUID;
- uint64 eregosCacheGUID;
+ uint8 CentrifugueConstructCounter;
- std::string str_data;
+ uint64 EregosCacheGUID;
- std::list<uint64> gameObjectList;
- std::list<uint64> gwhelpList;
- };
+ std::list<uint64> GreaterWhelpList;
+ };
+
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
+ {
+ return new instance_oculus_InstanceMapScript(map);
+ }
};
void AddSC_instance_oculus()
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index fd15cd19b37..4b24e5a81fb 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -20,39 +20,20 @@
#include "ScriptedGossip.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
-#include "Vehicle.h"
#include "CombatAI.h"
-#include "oculus.h"
#include "Player.h"
-
-#define GOSSIP_ITEM_DRAKES "So where do we go from here?"
-#define GOSSIP_ITEM_BELGARISTRASZ1 "I want to fly on the wings of the Red Flight"
-#define GOSSIP_ITEM_BELGARISTRASZ2 "What abilities do Ruby Drakes have?"
-#define GOSSIP_ITEM_VERDISA1 "I want to fly on the wings of the Green Flight"
-#define GOSSIP_ITEM_VERDISA2 "What abilities do Emerald Drakes have?"
-#define GOSSIP_ITEM_ETERNOS1 "I want to fly on the wings of the Bronze Flight"
-#define GOSSIP_ITEM_ETERNOS2 "What abilities do Amber Drakes have?"
-
-#define HAS_ESSENCE(a) ((a)->HasItemCount(ITEM_EMERALD_ESSENCE) || (a)->HasItemCount(ITEM_AMBER_ESSENCE) || (a)->HasItemCount(ITEM_RUBY_ESSENCE))
+#include "Vehicle.h"
+#include "oculus.h"
enum GossipNPCs
{
- GOSSIP_TEXTID_DRAKES = 13267,
- GOSSIP_TEXTID_BELGARISTRASZ1 = 12916,
- GOSSIP_TEXTID_BELGARISTRASZ2 = 13466,
- GOSSIP_TEXTID_BELGARISTRASZ3 = 13254,
- GOSSIP_TEXTID_VERDISA1 = 1,
- GOSSIP_TEXTID_VERDISA2 = 1,
- GOSSIP_TEXTID_VERDISA3 = 1,
- GOSSIP_TEXTID_ETERNOS1 = 1,
- GOSSIP_TEXTID_ETERNOS2 = 1,
- GOSSIP_TEXTID_ETERNOS3 = 13256,
-
- ITEM_EMERALD_ESSENCE = 37815,
- ITEM_AMBER_ESSENCE = 37859,
- ITEM_RUBY_ESSENCE = 37860,
-
- SPELL_SHOCK_CHARGE = 49836
+ GOSSIP_MENU_VERDISA = 9573,
+ GOSSIP_MENU_ETERNOS = 9574,
+ GOSSIP_MENU_BELGARISTRASZ = 9575,
+
+ ITEM_EMERALD_ESSENCE = 37815,
+ ITEM_AMBER_ESSENCE = 37859,
+ ITEM_RUBY_ESSENCE = 37860
};
enum Drakes
@@ -73,9 +54,9 @@ enum Drakes
(npc 27755) (item 37859)
(summoned by spell Amber Essence = 37859 ---> Call Amber Drake == 49461 ---> Summon 27755)
*/
-
SPELL_RIDE_AMBER_DRAKE_QUE = 49459, //Apply Aura: Periodic Trigger, Interval: 3 seconds ---> 49460
SPELL_AMBER_DRAKE_SADDLE = 49460, //Allows you to ride on the back of an Amber Drake. ---> Dummy
+ SPELL_AMBER_SHOCK_CHARGE = 49836,
SPELL_AMBER_SHOCK_LANCE = 49840, //(60 yds) - Instant - Deals 4822 to 5602 Arcane damage and detonates all Shock Charges on an enemy dragon. Damage is increased by 6525 for each detonated.
// SPELL_AMBER_STOP_TIME //Instant - 1 min cooldown - Halts the passage of time, freezing all enemy dragons in place for 10 sec. This attack applies 5 Shock Charges to each affected target.
//you do not have access to until you kill the Mage-Lord Urom.
@@ -91,6 +72,20 @@ enum Drakes
SPELL_EMERALD_TOUCH_THE_NIGHTMARE = 50341, //(60 yds) - Instant - Consumes 30% of the caster's max health to inflict 25, 000 nature damage to an enemy dragon and reduce the damage it deals by 25% for 30 sec.
// you do not have access to until you kill the Mage-Lord Urom
SPELL_EMERALD_DREAM_FUNNEL = 50344, //(60 yds) - Channeled - Transfers 5% of the caster's max health to a friendly drake every second for 10 seconds as long as the caster channels.
+
+ // Misc
+ POINT_LAND = 2,
+ POINT_TAKE_OFF = 3
+};
+
+enum DrakeEvents
+{
+ EVENT_WELCOME = 1,
+ EVENT_ABILITIES,
+ EVENT_SPECIAL_ATTACK,
+ EVENT_LOW_HEALTH,
+ EVENT_RESET_LOW_HEALTH,
+ EVENT_TAKE_OFF
};
enum Says
@@ -107,420 +102,376 @@ enum Says
class npc_verdisa_beglaristrasz_eternos : public CreatureScript
{
-public:
- npc_verdisa_beglaristrasz_eternos() : CreatureScript("npc_verdisa_beglaristrasz_eternos") { }
+ public:
+ npc_verdisa_beglaristrasz_eternos() : CreatureScript("npc_verdisa_beglaristrasz_eternos") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
- {
- player->PlayerTalkClass->ClearMenus();
- switch (creature->GetEntry())
+ struct npc_verdisa_beglaristrasz_eternosAI : public ScriptedAI
{
- case NPC_VERDISA: //Verdisa
+ npc_verdisa_beglaristrasz_eternosAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void StoreEssence(Player* player, uint32 itemId)
{
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF + 1:
- if (!HAS_ESSENCE(player))
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA1, creature->GetGUID());
- }
- else
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA2, creature->GetGUID());
- }
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- {
- ItemPosCountVec dest;
- uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1);
- if (msg == EQUIP_ERR_OK)
- player->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true);
- player->CLOSE_GOSSIP_MENU();
- break;
- }
- case GOSSIP_ACTION_INFO_DEF + 3:
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA3, creature->GetGUID());
- break;
- }
- break;
+ /// @todo: should be handled by spell, but not found in dbc (49450 and other?)
+ uint32 count = 1;
+ ItemPosCountVec dest;
+ uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, count);
+ if (msg == EQUIP_ERR_OK)
+ if (Item* item = player->StoreNewItem(dest, itemId, true))
+ player->SendNewItem(item, count, true, true);
}
- case NPC_BELGARISTRASZ: //Belgaristrasz
+
+ void RemoveEssence(Player* player, uint32 itemId)
{
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF + 1:
- if (!HAS_ESSENCE(player))
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ1, creature->GetGUID());
- }
- else
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ2, creature->GetGUID());
- }
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- {
- ItemPosCountVec dest;
- uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1);
- if (msg == EQUIP_ERR_OK)
- player->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true);
- player->CLOSE_GOSSIP_MENU();
- break;
- }
- case GOSSIP_ACTION_INFO_DEF + 3:
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ3, creature->GetGUID());
- break;
- }
- break;
+ player->DestroyItemCount(itemId, 1, true, false);
}
- case NPC_ETERNOS: //Eternos
+
+ void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) OVERRIDE
{
- switch (action)
+ switch (menuId)
{
- case GOSSIP_ACTION_INFO_DEF + 1:
- if (!HAS_ESSENCE(player))
+ case GOSSIP_MENU_VERDISA:
+ if (gossipListId >= 1 && gossipListId <= 3)
{
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS1, creature->GetGUID());
+ if (gossipListId == 2)
+ RemoveEssence(player, ITEM_AMBER_ESSENCE);
+ else if (gossipListId == 3)
+ RemoveEssence(player, ITEM_RUBY_ESSENCE);
+
+ StoreEssence(player, ITEM_EMERALD_ESSENCE);
+ break;
}
- else
+ return;
+ case GOSSIP_MENU_ETERNOS:
+ if (gossipListId >= 1 && gossipListId <= 3)
{
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS2, creature->GetGUID());
+ if (gossipListId == 2)
+ RemoveEssence(player, ITEM_EMERALD_ESSENCE);
+ else if (gossipListId == 3)
+ RemoveEssence(player, ITEM_RUBY_ESSENCE);
+
+ StoreEssence(player, ITEM_AMBER_ESSENCE);
+ break;
}
- break;
- case GOSSIP_ACTION_INFO_DEF + 2:
- {
- ItemPosCountVec dest;
- uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1);
- if (msg == EQUIP_ERR_OK)
- player->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true);
- player->CLOSE_GOSSIP_MENU();
- break;
- }
- case GOSSIP_ACTION_INFO_DEF + 3:
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS3, creature->GetGUID());
- break;
+ return;
+ case GOSSIP_MENU_BELGARISTRASZ:
+ if (gossipListId <= 2)
+ {
+ if (gossipListId == 1)
+ RemoveEssence(player, ITEM_AMBER_ESSENCE);
+ else if (gossipListId == 2)
+ RemoveEssence(player, ITEM_EMERALD_ESSENCE);
+
+ StoreEssence(player, ITEM_RUBY_ESSENCE);
+ break;
+ }
+ return;
+ default:
+ return;
}
- break;
+ player->PlayerTalkClass->SendCloseGossip();
}
- }
-
- return true;
- }
- bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (InstanceScript* instance = creature->GetInstanceScript())
- {
- if (instance->GetBossState(DATA_DRAKOS_EVENT) == DONE)
+ void MovementInform(uint32 /*type*/, uint32 id) OVERRIDE
{
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DRAKES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DRAKES, creature->GetGUID());
- }
- }
+ if (id != POINT_MOVE_OUT)
+ return;
- return true;
- }
+ // When Belgaristraz finish his moving say grateful text
+ if (me->GetEntry() == NPC_BELGARISTRASZ)
+ Talk(SAY_BELGARISTRASZ);
- struct npc_verdisa_beglaristrasz_eternosAI : public ScriptedAI
- {
- npc_verdisa_beglaristrasz_eternosAI(Creature* creature) : ScriptedAI(creature) { }
+ // The gossip flag should activate when Drakos die and not from DB
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ }
+ };
- void MovementInform(uint32 /*type*/, uint32 id) OVERRIDE
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- if (id)
- return;
-
- // When Belgaristraz finish his moving say grateful text
- if (me->GetEntry() == NPC_BELGARISTRASZ)
- Talk(SAY_BELGARISTRASZ);
-
- // The gossip flag should activate when Drakos die and not from DB
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ return GetOculusAI<npc_verdisa_beglaristrasz_eternosAI>(creature);
}
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_verdisa_beglaristrasz_eternosAI(creature);
- }
};
class npc_image_belgaristrasz : public CreatureScript
{
-public:
- npc_image_belgaristrasz() : CreatureScript("npc_image_belgaristrasz") { }
-
- struct npc_image_belgaristraszAI : public ScriptedAI
- {
- npc_image_belgaristraszAI(Creature* creature) : ScriptedAI(creature) { }
+ public:
+ npc_image_belgaristrasz() : CreatureScript("npc_image_belgaristrasz") { }
- void IsSummonedBy(Unit* summoner) OVERRIDE
+ struct npc_image_belgaristraszAI : public ScriptedAI
{
- if (summoner->GetEntry() == NPC_VAROS)
- {
- Talk(SAY_VAROS);
- me->DespawnOrUnsummon(60000);
- }
- if (summoner->GetEntry() == NPC_UROM)
+ npc_image_belgaristraszAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void IsSummonedBy(Unit* summoner) OVERRIDE
{
- Talk(SAY_UROM);
- me->DespawnOrUnsummon(60000);
+ if (summoner->GetEntry() == NPC_VAROS)
+ {
+ Talk(SAY_VAROS);
+ me->DespawnOrUnsummon(60000);
+ }
+
+ if (summoner->GetEntry() == NPC_UROM)
+ {
+ Talk(SAY_UROM);
+ me->DespawnOrUnsummon(60000);
+ }
}
- }
- };
+ };
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_image_belgaristraszAI(creature);
- }
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetOculusAI<npc_image_belgaristraszAI>(creature);
+ }
};
class npc_ruby_emerald_amber_drake : public CreatureScript
{
-public:
- npc_ruby_emerald_amber_drake() : CreatureScript("npc_ruby_emerald_amber_drake") { }
+ public:
+ npc_ruby_emerald_amber_drake() : CreatureScript("npc_ruby_emerald_amber_drake") { }
- struct npc_ruby_emerald_amber_drakeAI : public VehicleAI
- {
- npc_ruby_emerald_amber_drakeAI(Creature* creature) : VehicleAI(creature)
+ struct npc_ruby_emerald_amber_drakeAI : public VehicleAI
{
- instance = creature->GetInstanceScript();
- }
-
- InstanceScript* instance;
+ npc_ruby_emerald_amber_drakeAI(Creature* creature) : VehicleAI(creature)
+ {
+ _instance = creature->GetInstanceScript();
+ }
- uint64 summonerGUID;
- uint32 WelcomeTimer;
- uint32 WelcomeSequelTimer;
- uint32 SpecialTimer;
- uint32 WarningTimer;
- uint32 TakeOffTimer;
+ void Reset() OVERRIDE
+ {
+ _events.Reset();
+ _healthWarning = true;
+ }
- bool WelcomeOff;
- bool WelcomeSequelOff;
- bool SpecialOff;
- bool HealthWarningOff;
- bool DisableTakeOff;
+ void IsSummonedBy(Unit* summoner) OVERRIDE
+ {
+ if (_instance->GetBossState(DATA_EREGOS) == IN_PROGRESS)
+ if (Creature* eregos = me->FindNearestCreature(NPC_EREGOS, 450.0f, true))
+ eregos->DespawnOrUnsummon(); // On retail this kills abusive call of drake during engaged Eregos
- void Reset() OVERRIDE
- {
- summonerGUID = 0;
- WelcomeTimer = 4500;
- WelcomeSequelTimer = 4500;
- SpecialTimer = 10000;
- WarningTimer = 25000;
- TakeOffTimer = 3500;
-
- WelcomeOff = false;
- WelcomeSequelOff = false;
- SpecialOff = false;
- HealthWarningOff = false;
- DisableTakeOff = false;
- }
+ me->SetFacingToObject(summoner);
- void IsSummonedBy(Unit* summoner) OVERRIDE
- {
- if (instance->GetBossState(DATA_EREGOS_EVENT) == IN_PROGRESS)
- if (Creature* eregos = me->FindNearestCreature(NPC_EREGOS, 450.0f, true))
+ switch (me->GetEntry())
{
- eregos->DespawnOrUnsummon(); // On retail this kills abusive call of drake during engaged Eregos
+ case NPC_RUBY_DRAKE_VEHICLE:
+ me->CastSpell(summoner, SPELL_RIDE_RUBY_DRAKE_QUE);
+ break;
+ case NPC_EMERALD_DRAKE_VEHICLE:
+ me->CastSpell(summoner, SPELL_RIDE_EMERALD_DRAKE_QUE);
+ break;
+ case NPC_AMBER_DRAKE_VEHICLE:
+ me->CastSpell(summoner, SPELL_RIDE_AMBER_DRAKE_QUE);
+ break;
+ default:
+ return;
}
- summonerGUID = summoner->GetGUID();
- me->SetFacingToObject(summoner);
- // TO DO: Drake Ques should be casted from vehicle to player, however the way core handle triggered spells from auras break it no matter the conditions. So this change the caster and give the same result until someone fix triggered spells from auras that involve implicit targets or make exception for this case.
- if (me->GetEntry() == NPC_RUBY_DRAKE_VEHICLE)
- summoner->CastSpell(summoner, SPELL_RIDE_RUBY_DRAKE_QUE);
- if (me->GetEntry() == NPC_EMERALD_DRAKE_VEHICLE)
- summoner->CastSpell(summoner, SPELL_RIDE_EMERALD_DRAKE_QUE);
- if (me->GetEntry() == NPC_AMBER_DRAKE_VEHICLE)
- summoner->CastSpell(summoner, SPELL_RIDE_AMBER_DRAKE_QUE);
- Position pos;
- summoner->GetPosition(&pos);
- me->GetMotionMaster()->MovePoint(0, pos);
- }
- void MovementInform(uint32 type, uint32 id) OVERRIDE
- {
- if (type == POINT_MOTION_TYPE && id == 0)
- me->SetDisableGravity(false); // Needed this for proper animation after spawn, the summon in air fall to ground bug leave no other option for now, if this isn't used the drake will only walk on move.
- }
+ Position pos;
+ summoner->GetPosition(&pos);
+ me->GetMotionMaster()->MovePoint(POINT_LAND, pos);
+ }
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (!(instance->GetBossState(DATA_VAROS_EVENT) == DONE))
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
- if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
- {
- if (!(WelcomeOff))
- {
- if (WelcomeTimer <= diff)
- {
- Talk(WHISPER_DRAKES_WELCOME, me->GetCreatorGUID());
- WelcomeOff = true;
- WelcomeSequelOff = true;
- }
- else WelcomeTimer -= diff;
- }
- }
+ if (type == POINT_MOTION_TYPE && id == POINT_LAND)
+ me->SetDisableGravity(false); // Needed this for proper animation after spawn, the summon in air fall to ground bug leave no other option for now, if this isn't used the drake will only walk on move.
}
- if (me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE))
+
+ void PassengerBoarded(Unit* passenger, int8 /*seatId*/, bool apply) OVERRIDE
{
- if (WelcomeSequelOff)
+ if (passenger->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ if (apply)
{
- if (WelcomeSequelTimer <= diff)
- {
- Talk(WHISPER_DRAKES_ABILITIES, me->GetCreatorGUID());
- WelcomeSequelOff = false;
- }
- else WelcomeSequelTimer -= diff;
- }
+ if (_instance->GetBossState(DATA_VAROS) != DONE)
+ _events.ScheduleEvent(EVENT_WELCOME, 10 * IN_MILLISECONDS);
- if (instance->GetBossState(DATA_UROM_EVENT) == DONE)
+ else if (_instance->GetBossState(DATA_UROM) == DONE)
+ _events.ScheduleEvent(EVENT_SPECIAL_ATTACK, 10 * IN_MILLISECONDS);
+ }
+ else
{
- if (!(SpecialOff))
- {
- if (SpecialTimer <= diff)
- {
- Talk(WHISPER_DRAKES_SPECIAL, me->GetCreatorGUID());
- SpecialOff = true;
- }
- else SpecialTimer -= diff;
- }
+ _events.Reset();
+ _events.ScheduleEvent(EVENT_TAKE_OFF, 2 * IN_MILLISECONDS);
}
+ }
- if (!(HealthWarningOff))
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (_healthWarning)
{
if (me->GetHealthPct() <= 40.0f)
- {
- Talk(WHISPER_DRAKES_LOWHEALTH, me->GetCreatorGUID());
- HealthWarningOff = true;
- }
+ _events.ScheduleEvent(EVENT_LOW_HEALTH, 0);
}
- if (HealthWarningOff)
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
{
- if (WarningTimer <= diff)
+ switch (eventId)
{
- HealthWarningOff = false;
- WarningTimer = 25000;
+ case EVENT_WELCOME:
+ Talk(WHISPER_DRAKES_WELCOME, me->GetCreatorGUID());
+ _events.ScheduleEvent(EVENT_ABILITIES, 5 * IN_MILLISECONDS);
+ break;
+ case EVENT_ABILITIES:
+ Talk(WHISPER_DRAKES_ABILITIES, me->GetCreatorGUID());
+ break;
+ case EVENT_SPECIAL_ATTACK:
+ Talk(WHISPER_DRAKES_SPECIAL, me->GetCreatorGUID());
+ break;
+ case EVENT_LOW_HEALTH:
+ Talk(WHISPER_DRAKES_LOWHEALTH, me->GetCreatorGUID());
+ _healthWarning = false;
+ _events.ScheduleEvent(EVENT_RESET_LOW_HEALTH, 25000);
+ break;
+ case EVENT_RESET_LOW_HEALTH:
+ _healthWarning = true;
+ break;
+ case EVENT_TAKE_OFF:
+ {
+ me->DespawnOrUnsummon(2050);
+ me->SetOrientation(2.5f);
+ me->SetSpeed(MOVE_FLIGHT, 1.0f, true);
+ Talk(SAY_DRAKES_TAKEOFF);
+ Position pos;
+ me->GetPosition(&pos);
+ Position offset = { 10.0f, 10.0f, 12.0f, 0.0f };
+ pos.RelocateOffset(offset);
+ me->SetDisableGravity(true);
+ me->GetMotionMaster()->MovePoint(POINT_TAKE_OFF, pos);
+ break;
+ }
+ default:
+ break;
}
- else WarningTimer -= diff;
}
- }
+ };
- if (!(me->HasAuraType(SPELL_AURA_CONTROL_VEHICLE)))
- {
- if (!(DisableTakeOff))
- {
- if (TakeOffTimer <= diff)
- {
- me->DespawnOrUnsummon(2050);
- me->SetOrientation(2.5f);
- me->SetSpeed(MOVE_FLIGHT, 1.0f, true);
- Talk(SAY_DRAKES_TAKEOFF);
- Position pos;
- me->GetPosition(&pos);
- pos.m_positionX += 10.0f;
- pos.m_positionY += 10.0f;
- pos.m_positionZ += 12.0f;
- me->GetMotionMaster()->MovePoint(1, pos);
- DisableTakeOff = true;
- }
- else TakeOffTimer -= diff;
- }
- }
+ private:
+ InstanceScript* _instance;
+ EventMap _events;
+ bool _healthWarning;
};
- };
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_ruby_emerald_amber_drakeAI(creature);
- }
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetOculusAI<npc_ruby_emerald_amber_drakeAI>(creature);
+ }
};
-class spell_gen_stop_time : public SpellScriptLoader
+// 49345 - Call Emerald Drake
+// 49461 - Call Amber Drake
+// 49462 - Call Ruby Drake
+class spell_oculus_call_ruby_emerald_amber_drake : public SpellScriptLoader
{
-public:
- spell_gen_stop_time() : SpellScriptLoader("spell_gen_stop_time") { }
-
- class spell_gen_stop_time_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_gen_stop_time_AuraScript);
+ public:
+ spell_oculus_call_ruby_emerald_amber_drake() : SpellScriptLoader("spell_oculus_call_ruby_emerald_amber_drake") { }
- void Apply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ class spell_oculus_call_ruby_emerald_amber_drake_SpellScript : public SpellScript
{
- Unit* caster = GetCaster();
- if (!caster)
- return;
- Unit* target = GetTarget();
- for (uint32 i = 0; i < 5; ++i)
- caster->CastSpell(target, SPELL_SHOCK_CHARGE, false);
- }
+ PrepareSpellScript(spell_oculus_call_ruby_emerald_amber_drake_SpellScript);
- void Register() OVERRIDE
+ void ChangeSummonPos(SpellEffIndex /*effIndex*/)
+ {
+ // Adjust effect summon position
+ WorldLocation summonPos = *GetExplTargetDest();
+ Position offset = { 0.0f, 0.0f, 12.0f, 0.0f };
+ summonPos.RelocateOffset(offset);
+ SetExplTargetDest(summonPos);
+ GetHitDest()->RelocateOffset(offset);
+ }
+
+ void ModDestHeight(SpellEffIndex /*effIndex*/)
+ {
+ // Used to cast visual effect at proper position
+ Position offset = { 0.0f, 0.0f, 12.0f, 0.0f };
+ const_cast<WorldLocation*>(GetExplTargetDest())->RelocateOffset(offset);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHit += SpellEffectFn(spell_oculus_call_ruby_emerald_amber_drake_SpellScript::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
+ OnEffectLaunch += SpellEffectFn(spell_oculus_call_ruby_emerald_amber_drake_SpellScript::ModDestHeight, EFFECT_0, SPELL_EFFECT_SUMMON);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
{
- AfterEffectApply += AuraEffectApplyFn(spell_gen_stop_time_AuraScript::Apply, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
+ return new spell_oculus_call_ruby_emerald_amber_drake_SpellScript();
}
- };
-
- AuraScript* GetAuraScript() const OVERRIDE
- {
- return new spell_gen_stop_time_AuraScript();
- }
};
-class spell_call_ruby_emerald_amber_drake : public SpellScriptLoader
+// 49427 - Ride Emerald Drake Que
+// 49459 - Ride Amber Drake Que
+// 49463 - Ride Ruby Drake Que
+class spell_oculus_ride_ruby_emerald_amber_drake_que : public SpellScriptLoader
{
-public:
- spell_call_ruby_emerald_amber_drake() : SpellScriptLoader("spell_call_ruby_emerald_amber_drake") { }
+ public:
+ spell_oculus_ride_ruby_emerald_amber_drake_que() : SpellScriptLoader("spell_oculus_ride_ruby_emerald_amber_drake_que") { }
+
+ class spell_oculus_ride_ruby_emerald_amber_drake_que_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_oculus_ride_ruby_emerald_amber_drake_que_AuraScript);
- class spell_call_ruby_emerald_amber_drake_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_call_ruby_emerald_amber_drake_SpellScript);
+ void HandlePeriodic(AuraEffect const* aurEff)
+ {
+ // caster of the triggered spell is wrong for an unknown reason, handle it here correctly
+ PreventDefaultAction();
+ if (Unit* caster = GetCaster())
+ GetTarget()->CastSpell(caster, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_oculus_ride_ruby_emerald_amber_drake_que_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
- void ChangeSummonPos(SpellEffIndex /*effIndex*/)
+ AuraScript* GetAuraScript() const OVERRIDE
{
- // Adjust effect summon position
- WorldLocation summonPos = *GetExplTargetDest();
- Position offset = {0.0f, 0.0f, 12.0f, 0.0f};
- summonPos.RelocateOffset(offset);
- SetExplTargetDest(summonPos);
- GetHitDest()->RelocateOffset(offset);
+ return new spell_oculus_ride_ruby_emerald_amber_drake_que_AuraScript();
}
+};
+
+// 49838 - Stop Time
+class spell_oculus_stop_time : public SpellScriptLoader
+{
+ public:
+ spell_oculus_stop_time() : SpellScriptLoader("spell_oculus_stop_time") { }
- void ModDestHeight(SpellEffIndex /*effIndex*/)
+ class spell_oculus_stop_time_AuraScript : public AuraScript
{
- // Used to cast visual effect at proper position
- Position offset = {0.0f, 0.0f, 12.0f, 0.0f};
- const_cast<WorldLocation*>(GetExplTargetDest())->RelocateOffset(offset);
- }
+ PrepareAuraScript(spell_oculus_stop_time_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_AMBER_SHOCK_CHARGE))
+ return false;
+ return true;
+ }
+
+ void Apply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* caster = GetCaster();
+ if (!caster)
+ return;
- void Register() OVERRIDE
+ Unit* target = GetTarget();
+ for (uint32 i = 0; i < 5; ++i)
+ caster->CastSpell(target, SPELL_AMBER_SHOCK_CHARGE, false);
+ }
+
+ void Register() OVERRIDE
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_oculus_stop_time_AuraScript::Apply, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
{
- OnEffectHit += SpellEffectFn(spell_call_ruby_emerald_amber_drake_SpellScript::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
- OnEffectLaunch += SpellEffectFn(spell_call_ruby_emerald_amber_drake_SpellScript::ModDestHeight, EFFECT_0, SPELL_EFFECT_SUMMON);
+ return new spell_oculus_stop_time_AuraScript();
}
- };
-
- SpellScript* GetSpellScript() const OVERRIDE
- {
- return new spell_call_ruby_emerald_amber_drake_SpellScript();
- }
};
-
class spell_oculus_touch_the_nightmare : public SpellScriptLoader
{
public:
@@ -582,8 +533,9 @@ void AddSC_oculus()
new npc_verdisa_beglaristrasz_eternos();
new npc_image_belgaristrasz();
new npc_ruby_emerald_amber_drake();
- new spell_gen_stop_time();
- new spell_call_ruby_emerald_amber_drake();
+ new spell_oculus_call_ruby_emerald_amber_drake();
+ new spell_oculus_ride_ruby_emerald_amber_drake_que();
+ new spell_oculus_stop_time();
new spell_oculus_touch_the_nightmare();
new spell_oculus_dream_funnel();
}
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
index 2dd5df3bc3b..6f34cfbf6e5 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h
@@ -15,59 +15,55 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef DEF_OCULUS_H
-#define DEF_OCULUS_H
+#ifndef OCULUS_H_
+#define OCULUS_H_
-enum Data
-{
- DATA_DRAKOS_EVENT,
- DATA_VAROS_EVENT,
- DATA_UROM_EVENT,
- DATA_EREGOS_EVENT,
- DATA_UROM_PLATAFORM
-};
+#define OculusScriptName "instance_oculus"
+
+uint32 const EncounterCount = 4;
-enum Data64
+enum DataTypes
{
- DATA_DRAKOS,
- DATA_VAROS,
- DATA_UROM,
- DATA_EREGOS
+ // Encounter States/Boss GUIDs
+ DATA_DRAKOS = 0,
+ DATA_VAROS = 1,
+ DATA_UROM = 2,
+ DATA_EREGOS = 3
};
-enum Bosses_NPCs
+enum CreatureIds
{
NPC_DRAKOS = 27654,
NPC_VAROS = 27447,
NPC_UROM = 27655,
NPC_EREGOS = 27656,
- NPC_AZURE_RING_GUARDIAN = 28236,
- NPC_CENTRIFUGE_CONSTRUCT = 27641,
- NPC_RUBY_DRAKE_VEHICLE = 27756,
- NPC_EMERALD_DRAKE_VEHICLE = 27692,
- NPC_AMBER_DRAKE_VEHICLE = 27755,
- NPC_VERDISA = 27657,
- NPC_BELGARISTRASZ = 27658,
- NPC_ETERNOS = 27659,
- NPC_GREATER_WHELP = 28276
+ NPC_AZURE_RING_GUARDIAN = 28236,
+ NPC_CENTRIFUGE_CONSTRUCT = 27641,
+ NPC_RUBY_DRAKE_VEHICLE = 27756,
+ NPC_EMERALD_DRAKE_VEHICLE = 27692,
+ NPC_AMBER_DRAKE_VEHICLE = 27755,
+ NPC_VERDISA = 27657,
+ NPC_BELGARISTRASZ = 27658,
+ NPC_ETERNOS = 27659,
+ NPC_GREATER_WHELP = 28276
};
-enum GameObjects
+enum GameObjectIds
{
- GO_DRAGON_CAGE_DOOR = 193995,
- GO_EREGOS_CACHE_N = 191349,
- GO_EREGOS_CACHE_H = 193603
+ GO_DRAGON_CAGE_DOOR = 193995,
+ GO_EREGOS_CACHE_N = 191349,
+ GO_EREGOS_CACHE_H = 193603
};
enum SpellEvents
{
- EVENT_CALL_DRAGON = 12229
+ EVENT_CALL_DRAGON = 12229
};
enum CreatureActions
{
- ACTION_CALL_DRAGON_EVENT = 1
+ ACTION_CALL_DRAGON_EVENT = 1
};
enum OculusWorldStates
@@ -78,7 +74,19 @@ enum OculusWorldStates
enum OculusSpells
{
- SPELL_CENTRIFUGE_SHIELD = 50053,
- SPELL_DEATH_SPELL = 50415
+ SPELL_CENTRIFUGE_SHIELD = 50053,
+ SPELL_DEATH_SPELL = 50415
};
-#endif
+
+enum Misc
+{
+ POINT_MOVE_OUT = 1
+};
+
+template<class AI>
+AI* GetOculusAI(Creature* creature)
+{
+ return GetInstanceAI<AI>(creature, OculusScriptName);
+}
+
+#endif // OCULUS_H_
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index 8f69d905d6f..aa3c034da6e 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -295,7 +295,7 @@ class SummonUnleashedDarkMatter : public BasicEvent
class boss_algalon_the_observer : public CreatureScript
{
public:
- boss_algalon_the_observer() : CreatureScript("boss_algalon_the_observer") {}
+ boss_algalon_the_observer() : CreatureScript("boss_algalon_the_observer") { }
struct boss_algalon_the_observerAI : public BossAI
{
@@ -957,7 +957,7 @@ class npc_brann_bronzebeard_algalon : public CreatureScript
class go_celestial_planetarium_access : public GameObjectScript
{
public:
- go_celestial_planetarium_access() : GameObjectScript("go_celestial_planetarium_access") {}
+ go_celestial_planetarium_access() : GameObjectScript("go_celestial_planetarium_access") { }
struct go_celestial_planetarium_accessAI : public GameObjectAI
{
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 dec27808321..554556e4084 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -680,7 +680,7 @@ class boss_flame_leviathan_defense_turret : public CreatureScript
struct boss_flame_leviathan_defense_turretAI : public TurretAI
{
- boss_flame_leviathan_defense_turretAI(Creature* creature) : TurretAI(creature) {}
+ boss_flame_leviathan_defense_turretAI(Creature* creature) : TurretAI(creature) { }
void DamageTaken(Unit* who, uint32 &damage) OVERRIDE
{
@@ -858,7 +858,7 @@ class npc_pool_of_tar : public CreatureScript
me->CastSpell(me, SPELL_BLAZE, true);
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
@@ -1498,7 +1498,7 @@ class spell_auto_repair : public SpellScriptLoader
};
public:
- spell_auto_repair() : SpellScriptLoader("spell_auto_repair") {}
+ spell_auto_repair() : SpellScriptLoader("spell_auto_repair") { }
class spell_auto_repair_SpellScript : public SpellScript
{
@@ -1607,7 +1607,7 @@ class FlameLeviathanPursuedTargetSelector
};
public:
- explicit FlameLeviathanPursuedTargetSelector(Unit* unit) : _me(unit) {};
+ explicit FlameLeviathanPursuedTargetSelector(Unit* unit) : _me(unit) { };
bool operator()(WorldObject* target) const
{
@@ -1645,7 +1645,7 @@ class FlameLeviathanPursuedTargetSelector
class spell_pursue : public SpellScriptLoader
{
public:
- spell_pursue() : SpellScriptLoader("spell_pursue") {}
+ spell_pursue() : SpellScriptLoader("spell_pursue") { }
class spell_pursue_SpellScript : public SpellScript
{
@@ -1717,7 +1717,7 @@ class spell_pursue : public SpellScriptLoader
class spell_vehicle_throw_passenger : public SpellScriptLoader
{
public:
- spell_vehicle_throw_passenger() : SpellScriptLoader("spell_vehicle_throw_passenger") {}
+ spell_vehicle_throw_passenger() : SpellScriptLoader("spell_vehicle_throw_passenger") { }
class spell_vehicle_throw_passenger_SpellScript : public SpellScript
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
index dfeeebaae99..ec2cf36822d 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp
@@ -361,7 +361,7 @@ class spell_ulduar_rubble_summon : public SpellScriptLoader
class StoneGripTargetSelector : public std::unary_function<Unit*, bool>
{
public:
- StoneGripTargetSelector(Creature* me, Unit const* victim) : _me(me), _victim(victim) {}
+ StoneGripTargetSelector(Creature* me, Unit const* victim) : _me(me), _victim(victim) { }
bool operator()(WorldObject* target)
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
index fb835b5a4d9..31c635c7de5 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
@@ -307,7 +307,7 @@ class boss_razorscale_controller : public CreatureScript
class go_razorscale_harpoon : public GameObjectScript
{
public:
- go_razorscale_harpoon() : GameObjectScript("go_razorscale_harpoon") {}
+ go_razorscale_harpoon() : GameObjectScript("go_razorscale_harpoon") { }
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
@@ -851,7 +851,7 @@ class npc_darkrune_watcher : public CreatureScript
struct npc_darkrune_watcherAI : public ScriptedAI
{
- npc_darkrune_watcherAI(Creature* creature) : ScriptedAI(creature){}
+ npc_darkrune_watcherAI(Creature* creature) : ScriptedAI(creature){ }
uint32 ChainTimer;
uint32 LightTimer;
@@ -900,7 +900,7 @@ class npc_darkrune_guardian : public CreatureScript
struct npc_darkrune_guardianAI : public ScriptedAI
{
- npc_darkrune_guardianAI(Creature* creature) : ScriptedAI(creature){}
+ npc_darkrune_guardianAI(Creature* creature) : ScriptedAI(creature){ }
uint32 StormTimer;
@@ -955,7 +955,7 @@ class npc_darkrune_sentinel : public CreatureScript
struct npc_darkrune_sentinelAI : public ScriptedAI
{
- npc_darkrune_sentinelAI(Creature* creature) : ScriptedAI(creature){}
+ npc_darkrune_sentinelAI(Creature* creature) : ScriptedAI(creature){ }
uint32 HeroicTimer;
uint32 WhirlTimer;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
index bed7bd86b91..12925f1c6e1 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_xt002.cpp
@@ -459,7 +459,7 @@ class npc_xt002_heart : public CreatureScript
SetCombatMovement(false);
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
index 7fcb624c35e..4ba6d948f1a 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
@@ -1047,7 +1047,7 @@ class boss_brain_of_yogg_saron : public CreatureScript
}
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
void DoAction(int32 action) OVERRIDE
{
@@ -1132,7 +1132,7 @@ class npc_ominous_cloud : public CreatureScript
}
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
void DoAction(int32 action) OVERRIDE
{
@@ -1400,7 +1400,7 @@ class npc_influence_tentacle : public CreatureScript
brain->AI()->DoAction(ACTION_TENTACLE_KILLED);
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
private:
InstanceScript* _instance;
@@ -1431,7 +1431,7 @@ class npc_descend_into_madness : public CreatureScript
me->DespawnOrUnsummon();
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
private:
InstanceScript* _instance;
@@ -1544,7 +1544,7 @@ class npc_observation_ring_keeper : public CreatureScript
}
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
@@ -1914,7 +1914,7 @@ class npc_laughing_skull : public CreatureScript
}
// don't evade, otherwise the Lunatic Gaze aura is removed
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
index b46a41af678..75aa2994dbc 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_keleseth.cpp
@@ -321,7 +321,7 @@ class npc_vrykul_skeleton : public CreatureScript
class spell_frost_tomb : public SpellScriptLoader
{
public:
- spell_frost_tomb() : SpellScriptLoader("spell_frost_tomb") {}
+ spell_frost_tomb() : SpellScriptLoader("spell_frost_tomb") { }
class spell_frost_tomb_AuraScript : public AuraScript
{
@@ -352,7 +352,7 @@ class spell_frost_tomb : public SpellScriptLoader
class achievement_on_the_rocks : public AchievementCriteriaScript
{
public:
- achievement_on_the_rocks() : AchievementCriteriaScript("achievement_on_the_rocks") {}
+ achievement_on_the_rocks() : AchievementCriteriaScript("achievement_on_the_rocks") { }
bool OnCheck(Player* /*source*/, Unit* target) OVERRIDE
{
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 ffdd8fe232f..5247f9019da 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp
@@ -61,7 +61,7 @@ enum Spells
class SkarvaldChargePredicate
{
public:
- SkarvaldChargePredicate(Unit* unit) : me(unit) {}
+ SkarvaldChargePredicate(Unit* unit) : me(unit) { }
bool operator() (WorldObject* object) const
{
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
index b70bda76d76..77c19422da0 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp
@@ -58,19 +58,14 @@ enum Creatures
NPC_STASIS_CONTROLLER = 26688
};
-struct Locations
+Position const moveLocs[] =
{
- float x, y, z;
-};
-
-struct Locations moveLocs[]=
-{
- {261.6f, -449.3f, 109.5f},
- {263.3f, -454.0f, 109.5f},
- {291.5f, -450.4f, 109.5f},
- {291.5f, -454.0f, 109.5f},
- {310.0f, -453.4f, 109.5f},
- {238.6f, -460.7f, 109.5f}
+ { 261.6f, -449.3f, 109.5f, 0.0f },
+ { 263.3f, -454.0f, 109.5f, 0.0f },
+ { 291.5f, -450.4f, 109.5f, 0.0f },
+ { 291.5f, -454.0f, 109.5f, 0.0f },
+ { 310.0f, -453.4f, 109.5f, 0.0f },
+ { 238.6f, -460.7f, 109.5f, 0.0f }
};
enum Phase
@@ -83,21 +78,20 @@ enum Phase
PHASE_NONE
};
+enum Misc
+{
+ ACTION_NEXT_PHASE,
+};
+
class boss_palehoof : public CreatureScript
{
public:
boss_palehoof() : CreatureScript("boss_palehoof") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ struct boss_palehoofAI : public BossAI
{
- return new boss_palehoofAI(creature);
- }
-
- struct boss_palehoofAI : public ScriptedAI
- {
- boss_palehoofAI(Creature* creature) : ScriptedAI(creature)
+ boss_palehoofAI(Creature* creature) : BossAI(creature, DATA_GORTOK_PALEHOOF)
{
- instance = creature->GetInstanceScript();
}
uint32 uiArcingSmashTimer;
@@ -108,10 +102,10 @@ public:
uint8 AddCount;
Phase Sequence[4];
- InstanceScript* instance;
-
void Reset() OVERRIDE
{
+ _Reset();
+
/// There is a good reason to store them like this, we are going to shuffle the order.
for (uint32 i = PHASE_FRENZIED_WORGEN; i < PHASE_GORTOK_PALEHOOF; ++i)
Sequence[i] = Phase(i);
@@ -129,32 +123,15 @@ public:
currentPhase = PHASE_NONE;
- if (instance)
- {
- instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, NOT_STARTED);
-
- Creature* temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_FRENZIED_WORGEN));
- if (temp && !temp->IsAlive())
- temp->Respawn();
+ for (uint8 i = DATA_FRENZIED_WORGEN; i <= DATA_FEROCIOUS_RHINO; ++i)
+ if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(i)))
+ if (!temp->IsAlive())
+ temp->Respawn();
- temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_FEROCIOUS_RHINO));
- if (temp && !temp->IsAlive())
- temp->Respawn();
-
- temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_MASSIVE_JORMUNGAR));
- if (temp && !temp->IsAlive())
- temp->Respawn();
-
- temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_RAVENOUS_FURBOLG));
- if (temp && !temp->IsAlive())
- temp->Respawn();
-
- GameObject* go = instance->instance->GetGameObject(instance->GetData64(DATA_GORTOK_PALEHOOF_SPHERE));
- if (go)
- {
- go->SetGoState(GO_STATE_READY);
- go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
- }
+ if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GORTOK_PALEHOOF_SPHERE)))
+ {
+ go->SetGoState(GO_STATE_READY);
+ go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
}
}
@@ -185,14 +162,9 @@ public:
if (currentPhase != PHASE_GORTOK_PALEHOOF)
return;
- //Return since we have no target
if (!UpdateVictim())
return;
- Creature* temp = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_ORB) : 0);
- if (temp && temp->IsAlive())
- temp->DisappearAndDie();
-
if (uiArcingSmashTimer <= diff)
{
DoCast(me, SPELL_ARCING_SMASH);
@@ -217,12 +189,8 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
- //Talk(SAY_DEATH);
- if (instance)
- instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, DONE);
- Creature* temp = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_ORB) : 0);
- if (temp && temp->IsAlive())
- temp->DisappearAndDie();
+ _JustDied();
+ //Talk(SAY_DEATH);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
@@ -230,28 +198,30 @@ public:
Talk(SAY_SLAY);
}
- void NextPhase()
+ void DoAction(int32 actionId) OVERRIDE
{
+ if (actionId != ACTION_NEXT_PHASE)
+ return;
+
if (currentPhase == PHASE_NONE)
{
- if (instance)
- instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_GORTOK_PALEHOOF, IN_PROGRESS);
- me->SummonCreature(NPC_STASIS_CONTROLLER, moveLocs[5].x, moveLocs[5].y, moveLocs[5].z, 0, TEMPSUMMON_CORPSE_DESPAWN);
+ if (Creature* orb = me->SummonCreature(NPC_STASIS_CONTROLLER, moveLocs[5], TEMPSUMMON_CORPSE_DESPAWN))
+ orb->CastSpell(me, SPELL_ORB_VISUAL, true);
}
+
Phase move = PHASE_NONE;
if (AddCount >= DUNGEON_MODE(2, 4))
move = PHASE_GORTOK_PALEHOOF;
else
move = Sequence[AddCount++];
- //send orb to summon spot
- Creature* pOrb = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_ORB) : 0);
- if (pOrb && pOrb->IsAlive())
- {
- if (currentPhase == PHASE_NONE)
- pOrb->CastSpell(me, SPELL_ORB_VISUAL, true);
- pOrb->GetMotionMaster()->MovePoint(move, moveLocs[move].x, moveLocs[move].y, moveLocs[move].z);
- }
+
+ // send orb to summon spot
+ if (Creature* orb = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_ORB)))
+ if (orb->IsAlive())
+ orb->GetMotionMaster()->MovePoint(move, moveLocs[move]);
+
currentPhase = move;
}
@@ -263,6 +233,10 @@ public:
}
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetUtgardePinnacleAI<boss_palehoofAI>(creature);
+ }
};
//ravenous furbolg's spells
@@ -305,13 +279,12 @@ public:
me->GetMotionMaster()->MoveTargetedHome();
- if (instance)
- if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof && pPalehoof->IsAlive())
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
- }
+ if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
+ {
+ Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
+ if (palehoof && palehoof->IsAlive())
+ palehoof->AI()->Reset();
+ }
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -360,12 +333,8 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (instance)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof)
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
- }
+ if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
+ palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
}
void JustReachedHome() OVERRIDE
@@ -418,13 +387,12 @@ public:
me->GetMotionMaster()->MoveTargetedHome();
- if (instance)
- if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof && pPalehoof->IsAlive())
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
- }
+ if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
+ {
+ Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
+ if (palehoof && palehoof->IsAlive())
+ palehoof->AI()->Reset();
+ }
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -470,17 +438,13 @@ public:
DoStartMovement(who);
}
if (instance)
- instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_GORTOK_PALEHOOF, IN_PROGRESS);
}
void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (instance)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance->GetData64(DATA_GORTOK_PALEHOOF));
- if (pPalehoof)
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
- }
+ if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
+ palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
}
void JustReachedHome() OVERRIDE
@@ -534,13 +498,12 @@ public:
me->GetMotionMaster()->MoveTargetedHome();
- if (instance)
- if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof && pPalehoof->IsAlive())
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
- }
+ if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
+ {
+ Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
+ if (palehoof && palehoof->IsAlive())
+ palehoof->AI()->Reset();
+ }
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -590,12 +553,8 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (instance)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof)
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
- }
+ if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
+ palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
}
void JustReachedHome() OVERRIDE
@@ -654,13 +613,12 @@ public:
me->GetMotionMaster()->MoveTargetedHome();
- if (instance)
- if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof && pPalehoof->IsAlive())
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
- }
+ if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
+ {
+ Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
+ if (palehoof && palehoof->IsAlive())
+ palehoof->AI()->Reset();
+ }
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -711,12 +669,8 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (instance)
- {
- Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof)
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
- }
+ if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
+ palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
}
void JustReachedHome() OVERRIDE
@@ -767,52 +721,76 @@ public:
if (SummonTimer <= diff)
{
- if (currentPhase<5&&currentPhase >= 0)
+ uint8 nextBossId = 0;
+ switch (currentPhase)
{
- Creature* pNext = NULL;
- switch (currentPhase)
- {
- case PHASE_FRENZIED_WORGEN: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FRENZIED_WORGEN) : 0); break;
- case PHASE_RAVENOUS_FURLBORG: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_RAVENOUS_FURBOLG) : 0); break;
- case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_MASSIVE_JORMUNGAR) : 0); break;
- case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FEROCIOUS_RHINO) : 0); break;
- case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
- default: break;
- }
-
- if (pNext)
- {
- pNext->RemoveAurasDueToSpell(SPELL_FREEZE);
- pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
- pNext->SetStandState(UNIT_STAND_STATE_STAND);
- pNext->SetInCombatWithZone();
- pNext->Attack(pNext->SelectNearestTarget(100), true);
-
- }
- currentPhase = PHASE_NONE;
+ case PHASE_FRENZIED_WORGEN:
+ nextBossId = DATA_FRENZIED_WORGEN;
+ break;
+ case PHASE_RAVENOUS_FURLBORG:
+ nextBossId = DATA_RAVENOUS_FURBOLG;
+ break;
+ case PHASE_MASSIVE_JORMUNGAR:
+ nextBossId = DATA_MASSIVE_JORMUNGAR;
+ break;
+ case PHASE_FEROCIOUS_RHINO:
+ nextBossId = DATA_FEROCIOUS_RHINO;
+ break;
+ case PHASE_GORTOK_PALEHOOF:
+ nextBossId = DATA_GORTOK_PALEHOOF;
+ break;
+ default:
+ return;
}
- } else SummonTimer -= diff;
+
+ if (Creature* nextBoss = ObjectAccessor::GetCreature(*me, instance->GetData64(nextBossId)))
+ {
+ nextBoss->RemoveAurasDueToSpell(SPELL_FREEZE);
+ nextBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
+ nextBoss->SetStandState(UNIT_STAND_STATE_STAND);
+ nextBoss->SetInCombatWithZone();
+ nextBoss->Attack(nextBoss->SelectNearestTarget(100), true);
+ }
+ currentPhase = PHASE_NONE;
+
+ if (nextBossId == DATA_GORTOK_PALEHOOF)
+ me->DespawnOrUnsummon();
+ }
+ else
+ SummonTimer -= diff;
}
void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
- if (id > 4)
- return;
- Creature* pNext = NULL;
+
+ uint8 nextBossId = 0;
switch (id)
{
- case PHASE_FRENZIED_WORGEN: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FRENZIED_WORGEN) : 0); break;
- case PHASE_RAVENOUS_FURLBORG: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_RAVENOUS_FURBOLG) : 0); break;
- case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_MASSIVE_JORMUNGAR) : 0); break;
- case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FEROCIOUS_RHINO) : 0); break;
- case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
- default: break;
+ case PHASE_FRENZIED_WORGEN:
+ nextBossId = DATA_FRENZIED_WORGEN;
+ break;
+ case PHASE_RAVENOUS_FURLBORG:
+ nextBossId = DATA_RAVENOUS_FURBOLG;
+ break;
+ case PHASE_MASSIVE_JORMUNGAR:
+ nextBossId = DATA_MASSIVE_JORMUNGAR;
+ break;
+ case PHASE_FEROCIOUS_RHINO:
+ nextBossId = DATA_FEROCIOUS_RHINO;
+ break;
+ case PHASE_GORTOK_PALEHOOF:
+ nextBossId = DATA_GORTOK_PALEHOOF;
+ break;
+ default:
+ return;
}
- if (pNext)
- DoCast(pNext, SPELL_ORB_CHANNEL, false);
- currentPhase = (Phase)id;
+
+ if (Creature* nextBoss = ObjectAccessor::GetCreature(*me, instance->GetData64(nextBossId)))
+ DoCast(nextBoss, SPELL_ORB_CHANNEL, false);
+
+ currentPhase = Phase(id);
SummonTimer = 5000;
}
};
@@ -821,23 +799,25 @@ public:
class go_palehoof_sphere : public GameObjectScript
{
-public:
- go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
-
- bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
- {
- InstanceScript* instance = go->GetInstanceScript();
+ public:
+ go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
- Creature* pPalehoof = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
- if (pPalehoof && pPalehoof->IsAlive())
+ bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
- go->SetGoState(GO_STATE_ACTIVE);
+ InstanceScript* instance = go->GetInstanceScript();
+ if (!instance)
+ return false;
+
+ Creature* palehoof = ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_GORTOK_PALEHOOF));
+ if (palehoof && palehoof->IsAlive())
+ {
+ go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ go->SetGoState(GO_STATE_ACTIVE);
- CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
+ palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
+ }
+ return true;
}
- return true;
- }
};
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
index 08670af939a..01fcd9a665d 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
@@ -210,7 +210,7 @@ public:
me->SummonCreature(NPC_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f);
if (instance)
{
- instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, NOT_STARTED);
+ instance->SetBossState(DATA_SKADI_THE_RUTHLESS, NOT_STARTED);
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
}
}
@@ -237,7 +237,7 @@ public:
me->SetInCombatWithZone();
if (instance)
{
- instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, IN_PROGRESS);
+ instance->SetBossState(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS);
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
me->GetMotionMaster()->MoveJump(Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 5.0f, 10.0f);
me->SetWalk(false);
@@ -412,7 +412,7 @@ public:
Talk(SAY_DEATH);
Summons.DespawnAll();
if (instance)
- instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, DONE);
+ instance->SetBossState(DATA_SKADI_THE_RUTHLESS, DONE);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
index b8fa87106a4..d518747a462 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
@@ -74,7 +74,6 @@ enum Yells
enum Creatures
{
NPC_ARTHAS = 29280, // Image of Arthas
- NPC_SVALA_SORROWGRAVE = 26668, // Svala after transformation
NPC_RITUAL_CHANNELER = 27281,
NPC_SPECTATOR = 26667,
NPC_RITUAL_TARGET = 27327,
@@ -82,11 +81,6 @@ enum Creatures
NPC_SCOURGE_HULK = 26555
};
-enum GameObjects
-{
- GO_UTGARDE_MIRROR = 191745
-};
-
enum SvalaPhase
{
IDLE,
@@ -101,191 +95,159 @@ enum Misc
DATA_INCREDIBLE_HULK = 2043
};
-static const float spectatorWP[2][3] =
+Position const spectatorWP[2] =
{
- {296.95f, -312.76f, 86.36f},
- {297.69f, -275.81f, 86.36f}
+ {296.95f, -312.76f, 86.36f, 0.0f },
+ {297.69f, -275.81f, 86.36f, 0.0f }
};
-static Position ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f };
+Position const ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f };
class boss_svala : public CreatureScript
{
-public:
- boss_svala() : CreatureScript("boss_svala") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_svalaAI(creature);
- }
+ public:
+ boss_svala() : CreatureScript("boss_svala") { }
- struct boss_svalaAI : public ScriptedAI
- {
- boss_svalaAI(Creature* creature) : ScriptedAI(creature), summons(creature)
+ struct boss_svalaAI : public BossAI
{
- instance = creature->GetInstanceScript();
- Phase = IDLE;
-
- me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_RITUAL_STRIKE_EFF_1, true);
- me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_RITUAL_STRIKE_EFF_2, true);
- }
-
- InstanceScript* instance;
- SummonList summons;
- SvalaPhase Phase;
-
- Position pos;
- float x, y, z;
+ boss_svalaAI(Creature* creature) : BossAI(creature, DATA_SVALA_SORROWGRAVE)
+ {
+ Phase = IDLE;
+ }
- uint32 introTimer;
- uint8 introPhase;
- uint8 sacrePhase;
+ SvalaPhase Phase;
- TempSummon* arthas;
- uint64 arthasGUID;
+ uint32 introTimer;
+ uint8 introPhase;
+ uint8 sacrePhase;
- uint32 sinsterStrikeTimer;
- uint32 callFlamesTimer;
- uint32 sacrificeTimer;
+ uint64 arthasGUID;
- bool sacrificed;
+ uint32 sinsterStrikeTimer;
+ uint32 callFlamesTimer;
+ uint32 sacrificeTimer;
- void Reset() OVERRIDE
- {
- sacrificed = false;
- SetCombatMovement(true);
+ bool sacrificed;
- summons.DespawnAll();
- me->RemoveAllAuras();
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ sacrificed = false;
+ SetCombatMovement(true);
- if (Phase > NORMAL)
- Phase = NORMAL;
+ if (Phase > NORMAL)
+ Phase = NORMAL;
- me->SetDisableGravity(Phase == NORMAL);
+ me->SetDisableGravity(Phase == NORMAL);
- introTimer = 1 * IN_MILLISECONDS;
- introPhase = 0;
- arthasGUID = 0;
+ introTimer = 1 * IN_MILLISECONDS;
+ introPhase = 0;
+ sacrePhase = 0;
+ arthasGUID = 0;
- if (instance)
- {
- instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, NOT_STARTED);
instance->SetData64(DATA_SACRIFICED_PLAYER, 0);
}
- }
- void EnterCombat(Unit* /*who*/) OVERRIDE
- {
- Talk(SAY_AGGRO);
-
- sinsterStrikeTimer = 7 * IN_MILLISECONDS;
- callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
-
- if (instance)
- instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, IN_PROGRESS);
- }
-
- void JustSummoned(Creature* summon) OVERRIDE
- {
- if (summon->GetEntry() == NPC_RITUAL_CHANNELER)
- summon->CastSpell(summon, SPELL_SUMMONED_VIS, true);
-
- summons.Summon(summon);
- }
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ Talk(SAY_AGGRO);
- void SummonedCreatureDespawn(Creature* summon) OVERRIDE
- {
- summons.Despawn(summon);
- }
+ sinsterStrikeTimer = 7 * IN_MILLISECONDS;
+ callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ }
- void MoveInLineOfSight(Unit* who) OVERRIDE
+ void JustSummoned(Creature* summon) OVERRIDE
+ {
+ if (summon->GetEntry() == NPC_RITUAL_CHANNELER)
+ summon->CastSpell(summon, SPELL_SUMMONED_VIS, true);
- {
- if (!who)
- return;
+ summons.Summon(summon);
+ }
- if (Phase == IDLE && me->IsValidAttackTarget(who) && me->IsWithinDistInMap(who, 40))
+ void MoveInLineOfSight(Unit* who) OVERRIDE
{
- Phase = INTRO;
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
-
- if (GameObject* mirror = GetClosestGameObjectWithEntry(me, GO_UTGARDE_MIRROR, 100.0f))
- mirror->SetGoState(GO_STATE_READY);
+ if (!who)
+ return;
- if (Creature* arthas = me->SummonCreature(NPC_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN))
+ if (Phase == IDLE && me->IsValidAttackTarget(who) && me->IsWithinDistInMap(who, 40))
{
- arthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
- arthasGUID = arthas->GetGUID();
- }
- }
- }
+ Phase = INTRO;
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- void KilledUnit(Unit* victim) OVERRIDE
- {
- if (victim != me)
- Talk(SAY_SLAY);
- }
+ if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
+ mirror->SetGoState(GO_STATE_READY);
- void JustDied(Unit* /*killer*/) OVERRIDE
- {
- if (Phase == SACRIFICING)
- SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
+ if (Creature* arthas = me->SummonCreature(NPC_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN))
+ {
+ arthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ arthasGUID = arthas->GetGUID();
+ }
+ }
+ }
- me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
+ void KilledUnit(Unit* who) OVERRIDE
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
+ }
- summons.DespawnAll();
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (Phase == SACRIFICING)
+ SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
- if (instance)
- instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, DONE);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
- Talk(SAY_DEATH);
- }
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
- void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) OVERRIDE
- {
- if (spell->Id == SPELL_RITUAL_STRIKE_EFF_1 && Phase != NORMAL && Phase != SVALADEAD)
+ void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) OVERRIDE
{
- Phase = NORMAL;
- SetCombatMovement(true);
+ if (spellInfo->Id == SPELL_RITUAL_STRIKE_EFF_1 && Phase != NORMAL && Phase != SVALADEAD)
+ {
+ Phase = NORMAL;
+ SetCombatMovement(true);
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, true))
- me->GetMotionMaster()->MoveChase(target);
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, true))
+ me->GetMotionMaster()->MoveChase(target);
+ }
}
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (Phase == IDLE)
- return;
- if (Phase == INTRO)
+ void UpdateAI(uint32 diff) OVERRIDE
{
- if (introTimer <= diff)
- {
- Creature* arthas = Unit::GetCreature(*me, arthasGUID);
- if (!arthas)
- return;
+ if (Phase == IDLE)
+ return;
- switch (introPhase)
+ if (Phase == INTRO)
+ {
+ if (introTimer <= diff)
{
- case 0:
- Talk(SAY_SVALA_INTRO_0);
- ++introPhase;
- introTimer = 8100;
- break;
- case 1:
- arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_1);
- ++introPhase;
- introTimer = 10000;
- break;
- case 2:
- arthas->CastSpell(me, SPELL_TRANSFORMING_CHANNEL, false);
- pos.Relocate(me);
- pos.m_positionZ += 8.0f;
- me->GetMotionMaster()->MoveTakeoff(0, pos);
- // spectators flee event
- if (instance)
+ Creature* arthas = ObjectAccessor::GetCreature(*me, arthasGUID);
+ if (!arthas)
+ return;
+
+ switch (introPhase)
+ {
+ case 0:
+ Talk(SAY_SVALA_INTRO_0);
+ ++introPhase;
+ introTimer = 8100;
+ break;
+ case 1:
+ arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_1);
+ ++introPhase;
+ introTimer = 10000;
+ break;
+ case 2:
{
+ arthas->CastSpell(me, SPELL_TRANSFORMING_CHANNEL, false);
+ Position pos;
+ pos.Relocate(me);
+ pos.m_positionZ += 8.0f;
+ me->GetMotionMaster()->MoveTakeoff(0, pos);
+ // spectators flee event
std::list<Creature*> lspectatorList;
GetCreatureListWithEntryInGrid(lspectatorList, me, NPC_SPECTATOR, 100.0f);
for (std::list<Creature*>::iterator itr = lspectatorList.begin(); itr != lspectatorList.end(); ++itr)
@@ -294,257 +256,258 @@ public:
{
(*itr)->SetStandState(UNIT_STAND_STATE_STAND);
(*itr)->SetWalk(false);
- (*itr)->GetMotionMaster()->MovePoint(1, spectatorWP[0][0], spectatorWP[0][1], spectatorWP[0][2]);
+ (*itr)->GetMotionMaster()->MovePoint(1, spectatorWP[0]);
}
}
+
+ ++introPhase;
+ introTimer = 4200;
+ break;
}
- ++introPhase;
- introTimer = 4200;
- break;
- case 3:
- me->CastSpell(me, SPELL_SVALA_TRANSFORMING1, false);
- ++introPhase;
- introTimer = 6200;
- break;
- case 4:
- me->CastSpell(me, SPELL_SVALA_TRANSFORMING2, false);
- arthas->InterruptNonMeleeSpells(true);
- me->RemoveAllAuras();
- me->UpdateEntry(NPC_SVALA_SORROWGRAVE);
- me->SetFacingToObject(arthas);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- ++introPhase;
- introTimer = 3200;
- break;
- case 5:
- Talk(SAY_SVALA_INTRO_1);
- ++introPhase;
- introTimer = 10000;
- break;
- case 6:
- arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_2);
- ++introPhase;
- introTimer = 7200;
- break;
- case 7:
- Talk(SAY_SVALA_INTRO_2);
- me->SetFacingTo(1.58f);
- arthas->SetVisible(false);
- ++introPhase;
- introTimer = 13800;
- break;
- case 8:
- pos.Relocate(me);
- pos.m_positionX = me->GetHomePosition().GetPositionX();
- pos.m_positionY = me->GetHomePosition().GetPositionY();
- pos.m_positionZ = 90.6065f;
- me->GetMotionMaster()->MoveLand(0, pos);
- me->SetDisableGravity(false, true);
- me->SetHover(true);
- ++introPhase;
- introTimer = 3000;
- break;
- case 9:
- if (GameObject* mirror = GetClosestGameObjectWithEntry(me, GO_UTGARDE_MIRROR, 100.0f))
- mirror->SetGoState(GO_STATE_ACTIVE);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- arthas->DespawnOrUnsummon();
- arthasGUID = 0;
- Phase = NORMAL;
- break;
+ case 3:
+ me->CastSpell(me, SPELL_SVALA_TRANSFORMING1, false);
+ ++introPhase;
+ introTimer = 6200;
+ break;
+ case 4:
+ me->CastSpell(me, SPELL_SVALA_TRANSFORMING2, false);
+ arthas->InterruptNonMeleeSpells(true);
+ me->RemoveAllAuras();
+ me->UpdateEntry(NPC_SVALA_SORROWGRAVE);
+ me->SetFacingToObject(arthas);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ ++introPhase;
+ introTimer = 3200;
+ break;
+ case 5:
+ Talk(SAY_SVALA_INTRO_1);
+ ++introPhase;
+ introTimer = 10000;
+ break;
+ case 6:
+ arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_2);
+ ++introPhase;
+ introTimer = 7200;
+ break;
+ case 7:
+ Talk(SAY_SVALA_INTRO_2);
+ me->SetFacingTo(1.58f);
+ arthas->SetVisible(false);
+ ++introPhase;
+ introTimer = 13800;
+ break;
+ case 8:
+ {
+ Position pos;
+ pos.Relocate(me);
+ pos.m_positionX = me->GetHomePosition().GetPositionX();
+ pos.m_positionY = me->GetHomePosition().GetPositionY();
+ pos.m_positionZ = 90.6065f;
+ me->GetMotionMaster()->MoveLand(0, pos);
+ me->SetDisableGravity(false, true);
+ me->SetHover(true);
+ ++introPhase;
+ introTimer = 3000;
+ break;
+ }
+ case 9:
+ if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
+ mirror->SetGoState(GO_STATE_ACTIVE);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ arthas->DespawnOrUnsummon();
+ arthasGUID = 0;
+ Phase = NORMAL;
+ break;
+ }
}
- }
- else
- introTimer -= diff;
-
- return;
- }
+ else
+ introTimer -= diff;
- if (Phase == NORMAL)
- {
- //Return since we have no target
- if (!UpdateVictim())
return;
-
- if (sinsterStrikeTimer <= diff)
- {
- DoCastVictim(SPELL_SINSTER_STRIKE);
- sinsterStrikeTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
}
- else
- sinsterStrikeTimer -= diff;
- if (callFlamesTimer <= diff)
+ if (Phase == NORMAL)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
+ if (!UpdateVictim())
+ return;
+
+ if (sinsterStrikeTimer <= diff)
{
- DoCast(target, SPELL_CALL_FLAMES);
- callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ DoCastVictim(SPELL_SINSTER_STRIKE);
+ sinsterStrikeTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
}
- }
- else callFlamesTimer -= diff;
+ else
+ sinsterStrikeTimer -= diff;
- if (!sacrificed)
- {
- if (HealthBelowPct(50))
+ if (callFlamesTimer <= diff)
+ {
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
+ {
+ DoCast(target, SPELL_CALL_FLAMES);
+ callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
+ }
+ }
+ else
+ callFlamesTimer -= diff;
+
+ if (!sacrificed)
{
- if (Unit* sacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 80.0f, true))
+ if (HealthBelowPct(50))
{
- if (instance)
+ if (Unit* sacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 80.0f, true))
+ {
instance->SetData64(DATA_SACRIFICED_PLAYER, sacrificeTarget->GetGUID());
- Talk(SAY_SACRIFICE_PLAYER);
+ Talk(SAY_SACRIFICE_PLAYER);
- DoCast(sacrificeTarget, SPELL_RITUAL_PREPARATION);
+ DoCast(sacrificeTarget, SPELL_RITUAL_PREPARATION);
- SetCombatMovement(false);
+ SetCombatMovement(false);
- Phase = SACRIFICING;
- sacrePhase = 0;
- sacrificeTimer = 1 * IN_MILLISECONDS;
+ Phase = SACRIFICING;
+ sacrePhase = 0;
+ sacrificeTimer = 1 * IN_MILLISECONDS;
- DoCast(me, SPELL_RITUAL_OF_THE_SWORD);
- sacrificed = true;
+ DoCast(me, SPELL_RITUAL_OF_THE_SWORD);
+ sacrificed = true;
+ }
}
}
- }
- DoMeleeAttackIfReady();
- }
- else //SACRIFICING
- {
- if (sacrificeTimer <= diff)
+ DoMeleeAttackIfReady();
+ }
+ else // SACRIFICING
{
- switch (sacrePhase)
+ if (sacrificeTimer <= diff)
{
- case 0:
- // spawn ritual channelers
- if (instance)
- {
+ switch (sacrePhase)
+ {
+ case 0:
+ // spawn ritual channelers
DoCast(me, SPELL_RITUAL_CHANNELER_1, true);
DoCast(me, SPELL_RITUAL_CHANNELER_2, true);
DoCast(me, SPELL_RITUAL_CHANNELER_3, true);
- }
- ++sacrePhase;
- sacrificeTimer = 2 * IN_MILLISECONDS;
- break;
- case 1:
- me->StopMoving();
- me->GetMotionMaster()->MoveIdle();
- me->InterruptNonMeleeSpells(true);
- DoCast(me, SPELL_RITUAL_STRIKE_TRIGGER, true);
- ++sacrePhase;
- sacrificeTimer = 200;
- break;
- case 2:
- DoCast(me, SPELL_RITUAL_DISARM);
- ++sacrePhase;
- break;
- case 3:
- break;
+ ++sacrePhase;
+ sacrificeTimer = 2 * IN_MILLISECONDS;
+ break;
+ case 1:
+ me->StopMoving();
+ me->GetMotionMaster()->MoveIdle();
+ me->InterruptNonMeleeSpells(true);
+ DoCast(me, SPELL_RITUAL_STRIKE_TRIGGER, true);
+ ++sacrePhase;
+ sacrificeTimer = 200;
+ break;
+ case 2:
+ DoCast(me, SPELL_RITUAL_DISARM);
+ ++sacrePhase;
+ break;
+ case 3:
+ break;
+ }
}
+ else
+ sacrificeTimer -= diff;
}
- else sacrificeTimer -= diff;
}
- }
- };
+ };
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetUtgardePinnacleAI<boss_svalaAI>(creature);
+ }
};
class npc_ritual_channeler : public CreatureScript
{
-public:
- npc_ritual_channeler() : CreatureScript("npc_ritual_channeler") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_ritual_channelerAI(creature);
- }
+ public:
+ npc_ritual_channeler() : CreatureScript("npc_ritual_channeler") { }
- struct npc_ritual_channelerAI : public ScriptedAI
- {
- npc_ritual_channelerAI(Creature* creature) :ScriptedAI(creature)
+ struct npc_ritual_channelerAI : public ScriptedAI
{
- instance = creature->GetInstanceScript();
+ npc_ritual_channelerAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
- SetCombatMovement(false);
- }
+ SetCombatMovement(false);
+ }
- InstanceScript* instance;
- uint32 paralyzeTimer;
+ InstanceScript* instance;
+ uint32 paralyzeTimer;
+
+ void Reset() OVERRIDE
+ {
+ paralyzeTimer = 1600;
- void Reset() OVERRIDE
- {
- paralyzeTimer = 1600;
- if (instance)
if (IsHeroic())
DoCast(me, SPELL_SHADOWS_IN_THE_DARK);
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (me->HasUnitState(UNIT_STATE_CASTING))
- return;
+ }
- if (paralyzeTimer <= diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
- if (instance)
- if (Unit* victim = me->GetUnit(*me, instance->GetData64(DATA_SACRIFICED_PLAYER)))
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ if (paralyzeTimer <= diff)
+ {
+ if (Unit* victim = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SACRIFICED_PLAYER)))
DoCast(victim, SPELL_PARALYZE, false);
- paralyzeTimer = 200;
+ paralyzeTimer = 200;
+ }
+ else
+ paralyzeTimer -= diff;
}
- else
- paralyzeTimer -= diff;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetUtgardePinnacleAI<npc_ritual_channelerAI>(creature);
}
- };
};
class npc_spectator : public CreatureScript
{
-public:
- npc_spectator() : CreatureScript("npc_spectator") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_spectatorAI(creature);
- }
+ public:
+ npc_spectator() : CreatureScript("npc_spectator") { }
- struct npc_spectatorAI : public ScriptedAI
- {
- npc_spectatorAI(Creature* creature) : ScriptedAI(creature) { }
+ struct npc_spectatorAI : public ScriptedAI
+ {
+ npc_spectatorAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void MovementInform(uint32 motionType, uint32 pointId) OVERRIDE
- {
- if (motionType == POINT_MOTION_TYPE)
+ void MovementInform(uint32 motionType, uint32 pointId) OVERRIDE
{
- if (pointId == 1)
- me->GetMotionMaster()->MovePoint(2, spectatorWP[1][0], spectatorWP[1][1], spectatorWP[1][2]);
- else if (pointId == 2)
- me->DespawnOrUnsummon(1000);
+ if (motionType == POINT_MOTION_TYPE)
+ {
+ if (pointId == 1)
+ me->GetMotionMaster()->MovePoint(2, spectatorWP[1]);
+ else if (pointId == 2)
+ me->DespawnOrUnsummon(1000);
+ }
}
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetUtgardePinnacleAI<npc_spectatorAI>(creature);
}
- };
};
class RitualTargetCheck
{
public:
- explicit RitualTargetCheck(Unit* _caster) : caster(_caster) { }
+ explicit RitualTargetCheck() { }
- bool operator() (WorldObject* unit) const
+ bool operator() (WorldObject* obj) const
{
- if (InstanceScript* instance = caster->GetInstanceScript())
- if (instance->GetData64(DATA_SACRIFICED_PLAYER) == unit->GetGUID())
+ if (InstanceScript* instance = obj->GetInstanceScript())
+ if (instance->GetData64(DATA_SACRIFICED_PLAYER) == obj->GetGUID())
return false;
return true;
}
-
- private:
- Unit* caster;
};
class spell_paralyze_pinnacle : public SpellScriptLoader
@@ -558,7 +521,7 @@ class spell_paralyze_pinnacle : public SpellScriptLoader
void FilterTargets(std::list<WorldObject*>& unitList)
{
- unitList.remove_if(RitualTargetCheck(GetCaster()));
+ unitList.remove_if(RitualTargetCheck());
}
void Register() OVERRIDE
@@ -635,7 +598,7 @@ class npc_scourge_hulk : public CreatureScript
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_scourge_hulkAI(creature);
+ return GetUtgardePinnacleAI<npc_scourge_hulkAI>(creature);
}
};
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
index f592a4b2bb2..f4c306c726a 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
@@ -103,16 +103,10 @@ class boss_ymiron : public CreatureScript
public:
boss_ymiron() : CreatureScript("boss_ymiron") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ struct boss_ymironAI : public BossAI
{
- return new boss_ymironAI(creature);
- }
-
- struct boss_ymironAI : public ScriptedAI
- {
- boss_ymironAI(Creature* creature) : ScriptedAI(creature)
+ boss_ymironAI(Creature* creature) : BossAI(creature, DATA_KING_YMIRON)
{
- instance = creature->GetInstanceScript();
for (int i = 0; i < 4; ++i)
m_uiActiveOrder[i] = i;
for (int i = 0; i < 3; ++i)
@@ -122,9 +116,6 @@ public:
m_uiActiveOrder[i] = m_uiActiveOrder[r];
m_uiActiveOrder[r] = temp;
}
-
- m_uiActivedCreatureGUID = 0;
- m_uiOrbGUID = 0;
}
bool m_bIsWalking;
@@ -155,10 +146,9 @@ public:
uint64 m_uiActivedCreatureGUID;
uint64 m_uiOrbGUID;
- InstanceScript* instance;
-
void Reset() OVERRIDE
{
+ _Reset();
m_bIsWalking = false;
m_bIsPause = false;
m_bIsActiveWithBJORN = false;
@@ -182,19 +172,14 @@ public:
m_uiHealthAmountModifier = 1;
m_uiHealthAmountMultipler = DUNGEON_MODE(20, 25);
- DespawnBoatGhosts(m_uiActivedCreatureGUID);
- DespawnBoatGhosts(m_uiOrbGUID);
-
- if (instance)
- instance->SetData(DATA_KING_YMIRON_EVENT, NOT_STARTED);
+ m_uiActivedCreatureGUID = 0;
+ m_uiOrbGUID = 0;
}
void EnterCombat(Unit* /*who*/) OVERRIDE
{
+ _EnterCombat();
Talk(SAY_AGGRO);
-
- if (instance)
- instance->SetData(DATA_KING_YMIRON_EVENT, IN_PROGRESS);
}
void SpellHitTarget(Unit* who, SpellInfo const* spell) OVERRIDE
@@ -371,21 +356,17 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
+ _JustDied();
Talk(SAY_DEATH);
-
- DespawnBoatGhosts(m_uiActivedCreatureGUID);
- DespawnBoatGhosts(m_uiOrbGUID);
-
- if (instance)
- instance->SetData(DATA_KING_YMIRON_EVENT, DONE);
}
- void KilledUnit(Unit* /*victim*/) OVERRIDE
+ void KilledUnit(Unit* who) OVERRIDE
{
- Talk(SAY_SLAY);
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_SLAY);
}
- void DespawnBoatGhosts(uint64 m_uiCreatureGUID)
+ void DespawnBoatGhosts(uint64& m_uiCreatureGUID)
{
if (m_uiCreatureGUID)
if (Creature* temp = Unit::GetCreature(*me, m_uiCreatureGUID))
@@ -395,14 +376,16 @@ public:
}
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetUtgardePinnacleAI<boss_ymironAI>(creature);
+ }
};
class achievement_kings_bane : public AchievementCriteriaScript
{
public:
- achievement_kings_bane() : AchievementCriteriaScript("achievement_kings_bane")
- {
- }
+ achievement_kings_bane() : AchievementCriteriaScript("achievement_kings_bane") { }
bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp
index 0277c21cb83..46fabe41086 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp
@@ -19,246 +19,235 @@
#include "InstanceScript.h"
#include "utgarde_pinnacle.h"
-#define MAX_ENCOUNTER 4
-
-/* Utgarde Pinnacle encounters:
-0 - Svala Sorrowgrave
-1 - Gortok Palehoof
-2 - Skadi the Ruthless
-3 - King Ymiron
-*/
-
-enum GameObjects
+DoorData const doorData[] =
{
- ENTRY_SKADI_THE_RUTHLESS_DOOR = 192173,
- ENTRY_KING_YMIRON_DOOR = 192174,
- ENTRY_GORK_PALEHOOF_SPHERE = 188593
+ { GO_SKADI_THE_RUTHLESS_DOOR, DATA_SKADI_THE_RUTHLESS, DOOR_TYPE_PASSAGE, BOUNDARY_W },
+ { GO_KING_YMIRON_DOOR, DATA_KING_YMIRON, DOOR_TYPE_PASSAGE, BOUNDARY_N },
+ { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
};
class instance_utgarde_pinnacle : public InstanceMapScript
{
-public:
- instance_utgarde_pinnacle() : InstanceMapScript("instance_utgarde_pinnacle", 575) { }
-
- InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
- {
- return new instance_pinnacle(map);
- }
-
- struct instance_pinnacle : public InstanceScript
- {
- instance_pinnacle(Map* map) : InstanceScript(map) {}
-
- uint64 uiSvalaSorrowgrave;
- uint64 uiGortokPalehoof;
- uint64 uiSkadiTheRuthless;
- uint64 uiKingYmiron;
-
- uint64 uiSkadiTheRuthlessDoor;
- uint64 uiKingYmironDoor;
- uint64 uiGortokPalehoofSphere;
+ public:
+ instance_utgarde_pinnacle() : InstanceMapScript(UPScriptName, 575) { }
- uint64 uiFrenziedWorgen;
- uint64 uiRavenousFurbolg;
- uint64 uiFerociousRhino;
- uint64 uiMassiveJormungar;
- uint64 uiPalehoofOrb;
-
- uint64 uiSvala;
- uint64 uiSacrificedPlayer;
-
- uint32 m_auiEncounter[MAX_ENCOUNTER];
-
- std::string str_data;
-
- void Initialize() OVERRIDE
+ struct instance_utgarde_pinnacle_InstanceMapScript : public InstanceScript
{
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- m_auiEncounter[i] = NOT_STARTED;
-
- uiSvalaSorrowgrave = 0;
- uiGortokPalehoof = 0;
- uiSkadiTheRuthless = 0;
- uiKingYmiron = 0;
-
- uiSkadiTheRuthlessDoor = 0;
- uiKingYmironDoor = 0;
- uiGortokPalehoofSphere = 0;
+ instance_utgarde_pinnacle_InstanceMapScript(Map* map) : InstanceScript(map)
+ {
+ SetBossNumber(EncounterCount);
+ LoadDoorData(doorData);
- uiFrenziedWorgen = 0;
- uiRavenousFurbolg = 0;
- uiFerociousRhino = 0;
- uiMassiveJormungar = 0;
- uiPalehoofOrb = 0;
+ SvalaSorrowgraveGUID = 0;
+ GortokPalehoofGUID = 0;
+ SkadiTheRuthlessGUID = 0;
+ KingYmironGUID = 0;
- uiSvala = 0;
- uiSacrificedPlayer = 0;
- }
+ UtgardeMirrorGUID = 0;
+ GortokPalehoofSphereGUID = 0;
- bool IsEncounterInProgress() const OVERRIDE
- {
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS)
- return true;
+ FrenziedWorgenGUID = 0;
+ RavenousFurbolgGUID = 0;
+ FerociousRhinoGUID = 0;
+ MassiveJormungarGUID = 0;
+ PalehoofOrbGUID = 0;
- return false;
- }
+ SvalaGUID = 0;
+ SacrificedPlayerGUID = 0;
+ }
- void OnCreatureCreate(Creature* creature) OVERRIDE
- {
- switch (creature->GetEntry())
+ void OnCreatureCreate(Creature* creature) OVERRIDE
{
- case BOSS_SVALA_SORROWGRAVE: uiSvalaSorrowgrave = creature->GetGUID(); break;
- case BOSS_GORTOK_PALEHOOF: uiGortokPalehoof = creature->GetGUID(); break;
- case BOSS_SKADI_RUTHLESS: uiSkadiTheRuthless = creature->GetGUID(); break;
- case BOSS_KING_YMIRON: uiKingYmiron = creature->GetGUID(); break;
- case NPC_FRENZIED_WORGEN: uiFrenziedWorgen = creature->GetGUID(); break;
- case NPC_RAVENOUS_FURBOLG: uiRavenousFurbolg = creature->GetGUID(); break;
- case NPC_MASSIVE_JORMUNGAR: uiMassiveJormungar = creature->GetGUID(); break;
- case NPC_FEROCIOUS_RHINO: uiFerociousRhino = creature->GetGUID(); break;
- case NPC_SVALA: uiSvala = creature->GetGUID(); break;
- case NPC_PALEHOOF_ORB: uiPalehoofOrb = creature->GetGUID(); break;
+ switch (creature->GetEntry())
+ {
+ case NPC_SVALA_SORROWGRAVE:
+ SvalaSorrowgraveGUID = creature->GetGUID();
+ break;
+ case NPC_GORTOK_PALEHOOF:
+ GortokPalehoofGUID = creature->GetGUID();
+ break;
+ case NPC_SKADI_THE_RUTHLESS:
+ SkadiTheRuthlessGUID = creature->GetGUID();
+ break;
+ case NPC_KING_YMIRON:
+ KingYmironGUID = creature->GetGUID();
+ break;
+ case NPC_FRENZIED_WORGEN:
+ FrenziedWorgenGUID = creature->GetGUID();
+ break;
+ case NPC_RAVENOUS_FURBOLG:
+ RavenousFurbolgGUID = creature->GetGUID();
+ break;
+ case NPC_MASSIVE_JORMUNGAR:
+ MassiveJormungarGUID = creature->GetGUID();
+ break;
+ case NPC_FEROCIOUS_RHINO:
+ FerociousRhinoGUID = creature->GetGUID();
+ break;
+ case NPC_SVALA:
+ SvalaGUID = creature->GetGUID();
+ break;
+ case NPC_PALEHOOF_ORB:
+ PalehoofOrbGUID = creature->GetGUID();
+ break;
+ default:
+ break;
+ }
}
- }
- void OnGameObjectCreate(GameObject* go) OVERRIDE
- {
- switch (go->GetEntry())
+ void OnGameObjectCreate(GameObject* go) OVERRIDE
{
- case ENTRY_SKADI_THE_RUTHLESS_DOOR:
- uiSkadiTheRuthlessDoor = go->GetGUID();
- if (m_auiEncounter[2] == DONE) HandleGameObject(0, true, go);
- break;
- case ENTRY_KING_YMIRON_DOOR:
- uiKingYmironDoor = go->GetGUID();
- if (m_auiEncounter[3] == DONE) HandleGameObject(0, true, go);
- break;
- case ENTRY_GORK_PALEHOOF_SPHERE:
- uiGortokPalehoofSphere = go->GetGUID();
- if (m_auiEncounter[1] == DONE)
- {
- HandleGameObject(0, true, go);
- go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
- }
- break;
+ switch (go->GetEntry())
+ {
+ case GO_UTGARDE_MIRROR:
+ UtgardeMirrorGUID = go->GetGUID();
+ break;
+ case GO_GORTOK_PALEHOOF_SPHERE:
+ GortokPalehoofSphereGUID = go->GetGUID();
+ if (GetBossState(DATA_GORTOK_PALEHOOF) == DONE)
+ {
+ HandleGameObject(0, true, go);
+ go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
+ }
+ break;
+ case GO_SKADI_THE_RUTHLESS_DOOR:
+ case GO_KING_YMIRON_DOOR:
+ AddDoor(go, true);
+ break;
+ default:
+ break;
+ }
}
- }
- void SetData(uint32 type, uint32 data) OVERRIDE
- {
- switch (type)
+ void OnGameObjectRemove(GameObject* go) OVERRIDE
{
- case DATA_SVALA_SORROWGRAVE_EVENT:
- m_auiEncounter[0] = data;
- break;
- case DATA_GORTOK_PALEHOOF_EVENT:
- m_auiEncounter[1] = data;
- break;
- case DATA_SKADI_THE_RUTHLESS_EVENT:
- if (data == DONE)
- HandleGameObject(uiSkadiTheRuthlessDoor, true);
- m_auiEncounter[2] = data;
- break;
- case DATA_KING_YMIRON_EVENT:
- if (data == DONE)
- HandleGameObject(uiKingYmironDoor, true);
- m_auiEncounter[3] = data;
- break;
+ switch (go->GetEntry())
+ {
+ case GO_SKADI_THE_RUTHLESS_DOOR:
+ case GO_KING_YMIRON_DOOR:
+ AddDoor(go, false);
+ break;
+ default:
+ break;
+ }
}
- if (data == DONE)
- SaveToDB();
- }
-
- void SetData64(uint32 type, uint64 data) OVERRIDE
- {
- switch (type)
+ void SetData64(uint32 type, uint64 data) OVERRIDE
{
- case DATA_SACRIFICED_PLAYER:
- uiSacrificedPlayer = data;
- break;
+ switch (type)
+ {
+ case DATA_SACRIFICED_PLAYER:
+ SacrificedPlayerGUID = data;
+ break;
+ default:
+ break;
+ }
}
- }
- uint32 GetData(uint32 type) const OVERRIDE
- {
- switch (type)
+ uint64 GetData64(uint32 type) const OVERRIDE
{
- case DATA_SVALA_SORROWGRAVE_EVENT: return m_auiEncounter[0];
- case DATA_GORTOK_PALEHOOF_EVENT: return m_auiEncounter[1];
- case DATA_SKADI_THE_RUTHLESS_EVENT: return m_auiEncounter[2];
- case DATA_KING_YMIRON_EVENT: return m_auiEncounter[3];
+ switch (type)
+ {
+ case DATA_SVALA_SORROWGRAVE:
+ return SvalaSorrowgraveGUID;
+ case DATA_GORTOK_PALEHOOF:
+ return GortokPalehoofGUID;
+ case DATA_SKADI_THE_RUTHLESS:
+ return SkadiTheRuthlessGUID;
+ case DATA_KING_YMIRON:
+ return KingYmironGUID;
+ case DATA_FRENZIED_WORGEN:
+ return FrenziedWorgenGUID;
+ case DATA_RAVENOUS_FURBOLG:
+ return RavenousFurbolgGUID;
+ case DATA_MASSIVE_JORMUNGAR:
+ return MassiveJormungarGUID;
+ case DATA_FEROCIOUS_RHINO:
+ return FerociousRhinoGUID;
+ case DATA_GORTOK_ORB:
+ return PalehoofOrbGUID;
+ case DATA_GORTOK_PALEHOOF_SPHERE:
+ return GortokPalehoofSphereGUID;
+ case DATA_UTGARDE_MIRROR:
+ return UtgardeMirrorGUID;
+ case DATA_SVALA:
+ return SvalaGUID;
+ case DATA_SACRIFICED_PLAYER:
+ return SacrificedPlayerGUID;
+ default:
+ break;
+ }
+
+ return 0;
}
- return 0;
- }
- uint64 GetData64(uint32 identifier) const OVERRIDE
- {
- switch (identifier)
+ std::string GetSaveData() OVERRIDE
{
- case DATA_SVALA_SORROWGRAVE: return uiSvalaSorrowgrave;
- case DATA_GORTOK_PALEHOOF: return uiGortokPalehoof;
- case DATA_SKADI_THE_RUTHLESS: return uiSkadiTheRuthless;
- case DATA_KING_YMIRON: return uiKingYmiron;
- case DATA_NPC_FRENZIED_WORGEN: return uiFrenziedWorgen;
- case DATA_NPC_RAVENOUS_FURBOLG: return uiRavenousFurbolg;
- case DATA_NPC_MASSIVE_JORMUNGAR: return uiMassiveJormungar;
- case DATA_NPC_FEROCIOUS_RHINO: return uiFerociousRhino;
- case DATA_NPC_ORB: return uiPalehoofOrb;
- case DATA_SVALA: return uiSvala;
- case DATA_GORTOK_PALEHOOF_SPHERE: return uiGortokPalehoofSphere;
- case DATA_SACRIFICED_PLAYER: return uiSacrificedPlayer;
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "U P " << GetBossSaveData();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
}
- return 0;
- }
+ void Load(char const* str) OVERRIDE
+ {
+ if (!str)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
- std::string GetSaveData() OVERRIDE
- {
- OUT_SAVE_INST_DATA;
+ OUT_LOAD_INST_DATA(str);
- std::ostringstream saveStream;
- saveStream << "U P " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' '
- << m_auiEncounter[2] << ' ' << m_auiEncounter[3];
+ char dataHead1, dataHead2;
- str_data = saveStream.str();
+ std::istringstream loadStream(str);
+ loadStream >> dataHead1 >> dataHead2;
- OUT_SAVE_INST_DATA_COMPLETE;
- return str_data;
- }
+ if (dataHead1 == 'U' && dataHead2 == 'P')
+ {
+ for (uint32 i = 0; i < EncounterCount; ++i)
+ {
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
+ }
+ }
+ else
+ OUT_LOAD_INST_DATA_FAIL;
- void Load(const char* in) OVERRIDE
- {
- if (!in)
- {
- OUT_LOAD_INST_DATA_FAIL;
- return;
+ OUT_LOAD_INST_DATA_COMPLETE;
}
- OUT_LOAD_INST_DATA(in);
+ protected:
+ uint64 SvalaSorrowgraveGUID;
+ uint64 GortokPalehoofGUID;
+ uint64 SkadiTheRuthlessGUID;
+ uint64 KingYmironGUID;
- char dataHead1, dataHead2;
- uint16 data0, data1, data2, data3;
+ uint64 UtgardeMirrorGUID;
+ uint64 GortokPalehoofSphereGUID;
- std::istringstream loadStream(in);
- loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3;
+ uint64 FrenziedWorgenGUID;
+ uint64 RavenousFurbolgGUID;
+ uint64 FerociousRhinoGUID;
+ uint64 MassiveJormungarGUID;
- if (dataHead1 == 'U' && dataHead2 == 'P')
- {
- m_auiEncounter[0] = data0;
- m_auiEncounter[1] = data1;
- m_auiEncounter[2] = data2;
- m_auiEncounter[3] = data3;
+ uint64 PalehoofOrbGUID;
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS)
- m_auiEncounter[i] = NOT_STARTED;
+ uint64 SvalaGUID;
+ uint64 SacrificedPlayerGUID;
+ };
- } else OUT_LOAD_INST_DATA_FAIL;
-
- OUT_LOAD_INST_DATA_COMPLETE;
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
+ {
+ return new instance_utgarde_pinnacle_InstanceMapScript(map);
}
- };
};
void AddSC_instance_utgarde_pinnacle()
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
index 6166b7c4891..ddf1d1e512a 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/utgarde_pinnacle.h
@@ -15,46 +15,64 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef DEF_PINNACLE_H
-#define DEF_PINNACLE_H
+#ifndef UTGARDE_PINNACLE_H_
+#define UTGARDE_PINNACLE_H_
-enum Data
+#define UPScriptName "instance_utgarde_pinnacle"
+
+uint32 const EncounterCount = 4;
+
+enum DataTypes
{
- DATA_SVALA_SORROWGRAVE_EVENT,
- DATA_GORTOK_PALEHOOF_EVENT,
- DATA_SKADI_THE_RUTHLESS_EVENT,
- DATA_KING_YMIRON_EVENT
+ // Encounter States/Boss GUIDs
+ DATA_SVALA_SORROWGRAVE = 0,
+ DATA_GORTOK_PALEHOOF = 1,
+ DATA_SKADI_THE_RUTHLESS = 2,
+ DATA_KING_YMIRON = 3,
+
+ // Additional Data
+ DATA_UTGARDE_MIRROR = 4,
+ DATA_SVALA = 5,
+ DATA_SACRIFICED_PLAYER = 6,
+
+ DATA_FRENZIED_WORGEN = 7,
+ DATA_RAVENOUS_FURBOLG = 8,
+ DATA_MASSIVE_JORMUNGAR = 9,
+ DATA_FEROCIOUS_RHINO = 10,
+ DATA_GORTOK_ORB = 11,
+ DATA_GORTOK_PALEHOOF_SPHERE = 12
};
-enum Data64
+enum CreatureIds
{
- DATA_SVALA,
- DATA_SVALA_SORROWGRAVE,
- DATA_GORTOK_PALEHOOF,
- DATA_SKADI_THE_RUTHLESS,
- DATA_NPC_GRAUF,
- DATA_KING_YMIRON,
- DATA_NPC_FRENZIED_WORGEN,
- DATA_NPC_RAVENOUS_FURBOLG,
- DATA_NPC_MASSIVE_JORMUNGAR,
- DATA_NPC_FEROCIOUS_RHINO,
- DATA_NPC_ORB,
- DATA_GORTOK_PALEHOOF_SPHERE,
- DATA_SACRIFICED_PLAYER
+ NPC_SVALA_SORROWGRAVE = 26668,
+ NPC_GORTOK_PALEHOOF = 26687,
+ NPC_SKADI_THE_RUTHLESS = 26693,
+ NPC_KING_YMIRON = 26861,
+
+ // Svala
+ NPC_SVALA = 29281,
+
+ // Gortok Palehoof
+ NPC_FRENZIED_WORGEN = 26683,
+ NPC_RAVENOUS_FURBOLG = 26684,
+ NPC_MASSIVE_JORMUNGAR = 26685,
+ NPC_FEROCIOUS_RHINO = 26686,
+ NPC_PALEHOOF_ORB = 26688
};
-enum CreatureID
+enum GameObjectIds
{
- BOSS_SVALA_SORROWGRAVE = 26668,
- BOSS_GORTOK_PALEHOOF = 26687,
- BOSS_SKADI_RUTHLESS = 26693,
- BOSS_KING_YMIRON = 26861,
- NPC_FRENZIED_WORGEN = 26683,
- NPC_RAVENOUS_FURBOLG = 26684,
- NPC_MASSIVE_JORMUNGAR = 26685,
- NPC_FEROCIOUS_RHINO = 26686,
- NPC_SVALA = 29281,
- NPC_PALEHOOF_ORB = 26688
+ GO_GORTOK_PALEHOOF_SPHERE = 188593,
+ GO_UTGARDE_MIRROR = 191745,
+ GO_SKADI_THE_RUTHLESS_DOOR = 192173,
+ GO_KING_YMIRON_DOOR = 192174
};
-#endif
+template<class AI>
+AI* GetUtgardePinnacleAI(Creature* creature)
+{
+ return GetInstanceAI<AI>(creature, UPScriptName);
+}
+
+#endif // UTGARDE_PINNACLE_H_
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
index 22174ea2528..e8e54184cb3 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
@@ -128,7 +128,7 @@ class npc_frost_warder : public CreatureScript
struct npc_frost_warderAI : public ScriptedAI
{
- npc_frost_warderAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_frost_warderAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
index 8f44e47dd74..80ebc01debc 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp
@@ -87,7 +87,7 @@ public:
instance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS);
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
index 0052d7bc87e..883ea8fa0c0 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp
@@ -142,7 +142,7 @@ public:
}
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
@@ -303,7 +303,7 @@ public:
}
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index efaa9a8644b..4852b6cea07 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -206,7 +206,7 @@ public:
return 0;
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 uiDiff) OVERRIDE
diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
index 5eaeaab8dc0..964f6b75e72 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp
@@ -100,7 +100,7 @@ public:
}
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
index 2d53fdebde7..d5dd41e7a90 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp
@@ -93,7 +93,7 @@ public:
}
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
index 20f7e7952fe..8b39c48fb92 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp
@@ -152,7 +152,7 @@ public:
}
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 uiDiff) OVERRIDE
diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
index a3c84e248e7..3db389ac703 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
@@ -123,7 +123,7 @@ public:
}
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index 60d7570b96f..4ff0f2d36e9 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -112,7 +112,7 @@ public:
struct instance_violet_hold_InstanceMapScript : public InstanceScript
{
- instance_violet_hold_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_violet_hold_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 uiMoragg;
uint64 uiErekem;
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index db382dd9d72..c78a1ee1740 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -578,9 +578,9 @@ public:
bPortalGuardianOrKeeperOrEliteSpawn = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
@@ -1342,7 +1342,7 @@ public:
DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true);
}
- void EnterCombat(Unit * /*who*/) OVERRIDE {}
+ void EnterCombat(Unit * /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/isle_of_conquest.cpp b/src/server/scripts/Northrend/isle_of_conquest.cpp
index 9efcd8406d7..62173bb2145 100644
--- a/src/server/scripts/Northrend/isle_of_conquest.cpp
+++ b/src/server/scripts/Northrend/isle_of_conquest.cpp
@@ -27,7 +27,7 @@
class npc_four_car_garage : public CreatureScript
{
public:
- npc_four_car_garage() : CreatureScript("npc_four_car_garage") {}
+ npc_four_car_garage() : CreatureScript("npc_four_car_garage") { }
struct npc_four_car_garageAI : public NullCreatureAI
{
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 2b5508272d9..f5700358150 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -64,7 +64,7 @@ public:
struct npc_sinkhole_kill_creditAI : public ScriptedAI
{
- npc_sinkhole_kill_creditAI(Creature* creature) : ScriptedAI(creature){}
+ npc_sinkhole_kill_creditAI(Creature* creature) : ScriptedAI(creature){ }
uint32 phaseTimer;
uint8 phase;
@@ -90,7 +90,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -175,7 +175,7 @@ public:
struct npc_khunok_the_behemothAI : public ScriptedAI
{
- npc_khunok_the_behemothAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_khunok_the_behemothAI(Creature* creature) : ScriptedAI(creature) { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -355,11 +355,11 @@ public:
struct npc_nerubar_victimAI : public ScriptedAI
{
- npc_nerubar_victimAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_nerubar_victimAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* killer) OVERRIDE
@@ -411,7 +411,7 @@ public:
struct npc_jennyAI : public ScriptedAI
{
- npc_jennyAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_jennyAI(Creature* creature) : ScriptedAI(creature) { }
bool setCrateNumber;
@@ -472,7 +472,7 @@ public:
struct npc_fezzix_geartwistAI : public ScriptedAI
{
- npc_fezzix_geartwistAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_fezzix_geartwistAI(Creature* creature) : ScriptedAI(creature) { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -557,8 +557,8 @@ public:
go_caribouGUID = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
@@ -672,7 +672,7 @@ public:
struct npc_lurgglbrAI : public npc_escortAI
{
- npc_lurgglbrAI(Creature* creature) : npc_escortAI(creature){}
+ npc_lurgglbrAI(Creature* creature) : npc_escortAI(creature){ }
uint32 IntroTimer;
uint32 IntroPhase;
@@ -959,7 +959,7 @@ public:
struct npc_thassarianAI : public npc_escortAI
{
- npc_thassarianAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_thassarianAI(Creature* creature) : npc_escortAI(creature) { }
uint64 arthasGUID;
uint64 talbotGUID;
@@ -1263,7 +1263,7 @@ public:
struct npc_image_lich_kingAI : public ScriptedAI
{
- npc_image_lich_kingAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_image_lich_kingAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -1298,7 +1298,7 @@ public:
struct npc_general_arlosAI : public ScriptedAI
{
- npc_general_arlosAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_general_arlosAI(Creature* creature) : ScriptedAI(creature) { }
void MovementInform(uint32 uiType, uint32 /*uiId*/) OVERRIDE
{
@@ -1587,7 +1587,7 @@ public:
struct npc_beryl_sorcererAI : public FollowerAI
{
- npc_beryl_sorcererAI(Creature* creature) : FollowerAI(creature) {}
+ npc_beryl_sorcererAI(Creature* creature) : FollowerAI(creature) { }
bool bEnslaved;
@@ -1672,7 +1672,7 @@ public:
struct npc_imprisoned_beryl_sorcererAI : public ScriptedAI
{
- npc_imprisoned_beryl_sorcererAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_imprisoned_beryl_sorcererAI(Creature* creature) : ScriptedAI(creature) { }
uint32 rebuff;
@@ -1799,7 +1799,7 @@ public:
struct npc_mootoo_the_youngerAI : public npc_escortAI
{
- npc_mootoo_the_youngerAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_mootoo_the_youngerAI(Creature* creature) : npc_escortAI(creature) { }
void Reset() OVERRIDE
{
@@ -1880,7 +1880,7 @@ public:
struct npc_bonker_togglevoltAI : public npc_escortAI
{
- npc_bonker_togglevoltAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_bonker_togglevoltAI(Creature* creature) : npc_escortAI(creature) { }
uint32 Bonker_agro;
void Reset() OVERRIDE
@@ -1978,7 +1978,7 @@ public:
struct npc_trapped_mammoth_calfAI : public ScriptedAI
{
- npc_trapped_mammoth_calfAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_trapped_mammoth_calfAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiTimer;
bool bStarted;
@@ -2067,7 +2067,7 @@ public:
struct npc_magmoth_crusherAI : public ScriptedAI
{
- npc_magmoth_crusherAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_magmoth_crusherAI(Creature* creature) : ScriptedAI(creature) { }
void JustDied(Unit* killer) OVERRIDE
{
@@ -2168,7 +2168,7 @@ public:
struct npc_valiance_keep_cannoneerAI : public ScriptedAI
{
- npc_valiance_keep_cannoneerAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_valiance_keep_cannoneerAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiTimer;
@@ -2226,7 +2226,7 @@ public:
struct npc_warmage_coldarraAI : public ScriptedAI
{
- npc_warmage_coldarraAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_warmage_coldarraAI(Creature* creature) : ScriptedAI(creature) { }
uint32 m_uiTimer; //Timer until recast
@@ -2235,9 +2235,9 @@ public:
m_uiTimer = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 uiDiff) OVERRIDE
{
diff --git a/src/server/scripts/Northrend/zone_dalaran.cpp b/src/server/scripts/Northrend/zone_dalaran.cpp
index 0ae31d08182..083b4f879ee 100644
--- a/src/server/scripts/Northrend/zone_dalaran.cpp
+++ b/src/server/scripts/Northrend/zone_dalaran.cpp
@@ -64,11 +64,11 @@ public:
creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
}
- void Reset()OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void AttackStart(Unit* /*who*/)OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -118,7 +118,7 @@ public:
return;
}
- void UpdateAI(uint32 /*diff*/)OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp
index 0357ea075f4..76ce586aa9d 100644
--- a/src/server/scripts/Northrend/zone_dragonblight.cpp
+++ b/src/server/scripts/Northrend/zone_dragonblight.cpp
@@ -303,10 +303,111 @@ class npc_wyrmrest_defender : public CreatureScript
}
};
+/*#####
+# npc_torturer_lecraft
+#####*/
+
+enum TorturerLeCraft
+{
+ SPELL_HEMORRHAGE = 30478,
+ SPELL_KIDNEY_SHOT = 30621,
+ SPELL_HIGH_EXECUTORS_BRANDING_IRON = 48603,
+ NPC_TORTURER_LECRAFT = 27394,
+ EVENT_HEMORRHAGE = 1,
+ EVENT_KIDNEY_SHOT = 2,
+ SAY_AGGRO = 0
+};
+
+class npc_torturer_lecraft : public CreatureScript
+{
+ public: npc_torturer_lecraft() : CreatureScript("npc_torturer_lecraft") {}
+
+ struct npc_torturer_lecraftAI : public ScriptedAI
+ {
+ npc_torturer_lecraftAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void Reset() OVERRIDE
+ {
+ _textCounter = 1;
+ _playerGUID = 0;
+ }
+
+ void EnterCombat(Unit* who) OVERRIDE
+ {
+ _events.ScheduleEvent(EVENT_HEMORRHAGE, urand(5000, 8000));
+ _events.ScheduleEvent(EVENT_KIDNEY_SHOT, urand(12000, 15000));
+
+ if (Player* player = who->ToPlayer())
+ Talk (SAY_AGGRO, player->GetGUID());
+ }
+
+ void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
+ {
+ if (spell->Id != SPELL_HIGH_EXECUTORS_BRANDING_IRON)
+ return;
+
+ if (Player* player = caster->ToPlayer())
+ {
+ if (_textCounter == 1)
+ _playerGUID = player->GetGUID();
+
+ if (_playerGUID != player->GetGUID())
+ return;
+
+ Talk(_textCounter, player->GetGUID());
+
+ if (_textCounter == 5)
+ player->KilledMonsterCredit(NPC_TORTURER_LECRAFT, 0);
+
+ ++_textCounter;
+
+ if (_textCounter == 13)
+ _textCounter = 6;
+ }
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_HEMORRHAGE:
+ DoCastVictim(SPELL_HEMORRHAGE);
+ _events.ScheduleEvent(EVENT_HEMORRHAGE, urand(12000, 168000));
+ break;
+ case EVENT_KIDNEY_SHOT:
+ DoCastVictim(SPELL_KIDNEY_SHOT);
+ _events.ScheduleEvent(EVENT_KIDNEY_SHOT, urand(20000, 26000));
+ break;
+ default:
+ break;
+ }
+ }
+ DoMeleeAttackIfReady();
+ }
+ private:
+ EventMap _events;
+ uint8 _textCounter;
+ uint64 _playerGUID;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_torturer_lecraftAI(creature);
+ }
+};
+
void AddSC_dragonblight()
{
new npc_alexstrasza_wr_gate;
new spell_q12096_q12092_dummy;
new spell_q12096_q12092_bark;
new npc_wyrmrest_defender;
+ new npc_torturer_lecraft;
}
diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
index 1a080824136..9ea3023de01 100644
--- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
@@ -217,9 +217,9 @@ public:
struct npc_mrfloppyAI : public ScriptedAI
{
- npc_mrfloppyAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_mrfloppyAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* Who) OVERRIDE
{
@@ -239,9 +239,9 @@ public:
}
}
- void EnterEvadeMode() OVERRIDE {}
+ void EnterEvadeMode() OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 /*diff*/) OVERRIDE
@@ -279,7 +279,7 @@ public:
struct npc_outhouse_bunnyAI : public ScriptedAI
{
- npc_outhouse_bunnyAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_outhouse_bunnyAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -341,7 +341,7 @@ public:
struct npc_tallhorn_stagAI : public ScriptedAI
{
- npc_tallhorn_stagAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_tallhorn_stagAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -393,7 +393,7 @@ public:
struct npc_amberpine_woodsmanAI : public ScriptedAI
{
- npc_amberpine_woodsmanAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_amberpine_woodsmanAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -459,7 +459,7 @@ public:
struct npc_wounded_skirmisherAI : public ScriptedAI
{
- npc_wounded_skirmisherAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_wounded_skirmisherAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -508,87 +508,6 @@ public:
}
};
-/*Lightning Sentry - if you kill it when you have your Minion with you, you will get a quest credit*/
-enum Sentry
-{
- //Creature
- NPC_LIGHTNING_SENTRY = 26407,
- NPC_WAR_GOLEM = 27017,
- // Quest
- QUEST_OR_MAYBE_WE_DONT_A = 12138,
- QUEST_OR_MAYBE_WE_DONT_H = 12198,
- // Spell
- SPELL_CHARGED_SENTRY_TOTEM = 52703,
- SPELL_WAR_GOLEM_CHARGE_CREDIT = 47797,
-};
-
-enum SentryEvents
-{
- EVENT_SENTRY = 1
-};
-
-class npc_lightning_sentry : public CreatureScript
-{
-public:
- npc_lightning_sentry() : CreatureScript("npc_lightning_sentry") { }
-
- struct npc_lightning_sentryAI : public ScriptedAI
- {
- npc_lightning_sentryAI(Creature* creature) : ScriptedAI(creature) { }
-
- void Reset() OVERRIDE
- {
- _events.ScheduleEvent(EVENT_SENTRY, urand(10000, 12000));
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (!UpdateVictim())
- return;
-
- _events.Update(diff);
-
- while (uint32 eventId = _events.ExecuteEvent())
- {
- switch (eventId)
- {
- case EVENT_SENTRY:
- DoCast(SPELL_CHARGED_SENTRY_TOTEM);
- _events.ScheduleEvent(EVENT_SENTRY, urand(10000, 12000));
- break;
- default:
- break;
- }
- }
-
- if (!UpdateVictim())
- return;
-
- DoMeleeAttackIfReady();
- }
-
- void JustDied(Unit* killer) OVERRIDE
- {
- if (killer->ToPlayer() && killer->ToPlayer()->GetTypeId() == TYPEID_PLAYER)
- {
- if (me->FindNearestCreature(NPC_WAR_GOLEM, 10.0f, true))
- {
- if (killer->ToPlayer()->GetQuestStatus(QUEST_OR_MAYBE_WE_DONT_A) == QUEST_STATUS_INCOMPLETE ||
- killer->ToPlayer()->GetQuestStatus(QUEST_OR_MAYBE_WE_DONT_H) == QUEST_STATUS_INCOMPLETE)
- DoCast(killer, SPELL_WAR_GOLEM_CHARGE_CREDIT);
- }
- }
- }
- private:
- EventMap _events;
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_lightning_sentryAI(creature);
- }
-};
-
/*Venture co. Straggler - when you cast Smoke Bomb, he will yell and run away*/
enum SmokeEmOut
{
@@ -838,7 +757,6 @@ void AddSC_grizzly_hills()
new npc_tallhorn_stag();
new npc_amberpine_woodsman();
new npc_wounded_skirmisher();
- new npc_lightning_sentry();
new npc_venture_co_straggler();
new npc_lake_frog();
}
diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp
index 4626ffabd79..671628e4cbc 100644
--- a/src/server/scripts/Northrend/zone_howling_fjord.cpp
+++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp
@@ -71,7 +71,7 @@ public:
struct npc_Apothecary_HanesAI : public npc_escortAI
{
- npc_Apothecary_HanesAI(Creature* creature) : npc_escortAI(creature){}
+ npc_Apothecary_HanesAI(Creature* creature) : npc_escortAI(creature){ }
uint32 PotTimer;
void Reset() OVERRIDE
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index 24452a5fb5f..b20efa1c5a5 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -306,7 +306,7 @@ public:
struct npc_vereth_the_cunningAI : public ScriptedAI
{
- npc_vereth_the_cunningAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_vereth_the_cunningAI(Creature* creature) : ScriptedAI(creature) { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -364,7 +364,7 @@ enum TournamentDummy
class npc_tournament_training_dummy : public CreatureScript
{
public:
- npc_tournament_training_dummy(): CreatureScript("npc_tournament_training_dummy"){}
+ npc_tournament_training_dummy(): CreatureScript("npc_tournament_training_dummy"){ }
struct npc_tournament_training_dummyAI : ScriptedAI
{
@@ -483,7 +483,7 @@ class npc_tournament_training_dummy : public CreatureScript
me->SetControlled(true, UNIT_STATE_STUNNED);
}
- void MoveInLineOfSight(Unit* /*who*/)OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
};
@@ -616,9 +616,9 @@ public:
events.ScheduleEvent(EVENT_SPAWN, 3000);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void JustSummoned(Creature* Summoned) OVERRIDE
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index bf284c5138b..77b85037a01 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -502,7 +502,7 @@ public:
struct npc_jungle_punch_targetAI : public ScriptedAI
{
- npc_jungle_punch_targetAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_jungle_punch_targetAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -1016,7 +1016,7 @@ public:
struct npc_vics_flying_machineAI : public VehicleAI
{
- npc_vics_flying_machineAI(Creature* creature) : VehicleAI(creature) {}
+ npc_vics_flying_machineAI(Creature* creature) : VehicleAI(creature) { }
void PassengerBoarded(Unit* passenger, int8 /*seatId*/, bool apply) OVERRIDE
{
@@ -1073,7 +1073,7 @@ public:
}
}
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index 1fc0cce51b4..825981ba5c5 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -65,9 +65,9 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -178,7 +178,7 @@ public:
struct npc_brunnhildar_prisonerAI : public ScriptedAI
{
- npc_brunnhildar_prisonerAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_brunnhildar_prisonerAI(Creature* creature) : ScriptedAI(creature) { }
bool freed;
@@ -250,7 +250,7 @@ public:
struct npc_freed_protodrakeAI : public VehicleAI
{
- npc_freed_protodrakeAI(Creature* creature) : VehicleAI(creature) {}
+ npc_freed_protodrakeAI(Creature* creature) : VehicleAI(creature) { }
EventMap events;
@@ -323,11 +323,11 @@ public:
struct npc_icefangAI : public npc_escortAI
{
- npc_icefangAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_icefangAI(Creature* creature) : npc_escortAI(creature) { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void EnterEvadeMode() OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void EnterEvadeMode() OVERRIDE { }
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) OVERRIDE
{
@@ -378,7 +378,7 @@ class npc_hyldsmeet_protodrake : public CreatureScript
class npc_hyldsmeet_protodrakeAI : public CreatureAI
{
public:
- npc_hyldsmeet_protodrakeAI(Creature* creature) : CreatureAI(creature), _accessoryRespawnTimer(0), _vehicleKit(creature->GetVehicleKit()) {}
+ npc_hyldsmeet_protodrakeAI(Creature* creature) : CreatureAI(creature), _accessoryRespawnTimer(0), _vehicleKit(creature->GetVehicleKit()) { }
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) OVERRIDE
{
@@ -460,6 +460,52 @@ class spell_close_rift : public SpellScriptLoader
}
};
+/*#####
+# spell_jokkum_scriptcast
+#####*/
+
+enum JokkumScriptcast
+{
+ SPELL_JOKKUM_KILL_CREDIT = 56545,
+ SPELL_JOKKUM_SUMMON = 56541
+};
+
+class spell_jokkum_scriptcast : public SpellScriptLoader
+{
+ public: spell_jokkum_scriptcast() : SpellScriptLoader("spell_jokkum_scriptcast") { }
+
+ class spell_jokkum_scriptcast_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_jokkum_scriptcast_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_JOKKUM_KILL_CREDIT) || !sSpellMgr->GetSpellInfo(SPELL_JOKKUM_SUMMON))
+ return false;
+ return true;
+ }
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Player* player = GetTarget()->ToPlayer())
+ {
+ player->CastSpell(player, SPELL_JOKKUM_KILL_CREDIT, true);
+ player->CastSpell(player, SPELL_JOKKUM_SUMMON, true);
+ }
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_jokkum_scriptcast_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_jokkum_scriptcast_AuraScript();
+ }
+};
+
void AddSC_storm_peaks()
{
new npc_injured_goblin();
@@ -469,4 +515,5 @@ void AddSC_storm_peaks()
new npc_icefang();
new npc_hyldsmeet_protodrake();
new spell_close_rift();
+ new spell_jokkum_scriptcast();
}
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 3a2d5c592fe..29d7c017748 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -47,7 +47,7 @@ public:
struct npc_drakuru_shacklesAI : public ScriptedAI
{
- npc_drakuru_shacklesAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_drakuru_shacklesAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -133,7 +133,7 @@ public:
struct npc_captured_rageclawAI : public ScriptedAI
{
- npc_captured_rageclawAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_captured_rageclawAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -141,8 +141,7 @@ public:
DoCast(me, SPELL_KNEEL, true); // Little Hack for kneel - Thanks Illy :P
}
- void MoveInLineOfSight(Unit* /*who*/)OVERRIDE {}
-
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
@@ -166,982 +165,6 @@ public:
}
};
-/*####
-## npc_gurgthock
-####*/
-
-enum Gurgthock
-{
- QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON = 12935,
- QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER = 12936,
- QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_2 = 12954,
- QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_1 = 12932,
- QUEST_AMPHITHEATER_ANGUISH_MAGNATAUR = 12933,
- QUEST_AMPHITHEATER_ANGUISH_FROM_BEYOND = 12934,
-
- NPC_ORINOKO_TUSKBREAKER = 30020,
- NPC_KORRAK_BLOODRAGER = 30023,
- NPC_YGGDRAS = 30014,
- NPC_STINKBEARD = 30017,
- NPC_AZ_BARIN = 30026, // air
- NPC_DUKE_SINGEN = 30019, // fire
- NPC_ERATHIUS = 30025, // earth
- NPC_GARGORAL = 30024, // water
- NPC_FIEND_WATER = 30044,
- NPC_FIEND_AIR = 30045,
- NPC_FIEND_FIRE = 30042,
- NPC_FIEND_EARTH = 30043,
-
- SAY_QUEST_ACCEPT_TUSKARRMAGEDON = 0,
- SAY_QUEST_ACCEPT_KORRAK_1 = 1,
- SAY_QUEST_ACCEPT_KORRAK_2 = 2,
- SAY_QUEST_ACCEPT_MAGNATAUR = 3,
- EMOTE_YGGDRAS_SPAWN = 4,
- SAY_STINKBEARD_SPAWN = 5,
- SAY_GURGTHOCK_ELEMENTAL_SPAWN = 6,
- SAY_GURGTHOCK_7 = 7,
- SAY_QUEST_AMPHITHEATER_ANGUISH_YGGDRAS = 8,
- SAY_GURGTHOCK_9 = 9,
-
- SAY_CALL_FOR_HELP = 0,
- SAY_RECRUIT = 0,
-
- SPELL_CRASHING_WAVE = 55909, // water
- SPELL_SHOCKWAVE = 55918, // earth
- SPELL_BLAST_OF_AIR = 55912, // air
- SPELL_MAGMA_WAVE = 55916, // fire
-
- SPELL_ORB_OF_WATER = 55888, // fiend of water spell
- SPELL_ORB_OF_STORMS = 55882, // fiend of air spell
- SPELL_BOULDER = 55886, // fiend of earth spell
- SPELL_ORB_OF_FLAME = 55872, // fiend of fire spell
-};
-
-struct BossAndAdd
-{
- uint32 uiBoss;
- uint32 uiAdd;
- uint32 uiSpell;
- uint32 uiAddSpell;
-};
-
-static BossAndAdd Boss[]=
-{
- {NPC_GARGORAL, NPC_FIEND_WATER, SPELL_CRASHING_WAVE, SPELL_ORB_OF_WATER},
- {NPC_AZ_BARIN, NPC_FIEND_AIR, SPELL_BLAST_OF_AIR, SPELL_ORB_OF_STORMS},
- {NPC_DUKE_SINGEN, NPC_FIEND_FIRE, SPELL_MAGMA_WAVE, SPELL_ORB_OF_FLAME},
- {NPC_ERATHIUS, NPC_FIEND_EARTH, SPELL_SHOCKWAVE, SPELL_BOULDER},
-};
-
-const Position SpawnPosition[] =
-{
- {5754.692f, -2939.46f, 286.276123f, 5.156380f}, // stinkbeard || orinoko || korrak
- {5762.054199f, -2954.385010f, 273.826955f, 5.108289f}, //yggdras
- {5776.855f, -2989.77979f, 272.96814f, 5.194f} // elementals
-};
-
-const Position AddSpawnPosition[] =
-{
- {5722.487f, -3010.75f, 312.751648f, 0.478f}, // caster location
- {5724.983f, -2969.89551f, 286.359619f, 0.478f},
- {5733.76025f, -3000.34644f, 286.359619f, 0.478f},
- {5739.8125f, -2981.524f, 290.7671f, 0.478f}, // caster location
- {5742.101f, -2950.75586f, 286.2643f, 5.21f},
- {5743.305f, -3011.29736f, 290.7671f, 0.478f}, // caster location
- {5744.417f, -3025.528f, 286.35965f, 0.478f},
- {5763.189f, -3029.67529f, 290.7671f, 0.478f},
- {5769.401f, -2935.121f, 286.335754f, 5.21f},
- {5793.061f, -2934.593f, 286.359619f, 3.53f},
- {5797.32129f, -2955.26855f, 290.7671f, 3.53f}, // caster location
- {5813.94531f, -2956.74683f, 286.359619f, 3.53f},
- {5816.85547f, -2974.476f, 290.7671f, 3.53f}, // caster location
- {5820.30859f, -3002.83716f, 290.7671f, 3.53f}, // caster location
- {5828.50244f, -2981.737f, 286.359619f, 3.53f},
- {5828.899f, -2960.15479f, 312.751648f, 3.53f}, // caster location
-};
-
-class npc_gurgthock : public CreatureScript
-{
-public:
- npc_gurgthock() : CreatureScript("npc_gurgthock") { }
-
- struct npc_gurgthockAI : public ScriptedAI
- {
- npc_gurgthockAI(Creature* creature) : ScriptedAI(creature) {}
-
- void Reset() OVERRIDE
- {
- _summonGUID = 0;
- _playerGUID = 0;
-
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- uiTimer = 0;
- uiPhase = 0;
- uiQuest = 0;
- uiRemoveFlagTimer = 5000;
-
- _bossRandom = 0;
-
- _removeFlag = false;
- }
-
- void SetGUID(uint64 guid, int32 /*id*/) OVERRIDE
- {
- _playerGUID = guid;
- }
-
- void SetData(uint32 type, uint32 data) OVERRIDE
- {
- _removeFlag = true;
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
-
- switch (type)
- {
- case 1:
- switch (data)
- {
- case QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON:
- Talk(SAY_QUEST_ACCEPT_TUSKARRMAGEDON);
- uiPhase = 1;
- uiTimer = 4000;
- break;
- case QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER:
- Talk(SAY_QUEST_ACCEPT_KORRAK_1);
- uiPhase = 3;
- uiTimer = 3000;
- break;
- case QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_2:
- case QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_1:
- uiPhase = 6;
- uiTimer = 3000;
- break;
- case QUEST_AMPHITHEATER_ANGUISH_MAGNATAUR:
- uiTimer = 5000;
- uiPhase = 7;
- break;
- case QUEST_AMPHITHEATER_ANGUISH_FROM_BEYOND:
- uiTimer = 2000;
- uiPhase = 12;
- break;
- }
- break;
- }
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- ScriptedAI::UpdateAI(diff);
-
- if (_removeFlag)
- {
- if (uiRemoveFlagTimer <= diff)
- {
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- _removeFlag = false;
-
- uiRemoveFlagTimer = 10000;
- } else uiRemoveFlagTimer -= diff;
- }
-
- if (uiPhase)
- {
- if (uiTimer <= diff)
- {
- switch (uiPhase)
- {
- case 1:
- if (Creature* summon = me->SummonCreature(NPC_ORINOKO_TUSKBREAKER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- _summonGUID = summon->GetGUID();
- uiPhase = 2;
- uiTimer = 4000;
- break;
- case 2:
- if (Creature* summon = Unit::GetCreature(*me, _summonGUID))
- summon->GetMotionMaster()->MoveJump(5776.319824f, -2981.005371f, 273.100037f, 10.0f, 20.0f);
- uiPhase = 0;
- _summonGUID = 0;
- break;
- case 3:
- Talk(SAY_QUEST_ACCEPT_KORRAK_2);
- uiTimer = 3000;
- uiPhase = 4;
- break;
- case 4:
- if (Creature* summon = me->SummonCreature(NPC_KORRAK_BLOODRAGER, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- _summonGUID = summon->GetGUID();
- uiTimer = 3000;
- uiPhase = 0;
- break;
- case 6:
- Talk(SAY_GURGTHOCK_7, _playerGUID);
- uiTimer = 5000;
- uiPhase = 9;
- break;
- case 7:
- Talk(SAY_GURGTHOCK_9, _playerGUID);
- uiTimer = 3000;
- uiPhase = 8;
- break;
- case 8:
- Talk(SAY_QUEST_ACCEPT_MAGNATAUR);
- uiTimer = 5000;
- uiPhase = 11;
- break;
- case 9:
- Talk(SAY_QUEST_AMPHITHEATER_ANGUISH_YGGDRAS, _playerGUID);
- uiTimer = 10000;
- uiPhase = 10;
- break;
- case 10:
- me->SummonCreature(NPC_YGGDRAS, SpawnPosition[1], TEMPSUMMON_CORPSE_DESPAWN, 1000);
- Talk(EMOTE_YGGDRAS_SPAWN);
- uiPhase = 0;
- break;
- case 11:
- if (Creature* creature = me->SummonCreature(NPC_STINKBEARD, SpawnPosition[0], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- creature->AI()->Talk(SAY_STINKBEARD_SPAWN);
- uiPhase = 0;
- break;
- case 12:
- Talk(SAY_GURGTHOCK_9, _playerGUID);
- uiTimer = 5000;
- uiPhase = 13;
- break;
- case 13:
- Talk(SAY_GURGTHOCK_ELEMENTAL_SPAWN);
- uiTimer = 3000;
- uiPhase = 14;
- break;
- case 14:
- _bossRandom = urand(0, 3);
- if (Creature* creature = me->SummonCreature(Boss[_bossRandom].uiBoss, SpawnPosition[2], TEMPSUMMON_CORPSE_DESPAWN, 1000))
- creature->AI()->SetData(1, _bossRandom);
- uiPhase = 0;
- break;
- }
- }
- else
- uiTimer -= diff;
- }
- }
-
- private:
- bool _removeFlag;
- uint8 _bossRandom;
- uint64 _summonGUID;
- uint64 _playerGUID;
-
- uint32 uiTimer;
- uint32 uiPhase;
- uint32 uiRemoveFlagTimer;
- uint32 uiQuest;
-
- };
-
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
- {
- switch (quest->GetQuestId())
- {
- case QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON:
- creature->AI()->SetData(1, quest->GetQuestId());
- break;
- case QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER:
- creature->AI()->SetData(1, quest->GetQuestId());
- break;
- case QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_2:
- case QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_1:
- creature->AI()->SetData(1, quest->GetQuestId());
- break;
- case QUEST_AMPHITHEATER_ANGUISH_MAGNATAUR:
- creature->AI()->SetData(1, quest->GetQuestId());
- break;
- case QUEST_AMPHITHEATER_ANGUISH_FROM_BEYOND:
- creature->AI()->SetData(1, quest->GetQuestId());
- break;
- }
-
- creature->AI()->SetGUID(player->GetGUID());
-
- return false;
- }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_gurgthockAI(creature);
- }
-};
-
-/*####
-## npc_orinoko_tuskbreaker
-####*/
-
-enum OrinokoTuskbreaker
-{
- NPC_WHISKER = 30113,
- NPC_HUNGRY_PENGUIN = 30110,
-
- SPELL_BATTLE_SHOUT = 32064,
- SPELL_FISHY_SCENT = 55937,
- SPELL_IMPALE = 55929,
- SPELL_SUMMON_WHISKER = 55946
-};
-
-class npc_orinoko_tuskbreaker : public CreatureScript
-{
-public:
- npc_orinoko_tuskbreaker() : CreatureScript("npc_orinoko_tuskbreaker") { }
-
- struct npc_orinoko_tuskbreakerAI : public ScriptedAI
- {
- npc_orinoko_tuskbreakerAI(Creature* creature) : ScriptedAI(creature)
- {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_PASSIVE);
- }
-
- void Reset() OVERRIDE
- {
- _summoned = false;
- _battleShout = false;
- _fishyScent = false;
- uiBattleShoutTimer = 0;
- uiFishyScentTimer = 20000;
- _whiskerGUID = 0;
- _affectedGUID = 0;
- }
-
- void EnterEvadeMode() OVERRIDE
- {
- if (Creature* whisker = me->GetCreature(*me, _whiskerGUID))
- whisker->RemoveFromWorld();
- }
-
- void MovementInform(uint32 type, uint32 /*pointId*/) OVERRIDE
- {
- if (type != EFFECT_MOTION_TYPE)
- return;
-
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_AGGRESSIVE);
- me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- uiBattleShoutTimer = 7000;
- }
-
- void EnterCombat(Unit* who) OVERRIDE
- {
- DoCast(who, SPELL_IMPALE);
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (!UpdateVictim())
- return;
-
- if (!_battleShout && uiBattleShoutTimer <= diff)
- {
- DoCast(me, SPELL_BATTLE_SHOUT);
- _battleShout = true;
- } else uiBattleShoutTimer -= diff;
-
- if (uiFishyScentTimer <= diff)
- {
- if (Unit* affected = SelectTarget(SELECT_TARGET_RANDOM, 0))
- {
- DoCast(affected, SPELL_FISHY_SCENT);
- _affectedGUID = affected->GetGUID();
- }
- uiFishyScentTimer = 20000;
- } else uiFishyScentTimer -= diff;
-
- if (!_summoned && !HealthAbovePct(50))
- {
- Talk(SAY_CALL_FOR_HELP);
- //DoCastVictim(SPELL_SUMMON_WHISKER); petai is not working correctly???
-
- if (Creature* whisker = me->SummonCreature(NPC_WHISKER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
- _whiskerGUID = whisker->GetGUID();
- _summoned = true;
- }
-
- DoMeleeAttackIfReady();
- }
-
- void JustSummoned(Creature* summon) OVERRIDE
- {
- switch (summon->GetEntry())
- {
- case NPC_WHISKER:
- summon->AI()->AttackStart(me->GetVictim());
- break;
- case NPC_HUNGRY_PENGUIN:
- if (Unit* affected = Unit::GetUnit(*me, _affectedGUID))
- {
- if (affected->IsAlive())
- summon->AI()->AttackStart(affected);
- }
- break;
- }
- }
-
- void JustDied(Unit* killer) OVERRIDE
- {
- if (_whiskerGUID)
- if (Creature* whisker = me->GetCreature(*me, _whiskerGUID))
- whisker->RemoveFromWorld();
-
- if (killer->GetTypeId() == TYPEID_PLAYER)
- killer->GetCharmerOrOwnerPlayerOrPlayerItself()->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_TUSKARRMAGEDDON, killer);
-
- }
-
- private:
- bool _summoned;
- bool _battleShout;
- bool _fishyScent;
- uint32 uiBattleShoutTimer;
- uint32 uiFishyScentTimer;
- uint64 _affectedGUID;
- uint64 _whiskerGUID;
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_orinoko_tuskbreakerAI(creature);
- }
-};
-
-/*####
-## npc_korrak_bloodrager
-####*/
-
-enum KorrakBloodrager
-{
- SPELL_GROW = 55948,
- SPELL_CHARGE = 24193,
- SPELL_UPPERCUT = 30471,
- SPELL_ENRAGE = 42745
-};
-
-class npc_korrak_bloodrager : public CreatureScript
-{
-public:
- npc_korrak_bloodrager() : CreatureScript("npc_korrak_bloodrager") { }
-
- struct npc_korrak_bloodragerAI : public npc_escortAI
- {
- npc_korrak_bloodragerAI(Creature* creature) : npc_escortAI(creature)
- {
- Start(true, true, 0, NULL);
- SetDespawnAtEnd(false);
- }
-
- void Reset() OVERRIDE
- {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_PASSIVE);
- _enrage = false;
- _chargeTimer = 15000;
- _uppercutTimer = 12000;
-
- }
-
- void WaypointReached(uint32 waypointId) OVERRIDE
- {
- switch (waypointId)
- {
- case 6:
- me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_AGGRESSIVE);
- break;
- }
- }
-
- void EnterCombat(Unit* /*who*/) OVERRIDE
- {
- DoCast(me, SPELL_GROW);
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- npc_escortAI::UpdateAI(diff);
-
- if (!UpdateVictim())
- return;
-
- if (_uppercutTimer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_NEAREST, 0))
- DoCast(target, SPELL_UPPERCUT);
- _uppercutTimer = 12000;
- } else _uppercutTimer -= diff;
-
- if (_chargeTimer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0))
- DoCast(target, SPELL_CHARGE);
- _chargeTimer = 15000;
- } else _chargeTimer -= diff;
-
- if (!_enrage && !HealthAbovePct(20))
- {
- DoCast(me, SPELL_ENRAGE);
- _enrage = true;
- }
- DoMeleeAttackIfReady();
- }
-
- void JustDied(Unit* killer) OVERRIDE
- {
- if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
- player->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_KORRAK_BLOODRAGER, killer);
- }
- private:
- bool _enrage;
- uint32 _chargeTimer;
- uint32 _uppercutTimer;
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_korrak_bloodragerAI(creature);
- }
-};
-
-/*####
-## npc_yggdras
-####*/
-
-enum Yggdras
-{
- SPELL_CLEAVE = 40504,
- SPELL_CORRODE_FLESH = 57076,
- SPELL_JORMUNGAR_SPAWN = 55859
-};
-
-class npc_yggdras : public CreatureScript
-{
-public:
- npc_yggdras() : CreatureScript("npc_yggdras") { }
-
- struct npc_yggdrasAI : public ScriptedAI
- {
- npc_yggdrasAI(Creature* creature) : ScriptedAI(creature) {}
-
- void Reset() OVERRIDE
- {
- _cleaveTimer = 9000;
- _corrodeFleshTimer = 6000;
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (!UpdateVictim())
- return;
-
- if (me->GetVictim()->GetPositionZ() >= 286.276f)
- {
- std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
- for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
- {
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
- {
- if (unit->GetPositionZ() <= 286.276f)
- {
- me->getThreatManager().resetAllAggro();
- me->AddThreat(unit, 5.0f);
- break;
- }
- EnterEvadeMode();
- }
- }
- }
-
- if (_cleaveTimer <= diff)
- {
- DoCastVictim(SPELL_CLEAVE);
- _cleaveTimer = 9000;
- } else _cleaveTimer -= diff;
-
- if (_corrodeFleshTimer <= diff)
- {
- DoCastVictim(SPELL_CORRODE_FLESH);
- _corrodeFleshTimer = 6000;
- } else _corrodeFleshTimer -= diff;
-
- DoMeleeAttackIfReady();
- }
-
- void JustDied(Unit* killer) OVERRIDE
- {
- if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- {
- std::string sText = (std::string(killer->GetName()) + " has defeated Yg.. Yggg-really big worm!");
- summoner->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
- }
-
- if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
- {
- player->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_1, killer);
- player->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_2, killer);
- }
-
- for (uint8 i = 0; i < 3; ++i)
- DoCast(killer, SPELL_JORMUNGAR_SPAWN, true);
- }
- private:
- uint32 _cleaveTimer;
- uint32 _corrodeFleshTimer;
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_yggdrasAI(creature);
- }
-};
-
-/*####
-## npc_stinkbeard
-####*/
-
-enum Stinkbeard
-{
- SPELL_ENRAGE_STINKBEARD = 50420,
- SPELL_KNOCK_AWAY = 31389,
- SPELL_STINKY_BEARD = 55867,
- SPELL_THUNDERBLADE = 55866,
- SPELL_THUNDERCLAP = 15588
-};
-
-class npc_stinkbeard : public CreatureScript
-{
-public:
- npc_stinkbeard() : CreatureScript("npc_stinkbeard") { }
-
- struct npc_stinkbeardAI : public npc_escortAI
- {
- npc_stinkbeardAI(Creature* creature) : npc_escortAI(creature)
- {
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_PASSIVE);
- Start(true, true, 0, NULL);
- SetDespawnAtEnd(false);
- }
-
- void Reset() OVERRIDE
- {
- me->AddAura(SPELL_THUNDERBLADE, me);
- uiKnockAwayTimer = 10000;
- uiStinkyBeardTimer = 15000;
- _enrage = false;
- _thunderClap = false;
- }
-
- void WaypointReached(uint32 waypointId) OVERRIDE
- {
- switch (waypointId)
- {
- case 7:
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->SetReactState(REACT_AGGRESSIVE);
- me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
- break;
- }
- }
-
- void UpdateAI(uint32 uiDiff) OVERRIDE
- {
- npc_escortAI::UpdateAI(uiDiff);
-
- if (!UpdateVictim())
- return;
-
- if (Unit* victim = me->GetVictim())
- {
- if (victim->GetPositionZ() >= 286.276f)
- {
- std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
- for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
- {
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
- {
- if (unit->GetPositionZ() <= 286.276f)
- {
- me->getThreatManager().resetAllAggro();
- me->AddThreat(unit, 5.0f);
- break;
- }
- EnterEvadeMode();
- }
- }
- }
- }
-
- if (_thunderClap && !HealthAbovePct(10))
- {
- DoCastAOE(SPELL_THUNDERCLAP);
- _thunderClap = true;
- }
-
- if (uiKnockAwayTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- {
- if (target && target->IsAlive())
- DoCast(target, SPELL_KNOCK_AWAY);
- }
- uiKnockAwayTimer = 10000;
- } else uiKnockAwayTimer -= uiDiff;
-
- if (uiStinkyBeardTimer <= uiDiff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- {
- if (target && target->IsAlive())
- DoCast(target, SPELL_STINKY_BEARD);
- }
- uiStinkyBeardTimer = 15000;
- } else uiStinkyBeardTimer -= uiDiff;
-
- if (!_enrage && !HealthAbovePct(20))
- {
- DoCast(me, SPELL_ENRAGE_STINKBEARD);
- _enrage = true;
- }
- DoMeleeAttackIfReady();
- }
-
- void JustDied(Unit* killer) OVERRIDE
- {
- if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
- player->GetCharmerOrOwnerPlayerOrPlayerItself()->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_MAGNATAUR, killer);
-
- std::string sText = ("And with AUTHORITY, " + std::string(killer->GetName()) + " dominates the magnataur lord! Stinkbeard's clan is gonna miss him back home in the Dragonblight!");
- me->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
- }
- private:
- bool _enrage;
- bool _thunderClap;
- uint32 uiKnockAwayTimer;
- uint32 uiStinkyBeardTimer;
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_stinkbeardAI(creature);
- }
-};
-
-/*####
-## npc_elemental_lord
-####*/
-
-class npc_elemental_lord : public CreatureScript
-{
-public:
- npc_elemental_lord() : CreatureScript("npc_elemental_lord") { }
-
- struct npc_elemental_lordAI : public ScriptedAI
- {
- npc_elemental_lordAI(Creature* creature) : ScriptedAI(creature) {}
-
- std::list<uint64> SummonList;
-
- uint32 uiElementalSpellTimer;
-
- uint8 uiBossRandom;
- uint32 uiSpellInfo;
-
- bool bAddAttack;
-
- void Reset() OVERRIDE
- {
- uiBossRandom = 0;
- uiSpellInfo = 0;
- uiElementalSpellTimer = urand(5000, 8000);
-
- bAddAttack = false;
- }
-
- void SetData(uint32 uiData, uint32 uiValue) OVERRIDE
- {
- if (uiData == 1)
- {
- uiBossRandom = uiValue;
- SummonAdds();
- }
- }
-
- void SummonAdds()
- {
- if (!Boss[uiBossRandom].uiAdd)
- return;
-
- SummonList.clear();
-
- for (uint8 uiI = 0; uiI < 16; uiI++)
- {
- if (Creature* summon = me->SummonCreature(Boss[uiBossRandom].uiAdd, AddSpawnPosition[uiI]))
- {
- summon->AI()->SetData(1, uiBossRandom);
- SummonList.push_back(summon->GetGUID());
- }
- }
-
- }
-
- void EnterCombat(Unit* unit) OVERRIDE
- {
- if (!SummonList.empty())
- for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
- {
- if (Creature* temp = Unit::GetCreature(*me, *itr))
- {
- temp->m_CombatDistance = 100.0f; // ugly hack? we are not in a instance sorry. :(
- temp->AI()->AttackStart(unit);
- }
- }
- }
-
- void UpdateAI(uint32 uiDiff) OVERRIDE
- {
- if (!UpdateVictim())
- return;
-
- if (me->GetVictim()->GetPositionZ() >= 286.276f)
- {
- std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
- for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
- {
- if (Unit* unit = Unit::GetUnit(*me, (*itr)->getUnitGuid()))
- {
- if (unit->GetPositionZ() <= 286.276f)
- {
- me->getThreatManager().resetAllAggro();
- me->AddThreat(unit, 5.0f);
- break;
- }
- EnterEvadeMode();
- }
- }
- }
-
- if (uiElementalSpellTimer <= uiDiff)
- {
- DoCastVictim(Boss[uiBossRandom].uiSpell);
-
- uiElementalSpellTimer = urand(5000, 8000);
- } else uiElementalSpellTimer -= uiDiff;
-
- if (!bAddAttack && !HealthAbovePct(20))
- {
- if (!SummonList.empty())
- for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
- {
- if (Creature* temp = Unit::GetCreature(*me, *itr))
- {
- if (temp->GetPositionZ() >= 287.00f)
- continue;
-
- if (temp->GetVictim())
- temp->GetMotionMaster()->MoveChase(temp->GetVictim());
- }
- }
-
- bAddAttack = true;
- }
-
- DoMeleeAttackIfReady();
- }
-
- void JustDied(Unit* killer) OVERRIDE
- {
- if (!SummonList.empty())
- for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
- if (Creature* temp = Unit::GetCreature(*me, *itr))
- temp->DespawnOrUnsummon();
-
- if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
- player->GetCharmerOrOwnerPlayerOrPlayerItself()->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_FROM_BEYOND, killer);
-
- std::string sText = (std::string(killer->GetName()) + " is victorious once more!");
-
- if (Unit* summoner = me->ToTempSummon()->GetSummoner())
- summoner->MonsterYell(sText.c_str(), LANG_UNIVERSAL, 0);
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_elemental_lordAI(creature);
- }
-};
-
-/*####
-## npc_fiend_elemental
-####*/
-
-class npc_fiend_elemental : public CreatureScript
-{
-public:
- npc_fiend_elemental() : CreatureScript("npc_fiend_elemental") { }
-
- struct npc_fiend_elementalAI : public ScriptedAI
- {
- npc_fiend_elementalAI(Creature* creature) : ScriptedAI(creature) {}
-
- void Reset() OVERRIDE
- {
- if (me->GetPositionZ() >= 287.0f)
- me->GetMotionMaster()->MoveIdle();
-
- _spell = 0;
- _missleTimer = urand(2000, 7000);
- }
-
- void AttackStart(Unit* who) OVERRIDE
- {
- if (!who)
- return;
-
- AttackStartNoMove(who);
- }
-
- void SetData(uint32 Data, uint32 Value) OVERRIDE
- {
- if (Data == 1)
- _spell = Boss[Value].uiAddSpell;
-
- }
-
- void UpdateAI(uint32 diff) OVERRIDE
- {
- if (!UpdateVictim())
- return;
-
- if (me->GetPositionZ() >= 287.0f)
- {
- if (_missleTimer <= diff)
- {
- if (_spell) // Sometimes it is 0, why?
- DoCast(me, _spell); // this spell (what spell) is not supported ... YET!
- _missleTimer = urand(2000, 7000);
- } else _missleTimer -= diff;
- }
-
- DoMeleeAttackIfReady();
- }
-
- private:
- uint32 _missleTimer;
- uint32 _spell;
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_fiend_elementalAI(creature);
- }
-};
/*####
## npc_released_offspring_harkoa
@@ -1154,7 +177,7 @@ public:
struct npc_released_offspring_harkoaAI : public ScriptedAI
{
- npc_released_offspring_harkoaAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_released_offspring_harkoaAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -1184,7 +207,8 @@ public:
enum CrusadeRecruit
{
SPELL_QUEST_CREDIT = 50633,
- QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE = 12509
+ QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE = 12509,
+ SAY_RECRUIT = 0
};
enum CrusadeRecruitEvents
@@ -1200,7 +224,7 @@ public:
struct npc_crusade_recruitAI : public ScriptedAI
{
- npc_crusade_recruitAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_crusade_recruitAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -1831,7 +855,7 @@ public:
struct npc_storm_cloudAI : public ScriptedAI
{
- npc_storm_cloudAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_storm_cloudAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -1867,15 +891,8 @@ void AddSC_zuldrak()
{
new npc_drakuru_shackles();
new npc_captured_rageclaw();
- new npc_gurgthock();
- new npc_orinoko_tuskbreaker();
- new npc_korrak_bloodrager();
- new npc_yggdras();
- new npc_stinkbeard();
new npc_released_offspring_harkoa();
new npc_crusade_recruit();
- new npc_elemental_lord();
- new npc_fiend_elemental();
new go_scourge_enclosure();
new npc_alchemist_finklestein();
new go_finklesteins_cauldron();
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
index 60dce43bc42..d6743428db0 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
@@ -205,7 +205,7 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
bool Update(uint32 diff);
- void ChangeState() {}
+ void ChangeState() { }
void FillInitialWorldStates(WorldPacket & data);
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 9735011ba81..4f7ac113547 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -61,7 +61,7 @@ public:
struct npc_stolen_soulAI : public ScriptedAI
{
- npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature) { }
uint8 myClass;
uint32 Class_Timer;
@@ -314,7 +314,7 @@ public:
struct npc_avatar_of_martyredAI : public ScriptedAI
{
- npc_avatar_of_martyredAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_avatar_of_martyredAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Mortal_Strike_timer;
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 83c0cbf04d5..862fe76decd 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -331,7 +331,7 @@ public:
struct npc_ethereal_apprenticeAI : public ScriptedAI
{
- npc_ethereal_apprenticeAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_ethereal_apprenticeAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Cast_Timer;
@@ -378,9 +378,9 @@ public:
struct npc_yorAI : public ScriptedAI
{
- npc_yorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_yorAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
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 be3a109b9f0..c077cec3c04 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -220,7 +220,7 @@ public:
flamebuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -279,7 +279,7 @@ public:
arcanebuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -333,7 +333,7 @@ public:
frostbuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -388,7 +388,7 @@ public:
shadowbuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index a44c5f58dc4..57c494756e5 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -63,7 +63,7 @@ public:
struct npc_spirit_of_olumAI : public ScriptedAI
{
- npc_spirit_of_olumAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_spirit_of_olumAI(Creature* creature) : ScriptedAI(creature) { }
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) OVERRIDE
{
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 279a846140c..3f90118ec8b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -377,7 +377,7 @@ public:
struct flame_of_azzinothAI : public ScriptedAI
{
- flame_of_azzinothAI(Creature* creature) : ScriptedAI(creature) {}
+ flame_of_azzinothAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -534,7 +534,7 @@ public:
ScriptedAI::AttackStart(who);
}
- void MoveInLineOfSight(Unit*) OVERRIDE {}
+ void MoveInLineOfSight(Unit*) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
@@ -765,7 +765,7 @@ public:
{
EnterEvadeMode();
me->MonsterTextEmote(EMOTE_UNABLE_TO_SUMMON, 0);
- TC_LOG_ERROR(LOG_FILTER_TSCR, "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)");
+ TC_LOG_ERROR("scripts", "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)");
}
}
@@ -1140,7 +1140,7 @@ public:
struct boss_maievAI : public ScriptedAI
{
- boss_maievAI(Creature* creature) : ScriptedAI(creature) {};
+ boss_maievAI(Creature* creature) : ScriptedAI(creature) { };
void Reset() OVERRIDE
{
@@ -1154,10 +1154,10 @@ public:
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, 45738);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void EnterEvadeMode() OVERRIDE {}
+ void EnterEvadeMode() OVERRIDE { }
void GetIllidanGUID(uint64 guid)
{
@@ -1428,8 +1428,8 @@ public:
me->CombatStop(true);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void MovementInform(uint32 MovementType, uint32 /*Data*/) OVERRIDE
@@ -1976,7 +1976,7 @@ public:
struct cage_trap_triggerAI : public ScriptedAI
{
- cage_trap_triggerAI(Creature* creature) : ScriptedAI(creature) {}
+ cage_trap_triggerAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -1990,7 +1990,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -2074,7 +2074,7 @@ public:
struct shadow_demonAI : public ScriptedAI
{
- shadow_demonAI(Creature* creature) : ScriptedAI(creature) {}
+ shadow_demonAI(Creature* creature) : ScriptedAI(creature) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
@@ -2130,7 +2130,7 @@ public:
struct blade_of_azzinothAI : public NullCreatureAI
{
- blade_of_azzinothAI(Creature* creature) : NullCreatureAI(creature) {}
+ blade_of_azzinothAI(Creature* creature) : NullCreatureAI(creature) { }
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
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 ab3bc98b41b..ad913a45071 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -111,7 +111,7 @@ public:
struct npc_enslaved_soulAI : public ScriptedAI
{
- npc_enslaved_soulAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_enslaved_soulAI(Creature* creature) : ScriptedAI(creature) { }
uint64 ReliquaryGUID;
@@ -393,7 +393,7 @@ public:
struct boss_essence_of_sufferingAI : public ScriptedAI
{
- boss_essence_of_sufferingAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_essence_of_sufferingAI(Creature* creature) : ScriptedAI(creature) { }
uint64 StatAuraGUID;
@@ -516,7 +516,7 @@ public:
struct boss_essence_of_desireAI : public ScriptedAI
{
- boss_essence_of_desireAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_essence_of_desireAI(Creature* creature) : ScriptedAI(creature) { }
uint32 RuneShieldTimer;
uint32 DeadenTimer;
@@ -619,7 +619,7 @@ public:
struct boss_essence_of_angerAI : public ScriptedAI
{
- boss_essence_of_angerAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_essence_of_angerAI(Creature* creature) : ScriptedAI(creature) { }
uint64 AggroTargetGUID;
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 92647cfb69f..1a2a55e6d00 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -784,7 +784,7 @@ public:
CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void AttackStart(Unit* who) OVERRIDE
{
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index 94423f87bdf..b62e7b35a3c 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -70,7 +70,7 @@ public:
struct molten_flameAI : public NullCreatureAI
{
- molten_flameAI(Creature* creature) : NullCreatureAI(creature) {}
+ molten_flameAI(Creature* creature) : NullCreatureAI(creature) { }
void InitializeAI() OVERRIDE
{
@@ -283,9 +283,9 @@ public:
}
uint32 wait;
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void DoAction(int32 /*info*/) OVERRIDE
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index c02954c7b2f..7d445e23053 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -63,7 +63,7 @@ public:
struct npc_doom_blossomAI : public ScriptedAI
{
- npc_doom_blossomAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_doom_blossomAI(Creature* creature) : ScriptedAI(creature) { }
uint32 CheckTeronTimer;
uint32 ShadowBoltTimer;
@@ -76,9 +76,9 @@ public:
TeronGUID = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void Despawn()
@@ -132,7 +132,7 @@ public:
struct npc_shadowy_constructAI : public ScriptedAI
{
- npc_shadowy_constructAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_shadowy_constructAI(Creature* creature) : ScriptedAI(creature) { }
uint64 GhostGUID;
uint64 TeronGUID;
@@ -149,7 +149,7 @@ public:
CheckTeronTimer = 5000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -266,7 +266,7 @@ public:
Done = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 05d19eb62bf..057bb725c32 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -161,13 +161,13 @@ public:
Council[1] = instance->GetData64(DATA_VERAS_DARKSHADOW);
Council[2] = instance->GetData64(DATA_LADY_MALANDE);
Council[3] = instance->GetData64(DATA_HIGH_NETHERMANCER_ZEREVOR);
- } else TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ } else TC_LOG_ERROR("scripts", ERROR_INST_DATA);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
@@ -277,9 +277,9 @@ public:
me->SetDisplayId(11686);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void StartEvent(Unit* target)
@@ -408,7 +408,7 @@ struct boss_illidari_councilAI : public ScriptedAI
}
else
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ TC_LOG_ERROR("scripts", ERROR_INST_DATA);
EnterEvadeMode();
return;
}
@@ -456,7 +456,7 @@ struct boss_illidari_councilAI : public ScriptedAI
{
if (!instance)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
+ TC_LOG_ERROR("scripts", ERROR_INST_DATA);
return;
}
@@ -481,7 +481,7 @@ public:
struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
{
- boss_gathios_the_shattererAI(Creature* creature) : boss_illidari_councilAI(creature) {}
+ boss_gathios_the_shattererAI(Creature* creature) : boss_illidari_councilAI(creature) { }
uint32 ConsecrationTimer;
uint32 HammerOfJusticeTimer;
@@ -613,7 +613,7 @@ public:
struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
{
- boss_high_nethermancer_zerevorAI(Creature* creature) : boss_illidari_councilAI(creature) {}
+ boss_high_nethermancer_zerevorAI(Creature* creature) : boss_illidari_councilAI(creature) { }
uint32 BlizzardTimer;
uint32 FlamestrikeTimer;
@@ -717,7 +717,7 @@ public:
struct boss_lady_malandeAI : public boss_illidari_councilAI
{
- boss_lady_malandeAI(Creature* creature) : boss_illidari_councilAI(creature) {}
+ boss_lady_malandeAI(Creature* creature) : boss_illidari_councilAI(creature) { }
uint32 EmpoweredSmiteTimer;
uint32 CircleOfHealingTimer;
@@ -795,7 +795,7 @@ public:
struct boss_veras_darkshadowAI : public boss_illidari_councilAI
{
- boss_veras_darkshadowAI(Creature* creature) : boss_illidari_councilAI(creature) {}
+ boss_veras_darkshadowAI(Creature* creature) : boss_illidari_councilAI(creature) { }
uint64 EnvenomTargetGUID;
diff --git a/src/server/scripts/Outland/CMakeLists.txt b/src/server/scripts/Outland/CMakeLists.txt
index 84cbbc3c30c..ab10ee2dfe4 100644
--- a/src/server/scripts/Outland/CMakeLists.txt
+++ b/src/server/scripts/Outland/CMakeLists.txt
@@ -43,9 +43,13 @@ set(scripts_STAT_SRCS
Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
+ Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h
+ Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp
+ Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp
+ Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp
+ Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp
Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
- Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
Outland/zone_shattrath_city.cpp
Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -68,6 +72,9 @@ set(scripts_STAT_SRCS
Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
Outland/TempestKeep/botanica/boss_warp_splinter.cpp
Outland/TempestKeep/botanica/boss_laj.cpp
+ Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp
+ Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
+ Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
Outland/TempestKeep/arcatraz/arcatraz.h
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 ff66dcb550c..1d233aa6da4 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -601,9 +601,9 @@ public:
VashjGUID = instance->GetData64(DATA_LADYVASHJ);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
@@ -842,7 +842,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
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 a87ad44ef1c..83ec5e053c0 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
@@ -609,7 +609,7 @@ public:
struct boss_leotheras_the_blind_demonformAI : public ScriptedAI
{
- boss_leotheras_the_blind_demonformAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_leotheras_the_blind_demonformAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ChaosBlast_Timer;
bool DealDamage;
@@ -801,7 +801,7 @@ public:
DoMeleeAttackIfReady();
}
- void JustDied(Unit* /*killer*/) OVERRIDE {}
+ void JustDied(Unit* /*killer*/) OVERRIDE { }
};
};
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 cd56005b3f6..0393379d26a 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -429,7 +429,7 @@ public:
class go_strange_pool : public GameObjectScript
{
public:
- go_strange_pool() : GameObjectScript("go_strange_pool") {}
+ go_strange_pool() : GameObjectScript("go_strange_pool") { }
bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
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 e0469dbfbfb..48a4a1e5ecd 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -299,7 +299,7 @@ public:
struct npc_water_globuleAI : public ScriptedAI
{
- npc_water_globuleAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_water_globuleAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Check_Timer;
@@ -312,7 +312,7 @@ public:
me->setFaction(14);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
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 50e9ffee196..d6162fd1ea4 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
@@ -146,7 +146,7 @@ public:
struct npc_coilfang_waterelementalAI : public ScriptedAI
{
- npc_coilfang_waterelementalAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_coilfang_waterelementalAI(Creature* creature) : ScriptedAI(creature) { }
uint32 WaterBoltVolley_Timer;
@@ -155,7 +155,7 @@ public:
WaterBoltVolley_Timer = 3000+rand()%3000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
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 7c31c0dab0c..241d0f8fec2 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -221,7 +221,7 @@ public:
//react only if attacked
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
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 10a0b63a7b5..887d51a43bf 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
@@ -78,7 +78,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void StartRageGen(Unit* /*caster*/)
{
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 88ba950554a..784b7c59736 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp
@@ -137,7 +137,7 @@ class instance_steam_vault : public InstanceMapScript
if (GetBossState(DATA_MEKGINEER_STEAMRIGGER) == SPECIAL)
HandleGameObject(MainChambersDoorGUID, true);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Steamvault: Access panel used.");
+ TC_LOG_DEBUG("scripts", "Instance Steamvault: Access panel used.");
}
break;
case DATA_MEKGINEER_STEAMRIGGER:
@@ -146,7 +146,7 @@ class instance_steam_vault : public InstanceMapScript
if (GetBossState(DATA_HYDROMANCER_THESPIA) == SPECIAL)
HandleGameObject(MainChambersDoorGUID, true);
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Steamvault: Access panel used.");
+ TC_LOG_DEBUG("scripts", "Instance Steamvault: Access panel used.");
}
break;
default:
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp
new file mode 100644
index 00000000000..ba59aa3b463
--- /dev/null
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2008-2013 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_mennu_the_betrayer
+SD%Complete: 95%
+SDComment:
+SDCategory: Coilfang Reservoir, The Slave Pens
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "the_slave_pens.h"
+
+enum Say
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2
+};
+
+enum Spells
+{
+ SPELL_TAINTED_STONESKIN_TOTEM = 31985, // every 30 sec if health below 100%
+ SPELL_TAINTED_EARTHGRAB_TOTEM = 31981, // ?
+ SPELL_CORRUPTED_NOVA_TOTEM = 31991, // ?
+ SPELL_MENNUS_HEALING_WARD = 34980, // every 14 - 25 sec
+ SPELL_LIGHTNING_BOLT = 35010 // every 14 - 19 sec
+};
+
+enum Events
+{
+ EVENT_TAINTED_STONESKIN_TOTEM = 1,
+ EVENT_TAINTED_EARTHGRAB_TOTEM = 2,
+ EVENT_CORRUPTED_NOVA_TOTEM = 3,
+ EVENT_MENNUS_HEALING_WARD = 4,
+ EVENT_LIGHTNING_BOLT = 5
+};
+
+class boss_mennu_the_betrayer : public CreatureScript
+{
+ public:
+ boss_mennu_the_betrayer() : CreatureScript("boss_mennu_the_betrayer") { }
+
+ struct boss_mennu_the_betrayerAI : public BossAI
+ {
+ boss_mennu_the_betrayerAI(Creature* creature) : BossAI(creature, DATA_MENNU_THE_BETRAYER) { }
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_TAINTED_STONESKIN_TOTEM, 30000);
+ events.ScheduleEvent(EVENT_TAINTED_EARTHGRAB_TOTEM, 20000);
+ events.ScheduleEvent(EVENT_CORRUPTED_NOVA_TOTEM, 60000);
+ events.ScheduleEvent(EVENT_MENNUS_HEALING_WARD, urand(14000, 25000));
+ events.ScheduleEvent(EVENT_LIGHTNING_BOLT, urand(14000, 19000));
+ Talk(SAY_AGGRO);
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
+ {
+ Talk(SAY_SLAY);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_TAINTED_STONESKIN_TOTEM:
+ if (HealthBelowPct(100))
+ DoCast(me, SPELL_TAINTED_STONESKIN_TOTEM);
+ events.ScheduleEvent(EVENT_TAINTED_STONESKIN_TOTEM, 30000);
+ break;
+ case EVENT_TAINTED_EARTHGRAB_TOTEM:
+ DoCast(me, SPELL_TAINTED_EARTHGRAB_TOTEM);
+ break;
+ case EVENT_CORRUPTED_NOVA_TOTEM:
+ DoCast(me, SPELL_CORRUPTED_NOVA_TOTEM);
+ break;
+ case EVENT_MENNUS_HEALING_WARD:
+ DoCast(me, SPELL_MENNUS_HEALING_WARD);
+ events.ScheduleEvent(EVENT_MENNUS_HEALING_WARD, urand(14000, 25000));
+ break;
+ case EVENT_LIGHTNING_BOLT:
+ DoCastVictim(SPELL_LIGHTNING_BOLT, true);
+ events.ScheduleEvent(EVENT_LIGHTNING_BOLT, urand(14000, 25000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_mennu_the_betrayerAI(creature);
+ }
+};
+
+void AddSC_boss_mennu_the_betrayer()
+{
+ new boss_mennu_the_betrayer();
+}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp
new file mode 100644
index 00000000000..6cef7291542
--- /dev/null
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2008-2013 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_quagmirran
+SD%Complete: 100%
+SDComment:
+SDCategory: Coilfang Reservoir, The Slave Pens
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "the_slave_pens.h"
+
+enum Spells
+{
+ SPELL_ACID_SPRAY = 38153,
+ SPELL_CLEAVE = 40504,
+ SPELL_UPPERCUT = 32055,
+ SPELL_POISON_BOLT_VOLLEY = 34780 // 39340
+};
+
+enum Events
+{
+ EVENT_ACID_SPRAY = 1,
+ EVENT_CLEAVE = 2,
+ EVENT_UPPERCUT = 3,
+ EVENT_POISON_BOLT_VOLLEY = 4
+};
+
+class boss_quagmirran : public CreatureScript
+{
+ public:
+ boss_quagmirran() : CreatureScript("boss_quagmirran") { }
+
+ struct boss_quagmirranAI : public BossAI
+ {
+ boss_quagmirranAI(Creature* creature) : BossAI(creature, DATA_QUAGMIRRAN) { }
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_ACID_SPRAY, 25000);
+ events.ScheduleEvent(EVENT_CLEAVE, 9000);
+ events.ScheduleEvent(EVENT_UPPERCUT, 20000);
+ events.ScheduleEvent(EVENT_POISON_BOLT_VOLLEY, 31000);
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE { }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_ACID_SPRAY:
+ DoCastAOE(SPELL_ACID_SPRAY);
+ events.ScheduleEvent(EVENT_ACID_SPRAY, urand(20000, 25000));
+ break;
+ case EVENT_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE, true);
+ events.ScheduleEvent(EVENT_CLEAVE, urand(18000, 34000));
+ break;
+ case EVENT_UPPERCUT:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 10.0f, true))
+ DoCast(target, SPELL_UPPERCUT);
+ events.ScheduleEvent(EVENT_UPPERCUT, 22000);
+ break;
+ case EVENT_POISON_BOLT_VOLLEY:
+ DoCast(me, SPELL_POISON_BOLT_VOLLEY);
+ events.ScheduleEvent(EVENT_POISON_BOLT_VOLLEY, 24000);
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_quagmirranAI(creature);
+ }
+};
+
+void AddSC_boss_quagmirran()
+{
+ new boss_quagmirran();
+}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp
new file mode 100644
index 00000000000..a025df5c3ae
--- /dev/null
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2008-2013 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_rokmar_the_crackler
+SD%Complete: 100%
+SDComment:
+SDCategory: Coilfang Reservoir, The Slave Pens
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "the_slave_pens.h"
+
+enum Spells
+{
+ SPELL_GRIEVOUS_WOUND = 31956,
+ SPELL_ENSNARING_MOSS = 31948,
+ SPELL_WATER_SPIT = 35008,
+ SPELL_FRENZY = 34970
+};
+
+enum Events
+{
+ EVENT_GRIEVOUS_WOUND = 1,
+ EVENT_ENSNARING_MOSS = 2,
+ EVENT_WATER_SPIT = 3
+};
+
+class boss_rokmar_the_crackler : public CreatureScript
+{
+ public:
+ boss_rokmar_the_crackler() : CreatureScript("boss_rokmar_the_crackler") { }
+
+ struct boss_rokmar_the_cracklerAI : public BossAI
+ {
+ boss_rokmar_the_cracklerAI(Creature* creature) : BossAI(creature, DATA_MENNU_THE_BETRAYER) { }
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ rokmarFrenzy = false;
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_GRIEVOUS_WOUND, 10000);
+ events.ScheduleEvent(EVENT_ENSNARING_MOSS, 20000);
+ events.ScheduleEvent(EVENT_WATER_SPIT, 14000);
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE { }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_GRIEVOUS_WOUND:
+ DoCastVictim(SPELL_GRIEVOUS_WOUND, true);
+ events.ScheduleEvent(EVENT_GRIEVOUS_WOUND, urand(20000, 30000));
+ break;
+ case EVENT_ENSNARING_MOSS:
+ DoCastAOE(SPELL_ENSNARING_MOSS);
+ events.ScheduleEvent(EVENT_ENSNARING_MOSS, urand(20000, 30000));
+ break;
+ case EVENT_WATER_SPIT:
+ DoCastAOE(SPELL_WATER_SPIT);
+ events.ScheduleEvent(EVENT_WATER_SPIT, urand(14000, 18000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (HealthBelowPct(10) && !rokmarFrenzy)
+ {
+ DoCast(me, SPELL_FRENZY);
+ rokmarFrenzy = true;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ bool rokmarFrenzy;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_rokmar_the_cracklerAI(creature);
+ }
+};
+
+void AddSC_boss_rokmar_the_crackler()
+{
+ new boss_rokmar_the_crackler();
+}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
index 3475e83f02c..1c31bee7d4f 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
@@ -24,11 +24,12 @@ gets instead the deserter debuff.
#include "ScriptMgr.h"
#include "InstanceScript.h"
+#include "the_slave_pens.h"
class instance_the_slave_pens : public InstanceMapScript
{
public:
- instance_the_slave_pens() : InstanceMapScript("instance_the_slave_pens", 547) { }
+ instance_the_slave_pens() : InstanceMapScript(SPScriptName, 547) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
@@ -37,7 +38,7 @@ public:
struct instance_the_slave_pens_InstanceMapScript : public InstanceScript
{
- instance_the_slave_pens_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_the_slave_pens_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h
new file mode 100644
index 00000000000..624ead7ef08
--- /dev/null
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2008-2013 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 SLAVE_PENS_H
+#define SLAVE_PENS_H
+
+uint32 const EncounterCount = 3;
+
+#define SPScriptName "instance_the_slave_pens"
+
+enum DataTypes
+{
+ DATA_MENNU_THE_BETRAYER = 1,
+ DATA_ROKMAR_THE_CRACKLER = 2,
+ DATA_QUAGMIRRAN = 3
+};
+
+#endif // SLAVE_PENS_H
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp
index 0db48d83ebb..ef3d317643b 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp
@@ -116,7 +116,7 @@ public:
struct npc_underbog_mushroomAI : public ScriptedAI
{
- npc_underbog_mushroomAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_underbog_mushroomAI(Creature* creature) : ScriptedAI(creature) { }
bool Stop;
uint32 Grow_Timer;
@@ -132,12 +132,12 @@ public:
DoCast(me, SPELL_SPORE_CLOUD, true);
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
index c22dedd269e..47bd4e3bb6c 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
@@ -80,7 +80,7 @@ public:
Striders.clear();
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustSummoned(Creature* summon) OVERRIDE
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
index 0a305edf23f..08d80d3dd82 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
@@ -37,7 +37,7 @@ public:
struct instance_the_underbog_InstanceMapScript : public InstanceScript
{
- instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
index 2f5e160b335..be4cac80adb 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
@@ -161,7 +161,7 @@ class boss_broggok : public CreatureScript
class go_broggok_lever : public GameObjectScript
{
public:
- go_broggok_lever() : GameObjectScript("go_broggok_lever") {}
+ go_broggok_lever() : GameObjectScript("go_broggok_lever") { }
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
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 fedf56eb929..f6bceb78a14 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
@@ -296,11 +296,11 @@ class npc_shadowmoon_channeler : public CreatureScript
{
public:
- npc_shadowmoon_channeler() : CreatureScript("npc_shadowmoon_channeler") {}
+ npc_shadowmoon_channeler() : CreatureScript("npc_shadowmoon_channeler") { }
struct npc_shadowmoon_channelerAI : public ScriptedAI
{
- npc_shadowmoon_channelerAI(Creature* creature) : ScriptedAI(creature){}
+ npc_shadowmoon_channelerAI(Creature* creature) : ScriptedAI(creature){ }
uint32 ShadowBolt_Timer;
uint32 MarkOfShadow_Timer;
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 8b233901608..b8edd55a3ed 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
@@ -36,11 +36,11 @@ class instance_blood_furnace : public InstanceMapScript
{
public:
instance_blood_furnace()
- : InstanceMapScript("instance_blood_furnace", 542) {}
+ : InstanceMapScript("instance_blood_furnace", 542) { }
struct instance_blood_furnace_InstanceMapScript : public InstanceScript
{
- instance_blood_furnace_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_blood_furnace_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 The_MakerGUID;
uint64 BroggokGUID;
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 a4007a5a7b1..2388a67b3e5 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
@@ -83,7 +83,7 @@ class boss_nazan : public CreatureScript
Turn_Timer = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void IsSummonedBy(Unit* summoner) OVERRIDE
{
@@ -456,14 +456,14 @@ class npc_hellfire_sentry : public CreatureScript
struct npc_hellfire_sentryAI : public ScriptedAI
{
- npc_hellfire_sentryAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_hellfire_sentryAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
KidneyShot_Timer = urand(3000, 7000);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* killer) OVERRIDE
{
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 260cdf0e2e6..0c8df4c01e7 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
@@ -34,7 +34,7 @@ class instance_ramparts : public InstanceMapScript
struct instance_ramparts_InstanceMapScript : public InstanceScript
{
- instance_ramparts_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_ramparts_InstanceMapScript(Map* map) : InstanceScript(map) { }
void Initialize() OVERRIDE
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index f99bb4ade85..f4ee716dc67 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -320,7 +320,7 @@ class boss_magtheridon : public CreatureScript
Talk(SAY_DEATH);
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void AttackStart(Unit* who) OVERRIDE
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index 0dbd21ff94a..981774a677b 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -384,12 +384,12 @@ class npc_lesser_shadow_fissure : public CreatureScript
struct npc_lesser_shadow_fissureAI : public ScriptedAI
{
- npc_lesser_shadow_fissureAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_lesser_shadow_fissureAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index 8b2cce69dc7..5d789359864 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -157,7 +157,7 @@ class boss_alar : public CreatureScript
summon->AI()->AttackStart(target);
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void AttackStart(Unit* who) OVERRIDE
{
@@ -539,13 +539,13 @@ class npc_flame_patch_alar : public CreatureScript
struct npc_flame_patch_alarAI : public ScriptedAI
{
- npc_flame_patch_alarAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ npc_flame_patch_alarAI(Creature* creature) : ScriptedAI(creature) { }
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void UpdateAI(uint32 /*diff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index cf25efb17c6..2f9e882d176 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -374,7 +374,7 @@ class boss_kaelthas : public CreatureScript
if (!m_auiAdvisorGuid[0] || !m_auiAdvisorGuid[1] || !m_auiAdvisorGuid[2] || !m_auiAdvisorGuid[3])
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Kael'Thas One or more advisors missing, Skipping Phases 1-3");
+ TC_LOG_ERROR("scripts", "Kael'Thas One or more advisors missing, Skipping Phases 1-3");
Talk(SAY_PHASE4_INTRO2);
@@ -702,7 +702,7 @@ class boss_kaelthas : public CreatureScript
Advisor = Unit::GetCreature(*me, m_auiAdvisorGuid[i]);
if (!Advisor)
- TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
+ TC_LOG_ERROR("scripts", "SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
else
CAST_AI(advisorbase_ai, Advisor->AI())->Revive(target);
}
@@ -795,7 +795,7 @@ class boss_kaelthas : public CreatureScript
if (me->getThreatManager().getThreatList().size() >= 2)
for (uint32 i = 0; i < 3; ++i)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Kael'Thas mind control not supported.");
+ TC_LOG_DEBUG("scripts", "Kael'Thas mind control not supported.");
//DoCast(unit, SPELL_MIND_CONTROL);
}
@@ -1026,7 +1026,7 @@ class boss_thaladred_the_darkener : public CreatureScript
}
struct boss_thaladred_the_darkenerAI : public advisorbase_ai
{
- boss_thaladred_the_darkenerAI(Creature* creature) : advisorbase_ai(creature) {}
+ boss_thaladred_the_darkenerAI(Creature* creature) : advisorbase_ai(creature) { }
uint32 Gaze_Timer;
uint32 Silence_Timer;
@@ -1124,7 +1124,7 @@ class boss_lord_sanguinar : public CreatureScript
}
struct boss_lord_sanguinarAI : public advisorbase_ai
{
- boss_lord_sanguinarAI(Creature* creature) : advisorbase_ai(creature) {}
+ boss_lord_sanguinarAI(Creature* creature) : advisorbase_ai(creature) { }
uint32 Fear_Timer;
@@ -1191,7 +1191,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
}
struct boss_grand_astromancer_capernianAI : public advisorbase_ai
{
- boss_grand_astromancer_capernianAI(Creature* creature) : advisorbase_ai(creature) {}
+ boss_grand_astromancer_capernianAI(Creature* creature) : advisorbase_ai(creature) { }
uint32 Fireball_Timer;
uint32 Conflagration_Timer;
@@ -1336,7 +1336,7 @@ class boss_master_engineer_telonicus : public CreatureScript
}
struct boss_master_engineer_telonicusAI : public advisorbase_ai
{
- boss_master_engineer_telonicusAI(Creature* creature) : advisorbase_ai(creature) {}
+ boss_master_engineer_telonicusAI(Creature* creature) : advisorbase_ai(creature) { }
uint32 Bomb_Timer;
uint32 RemoteToy_Timer;
@@ -1438,10 +1438,10 @@ class npc_kael_flamestrike : public CreatureScript
me->setFaction(14);
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -1487,7 +1487,7 @@ class npc_phoenix_tk : public CreatureScript
}
struct npc_phoenix_tkAI : public ScriptedAI
{
- npc_phoenix_tkAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_phoenix_tkAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Cycle_Timer;
@@ -1541,7 +1541,7 @@ class npc_phoenix_egg_tk : public CreatureScript
}
struct npc_phoenix_egg_tkAI : public ScriptedAI
{
- npc_phoenix_egg_tkAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_phoenix_egg_tkAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Rebirth_Timer;
@@ -1551,7 +1551,7 @@ class npc_phoenix_egg_tk : public CreatureScript
}
//ignore any
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void AttackStart(Unit* who) OVERRIDE
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 9995efee99a..f5f75d79b63 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
@@ -46,7 +46,7 @@ class instance_the_eye : public InstanceMapScript
struct instance_the_eye_InstanceMapScript : public InstanceScript
{
- instance_the_eye_InstanceMapScript(Map* map) : InstanceScript(map) {}
+ instance_the_eye_InstanceMapScript(Map* map) : InstanceScript(map) { }
uint64 ThaladredTheDarkener;
uint64 LordSanguinar;
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
index ab9b6ab3046..e8d52c3f819 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
@@ -47,7 +47,7 @@ class npc_crystalcore_devastator : public CreatureScript
}
struct npc_crystalcore_devastatorAI : public ScriptedAI
{
- npc_crystalcore_devastatorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_crystalcore_devastatorAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Knockaway_Timer;
uint32 Countercharge_Timer;
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 a2c6ba399a3..97a165453f8 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
@@ -53,11 +53,11 @@ enum Events
class boss_gatewatcher_gyrokill : public CreatureScript
{
public:
- boss_gatewatcher_gyrokill() : CreatureScript("boss_gatewatcher_gyrokill") {}
+ boss_gatewatcher_gyrokill() : CreatureScript("boss_gatewatcher_gyrokill") { }
struct boss_gatewatcher_gyrokillAI : public BossAI
{
- boss_gatewatcher_gyrokillAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) {}
+ boss_gatewatcher_gyrokillAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
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 7dc073d82d7..6a4de059eb7 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -56,11 +56,11 @@ enum Events
class boss_gatewatcher_iron_hand : public CreatureScript
{
public:
- boss_gatewatcher_iron_hand(): CreatureScript("boss_gatewatcher_iron_hand") {}
+ boss_gatewatcher_iron_hand(): CreatureScript("boss_gatewatcher_iron_hand") { }
struct boss_gatewatcher_iron_handAI : public BossAI
{
- boss_gatewatcher_iron_handAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) {}
+ boss_gatewatcher_iron_handAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
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 565aefbd6b9..b5172245b49 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -61,11 +61,11 @@ enum Events
class boss_nethermancer_sepethrea : public CreatureScript
{
- public: boss_nethermancer_sepethrea(): CreatureScript("boss_nethermancer_sepethrea") {}
+ public: boss_nethermancer_sepethrea(): CreatureScript("boss_nethermancer_sepethrea") { }
struct boss_nethermancer_sepethreaAI : public BossAI
{
- boss_nethermancer_sepethreaAI(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) {}
+ boss_nethermancer_sepethreaAI(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) { }
void EnterCombat(Unit* who) OVERRIDE
{
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 1bcdcd48fce..59dee587ef6 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
@@ -69,7 +69,7 @@ enum Creatures
class boss_pathaleon_the_calculator : public CreatureScript
{
public:
- boss_pathaleon_the_calculator(): CreatureScript("boss_pathaleon_the_calculator") {}
+ boss_pathaleon_the_calculator(): CreatureScript("boss_pathaleon_the_calculator") { }
struct boss_pathaleon_the_calculatorAI : public BossAI
{
@@ -172,7 +172,7 @@ class npc_nether_wraith : public CreatureScript
struct npc_nether_wraithAI : public ScriptedAI
{
- npc_nether_wraithAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_nether_wraithAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ArcaneMissiles_Timer;
uint32 Detonation_Timer;
@@ -187,7 +187,7 @@ class npc_nether_wraith : public CreatureScript
Detonation = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
index 9c60c16d0af..c293a995467 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
@@ -16,7 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "mechanar.h"
@@ -26,7 +25,7 @@ static DoorData const doorData[] =
{ GO_DOOR_MOARG_1, DATA_GATEWATCHER_IRON_HAND, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ GO_DOOR_MOARG_2, DATA_GATEWATCHER_GYROKILL, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
{ GO_DOOR_NETHERMANCER, DATA_NETHERMANCER_SEPRETHREA, DOOR_TYPE_ROOM, BOUNDARY_NONE },
- {0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
+ { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
};
class instance_mechanar : public InstanceMapScript
@@ -42,7 +41,6 @@ class instance_mechanar : public InstanceMapScript
LoadDoorData(doorData);
}
-
void OnGameObjectCreate(GameObject* gameObject)
{
switch (gameObject->GetEntry())
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
index f03cb033b0f..ff3145c5c78 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
@@ -69,11 +69,8 @@ enum MillhouseSpells
class npc_millhouse_manastorm : public CreatureScript
{
public:
+ npc_millhouse_manastorm() : CreatureScript("npc_millhouse_manastorm") { }
- npc_millhouse_manastorm()
- : CreatureScript("npc_millhouse_manastorm")
- {
- }
struct npc_millhouse_manastormAI : public ScriptedAI
{
npc_millhouse_manastormAI(Creature* creature) : ScriptedAI(creature)
@@ -101,14 +98,11 @@ class npc_millhouse_manastorm : public CreatureScript
Pyroblast_Timer = 1000;
Fireball_Timer = 2500;
- if (instance)
- {
- if (instance->GetData(TYPE_WARDEN_2) == DONE)
- Init = true;
+ if (instance->GetData(DATA_WARDEN_2) == DONE)
+ Init = true;
- if (instance->GetData(TYPE_HARBINGERSKYRISS) == DONE)
- Talk(SAY_COMPLETE);
- }
+ if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == DONE)
+ Talk(SAY_COMPLETE);
}
void AttackStart(Unit* who) OVERRIDE
@@ -122,7 +116,7 @@ class npc_millhouse_manastorm : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void KilledUnit(Unit* /*victim*/) OVERRIDE
{
@@ -134,7 +128,7 @@ class npc_millhouse_manastorm : public CreatureScript
Talk(SAY_DEATH);
/*for questId 10886 (heroic mode only)
- if (instance && instance->GetData(TYPE_HARBINGERSKYRISS) != DONE)
+ if (instance->GetBossState(DATA_HARBINGER_SKYRISS) != DONE)
->FailQuest();*/
}
@@ -176,8 +170,7 @@ class npc_millhouse_manastorm : public CreatureScript
EventProgress_Timer = 6000;
break;
case 7:
- if (instance)
- instance->SetData(TYPE_WARDEN_2, DONE);
+ instance->SetData(DATA_WARDEN_2, DONE);
Init = true;
break;
}
@@ -223,7 +216,7 @@ class npc_millhouse_manastorm : public CreatureScript
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_millhouse_manastormAI(creature);
+ return GetArcatrazAI<npc_millhouse_manastormAI>(creature);
}
};
/*#####
@@ -273,10 +266,7 @@ enum WardenSpells
class npc_warden_mellichar : public CreatureScript
{
public:
-
- npc_warden_mellichar() : CreatureScript("npc_warden_mellichar")
- {
- }
+ npc_warden_mellichar() : CreatureScript("npc_warden_mellichar") { }
struct npc_warden_mellicharAI : public ScriptedAI
{
@@ -304,14 +294,12 @@ class npc_warden_mellichar : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
DoCast(me, SPELL_TARGET_OMEGA);
- if (instance)
- instance->SetData(TYPE_HARBINGERSKYRISS, NOT_STARTED);
+ instance->SetBossState(DATA_HARBINGER_SKYRISS, NOT_STARTED);
}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
if (IsRunning)
return;
@@ -334,69 +322,60 @@ class npc_warden_mellichar : public CreatureScript
Talk(YELL_INTRO1);
DoCast(me, SPELL_BUBBLE_VISUAL);
- if (instance)
- {
- instance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS);
- instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), false);
- IsRunning = true;
- }
+ instance->SetBossState(DATA_HARBINGER_SKYRISS, IN_PROGRESS);
+ instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), false);
+ IsRunning = true;
}
bool CanProgress()
{
- if (instance)
- {
- if (Phase == 7 && instance->GetData(TYPE_WARDEN_4) == DONE)
- return true;
- if (Phase == 6 && instance->GetData(TYPE_WARDEN_3) == DONE)
- return true;
- if (Phase == 5 && instance->GetData(TYPE_WARDEN_2) == DONE)
- return true;
- if (Phase == 4)
- return true;
- if (Phase == 3 && instance->GetData(TYPE_WARDEN_1) == DONE)
- return true;
- if (Phase == 2 && instance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
- return true;
- if (Phase == 1 && instance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
- return true;
- return false;
- }
+ if (Phase == 7 && instance->GetData(DATA_WARDEN_4) == DONE)
+ return true;
+ if (Phase == 6 && instance->GetData(DATA_WARDEN_3) == DONE)
+ return true;
+ if (Phase == 5 && instance->GetData(DATA_WARDEN_2) == DONE)
+ return true;
+ if (Phase == 4)
+ return true;
+ if (Phase == 3 && instance->GetData(DATA_WARDEN_1) == DONE)
+ return true;
+ if (Phase == 2 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
+ return true;
+ if (Phase == 1 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
+ return true;
+
return false;
}
void DoPrepareForPhase()
{
- if (instance)
- {
- me->InterruptNonMeleeSpells(true);
- me->RemoveAurasByType(SPELL_AURA_DUMMY);
+ me->InterruptNonMeleeSpells(true);
+ me->RemoveAurasByType(SPELL_AURA_DUMMY);
- switch (Phase)
- {
+ switch (Phase)
+ {
case 2:
DoCast(me, SPELL_TARGET_ALPHA);
- instance->SetData(TYPE_WARDEN_1, IN_PROGRESS);
- instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), false);
+ instance->SetData(DATA_WARDEN_1, IN_PROGRESS);
+ instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), false);
break;
case 3:
DoCast(me, SPELL_TARGET_BETA);
- instance->SetData(TYPE_WARDEN_2, IN_PROGRESS);
+ instance->SetData(DATA_WARDEN_2, IN_PROGRESS);
break;
case 5:
DoCast(me, SPELL_TARGET_DELTA);
- instance->SetData(TYPE_WARDEN_3, IN_PROGRESS);
+ instance->SetData(DATA_WARDEN_3, IN_PROGRESS);
break;
case 6:
DoCast(me, SPELL_TARGET_GAMMA);
- instance->SetData(TYPE_WARDEN_4, IN_PROGRESS);
+ instance->SetData(DATA_WARDEN_4, IN_PROGRESS);
break;
case 7:
- instance->SetData(TYPE_WARDEN_5, IN_PROGRESS);
+ instance->SetData(DATA_WARDEN_5, IN_PROGRESS);
break;
- }
- CanSpawn = true;
}
+ CanSpawn = true;
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -406,13 +385,10 @@ class npc_warden_mellichar : public CreatureScript
if (EventProgress_Timer <= diff)
{
- if (instance)
+ if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == FAIL)
{
- if (instance->GetData(TYPE_HARBINGERSKYRISS) == FAIL)
- {
- Reset();
- return;
- }
+ Reset();
+ return;
}
if (CanSpawn)
@@ -517,7 +493,7 @@ class npc_warden_mellichar : public CreatureScript
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_warden_mellicharAI(creature);
+ return GetArcatrazAI<npc_warden_mellicharAI>(creature);
}
};
@@ -539,7 +515,7 @@ class npc_zerekethvoidzone : public CreatureScript
}
struct npc_zerekethvoidzoneAI : public ScriptedAI
{
- npc_zerekethvoidzoneAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_zerekethvoidzoneAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -550,7 +526,7 @@ class npc_zerekethvoidzone : public CreatureScript
DoCast(me, SPELL_VOID_ZONE_DAMAGE);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
index 37839d4794d..1ebfad4dfeb 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -16,23 +15,56 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ARCATRAZ_H_
-#define ARCATRAZ_H_
+#ifndef ARCATRAZ_H
+#define ARCATRAZ_H
+
+#define ArcatrazScriptName "instance_arcatraz"
+
+uint32 const EncounterCount = 4;
enum DataTypes
{
- TYPE_ZEREKETH = 1,
- TYPE_DALLIAH = 2,
- TYPE_SOCCOTHRATES = 3,
- TYPE_HARBINGERSKYRISS = 4,
- TYPE_WARDEN_1 = 5,
- TYPE_WARDEN_2 = 6,
- TYPE_WARDEN_3 = 7,
- TYPE_WARDEN_4 = 8,
- TYPE_WARDEN_5 = 9,
- DATA_MELLICHAR = 10,
- TYPE_SHIELD_OPEN = 11,
- DATA_SPHERE_SHIELD = 12
+ // Encounter States/Boss GUIDs
+ DATA_ZEREKETH = 0,
+ DATA_DALLIAH = 1,
+ DATA_SOCCOTHRATES = 2,
+ DATA_HARBINGER_SKYRISS = 3,
+
+ // Additional Data
+ DATA_CONVERSATION = 4,
+ DATA_WARDEN_1 = 5, // used by EventAI
+ DATA_WARDEN_2 = 6, // used by EventAI
+ DATA_WARDEN_3 = 7, // used by EventAI
+ DATA_WARDEN_4 = 8, // used by EventAI
+ DATA_WARDEN_5 = 9, // used by EventAI
+ DATA_MELLICHAR = 10,
+ DATA_WARDENS_SHIELD = 11
+};
+
+enum CreatureIds
+{
+ NPC_DALLIAH = 20885,
+ NPC_SOCCOTHRATES = 20886,
+ NPC_MELLICHAR = 20904, // skyriss will kill this unit
+ NPC_ALPHA_POD_TARGET = 21436
};
-#endif // ARCATRAZ_H_
+enum GameObjectIds
+{
+ GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA = 184318, // door opened when Wrath-Scryer Soccothrates dies
+ GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA = 184319, // door opened when Dalliah the Doomsayer dies
+ GO_STASIS_POD_ALPHA = 183961, // pod first boss wave
+ GO_STASIS_POD_BETA = 183963, // pod second boss wave
+ GO_STASIS_POD_DELTA = 183964, // pod third boss wave
+ GO_STASIS_POD_GAMMA = 183962, // pod fourth boss wave
+ GO_STASIS_POD_OMEGA = 183965, // pod fifth boss wave
+ GO_WARDENS_SHIELD = 184802 // shield 'protecting' mellichar
+};
+
+template<class AI>
+AI* GetArcatrazAI(Creature* creature)
+{
+ return GetInstanceAI<AI>(creature, ArcatrazScriptName);
+}
+
+#endif // ARCATRAZ_H
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
new file mode 100644
index 00000000000..bbc62d4b99a
--- /dev/null
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2008-2013 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 "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "arcatraz.h"
+
+enum Say
+{
+ // Dalliah the Doomsayer
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_WHIRLWIND = 3,
+ SAY_HEAL = 4,
+ SAY_DEATH = 5,
+ SAY_SOCCOTHRATES_DEATH = 7,
+
+ // Wrath-Scryer Soccothrates
+ SAY_AGGRO_DALLIAH_FIRST = 0,
+ SAY_DALLIAH_25_PERCENT = 5
+};
+
+enum Spells
+{
+ SPELL_GIFT_OF_THE_DOOMSAYER = 36173,
+ SPELL_WHIRLWIND = 36142,
+ SPELL_HEAL = 36144,
+ SPELL_SHADOW_WAVE = 39016 // Heroic only
+};
+
+enum Events
+{
+ EVENT_GIFT_OF_THE_DOOMSAYER = 1,
+ EVENT_WHIRLWIND = 2,
+ EVENT_HEAL = 3,
+ EVENT_SHADOW_WAVE = 4, // Heroic only
+ EVENT_ME_FIRST = 5,
+ EVENT_SOCCOTHRATES_DEATH = 6
+};
+
+class boss_dalliah_the_doomsayer : public CreatureScript
+{
+ public:
+ boss_dalliah_the_doomsayer() : CreatureScript("boss_dalliah_the_doomsayer") { }
+
+ struct boss_dalliah_the_doomsayerAI : public BossAI
+ {
+ boss_dalliah_the_doomsayerAI(Creature* creature) : BossAI(creature, DATA_DALLIAH) { }
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ soccothratesDeath = false;
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+
+ if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SOCCOTHRATES)))
+ if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
+ soccothrates->AI()->SetData(1, 1);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, urand(1000, 4000));
+ events.ScheduleEvent(EVENT_WHIRLWIND, urand(7000, 9000));
+ if (IsHeroic())
+ events.ScheduleEvent(EVENT_SHADOW_WAVE, urand(11000, 16000));
+ events.ScheduleEvent(EVENT_ME_FIRST, 6000);
+ Talk(SAY_AGGRO);
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
+ {
+ Talk(SAY_SLAY);
+ }
+
+ void SetData(uint32 /*type*/, uint32 data) OVERRIDE
+ {
+ switch (data)
+ {
+ case 1:
+ events.ScheduleEvent(EVENT_SOCCOTHRATES_DEATH, 6000);
+ soccothratesDeath = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ {
+ if (soccothratesDeath)
+ {
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SOCCOTHRATES_DEATH:
+ Talk(SAY_SOCCOTHRATES_DEATH);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ return;
+ }
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_GIFT_OF_THE_DOOMSAYER:
+ DoCastVictim(SPELL_GIFT_OF_THE_DOOMSAYER, true);
+ events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, urand(16000, 21000));
+ break;
+ case EVENT_WHIRLWIND:
+ DoCast(me, SPELL_WHIRLWIND);
+ Talk(SAY_WHIRLWIND);
+ events.ScheduleEvent(EVENT_WHIRLWIND, urand(19000, 21000));
+ events.ScheduleEvent(EVENT_HEAL, 6000);
+ break;
+ case EVENT_HEAL:
+ DoCast(me, SPELL_HEAL);
+ Talk(SAY_HEAL);
+ break;
+ case EVENT_SHADOW_WAVE:
+ DoCastVictim(SPELL_SHADOW_WAVE, true);
+ events.ScheduleEvent(EVENT_SHADOW_WAVE, urand(11000, 16000));
+ break;
+ case EVENT_ME_FIRST:
+ if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SOCCOTHRATES)))
+ if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
+ soccothrates->AI()->Talk(SAY_AGGRO_DALLIAH_FIRST);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (HealthBelowPct(25) && !soccothratesTaunt)
+ {
+ if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SOCCOTHRATES)))
+ soccothrates->AI()->Talk(SAY_DALLIAH_25_PERCENT);
+ soccothratesTaunt = true;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ bool soccothratesTaunt;
+ bool soccothratesDeath;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_dalliah_the_doomsayerAI(creature);
+ }
+};
+
+void AddSC_boss_dalliah_the_doomsayer()
+{
+ new boss_dalliah_the_doomsayer();
+}
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 c7765eb24ad..48d955acbc3 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -61,21 +61,15 @@ enum Spells
class boss_harbinger_skyriss : public CreatureScript
{
public:
+ boss_harbinger_skyriss() : CreatureScript("boss_harbinger_skyriss") { }
- boss_harbinger_skyriss()
- : CreatureScript("boss_harbinger_skyriss")
+ struct boss_harbinger_skyrissAI : public BossAI
{
- }
- struct boss_harbinger_skyrissAI : public ScriptedAI
- {
- boss_harbinger_skyrissAI(Creature* creature) : ScriptedAI(creature)
+ boss_harbinger_skyrissAI(Creature* creature) : BossAI(creature, DATA_HARBINGER_SKYRISS)
{
- instance = creature->GetInstanceScript();
Intro = false;
}
- InstanceScript* instance;
-
bool Intro;
bool IsImage33;
bool IsImage66;
@@ -104,7 +98,6 @@ class boss_harbinger_skyriss : public CreatureScript
}
void MoveInLineOfSight(Unit* who) OVERRIDE
-
{
if (!Intro)
return;
@@ -112,13 +105,12 @@ class boss_harbinger_skyriss : public CreatureScript
ScriptedAI::MoveInLineOfSight(who);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
- if (instance)
- instance->SetData(TYPE_HARBINGERSKYRISS, DONE);
+ _JustDied();
}
void JustSummoned(Creature* summon) OVERRIDE
@@ -137,7 +129,7 @@ class boss_harbinger_skyriss : public CreatureScript
void KilledUnit(Unit* victim) OVERRIDE
{
//won't yell killing pet/other unit
- if (victim->GetEntry() == 21436)
+ if (victim->GetEntry() == NPC_ALPHA_POD_TARGET)
return;
Talk(SAY_KILL);
@@ -160,27 +152,24 @@ class boss_harbinger_skyriss : public CreatureScript
{
if (!Intro)
{
- if (!instance)
- return;
-
if (Intro_Timer <= diff)
{
switch (Intro_Phase)
{
case 1:
Talk(SAY_INTRO);
- instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), true);
+ instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), true);
++Intro_Phase;
Intro_Timer = 25000;
break;
case 2:
Talk(SAY_AGGRO);
- if (Unit* mellic = Unit::GetUnit(*me, instance->GetData64(DATA_MELLICHAR)))
+ if (Unit* mellic = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_MELLICHAR)))
{
//should have a better way to do this. possibly spell exist.
mellic->setDeathState(JUST_DIED);
mellic->SetHealth(0);
- instance->SetData(TYPE_SHIELD_OPEN, IN_PROGRESS);
+ instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), false);
}
++Intro_Phase;
Intro_Timer = 3000;
@@ -275,25 +264,22 @@ class boss_harbinger_skyriss : public CreatureScript
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_harbinger_skyrissAI(creature);
+ return GetArcatrazAI<boss_harbinger_skyrissAI>(creature);
}
};
class boss_harbinger_skyriss_illusion : public CreatureScript
{
public:
+ boss_harbinger_skyriss_illusion() : CreatureScript("boss_harbinger_skyriss_illusion") { }
- boss_harbinger_skyriss_illusion()
- : CreatureScript("boss_harbinger_skyriss_illusion")
- {
- }
struct boss_harbinger_skyriss_illusionAI : public ScriptedAI
{
- boss_harbinger_skyriss_illusionAI(Creature* creature) : ScriptedAI(creature) {}
+ boss_harbinger_skyriss_illusionAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
new file mode 100644
index 00000000000..2d9bfc92583
--- /dev/null
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
@@ -0,0 +1,283 @@
+/*
+ * Copyright (C) 2008-2013 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_wrath_scryer_soccothrates
+SD%Complete: 95%
+SDComment: charge left to script
+SDCategory: Tempest Keep, The Arcatraz
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "arcatraz.h"
+
+enum Say
+{
+ // Wrath-Scryer Soccothrates
+ SAY_AGGRO = 1,
+ SAY_SLAY = 2,
+ SAY_KNOCK_AWAY = 3,
+ SAY_DEATH = 4,
+ SAY_DALLIAH_DEATH = 6,
+ SAY_SOCCOTHRATES_CONVO_1 = 7,
+ SAY_SOCCOTHRATES_CONVO_2 = 8,
+ SAY_SOCCOTHRATES_CONVO_3 = 9,
+ SAY_SOCCOTHRATES_CONVO_4 = 10,
+
+ // Dalliah the Doomsayer
+ SAY_AGGRO_SOCCOTHRATES_FIRST = 0,
+ SAY_SOCCOTHRATES_25_PERCENT = 6,
+ SAY_DALLIAH_CONVO_1 = 8,
+ SAY_DALLIAH_CONVO_2 = 9,
+ SAY_DALLIAH_CONVO_3 = 10
+};
+
+enum Spells
+{
+ SPELL_FEL_IMMOLATION = 36051,
+ SPELL_FELFIRE_SHOCK = 35759,
+ SPELL_KNOCK_AWAY = 36512,
+ SPELL_FELFIRE_LINE_UP = 35770,
+ SPELL_CHARGE_TARGETING = 36038,
+ SPELL_CHARGE = 35754
+};
+
+enum Events
+{
+ EVENT_FELFIRE_SHOCK = 1,
+ EVENT_KNOCK_AWAY = 2,
+
+ EVENT_PREFIGHT_1 = 3,
+ EVENT_PREFIGHT_2 = 4,
+ EVENT_PREFIGHT_3 = 5,
+ EVENT_PREFIGHT_4 = 6,
+ EVENT_PREFIGHT_5 = 7,
+ EVENT_PREFIGHT_6 = 8,
+ EVENT_PREFIGHT_7 = 9,
+ EVENT_PREFIGHT_8 = 10,
+ EVENT_PREFIGHT_9 = 11,
+ EVENT_ME_FIRST = 12,
+ EVENT_DALLIAH_DEATH = 13
+};
+
+class boss_wrath_scryer_soccothrates : public CreatureScript
+{
+ public:
+ boss_wrath_scryer_soccothrates() : CreatureScript("boss_wrath_scryer_soccothrates") { }
+
+ struct boss_wrath_scryer_soccothratesAI : public BossAI
+ {
+ boss_wrath_scryer_soccothratesAI(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES) { }
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ preFight = false;
+ dalliahTaunt = false;
+ dalliahDeath = false;
+ DoCast(me, SPELL_FEL_IMMOLATION);
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ if (dalliah->IsAlive() && !dalliah->IsInCombat())
+ dalliah->AI()->SetData(1, 1);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_FELFIRE_SHOCK, urand(12000, 14000));
+ events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(11000, 12000));
+ events.ScheduleEvent(EVENT_ME_FIRST, 6000);
+ Talk(SAY_AGGRO);
+ preFight = false;
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
+ {
+ Talk(SAY_SLAY);
+ }
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+ {
+ if (instance->GetData(DATA_CONVERSATION) == NOT_STARTED && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 70.0f))
+ {
+ Talk(SAY_SOCCOTHRATES_CONVO_1);
+ instance->SetData(DATA_CONVERSATION, DONE);
+
+ preFight = true;
+ events.ScheduleEvent(EVENT_PREFIGHT_1, 2000);
+ }
+ }
+
+ void SetData(uint32 /*type*/, uint32 data) OVERRIDE
+ {
+ switch (data)
+ {
+ case 1:
+ events.ScheduleEvent(EVENT_DALLIAH_DEATH, 6000);
+ dalliahDeath = true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ {
+ if (preFight)
+ {
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_PREFIGHT_1:
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ dalliah->AI()->Talk(SAY_DALLIAH_CONVO_1);
+ events.ScheduleEvent(EVENT_PREFIGHT_2, 3000);
+ break;
+ case EVENT_PREFIGHT_2:
+ Talk(SAY_SOCCOTHRATES_CONVO_2);
+ events.ScheduleEvent(EVENT_PREFIGHT_3, 3000);
+ break;
+ case EVENT_PREFIGHT_3:
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ dalliah->AI()->Talk(SAY_DALLIAH_CONVO_2);
+ events.ScheduleEvent(EVENT_PREFIGHT_4, 6000);
+ break;
+ case EVENT_PREFIGHT_4:
+ Talk(SAY_SOCCOTHRATES_CONVO_3);
+ events.ScheduleEvent(EVENT_PREFIGHT_5, 2000);
+ break;
+ case EVENT_PREFIGHT_5:
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ dalliah->AI()->Talk(SAY_DALLIAH_CONVO_3);
+ events.ScheduleEvent(EVENT_PREFIGHT_6, 3000);
+ break;
+ case EVENT_PREFIGHT_6:
+ Talk(SAY_SOCCOTHRATES_CONVO_4);
+ events.ScheduleEvent(EVENT_PREFIGHT_7, 2000);
+ break;
+ case EVENT_PREFIGHT_7:
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ dalliah->GetMotionMaster()->MovePoint(0, 118.6048f, 96.84852f, 22.44115f);
+ events.ScheduleEvent(EVENT_PREFIGHT_8, 4000);
+ break;
+ case EVENT_PREFIGHT_8:
+ me->GetMotionMaster()->MovePoint(0, 122.1035f, 192.7203f, 22.44115f);
+ events.ScheduleEvent(EVENT_PREFIGHT_9, 4000);
+ break;
+ case EVENT_PREFIGHT_9:
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ {
+ dalliah->SetFacingToObject(me);
+ me->SetFacingToObject(dalliah);
+ dalliah->SetHomePosition(dalliah->GetPositionX(), dalliah->GetPositionY(), dalliah->GetPositionZ(), 1.51737f);
+ me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 4.725722f);
+ preFight = false;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ if (dalliahDeath)
+ {
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_DALLIAH_DEATH:
+ Talk(SAY_DALLIAH_DEATH);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ return;
+ }
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FELFIRE_SHOCK:
+ DoCastVictim(SPELL_FELFIRE_SHOCK, true);
+ events.ScheduleEvent(EVENT_FELFIRE_SHOCK, urand(12000, 14000));
+ break;
+ case EVENT_KNOCK_AWAY:
+ DoCast(me, SPELL_KNOCK_AWAY);
+ Talk(SAY_KNOCK_AWAY);
+ events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(11000, 12000));
+ break;
+ case EVENT_ME_FIRST:
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ if (dalliah->IsAlive() && !dalliah->IsInCombat())
+ dalliah->AI()->Talk(SAY_AGGRO_SOCCOTHRATES_FIRST);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (HealthBelowPct(25) && !dalliahTaunt)
+ {
+ if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
+ dalliah->AI()->Talk(SAY_SOCCOTHRATES_25_PERCENT);
+ dalliahTaunt = true;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ bool preFight;
+ bool dalliahTaunt;
+ bool dalliahDeath;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetArcatrazAI<boss_wrath_scryer_soccothratesAI>(creature);
+ }
+};
+
+void AddSC_boss_wrath_scryer_soccothrates()
+{
+ new boss_wrath_scryer_soccothrates();
+}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp
new file mode 100644
index 00000000000..7659f191ff7
--- /dev/null
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2008-2013 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 "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "arcatraz.h"
+
+enum Say
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_SHADOW_NOVA = 2,
+ SAY_DEATH = 3
+};
+
+enum Spells
+{
+ SPELL_VOID_ZONE = 36119,
+ SPELL_SHADOW_NOVA = 36127,
+ SPELL_SEED_OF_CORRUPTION = 36123
+};
+
+enum Events
+{
+ EVENT_VOID_ZONE = 1,
+ EVENT_SHADOW_NOVA = 2,
+ EVENT_SEED_OF_CORRUPTION = 3
+};
+
+class boss_zereketh_the_unbound : public CreatureScript
+{
+ public:
+ boss_zereketh_the_unbound() : CreatureScript("boss_zereketh_the_unbound") { }
+
+ struct boss_zereketh_the_unboundAI : public BossAI
+ {
+ boss_zereketh_the_unboundAI(Creature* creature) : BossAI(creature, DATA_ZEREKETH) { }
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_VOID_ZONE, urand (6000, 10000));
+ events.ScheduleEvent(EVENT_SHADOW_NOVA, urand (6000, 10000));
+ events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, urand(12000, 20000));
+ Talk(SAY_AGGRO);
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
+ {
+ Talk(SAY_SLAY);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_VOID_ZONE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
+ DoCast(target, SPELL_VOID_ZONE);
+ events.ScheduleEvent(EVENT_VOID_ZONE, urand (6000, 10000));
+ break;
+ case EVENT_SHADOW_NOVA:
+ DoCastVictim(SPELL_SHADOW_NOVA, true);
+ Talk(SAY_SHADOW_NOVA);
+ events.ScheduleEvent(EVENT_SHADOW_NOVA, urand (6000, 10000));
+ break;
+ case EVENT_SEED_OF_CORRUPTION:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
+ DoCast(target, SPELL_SEED_OF_CORRUPTION);
+ events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, urand(12000, 20000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_zereketh_the_unboundAI(creature);
+ }
+};
+
+void AddSC_boss_zereketh_the_unbound()
+{
+ new boss_zereketh_the_unbound();
+}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
index 41b87495c93..cb7cd3828e2 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -16,217 +15,120 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Instance_Arcatraz
-SD%Complete: 80
-SDComment: Mainly Harbringer Skyriss event
-SDCategory: Tempest Keep, The Arcatraz
-EndScriptData */
-
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "arcatraz.h"
-#define MAX_ENCOUNTER 9
-
-enum Units
+DoorData const doorData[] =
{
- CONTAINMENT_CORE_SECURITY_FIELD_ALPHA = 184318, //door opened when Wrath-Scryer Soccothrates dies
- CONTAINMENT_CORE_SECURITY_FIELD_BETA = 184319, //door opened when Dalliah the Doomsayer dies
- POD_ALPHA = 183961, //pod first boss wave
- POD_BETA = 183963, //pod second boss wave
- POD_DELTA = 183964, //pod third boss wave
- POD_GAMMA = 183962, //pod fourth boss wave
- POD_OMEGA = 183965, //pod fifth boss wave
- WARDENS_SHIELD = 184802, // warden shield
- SEAL_SPHERE = 184802, //shield 'protecting' mellichar
-
- MELLICHAR = 20904, //skyriss will kill this unit
+ { GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA, DATA_SOCCOTHRATES, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
+ { GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA, DATA_DALLIAH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
+ { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
};
-/* Arcatraz encounters:
-1 - Zereketh the Unbound event
-2 - Dalliah the Doomsayer event
-3 - Wrath-Scryer Soccothrates event
-4 - Harbinger Skyriss event, 5 sub-events
-*/
-
class instance_arcatraz : public InstanceMapScript
{
public:
- instance_arcatraz()
- : InstanceMapScript("instance_arcatraz", 552)
- {
- }
+ instance_arcatraz() : InstanceMapScript(ArcatrazScriptName, 552) { }
+
struct instance_arcatraz_InstanceMapScript : public InstanceScript
{
- instance_arcatraz_InstanceMapScript(Map* map) : InstanceScript(map) {}
-
- uint32 m_auiEncounter[MAX_ENCOUNTER];
+ instance_arcatraz_InstanceMapScript(Map* map) : InstanceScript(map)
+ {
+ SetBossNumber(EncounterCount);
+ LoadDoorData(doorData);
- uint64 Containment_Core_Security_Field_AlphaGUID;
- uint64 Containment_Core_Security_Field_BetaGUID;
- uint64 Pod_AlphaGUID;
- uint64 Pod_GammaGUID;
- uint64 Pod_BetaGUID;
- uint64 Pod_DeltaGUID;
- uint64 Pod_OmegaGUID;
- uint64 Wardens_ShieldGUID;
- uint64 GoSphereGUID;
- uint64 MellicharGUID;
+ DalliahGUID = 0;
+ SoccothratesGUID = 0;
+ MellicharGUID = 0;
+ WardensShieldGUID = 0;
- void Initialize() OVERRIDE
- {
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
+ ConversationState = NOT_STARTED;
- Containment_Core_Security_Field_AlphaGUID = 0;
- Containment_Core_Security_Field_BetaGUID = 0;
- Pod_AlphaGUID = 0;
- Pod_GammaGUID = 0;
- Pod_BetaGUID = 0;
- Pod_DeltaGUID = 0;
- Pod_OmegaGUID = 0;
- Wardens_ShieldGUID = 0;
- GoSphereGUID = 0;
- MellicharGUID = 0;
+ memset(StasisPodGUIDs, 0, 5 * sizeof(uint64));
+ memset(StasisPodStates, NOT_STARTED, 5 * sizeof(uint8));
}
- bool IsEncounterInProgress() const OVERRIDE
+ void OnCreatureCreate(Creature* creature) OVERRIDE
{
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
- if (m_auiEncounter[i] == IN_PROGRESS)
- return true;
-
- return false;
+ switch (creature->GetEntry())
+ {
+ case NPC_DALLIAH:
+ DalliahGUID = creature->GetGUID();
+ break;
+ case NPC_SOCCOTHRATES:
+ SoccothratesGUID = creature->GetGUID();
+ break;
+ case NPC_MELLICHAR:
+ MellicharGUID = creature->GetGUID();
+ break;
+ default:
+ break;
+ }
}
void OnGameObjectCreate(GameObject* go) OVERRIDE
{
switch (go->GetEntry())
{
- case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA:
- Containment_Core_Security_Field_AlphaGUID = go->GetGUID();
- break;
-
- case CONTAINMENT_CORE_SECURITY_FIELD_BETA:
- Containment_Core_Security_Field_BetaGUID = go->GetGUID();
- break;
-
- case POD_ALPHA:
- Pod_AlphaGUID = go->GetGUID();
- break;
-
- case POD_GAMMA:
- Pod_GammaGUID = go->GetGUID();
- break;
-
- case POD_BETA:
- Pod_BetaGUID = go->GetGUID();
- break;
-
- case POD_DELTA:
- Pod_DeltaGUID = go->GetGUID();
- break;
-
- case POD_OMEGA:
- Pod_OmegaGUID = go->GetGUID();
- break;
-
- case SEAL_SPHERE:
- GoSphereGUID = go->GetGUID();
- break;
-
- /*case WARDENS_SHIELD:
- Wardens_ShieldGUID = go->GetGUID();
- break;*/
+ case GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA:
+ case GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA:
+ AddDoor(go, true);
+ break;
+ case GO_STASIS_POD_ALPHA:
+ StasisPodGUIDs[0] = go->GetGUID();
+ break;
+ case GO_STASIS_POD_BETA:
+ StasisPodGUIDs[1] = go->GetGUID();
+ break;
+ case GO_STASIS_POD_DELTA:
+ StasisPodGUIDs[2] = go->GetGUID();
+ break;
+ case GO_STASIS_POD_GAMMA:
+ StasisPodGUIDs[3] = go->GetGUID();
+ break;
+ case GO_STASIS_POD_OMEGA:
+ StasisPodGUIDs[4] = go->GetGUID();
+ break;
+ case GO_WARDENS_SHIELD:
+ WardensShieldGUID = go->GetGUID();
+ break;
+ default:
+ break;
}
}
- void OnCreatureCreate(Creature* creature) OVERRIDE
+ void OnGameObjectRemove(GameObject* go) OVERRIDE
{
- if (creature->GetEntry() == MELLICHAR)
- MellicharGUID = creature->GetGUID();
+ switch (go->GetEntry())
+ {
+ case GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA:
+ case GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA:
+ AddDoor(go, false);
+ break;
+ default:
+ break;
+ }
}
void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
- case TYPE_ZEREKETH:
- m_auiEncounter[0] = data;
- break;
- case TYPE_DALLIAH:
- if (data == DONE)
- {
- if (GameObject* go = instance->GetGameObject(Containment_Core_Security_Field_BetaGUID))
- go->UseDoorOrButton();
- }
- m_auiEncounter[1] = data;
- break;
- case TYPE_SOCCOTHRATES:
- if (data == DONE)
- {
- if (GameObject* go = instance->GetGameObject(Containment_Core_Security_Field_AlphaGUID))
- go->UseDoorOrButton();
- }
- m_auiEncounter[2] = data;
- break;
- case TYPE_HARBINGERSKYRISS:
- if (data == NOT_STARTED || data == FAIL)
- {
- m_auiEncounter[4] = NOT_STARTED;
- m_auiEncounter[5] = NOT_STARTED;
- m_auiEncounter[6] = NOT_STARTED;
- m_auiEncounter[7] = NOT_STARTED;
- m_auiEncounter[8] = NOT_STARTED;
- }
- m_auiEncounter[3] = data;
- break;
- case TYPE_WARDEN_1:
- if (data == IN_PROGRESS)
- if (GameObject* go = instance->GetGameObject(Pod_AlphaGUID))
- go->UseDoorOrButton();
- m_auiEncounter[4] = data;
- break;
- case TYPE_WARDEN_2:
- if (data == IN_PROGRESS)
- {
- if (GameObject* go = instance->GetGameObject(Pod_BetaGUID))
- go->UseDoorOrButton();
- }
- m_auiEncounter[5] = data;
- break;
- case TYPE_WARDEN_3:
- if (data == IN_PROGRESS)
- {
- if (GameObject* go = instance->GetGameObject(Pod_DeltaGUID))
- go->UseDoorOrButton();
- }
- m_auiEncounter[6] = data;
- break;
- case TYPE_WARDEN_4:
- if (data == IN_PROGRESS)
- {
- if (GameObject* go = instance->GetGameObject(Pod_GammaGUID))
- go->UseDoorOrButton();
- }
- m_auiEncounter[7] = data;
- break;
- case TYPE_WARDEN_5:
- if (data == IN_PROGRESS)
- {
- if (GameObject* go = instance->GetGameObject(Pod_OmegaGUID))
- go->UseDoorOrButton();
- }
- m_auiEncounter[8] = data;
- break;
- case TYPE_SHIELD_OPEN:
- if (data == IN_PROGRESS)
- {
- if (GameObject* go = instance->GetGameObject(Wardens_ShieldGUID))
- go->UseDoorOrButton();
- }
- break;
+ case DATA_WARDEN_1:
+ case DATA_WARDEN_2:
+ case DATA_WARDEN_3:
+ case DATA_WARDEN_4:
+ case DATA_WARDEN_5:
+ if (data == IN_PROGRESS)
+ HandleGameObject(StasisPodGUIDs[type - DATA_WARDEN_1], true);
+ StasisPodStates[type - DATA_WARDEN_1] = uint8(data);
+ break;
+ case DATA_CONVERSATION:
+ ConversationState = uint8(data);
+ break;
+ default:
+ break;
}
}
@@ -234,12 +136,16 @@ class instance_arcatraz : public InstanceMapScript
{
switch (type)
{
- case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3];
- case TYPE_WARDEN_1: return m_auiEncounter[4];
- case TYPE_WARDEN_2: return m_auiEncounter[5];
- case TYPE_WARDEN_3: return m_auiEncounter[6];
- case TYPE_WARDEN_4: return m_auiEncounter[7];
- case TYPE_WARDEN_5: return m_auiEncounter[8];
+ case DATA_WARDEN_1:
+ case DATA_WARDEN_2:
+ case DATA_WARDEN_3:
+ case DATA_WARDEN_4:
+ case DATA_WARDEN_5:
+ return StasisPodStates[type - DATA_WARDEN_1];
+ case DATA_CONVERSATION:
+ return ConversationState;
+ default:
+ break;
}
return 0;
}
@@ -248,11 +154,95 @@ class instance_arcatraz : public InstanceMapScript
{
switch (data)
{
- case DATA_MELLICHAR: return MellicharGUID;
- case DATA_SPHERE_SHIELD: return GoSphereGUID;
+ case DATA_DALLIAH:
+ return DalliahGUID;
+ case DATA_SOCCOTHRATES:
+ return SoccothratesGUID;
+ case DATA_MELLICHAR:
+ return MellicharGUID;
+ case DATA_WARDENS_SHIELD:
+ return WardensShieldGUID;
+ default:
+ break;
}
return 0;
}
+
+ bool SetBossState(uint32 type, EncounterState state) OVERRIDE
+ {
+ if (!InstanceScript::SetBossState(type, state))
+ return false;
+
+ switch (type)
+ {
+ case DATA_HARBINGER_SKYRISS:
+ if (state == NOT_STARTED || state == FAIL)
+ {
+ SetData(DATA_WARDEN_1, NOT_STARTED);
+ SetData(DATA_WARDEN_2, NOT_STARTED);
+ SetData(DATA_WARDEN_3, NOT_STARTED);
+ SetData(DATA_WARDEN_4, NOT_STARTED);
+ SetData(DATA_WARDEN_5, NOT_STARTED);
+ }
+ break;
+ default:
+ break;
+ }
+ return true;
+ }
+
+ std::string GetSaveData() OVERRIDE
+ {
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "A Z " << GetBossSaveData();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
+ }
+
+ void Load(char const* str) OVERRIDE
+ {
+ if (!str)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
+
+ OUT_LOAD_INST_DATA(str);
+
+ char dataHead1, dataHead2;
+
+ std::istringstream loadStream(str);
+ loadStream >> dataHead1 >> dataHead2;
+
+ if (dataHead1 == 'A' && dataHead2 == 'Z')
+ {
+ for (uint32 i = 0; i < EncounterCount; ++i)
+ {
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
+ }
+ }
+ else
+ OUT_LOAD_INST_DATA_FAIL;
+
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
+
+ protected:
+ uint64 DalliahGUID;
+ uint64 SoccothratesGUID;
+ uint64 StasisPodGUIDs[5];
+ uint64 MellicharGUID;
+ uint64 WardensShieldGUID;
+
+ uint8 ConversationState;
+ uint8 StasisPodStates[5];
};
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
@@ -263,6 +253,6 @@ class instance_arcatraz : public InstanceMapScript
void AddSC_instance_arcatraz()
{
- new instance_arcatraz;
+ new instance_arcatraz();
}
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 36a17996f94..68b7c4e8117 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -86,9 +86,9 @@ class npc_warp_splinter_treant : public CreatureScript
check_Timer = 0;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index 57eb587140f..a005153a4fc 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -67,9 +67,9 @@ public:
struct npc_bladespire_ogreAI : public ScriptedAI
{
- npc_bladespire_ogreAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_bladespire_ogreAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void UpdateAI(uint32 /*uiDiff*/) OVERRIDE
{
@@ -119,7 +119,7 @@ public:
struct npc_nether_drakeAI : public ScriptedAI
{
- npc_nether_drakeAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_nether_drakeAI(Creature* creature) : ScriptedAI(creature) { }
bool IsNihil;
uint32 NihilSpeech_Timer;
@@ -140,7 +140,7 @@ public:
IntangiblePresence_Timer = 15000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -284,11 +284,11 @@ public:
struct npc_daranelleAI : public ScriptedAI
{
- npc_daranelleAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_daranelleAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -470,7 +470,7 @@ public:
OgreGUID = 0;
}
- void UpdateAI(uint32 /*uiDiff*/) OVERRIDE {}
+ void UpdateAI(uint32 /*uiDiff*/) OVERRIDE { }
};
};
@@ -490,7 +490,7 @@ public:
struct npc_ogre_bruteAI : public ScriptedAI
{
- npc_ogre_bruteAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_ogre_bruteAI(Creature* creature) : ScriptedAI(creature) { }
uint64 PlayerGUID;
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index fc7f4d2ae00..0aad4973000 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -68,7 +68,7 @@ public:
struct npc_aeranasAI : public ScriptedAI
{
- npc_aeranasAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_aeranasAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Faction_Timer;
uint32 EnvelopingWinds_Timer;
@@ -160,7 +160,7 @@ public:
if (creature->GetOwner() && creature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
Start(false, false, creature->GetOwner()->GetGUID());
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player.");
+ TC_LOG_ERROR("scripts", "TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player.");
creature->SetSpeed(MOVE_WALK, 1.5f);
Reset();
@@ -388,7 +388,7 @@ public:
struct npc_wounded_blood_elfAI : public npc_escortAI
{
- npc_wounded_blood_elfAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_wounded_blood_elfAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -424,7 +424,7 @@ public:
}
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void EnterCombat(Unit* /*who*/) OVERRIDE
{
@@ -462,7 +462,7 @@ public:
struct npc_fel_guard_houndAI : public ScriptedAI
{
- npc_fel_guard_houndAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_fel_guard_houndAI(Creature* creature) : ScriptedAI(creature) { }
uint32 uiCheckTimer;
uint64 uiHelboarGUID;
diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp
index 1d5e1b8b6a5..c8e4241974e 100644
--- a/src/server/scripts/Outland/zone_nagrand.cpp
+++ b/src/server/scripts/Outland/zone_nagrand.cpp
@@ -328,11 +328,11 @@ public:
struct npc_creditmarker_visit_with_ancestorsAI : public ScriptedAI
{
- npc_creditmarker_visit_with_ancestorsAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_creditmarker_visit_with_ancestorsAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -433,7 +433,7 @@ public:
struct npc_corkiAI : public ScriptedAI
{
- npc_corkiAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_corkiAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Say_Timer;
bool ReleasedFromCage;
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index 7c328f57e78..5cf152bd6e2 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -81,7 +81,7 @@ public:
struct npc_manaforge_control_consoleAI : public ScriptedAI
{
- npc_manaforge_control_consoleAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_manaforge_control_consoleAI(Creature* creature) : ScriptedAI(creature) { }
uint32 Event_Timer;
uint32 Wave_Timer;
@@ -102,7 +102,7 @@ public:
add = NULL;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
/*void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
@@ -426,7 +426,7 @@ public:
isEvent = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustSummoned(Creature* summoned) OVERRIDE
{
@@ -502,7 +502,7 @@ public:
return true;
}
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "npc_commander_dawnforge event already in progress, need to wait.");
+ TC_LOG_DEBUG("scripts", "npc_commander_dawnforge event already in progress, need to wait.");
return false;
}
@@ -746,7 +746,7 @@ public:
struct npc_phase_hunterAI : public ScriptedAI
{
- npc_phase_hunterAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_phase_hunterAI(Creature* creature) : ScriptedAI(creature) { }
bool Weak;
bool Materialize;
@@ -882,7 +882,7 @@ public:
struct npc_bessyAI : public npc_escortAI
{
- npc_bessyAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_bessyAI(Creature* creature) : npc_escortAI(creature) { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -953,7 +953,7 @@ public:
struct npc_maxx_a_million_escortAI : public npc_escortAI
{
- npc_maxx_a_million_escortAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_maxx_a_million_escortAI(Creature* creature) : npc_escortAI(creature) { }
bool bTake;
uint32 uiTakeTimer;
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index 24fbcf881b2..41abc490d2b 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -349,7 +349,7 @@ public:
struct npc_dragonmaw_peonAI : public ScriptedAI
{
- npc_dragonmaw_peonAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_dragonmaw_peonAI(Creature* creature) : ScriptedAI(creature) { }
uint64 PlayerGUID;
bool Tapped;
@@ -726,7 +726,7 @@ public:
struct npc_overlord_morghorAI : public ScriptedAI
{
- npc_overlord_morghorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_overlord_morghorAI(Creature* creature) : ScriptedAI(creature) { }
uint64 PlayerGUID;
uint64 IllidanGUID;
@@ -1262,7 +1262,7 @@ public:
struct npc_torloth_the_magnificentAI : public ScriptedAI
{
- npc_torloth_the_magnificentAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_torloth_the_magnificentAI(Creature* creature) : ScriptedAI(creature) { }
uint32 AnimationTimer, SpellTimer1, SpellTimer2, SpellTimer3;
@@ -1286,7 +1286,7 @@ public:
me->SetTarget(0);
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void HandleAnimation()
{
@@ -1417,7 +1417,7 @@ public:
struct npc_lord_illidan_stormrageAI : public ScriptedAI
{
- npc_lord_illidan_stormrageAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_lord_illidan_stormrageAI(Creature* creature) : ScriptedAI(creature) { }
uint64 PlayerGUID;
@@ -1447,10 +1447,10 @@ public:
me->SetVisible(false);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
void SummonNextWave();
@@ -1559,7 +1559,7 @@ public:
struct npc_illidari_spawnAI : public ScriptedAI
{
- npc_illidari_spawnAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_illidari_spawnAI(Creature* creature) : ScriptedAI(creature) { }
uint64 LordIllidanGUID;
uint32 SpellTimer1, SpellTimer2, SpellTimer3;
@@ -1571,7 +1571,7 @@ public:
Timers = false;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -1814,11 +1814,11 @@ public:
struct npc_enraged_spiritAI : public ScriptedAI
{
- npc_enraged_spiritAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_enraged_spiritAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* /*killer*/) OVERRIDE
{
@@ -1930,11 +1930,11 @@ enum ShadowMoonTuberEnum
class npc_shadowmoon_tuber_node : public CreatureScript
{
public:
- npc_shadowmoon_tuber_node() : CreatureScript("npc_shadowmoon_tuber_node") {}
+ npc_shadowmoon_tuber_node() : CreatureScript("npc_shadowmoon_tuber_node") { }
struct npc_shadowmoon_tuber_nodeAI : public ScriptedAI
{
- npc_shadowmoon_tuber_nodeAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_shadowmoon_tuber_nodeAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp
index 6f4694a5924..adbec22ca2d 100644
--- a/src/server/scripts/Outland/zone_shattrath_city.cpp
+++ b/src/server/scripts/Outland/zone_shattrath_city.cpp
@@ -162,7 +162,7 @@ public:
struct npc_salsalabimAI : public ScriptedAI
{
- npc_salsalabimAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_salsalabimAI(Creature* creature) : ScriptedAI(creature) { }
uint32 MagneticPull_Timer;
@@ -331,7 +331,7 @@ public:
struct npc_kservantAI : public npc_escortAI
{
public:
- npc_kservantAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_kservantAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -428,7 +428,7 @@ public:
}
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
};
};
diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp
index 2cf82cce4d1..ec7f5f976fd 100644
--- a/src/server/scripts/Outland/zone_terokkar_forest.cpp
+++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp
@@ -68,7 +68,7 @@ public:
struct npc_unkor_the_ruthlessAI : public ScriptedAI
{
- npc_unkor_the_ruthlessAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_unkor_the_ruthlessAI(Creature* creature) : ScriptedAI(creature) { }
bool CanDoQuest;
uint32 UnkorUnfriendly_Timer;
@@ -83,7 +83,7 @@ public:
me->setFaction(FACTION_HOSTILE);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DoNice()
{
@@ -175,10 +175,10 @@ public:
struct npc_infested_root_walkerAI : public ScriptedAI
{
- npc_infested_root_walkerAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_infested_root_walkerAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
@@ -207,7 +207,7 @@ public:
struct npc_skywingAI : public npc_escortAI
{
public:
- npc_skywingAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_skywingAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -223,7 +223,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void MoveInLineOfSight(Unit* who) OVERRIDE
@@ -237,7 +237,7 @@ public:
Start(false, false, who->GetGUID());
}
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -262,10 +262,10 @@ public:
struct npc_rotting_forest_ragerAI : public ScriptedAI
{
- npc_rotting_forest_ragerAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_rotting_forest_ragerAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
@@ -305,11 +305,11 @@ public:
struct npc_netherweb_victimAI : public ScriptedAI
{
- npc_netherweb_victimAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_netherweb_victimAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void JustDied(Unit* killer) OVERRIDE
@@ -414,7 +414,7 @@ public:
me->setFaction(m_uiNormFaction);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -467,7 +467,7 @@ public:
struct npc_isla_starmaneAI : public npc_escortAI
{
- npc_isla_starmaneAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_isla_starmaneAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
@@ -672,7 +672,7 @@ public:
struct npc_akunoAI : public npc_escortAI
{
- npc_akunoAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_akunoAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp
index be938582d9c..2497df76bb1 100644
--- a/src/server/scripts/Outland/zone_zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp
@@ -190,7 +190,7 @@ public:
me->setFaction(m_uiNormFaction);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -342,9 +342,9 @@ public:
struct npc_kayra_longmaneAI : public npc_escortAI
{
- npc_kayra_longmaneAI(Creature* creature) : npc_escortAI(creature) {}
+ npc_kayra_longmaneAI(Creature* creature) : npc_escortAI(creature) { }
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
void WaypointReached(uint32 waypointId) OVERRIDE
{
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index e1305d71b73..e78d690d3c0 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -436,7 +436,7 @@ class spell_dk_death_coil : public SpellScriptLoader
class spell_dk_death_gate : public SpellScriptLoader
{
public:
- spell_dk_death_gate() : SpellScriptLoader("spell_dk_death_gate") {}
+ spell_dk_death_gate() : SpellScriptLoader("spell_dk_death_gate") { }
class spell_dk_death_gate_SpellScript : public SpellScript
{
diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp
index f61da1f7179..73db091eee1 100644
--- a/src/server/scripts/Spells/spell_holiday.cpp
+++ b/src/server/scripts/Spells/spell_holiday.cpp
@@ -203,7 +203,7 @@ enum TrickOrTreatSpells
class spell_hallow_end_trick_or_treat : public SpellScriptLoader
{
public:
- spell_hallow_end_trick_or_treat() : SpellScriptLoader("spell_hallow_end_trick_or_treat") {}
+ spell_hallow_end_trick_or_treat() : SpellScriptLoader("spell_hallow_end_trick_or_treat") { }
class spell_hallow_end_trick_or_treat_SpellScript : public SpellScript
{
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 9f7386ab7e6..630485b0b88 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -1350,7 +1350,7 @@ class spell_item_create_heart_candy : public SpellScriptLoader
class spell_item_book_of_glyph_mastery : public SpellScriptLoader
{
public:
- spell_item_book_of_glyph_mastery() : SpellScriptLoader("spell_item_book_of_glyph_mastery") {}
+ spell_item_book_of_glyph_mastery() : SpellScriptLoader("spell_item_book_of_glyph_mastery") { }
class spell_item_book_of_glyph_mastery_SpellScript : public SpellScript
{
@@ -1404,7 +1404,7 @@ enum GiftOfTheHarvester
class spell_item_gift_of_the_harvester : public SpellScriptLoader
{
public:
- spell_item_gift_of_the_harvester() : SpellScriptLoader("spell_item_gift_of_the_harvester") {}
+ spell_item_gift_of_the_harvester() : SpellScriptLoader("spell_item_gift_of_the_harvester") { }
class spell_item_gift_of_the_harvester_SpellScript : public SpellScript
{
@@ -1445,7 +1445,7 @@ enum Sinkholes
class spell_item_map_of_the_geyser_fields : public SpellScriptLoader
{
public:
- spell_item_map_of_the_geyser_fields() : SpellScriptLoader("spell_item_map_of_the_geyser_fields") {}
+ spell_item_map_of_the_geyser_fields() : SpellScriptLoader("spell_item_map_of_the_geyser_fields") { }
class spell_item_map_of_the_geyser_fields_SpellScript : public SpellScript
{
@@ -1536,7 +1536,7 @@ enum AshbringerSounds
class spell_item_ashbringer : public SpellScriptLoader
{
public:
- spell_item_ashbringer() : SpellScriptLoader("spell_item_ashbringer") {}
+ spell_item_ashbringer() : SpellScriptLoader("spell_item_ashbringer") { }
class spell_item_ashbringer_SpellScript : public SpellScript
{
@@ -1585,7 +1585,7 @@ enum MagicEater
class spell_magic_eater_food : public SpellScriptLoader
{
public:
- spell_magic_eater_food() : SpellScriptLoader("spell_magic_eater_food") {}
+ spell_magic_eater_food() : SpellScriptLoader("spell_magic_eater_food") { }
class spell_magic_eater_food_AuraScript : public AuraScript
{
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 299773a5d0f..6e88fb76c7e 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -213,7 +213,7 @@ class spell_rog_deadly_poison : public SpellScriptLoader
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]);
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUIDLow(), enchant->spellid[s]);
+ TC_LOG_ERROR("spells", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUIDLow(), enchant->spellid[s]);
continue;
}
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 6aea2d7ad34..45518fcfef1 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -162,7 +162,7 @@ class spell_warl_create_healthstone : public SpellScriptLoader
rank = 2;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Unknown rank of Improved Healthstone id: %d", aurEff->GetId());
+ TC_LOG_ERROR("spells", "Unknown rank of Improved Healthstone id: %d", aurEff->GetId());
break;
}
}
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 6cd5e962c02..40af44911ed 100644
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
@@ -223,7 +223,7 @@ enum ArgentTournamentAreas
class achievement_tilted : public AchievementCriteriaScript
{
public:
- achievement_tilted() : AchievementCriteriaScript("achievement_tilted") {}
+ achievement_tilted() : AchievementCriteriaScript("achievement_tilted") { }
bool OnCheck(Player* player, Unit* /*target*/) OVERRIDE
{
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index 1b43ee30cd1..2f8d5fa2ce4 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -210,7 +210,11 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
pPosition = WorldLocation(571, 3802.38f, 3585.95f, 49.5765f, 0.0f);
break;
case 5340:
- pPosition = WorldLocation(571, 3687.91f, 3577.28f, 473.342f, 0.0f);
+ if (player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_INCOMPLETE ||
+ player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_COMPLETE)
+ pPosition = WorldLocation(571, 3687.91f, 3577.28f, 473.342f);
+ else
+ pPosition = WorldLocation(571, 3739.38f, 3567.09f, 341.58f);
break;
default:
return false;
@@ -243,7 +247,7 @@ class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
{
public:
- AreaTrigger_at_sholazar_waygate() : AreaTriggerScript("at_sholazar_waygate") {}
+ AreaTrigger_at_sholazar_waygate() : AreaTriggerScript("at_sholazar_waygate") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) OVERRIDE
{
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index 16550dc69ea..11fbeeca852 100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
@@ -31,25 +31,25 @@ public:
{
case CHAT_MSG_ADDON:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s sends: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s sends: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_SAY:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[SAY] Player %s says (language %u): %s",
+ TC_LOG_DEBUG("chat.log", "[SAY] Player %s says (language %u): %s",
player->GetName().c_str(), lang, msg.c_str());
break;
case CHAT_MSG_EMOTE:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[TEXTEMOTE] Player %s emotes: %s",
+ TC_LOG_DEBUG("chat.log", "[TEXTEMOTE] Player %s emotes: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_YELL:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[YELL] Player %s yells (language %u): %s",
+ TC_LOG_DEBUG("chat.log", "[YELL] Player %s yells (language %u): %s",
player->GetName().c_str(), lang, msg.c_str());
break;
}
@@ -58,10 +58,10 @@ public:
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver)
{
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_WHISPER))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[WHISPER] Player %s tells %s: %s",
+ TC_LOG_DEBUG("chat.log", "[WHISPER] Player %s tells %s: %s",
player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells %s: %s",
player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
}
@@ -73,52 +73,52 @@ public:
{
case CHAT_MSG_PARTY:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[PARTY] Player %s tells group with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[PARTY] Player %s tells group with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells group with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells group with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_PARTY_LEADER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[PARTY] Leader %s tells group: %s",
+ TC_LOG_DEBUG("chat.log", "[PARTY] Leader %s tells group: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_RAID:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Player %s tells raid with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[RAID] Player %s tells raid with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells raid with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells raid with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_RAID_LEADER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Leader player %s tells raid: %s",
+ TC_LOG_DEBUG("chat.log", "[RAID] Leader player %s tells raid: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_RAID_WARNING:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Leader player %s warns raid with: %s",
+ TC_LOG_DEBUG("chat.log", "[RAID] Leader player %s warns raid with: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_BATTLEGROUND:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells battleground with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells battleground with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_BATTLEGROUND_LEADER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[BATTLEGROUND] Leader player %s tells battleground: %s",
+ TC_LOG_DEBUG("chat.log", "[BATTLEGROUND] Leader player %s tells battleground: %s",
player->GetName().c_str(), msg.c_str());
break;
}
@@ -130,16 +130,16 @@ public:
{
case CHAT_MSG_GUILD:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[GUILD] Player %s tells guild %s: %s",
+ TC_LOG_DEBUG("chat.log", "[GUILD] Player %s tells guild %s: %s",
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s sends to guild %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s sends to guild %s: %s",
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_OFFICER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[OFFICER] Player %s tells guild %s officers: %s",
+ TC_LOG_DEBUG("chat.log", "[OFFICER] Player %s tells guild %s officers: %s",
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
break;
}
@@ -154,10 +154,10 @@ public:
channel->HasFlag(CHANNEL_FLAG_LFG));
if (sWorld->getBoolConfig(CONFIG_CHATLOG_SYSCHAN) && isSystem)
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[SYSCHAN] Player %s tells channel %s: %s",
+ TC_LOG_DEBUG("chat.log", "[SYSCHAN] Player %s tells channel %s: %s",
player->GetName().c_str(), channel->GetName().c_str(), msg.c_str());
else if (sWorld->getBoolConfig(CONFIG_CHATLOG_CHANNEL))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[CHANNEL] Player %s tells channel %s: %s",
+ TC_LOG_DEBUG("chat.log", "[CHANNEL] Player %s tells channel %s: %s",
player->GetName().c_str(), channel ? channel->GetName().c_str() : "<unknown>", msg.c_str());
}
};
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index ce44cb57eef..3a0c5b0dfd2 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -268,7 +268,7 @@ public:
if (Spell)
creature->CastSpell(player, Spell, false);
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction());
+ TC_LOG_ERROR("scripts", "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction());
}
}
}
@@ -889,7 +889,7 @@ enum SoulWellData
class go_soulwell : public GameObjectScript
{
public:
- go_soulwell() : GameObjectScript("go_soulwell") {}
+ go_soulwell() : GameObjectScript("go_soulwell") { }
struct go_soulwellAI : public GameObjectAI
{
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index f83d35b4039..95f97b1dc84 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -54,7 +54,7 @@ public:
struct guard_genericAI : public GuardAI
{
- guard_genericAI(Creature* creature) : GuardAI(creature) {}
+ guard_genericAI(Creature* creature) : GuardAI(creature) { }
void Reset() OVERRIDE
{
@@ -263,7 +263,7 @@ public:
struct guard_shattrath_scryerAI : public GuardAI
{
- guard_shattrath_scryerAI(Creature* creature) : GuardAI(creature) {}
+ guard_shattrath_scryerAI(Creature* creature) : GuardAI(creature) { }
void Reset() OVERRIDE
{
@@ -328,7 +328,7 @@ public:
struct guard_shattrath_aldorAI : public GuardAI
{
- guard_shattrath_aldorAI(Creature* creature) : GuardAI(creature) {}
+ guard_shattrath_aldorAI(Creature* creature) : GuardAI(creature) { }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 7b6cb90f6c9..5b8e780e3d3 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -172,7 +172,7 @@ public:
class item_disgusting_jar : public ItemScript
{
public:
- item_disgusting_jar() : ItemScript("item_disgusting_jar") {}
+ item_disgusting_jar() : ItemScript("item_disgusting_jar") { }
bool OnExpire(Player* player, ItemTemplate const* /*pItemProto*/) OVERRIDE
{
diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp
index 3891de93261..ed086712ca2 100644
--- a/src/server/scripts/World/mob_generic_creature.cpp
+++ b/src/server/scripts/World/mob_generic_creature.cpp
@@ -36,7 +36,7 @@ public:
struct generic_creatureAI : public ScriptedAI
{
- generic_creatureAI(Creature* creature) : ScriptedAI(creature) {}
+ generic_creatureAI(Creature* creature) : ScriptedAI(creature) { }
uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds)
uint32 BuffTimer; //This variable keeps track of buffs
@@ -212,7 +212,7 @@ public:
struct trigger_deathAI : public NullCreatureAI
{
- trigger_deathAI(Creature* creature) : NullCreatureAI(creature) {}
+ trigger_deathAI(Creature* creature) : NullCreatureAI(creature) { }
void JustDied(Unit* killer) OVERRIDE
{
if (me->m_spells[0])
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index fb36dbefa1f..8d0f917eb2f 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -247,7 +247,7 @@ bool EquippedOk(Player* player, uint32 spellId)
if (item && item->GetTemplate()->RequiredSpell == reqSpell)
{
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
+ TC_LOG_DEBUG("scripts", "player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
return false;
}
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 5304cbf56ca..d7d18d5d36a 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -140,14 +140,14 @@ public:
}
if (!SpawnAssoc)
- TC_LOG_ERROR(LOG_FILTER_SQL, "TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry());
+ TC_LOG_ERROR("sql.sql", "TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry());
else
{
CreatureTemplate const* spawnedTemplate = sObjectMgr->GetCreatureTemplate(SpawnAssoc->spawnedCreatureEntry);
if (!spawnedTemplate)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry);
SpawnAssoc = NULL;
return;
}
@@ -157,7 +157,7 @@ public:
SpawnAssociation* SpawnAssoc;
uint64 SpawnedGUID;
- void Reset() OVERRIDE {}
+ void Reset() OVERRIDE { }
Creature* SummonGuard()
{
@@ -167,7 +167,7 @@ public:
SpawnedGUID = summoned->GetGUID();
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry);
SpawnAssoc = NULL;
}
@@ -330,7 +330,7 @@ public:
struct npc_chicken_cluckAI : public ScriptedAI
{
- npc_chicken_cluckAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_chicken_cluckAI(Creature* creature) : ScriptedAI(creature) { }
uint32 ResetFlagTimer;
@@ -341,7 +341,7 @@ public:
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -425,7 +425,7 @@ public:
struct npc_dancing_flamesAI : public ScriptedAI
{
- npc_dancing_flamesAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_dancing_flamesAI(Creature* creature) : ScriptedAI(creature) { }
bool Active;
uint32 CanIteract;
@@ -461,7 +461,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
@@ -572,11 +572,11 @@ uint32 const HordeSoldierId[3] =
class npc_doctor : public CreatureScript
{
public:
- npc_doctor() : CreatureScript("npc_doctor") {}
+ npc_doctor() : CreatureScript("npc_doctor") { }
struct npc_doctorAI : public ScriptedAI
{
- npc_doctorAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_doctorAI(Creature* creature) : ScriptedAI(creature) { }
uint64 PlayerGUID;
@@ -693,7 +693,7 @@ public:
void UpdateAI(uint32 diff) OVERRIDE;
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
};
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
@@ -721,7 +721,7 @@ public:
struct npc_injured_patientAI : public ScriptedAI
{
- npc_injured_patientAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_injured_patientAI(Creature* creature) : ScriptedAI(creature) { }
uint64 DoctorGUID;
Location* Coord;
@@ -759,7 +759,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* caster, SpellInfo const* spell) OVERRIDE
{
@@ -854,7 +854,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 diff)
patientEntry = HordeSoldierId[rand() % 3];
break;
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Invalid entry for Triage doctor. Please check your database");
+ TC_LOG_ERROR("scripts", "Invalid entry for Triage doctor. Please check your database");
return;
}
@@ -942,7 +942,7 @@ public:
me->SetHealth(me->CountPctFromMaxHealth(70));
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* caster, SpellInfo const* spell) OVERRIDE
{
@@ -1123,7 +1123,7 @@ public:
struct npc_guardianAI : public ScriptedAI
{
- npc_guardianAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_guardianAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() OVERRIDE
{
@@ -1498,10 +1498,10 @@ public:
struct npc_steam_tonkAI : public ScriptedAI
{
- npc_steam_tonkAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_steam_tonkAI(Creature* creature) : ScriptedAI(creature) { }
- void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void Reset() OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void OnPossess(bool apply)
{
@@ -1548,9 +1548,9 @@ public:
ExplosionTimer = 3000;
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+ void AttackStart(Unit* /*who*/) OVERRIDE { }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
@@ -1679,7 +1679,7 @@ public:
}
}
- void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
@@ -1716,11 +1716,11 @@ enum WormholeSpells
class npc_wormhole : public CreatureScript
{
public:
- npc_wormhole() : CreatureScript("npc_wormhole") {}
+ npc_wormhole() : CreatureScript("npc_wormhole") { }
struct npc_wormholeAI : public PassiveAI
{
- npc_wormholeAI(Creature* creature) : PassiveAI(creature) {}
+ npc_wormholeAI(Creature* creature) : PassiveAI(creature) { }
void InitializeAI() OVERRIDE
{
@@ -2135,7 +2135,7 @@ public:
struct npc_fireworkAI : public ScriptedAI
{
- npc_fireworkAI(Creature* creature) : ScriptedAI(creature) {}
+ npc_fireworkAI(Creature* creature) : ScriptedAI(creature) { }
bool isCluster()
{
@@ -2393,7 +2393,7 @@ public:
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
}
- void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void DoAction(int32 /*param*/) OVERRIDE
{
diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp
index 47d59a57100..055c33b40ee 100644
--- a/src/server/shared/Configuration/Config.cpp
+++ b/src/server/shared/Configuration/Config.cpp
@@ -117,3 +117,35 @@ std::string const& ConfigMgr::GetFilename()
GuardType guard(_configLock);
return _filename;
}
+
+std::list<std::string> ConfigMgr::GetKeysByString(std::string const& name)
+{
+ GuardType guard(_configLock);
+
+ std::list<std::string> keys;
+ if (_config.get() == 0)
+ return keys;
+
+ ACE_TString section_name;
+ ACE_Configuration_Section_Key section_key;
+ const ACE_Configuration_Section_Key &root_key = _config->root_section();
+
+ int i = 0;
+ while (_config->enumerate_sections(root_key, i++, section_name) == 0)
+ {
+ _config->open_section(root_key, section_name.c_str(), 0, section_key);
+
+ ACE_TString key_name;
+ ACE_Configuration::VALUETYPE type;
+ int j = 0;
+ while (_config->enumerate_values(section_key, j++, key_name, type) == 0)
+ {
+ std::string temp = key_name.c_str();
+
+ if (!temp.find(name))
+ keys.push_back(temp);
+ }
+ }
+
+ return keys;
+}
diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h
index d633e37f0c4..49f5c5e07fb 100644
--- a/src/server/shared/Configuration/Config.h
+++ b/src/server/shared/Configuration/Config.h
@@ -20,7 +20,7 @@
#define CONFIG_H
#include <string>
-#include <map>
+#include <list>
#include <ace/Singleton.h>
#include <ace/Configuration_Import_Export.h>
#include <ace/Thread_Mutex.h>
@@ -56,6 +56,7 @@ public:
float GetFloatDefault(const char* name, float def);
std::string const& GetFilename();
+ std::list<std::string> GetKeysByString(std::string const& name);
private:
bool GetValueHelper(const char* name, ACE_TString &result);
diff --git a/src/server/shared/DataStores/DBCFileLoader.cpp b/src/server/shared/DataStores/DBCFileLoader.cpp
index 5e82579d29d..0aa94f1d14a 100644
--- a/src/server/shared/DataStores/DBCFileLoader.cpp
+++ b/src/server/shared/DataStores/DBCFileLoader.cpp
@@ -23,9 +23,7 @@
#include "DBCFileLoader.h"
#include "Errors.h"
-DBCFileLoader::DBCFileLoader() : fieldsOffset(NULL), data(NULL), stringTable(NULL)
-{
-}
+DBCFileLoader::DBCFileLoader() : fieldsOffset(NULL), data(NULL), stringTable(NULL) { }
bool DBCFileLoader::Load(const char* filename, const char* fmt)
{
diff --git a/src/server/shared/DataStores/DBCFileLoader.h b/src/server/shared/DataStores/DBCFileLoader.h
index 8605e6a7633..1f8768e5da4 100644
--- a/src/server/shared/DataStores/DBCFileLoader.h
+++ b/src/server/shared/DataStores/DBCFileLoader.h
@@ -77,7 +77,7 @@ class DBCFileLoader
}
private:
- Record(DBCFileLoader &file_, unsigned char *offset_): offset(offset_), file(file_) {}
+ Record(DBCFileLoader &file_, unsigned char *offset_): offset(offset_), file(file_) { }
unsigned char *offset;
DBCFileLoader &file;
diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h
index fdbf0f2bb01..ad13b2a02af 100644
--- a/src/server/shared/DataStores/DBCStore.h
+++ b/src/server/shared/DataStores/DBCStore.h
@@ -120,7 +120,7 @@ class DBCStorage
// Check if sql index pos is valid
if (int32(result->GetFieldCount() - 1) < sql->sqlIndexPos)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str());
+ TC_LOG_ERROR("server.loading", "Invalid index pos for dbc:'%s'", sql->sqlTableName.c_str());
return false;
}
}
@@ -151,7 +151,7 @@ class DBCStorage
uint32 id = fields[sql->sqlIndexPos].GetUInt32();
if (indexTable.asT[id])
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str());
+ TC_LOG_ERROR("server.loading", "Index %d already exists in dbc:'%s'", id, sql->sqlTableName.c_str());
return false;
}
@@ -208,7 +208,7 @@ class DBCStorage
offset += 1;
break;
case FT_STRING:
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
+ TC_LOG_ERROR("server.loading", "Unsupported data type in table '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
return false;
case FT_SORT:
break;
@@ -221,14 +221,14 @@ class DBCStorage
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
+ TC_LOG_ERROR("server.loading", "Incorrect sql format string '%s' at char %d", sql->sqlTableName.c_str(), columnNumber);
return false;
}
}
if (sqlColumnNumber != (result->GetFieldCount() - 1))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str());
+ TC_LOG_ERROR("server.loading", "SQL and DBC format strings are not matching for table: '%s'", sql->sqlTableName.c_str());
return false;
}
diff --git a/src/server/shared/Database/DatabaseWorker.h b/src/server/shared/Database/DatabaseWorker.h
index 252517e336e..179806d29cb 100644
--- a/src/server/shared/Database/DatabaseWorker.h
+++ b/src/server/shared/Database/DatabaseWorker.h
@@ -33,7 +33,7 @@ class DatabaseWorker : protected ACE_Task_Base
int wait() { return ACE_Task_Base::wait(); }
private:
- DatabaseWorker() : ACE_Task_Base() {}
+ DatabaseWorker() : ACE_Task_Base() { }
ACE_Activation_Queue* m_queue;
MySQLConnection* m_conn;
};
diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h
index e209beef8b6..33075accc04 100644
--- a/src/server/shared/Database/DatabaseWorkerPool.h
+++ b/src/server/shared/Database/DatabaseWorkerPool.h
@@ -68,7 +68,7 @@ class DatabaseWorkerPool
bool res = true;
_connectionInfo = MySQLConnectionInfo(infoString);
- TC_LOG_INFO(LOG_FILTER_SQL_DRIVER, "Opening DatabasePool '%s'. Asynchronous connections: %u, synchronous connections: %u.",
+ TC_LOG_INFO("sql.driver", "Opening DatabasePool '%s'. Asynchronous connections: %u, synchronous connections: %u.",
GetDatabaseName(), async_threads, synch_threads);
//! Open asynchronous connections (delayed operations)
@@ -94,17 +94,17 @@ class DatabaseWorkerPool
}
if (res)
- TC_LOG_INFO(LOG_FILTER_SQL_DRIVER, "DatabasePool '%s' opened successfully. %u total connections running.", GetDatabaseName(),
+ TC_LOG_INFO("sql.driver", "DatabasePool '%s' opened successfully. %u total connections running.", GetDatabaseName(),
(_connectionCount[IDX_SYNCH] + _connectionCount[IDX_ASYNC]));
else
- TC_LOG_ERROR(LOG_FILTER_SQL_DRIVER, "DatabasePool %s NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile "
+ TC_LOG_ERROR("sql.driver", "DatabasePool %s NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile "
"for specific errors.", GetDatabaseName());
return res;
}
void Close()
{
- TC_LOG_INFO(LOG_FILTER_SQL_DRIVER, "Closing down DatabasePool '%s'.", GetDatabaseName());
+ TC_LOG_INFO("sql.driver", "Closing down DatabasePool '%s'.", GetDatabaseName());
//! Shuts down delaythreads for this connection pool by underlying deactivate().
//! The next dequeue attempt in the worker thread tasks will result in an error,
@@ -120,7 +120,7 @@ class DatabaseWorkerPool
t->Close(); //! Closes the actualy MySQL connection.
}
- TC_LOG_INFO(LOG_FILTER_SQL_DRIVER, "Asynchronous connections on DatabasePool '%s' terminated. Proceeding with synchronous connections.",
+ TC_LOG_INFO("sql.driver", "Asynchronous connections on DatabasePool '%s' terminated. Proceeding with synchronous connections.",
GetDatabaseName());
//! Shut down the synchronous connections
@@ -133,7 +133,7 @@ class DatabaseWorkerPool
//! Deletes the ACE_Activation_Queue object and its underlying ACE_Message_Queue
delete _queue;
- TC_LOG_INFO(LOG_FILTER_SQL_DRIVER, "All connections on DatabasePool '%s' closed.", GetDatabaseName());
+ TC_LOG_INFO("sql.driver", "All connections on DatabasePool '%s' closed.", GetDatabaseName());
}
/**
@@ -366,10 +366,10 @@ class DatabaseWorkerPool
switch (transaction->GetSize())
{
case 0:
- TC_LOG_DEBUG(LOG_FILTER_SQL_DRIVER, "Transaction contains 0 queries. Not executing.");
+ TC_LOG_DEBUG("sql.driver", "Transaction contains 0 queries. Not executing.");
return;
case 1:
- TC_LOG_DEBUG(LOG_FILTER_SQL_DRIVER, "Warning: Transaction only holds 1 query, consider removing Transaction context in code.");
+ TC_LOG_DEBUG("sql.driver", "Warning: Transaction only holds 1 query, consider removing Transaction context in code.");
break;
default:
break;
diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h
index 7584d3331fa..5460f5cc4f6 100644
--- a/src/server/shared/Database/Field.h
+++ b/src/server/shared/Database/Field.h
@@ -43,7 +43,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_TINY))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetUInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetUInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -61,7 +61,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_TINY))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetInt8() on non-tinyint field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -79,7 +79,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_SHORT) && !IsType(MYSQL_TYPE_YEAR))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetUInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetUInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -97,7 +97,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_SHORT) && !IsType(MYSQL_TYPE_YEAR))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetInt16() on non-smallint field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -115,7 +115,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_INT24) && !IsType(MYSQL_TYPE_LONG))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetUInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetUInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -133,7 +133,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_INT24) && !IsType(MYSQL_TYPE_LONG))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetInt32() on non-(medium)int field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -151,7 +151,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_LONGLONG) && !IsType(MYSQL_TYPE_BIT))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetUInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetUInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -169,7 +169,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_LONGLONG) && !IsType(MYSQL_TYPE_BIT))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetInt64() on non-bigint field. Using type: %s.", FieldTypeToString(data.type));
return 0;
}
#endif
@@ -187,7 +187,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_FLOAT))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetFloat() on non-float field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetFloat() on non-float field. Using type: %s.", FieldTypeToString(data.type));
return 0.0f;
}
#endif
@@ -205,7 +205,7 @@ class Field
#ifdef TRINITY_DEBUG
if (!IsType(MYSQL_TYPE_DOUBLE))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Warning: GetDouble() on non-double field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Warning: GetDouble() on non-double field. Using type: %s.", FieldTypeToString(data.type));
return 0.0f;
}
#endif
@@ -223,7 +223,7 @@ class Field
#ifdef TRINITY_DEBUG
if (IsNumeric())
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Error: GetCString() on numeric field. Using type: %s.", FieldTypeToString(data.type));
+ TC_LOG_WARN("sql.sql", "Error: GetCString() on numeric field. Using type: %s.", FieldTypeToString(data.type));
return NULL;
}
#endif
@@ -327,7 +327,7 @@ class Field
MYSQL_TYPE_SET:
*/
default:
- TC_LOG_WARN(LOG_FILTER_SQL, "SQL::SizeForType(): invalid field type %u", uint32(field->type));
+ TC_LOG_WARN("sql.sql", "SQL::SizeForType(): invalid field type %u", uint32(field->type));
return 0;
}
}
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index fdb71dd8d1a..da99d6c3537 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -178,8 +178,8 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PrepareStatement(CHAR_INS_GUILD_MEMBER, "INSERT INTO guild_member (guildid, guid, rank, pnote, offnote) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_DEL_GUILD_MEMBER, "DELETE FROM guild_member WHERE guid = ?", CONNECTION_ASYNC); // 0: uint32
PrepareStatement(CHAR_DEL_GUILD_MEMBERS, "DELETE FROM guild_member WHERE guildid = ?", CONNECTION_ASYNC); // 0: uint32
- // 0: uint32, 1: uint8, 3: string, 4: uint32
- PrepareStatement(CHAR_INS_GUILD_RANK, "INSERT INTO guild_rank (guildid, rid, rname, rights) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC);
+ // 0: uint32, 1: uint8, 3: string, 4: uint32, 5: uint32
+ PrepareStatement(CHAR_INS_GUILD_RANK, "INSERT INTO guild_rank (guildid, rid, rname, rights, BankMoneyPerDay) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_DEL_GUILD_RANKS, "DELETE FROM guild_rank WHERE guildid = ?", CONNECTION_ASYNC); // 0: uint32
PrepareStatement(CHAR_DEL_GUILD_LOWEST_RANK, "DELETE FROM guild_rank WHERE guildid = ? AND rid >= ?", CONNECTION_ASYNC); // 0: uint32, 1: uint8
PrepareStatement(CHAR_INS_GUILD_BANK_TAB, "INSERT INTO guild_bank_tab (guildid, TabId) VALUES (?, ?)", CONNECTION_ASYNC); // 0: uint32, 1: uint8
@@ -353,16 +353,16 @@ void CharacterDatabaseConnection::DoPrepareStatements()
// Player saving
PrepareStatement(CHAR_INS_CHARACTER, "INSERT INTO characters (guid, account, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, "
- "map, instance_id, instance_mode_mask, position_x, position_y, position_z, orientation, "
+ "map, instance_id, instance_mode_mask, position_x, position_y, position_z, orientation, trans_x, trans_y, trans_z, trans_o, transguid, "
"taximask, cinematic, "
"totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, "
"extra_flags, stable_slots, at_login, zone, "
"death_expire_time, taxi_path, arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, "
"todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, health, power1, power2, power3, "
"power4, power5, power6, power7, latency, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels) VALUES "
- "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", CONNECTION_ASYNC);
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", CONNECTION_ASYNC);
PrepareStatement(CHAR_UPD_CHARACTER, "UPDATE characters SET name=?,race=?,class=?,gender=?,level=?,xp=?,money=?,playerBytes=?,playerBytes2=?,playerFlags=?,"
- "map=?,instance_id=?,instance_mode_mask=?,position_x=?,position_y=?,position_z=?,orientation=?,taximask=?,cinematic=?,totaltime=?,leveltime=?,rest_bonus=?,"
+ "map=?,instance_id=?,instance_mode_mask=?,position_x=?,position_y=?,position_z=?,orientation=?,trans_x=?,trans_y=?,trans_z=?,trans_o=?,transguid=?,taximask=?,cinematic=?,totaltime=?,leveltime=?,rest_bonus=?,"
"logout_time=?,is_logout_resting=?,resettalents_cost=?,resettalents_time=?,extra_flags=?,stable_slots=?,at_login=?,zone=?,death_expire_time=?,taxi_path=?,"
"arenaPoints=?,totalHonorPoints=?,todayHonorPoints=?,yesterdayHonorPoints=?,totalKills=?,todayKills=?,yesterdayKills=?,chosenTitle=?,knownCurrencies=?,"
"watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,power7=?,latency=?,speccount=?,activespec=?,exploredZones=?,"
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 4aeee0ac525..aa47fb53097 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -25,8 +25,8 @@ class CharacterDatabaseConnection : public MySQLConnection
{
public:
//- Constructors for sync and async connections
- CharacterDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) {}
- CharacterDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) {}
+ CharacterDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) { }
+ CharacterDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp
index cfb5eecc5f1..f6754629e38 100644
--- a/src/server/shared/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp
@@ -36,7 +36,7 @@ void LoginDatabaseConnection::DoPrepareStatements()
PrepareStatement(LOGIN_DEL_ACCOUNT_BANNED, "DELETE FROM account_banned WHERE id = ?", CONNECTION_ASYNC);
PrepareStatement(LOGIN_SEL_SESSIONKEY, "SELECT a.sessionkey, a.id, aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username = ?", CONNECTION_SYNCH);
PrepareStatement(LOGIN_UPD_VS, "UPDATE account SET v = ?, s = ? WHERE username = ?", CONNECTION_ASYNC);
- PrepareStatement(LOGIN_UPD_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0, os = ? WHERE username = ?", CONNECTION_ASYNC);
+ PrepareStatement(LOGIN_UPD_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0, os = ? WHERE username = ?", CONNECTION_SYNCH);
PrepareStatement(LOGIN_SEL_LOGONCHALLENGE, "SELECT a.sha_pass_hash, a.id, a.locked, a.lock_country, a.last_ip, aa.gmlevel, a.v, a.s, a.token_key FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = ?", CONNECTION_SYNCH);
PrepareStatement(LOGIN_SEL_LOGON_COUNTRY, "SELECT country FROM ip2nation WHERE ip < ? ORDER BY ip DESC LIMIT 0,1", CONNECTION_SYNCH);
PrepareStatement(LOGIN_UPD_FAILEDLOGINS, "UPDATE account SET failed_logins = failed_logins + 1 WHERE username = ?", CONNECTION_ASYNC);
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h
index abb1e1c7b13..c9d34a26617 100644
--- a/src/server/shared/Database/Implementation/LoginDatabase.h
+++ b/src/server/shared/Database/Implementation/LoginDatabase.h
@@ -25,8 +25,8 @@ class LoginDatabaseConnection : public MySQLConnection
{
public:
//- Constructors for sync and async connections
- LoginDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) {}
- LoginDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) {}
+ LoginDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) { }
+ LoginDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
diff --git a/src/server/shared/Database/Implementation/WorldDatabase.h b/src/server/shared/Database/Implementation/WorldDatabase.h
index b17aa0dedbb..0126cdc3a80 100644
--- a/src/server/shared/Database/Implementation/WorldDatabase.h
+++ b/src/server/shared/Database/Implementation/WorldDatabase.h
@@ -25,8 +25,8 @@ class WorldDatabaseConnection : public MySQLConnection
{
public:
//- Constructors for sync and async connections
- WorldDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) {}
- WorldDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) {}
+ WorldDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) { }
+ WorldDatabaseConnection(ACE_Activation_Queue* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) { }
//- Loads database type specific prepared statements
void DoPrepareStatements();
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index 4307cab98f2..f569b8352d3 100644
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
@@ -41,9 +41,7 @@ m_queue(NULL),
m_worker(NULL),
m_Mysql(NULL),
m_connectionInfo(connInfo),
-m_connectionFlags(CONNECTION_SYNCH)
-{
-}
+m_connectionFlags(CONNECTION_SYNCH) { }
MySQLConnection::MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo) :
m_reconnecting(false),
@@ -78,7 +76,7 @@ bool MySQLConnection::Open()
mysqlInit = mysql_init(NULL);
if (!mysqlInit)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Could not initialize Mysql connection to database `%s`", m_connectionInfo.database.c_str());
+ TC_LOG_ERROR("sql.sql", "Could not initialize Mysql connection to database `%s`", m_connectionInfo.database.c_str());
return false;
}
@@ -124,14 +122,14 @@ bool MySQLConnection::Open()
{
if (!m_reconnecting)
{
- TC_LOG_INFO(LOG_FILTER_SQL, "MySQL client library: %s", mysql_get_client_info());
- TC_LOG_INFO(LOG_FILTER_SQL, "MySQL server ver: %s ", mysql_get_server_info(m_Mysql));
+ TC_LOG_INFO("sql.sql", "MySQL client library: %s", mysql_get_client_info());
+ TC_LOG_INFO("sql.sql", "MySQL server ver: %s ", mysql_get_server_info(m_Mysql));
// MySQL version above 5.1 IS required in both client and server and there is no known issue with different versions above 5.1
// if (mysql_get_server_version(m_Mysql) != mysql_get_client_version())
- // TC_LOG_INFO(LOG_FILTER_SQL, "[WARNING] MySQL client/server version mismatch; may conflict with behaviour of prepared statements.");
+ // TC_LOG_INFO("sql.sql", "[WARNING] MySQL client/server version mismatch; may conflict with behaviour of prepared statements.");
}
- TC_LOG_INFO(LOG_FILTER_SQL, "Connected to MySQL database at %s", m_connectionInfo.host.c_str());
+ TC_LOG_INFO("sql.sql", "Connected to MySQL database at %s", m_connectionInfo.host.c_str());
mysql_autocommit(m_Mysql, 1);
// set connection properties to UTF8 to properly handle locales for different
@@ -141,7 +139,7 @@ bool MySQLConnection::Open()
}
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Could not connect to MySQL database at %s: %s\n", m_connectionInfo.host.c_str(), mysql_error(mysqlInit));
+ TC_LOG_ERROR("sql.sql", "Could not connect to MySQL database at %s: %s\n", m_connectionInfo.host.c_str(), mysql_error(mysqlInit));
mysql_close(mysqlInit);
return false;
}
@@ -165,8 +163,8 @@ bool MySQLConnection::Execute(const char* sql)
{
uint32 lErrno = mysql_errno(m_Mysql);
- TC_LOG_INFO(LOG_FILTER_SQL, "SQL: %s", sql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "[%u] %s", lErrno, mysql_error(m_Mysql));
+ TC_LOG_INFO("sql.sql", "SQL: %s", sql);
+ TC_LOG_ERROR("sql.sql", "[%u] %s", lErrno, mysql_error(m_Mysql));
if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection)
return Execute(sql); // Try again
@@ -174,7 +172,7 @@ bool MySQLConnection::Execute(const char* sql)
return false;
}
else
- TC_LOG_DEBUG(LOG_FILTER_SQL, "[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql);
+ TC_LOG_DEBUG("sql.sql", "[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql);
}
return true;
@@ -202,7 +200,7 @@ bool MySQLConnection::Execute(PreparedStatement* stmt)
if (mysql_stmt_bind_param(msql_STMT, msql_BIND))
{
uint32 lErrno = mysql_errno(m_Mysql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT));
+ TC_LOG_ERROR("sql.sql", "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT));
if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection)
return Execute(stmt); // Try again
@@ -214,7 +212,7 @@ bool MySQLConnection::Execute(PreparedStatement* stmt)
if (mysql_stmt_execute(msql_STMT))
{
uint32 lErrno = mysql_errno(m_Mysql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT));
+ TC_LOG_ERROR("sql.sql", "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT));
if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection)
return Execute(stmt); // Try again
@@ -223,7 +221,7 @@ bool MySQLConnection::Execute(PreparedStatement* stmt)
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_SQL, "[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str());
+ TC_LOG_DEBUG("sql.sql", "[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str());
m_mStmt->ClearParameters();
return true;
@@ -252,7 +250,7 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES **pResult, uint6
if (mysql_stmt_bind_param(msql_STMT, msql_BIND))
{
uint32 lErrno = mysql_errno(m_Mysql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT));
+ TC_LOG_ERROR("sql.sql", "SQL(p): %s\n [ERROR]: [%u] %s", m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT));
if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection)
return _Query(stmt, pResult, pRowCount, pFieldCount); // Try again
@@ -264,7 +262,7 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES **pResult, uint6
if (mysql_stmt_execute(msql_STMT))
{
uint32 lErrno = mysql_errno(m_Mysql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "SQL(p): %s\n [ERROR]: [%u] %s",
+ TC_LOG_ERROR("sql.sql", "SQL(p): %s\n [ERROR]: [%u] %s",
m_mStmt->getQueryString(m_queries[index].first).c_str(), lErrno, mysql_stmt_error(msql_STMT));
if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection)
@@ -274,7 +272,7 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES **pResult, uint6
return false;
}
- TC_LOG_DEBUG(LOG_FILTER_SQL, "[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str());
+ TC_LOG_DEBUG("sql.sql", "[%u ms] SQL(p): %s", getMSTimeDiff(_s, getMSTime()), m_mStmt->getQueryString(m_queries[index].first).c_str());
m_mStmt->ClearParameters();
@@ -314,8 +312,8 @@ bool MySQLConnection::_Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD *
if (mysql_query(m_Mysql, sql))
{
uint32 lErrno = mysql_errno(m_Mysql);
- TC_LOG_INFO(LOG_FILTER_SQL, "SQL: %s", sql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "[%u] %s", lErrno, mysql_error(m_Mysql));
+ TC_LOG_INFO("sql.sql", "SQL: %s", sql);
+ TC_LOG_ERROR("sql.sql", "[%u] %s", lErrno, mysql_error(m_Mysql));
if (_HandleMySQLErrno(lErrno)) // If it returns true, an error was handled successfully (i.e. reconnection)
return _Query(sql, pResult, pFields, pRowCount, pFieldCount); // We try again
@@ -323,7 +321,7 @@ bool MySQLConnection::_Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD *
return false;
}
else
- TC_LOG_DEBUG(LOG_FILTER_SQL, "[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql);
+ TC_LOG_DEBUG("sql.sql", "[%u ms] SQL: %s", getMSTimeDiff(_s, getMSTime()), sql);
*pResult = mysql_store_result(m_Mysql);
*pRowCount = mysql_affected_rows(m_Mysql);
@@ -379,7 +377,7 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction)
ASSERT(stmt);
if (!Execute(stmt))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Transaction aborted. %u queries not executed.", (uint32)queries.size());
+ TC_LOG_WARN("sql.sql", "Transaction aborted. %u queries not executed.", (uint32)queries.size());
RollbackTransaction();
return false;
}
@@ -391,7 +389,7 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction)
ASSERT(sql);
if (!Execute(sql))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "Transaction aborted. %u queries not executed.", (uint32)queries.size());
+ TC_LOG_WARN("sql.sql", "Transaction aborted. %u queries not executed.", (uint32)queries.size());
RollbackTransaction();
return false;
}
@@ -414,7 +412,7 @@ MySQLPreparedStatement* MySQLConnection::GetPreparedStatement(uint32 index)
ASSERT(index < m_stmts.size());
MySQLPreparedStatement* ret = m_stmts[index];
if (!ret)
- TC_LOG_ERROR(LOG_FILTER_SQL, "Could not fetch prepared statement %u on database `%s`, connection type: %s.",
+ TC_LOG_ERROR("sql.sql", "Could not fetch prepared statement %u on database `%s`, connection type: %s.",
index, m_connectionInfo.database.c_str(), (m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous");
return ret;
@@ -440,16 +438,16 @@ void MySQLConnection::PrepareStatement(uint32 index, const char* sql, Connection
MYSQL_STMT* stmt = mysql_stmt_init(m_Mysql);
if (!stmt)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "In mysql_stmt_init() id: %u, sql: \"%s\"", index, sql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "%s", mysql_error(m_Mysql));
+ TC_LOG_ERROR("sql.sql", "In mysql_stmt_init() id: %u, sql: \"%s\"", index, sql);
+ TC_LOG_ERROR("sql.sql", "%s", mysql_error(m_Mysql));
m_prepareError = true;
}
else
{
if (mysql_stmt_prepare(stmt, sql, static_cast<unsigned long>(strlen(sql))))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "In mysql_stmt_prepare() id: %u, sql: \"%s\"", index, sql);
- TC_LOG_ERROR(LOG_FILTER_SQL, "%s", mysql_stmt_error(stmt));
+ TC_LOG_ERROR("sql.sql", "In mysql_stmt_prepare() id: %u, sql: \"%s\"", index, sql);
+ TC_LOG_ERROR("sql.sql", "%s", mysql_stmt_error(stmt));
mysql_stmt_close(stmt);
m_prepareError = true;
}
@@ -491,9 +489,9 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo)
mysql_close(GetHandle());
if (this->Open()) // Don't remove 'this' pointer unless you want to skip loading all prepared statements....
{
- TC_LOG_INFO(LOG_FILTER_SQL, "Connection to the MySQL server is active.");
+ TC_LOG_INFO("sql.sql", "Connection to the MySQL server is active.");
if (oldThreadId != mysql_thread_id(GetHandle()))
- TC_LOG_INFO(LOG_FILTER_SQL, "Successfully reconnected to %s @%s:%s (%s).",
+ TC_LOG_INFO("sql.sql", "Successfully reconnected to %s @%s:%s (%s).",
m_connectionInfo.database.c_str(), m_connectionInfo.host.c_str(), m_connectionInfo.port_or_socket.c_str(),
(m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous");
@@ -516,17 +514,17 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo)
// Outdated table or database structure - terminate core
case ER_BAD_FIELD_ERROR:
case ER_NO_SUCH_TABLE:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders.");
+ TC_LOG_ERROR("sql.sql", "Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders.");
ACE_OS::sleep(10);
std::abort();
return false;
case ER_PARSE_ERROR:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Error while parsing SQL. Core fix required.");
+ TC_LOG_ERROR("sql.sql", "Error while parsing SQL. Core fix required.");
ACE_OS::sleep(10);
std::abort();
return false;
default:
- TC_LOG_ERROR(LOG_FILTER_SQL, "Unhandled MySQL errno %u. Unexpected behaviour possible.", errNo);
+ TC_LOG_ERROR("sql.sql", "Unhandled MySQL errno %u. Unexpected behaviour possible.", errNo);
return false;
}
}
diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h
index 989c447fcd5..656d7917315 100644
--- a/src/server/shared/Database/MySQLConnection.h
+++ b/src/server/shared/Database/MySQLConnection.h
@@ -38,7 +38,7 @@ enum ConnectionFlags
struct MySQLConnectionInfo
{
- MySQLConnectionInfo() {}
+ MySQLConnectionInfo() { }
MySQLConnectionInfo(const std::string& infoString)
{
Tokenizer tokens(infoString, ';');
diff --git a/src/server/shared/Database/MySQLThreading.h b/src/server/shared/Database/MySQLThreading.h
index 4fe928dcc22..38c0d349a1c 100644
--- a/src/server/shared/Database/MySQLThreading.h
+++ b/src/server/shared/Database/MySQLThreading.h
@@ -33,7 +33,7 @@ class MySQL
static void Thread_Init()
{
mysql_thread_init();
- TC_LOG_WARN(LOG_FILTER_SQL, "Core thread with ID [" UI64FMTD "] initializing MySQL thread.",
+ TC_LOG_WARN("sql.sql", "Core thread with ID [" UI64FMTD "] initializing MySQL thread.",
(uint64)ACE_Based::Thread::currentId());
}
@@ -44,7 +44,7 @@ class MySQL
static void Thread_End()
{
mysql_thread_end();
- TC_LOG_WARN(LOG_FILTER_SQL, "Core thread with ID [" UI64FMTD "] shutting down MySQL thread.",
+ TC_LOG_WARN("sql.sql", "Core thread with ID [" UI64FMTD "] shutting down MySQL thread.",
(uint64)ACE_Based::Thread::currentId());
}
diff --git a/src/server/shared/Database/PreparedStatement.cpp b/src/server/shared/Database/PreparedStatement.cpp
index 24097ca41c5..30089cfb197 100644
--- a/src/server/shared/Database/PreparedStatement.cpp
+++ b/src/server/shared/Database/PreparedStatement.cpp
@@ -21,13 +21,9 @@
PreparedStatement::PreparedStatement(uint32 index) :
m_stmt(NULL),
-m_index(index)
-{
-}
+m_index(index) { }
-PreparedStatement::~PreparedStatement()
-{
-}
+PreparedStatement::~PreparedStatement() { }
void PreparedStatement::BindParameters()
{
@@ -81,7 +77,7 @@ void PreparedStatement::BindParameters()
}
#ifdef _DEBUG
if (i < m_stmt->m_paramCount)
- TC_LOG_WARN(LOG_FILTER_SQL, "[WARNING]: BindParameters() for statement %u did not bind all allocated parameters", m_index);
+ TC_LOG_WARN("sql.sql", "[WARNING]: BindParameters() for statement %u did not bind all allocated parameters", m_index);
#endif
}
@@ -244,7 +240,7 @@ void MySQLPreparedStatement::ClearParameters()
static bool ParamenterIndexAssertFail(uint32 stmtIndex, uint8 index, uint32 paramCount)
{
- TC_LOG_ERROR(LOG_FILTER_SQL_DRIVER, "Attempted to bind parameter %u%s on a PreparedStatement %u (statement has only %u parameters)", uint32(index) + 1, (index == 1 ? "st" : (index == 2 ? "nd" : (index == 3 ? "rd" : "nd"))), stmtIndex, paramCount);
+ TC_LOG_ERROR("sql.driver", "Attempted to bind parameter %u%s on a PreparedStatement %u (statement has only %u parameters)", uint32(index) + 1, (index == 1 ? "st" : (index == 2 ? "nd" : (index == 3 ? "rd" : "nd"))), stmtIndex, paramCount);
return false;
}
@@ -254,7 +250,7 @@ bool MySQLPreparedStatement::CheckValidIndex(uint8 index)
ASSERT(index < m_paramCount || ParamenterIndexAssertFail(m_stmt->m_index, index, m_paramCount));
if (m_paramsSet[index])
- TC_LOG_WARN(LOG_FILTER_SQL, "[WARNING] Prepared Statement (id: %u) trying to bind value on already bound index (%u).", m_stmt->m_index, index);
+ TC_LOG_WARN("sql.sql", "[WARNING] Prepared Statement (id: %u) trying to bind value on already bound index (%u).", m_stmt->m_index, index);
return true;
}
@@ -451,16 +447,12 @@ std::string MySQLPreparedStatement::getQueryString(std::string const& sqlPattern
//- Execution
PreparedStatementTask::PreparedStatementTask(PreparedStatement* stmt) :
m_stmt(stmt),
-m_has_result(false)
-{
-}
+m_has_result(false) { }
PreparedStatementTask::PreparedStatementTask(PreparedStatement* stmt, PreparedQueryResultFuture result) :
m_stmt(stmt),
m_has_result(true),
-m_result(result)
-{
-}
+m_result(result) { }
PreparedStatementTask::~PreparedStatementTask()
diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp
index 0a7c19af6d0..77980c4f66e 100644
--- a/src/server/shared/Database/QueryHolder.cpp
+++ b/src/server/shared/Database/QueryHolder.cpp
@@ -24,7 +24,7 @@ bool SQLQueryHolder::SetQuery(size_t index, const char *sql)
{
if (m_queries.size() <= index)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Query index (%u) out of range (size: %u) for query: %s", uint32(index), (uint32)m_queries.size(), sql);
+ TC_LOG_ERROR("sql.sql", "Query index (%u) out of range (size: %u) for query: %s", uint32(index), (uint32)m_queries.size(), sql);
return false;
}
@@ -44,7 +44,7 @@ bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...)
{
if (!format)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Query (index: %u) is empty.", uint32(index));
+ TC_LOG_ERROR("sql.sql", "Query (index: %u) is empty.", uint32(index));
return false;
}
@@ -56,7 +56,7 @@ bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...)
if (res == -1)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "SQL Query truncated (and not execute) for format: %s", format);
+ TC_LOG_ERROR("sql.sql", "SQL Query truncated (and not execute) for format: %s", format);
return false;
}
@@ -67,7 +67,7 @@ bool SQLQueryHolder::SetPreparedQuery(size_t index, PreparedStatement* stmt)
{
if (m_queries.size() <= index)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Query index (%u) out of range (size: %u) for prepared statement", uint32(index), (uint32)m_queries.size());
+ TC_LOG_ERROR("sql.sql", "Query index (%u) out of range (size: %u) for prepared statement", uint32(index), (uint32)m_queries.size());
return false;
}
@@ -169,6 +169,9 @@ void SQLQueryHolder::SetSize(size_t size)
bool SQLQueryHolderTask::Execute()
{
+ //the result can't be ready as we are processing it right now
+ ASSERT(!m_result.ready());
+
if (!m_holder)
return false;
diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h
index fd2cbcacbcc..05c9e869290 100644
--- a/src/server/shared/Database/QueryHolder.h
+++ b/src/server/shared/Database/QueryHolder.h
@@ -27,7 +27,7 @@ class SQLQueryHolder
typedef std::pair<SQLElementData, SQLResultSetUnion> SQLResultPair;
std::vector<SQLResultPair> m_queries;
public:
- SQLQueryHolder() {}
+ SQLQueryHolder() { }
~SQLQueryHolder();
bool SetQuery(size_t index, const char *sql);
bool SetPQuery(size_t index, const char *format, ...) ATTR_PRINTF(3, 4);
@@ -49,7 +49,7 @@ class SQLQueryHolderTask : public SQLOperation
public:
SQLQueryHolderTask(SQLQueryHolder *holder, QueryResultHolderFuture res)
- : m_holder(holder), m_result(res){};
+ : m_holder(holder), m_result(res){ };
bool Execute();
};
diff --git a/src/server/shared/Database/QueryResult.cpp b/src/server/shared/Database/QueryResult.cpp
index 9413e28a0c0..be81570318a 100644
--- a/src/server/shared/Database/QueryResult.cpp
+++ b/src/server/shared/Database/QueryResult.cpp
@@ -59,7 +59,7 @@ m_length(NULL)
//- This is where we store the (entire) resultset
if (mysql_stmt_store_result(m_stmt))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "%s:mysql_stmt_store_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt));
+ TC_LOG_WARN("sql.sql", "%s:mysql_stmt_store_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt));
delete[] m_rBind;
delete[] m_isNull;
delete[] m_length;
@@ -89,7 +89,7 @@ m_length(NULL)
//- This is where we bind the bind the buffer to the statement
if (mysql_stmt_bind_result(m_stmt, m_rBind))
{
- TC_LOG_WARN(LOG_FILTER_SQL, "%s:mysql_stmt_bind_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt));
+ TC_LOG_WARN("sql.sql", "%s:mysql_stmt_bind_result, cannot bind result from MySQL server. Error: %s", __FUNCTION__, mysql_stmt_error(m_stmt));
delete[] m_rBind;
delete[] m_isNull;
delete[] m_length;
diff --git a/src/server/shared/Database/SQLOperation.h b/src/server/shared/Database/SQLOperation.h
index 400355e7c76..d7870a7d22e 100644
--- a/src/server/shared/Database/SQLOperation.h
+++ b/src/server/shared/Database/SQLOperation.h
@@ -59,7 +59,7 @@ class MySQLConnection;
class SQLOperation : public ACE_Method_Request
{
public:
- SQLOperation(): m_conn(NULL) {}
+ SQLOperation(): m_conn(NULL) { }
virtual int call()
{
Execute();
diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h
index 026cc1fdf96..e8e5a743a63 100644
--- a/src/server/shared/Database/Transaction.h
+++ b/src/server/shared/Database/Transaction.h
@@ -33,7 +33,7 @@ class Transaction
friend class DatabaseWorkerPool;
public:
- Transaction() : _cleanedUp(false) {}
+ Transaction() : _cleanedUp(false) { }
~Transaction() { Cleanup(); }
void Append(PreparedStatement* statement);
@@ -59,8 +59,8 @@ class TransactionTask : public SQLOperation
friend class DatabaseWorker;
public:
- TransactionTask(SQLTransaction trans) : m_trans(trans) {} ;
- ~TransactionTask(){};
+ TransactionTask(SQLTransaction trans) : m_trans(trans) { } ;
+ ~TransactionTask(){ };
protected:
bool Execute();
diff --git a/src/server/shared/Dynamic/FactoryHolder.h b/src/server/shared/Dynamic/FactoryHolder.h
index f0b45a8924b..cea8cb9c0bb 100644
--- a/src/server/shared/Dynamic/FactoryHolder.h
+++ b/src/server/shared/Dynamic/FactoryHolder.h
@@ -33,8 +33,8 @@ class FactoryHolder
friend class ACE_Singleton<FactoryHolderRegistry, ACE_Null_Mutex>;
typedef ACE_Singleton<FactoryHolderRegistry, ACE_Null_Mutex> FactoryHolderRepository;
- FactoryHolder(Key k) : i_key(k) {}
- virtual ~FactoryHolder() {}
+ FactoryHolder(Key k) : i_key(k) { }
+ virtual ~FactoryHolder() { }
inline Key key() const { return i_key; }
void RegisterSelf(void) { FactoryHolderRepository::instance()->InsertItem(this, i_key); }
@@ -54,7 +54,7 @@ template<class T>
class Permissible
{
public:
- virtual ~Permissible() {}
+ virtual ~Permissible() { }
virtual int Permit(const T *) const = 0;
};
#endif
diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h
index a7c230554e2..c8a6a88e473 100644
--- a/src/server/shared/Dynamic/LinkedList.h
+++ b/src/server/shared/Dynamic/LinkedList.h
@@ -33,7 +33,7 @@ class LinkedListElement
LinkedListElement* iNext;
LinkedListElement* iPrev;
public:
- LinkedListElement(): iNext(NULL), iPrev(NULL) {}
+ LinkedListElement(): iNext(NULL), iPrev(NULL) { }
~LinkedListElement() { delink(); }
bool hasNext() const { return(iNext && iNext->iNext != NULL); }
diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h
index 6be75c296d8..8604f3431e0 100644
--- a/src/server/shared/Dynamic/LinkedReference/Reference.h
+++ b/src/server/shared/Dynamic/LinkedReference/Reference.h
@@ -40,7 +40,7 @@ template <class TO, class FROM> class Reference : public LinkedListElement
virtual void sourceObjectDestroyLink() = 0;
public:
Reference() { iRefTo = NULL; iRefFrom = NULL; }
- virtual ~Reference() {}
+ virtual ~Reference() { }
// Create new link
void link(TO* toObj, FROM* fromObj)
diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h
index 2d7f12b0069..1b402eb3be1 100644
--- a/src/server/shared/Dynamic/ObjectRegistry.h
+++ b/src/server/shared/Dynamic/ObjectRegistry.h
@@ -92,7 +92,7 @@ class ObjectRegistry
return i_registeredObjects;
}
- ObjectRegistry() {}
+ ObjectRegistry() { }
~ObjectRegistry()
{
for (typename RegistryMapType::iterator iter=i_registeredObjects.begin(); iter != i_registeredObjects.end(); ++iter)
diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h
index 10d6ba324c4..a99a448e0b8 100644
--- a/src/server/shared/Dynamic/TypeContainer.h
+++ b/src/server/shared/Dynamic/TypeContainer.h
@@ -60,7 +60,7 @@ template<class OBJECT> struct ContainerArrayList
};
// termination condition
-template<> struct ContainerArrayList<TypeNull> {};
+template<> struct ContainerArrayList<TypeNull> { };
// recursion
template<class H, class T> struct ContainerArrayList<TypeList<H, T> >
{
@@ -78,7 +78,7 @@ template<class OBJECT> struct ContainerList
};
/* TypeNull is underfined */
-template<> struct ContainerList<TypeNull> {};
+template<> struct ContainerList<TypeNull> { };
template<class H, class T> struct ContainerList<TypeList<H, T> >
{
ContainerList<H> _elements;
diff --git a/src/server/shared/Dynamic/TypeContainerVisitor.h b/src/server/shared/Dynamic/TypeContainerVisitor.h
index 800a21bed5d..8ca3ee8dbc4 100644
--- a/src/server/shared/Dynamic/TypeContainerVisitor.h
+++ b/src/server/shared/Dynamic/TypeContainerVisitor.h
@@ -38,9 +38,7 @@ template<class VISITOR, class TYPE_CONTAINER> void VisitorHelper(VISITOR &v, TYP
}
// terminate condition for container list
-template<class VISITOR> void VisitorHelper(VISITOR &/*v*/, ContainerList<TypeNull> &/*c*/)
-{
-}
+template<class VISITOR> void VisitorHelper(VISITOR &/*v*/, ContainerList<TypeNull> &/*c*/) { }
template<class VISITOR, class T> void VisitorHelper(VISITOR &v, ContainerList<T> &c)
{
@@ -55,9 +53,7 @@ template<class VISITOR, class H, class T> void VisitorHelper(VISITOR &v, Contain
}
// terminate condition container map list
-template<class VISITOR> void VisitorHelper(VISITOR &/*v*/, ContainerMapList<TypeNull> &/*c*/)
-{
-}
+template<class VISITOR> void VisitorHelper(VISITOR &/*v*/, ContainerMapList<TypeNull> &/*c*/) { }
template<class VISITOR, class T> void VisitorHelper(VISITOR &v, ContainerMapList<T> &c)
{
@@ -77,9 +73,7 @@ template<class VISITOR, class T> void VisitorHelper(VISITOR &v, ContainerArrayLi
v.Visit(c._element);
}
-template<class VISITOR> void VisitorHelper(VISITOR &/*v*/, ContainerArrayList<TypeNull> &/*c*/)
-{
-}
+template<class VISITOR> void VisitorHelper(VISITOR &/*v*/, ContainerArrayList<TypeNull> &/*c*/) { }
// recursion
template<class VISITOR, class H, class T> void VisitorHelper(VISITOR &v, ContainerArrayList<TypeList<H, T> > &c)
@@ -98,7 +92,7 @@ template<class VISITOR, class TYPE_CONTAINER>
class TypeContainerVisitor
{
public:
- TypeContainerVisitor(VISITOR &v) : i_visitor(v) {}
+ TypeContainerVisitor(VISITOR &v) : i_visitor(v) { }
void Visit(TYPE_CONTAINER &c)
{
diff --git a/src/server/shared/Logging/Appender.cpp b/src/server/shared/Logging/Appender.cpp
index f47cbc3b095..06aa6159014 100644
--- a/src/server/shared/Logging/Appender.cpp
+++ b/src/server/shared/Logging/Appender.cpp
@@ -33,13 +33,9 @@ std::string LogMessage::getTimeStr()
}
Appender::Appender(uint8 _id, std::string const& _name, AppenderType _type /* = APPENDER_NONE*/, LogLevel _level /* = LOG_LEVEL_DISABLED */, AppenderFlags _flags /* = APPENDER_FLAGS_NONE */):
-id(_id), name(_name), type(_type), level(_level), flags(_flags)
-{
-}
+id(_id), name(_name), type(_type), level(_level), flags(_flags) { }
-Appender::~Appender()
-{
-}
+Appender::~Appender() { }
uint8 Appender::getId() const
{
@@ -78,7 +74,7 @@ void Appender::write(LogMessage& message)
message.prefix.clear();
if (flags & APPENDER_FLAGS_PREFIX_TIMESTAMP)
- message.prefix.append(message.getTimeStr().c_str());
+ message.prefix.append(message.getTimeStr());
if (flags & APPENDER_FLAGS_PREFIX_LOGLEVEL)
{
@@ -95,9 +91,9 @@ void Appender::write(LogMessage& message)
if (!message.prefix.empty())
message.prefix.push_back(' ');
- char text[MAX_QUERY_LEN];
- snprintf(text, MAX_QUERY_LEN, "[%s]", Appender::getLogFilterTypeString(message.type));
- message.prefix.append(text);
+ message.prefix.push_back('[');
+ message.prefix.append(message.type);
+ message.prefix.push_back(']');
}
if (!message.prefix.empty())
@@ -126,104 +122,3 @@ const char* Appender::getLogLevelString(LogLevel level)
return "DISABLED";
}
}
-
-char const* Appender::getLogFilterTypeString(LogFilterType type)
-{
- switch (type)
- {
- case LOG_FILTER_GENERAL:
- return "GENERAL";
- case LOG_FILTER_UNITS:
- return "UNITS";
- case LOG_FILTER_PETS:
- return "PETS";
- case LOG_FILTER_VEHICLES:
- return "VEHICLES";
- case LOG_FILTER_TSCR:
- return "TSCR";
- case LOG_FILTER_DATABASE_AI:
- return "DATABASE_AI";
- case LOG_FILTER_MAPSCRIPTS:
- return "MAPSCRIPTS";
- case LOG_FILTER_NETWORKIO:
- return "NETWORKIO";
- case LOG_FILTER_SPELLS_AURAS:
- return "SPELLS_AURAS";
- case LOG_FILTER_ACHIEVEMENTSYS:
- return "ACHIEVEMENTSYS";
- case LOG_FILTER_CONDITIONSYS:
- return "CONDITIONSYS";
- case LOG_FILTER_POOLSYS:
- return "POOLSYS";
- case LOG_FILTER_AUCTIONHOUSE:
- return "AUCTIONHOUSE";
- case LOG_FILTER_BATTLEGROUND:
- return "BATTLEGROUND";
- case LOG_FILTER_OUTDOORPVP:
- return "OUTDOORPVP";
- case LOG_FILTER_CHATSYS:
- return "CHATSYS";
- case LOG_FILTER_LFG:
- return "LFG";
- case LOG_FILTER_MAPS:
- return "MAPS";
- case LOG_FILTER_PLAYER:
- return "PLAYER";
- case LOG_FILTER_PLAYER_LOADING:
- return "PLAYER LOADING";
- case LOG_FILTER_PLAYER_ITEMS:
- return "PLAYER ITEMS";
- case LOG_FILTER_PLAYER_SKILLS:
- return "PLAYER SKILLS";
- case LOG_FILTER_PLAYER_CHATLOG:
- return "PLAYER CHATLOG";
- case LOG_FILTER_LOOT:
- return "LOOT";
- case LOG_FILTER_GUILD:
- return "GUILD";
- case LOG_FILTER_TRANSPORTS:
- return "TRANSPORTS";
- case LOG_FILTER_SQL:
- return "SQL";
- case LOG_FILTER_GMCOMMAND:
- return "GMCOMMAND";
- case LOG_FILTER_REMOTECOMMAND:
- return "REMOTECOMMAND";
- case LOG_FILTER_WARDEN:
- return "WARDEN";
- case LOG_FILTER_AUTHSERVER:
- return "AUTHSERVER";
- case LOG_FILTER_WORLDSERVER:
- return "WORLDSERVER";
- case LOG_FILTER_GAMEEVENTS:
- return "GAMEEVENTS";
- case LOG_FILTER_CALENDAR:
- return "CALENDAR";
- case LOG_FILTER_CHARACTER:
- return "CHARACTER";
- case LOG_FILTER_ARENAS:
- return "ARENAS";
- case LOG_FILTER_SQL_DRIVER:
- return "SQL DRIVER";
- case LOG_FILTER_SQL_DEV:
- return "SQL DEV";
- case LOG_FILTER_PLAYER_DUMP:
- return "PLAYER DUMP";
- case LOG_FILTER_BATTLEFIELD:
- return "BATTLEFIELD";
- case LOG_FILTER_SERVER_LOADING:
- return "SERVER LOADING";
- case LOG_FILTER_OPCODES:
- return "OPCODE";
- case LOG_FILTER_SOAP:
- return "SOAP";
- case LOG_FILTER_RBAC:
- return "RBAC";
- case LOG_FILTER_CHEAT:
- return "CHEAT";
- default:
- break;
- }
-
- return "???";
-}
diff --git a/src/server/shared/Logging/Appender.h b/src/server/shared/Logging/Appender.h
index 14fe52f0837..437c301ea6b 100644
--- a/src/server/shared/Logging/Appender.h
+++ b/src/server/shared/Logging/Appender.h
@@ -24,57 +24,6 @@
#include <string>
-enum LogFilterType
-{
- LOG_FILTER_GENERAL = 0, // This one should only be used inside Log.cpp
- LOG_FILTER_UNITS = 1, // Anything related to units that doesn't fit in other categories. ie. creature formations
- LOG_FILTER_PETS = 2,
- LOG_FILTER_VEHICLES = 3,
- LOG_FILTER_TSCR = 4, // C++ AI, instance scripts, etc.
- LOG_FILTER_DATABASE_AI = 5, // SmartAI, EventAI, Creature* * AI
- LOG_FILTER_MAPSCRIPTS = 6,
- LOG_FILTER_NETWORKIO = 7,
- LOG_FILTER_SPELLS_AURAS = 8,
- LOG_FILTER_ACHIEVEMENTSYS = 9,
- LOG_FILTER_CONDITIONSYS = 10,
- LOG_FILTER_POOLSYS = 11,
- LOG_FILTER_AUCTIONHOUSE = 12,
- LOG_FILTER_BATTLEGROUND = 13,
- LOG_FILTER_OUTDOORPVP = 14,
- LOG_FILTER_CHATSYS = 15,
- LOG_FILTER_LFG = 16,
- LOG_FILTER_MAPS = 17,
- LOG_FILTER_PLAYER = 18, // Any player log that does not fit in other player filters
- LOG_FILTER_PLAYER_LOADING = 19, // Debug output from Player::_Load functions
- LOG_FILTER_PLAYER_ITEMS = 20,
- LOG_FILTER_PLAYER_SKILLS = 21,
- LOG_FILTER_PLAYER_CHATLOG = 22,
- LOG_FILTER_LOOT = 23,
- LOG_FILTER_GUILD = 24,
- LOG_FILTER_TRANSPORTS = 25,
- LOG_FILTER_SQL = 26,
- LOG_FILTER_GMCOMMAND = 27,
- LOG_FILTER_REMOTECOMMAND = 28,
- LOG_FILTER_WARDEN = 29,
- LOG_FILTER_AUTHSERVER = 30,
- LOG_FILTER_WORLDSERVER = 31,
- LOG_FILTER_GAMEEVENTS = 32,
- LOG_FILTER_CALENDAR = 33,
- LOG_FILTER_CHARACTER = 34,
- LOG_FILTER_ARENAS = 35,
- LOG_FILTER_SQL_DRIVER = 36,
- LOG_FILTER_SQL_DEV = 37,
- LOG_FILTER_PLAYER_DUMP = 38,
- LOG_FILTER_BATTLEFIELD = 39,
- LOG_FILTER_SERVER_LOADING = 40,
- LOG_FILTER_OPCODES = 41,
- LOG_FILTER_SOAP = 42,
- LOG_FILTER_RBAC = 43,
- LOG_FILTER_CHEAT = 44
-};
-
-const uint8 MaxLogFilter = 45;
-
// Values assigned have their equivalent in enum ACE_Log_Priority
enum LogLevel
{
@@ -109,7 +58,7 @@ enum AppenderFlags
struct LogMessage
{
- LogMessage(LogLevel _level, LogFilterType _type, std::string _text)
+ LogMessage(LogLevel _level, std::string const& _type, std::string const& _text)
: level(_level), type(_type), text(_text), mtime(time(NULL))
{ }
@@ -117,7 +66,7 @@ struct LogMessage
std::string getTimeStr();
LogLevel level;
- LogFilterType type;
+ std::string type;
std::string text;
std::string prefix;
std::string param1;
@@ -126,7 +75,7 @@ struct LogMessage
///@ Returns size of the log message content in bytes
uint32 Size() const
{
- return prefix.size() + text.size();
+ return static_cast<uint32>(prefix.size() + text.size());
}
};
@@ -145,7 +94,6 @@ class Appender
void setLogLevel(LogLevel);
void write(LogMessage& message);
static const char* getLogLevelString(LogLevel level);
- static const char* getLogFilterTypeString(LogFilterType type);
private:
virtual void _write(LogMessage const& /*message*/) = 0;
diff --git a/src/server/shared/Logging/AppenderConsole.cpp b/src/server/shared/Logging/AppenderConsole.cpp
index a1212bd135b..78350029205 100644
--- a/src/server/shared/Logging/AppenderConsole.cpp
+++ b/src/server/shared/Logging/AppenderConsole.cpp
@@ -59,7 +59,7 @@ void AppenderConsole::InitColors(std::string const& str)
void AppenderConsole::SetColor(bool stdout_stream, ColorTypes color)
{
- #if PLATFORM == PLATFORM_WINDOWS
+#if PLATFORM == PLATFORM_WINDOWS
static WORD WinColorFG[MaxColors] =
{
0, // BLACK
@@ -87,7 +87,7 @@ void AppenderConsole::SetColor(bool stdout_stream, ColorTypes color)
HANDLE hConsole = GetStdHandle(stdout_stream ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE);
SetConsoleTextAttribute(hConsole, WinColorFG[color]);
- #else
+#else
enum ANSITextAttr
{
TA_NORMAL = 0,
@@ -156,7 +156,7 @@ void AppenderConsole::ResetColor(bool stdout_stream)
void AppenderConsole::_write(LogMessage const& message)
{
- bool stdout_stream = message.level == LOG_LEVEL_ERROR || message.level == LOG_LEVEL_FATAL;
+ bool stdout_stream = !(message.level == LOG_LEVEL_ERROR || message.level == LOG_LEVEL_FATAL);
if (_colored)
{
diff --git a/src/server/shared/Logging/AppenderDB.cpp b/src/server/shared/Logging/AppenderDB.cpp
index ae5fc17de73..204592720dc 100644
--- a/src/server/shared/Logging/AppenderDB.cpp
+++ b/src/server/shared/Logging/AppenderDB.cpp
@@ -19,35 +19,23 @@
#include "Database/DatabaseEnv.h"
AppenderDB::AppenderDB(uint8 id, std::string const& name, LogLevel level)
- : Appender(id, name, APPENDER_DB, level), realmId(0), enabled(false)
-{
-}
+ : Appender(id, name, APPENDER_DB, level), realmId(0), enabled(false) { }
-AppenderDB::~AppenderDB()
-{
-}
+AppenderDB::~AppenderDB() { }
void AppenderDB::_write(LogMessage const& message)
{
- if (!enabled)
+ // Avoid infinite loop, PExecute triggers Logging with "sql.sql" type
+ if (!enabled || !message.type.find("sql"))
return;
- switch (message.type)
- {
- case LOG_FILTER_SQL:
- case LOG_FILTER_SQL_DRIVER:
- case LOG_FILTER_SQL_DEV:
- break; // Avoid infinite loop, PExecute triggers Logging with LOG_FILTER_SQL type
- default:
- PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_LOG);
- stmt->setUInt64(0, message.mtime);
- stmt->setUInt32(1, realmId);
- stmt->setUInt8(2, uint8(message.type));
- stmt->setUInt8(3, uint8(message.level));
- stmt->setString(4, message.text);
- LoginDatabase.Execute(stmt);
- break;
- }
+ PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_LOG);
+ stmt->setUInt64(0, message.mtime);
+ stmt->setUInt32(1, realmId);
+ stmt->setString(2, message.type);
+ stmt->setUInt8(3, uint8(message.level));
+ stmt->setString(4, message.text);
+ LoginDatabase.Execute(stmt);
}
void AppenderDB::setRealmId(uint32 _realmId)
diff --git a/src/server/shared/Logging/AppenderFile.cpp b/src/server/shared/Logging/AppenderFile.cpp
index 54458346bb9..d5410112b97 100644
--- a/src/server/shared/Logging/AppenderFile.cpp
+++ b/src/server/shared/Logging/AppenderFile.cpp
@@ -16,7 +16,10 @@
*/
#include "AppenderFile.h"
-#include "Common.h"
+
+#if PLATFORM == PLATFORM_WINDOWS
+# include <Windows.h>
+#endif
AppenderFile::AppenderFile(uint8 id, std::string const& name, LogLevel level, const char* _filename, const char* _logDir, const char* _mode, AppenderFlags _flags, uint64 fileSize):
Appender(id, name, APPENDER_FILE, level, _flags),
@@ -28,7 +31,7 @@ AppenderFile::AppenderFile(uint8 id, std::string const& name, LogLevel level, co
fileSize(0)
{
dynamicName = std::string::npos != filename.find("%s");
- backup = _flags & APPENDER_FLAGS_MAKE_FILE_BACKUP;
+ backup = (_flags & APPENDER_FLAGS_MAKE_FILE_BACKUP) != 0;
logfile = !dynamicName ? OpenFile(_filename, _mode, mode == "w" && backup) : NULL;
}
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index e6400176155..bca150b7059 100644
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
@@ -57,13 +57,6 @@ std::string GetConfigStringDefault(std::string base, const char* name, const cha
return sConfigMgr->GetStringDefault(base.c_str(), value);
}
-// Returns default logger if the requested logger is not found
-Logger* Log::GetLoggerByType(LogFilterType filterType)
-{
- LoggerMap::iterator it = loggers.find(static_cast<uint8>(filterType));
- return it == loggers.end() ? &loggers[0] : &it->second;
-}
-
Appender* Log::GetAppenderByName(std::string const& name)
{
AppenderMap::iterator it = appenders.begin();
@@ -73,38 +66,40 @@ Appender* Log::GetAppenderByName(std::string const& name)
return it == appenders.end() ? NULL : it->second;
}
-void Log::CreateAppenderFromConfig(const char* name)
+void Log::CreateAppenderFromConfig(std::string const& appenderName)
{
- if (!name || *name == '\0')
+ if (appenderName.empty())
return;
// Format=type, level, flags, optional1, optional2
// if type = File. optional1 = file and option2 = mode
// if type = Console. optional1 = Color
- std::string options = "Appender.";
- options.append(name);
- options = sConfigMgr->GetStringDefault(options.c_str(), "");
+ std::string options = sConfigMgr->GetStringDefault(appenderName.c_str(), "");
+
Tokenizer tokens(options, ',');
Tokenizer::const_iterator iter = tokens.begin();
- uint8 size = tokens.size();
+
+ size_t size = tokens.size();
+ std::string name = appenderName.substr(9);
if (size < 2)
{
- fprintf(stderr, "Log::CreateAppenderFromConfig: Wrong configuration for appender %s. Config line: %s\n", name, options.c_str());
+ fprintf(stderr, "Log::CreateAppenderFromConfig: Wrong configuration for appender %s. Config line: %s\n", name.c_str(), options.c_str());
return;
}
AppenderFlags flags = APPENDER_FLAGS_NONE;
- AppenderType type = AppenderType(atoi(*iter));
- LogLevel level = LogLevel(atoi(*(++iter)));
+ AppenderType type = AppenderType(atoi(*iter++));
+ LogLevel level = LogLevel(atoi(*iter++));
+
if (level > LOG_LEVEL_FATAL)
{
- fprintf(stderr, "Log::CreateAppenderFromConfig: Wrong Log Level %d for appender %s\n", level, name);
+ fprintf(stderr, "Log::CreateAppenderFromConfig: Wrong Log Level %d for appender %s\n", level, name.c_str());
return;
}
if (size > 2)
- flags = AppenderFlags(atoi(*(++iter)));
+ flags = AppenderFlags(atoi(*iter++));
switch (type)
{
@@ -113,8 +108,8 @@ void Log::CreateAppenderFromConfig(const char* name)
AppenderConsole* appender = new AppenderConsole(NextAppenderId(), name, level, flags);
appenders[appender->getId()] = appender;
if (size > 3)
- appender->InitColors(*(++iter));
- //fprintf(stdout, "Log::CreateAppenderFromConfig: Created Appender %s (%u), Type CONSOLE, Mask %u\n", appender->getName().c_str(), appender->getId(), appender->getLogLevel()); // DEBUG - RemoveMe
+ appender->InitColors(*iter++);
+ //fprintf(stdout, "Log::CreateAppenderFromConfig: Created Appender %s (%u), Type CONSOLE, Mask %u\n", appender->getName().c_str(), appender->getId(), appender->getLogLevel());
break;
}
case APPENDER_FILE:
@@ -124,14 +119,14 @@ void Log::CreateAppenderFromConfig(const char* name)
if (size < 4)
{
- fprintf(stderr, "Log::CreateAppenderFromConfig: Missing file name for appender %s\n", name);
+ fprintf(stderr, "Log::CreateAppenderFromConfig: Missing file name for appender %s\n", name.c_str());
return;
}
- filename = *(++iter);
+ filename = *iter++;
if (size > 4)
- mode = *(++iter);
+ mode = *iter++;
if (flags & APPENDER_FLAGS_USE_TIMESTAMP)
{
@@ -144,11 +139,11 @@ void Log::CreateAppenderFromConfig(const char* name)
uint64 maxFileSize = 0;
if (size > 5)
- maxFileSize = atoi(*(++iter));
+ maxFileSize = atoi(*iter++);
uint8 id = NextAppenderId();
appenders[id] = new AppenderFile(id, name, level, filename.c_str(), m_logsDir.c_str(), mode.c_str(), flags, maxFileSize);
- //fprintf(stdout, "Log::CreateAppenderFromConfig: Created Appender %s (%u), Type FILE, Mask %u, File %s, Mode %s\n", name, id, level, filename.c_str(), mode.c_str()); // DEBUG - RemoveMe
+ //fprintf(stdout, "Log::CreateAppenderFromConfig: Created Appender %s (%u), Type FILE, Mask %u, File %s, Mode %s\n", name.c_str(), id, level, filename.c_str(), mode.c_str());
break;
}
case APPENDER_DB:
@@ -158,64 +153,54 @@ void Log::CreateAppenderFromConfig(const char* name)
break;
}
default:
- fprintf(stderr, "Log::CreateAppenderFromConfig: Unknown type %d for appender %s\n", type, name);
+ fprintf(stderr, "Log::CreateAppenderFromConfig: Unknown type %d for appender %s\n", type, name.c_str());
break;
}
}
-void Log::CreateLoggerFromConfig(const char* name)
+void Log::CreateLoggerFromConfig(std::string const& appenderName)
{
- if (!name || *name == '\0')
+ if (appenderName.empty())
return;
LogLevel level = LOG_LEVEL_DISABLED;
uint8 type = uint8(-1);
- std::string options = "Logger.";
- options.append(name);
- options = sConfigMgr->GetStringDefault(options.c_str(), "");
+ std::string options = sConfigMgr->GetStringDefault(appenderName.c_str(), "");
+ std::string name = appenderName.substr(7);
if (options.empty())
{
- fprintf(stderr, "Log::CreateLoggerFromConfig: Missing config option Logger.%s\n", name);
+ fprintf(stderr, "Log::CreateLoggerFromConfig: Missing config option Logger.%s\n", name.c_str());
return;
}
Tokenizer tokens(options, ',');
Tokenizer::const_iterator iter = tokens.begin();
- if (tokens.size() != 3)
- {
- fprintf(stderr, "Log::CreateLoggerFromConfig: Wrong config option Logger.%s=%s\n", name, options.c_str());
- return;
- }
-
- type = uint8(atoi(*iter));
- if (type > MaxLogFilter)
+ if (tokens.size() != 2)
{
- fprintf(stderr, "Log::CreateLoggerFromConfig: Wrong type %u for logger %s\n", type, name);
+ fprintf(stderr, "Log::CreateLoggerFromConfig: Wrong config option Logger.%s=%s\n", name.c_str(), options.c_str());
return;
}
- Logger& logger = loggers[type];
+ Logger& logger = loggers[name];
if (!logger.getName().empty())
{
- fprintf(stderr, "Error while configuring Logger %s. Already defined\n", name);
+ fprintf(stderr, "Error while configuring Logger %s. Already defined\n", name.c_str());
return;
}
- ++iter;
- level = LogLevel(atoi(*iter));
+ level = LogLevel(atoi(*iter++));
if (level > LOG_LEVEL_FATAL)
{
- fprintf(stderr, "Log::CreateLoggerFromConfig: Wrong Log Level %u for logger %s\n", type, name);
+ fprintf(stderr, "Log::CreateLoggerFromConfig: Wrong Log Level %u for logger %s\n", type, name.c_str());
return;
}
- logger.Create(name, LogFilterType(type), level);
- //fprintf(stdout, "Log::CreateLoggerFromConfig: Created Logger %s, Type %u, mask %u\n", name, LogFilterType(type), level); // DEBUG - RemoveMe
+ logger.Create(name, level);
+ //fprintf(stdout, "Log::CreateLoggerFromConfig: Created Logger %s, Level %u\n", name.c_str(), level);
- ++iter;
std::istringstream ss(*iter);
std::string str;
@@ -225,63 +210,67 @@ void Log::CreateLoggerFromConfig(const char* name)
if (Appender* appender = GetAppenderByName(str))
{
logger.addAppender(appender->getId(), appender);
- //fprintf(stdout, "Log::CreateLoggerFromConfig: Added Appender %s to Logger %s\n", appender->getName().c_str(), name); // DEBUG - RemoveMe
+ //fprintf(stdout, "Log::CreateLoggerFromConfig: Added Appender %s to Logger %s\n", appender->getName().c_str(), name.c_str());
}
else
- fprintf(stderr, "Error while configuring Appender %s in Logger %s. Appender does not exist", str.c_str(), name);
+ fprintf(stderr, "Error while configuring Appender %s in Logger %s. Appender does not exist", str.c_str(), name.c_str());
ss >> str;
}
}
void Log::ReadAppendersFromConfig()
{
- std::istringstream ss(sConfigMgr->GetStringDefault("Appenders", ""));
- std::string name;
+ std::list<std::string> keys = sConfigMgr->GetKeysByString("Appender.");
- do
+ while (!keys.empty())
{
- ss >> name;
- CreateAppenderFromConfig(name.c_str());
- name = "";
+ CreateAppenderFromConfig(keys.front());
+ keys.pop_front();
}
- while (ss);
}
void Log::ReadLoggersFromConfig()
{
- std::istringstream ss(sConfigMgr->GetStringDefault("Loggers", ""));
- std::string name;
+ std::list<std::string> keys = sConfigMgr->GetKeysByString("Logger.");
- do
+ while (!keys.empty())
{
- ss >> name;
- CreateLoggerFromConfig(name.c_str());
- name = "";
+ CreateLoggerFromConfig(keys.front());
+ keys.pop_front();
}
- while (ss);
- // root logger must exist. Marking as disabled as its not configured
- if (loggers.find(LOG_FILTER_GENERAL) == loggers.end())
- loggers[LOG_FILTER_GENERAL].Create("root", LOG_FILTER_GENERAL, LOG_LEVEL_DISABLED);
+ // Bad config configuration, creating default config
+ if (loggers.find(LOGGER_ROOT) == loggers.end())
+ {
+ fprintf(stderr, "Wrong Loggers configuration. Review your Logger config section.\n"
+ "Creating default loggers [root (Error), server (Info)] to console\n");
+
+ Close(); // Clean any Logger or Appender created
+
+ AppenderConsole* appender = new AppenderConsole(NextAppenderId(), "Console", LOG_LEVEL_DEBUG, APPENDER_FLAGS_NONE);
+ appenders[appender->getId()] = appender;
+
+ Logger& logger = loggers[LOGGER_ROOT];
+ logger.Create(LOGGER_ROOT, LOG_LEVEL_ERROR);
+ logger.addAppender(appender->getId(), appender);
+
+ logger = loggers["server"];
+ logger.Create("server", LOG_LEVEL_ERROR);
+ logger.addAppender(appender->getId(), appender);
+ }
}
-void Log::vlog(LogFilterType filter, LogLevel level, char const* str, va_list argptr)
+void Log::vlog(std::string const& filter, LogLevel level, char const* str, va_list argptr)
{
char text[MAX_QUERY_LEN];
vsnprintf(text, MAX_QUERY_LEN, str, argptr);
write(new LogMessage(level, filter, text));
}
-void Log::write(LogMessage* msg)
+void Log::write(LogMessage* msg) const
{
- if (loggers.empty())
- {
- delete msg;
- return;
- }
-
+ Logger const* logger = GetLoggerByType(msg->type);
msg->text.append("\n");
- Logger* logger = GetLoggerByType(msg->type);
if (worker)
worker->enqueue(new LogOperation(logger, msg));
@@ -333,79 +322,20 @@ bool Log::SetLogLevel(std::string const& name, const char* newLevelc, bool isLog
appender->setLogLevel(newLevel);
}
- return true;
-}
-
-void Log::outTrace(LogFilterType filter, const char * str, ...)
-{
- va_list ap;
- va_start(ap, str);
-
- vlog(filter, LOG_LEVEL_TRACE, str, ap);
-
- va_end(ap);
-}
-
-void Log::outDebug(LogFilterType filter, const char * str, ...)
-{
- va_list ap;
- va_start(ap, str);
-
- vlog(filter, LOG_LEVEL_DEBUG, str, ap);
- va_end(ap);
-}
-
-void Log::outInfo(LogFilterType filter, const char * str, ...)
-{
- va_list ap;
- va_start(ap, str);
-
- vlog(filter, LOG_LEVEL_INFO, str, ap);
-
- va_end(ap);
-}
-
-void Log::outWarn(LogFilterType filter, const char * str, ...)
-{
- va_list ap;
- va_start(ap, str);
-
- vlog(filter, LOG_LEVEL_WARN, str, ap);
-
- va_end(ap);
-}
-
-void Log::outError(LogFilterType filter, const char * str, ...)
-{
- va_list ap;
- va_start(ap, str);
-
- vlog(filter, LOG_LEVEL_ERROR, str, ap);
-
- va_end(ap);
-}
-
-void Log::outFatal(LogFilterType filter, const char * str, ...)
-{
- va_list ap;
- va_start(ap, str);
-
- vlog(filter, LOG_LEVEL_FATAL, str, ap);
-
- va_end(ap);
+ return true;
}
void Log::outCharDump(char const* str, uint32 accountId, uint32 guid, char const* name)
{
- if (!str || !ShouldLog(LOG_FILTER_PLAYER_DUMP, LOG_LEVEL_INFO))
+ if (!str || !ShouldLog("entities.player.dump", LOG_LEVEL_INFO))
return;
std::ostringstream ss;
ss << "== START DUMP == (account: " << accountId << " guid: " << guid << " name: " << name
<< ")\n" << str << "\n== END DUMP ==\n";
- LogMessage* msg = new LogMessage(LOG_LEVEL_INFO, LOG_FILTER_PLAYER_DUMP, ss.str());
+ LogMessage* msg = new LogMessage(LOG_LEVEL_INFO, "entities.player.dump", ss.str());
std::ostringstream param;
param << guid << '_' << name;
@@ -416,7 +346,7 @@ void Log::outCharDump(char const* str, uint32 accountId, uint32 guid, char const
void Log::outCommand(uint32 account, const char * str, ...)
{
- if (!str || !ShouldLog(LOG_FILTER_GMCOMMAND, LOG_LEVEL_INFO))
+ if (!str || !ShouldLog("commands.gm", LOG_LEVEL_INFO))
return;
va_list ap;
@@ -425,7 +355,7 @@ void Log::outCommand(uint32 account, const char * str, ...)
vsnprintf(text, MAX_QUERY_LEN, str, ap);
va_end(ap);
- LogMessage* msg = new LogMessage(LOG_LEVEL_INFO, LOG_FILTER_GMCOMMAND, text);
+ LogMessage* msg = new LogMessage(LOG_LEVEL_INFO, "commands.gm", text);
std::ostringstream ss;
ss << account;
@@ -466,6 +396,7 @@ void Log::LoadFromConfig()
if (!m_logsDir.empty())
if ((m_logsDir.at(m_logsDir.length() - 1) != '/') && (m_logsDir.at(m_logsDir.length() - 1) != '\\'))
m_logsDir.push_back('/');
+
ReadAppendersFromConfig();
ReadLoggersFromConfig();
}
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index e35e4f3ab7f..af522a6745f 100644
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
@@ -21,18 +21,20 @@
#include "Define.h"
#include "Appender.h"
-#include "LogWorker.h"
#include "Logger.h"
+#include "LogWorker.h"
#include "Dynamic/UnorderedMap.h"
#include <string>
#include <ace/Singleton.h>
+#define LOGGER_ROOT "root"
+
class Log
{
friend class ACE_Singleton<Log, ACE_Thread_Mutex>;
- typedef UNORDERED_MAP<uint8, Logger> LoggerMap;
+ typedef UNORDERED_MAP<std::string, Logger> LoggerMap;
private:
Log();
@@ -41,31 +43,26 @@ class Log
public:
void LoadFromConfig();
void Close();
- bool ShouldLog(LogFilterType type, LogLevel level) const;
+ bool ShouldLog(std::string const& type, LogLevel level) const;
bool SetLogLevel(std::string const& name, char const* level, bool isLogger = true);
- void outTrace(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
- void outDebug(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
- void outInfo(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
- void outWarn(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
- void outError(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
- void outFatal(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
+ void outMessage(std::string const& f, LogLevel level, char const* str, ...) ATTR_PRINTF(4, 5);
void outCommand(uint32 account, const char * str, ...) ATTR_PRINTF(3, 4);
void outCharDump(char const* str, uint32 account_id, uint32 guid, char const* name);
- static std::string GetTimestampStr();
void SetRealmId(uint32 id);
private:
- void vlog(LogFilterType f, LogLevel level, char const* str, va_list argptr);
- void write(LogMessage* msg);
+ static std::string GetTimestampStr();
+ void vlog(std::string const& f, LogLevel level, char const* str, va_list argptr);
+ void write(LogMessage* msg) const;
- Logger* GetLoggerByType(LogFilterType filter);
+ Logger const* GetLoggerByType(std::string const& type) const;
Appender* GetAppenderByName(std::string const& name);
uint8 NextAppenderId();
- void CreateAppenderFromConfig(const char* name);
- void CreateLoggerFromConfig(const char* name);
+ void CreateAppenderFromConfig(std::string const& name);
+ void CreateLoggerFromConfig(std::string const& name);
void ReadAppendersFromConfig();
void ReadLoggersFromConfig();
@@ -79,56 +76,82 @@ class Log
LogWorker* worker;
};
-inline bool Log::ShouldLog(LogFilterType type, LogLevel level) const
+inline Logger const* Log::GetLoggerByType(std::string const& type) const
{
- LoggerMap::const_iterator it = loggers.find(uint8(type));
+ LoggerMap::const_iterator it = loggers.find(type);
if (it != loggers.end())
- {
- LogLevel logLevel = it->second.getLogLevel();
- return logLevel != LOG_LEVEL_DISABLED && logLevel <= level;
- }
-
- if (type != LOG_FILTER_GENERAL)
- return ShouldLog(LOG_FILTER_GENERAL, level);
- else
+ return &(it->second);
+
+ if (type == LOGGER_ROOT)
+ return NULL;
+
+ std::string parentLogger = LOGGER_ROOT;
+ size_t found = type.find_last_of(".");
+ if (found != std::string::npos)
+ parentLogger = type.substr(0,found);
+
+ return GetLoggerByType(parentLogger);
+}
+
+inline bool Log::ShouldLog(std::string const& type, LogLevel level) const
+{
+ // TODO: Use cache to store "Type.sub1.sub2": "Type" equivalence, should
+ // Speed up in cases where requesting "Type.sub1.sub2" but only configured
+ // Logger "Type"
+
+ Logger const* logger = GetLoggerByType(type);
+ if (!logger)
return false;
+
+ LogLevel logLevel = logger->getLogLevel();
+ return logLevel != LOG_LEVEL_DISABLED && logLevel <= level;
+}
+
+inline void Log::outMessage(std::string const& filter, LogLevel level, const char * str, ...)
+{
+ va_list ap;
+ va_start(ap, str);
+
+ vlog(filter, level, str, ap);
+
+ va_end(ap);
}
#define sLog ACE_Singleton<Log, ACE_Thread_Mutex>::instance()
#if COMPILER != COMPILER_MICROSOFT
-#define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \
- do { \
- if (sLog->ShouldLog(filterType__, level__)) \
- sLog->call__(filterType__, __VA_ARGS__); \
+#define TC_LOG_MESSAGE_BODY(filterType__, level__, ...) \
+ do { \
+ if (sLog->ShouldLog(filterType__, level__)) \
+ sLog->outMessage(filterType__, level__, __VA_ARGS__); \
} while (0)
#else
-#define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \
- __pragma(warning(push)) \
- __pragma(warning(disable:4127)) \
- do { \
- if (sLog->ShouldLog(filterType__, level__)) \
- sLog->call__(filterType__, __VA_ARGS__); \
- } while (0) \
+#define TC_LOG_MESSAGE_BODY(filterType__, level__, ...) \
+ __pragma(warning(push)) \
+ __pragma(warning(disable:4127)) \
+ do { \
+ if (sLog->ShouldLog(filterType__, level__)) \
+ sLog->outMessage(filterType__, level__, __VA_ARGS__); \
+ } while (0) \
__pragma(warning(pop))
#endif
#define TC_LOG_TRACE(filterType__, ...) \
- TC_LOG_MESSAGE_BODY(LOG_LEVEL_TRACE, outTrace, filterType__, __VA_ARGS__)
+ TC_LOG_MESSAGE_BODY(filterType__, LOG_LEVEL_TRACE, __VA_ARGS__)
#define TC_LOG_DEBUG(filterType__, ...) \
- TC_LOG_MESSAGE_BODY(LOG_LEVEL_DEBUG, outDebug, filterType__, __VA_ARGS__)
+ TC_LOG_MESSAGE_BODY(filterType__, LOG_LEVEL_DEBUG, __VA_ARGS__)
#define TC_LOG_INFO(filterType__, ...) \
- TC_LOG_MESSAGE_BODY(LOG_LEVEL_INFO, outInfo, filterType__, __VA_ARGS__)
+ TC_LOG_MESSAGE_BODY(filterType__, LOG_LEVEL_INFO, __VA_ARGS__)
#define TC_LOG_WARN(filterType__, ...) \
- TC_LOG_MESSAGE_BODY(LOG_LEVEL_WARN, outWarn, filterType__, __VA_ARGS__)
+ TC_LOG_MESSAGE_BODY(filterType__, LOG_LEVEL_WARN, __VA_ARGS__)
#define TC_LOG_ERROR(filterType__, ...) \
- TC_LOG_MESSAGE_BODY(LOG_LEVEL_ERROR, outError, filterType__, __VA_ARGS__)
+ TC_LOG_MESSAGE_BODY(filterType__, LOG_LEVEL_ERROR, __VA_ARGS__)
#define TC_LOG_FATAL(filterType__, ...) \
- TC_LOG_MESSAGE_BODY(LOG_LEVEL_FATAL, outFatal, filterType__, __VA_ARGS__)
+ TC_LOG_MESSAGE_BODY(filterType__, LOG_LEVEL_FATAL, __VA_ARGS__)
#endif
diff --git a/src/server/shared/Logging/LogOperation.h b/src/server/shared/Logging/LogOperation.h
index 40017cb87f4..237f50de4ad 100644
--- a/src/server/shared/Logging/LogOperation.h
+++ b/src/server/shared/Logging/LogOperation.h
@@ -24,7 +24,7 @@ struct LogMessage;
class LogOperation
{
public:
- LogOperation(Logger* _logger, LogMessage* _msg)
+ LogOperation(Logger const* _logger, LogMessage* _msg)
: logger(_logger), msg(_msg)
{ }
@@ -33,8 +33,8 @@ class LogOperation
int call();
protected:
- Logger *logger;
- LogMessage *msg;
+ Logger const* logger;
+ LogMessage* msg;
};
#endif
diff --git a/src/server/shared/Logging/Logger.cpp b/src/server/shared/Logging/Logger.cpp
index 641a9ea1a4b..6fff993e2ae 100644
--- a/src/server/shared/Logging/Logger.cpp
+++ b/src/server/shared/Logging/Logger.cpp
@@ -17,34 +17,19 @@
#include "Logger.h"
-Logger::Logger(): name(""), type(LOG_FILTER_GENERAL), level(LOG_LEVEL_DISABLED)
-{
-}
+Logger::Logger(): name(""), level(LOG_LEVEL_DISABLED) { }
-void Logger::Create(std::string const& _name, LogFilterType _type, LogLevel _level)
+void Logger::Create(std::string const& _name, LogLevel _level)
{
name = _name;
- type = _type;
level = _level;
}
-Logger::~Logger()
-{
- for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it)
- it->second = NULL;
- appenders.clear();
-}
-
std::string const& Logger::getName() const
{
return name;
}
-LogFilterType Logger::getType() const
-{
- return type;
-}
-
LogLevel Logger::getLogLevel() const
{
return level;
@@ -57,12 +42,7 @@ void Logger::addAppender(uint8 id, Appender* appender)
void Logger::delAppender(uint8 id)
{
- AppenderMap::iterator it = appenders.find(id);
- if (it != appenders.end())
- {
- it->second = NULL;
- appenders.erase(it);
- }
+ appenders.erase(id);
}
void Logger::setLogLevel(LogLevel _level)
@@ -70,15 +50,15 @@ void Logger::setLogLevel(LogLevel _level)
level = _level;
}
-void Logger::write(LogMessage& message)
+void Logger::write(LogMessage& message) const
{
if (!level || level > message.level || message.text.empty())
{
- //fprintf(stderr, "Logger::write: Logger %s, Level %u. Msg %s Level %u WRONG LEVEL MASK OR EMPTY MSG\n", getName().c_str(), messge.level, message.text.c_str(), .message.level); // DEBUG - RemoveMe
+ //fprintf(stderr, "Logger::write: Logger %s, Level %u. Msg %s Level %u WRONG LEVEL MASK OR EMPTY MSG\n", getName().c_str(), getLogLevel(), message.text.c_str(), message.level);
return;
}
- for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it)
+ for (AppenderMap::const_iterator it = appenders.begin(); it != appenders.end(); ++it)
if (it->second)
it->second->write(message);
}
diff --git a/src/server/shared/Logging/Logger.h b/src/server/shared/Logging/Logger.h
index 46436a8022e..24727ce1016 100644
--- a/src/server/shared/Logging/Logger.h
+++ b/src/server/shared/Logging/Logger.h
@@ -24,21 +24,18 @@ class Logger
{
public:
Logger();
- ~Logger();
- void Create(std::string const& name, LogFilterType type, LogLevel level);
+ void Create(std::string const& name, LogLevel level);
void addAppender(uint8 type, Appender *);
void delAppender(uint8 type);
std::string const& getName() const;
- LogFilterType getType() const;
LogLevel getLogLevel() const;
void setLogLevel(LogLevel level);
- void write(LogMessage& message);
+ void write(LogMessage& message) const;
private:
std::string name;
- LogFilterType type;
LogLevel level;
AppenderMap appenders;
};
diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp
index 43d147727f6..8fba0fc23a4 100644
--- a/src/server/shared/Packets/ByteBuffer.cpp
+++ b/src/server/shared/Packets/ByteBuffer.cpp
@@ -52,7 +52,7 @@ ByteBufferSourceException::ByteBufferSourceException(size_t pos, size_t size,
void ByteBuffer::print_storage() const
{
- if (!sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) // optimize disabled trace output
+ if (!sLog->ShouldLog("network", LOG_LEVEL_TRACE)) // optimize disabled trace output
return;
std::ostringstream o;
@@ -61,12 +61,12 @@ void ByteBuffer::print_storage() const
o << read<uint8>(i) << " - ";
o << " ";
- TC_LOG_TRACE(LOG_FILTER_NETWORKIO, "%s", o.str().c_str());
+ TC_LOG_TRACE("network", "%s", o.str().c_str());
}
void ByteBuffer::textlike() const
{
- if (!sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) // optimize disabled trace output
+ if (!sLog->ShouldLog("network", LOG_LEVEL_TRACE)) // optimize disabled trace output
return;
std::ostringstream o;
@@ -78,12 +78,12 @@ void ByteBuffer::textlike() const
o << buf;
}
o << " ";
- TC_LOG_TRACE(LOG_FILTER_NETWORKIO, "%s", o.str().c_str());
+ TC_LOG_TRACE("network", "%s", o.str().c_str());
}
void ByteBuffer::hexlike() const
{
- if (!sLog->ShouldLog(LOG_FILTER_NETWORKIO, LOG_LEVEL_TRACE)) // optimize disabled trace output
+ if (!sLog->ShouldLog("network", LOG_LEVEL_TRACE)) // optimize disabled trace output
return;
uint32 j = 1, k = 1;
@@ -110,5 +110,5 @@ void ByteBuffer::hexlike() const
o << buf;
}
o << " ";
- TC_LOG_TRACE(LOG_FILTER_NETWORKIO, "%s", o.str().c_str());
+ TC_LOG_TRACE("network", "%s", o.str().c_str());
}
diff --git a/src/server/shared/Threading/Callback.h b/src/server/shared/Threading/Callback.h
index e0215f5b3d3..d4214cf0843 100644
--- a/src/server/shared/Threading/Callback.h
+++ b/src/server/shared/Threading/Callback.h
@@ -35,7 +35,7 @@ template <typename Result, typename ParamType, bool chain = false>
class QueryCallback
{
public:
- QueryCallback() : _param(), _stage(chain ? 0 : CALLBACK_STAGE_INVALID) {}
+ QueryCallback() : _param(), _stage(chain ? 0 : CALLBACK_STAGE_INVALID) { }
//! The parameter of this function should be a resultset returned from either .AsyncQuery or .AsyncPQuery
void SetFutureResult(ACE_Future<Result> value)
@@ -115,7 +115,7 @@ template <typename Result, typename ParamType1, typename ParamType2, bool chain
class QueryCallback_2
{
public:
- QueryCallback_2() : _stage(chain ? 0 : CALLBACK_STAGE_INVALID) {}
+ QueryCallback_2() : _stage(chain ? 0 : CALLBACK_STAGE_INVALID) { }
//! The parameter of this function should be a resultset returned from either .AsyncQuery or .AsyncPQuery
void SetFutureResult(ACE_Future<Result> value)
diff --git a/src/server/shared/Threading/DelayExecutor.cpp b/src/server/shared/Threading/DelayExecutor.cpp
index 685e86e2a2f..ba8a19429b2 100644
--- a/src/server/shared/Threading/DelayExecutor.cpp
+++ b/src/server/shared/Threading/DelayExecutor.cpp
@@ -10,9 +10,7 @@ DelayExecutor* DelayExecutor::instance()
}
DelayExecutor::DelayExecutor()
- : pre_svc_hook_(0), post_svc_hook_(0), activated_(false)
-{
-}
+ : pre_svc_hook_(0), post_svc_hook_(0), activated_(false) { }
DelayExecutor::~DelayExecutor()
{
diff --git a/src/server/shared/Threading/Threading.h b/src/server/shared/Threading/Threading.h
index 3f2c121d666..00be82c6555 100644
--- a/src/server/shared/Threading/Threading.h
+++ b/src/server/shared/Threading/Threading.h
@@ -30,7 +30,7 @@ namespace ACE_Based
class Runnable
{
public:
- virtual ~Runnable() {}
+ virtual ~Runnable() { }
virtual void run() = 0;
void incReference() { ++m_refs; }
@@ -100,7 +100,7 @@ namespace ACE_Based
typedef ACE_TSS<Thread> ThreadStorage;
//global object - container for Thread class representation of every thread
static ThreadStorage m_ThreadStorage;
- //use this object to determine current OS thread priority values mapped to enum Priority{}
+ //use this object to determine current OS thread priority values mapped to enum Priority{ }
static ThreadPriority m_TpEnum;
};
diff --git a/src/server/shared/Utilities/ByteConverter.h b/src/server/shared/Utilities/ByteConverter.h
index ffa467bb812..b114f8915a4 100644
--- a/src/server/shared/Utilities/ByteConverter.h
+++ b/src/server/shared/Utilities/ByteConverter.h
@@ -35,8 +35,8 @@ namespace ByteConverter
convert<T - 2>(val + 1);
}
- template<> inline void convert<0>(char *) {}
- template<> inline void convert<1>(char *) {} // ignore central byte
+ template<> inline void convert<0>(char *) { }
+ template<> inline void convert<1>(char *) { } // ignore central byte
template<typename T> inline void apply(T *val)
{
diff --git a/src/server/shared/Utilities/EventProcessor.h b/src/server/shared/Utilities/EventProcessor.h
index 69e14b98484..8abf0f09dfe 100644
--- a/src/server/shared/Utilities/EventProcessor.h
+++ b/src/server/shared/Utilities/EventProcessor.h
@@ -29,7 +29,7 @@ class BasicEvent
{
public:
BasicEvent() { to_Abort = false; }
- virtual ~BasicEvent() {} // override destructor to perform some actions on event removal
+ virtual ~BasicEvent() { } // override destructor to perform some actions on event removal
// this method executes when the event is triggered
// return false if event does not want to be deleted
@@ -38,7 +38,7 @@ class BasicEvent
virtual bool IsDeletable() const { return true; } // this event can be safely deleted
- virtual void Abort(uint64 /*e_time*/) {} // this method executes when the event is aborted
+ virtual void Abort(uint64 /*e_time*/) { } // this method executes when the event is aborted
bool to_Abort; // set by externals when the event is aborted, aborted events don't execute
// and get Abort call when deleted
diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp
index 6ae7d387ccc..c50aca87c09 100644
--- a/src/server/shared/Utilities/ServiceWin32.cpp
+++ b/src/server/shared/Utilities/ServiceWin32.cpp
@@ -255,7 +255,7 @@ bool WinServiceRun()
if (!StartServiceCtrlDispatcher(serviceTable))
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "StartService Failed. Error [%u]", ::GetLastError());
+ TC_LOG_ERROR("server.worldserver", "StartService Failed. Error [%u]", ::GetLastError());
return false;
}
return true;
diff --git a/src/server/shared/Utilities/SignalHandler.h b/src/server/shared/Utilities/SignalHandler.h
index 8b49d586dcd..51bb9a4b27b 100644
--- a/src/server/shared/Utilities/SignalHandler.h
+++ b/src/server/shared/Utilities/SignalHandler.h
@@ -33,7 +33,7 @@ class SignalHandler : public ACE_Event_Handler
HandleSignal(SigNum);
return 0;
}
- virtual void HandleSignal(int /*SigNum*/) {};
+ virtual void HandleSignal(int /*SigNum*/) { };
};
}
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index 1ebb58eef1a..218fe052cb3 100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -134,7 +134,7 @@ int kb_hit_return()
void CliRunnable::run()
{
///- Display the list of available CLI functions then beep
- //TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "");
+ //TC_LOG_INFO("server.worldserver", "");
#if PLATFORM != PLATFORM_WINDOWS
rl_attempted_completion_function = cli_completion;
rl_event_hook = cli_hook_func;
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index 61aaf5f2ee9..a5f07c036c2 100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
@@ -132,10 +132,10 @@ extern int main(int argc, char** argv)
return 1;
}
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using configuration file %s.", cfg_file);
+ TC_LOG_INFO("server.worldserver", "Using configuration file %s.", cfg_file);
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using ACE version: %s", ACE_VERSION);
+ TC_LOG_INFO("server.worldserver", "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
+ TC_LOG_INFO("server.worldserver", "Using ACE version: %s", ACE_VERSION);
///- and run the 'Master'
/// @todo Why do we need this 'Master'? Can't all of this be in the Main as for Realmd?
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index d9b97cfd3f5..ffeeafc8951 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -95,7 +95,7 @@ public:
if (!_delaytime)
return;
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Starting up anti-freeze thread (%u seconds max stuck time)...", _delaytime/1000);
+ TC_LOG_INFO("server.worldserver", "Starting up anti-freeze thread (%u seconds max stuck time)...", _delaytime/1000);
_loops = 0;
_lastChange = 0;
while (!World::IsStopped())
@@ -112,11 +112,11 @@ public:
// possible freeze
else if (getMSTimeDiff(_lastChange, curtime) > _delaytime)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "World Thread hangs, kicking out server!");
+ TC_LOG_ERROR("server.worldserver", "World Thread hangs, kicking out server!");
ASSERT(false);
}
}
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Anti-freeze thread exiting without problems.");
+ TC_LOG_INFO("server.worldserver", "Anti-freeze thread exiting without problems.");
}
};
@@ -127,28 +127,28 @@ int Master::Run()
BigNumber seed1;
seed1.SetRand(16 * 8);
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "%s (worldserver-daemon)", _FULLVERSION);
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "<Ctrl-C> to stop.\n");
+ TC_LOG_INFO("server.worldserver", "%s (worldserver-daemon)", _FULLVERSION);
+ TC_LOG_INFO("server.worldserver", "<Ctrl-C> to stop.\n");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, " ______ __");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "/\\__ _\\ __ __/\\ \\__");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\, _\\ __ __");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, " C O R E /\\___/");
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "http://TrinityCore.org \\/__/\n");
+ TC_LOG_INFO("server.worldserver", " ______ __");
+ TC_LOG_INFO("server.worldserver", "/\\__ _\\ __ __/\\ \\__");
+ TC_LOG_INFO("server.worldserver", "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\, _\\ __ __");
+ TC_LOG_INFO("server.worldserver", " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\");
+ TC_LOG_INFO("server.worldserver", " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\");
+ TC_LOG_INFO("server.worldserver", " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\");
+ TC_LOG_INFO("server.worldserver", " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\");
+ TC_LOG_INFO("server.worldserver", " C O R E /\\___/");
+ TC_LOG_INFO("server.worldserver", "http://TrinityCore.org \\/__/\n");
/// worldserver PID file creation
std::string pidFile = sConfigMgr->GetStringDefault("PidFile", "");
if (!pidFile.empty())
{
if (uint32 pid = CreatePIDFile(pidFile))
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Daemon PID: %u\n", pid);
+ TC_LOG_INFO("server.worldserver", "Daemon PID: %u\n", pid);
else
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Cannot create PID file %s.\n", pidFile.c_str());
+ TC_LOG_ERROR("server.worldserver", "Cannot create PID file %s.\n", pidFile.c_str());
return 1;
}
}
@@ -213,20 +213,20 @@ int Master::Run()
ULONG_PTR currentAffinity = affinity & appAff; // remove non accessible processors
if (!currentAffinity)
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the worldserver. Accessible processors bitmask (hex): %x", affinity, appAff);
+ TC_LOG_ERROR("server.worldserver", "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the worldserver. Accessible processors bitmask (hex): %x", affinity, appAff);
else if (SetProcessAffinityMask(hProcess, currentAffinity))
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using processors (bitmask, hex): %x", currentAffinity);
+ TC_LOG_INFO("server.worldserver", "Using processors (bitmask, hex): %x", currentAffinity);
else
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Can't set used processors (hex): %x", currentAffinity);
+ TC_LOG_ERROR("server.worldserver", "Can't set used processors (hex): %x", currentAffinity);
}
}
if (highPriority)
{
if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "worldserver process priority class set to HIGH");
+ TC_LOG_INFO("server.worldserver", "worldserver process priority class set to HIGH");
else
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Can't set worldserver process priority class.");
+ TC_LOG_ERROR("server.worldserver", "Can't set worldserver process priority class.");
}
}
#elif __linux__ // Linux
@@ -241,21 +241,21 @@ int Master::Run()
CPU_SET(i, &mask);
if (sched_setaffinity(0, sizeof(mask), &mask))
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
+ TC_LOG_ERROR("server.worldserver", "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
else
{
CPU_ZERO(&mask);
sched_getaffinity(0, sizeof(mask), &mask);
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using processors (bitmask, hex): %x", *(uint32*)(&mask));
+ TC_LOG_INFO("server.worldserver", "Using processors (bitmask, hex): %x", *(uint32*)(&mask));
}
}
if (highPriority)
{
if (setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Can't set worldserver process priority class, error: %s", strerror(errno));
+ TC_LOG_ERROR("server.worldserver", "Can't set worldserver process priority class, error: %s", strerror(errno));
else
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "worldserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
+ TC_LOG_INFO("server.worldserver", "worldserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
}
#endif
@@ -285,7 +285,7 @@ int Master::Run()
if (sWorldSocketMgr->StartNetwork(worldPort, bindIp.c_str()) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Failed to start network");
+ TC_LOG_ERROR("server.worldserver", "Failed to start network");
World::StopNow(ERROR_EXIT_CODE);
// go down and shutdown the server
}
@@ -293,7 +293,7 @@ int Master::Run()
// set server online (allow connecting now)
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag & ~%u, population = 0 WHERE id = '%u'", REALM_FLAG_INVALID, realmID);
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "%s (worldserver-daemon) ready...", _FULLVERSION);
+ TC_LOG_INFO("server.worldserver", "%s (worldserver-daemon) ready...", _FULLVERSION);
// when the main thread closes the singletons get unloaded
// since worldrunnable uses them, it will crash if unloaded after master
@@ -315,7 +315,7 @@ int Master::Run()
_StopDB();
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Halting process...");
+ TC_LOG_INFO("server.worldserver", "Halting process...");
if (cliThread)
{
@@ -387,14 +387,14 @@ bool Master::_StartDB()
dbString = sConfigMgr->GetStringDefault("WorldDatabaseInfo", "");
if (dbString.empty())
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "World database not specified in configuration file");
+ TC_LOG_ERROR("server.worldserver", "World database not specified in configuration file");
return false;
}
asyncThreads = uint8(sConfigMgr->GetIntDefault("WorldDatabase.WorkerThreads", 1));
if (asyncThreads < 1 || asyncThreads > 32)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "World database: invalid number of worker threads specified. "
+ TC_LOG_ERROR("server.worldserver", "World database: invalid number of worker threads specified. "
"Please pick a value between 1 and 32.");
return false;
}
@@ -403,7 +403,7 @@ bool Master::_StartDB()
///- Initialize the world database
if (!WorldDatabase.Open(dbString, asyncThreads, synchThreads))
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Cannot connect to world database %s", dbString.c_str());
+ TC_LOG_ERROR("server.worldserver", "Cannot connect to world database %s", dbString.c_str());
return false;
}
@@ -411,14 +411,14 @@ bool Master::_StartDB()
dbString = sConfigMgr->GetStringDefault("CharacterDatabaseInfo", "");
if (dbString.empty())
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Character database not specified in configuration file");
+ TC_LOG_ERROR("server.worldserver", "Character database not specified in configuration file");
return false;
}
asyncThreads = uint8(sConfigMgr->GetIntDefault("CharacterDatabase.WorkerThreads", 1));
if (asyncThreads < 1 || asyncThreads > 32)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Character database: invalid number of worker threads specified. "
+ TC_LOG_ERROR("server.worldserver", "Character database: invalid number of worker threads specified. "
"Please pick a value between 1 and 32.");
return false;
}
@@ -428,7 +428,7 @@ bool Master::_StartDB()
///- Initialize the Character database
if (!CharacterDatabase.Open(dbString, asyncThreads, synchThreads))
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Cannot connect to Character database %s", dbString.c_str());
+ TC_LOG_ERROR("server.worldserver", "Cannot connect to Character database %s", dbString.c_str());
return false;
}
@@ -436,14 +436,14 @@ bool Master::_StartDB()
dbString = sConfigMgr->GetStringDefault("LoginDatabaseInfo", "");
if (dbString.empty())
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Login database not specified in configuration file");
+ TC_LOG_ERROR("server.worldserver", "Login database not specified in configuration file");
return false;
}
asyncThreads = uint8(sConfigMgr->GetIntDefault("LoginDatabase.WorkerThreads", 1));
if (asyncThreads < 1 || asyncThreads > 32)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Login database: invalid number of worker threads specified. "
+ TC_LOG_ERROR("server.worldserver", "Login database: invalid number of worker threads specified. "
"Please pick a value between 1 and 32.");
return false;
}
@@ -452,7 +452,7 @@ bool Master::_StartDB()
///- Initialise the login database
if (!LoginDatabase.Open(dbString, asyncThreads, synchThreads))
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Cannot connect to login database %s", dbString.c_str());
+ TC_LOG_ERROR("server.worldserver", "Cannot connect to login database %s", dbString.c_str());
return false;
}
@@ -460,10 +460,10 @@ bool Master::_StartDB()
realmID = sConfigMgr->GetIntDefault("RealmID", 0);
if (!realmID)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Realm ID not defined in configuration file");
+ TC_LOG_ERROR("server.worldserver", "Realm ID not defined in configuration file");
return false;
}
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Realm running as realm ID %d", realmID);
+ TC_LOG_INFO("server.worldserver", "Realm running as realm ID %d", realmID);
///- Clean the database before starting
ClearOnlineAccounts();
@@ -473,7 +473,7 @@ bool Master::_StartDB()
sWorld->LoadDBVersion();
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using World DB: %s", sWorld->GetDBVersion());
+ TC_LOG_INFO("server.worldserver", "Using World DB: %s", sWorld->GetDBVersion());
return true;
}
diff --git a/src/server/worldserver/RemoteAccess/RARunnable.cpp b/src/server/worldserver/RemoteAccess/RARunnable.cpp
index 1493df7aa2f..424c3b9a5a6 100644
--- a/src/server/worldserver/RemoteAccess/RARunnable.cpp
+++ b/src/server/worldserver/RemoteAccess/RARunnable.cpp
@@ -67,11 +67,11 @@ void RARunnable::run()
if (acceptor.open(listenAddress, m_Reactor) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Trinity RA can not bind to port %d on %s", raPort, stringIp.c_str());
+ TC_LOG_ERROR("server.worldserver", "Trinity RA can not bind to port %d on %s", raPort, stringIp.c_str());
return;
}
- TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Starting Trinity RA on port %d on %s", raPort, stringIp.c_str());
+ TC_LOG_INFO("server.worldserver", "Starting Trinity RA on port %d on %s", raPort, stringIp.c_str());
while (!World::IsStopped())
{
@@ -80,5 +80,5 @@ void RARunnable::run()
break;
}
- TC_LOG_DEBUG(LOG_FILTER_WORLDSERVER, "Trinity RA thread exiting");
+ TC_LOG_DEBUG("server.worldserver", "Trinity RA thread exiting");
}
diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp
index a4d402286ed..195b2992244 100644
--- a/src/server/worldserver/RemoteAccess/RASocket.cpp
+++ b/src/server/worldserver/RemoteAccess/RASocket.cpp
@@ -42,18 +42,18 @@ int RASocket::open(void *)
if (peer().get_remote_addr(remoteAddress) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "RASocket::open: peer().get_remote_addr error is %s", ACE_OS::strerror(errno));
+ TC_LOG_ERROR("server.worldserver", "RASocket::open: peer().get_remote_addr error is %s", ACE_OS::strerror(errno));
return -1;
}
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "Incoming connection from %s", remoteAddress.get_host_addr());
+ TC_LOG_INFO("commands.ra", "Incoming connection from %s", remoteAddress.get_host_addr());
return activate();
}
int RASocket::handle_close(ACE_HANDLE /*handle*/, ACE_Reactor_Mask /*mask*/)
{
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "Closing connection");
+ TC_LOG_INFO("commands.ra", "Closing connection");
peer().close_reader();
wait();
// While the above wait() will wait for the ::svc() to finish, it will not wait for the async event
@@ -129,7 +129,7 @@ int RASocket::recv_line(std::string& out_line)
if (recv_line(message_block) == -1)
{
- TC_LOG_DEBUG(LOG_FILTER_REMOTECOMMAND, "Recv error %s", ACE_OS::strerror(errno));
+ TC_LOG_DEBUG("commands.ra", "Recv error %s", ACE_OS::strerror(errno));
return -1;
}
@@ -143,7 +143,7 @@ int RASocket::process_command(const std::string& command)
if (command.length() == 0)
return 0;
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "Received command: %s", command.c_str());
+ TC_LOG_INFO("commands.ra", "Received command: %s", command.c_str());
// handle quit, exit and logout commands to terminate connection
if (command == "quit" || command == "exit" || command == "logout") {
@@ -192,7 +192,7 @@ int RASocket::check_access_level(const std::string& user)
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "User %s does not exist in database", user.c_str());
+ TC_LOG_INFO("commands.ra", "User %s does not exist in database", user.c_str());
return -1;
}
@@ -200,12 +200,12 @@ int RASocket::check_access_level(const std::string& user)
if (fields[1].GetUInt8() < _minLevel)
{
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "User %s has no privilege to login", user.c_str());
+ TC_LOG_INFO("commands.ra", "User %s has no privilege to login", user.c_str());
return -1;
}
else if (fields[2].GetInt32() != -1)
{
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "User %s has to be assigned on all realms (with RealmID = '-1')", user.c_str());
+ TC_LOG_INFO("commands.ra", "User %s has to be assigned on all realms (with RealmID = '-1')", user.c_str());
return -1;
}
@@ -231,7 +231,7 @@ int RASocket::check_password(const std::string& user, const std::string& pass)
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "Wrong password for user: %s", user.c_str());
+ TC_LOG_INFO("commands.ra", "Wrong password for user: %s", user.c_str());
return -1;
}
@@ -254,7 +254,7 @@ int RASocket::authenticate()
if (recv_line(pass) == -1)
return -1;
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "Login attempt for user: %s", user.c_str());
+ TC_LOG_INFO("commands.ra", "Login attempt for user: %s", user.c_str());
if (check_access_level(user) == -1)
return -1;
@@ -262,7 +262,7 @@ int RASocket::authenticate()
if (check_password(user, pass) == -1)
return -1;
- TC_LOG_INFO(LOG_FILTER_REMOTECOMMAND, "User login: %s", user.c_str());
+ TC_LOG_INFO("commands.ra", "User login: %s", user.c_str());
return 0;
}
@@ -296,7 +296,7 @@ int RASocket::subnegotiate()
if (n >= 1024)
{
- TC_LOG_DEBUG(LOG_FILTER_REMOTECOMMAND, "RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", uint32(n));
+ TC_LOG_DEBUG("commands.ra", "RASocket::subnegotiate: allocated buffer 1024 bytes was too small for negotiation packet, size: %u", uint32(n));
return -1;
}
@@ -330,7 +330,7 @@ int RASocket::subnegotiate()
uint8 param = buf[++i];
ss << uint32(param);
- TC_LOG_DEBUG(LOG_FILTER_REMOTECOMMAND, ss.str().c_str());
+ TC_LOG_DEBUG("commands.ra", ss.str().c_str());
}
++i;
}
@@ -396,7 +396,7 @@ void RASocket::zprint(void* callbackArg, const char * szText)
ACE_Time_Value tv = ACE_Time_Value::zero;
if (socket->putq(mb, &tv) == -1)
{
- TC_LOG_DEBUG(LOG_FILTER_REMOTECOMMAND, "Failed to enqueue message, queue is full or closed. Error is %s", ACE_OS::strerror(errno));
+ TC_LOG_DEBUG("commands.ra", "Failed to enqueue message, queue is full or closed. Error is %s", ACE_OS::strerror(errno));
mb->release();
}
}
@@ -416,7 +416,7 @@ void RASocket::commandFinished(void* callbackArg, bool /*success*/)
// hence we don't put timeout, because it shouldn't increase queue size and shouldn't block
if (socket->putq(mb->duplicate()) == -1)
// getting here is bad, command can't be marked as complete
- TC_LOG_DEBUG(LOG_FILTER_REMOTECOMMAND, "Failed to enqueue command end message. Error is %s", ACE_OS::strerror(errno));
+ TC_LOG_DEBUG("commands.ra", "Failed to enqueue command end message. Error is %s", ACE_OS::strerror(errno));
mb->release();
diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp
index e10968bcbee..c76298b0de9 100644
--- a/src/server/worldserver/TCSoap/TCSoap.cpp
+++ b/src/server/worldserver/TCSoap/TCSoap.cpp
@@ -35,18 +35,18 @@ void TCSoapRunnable::run()
soap.send_timeout = 5;
if (!soap_valid_socket(soap_bind(&soap, _host.c_str(), _port, 100)))
{
- TC_LOG_ERROR(LOG_FILTER_SOAP, "Couldn't bind to %s:%d", _host.c_str(), _port);
+ TC_LOG_ERROR("network.soap", "Couldn't bind to %s:%d", _host.c_str(), _port);
exit(-1);
}
- TC_LOG_INFO(LOG_FILTER_SOAP, "Bound to http://%s:%d", _host.c_str(), _port);
+ TC_LOG_INFO("network.soap", "Bound to http://%s:%d", _host.c_str(), _port);
while (!World::IsStopped())
{
if (!soap_valid_socket(soap_accept(&soap)))
continue; // ran into an accept timeout
- TC_LOG_DEBUG(LOG_FILTER_SOAP, "Accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+ TC_LOG_DEBUG("network.soap", "Accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
struct soap* thread_soap = soap_copy(&soap);// make a safe copy
ACE_Message_Block* mb = new ACE_Message_Block(sizeof(struct soap*));
@@ -81,33 +81,33 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
// security check
if (!soap->userid || !soap->passwd)
{
- TC_LOG_INFO(LOG_FILTER_SOAP, "Client didn't provide login information");
+ TC_LOG_INFO("network.soap", "Client didn't provide login information");
return 401;
}
uint32 accountId = AccountMgr::GetId(soap->userid);
if (!accountId)
{
- TC_LOG_INFO(LOG_FILTER_SOAP, "Client used invalid username '%s'", soap->userid);
+ TC_LOG_INFO("network.soap", "Client used invalid username '%s'", soap->userid);
return 401;
}
if (!AccountMgr::CheckPassword(accountId, soap->passwd))
{
- TC_LOG_INFO(LOG_FILTER_SOAP, "Invalid password for account '%s'", soap->userid);
+ TC_LOG_INFO("network.soap", "Invalid password for account '%s'", soap->userid);
return 401;
}
if (AccountMgr::GetSecurity(accountId) < SEC_ADMINISTRATOR)
{
- TC_LOG_INFO(LOG_FILTER_SOAP, "%s's gmlevel is too low", soap->userid);
+ TC_LOG_INFO("network.soap", "%s's gmlevel is too low", soap->userid);
return 403;
}
if (!command || !*command)
return soap_sender_fault(soap, "Command can not be empty", "The supplied command was an empty string");
- TC_LOG_INFO(LOG_FILTER_SOAP, "Received command '%s'", command);
+ TC_LOG_INFO("network.soap", "Received command '%s'", command);
SOAPCommand connection;
// commands are executed in the world thread. We have to wait for them to be completed
@@ -121,7 +121,7 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
int acc = connection.pendingCommands.acquire();
if (acc)
- TC_LOG_ERROR(LOG_FILTER_SOAP, "Error while acquiring lock, acc = %i, errno = %u", acc, errno);
+ TC_LOG_ERROR("network.soap", "Error while acquiring lock, acc = %i, errno = %u", acc, errno);
// alright, command finished
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 23db3330943..4e594fc88c0 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2703,79 +2703,13 @@ UI.ShowQuestLevelsInDialogs = 0
Appender.Console=1,3,0
Appender.Server=2,2,0,Server.log,w
-Appender.GM=2,2,0,GM.log
+Appender.GM=2,2,15,gm/gm_%s.log
Appender.DBErrors=2,2,0,DBErrors.log
-Appender.Char=2,2,0,Char.log,w
-Appender.RA=2,2,0,RA.log
-Appender.Warden=2,4,0,Warden.log
-Appender.Chat=2,2,0,Chat.log
-Appender.CharDump=2,2,0,%s.log
-Appender.Arenas=2,2,0,Arena.log
-Appender.SQLDev=2,2,0,SQLDev.log
-Appender.SQLDriver=2,2,0,SQLDriver.log
-
-# Appenders
-# Description: List of Appenders to read from config
-# (Using spaces as separator).
-# Default: "Console Server GM DBErrors Char RA Warden Chat"
-
-Appenders=Console Server GM DBErrors Char RA Warden Chat
# Logger config values: Given a logger "name"
# Logger.name
# Description: Defines 'What to log'
-# Format: Type,LogLevel,AppenderList
-# Type
-# 0 - Default. Each type that has no config will
-# rely on this one. Core will create this logger
-# (disabled) if it's not configured
-# 1 - Units that doesn't fit in other categories
-# 2 - Pets
-# 3 - Vehicles
-# 4 - C++ AI, instance scripts, etc.
-# 5 - DB AI, such as SAI, EAI, CreatureAI
-# 6 - DB map scripts
-# 7 - Network input/output,
-# such as packet handlers and netcode logs
-# 8 - Spellsystem and aurasystem
-# 9 - Achievement system
-# 10 - Condition system
-# 11 - Pool system
-# 12 - Auction house
-# 13 - Arena's and battlegrounds
-# 14 - Outdoor PVP
-# 15 - Chat system
-# 16 - LFG system
-# 17 - Maps, instances (not scripts),
-# grids, cells, visibility, etc.
-# 18 - Player that doesn't fit in other categories.
-# 19 - Player loading from DB
-# (Player::_LoadXXX functions)
-# 20 - Items
-# 21 - Player skills (do not confuse with spells)
-# 22 - Player chat logs
-# 23 - loot
-# 24 - guilds
-# 25 - transports
-# 26 - SQL. DB errors
-# 27 - GM Commands
-# 28 - Remote Access Commands
-# 29 - Warden
-# 30 - Authserver
-# 31 - Worldserver
-# 32 - Game Events
-# 33 - Calendar
-# 34 - Character (Exclusive to log login, logout, create, rename)
-# 35 - Arenas
-# 36 - SQL Driver
-# 37 - SQL Dev
-# 38 - Player Dump
-# 39 - Battlefield
-# 40 - Server Loading
-# 41 - Opcodes (just id and name sent / received)
-# 42 - SOAP
-# 43 - RBAC (Role Based Access Control)
-# 44 - Cheat (used to log cheat attempts)
+# Format: LogLevel,AppenderList
#
# LogLevel
# 0 - (Disabled)
@@ -2790,28 +2724,52 @@ Appenders=Console Server GM DBErrors Char RA Warden Chat
# (Using spaces as separator).
#
-Logger.Root=0,5,Console Server
-Logger.Chat=22,2,Chat
-Logger.DBErrors=26,5,Console Server DBErrors
-Logger.GM=27,3,Console Server GM
-Logger.RA=28,3,RA
-Logger.Warden=29,4,Warden
-Logger.WorldServer=31,3,Console Server
-Logger.Character=34,3,Char
-Logger.Arenas=35,3,Arenas
-Logger.SQLDriver=36,5,SQLDriver
-Logger.SQLDev=37,3,SQLDev
-Logger.CharDump=38,3,CharDump
-Logger.Load=40,3,Console Server
-Logger.Opcodes=41,6,Console Server
-
-#
-# Loggers
-# Description: List of Loggers to read from config
-# (Using spaces as separator).
-# Default: "Root Chat DBErrors GM RA Warden Character Load"
-
-Loggers=Root Chat DBErrors GM RA Warden Character Load WorldServer Opcodes
+Logger.root=5,Console Server
+Logger.server=3,Console Server
+Logger.commands.gm=3,Console GM
+Logger.sql.sql=5,Console DBErrors
+
+#Logger.achievement=3,Console Server
+#Logger.auctionHouse=3,Console Server
+#Logger.bg.arena=3,Console Server
+#Logger.bg.battlefield=3,Console Server
+#Logger.bg.battleground=3,Console Server
+#Logger.chat.log=3,Console Server
+#Logger.calendar=3,Console Server
+#Logger.chat.system=3,Console Server
+#Logger.cheat=3,Console Server
+#Logger.commands.ra=3,Console Server
+#Logger.condition=3,Console Server
+#Logger.entities.pet=3,Console Server
+#Logger.entities.player.character=3,Console Server
+#Logger.entities.player.dump=3,Console Server
+#Logger.entities.player=3,Console Server
+#Logger.entities.player.items=3,Console Server
+#Logger.entities.player.loading=3,Console Server
+#Logger.entities.player.skills=3,Console Server
+#Logger.entities.transport=3,Console Server
+#Logger.entities.unit=3,Console Server
+#Logger.entities.vehicle=3,Console Server
+#Logger.gameevent=3,Console Server
+#Logger.guild=3,Console Server
+#Logger.lfg=3,Console Server
+#Logger.loot=3,Console Server
+#Logger.maps.script=3,Console Server
+#Logger.maps=3,Console Server
+#Logger.misc=3,Console Server
+#Logger.network=3,Console Server
+#Logger.network.opcode=3,Console Server
+#Logger.network.soap=3,Console Server
+#Logger.outdoorpvp=3,Console Server
+#Logger.pool=3,Console Server
+#Logger.rbac=3,Console Server
+#Logger.scripts=3,Console Server
+#Logger.scripts.ai=3,Console Server
+#Logger.server.authserver=3,Console Server
+#Logger.spells=3,Console Server
+#Logger.sql.dev=3,Console Server
+#Logger.sql.driver=3,Console Server
+#Logger.warden=3,Console Server
#
# Log.Async.Enable
@@ -2832,7 +2790,7 @@ Log.Async.Enable = 0
# PacketSpoof.Policy
# Description: Determines the course of action when packet spoofing is detected.
# Default: 1 - Log + kick
-# 0 - Log only (LOG_FILTER_NETWORKIO)
+# 0 - Log only ("network")
# 2 - Log + kick + ban
PacketSpoof.Policy = 1
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index a44c6f00acb..3dd311c2da5 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
@@ -89,6 +107,12 @@ static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koK
void CreateDir( const std::string& Path )
{
+ if(chdir(Path.c_str()) == 0)
+ {
+ chdir("../");
+ return;
+ }
+
int ret;
#ifdef _WIN32
ret = _mkdir( Path.c_str());
@@ -1028,6 +1052,9 @@ void ExtractDBCFiles(int locale, bool basicLocale)
{
string filename = path;
filename += (iter->c_str() + strlen("DBFilesClient\\"));
+
+ if(FileExists(filename.c_str()))
+ continue;
if (ExtractFile(iter->c_str(), filename))
++count;
diff --git a/src/tools/map_extractor/adt.cpp b/src/tools/map_extractor/adt.cpp
index 30524dbd640..04d1ea9aa45 100644
--- a/src/tools/map_extractor/adt.cpp
+++ b/src/tools/map_extractor/adt.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#define _CRT_SECURE_NO_DEPRECATE
#include "adt.h"
diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h
index 5daf5820c3f..46a517f3e84 100644
--- a/src/tools/map_extractor/adt.h
+++ b/src/tools/map_extractor/adt.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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 ADT_H
#define ADT_H
diff --git a/src/tools/map_extractor/dbcfile.cpp b/src/tools/map_extractor/dbcfile.cpp
index c1cab7ddb2f..0a1aa6a8341 100644
--- a/src/tools/map_extractor/dbcfile.cpp
+++ b/src/tools/map_extractor/dbcfile.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#define _CRT_SECURE_NO_DEPRECATE
#include "dbcfile.h"
diff --git a/src/tools/map_extractor/dbcfile.h b/src/tools/map_extractor/dbcfile.h
index 6862678a73b..8c519a1b745 100644
--- a/src/tools/map_extractor/dbcfile.h
+++ b/src/tools/map_extractor/dbcfile.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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
#include <cassert>
diff --git a/src/tools/map_extractor/loadlib.cpp b/src/tools/map_extractor/loadlib.cpp
index f5b0ac40875..6b103c282b5 100644
--- a/src/tools/map_extractor/loadlib.cpp
+++ b/src/tools/map_extractor/loadlib.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#define _CRT_SECURE_NO_DEPRECATE
#include "loadlib.h"
diff --git a/src/tools/map_extractor/loadlib/loadlib.h b/src/tools/map_extractor/loadlib/loadlib.h
index f32f46c63b9..7fc1f92728d 100644
--- a/src/tools/map_extractor/loadlib/loadlib.h
+++ b/src/tools/map_extractor/loadlib/loadlib.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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 LOAD_LIB_H
#define LOAD_LIB_H
diff --git a/src/tools/map_extractor/mpq_libmpq.cpp b/src/tools/map_extractor/mpq_libmpq.cpp
index 1c1a12e7b85..7f63cebc66e 100644
--- a/src/tools/map_extractor/mpq_libmpq.cpp
+++ b/src/tools/map_extractor/mpq_libmpq.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#include "mpq_libmpq04.h"
#include <deque>
#include <cstdio>
diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h
index a4eaf1d42db..95e87fd7a7a 100644
--- a/src/tools/map_extractor/mpq_libmpq04.h
+++ b/src/tools/map_extractor/mpq_libmpq04.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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 MPQ_H
#define MPQ_H
diff --git a/src/tools/map_extractor/wdt.cpp b/src/tools/map_extractor/wdt.cpp
index ff255145583..cc97c12371e 100644
--- a/src/tools/map_extractor/wdt.cpp
+++ b/src/tools/map_extractor/wdt.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#define _CRT_SECURE_NO_DEPRECATE
#include "wdt.h"
diff --git a/src/tools/map_extractor/wdt.h b/src/tools/map_extractor/wdt.h
index fcee8ac64f2..9d1ca50e6b9 100644
--- a/src/tools/map_extractor/wdt.h
+++ b/src/tools/map_extractor/wdt.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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 WDT_H
#define WDT_H
#include "loadlib.h"
diff --git a/src/tools/mesh_extractor/ADT.cpp b/src/tools/mesh_extractor/ADT.cpp
index 79ece1213d4..a32276f9856 100644
--- a/src/tools/mesh_extractor/ADT.cpp
+++ b/src/tools/mesh_extractor/ADT.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "ADT.h"
#include "DoodadHandler.h"
#include "LiquidHandler.h"
diff --git a/src/tools/mesh_extractor/ADT.h b/src/tools/mesh_extractor/ADT.h
index 6f9973f7cde..e5d27708bfc 100644
--- a/src/tools/mesh_extractor/ADT.h
+++ b/src/tools/mesh_extractor/ADT.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 ADT_H
#define ADT_H
#include "ChunkedData.h"
diff --git a/src/tools/mesh_extractor/Cache.h b/src/tools/mesh_extractor/Cache.h
index 9b3e046fe1e..017b4c53f72 100644
--- a/src/tools/mesh_extractor/Cache.h
+++ b/src/tools/mesh_extractor/Cache.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 CACHE_H
#define CACHE_H
#include <string>
diff --git a/src/tools/mesh_extractor/Chunk.cpp b/src/tools/mesh_extractor/Chunk.cpp
index 4605ae0f0dd..42eb9e14881 100644
--- a/src/tools/mesh_extractor/Chunk.cpp
+++ b/src/tools/mesh_extractor/Chunk.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "Chunk.h"
#include "Utils.h"
diff --git a/src/tools/mesh_extractor/Chunk.h b/src/tools/mesh_extractor/Chunk.h
index f3681a9f576..0641eb1dc3c 100644
--- a/src/tools/mesh_extractor/Chunk.h
+++ b/src/tools/mesh_extractor/Chunk.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 CHUNK_H
#define CHUNK_H
#include "Define.h"
diff --git a/src/tools/mesh_extractor/ChunkedData.cpp b/src/tools/mesh_extractor/ChunkedData.cpp
index f273ef946dd..1330e4b47f9 100644
--- a/src/tools/mesh_extractor/ChunkedData.cpp
+++ b/src/tools/mesh_extractor/ChunkedData.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "ChunkedData.h"
#include "MPQManager.h"
#include "Utils.h"
diff --git a/src/tools/mesh_extractor/ChunkedData.h b/src/tools/mesh_extractor/ChunkedData.h
index 1e1cb17749e..5befdf30dd1 100644
--- a/src/tools/mesh_extractor/ChunkedData.h
+++ b/src/tools/mesh_extractor/ChunkedData.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 CHNK_H
#define CHNK_H
diff --git a/src/tools/mesh_extractor/Constants.h b/src/tools/mesh_extractor/Constants.h
index f2d9e8af8f5..5a89be9fe9c 100644
--- a/src/tools/mesh_extractor/Constants.h
+++ b/src/tools/mesh_extractor/Constants.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 CONSTANTS_H
#define CONSTANTS_H
diff --git a/src/tools/mesh_extractor/ContinentBuilder.cpp b/src/tools/mesh_extractor/ContinentBuilder.cpp
index c90a6e527f7..841d7a608e4 100644
--- a/src/tools/mesh_extractor/ContinentBuilder.cpp
+++ b/src/tools/mesh_extractor/ContinentBuilder.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "ContinentBuilder.h"
#include "TileBuilder.h"
#include "WDT.h"
diff --git a/src/tools/mesh_extractor/ContinentBuilder.h b/src/tools/mesh_extractor/ContinentBuilder.h
index 64d7be49aed..5349b8e1ba5 100644
--- a/src/tools/mesh_extractor/ContinentBuilder.h
+++ b/src/tools/mesh_extractor/ContinentBuilder.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 CONT_BUILDER_H
#define CONT_BUILDER_H
#include <string>
diff --git a/src/tools/mesh_extractor/DBC.cpp b/src/tools/mesh_extractor/DBC.cpp
index 281a11d10dc..9249e320563 100644
--- a/src/tools/mesh_extractor/DBC.cpp
+++ b/src/tools/mesh_extractor/DBC.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 <cstdio>
#include "DBC.h"
#include "Define.h"
diff --git a/src/tools/mesh_extractor/DBC.h b/src/tools/mesh_extractor/DBC.h
index 5ed57754e73..0d3b85d8c78 100644
--- a/src/tools/mesh_extractor/DBC.h
+++ b/src/tools/mesh_extractor/DBC.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 DBC_H
#define DBC_H
#include <vector>
diff --git a/src/tools/mesh_extractor/DoodadHandler.cpp b/src/tools/mesh_extractor/DoodadHandler.cpp
index 72c051500e1..2e0743134d4 100644
--- a/src/tools/mesh_extractor/DoodadHandler.cpp
+++ b/src/tools/mesh_extractor/DoodadHandler.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "DoodadHandler.h"
#include "Chunk.h"
#include "Cache.h"
diff --git a/src/tools/mesh_extractor/DoodadHandler.h b/src/tools/mesh_extractor/DoodadHandler.h
index 51377f32d01..c3a8d645016 100644
--- a/src/tools/mesh_extractor/DoodadHandler.h
+++ b/src/tools/mesh_extractor/DoodadHandler.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 DOOADHNDL_H
#define DOOADHNDL_H
#include "ObjectDataHandler.h"
diff --git a/src/tools/mesh_extractor/Geometry.cpp b/src/tools/mesh_extractor/Geometry.cpp
index df828dcd573..0c7b7a492c5 100644
--- a/src/tools/mesh_extractor/Geometry.cpp
+++ b/src/tools/mesh_extractor/Geometry.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "Geometry.h"
#include "Constants.h"
#include "ADT.h"
diff --git a/src/tools/mesh_extractor/Geometry.h b/src/tools/mesh_extractor/Geometry.h
index e445234dd12..f2ea43e381e 100644
--- a/src/tools/mesh_extractor/Geometry.h
+++ b/src/tools/mesh_extractor/Geometry.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 GEOMETRY_H
#define GEOMETRY_H
#include <vector>
diff --git a/src/tools/mesh_extractor/LiquidHandler.cpp b/src/tools/mesh_extractor/LiquidHandler.cpp
index 33a661a9adf..eef36d8ea92 100644
--- a/src/tools/mesh_extractor/LiquidHandler.cpp
+++ b/src/tools/mesh_extractor/LiquidHandler.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "LiquidHandler.h"
#include "Utils.h"
diff --git a/src/tools/mesh_extractor/LiquidHandler.h b/src/tools/mesh_extractor/LiquidHandler.h
index 41e128ba20b..c053b621088 100644
--- a/src/tools/mesh_extractor/LiquidHandler.h
+++ b/src/tools/mesh_extractor/LiquidHandler.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 LIQUID_H
#define LIQUID_H
#include "ADT.h"
diff --git a/src/tools/mesh_extractor/MPQ.cpp b/src/tools/mesh_extractor/MPQ.cpp
index 896d7bc32ac..5a2957cac0b 100644
--- a/src/tools/mesh_extractor/MPQ.cpp
+++ b/src/tools/mesh_extractor/MPQ.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "MPQ.h"
#include "MPQManager.h"
#include <deque>
diff --git a/src/tools/mesh_extractor/MPQ.h b/src/tools/mesh_extractor/MPQ.h
index 30e11741550..17dbe74dcaa 100644
--- a/src/tools/mesh_extractor/MPQ.h
+++ b/src/tools/mesh_extractor/MPQ.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 MPQ_H
#define MPQ_H
diff --git a/src/tools/mesh_extractor/MPQManager.cpp b/src/tools/mesh_extractor/MPQManager.cpp
index 4d3ab808a2e..8954da6c154 100644
--- a/src/tools/mesh_extractor/MPQManager.cpp
+++ b/src/tools/mesh_extractor/MPQManager.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "MPQManager.h"
#include "MPQ.h"
#include "DBC.h"
diff --git a/src/tools/mesh_extractor/MPQManager.h b/src/tools/mesh_extractor/MPQManager.h
index 7f9d675c4d4..6172237df49 100644
--- a/src/tools/mesh_extractor/MPQManager.h
+++ b/src/tools/mesh_extractor/MPQManager.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 MPQ_MANAGER_H
#define MPQ_MANAGER_H
diff --git a/src/tools/mesh_extractor/MapChunk.cpp b/src/tools/mesh_extractor/MapChunk.cpp
index 789166d5c9b..4cd5afad3f1 100644
--- a/src/tools/mesh_extractor/MapChunk.cpp
+++ b/src/tools/mesh_extractor/MapChunk.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "MapChunk.h"
#include "ADT.h"
#include "LiquidHandler.h"
diff --git a/src/tools/mesh_extractor/MapChunk.h b/src/tools/mesh_extractor/MapChunk.h
index e7d835ae0e3..95bce9ffcd6 100644
--- a/src/tools/mesh_extractor/MapChunk.h
+++ b/src/tools/mesh_extractor/MapChunk.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 MAPCHUNK_H
#define MAPCHUNK_H
#include "Chunk.h"
diff --git a/src/tools/mesh_extractor/MeshExtractor.cpp b/src/tools/mesh_extractor/MeshExtractor.cpp
index 0d9160a610b..e60e11b1db8 100644
--- a/src/tools/mesh_extractor/MeshExtractor.cpp
+++ b/src/tools/mesh_extractor/MeshExtractor.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "MPQManager.h"
#include "WDT.h"
#include "ContinentBuilder.h"
diff --git a/src/tools/mesh_extractor/Model.cpp b/src/tools/mesh_extractor/Model.cpp
index 5fb521d5a36..2a1a80f41eb 100644
--- a/src/tools/mesh_extractor/Model.cpp
+++ b/src/tools/mesh_extractor/Model.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "Model.h"
#include "MPQManager.h"
#include "Utils.h"
diff --git a/src/tools/mesh_extractor/Model.h b/src/tools/mesh_extractor/Model.h
index ed8627dad6f..a1f224729dd 100644
--- a/src/tools/mesh_extractor/Model.h
+++ b/src/tools/mesh_extractor/Model.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 MODEL_H
#define MODEL_H
#include <vector>
diff --git a/src/tools/mesh_extractor/ObjectDataHandler.cpp b/src/tools/mesh_extractor/ObjectDataHandler.cpp
index f98d198eecd..0e06a9f7e56 100644
--- a/src/tools/mesh_extractor/ObjectDataHandler.cpp
+++ b/src/tools/mesh_extractor/ObjectDataHandler.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "ObjectDataHandler.h"
#include "Chunk.h"
#include "ADT.h"
diff --git a/src/tools/mesh_extractor/ObjectDataHandler.h b/src/tools/mesh_extractor/ObjectDataHandler.h
index 9b347ef418a..3b18427db47 100644
--- a/src/tools/mesh_extractor/ObjectDataHandler.h
+++ b/src/tools/mesh_extractor/ObjectDataHandler.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 ODATA_HNDL_H
#define ODATA_HNDL_H
#include "ADT.h"
diff --git a/src/tools/mesh_extractor/TileBuilder.cpp b/src/tools/mesh_extractor/TileBuilder.cpp
index 51df91d2652..7b70ccca44c 100644
--- a/src/tools/mesh_extractor/TileBuilder.cpp
+++ b/src/tools/mesh_extractor/TileBuilder.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "ContinentBuilder.h"
#include "TileBuilder.h"
#include "Geometry.h"
diff --git a/src/tools/mesh_extractor/TileBuilder.h b/src/tools/mesh_extractor/TileBuilder.h
index 165b3594ed6..fb8950c552b 100644
--- a/src/tools/mesh_extractor/TileBuilder.h
+++ b/src/tools/mesh_extractor/TileBuilder.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 TILE_BUILD_H
#define TILE_BUILD_H
#include <string>
diff --git a/src/tools/mesh_extractor/Utils.cpp b/src/tools/mesh_extractor/Utils.cpp
index 24cfb5cd1db..f82eb6ed1c8 100644
--- a/src/tools/mesh_extractor/Utils.cpp
+++ b/src/tools/mesh_extractor/Utils.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "Utils.h"
#include "WorldModelHandler.h"
#include "Constants.h"
diff --git a/src/tools/mesh_extractor/Utils.h b/src/tools/mesh_extractor/Utils.h
index d6bb421a633..612282f3e8f 100644
--- a/src/tools/mesh_extractor/Utils.h
+++ b/src/tools/mesh_extractor/Utils.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 UTILS_H
#define UTILS_H
#include <cstdio>
diff --git a/src/tools/mesh_extractor/WDT.cpp b/src/tools/mesh_extractor/WDT.cpp
index 2a5a18c9848..07aec95365e 100644
--- a/src/tools/mesh_extractor/WDT.cpp
+++ b/src/tools/mesh_extractor/WDT.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "WDT.h"
#include "Chunk.h"
#include "ChunkedData.h"
diff --git a/src/tools/mesh_extractor/WDT.h b/src/tools/mesh_extractor/WDT.h
index ce8a97fff00..d1e8e30918d 100644
--- a/src/tools/mesh_extractor/WDT.h
+++ b/src/tools/mesh_extractor/WDT.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 WDT_H
#define WDT_H
#include <string>
diff --git a/src/tools/mesh_extractor/WorldModelGroup.cpp b/src/tools/mesh_extractor/WorldModelGroup.cpp
index f76df73aaa6..6ea72d6edbe 100644
--- a/src/tools/mesh_extractor/WorldModelGroup.cpp
+++ b/src/tools/mesh_extractor/WorldModelGroup.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "WorldModelGroup.h"
#include "ChunkedData.h"
#include "Chunk.h"
diff --git a/src/tools/mesh_extractor/WorldModelGroup.h b/src/tools/mesh_extractor/WorldModelGroup.h
index e4fe34cbc75..b3c2c2bd940 100644
--- a/src/tools/mesh_extractor/WorldModelGroup.h
+++ b/src/tools/mesh_extractor/WorldModelGroup.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 WMOGROUP_H
#define WMOGROUP_H
#include "ChunkedData.h"
diff --git a/src/tools/mesh_extractor/WorldModelHandler.cpp b/src/tools/mesh_extractor/WorldModelHandler.cpp
index 3565a1d6af0..7c0acbc38e4 100644
--- a/src/tools/mesh_extractor/WorldModelHandler.cpp
+++ b/src/tools/mesh_extractor/WorldModelHandler.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "WorldModelHandler.h"
#include "WorldModelRoot.h"
#include "Chunk.h"
diff --git a/src/tools/mesh_extractor/WorldModelHandler.h b/src/tools/mesh_extractor/WorldModelHandler.h
index 87a5ad62938..dd030e4521f 100644
--- a/src/tools/mesh_extractor/WorldModelHandler.h
+++ b/src/tools/mesh_extractor/WorldModelHandler.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 WMODEL_HNDL_H
#define WMODEL_HNDL_H
#include "Define.h"
diff --git a/src/tools/mesh_extractor/WorldModelRoot.cpp b/src/tools/mesh_extractor/WorldModelRoot.cpp
index a00506f3b16..4b6e4e189a4 100644
--- a/src/tools/mesh_extractor/WorldModelRoot.cpp
+++ b/src/tools/mesh_extractor/WorldModelRoot.cpp
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 "WorldModelRoot.h"
#include "ChunkedData.h"
#include "Utils.h"
diff --git a/src/tools/mesh_extractor/WorldModelRoot.h b/src/tools/mesh_extractor/WorldModelRoot.h
index ad2e15b36d5..c2303ceafe4 100644
--- a/src/tools/mesh_extractor/WorldModelRoot.h
+++ b/src/tools/mesh_extractor/WorldModelRoot.h
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2008-2013 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 WMOROOT_H
#define WMOROOT_H
#include <string>
diff --git a/src/tools/mmaps_generator/PathGenerator.cpp b/src/tools/mmaps_generator/PathGenerator.cpp
index 882ec7ffb66..8ccd04f4924 100644
--- a/src/tools/mmaps_generator/PathGenerator.cpp
+++ b/src/tools/mmaps_generator/PathGenerator.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 "PathCommon.h"
diff --git a/src/tools/vmap4_assembler/VMapAssembler.cpp b/src/tools/vmap4_assembler/VMapAssembler.cpp
index 4ee6f5fce3c..56368e4a78d 100644
--- a/src/tools/vmap4_assembler/VMapAssembler.cpp
+++ b/src/tools/vmap4_assembler/VMapAssembler.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#include <string>
#include <iostream>
diff --git a/src/tools/vmap4_extractor/adtfile.cpp b/src/tools/vmap4_extractor/adtfile.cpp
index 56e62d474d1..82f26afbdc2 100644
--- a/src/tools/vmap4_extractor/adtfile.cpp
+++ b/src/tools/vmap4_extractor/adtfile.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 "vmapexport.h"
diff --git a/src/tools/vmap4_extractor/adtfile.h b/src/tools/vmap4_extractor/adtfile.h
index 3de1dccfacd..88693659e52 100644
--- a/src/tools/vmap4_extractor/adtfile.h
+++ b/src/tools/vmap4_extractor/adtfile.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 ADT_H
diff --git a/src/tools/vmap4_extractor/dbcfile.cpp b/src/tools/vmap4_extractor/dbcfile.cpp
index a651456d916..c96174bae59 100644
--- a/src/tools/vmap4_extractor/dbcfile.cpp
+++ b/src/tools/vmap4_extractor/dbcfile.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 "dbcfile.h"
diff --git a/src/tools/vmap4_extractor/dbcfile.h b/src/tools/vmap4_extractor/dbcfile.h
index 56cce9a521c..0e58c942919 100644
--- a/src/tools/vmap4_extractor/dbcfile.h
+++ b/src/tools/vmap4_extractor/dbcfile.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 DBCFILE_H
diff --git a/src/tools/vmap4_extractor/gameobject_extract.cpp b/src/tools/vmap4_extractor/gameobject_extract.cpp
index 30cedfe7987..73bd2f77d18 100644
--- a/src/tools/vmap4_extractor/gameobject_extract.cpp
+++ b/src/tools/vmap4_extractor/gameobject_extract.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#include "model.h"
#include "dbcfile.h"
#include "adtfile.h"
diff --git a/src/tools/vmap4_extractor/loadlib/loadlib.h b/src/tools/vmap4_extractor/loadlib/loadlib.h
index 61865c4b436..2d95cfb3bd1 100644
--- a/src/tools/vmap4_extractor/loadlib/loadlib.h
+++ b/src/tools/vmap4_extractor/loadlib/loadlib.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 LOAD_LIB_H
diff --git a/src/tools/vmap4_extractor/model.cpp b/src/tools/vmap4_extractor/model.cpp
index 919bf6a9610..2a8417bafc1 100644
--- a/src/tools/vmap4_extractor/model.cpp
+++ b/src/tools/vmap4_extractor/model.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 "vmapexport.h"
diff --git a/src/tools/vmap4_extractor/model.h b/src/tools/vmap4_extractor/model.h
index 9dcea722c3b..66e42bd7947 100644
--- a/src/tools/vmap4_extractor/model.h
+++ b/src/tools/vmap4_extractor/model.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 MODEL_H
diff --git a/src/tools/vmap4_extractor/modelheaders.h b/src/tools/vmap4_extractor/modelheaders.h
index d859fd3511e..e0a6c46ca17 100644
--- a/src/tools/vmap4_extractor/modelheaders.h
+++ b/src/tools/vmap4_extractor/modelheaders.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 MODELHEADERS_H
diff --git a/src/tools/vmap4_extractor/mpq_libmpq.cpp b/src/tools/vmap4_extractor/mpq_libmpq.cpp
index ffa097d9a22..b06470d3c80 100644
--- a/src/tools/vmap4_extractor/mpq_libmpq.cpp
+++ b/src/tools/vmap4_extractor/mpq_libmpq.cpp
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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/>.
+ */
+
#include "mpq_libmpq04.h"
#include <deque>
#include <cstdio>
diff --git a/src/tools/vmap4_extractor/mpq_libmpq04.h b/src/tools/vmap4_extractor/mpq_libmpq04.h
index 8986ca4e0c8..87321912135 100644
--- a/src/tools/vmap4_extractor/mpq_libmpq04.h
+++ b/src/tools/vmap4_extractor/mpq_libmpq04.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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 MPQ_H
#define MPQ_H
diff --git a/src/tools/vmap4_extractor/vec3d.h b/src/tools/vmap4_extractor/vec3d.h
index 06a5b730f16..59150229ac7 100644
--- a/src/tools/vmap4_extractor/vec3d.h
+++ b/src/tools/vmap4_extractor/vec3d.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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 VEC3D_H
#define VEC3D_H
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index 82270cfaa50..a5173638df4 100644
--- a/src/tools/vmap4_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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/>.
*/
#define _CRT_SECURE_NO_DEPRECATE
diff --git a/src/tools/vmap4_extractor/vmapexport.h b/src/tools/vmap4_extractor/vmapexport.h
index 0381011efb7..e9436eb7d0d 100644
--- a/src/tools/vmap4_extractor/vmapexport.h
+++ b/src/tools/vmap4_extractor/vmapexport.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 VMAPEXPORT_H
diff --git a/src/tools/vmap4_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp
index d9216fd77eb..87e63f201e6 100644
--- a/src/tools/vmap4_extractor/wdtfile.cpp
+++ b/src/tools/vmap4_extractor/wdtfile.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 "vmapexport.h"
diff --git a/src/tools/vmap4_extractor/wdtfile.h b/src/tools/vmap4_extractor/wdtfile.h
index 5d6aed8f0bc..af0979e981b 100644
--- a/src/tools/vmap4_extractor/wdtfile.h
+++ b/src/tools/vmap4_extractor/wdtfile.h
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2011 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 WDTFILE_H
#define WDTFILE_H
diff --git a/src/tools/vmap4_extractor/wmo.cpp b/src/tools/vmap4_extractor/wmo.cpp
index 25a65f87e2c..e4e66c682b3 100644
--- a/src/tools/vmap4_extractor/wmo.cpp
+++ b/src/tools/vmap4_extractor/wmo.cpp
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 "vmapexport.h"
diff --git a/src/tools/vmap4_extractor/wmo.h b/src/tools/vmap4_extractor/wmo.h
index fe6cef03655..493c84f422f 100644
--- a/src/tools/vmap4_extractor/wmo.h
+++ b/src/tools/vmap4_extractor/wmo.h
@@ -1,19 +1,19 @@
/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2011 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 WMO_H