aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/authserver/Main.cpp54
-rw-r--r--src/server/authserver/Realms/RealmList.cpp4
-rw-r--r--src/server/authserver/Server/AuthSocket.cpp94
-rw-r--r--src/server/authserver/Server/RealmAcceptor.h4
-rw-r--r--src/server/authserver/Server/RealmSocket.cpp2
-rw-r--r--src/server/collision/DynamicTree.cpp6
-rw-r--r--src/server/collision/Management/MMapManager.cpp46
-rw-r--r--src/server/collision/Management/VMapManager2.cpp8
-rw-r--r--src/server/collision/Maps/MapTree.cpp26
-rw-r--r--src/server/collision/Models/GameObjectModel.cpp8
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.cpp6
-rw-r--r--src/server/game/AI/CoreAI/GuardAI.cpp2
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp4
-rw-r--r--src/server/game/AI/CreatureAI.cpp6
-rw-r--r--src/server/game/AI/CreatureAISelector.cpp4
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.cpp8
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp36
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp20
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp10
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp156
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h4
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp124
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h28
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp26
-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.cpp140
-rw-r--r--src/server/game/Addons/AddonMgr.cpp6
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp38
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp24
-rw-r--r--src/server/game/Battlefield/BattlefieldMgr.cpp16
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp4
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.h2
-rw-r--r--src/server/game/Battlegrounds/ArenaTeam.cpp28
-rw-r--r--src/server/game/Battlegrounds/ArenaTeamMgr.cpp6
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp52
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp32
-rw-r--r--src/server/game/Battlegrounds/BattlegroundQueue.cpp30
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp8
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp112
-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.cpp22
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp24
-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.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp6
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp18
-rw-r--r--src/server/game/Calendar/CalendarMgr.cpp8
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp10
-rw-r--r--src/server/game/Chat/Chat.cpp8
-rw-r--r--src/server/game/Chat/ChatLink.cpp100
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp322
-rw-r--r--src/server/game/Conditions/DisableMgr.cpp64
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp10
-rw-r--r--src/server/game/DataStores/DBCStores.cpp12
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp114
-rw-r--r--src/server/game/DungeonFinding/LFGQueue.cpp42
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp16
-rw-r--r--src/server/game/Entities/AreaTrigger/AreaTrigger.cpp2
-rw-r--r--src/server/game/Entities/Corpse/Corpse.cpp6
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp50
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.cpp24
-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/DynamicObject/DynamicObject.cpp2
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp28
-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.cpp6
-rw-r--r--src/server/game/Entities/Object/Object.cpp62
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp30
-rw-r--r--src/server/game/Entities/Player/Player.cpp606
-rw-r--r--src/server/game/Entities/Player/SocialMgr.cpp2
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp20
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp216
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.cpp22
-rw-r--r--src/server/game/Events/GameEventMgr.cpp182
-rw-r--r--src/server/game/Globals/ObjectAccessor.cpp6
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp1098
-rw-r--r--src/server/game/Globals/ObjectMgr.h8
-rw-r--r--src/server/game/Grids/GridStates.cpp8
-rw-r--r--src/server/game/Grids/ObjectGridLoader.cpp4
-rw-r--r--src/server/game/Groups/Group.cpp14
-rw-r--r--src/server/game/Groups/GroupMgr.cpp26
-rw-r--r--src/server/game/Guilds/Guild.cpp92
-rw-r--r--src/server/game/Guilds/GuildFinderMgr.cpp12
-rw-r--r--src/server/game/Guilds/GuildMgr.cpp78
-rw-r--r--src/server/game/Handlers/AddonHandler.cpp6
-rw-r--r--src/server/game/Handlers/ArenaTeamHandler.cpp30
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp44
-rw-r--r--src/server/game/Handlers/BattleGroundHandler.cpp76
-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.cpp76
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp20
-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.cpp50
-rw-r--r--src/server/game/Handlers/GuildFinderHandler.cpp16
-rw-r--r--src/server/game/Handlers/GuildHandler.cpp72
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp96
-rw-r--r--src/server/game/Handlers/LFGHandler.cpp56
-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.cpp208
-rw-r--r--src/server/game/Handlers/MovementHandler.cpp38
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp58
-rw-r--r--src/server/game/Handlers/PetHandler.cpp60
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp60
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp30
-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.cpp32
-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/Handlers/VoidStorageHandler.cpp36
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp18
-rw-r--r--src/server/game/Instances/InstanceScript.cpp16
-rw-r--r--src/server/game/Instances/InstanceScript.h10
-rw-r--r--src/server/game/Loot/LootMgr.cpp100
-rw-r--r--src/server/game/Mails/Mail.cpp2
-rw-r--r--src/server/game/Maps/Map.cpp150
-rw-r--r--src/server/game/Maps/MapInstanced.cpp8
-rw-r--r--src/server/game/Maps/MapManager.cpp12
-rw-r--r--src/server/game/Maps/TransportMgr.cpp12
-rw-r--r--src/server/game/Miscellaneous/Formulas.h2
-rw-r--r--src/server/game/Movement/MotionMaster.cpp64
-rwxr-xr-xsrc/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp10
-rw-r--r--src/server/game/Movement/MovementStructures.cpp2
-rw-r--r--src/server/game/Movement/PathGenerator.cpp38
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp6
-rw-r--r--src/server/game/Movement/Waypoints/WaypointManager.cpp4
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp12
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp20
-rw-r--r--src/server/game/Pools/PoolMgr.cpp82
-rw-r--r--src/server/game/Reputation/ReputationMgr.cpp4
-rw-r--r--src/server/game/Scripting/MapScripts.cpp102
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp16
-rw-r--r--src/server/game/Scripting/ScriptMgr.h2
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp10
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp6
-rw-r--r--src/server/game/Server/WorldPacket.cpp12
-rw-r--r--src/server/game/Server/WorldSession.cpp76
-rw-r--r--src/server/game/Server/WorldSocket.cpp66
-rw-r--r--src/server/game/Server/WorldSocketAcceptor.h4
-rw-r--r--src/server/game/Server/WorldSocketMgr.cpp18
-rw-r--r--src/server/game/Skills/SkillDiscovery.cpp16
-rw-r--r--src/server/game/Skills/SkillExtraItems.cpp12
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp52
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp16
-rw-r--r--src/server/game/Spells/Spell.cpp80
-rw-r--r--src/server/game/Spells/SpellEffects.cpp72
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
-rw-r--r--src/server/game/Spells/SpellMgr.cpp238
-rw-r--r--src/server/game/Spells/SpellScript.cpp96
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp24
-rw-r--r--src/server/game/Tickets/TicketMgr.cpp6
-rw-r--r--src/server/game/Tools/CharacterDatabaseCleaner.cpp6
-rw-r--r--src/server/game/Tools/PlayerDump.cpp8
-rw-r--r--src/server/game/Warden/Warden.cpp18
-rw-r--r--src/server/game/Warden/WardenCheckMgr.cpp16
-rw-r--r--src/server/game/Warden/WardenMac.cpp30
-rw-r--r--src/server/game/Warden/WardenWin.cpp72
-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.cpp504
-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_misc.cpp4
-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.cpp182
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.h2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp2
-rw-r--r--src/server/scripts/Examples/example_spell.cpp46
-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/instance_hyjal.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp20
-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.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp6
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/instance_steam_vault.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp6
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp2
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp2
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp4
-rw-r--r--src/server/scripts/World/chat_log.cpp42
-rw-r--r--src/server/scripts/World/go_scripts.cpp2
-rw-r--r--src/server/scripts/World/npc_professions.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp8
-rw-r--r--src/server/shared/DataStores/DBCStore.h10
-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/MySQLConnection.cpp60
-rw-r--r--src/server/shared/Database/MySQLThreading.h4
-rw-r--r--src/server/shared/Database/PreparedStatement.cpp6
-rw-r--r--src/server/shared/Database/QueryHolder.cpp8
-rw-r--r--src/server/shared/Database/QueryResult.cpp4
-rw-r--r--src/server/shared/Logging/AppenderDB.cpp2
-rw-r--r--src/server/shared/Logging/Log.cpp8
-rw-r--r--src/server/shared/Logging/Log.h47
-rw-r--r--src/server/shared/Packets/ByteBuffer.cpp12
-rw-r--r--src/server/shared/Utilities/ServiceWin32.cpp2
-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.dist2
-rw-r--r--src/tools/map_extractor/System.cpp2
240 files changed, 4476 insertions, 4523 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/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index 4312548116a..15077dc920d 100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -211,12 +211,12 @@ 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
@@ -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;
}
@@ -1159,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 acefa4b1af7..13bc71f99a4 100644
--- a/src/server/authserver/Server/RealmSocket.cpp
+++ b/src/server/authserver/Server/RealmSocket.cpp
@@ -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/collision/DynamicTree.cpp b/src/server/collision/DynamicTree.cpp
index 4b2878169d7..2f4985757db 100644
--- a/src/server/collision/DynamicTree.cpp
+++ b/src/server/collision/DynamicTree.cpp
@@ -163,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/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/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/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp
index d20c572cf71..8cb1e3d7064 100644
--- a/src/server/collision/Maps/MapTree.cpp
+++ b/src/server/collision/Maps/MapTree.cpp
@@ -57,7 +57,7 @@ namespace VMAP
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);
}
@@ -73,7 +73,7 @@ namespace VMAP
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/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp
index fee165ef44a..8bba2cf1b1b 100644
--- a/src/server/collision/Models/GameObjectModel.cpp
+++ b/src/server/collision/Models/GameObjectModel.cpp
@@ -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/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index 3ad52aedb34..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;
@@ -321,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)
diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp
index 188ad4fb450..c38be3aa22a 100644
--- a/src/server/game/AI/CoreAI/GuardAI.cpp
+++ b/src/server/game/AI/CoreAI/GuardAI.cpp
@@ -56,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/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/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/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp
index 203ee37edb3..ec2d3687f5f 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,7 +142,7 @@ 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/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
index b1f5ede0a1f..9fa7ea2f870 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -159,7 +159,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 +252,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 +300,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 +433,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;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index a21e7787197..ca4b06742ef 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -176,7 +176,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 +217,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 +228,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 +244,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 +253,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 +271,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 +309,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 +319,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 +329,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 +402,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 +420,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 +439,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 +455,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 +472,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/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index a5176644f34..41b6c962471 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -166,7 +166,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 +192,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 +203,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 +232,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 +275,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 +297,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 +306,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 +325,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 +334,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/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 4ec0a3e52f2..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;
@@ -855,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;
}
@@ -934,7 +934,7 @@ class SmartTrigger : public AreaTriggerScript
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/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index e22d7e3cd40..0cb68e2fd05 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())
{
@@ -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;
@@ -548,11 +548,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
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",
+ 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(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;
@@ -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);
}
@@ -792,7 +792,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
else
(*itr)->ToUnit()->RemoveAurasDueToSpell(e.action.removeAura.spell);
- 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);
}
@@ -813,7 +813,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
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;
@@ -1466,7 +1466,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;
}
@@ -1592,7 +1592,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;
}
@@ -1691,7 +1691,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
(*itr)->ToUnit()->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()));
}
}
@@ -1725,7 +1725,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;
}
@@ -1755,7 +1755,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;
}
@@ -1968,14 +1968,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");
}
}
@@ -1987,7 +1987,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);
@@ -2034,7 +2034,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");
}
}
@@ -2158,7 +2158,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);
@@ -2169,14 +2169,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;
}
@@ -2186,7 +2186,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);
}
}
@@ -2207,7 +2207,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;
@@ -2460,7 +2460,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;
}
@@ -2475,7 +2475,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;
}
@@ -2984,7 +2984,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);
@@ -3076,7 +3076,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;
}
}
@@ -3250,9 +3250,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)
@@ -3276,9 +3276,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()
@@ -3314,26 +3314,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;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index b1b9f4d6725..e320e122d0f 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;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 778cd8da31c..27adb44f452 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);
+ sLog->outError("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: There is a summon spell for creature entry %u (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: There is a summon spell for gameobject entry %u (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 7e082f9b8ff..07e700ddb46 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1363,7 +1363,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;
}
}
@@ -1379,7 +1379,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;
@@ -1389,7 +1389,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;
@@ -1399,7 +1399,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;
@@ -1409,7 +1409,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;
@@ -1419,7 +1419,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;
@@ -1429,7 +1429,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;
@@ -1439,7 +1439,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;
@@ -1449,7 +1449,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;
@@ -1459,7 +1459,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;
@@ -1469,7 +1469,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;
@@ -1479,7 +1479,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;
@@ -1489,7 +1489,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;
@@ -1499,7 +1499,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 46c5abe411e..b80df5018e4 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -390,17 +390,17 @@ void AccountMgr::LoadRBAC()
{
ClearRBAC();
- TC_LOG_DEBUG(LOG_FILTER_RBAC, "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;
}
@@ -413,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;
}
@@ -437,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);
@@ -445,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;
}
@@ -470,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)
@@ -506,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;
@@ -518,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;
}
@@ -526,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;
}
@@ -542,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 c0e63b93358..1f55ebd4996 100644
--- a/src/server/game/Accounts/RBAC.h
+++ b/src/server/game/Accounts/RBAC.h
@@ -790,7 +790,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);
@@ -813,7 +813,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);
@@ -837,7 +837,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 f0c68f2dcae..bdbe472bd10 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -76,7 +76,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;
}
@@ -109,7 +109,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->type);
+ TC_LOG_ERROR("sql.sql", "Table `achievement_criteria_data` has data for non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->type);
return false;
}
break;
@@ -123,7 +123,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->type, dataType, creature.id);
return false;
}
@@ -131,19 +131,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_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_T_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_T_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.",
criteria->ID, criteria->type, 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_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->type, 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->type, dataType, classRace.race_id);
return false;
}
@@ -151,7 +151,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->type, dataType, health.percent);
return false;
}
@@ -162,19 +162,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->type, (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->type, (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->type, (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;
}
@@ -183,7 +183,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->type, dataType, value.compType);
return false;
}
@@ -191,7 +191,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->type, dataType, level.minlevel);
return false;
}
@@ -199,7 +199,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->type, dataType, gender.gender);
return false;
}
@@ -207,7 +207,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->type, dataType);
return false;
}
@@ -215,7 +215,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->type, dataType, map_players.maxcount);
return false;
}
@@ -223,7 +223,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->type, dataType, team.team);
return false;
}
@@ -231,7 +231,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->type, dataType, drunk.state);
return false;
}
@@ -239,7 +239,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->type, dataType, holiday.id);
return false;
}
@@ -249,7 +249,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->type, dataType, equipped_item.item_quality);
return false;
}
@@ -257,25 +257,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->type, 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->type, 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->type, 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->type, 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->type, dataType);
return false;
}
}
@@ -352,14 +352,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;
}
@@ -465,7 +465,7 @@ void AchievementMgr<Guild>::RemoveCriteriaProgress(AchievementCriteriaEntry cons
template<class T>
void AchievementMgr<T>::ResetAchievementCriteria(AchievementCriteriaTypes type, uint64 miscValue1, uint64 miscValue2, bool evenIfCriteriaComplete)
{
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "ResetAchievementCriteria(%u, " UI64FMTD ", " UI64FMTD ")", type, miscValue1, miscValue2);
+ TC_LOG_DEBUG("achievement", "ResetAchievementCriteria(%u, " UI64FMTD ", " UI64FMTD ")", type, miscValue1, miscValue2);
// disable for gamemasters with GM-mode enabled
if (GetOwner()->IsGameMaster())
@@ -693,7 +693,7 @@ void AchievementMgr<Player>::LoadFromDB(PreparedQueryResult achievementResult, P
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);
stmt->setUInt16(0, uint16(id));
@@ -757,7 +757,7 @@ void AchievementMgr<Guild>::LoadFromDB(PreparedQueryResult achievementResult, Pr
if (!criteria)
{
// we will remove not existed criteria for all guilds
- TC_LOG_ERROR(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement criteria %u data removed from table `guild_achievement_progress`.", id);
+ TC_LOG_ERROR("achievement", "Non-existing achievement criteria %u data removed from table `guild_achievement_progress`.", id);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEV_PROGRESS_CRITERIA_GUILD);
stmt->setUInt16(0, uint16(id));
@@ -852,7 +852,7 @@ void AchievementMgr<T>::SendAchievementEarned(AchievementEntry const* achievemen
if (achievement->flags & ACHIEVEMENT_FLAG_HIDDEN)
return;
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::SendAchievementEarned(%u)", achievement->ID);
+ TC_LOG_DEBUG("achievement", "AchievementMgr::SendAchievementEarned(%u)", achievement->ID);
if (Guild* guild = sGuildMgr->GetGuildById(GetOwner()->GetGuildId()))
{
@@ -1038,25 +1038,25 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type,
{
if (type >= ACHIEVEMENT_CRITERIA_TYPE_TOTAL)
{
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "UpdateAchievementCriteria: Wrong criteria type %u", type);
+ TC_LOG_DEBUG("achievement", "UpdateAchievementCriteria: Wrong criteria type %u", type);
return;
}
if (!referencePlayer)
{
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "UpdateAchievementCriteria: Player is NULL! Cant update criteria");
+ TC_LOG_DEBUG("achievement", "UpdateAchievementCriteria: Player is NULL! Cant update criteria");
return;
}
// disable for gamemasters with GM-mode enabled
if (referencePlayer->IsGameMaster())
{
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "UpdateAchievementCriteria: [Player %s GM mode on] %s, %s (%u), " UI64FMTD ", " UI64FMTD ", " UI64FMTD
+ TC_LOG_DEBUG("achievement", "UpdateAchievementCriteria: [Player %s GM mode on] %s, %s (%u), " UI64FMTD ", " UI64FMTD ", " UI64FMTD
, referencePlayer->GetName().c_str(), GetLogNameForGuid(GetOwner()->GetGUID()), AchievementGlobalMgr::GetCriteriaTypeString(type), type, miscValue1, miscValue2, miscValue3);
return;
}
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "UpdateAchievementCriteria: %s, %s (%u), " UI64FMTD ", " UI64FMTD ", " UI64FMTD
+ TC_LOG_DEBUG("achievement", "UpdateAchievementCriteria: %s, %s (%u), " UI64FMTD ", " UI64FMTD ", " UI64FMTD
, GetLogNameForGuid(GetOwner()->GetGUID()), AchievementGlobalMgr::GetCriteriaTypeString(type), type, miscValue1, miscValue2, miscValue3);
// Lua_GetGuildLevelEnabled() is checked in achievement UI to display guild tab
@@ -1070,7 +1070,7 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type,
AchievementEntry const* achievement = sAchievementMgr->GetAchievement(achievementCriteria->achievement);
if (!achievement)
{
- TC_LOG_ERROR(LOG_FILTER_ACHIEVEMENTSYS, "UpdateAchievementCriteria: Achievement %u not found!", achievementCriteria->achievement);
+ TC_LOG_ERROR("achievement", "UpdateAchievementCriteria: Achievement %u not found!", achievementCriteria->achievement);
continue;
}
@@ -1663,7 +1663,7 @@ void AchievementMgr<T>::SetCriteriaProgress(AchievementCriteriaEntry const* entr
if (entry->timeLimit && timedIter == m_timedAchievements.end())
return;
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "SetCriteriaProgress(%u, " UI64FMTD ") for (%s GUID: %u)",
+ TC_LOG_DEBUG("achievement", "SetCriteriaProgress(%u, " UI64FMTD ") for (%s GUID: %u)",
entry->ID, changeValue, GetLogNameForGuid(GetOwner()->GetGUID()), GUID_LOPART(GetOwner()->GetGUID()));
CriteriaProgress* progress = GetCriteriaProgress(entry);
@@ -1818,7 +1818,7 @@ void AchievementMgr<Player>::CompletedAchievement(AchievementEntry const* achiev
if (!GetOwner()->GetSession()->PlayerLoading())
SendAchievementEarned(achievement);
- TC_LOG_INFO(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::CompletedAchievement(%u). Player: %s (%u)",
+ TC_LOG_INFO("achievement", "AchievementMgr::CompletedAchievement(%u). Player: %s (%u)",
achievement->ID, GetOwner()->GetName().c_str(), GetOwner()->GetGUIDLow());
CompletedAchievementData& ca = m_completedAchievements[achievement->ID];
@@ -1890,7 +1890,7 @@ void AchievementMgr<Player>::CompletedAchievement(AchievementEntry const* achiev
template<>
void AchievementMgr<Guild>::CompletedAchievement(AchievementEntry const* achievement, Player* referencePlayer)
{
- TC_LOG_DEBUG(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr<Guild>::CompletedAchievement(%u)", achievement->ID);
+ TC_LOG_DEBUG("achievement", "AchievementMgr<Guild>::CompletedAchievement(%u)", achievement->ID);
if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID))
return;
@@ -2213,14 +2213,14 @@ bool AchievementMgr<T>::CanUpdateCriteria(AchievementCriteriaEntry const* criter
{
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_ACHIEVEMENT_CRITERIA, criteria->ID, NULL))
{
- TC_LOG_TRACE(LOG_FILTER_ACHIEVEMENTSYS, "CanUpdateCriteria: %s (Id: %u Type %s) Disabled",
+ TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Disabled",
criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type));
return false;
}
if (achievement->mapID != -1 && referencePlayer->GetMapId() != uint32(achievement->mapID))
{
- TC_LOG_TRACE(LOG_FILTER_ACHIEVEMENTSYS, "CanUpdateCriteria: %s (Id: %u Type %s) Wrong map",
+ TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Wrong map",
criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type));
return false;
}
@@ -2228,35 +2228,35 @@ bool AchievementMgr<T>::CanUpdateCriteria(AchievementCriteriaEntry const* criter
if ((achievement->requiredFaction == ACHIEVEMENT_FACTION_HORDE && referencePlayer->GetTeam() != HORDE) ||
(achievement->requiredFaction == ACHIEVEMENT_FACTION_ALLIANCE && referencePlayer->GetTeam() != ALLIANCE))
{
- TC_LOG_TRACE(LOG_FILTER_ACHIEVEMENTSYS, "CanUpdateCriteria: %s (Id: %u Type %s) Wrong faction",
+ TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Wrong faction",
criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type));
return false;
}
if (IsCompletedCriteria(criteria, achievement))
{
- TC_LOG_TRACE(LOG_FILTER_ACHIEVEMENTSYS, "CanUpdateCriteria: %s (Id: %u Type %s) Is Completed",
+ TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Is Completed",
criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type));
return false;
}
if (!RequirementsSatisfied(criteria, miscValue1, miscValue2, miscValue3, unit, referencePlayer))
{
- TC_LOG_TRACE(LOG_FILTER_ACHIEVEMENTSYS, "CanUpdateCriteria: %s (Id: %u Type %s) Requirements not satisfied",
+ TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Requirements not satisfied",
criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type));
return false;
}
if (!AdditionalRequirementsSatisfied(criteria, miscValue1, miscValue2, unit, referencePlayer))
{
- TC_LOG_TRACE(LOG_FILTER_ACHIEVEMENTSYS, "CanUpdateCriteria: %s (Id: %u Type %s) Additional requirements not satisfied",
+ TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Additional requirements not satisfied",
criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type));
return false;
}
if (!ConditionsSatisfied(criteria, referencePlayer))
{
- TC_LOG_TRACE(LOG_FILTER_ACHIEVEMENTSYS, "CanUpdateCriteria: %s (Id: %u Type %s) Conditions not satisfied",
+ TC_LOG_TRACE("achievement", "CanUpdateCriteria: %s (Id: %u Type %s) Conditions not satisfied",
criteria->name, criteria->ID, AchievementGlobalMgr::GetCriteriaTypeString(criteria->type));
return false;
}
@@ -3034,7 +3034,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;
}
@@ -3059,7 +3059,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
m_AchievementCriteriasByTimedType[criteria->timedCriteriaStartType].push_back(criteria);
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement criteria and %u guild achievement crieteria in %u ms", criterias, guildCriterias, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u achievement criteria and %u guild achievement crieteria in %u ms", criterias, guildCriterias, GetMSTimeDiffToNow(oldMSTime));
}
void AchievementGlobalMgr::LoadAchievementReferenceList()
@@ -3068,7 +3068,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;
}
@@ -3088,7 +3088,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()
@@ -3101,7 +3101,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;
}
@@ -3116,7 +3116,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;
}
@@ -3126,7 +3126,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());
}
@@ -3149,7 +3149,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
}
while (result->NextRow());
- 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()
@@ -3160,7 +3160,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;
}
@@ -3173,7 +3173,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));
@@ -3186,7 +3186,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()
@@ -3200,7 +3200,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;
}
@@ -3213,7 +3213,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;
}
@@ -3228,19 +3228,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;
}
}
@@ -3250,7 +3250,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;
}
}
@@ -3260,27 +3260,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;
}
}
@@ -3290,7 +3290,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()
@@ -3305,7 +3305,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;
}
@@ -3317,7 +3317,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;
}
@@ -3332,7 +3332,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/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 38c537e2150..29cb069c470 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -73,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;
@@ -269,7 +269,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;
}
@@ -286,7 +286,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;
}
@@ -302,7 +302,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));
}
@@ -315,7 +315,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;
}
@@ -341,7 +341,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));
}
@@ -611,7 +611,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);
@@ -694,14 +694,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;
}
@@ -709,7 +709,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;
}
@@ -717,7 +717,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;
@@ -741,7 +741,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;
}
@@ -790,7 +790,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));
}
@@ -817,14 +817,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;
}
@@ -833,7 +833,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 3deb9cd7c46..f5a5d02e7ac 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -287,7 +287,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()
@@ -599,10 +599,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;
}
@@ -695,7 +695,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;
}
@@ -821,14 +821,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;
}
@@ -838,7 +838,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?
@@ -864,8 +864,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;
}
@@ -958,7 +958,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);
@@ -966,7 +966,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;
}
@@ -1124,7 +1124,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/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp
index 53b3ce0a6d9..337062f4714 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 f246f15a81d..fbc27dc47aa 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -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 2b6cd5c1cf4..f6bc701f166 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -1188,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;
}
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 85ce81418c3..73df56a3adf 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -84,7 +84,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string const& arenaT
// 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;
}
@@ -122,7 +122,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;
}
@@ -181,7 +181,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1);
}
- TC_LOG_DEBUG(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_DEBUG("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;
}
@@ -247,7 +247,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;
}
@@ -264,7 +264,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;
}
@@ -306,7 +306,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());
}
@@ -329,7 +329,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
@@ -349,7 +349,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());
}
// Remove all members from arena team
@@ -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;
}
@@ -590,7 +590,7 @@ uint8 ArenaTeam::GetTypeBySlot(uint8 slot)
default:
break;
}
- TC_LOG_ERROR(LOG_FILTER_ARENAS, "FATAL: Unknown arena team slot %u for some arena team", slot);
+ TC_LOG_ERROR("bg.arena", "FATAL: Unknown arena team slot %u for some arena team", slot);
return 0xFF;
}
diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
index f544f9d8b75..0d4fea9251b 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,5 +132,5 @@ 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));
}
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 2760b59b860..e3aff877319 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -328,7 +328,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);
}
}
@@ -500,7 +500,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;
}
@@ -631,7 +631,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;
@@ -820,18 +820,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);
@@ -1131,7 +1131,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
@@ -1148,7 +1148,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;
@@ -1177,7 +1177,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)
@@ -1464,7 +1464,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;
}
@@ -1536,9 +1536,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;
@@ -1589,7 +1589,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);
}
@@ -1601,7 +1601,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);
}
@@ -1609,7 +1609,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;
}
@@ -1618,7 +1618,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;
}
@@ -1651,7 +1651,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;
@@ -1662,7 +1662,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;
@@ -1697,7 +1697,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;
@@ -1715,7 +1715,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;
@@ -1742,7 +1742,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;
@@ -1842,7 +1842,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;
}
@@ -1966,7 +1966,7 @@ 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;
}
@@ -2031,18 +2031,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/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index f6a3148edc3..9f0003db2e6 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -134,7 +134,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,
@@ -381,7 +381,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
{
if (!bg->IsPlayerInBattleground(itr->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;
}
@@ -558,7 +558,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
*data << uint32(pointsLost); // Rating Lost
*data << uint32(pointsGained); // Rating gained
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "rating change: %d", rating_change);
+ TC_LOG_DEBUG("bg.battleground", "rating change: %d", rating_change);
}
}
@@ -827,7 +827,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;
}
@@ -1004,7 +1004,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;
}
@@ -1022,7 +1022,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;
}
@@ -1042,14 +1042,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;
}
@@ -1077,7 +1077,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;
}
@@ -1091,7 +1091,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;
}
}
@@ -1111,7 +1111,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::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* player, BattlegroundTypeId bgTypeId)
@@ -1194,11 +1194,11 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt
uint32 team = player->GetBGTeam();
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)
@@ -1372,7 +1372,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;
}
@@ -1388,7 +1388,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;
}
@@ -1396,7 +1396,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 4ac09bd2b30..3e4ea27b891 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
@@ -477,7 +477,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
@@ -785,14 +785,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;
}
@@ -819,7 +819,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
@@ -845,7 +845,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;
}
@@ -943,7 +943,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;
}
@@ -951,8 +951,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)
@@ -971,7 +971,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();
}
}
@@ -1042,7 +1042,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/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index d7cb4af5a42..a26b9dbaa2f 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -361,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;
@@ -567,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;
}
}
@@ -575,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
@@ -585,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 d5d9ac7577f..7a54317032b 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -57,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();
@@ -92,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;
@@ -111,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;
@@ -138,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:
@@ -148,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)
{
@@ -163,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:
@@ -186,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:
@@ -203,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:
@@ -213,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:
@@ -223,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;
}
@@ -428,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++)
@@ -500,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
@@ -585,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);
@@ -600,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);
@@ -660,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])
@@ -671,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)
@@ -693,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)
@@ -764,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);
@@ -814,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)
@@ -829,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)
@@ -867,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;
}
@@ -879,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())
@@ -918,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;
}
@@ -981,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
@@ -1127,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
}
@@ -1210,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;
}
@@ -1242,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;
}
}
@@ -1269,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;
}
}
@@ -1294,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;
}
}
@@ -1312,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;
}
}
@@ -1336,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;
}
}
@@ -1354,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;
}
}
@@ -1374,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;
}
}
@@ -1392,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;
}
}
@@ -1409,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++)
@@ -1427,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);
@@ -1473,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);
@@ -1515,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;
}
@@ -1526,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 600106dbdc1..d73242388c8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -150,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;
}
@@ -190,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);
@@ -479,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;
}
@@ -489,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;
}
@@ -575,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);
}
@@ -747,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);
@@ -899,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;
}
@@ -916,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/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index 60a725b3eb7..c4e8ba49ba9 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -266,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);
}
}
}
@@ -362,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;
}
}
@@ -374,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;
}
}
@@ -384,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;
}
@@ -393,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;
}
@@ -523,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);
}
@@ -585,7 +585,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;
}
@@ -609,7 +609,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)
@@ -627,11 +627,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);
@@ -829,12 +829,12 @@ 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));
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 d88c9c7a73f..5e5007d18a1 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRV.cpp
@@ -119,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;
}
@@ -196,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 39ad3e40e5e..767acb7f445 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -163,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;
}
@@ -176,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);
}
}
@@ -726,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 0838adffcf0..cda3bc4f036 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -224,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;
}
@@ -266,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;
@@ -578,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);
}
@@ -589,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);
}
@@ -691,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 6973f4e81e5..e1be2be0b09 100644
--- a/src/server/game/Calendar/CalendarMgr.cpp
+++ b/src/server/game/Calendar/CalendarMgr.cpp
@@ -81,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
@@ -108,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))
@@ -282,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;
}
@@ -293,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/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 50eb09a07e6..e6c8272c7a2 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -411,12 +411,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;
@@ -427,9 +427,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/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp
index bc468d949ad..746dc045b59 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;
}
@@ -319,7 +319,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
if (*_spell->SpellName && strcmp(_spell->SpellName, 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;
}
@@ -333,14 +333,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
@@ -349,7 +349,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
@@ -361,7 +361,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;
}
}
@@ -375,7 +375,7 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
if (*_achievement->name && strcmp(_achievement->name, 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;
}
@@ -389,14 +389,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
@@ -405,7 +405,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
@@ -414,7 +414,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
@@ -423,7 +423,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
@@ -440,21 +440,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
@@ -463,7 +463,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;
@@ -479,14 +479,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;
@@ -501,7 +501,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
@@ -511,21 +511,21 @@ 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;
@@ -561,14 +561,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;
}
@@ -591,14 +591,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;
}
@@ -607,7 +607,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;
@@ -616,7 +616,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;
}
@@ -638,7 +638,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);
@@ -653,13 +653,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;
}
@@ -677,7 +677,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;
}
}
@@ -685,7 +685,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/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index c202ecd60c2..8947fe70415 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;
@@ -582,7 +582,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
@@ -603,7 +603,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
}
@@ -639,7 +639,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);
}
@@ -684,7 +684,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);
}
}
}
@@ -701,7 +701,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;
@@ -717,7 +717,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;
@@ -733,7 +733,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;
@@ -747,7 +747,7 @@ ConditionList const* ConditionMgr::GetConditionsForPhaseDefinition(uint32 zone,
ConditionTypeContainer::const_iterator i = itr->second.find(entry);
if (i != itr->second.end())
{
- TC_LOG_DEBUG(LOG_FILTER_CONDITIONSYS, "GetConditionsForPhaseDefinition: found conditions for zone %u entry %u", zone, entry);
+ TC_LOG_DEBUG("condition", "GetConditionsForPhaseDefinition: found conditions for zone %u entry %u", zone, entry);
return &i->second;
}
}
@@ -765,7 +765,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;
@@ -780,7 +780,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();
@@ -794,10 +794,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();
}
@@ -807,7 +807,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;
}
@@ -843,7 +843,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;
}
@@ -854,19 +854,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
{
@@ -897,26 +897,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;
}
@@ -1014,7 +1014,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
@@ -1046,7 +1046,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));
}
@@ -1054,14 +1054,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;
}
@@ -1081,7 +1081,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;
}
@@ -1100,7 +1100,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;
}
@@ -1158,7 +1158,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;
}
@@ -1192,7 +1192,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;
}
@@ -1202,7 +1202,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;
}
@@ -1210,7 +1210,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;
@@ -1219,7 +1219,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;
}
@@ -1227,7 +1227,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;
@@ -1236,7 +1236,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;
}
@@ -1244,7 +1244,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;
@@ -1253,7 +1253,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;
}
@@ -1261,7 +1261,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;
@@ -1270,7 +1270,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;
}
@@ -1278,7 +1278,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;
@@ -1287,7 +1287,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;
}
@@ -1295,7 +1295,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;
@@ -1304,7 +1304,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;
}
@@ -1312,7 +1312,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;
@@ -1321,7 +1321,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;
}
@@ -1329,7 +1329,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;
@@ -1338,7 +1338,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;
}
@@ -1346,7 +1346,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;
@@ -1355,7 +1355,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;
}
@@ -1363,7 +1363,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;
@@ -1372,7 +1372,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;
}
@@ -1380,7 +1380,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;
@@ -1389,7 +1389,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;
}
@@ -1397,7 +1397,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;
@@ -1407,13 +1407,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;
}
@@ -1444,7 +1444,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
@@ -1456,7 +1456,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;
@@ -1467,7 +1467,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;
@@ -1475,47 +1475,47 @@ 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;
case CONDITION_SOURCE_TYPE_PHASE_DEFINITION:
if (!PhaseMgr::IsConditionTypeSupported(cond->ConditionType))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Condition source type `CONDITION_SOURCE_TYPE_PHASE_DEFINITION` does not support condition type %u, ignoring.", cond->ConditionType);
+ TC_LOG_ERROR("sql.sql", "Condition source type `CONDITION_SOURCE_TYPE_PHASE_DEFINITION` does not support condition type %u, ignoring.", cond->ConditionType);
return false;
}
break;
@@ -1523,13 +1523,13 @@ 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;
@@ -1549,13 +1549,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;
}
@@ -1565,17 +1565,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:
@@ -1583,13 +1583,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;
@@ -1599,14 +1599,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:
@@ -1614,20 +1614,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:
@@ -1635,25 +1635,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:
@@ -1661,17 +1661,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:
@@ -1681,15 +1681,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:
@@ -1697,14 +1697,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:
@@ -1712,56 +1712,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:
@@ -1769,77 +1769,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:
@@ -1849,79 +1849,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;
@@ -1930,17 +1930,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;
@@ -1948,38 +1948,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:
@@ -1989,19 +1989,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:
@@ -2009,7 +2009,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;
@@ -2018,7 +2018,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;
@@ -2027,7 +2027,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;
@@ -2036,7 +2036,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/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index 450ddd72d91..4034bd0c1c2 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -37,7 +37,7 @@ uint32 DB2FilesCount = 0;
static bool LoadDB2_assert_print(uint32 fsize, uint32 rsize, std::string const& filename)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
+ TC_LOG_ERROR("misc", "Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
// ASSERT must fail after function call
return false;
@@ -104,7 +104,7 @@ void LoadDB2Stores(std::string const& dataPath)
// error checks
if (bad_db2_files.size() >= DB2FilesCount)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "\nIncorrect DataDir value in worldserver.conf or ALL required *.db2 files (%d) not found by path: %sdb2", DB2FilesCount, dataPath.c_str());
+ TC_LOG_ERROR("misc", "\nIncorrect DataDir value in worldserver.conf or ALL required *.db2 files (%d) not found by path: %sdb2", DB2FilesCount, dataPath.c_str());
exit(1);
}
else if (!bad_db2_files.empty())
@@ -113,7 +113,7 @@ void LoadDB2Stores(std::string const& dataPath)
for (std::list<std::string>::iterator i = bad_db2_files.begin(); i != bad_db2_files.end(); ++i)
str += *i + "\n";
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "\nSome required *.db2 files (%u from %d) not found or not compatible:\n%s", (uint32)bad_db2_files.size(), DB2FilesCount, str.c_str());
+ TC_LOG_ERROR("misc", "\nSome required *.db2 files (%u from %d) not found or not compatible:\n%s", (uint32)bad_db2_files.size(), DB2FilesCount, str.c_str());
exit(1);
}
@@ -121,11 +121,11 @@ void LoadDB2Stores(std::string const& dataPath)
if (!sItemStore.LookupEntry(83086) || // last item added in 4.3.4 (15595)
!sItemExtendedCostStore.LookupEntry(3872) ) // last item extended cost added in 4.3.4 (15595)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Please extract correct db2 files from client 4.3.4 15595.");
+ TC_LOG_ERROR("misc", "Please extract correct db2 files from client 4.3.4 15595.");
exit(1);
}
- TC_LOG_INFO(LOG_FILTER_GENERAL, ">> Initialized %d DB2 data stores.", DB2FilesCount);
+ TC_LOG_INFO("misc", ">> Initialized %d DB2 data stores.", DB2FilesCount);
}
DB2StorageBase const* GetDB2Storage(uint32 type)
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index a7c64c77d1e..927e21b86d3 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -258,7 +258,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;
@@ -597,7 +597,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
@@ -776,7 +776,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())
@@ -785,7 +785,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);
}
@@ -796,11 +796,11 @@ void LoadDBCStores(const std::string& dataPath)
!sMapStore.LookupEntry(980) || // last map added in 4.3.4 (15595)
!sSpellStore.LookupEntry(121820) ) // last spell added in 4.3.4 (15595)
{
- 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 DBC data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Initialized %d DBC data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
}
const std::string* GetRandomCharacterName(uint8 race, uint8 gender)
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 2a7f1c534b2..a4d4771cc87 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)
@@ -197,7 +197,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
QueryResult result = WorldDatabase.Query("SELECT dungeonId, position_x, position_y, position_z, orientation FROM lfg_entrances");
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;
}
@@ -210,7 +210,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;
}
@@ -224,7 +224,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)
@@ -237,7 +237,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */)
AreaTriggerStruct const* at = sObjectMgr->GetMapEntranceTrigger(dungeon.map);
if (!at)
{
- TC_LOG_ERROR(LOG_FILTER_LFG, "LFGMgr::LoadLFGDungeons: Failed to load dungeon %s (Id: %u), cant find areatrigger for map %u", dungeon.name.c_str(), dungeon.id, dungeon.map);
+ TC_LOG_ERROR("lfg", "LFGMgr::LoadLFGDungeons: Failed to load dungeon %s (Id: %u), cant find areatrigger for map %u", dungeon.name.c_str(), dungeon.id, dungeon.map);
continue;
}
@@ -324,7 +324,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)
{
@@ -541,7 +541,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;
}
@@ -564,7 +564,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);
@@ -575,7 +575,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;
}
@@ -641,12 +641,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());
}
}
@@ -658,7 +658,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);
@@ -1020,7 +1020,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);
@@ -1111,7 +1111,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)
@@ -1148,12 +1148,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");
@@ -1167,7 +1167,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)
{
@@ -1312,7 +1312,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;
@@ -1320,7 +1320,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();
@@ -1384,7 +1384,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);
}
@@ -1400,13 +1400,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;
}
@@ -1418,7 +1418,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;
}
@@ -1434,14 +1434,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;
}
@@ -1450,7 +1450,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;
}
@@ -1481,7 +1481,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);
}
@@ -1549,7 +1549,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;
}
@@ -1561,14 +1561,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;
}
@@ -1580,39 +1580,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;
}
@@ -1621,11 +1621,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());
}
@@ -1634,11 +1634,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();
@@ -1650,12 +1650,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);
@@ -1663,12 +1663,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);
@@ -1677,43 +1677,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);
@@ -1721,7 +1721,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/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp
index 62696198bd8..20adfe2f0c4 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(uint8 queueId, 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/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index cf96f3316b4..c6d06986858 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -68,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());
}
@@ -102,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;
}
@@ -130,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);
@@ -156,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();
@@ -209,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);
}
@@ -221,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);
}
@@ -232,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/AreaTrigger/AreaTrigger.cpp b/src/server/game/Entities/AreaTrigger/AreaTrigger.cpp
index 771b9d64f79..0d1a427d223 100644
--- a/src/server/game/Entities/AreaTrigger/AreaTrigger.cpp
+++ b/src/server/game/Entities/AreaTrigger/AreaTrigger.cpp
@@ -64,7 +64,7 @@ bool AreaTrigger::CreateAreaTrigger(uint32 guidlow, uint32 triggerEntry, Unit* c
Relocate(pos);
if (!IsPositionValid())
{
- sLog->outError(LOG_FILTER_GENERAL, "AreaTrigger (spell %u) not created. Invalid coordinates (X: %f Y: %f)", spell->Id, GetPositionX(), GetPositionY());
+ sLog->outError("misc", "AreaTrigger (spell %u) not created. Invalid coordinates (X: %f Y: %f)", spell->Id, GetPositionX(), GetPositionY());
return false;
}
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index dff6e426793..1e7c6b30ba7 100644
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -76,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;
}
@@ -132,7 +132,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;
}
@@ -192,7 +192,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 5a626648768..7d89b90c5dc 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;
}
@@ -458,11 +458,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:
{
@@ -511,7 +511,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;
}
@@ -703,7 +703,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;
}
@@ -745,7 +745,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;
}
@@ -759,7 +759,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;
}
@@ -928,7 +928,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;
}
@@ -1169,7 +1169,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;
}
@@ -1195,7 +1195,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;
}
@@ -1311,7 +1311,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;
}
@@ -1513,7 +1513,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;
@@ -1645,7 +1645,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;
}
@@ -1693,7 +1693,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;
}
@@ -1765,7 +1765,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;
}
@@ -1803,7 +1803,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()
@@ -2051,7 +2051,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;
}
@@ -2059,13 +2059,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());
}
}
@@ -2086,7 +2086,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;
}
@@ -2094,7 +2094,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;
}
@@ -2419,7 +2419,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/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index c060e11983c..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;
}
@@ -84,7 +84,7 @@ void FormationMgr::LoadCreatureFormations()
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;
}
@@ -119,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;
}
@@ -137,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;
}
@@ -176,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;
@@ -205,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;
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index c6119fc8a66..f25b9af9820 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(uint32 questStatus, uint64 npcGUID) const
@@ -351,7 +351,7 @@ void PlayerMenu::SendQuestGiverStatus(uint32 questStatus, uint64 npcGUID) const
data << uint32(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
@@ -414,7 +414,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
@@ -585,7 +585,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
data << uint32(quest->GetSoundTurnIn());
_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
@@ -649,7 +649,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, uint64 npcGUID, b
quest->BuildExtraQuestInfo(data, _session->GetPlayer());
_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
@@ -737,7 +737,7 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, uint64 npcGUID,
data << uint32(0x40);
_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 4c1c310ab44..9b00ac8e80b 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;
}
}
@@ -278,7 +278,7 @@ void TempSummon::RemoveFromWorld()
}
//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/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index ce9ac112132..990d65d2174 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, SpellInfo
Relocate(pos);
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spell->Id, GetPositionX(), GetPositionY());
+ TC_LOG_ERROR("misc", "DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spell->Id, GetPositionX(), GetPositionY());
return false;
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index dea78fefec5..3c939b2a1f3 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;
}
@@ -294,7 +294,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)
{
@@ -341,7 +341,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());
+ sLog->outInfo("misc", "Src: %s Dest: %s", src.toString().c_str(), pos.toString().c_str());
GetMap()->GameObjectRelocation(this, pos.x, pos.y, pos.z, GetOrientation());
}
@@ -702,7 +702,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;
}
@@ -776,7 +776,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;
}
@@ -1284,7 +1284,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);
}
@@ -1365,7 +1365,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);
@@ -1381,7 +1381,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)
@@ -1686,7 +1686,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;
}
@@ -1698,9 +1698,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/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 f1180df1813..01dfd92e34c 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -39,7 +39,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;
}
@@ -99,7 +99,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;
}
@@ -120,7 +120,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;
}
@@ -300,7 +300,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)
{
@@ -572,7 +572,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;
}
@@ -583,7 +583,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;
}
@@ -596,7 +596,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;
}
@@ -686,7 +686,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;
}
@@ -706,7 +706,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 1d0b7b66d6d..527329a9d61 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -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 2ccaf755fd6..5111f6825e9 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -93,7 +93,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);
}
@@ -105,16 +105,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);
}
@@ -914,7 +914,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;
}
@@ -938,7 +938,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;
}
@@ -1078,7 +1078,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;
}
@@ -1101,7 +1101,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;
}
@@ -1168,7 +1168,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;
@@ -1231,37 +1231,37 @@ 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 %s (%u)", Movement::MovementFlags_ToString(flags).c_str(), flags);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "flags2 %s (%u)", Movement::MovementFlagsExtra_ToString(flags2).c_str(), flags2);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "time %u current time %u", time, getMSTime());
- 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 %s (%u)", Movement::MovementFlags_ToString(flags).c_str(), flags);
+ TC_LOG_INFO("misc", "flags2 %s (%u)", Movement::MovementFlagsExtra_ToString(flags2).c_str(), flags2);
+ TC_LOG_INFO("misc", "time %u current time %u", time, getMSTime());
+ TC_LOG_INFO("misc", "position: `%s`", pos.ToString().c_str());
if (transport.guid)
{
- 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 (transport.time3)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "time3: %u", transport.time3);
+ TC_LOG_INFO("misc", "time3: %u", transport.time3);
}
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);
if (flags & MOVEMENTFLAG_FALLING || jump.fallTime)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "fallTime: %u j_zspeed: %f", jump.fallTime, jump.zspeed);
+ TC_LOG_INFO("misc", "fallTime: %u j_zspeed: %f", jump.fallTime, jump.zspeed);
if (flags & MOVEMENTFLAG_FALLING)
- TC_LOG_INFO(LOG_FILTER_GENERAL, "j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.sinAngle, jump.cosAngle, jump.xyspeed);
+ TC_LOG_INFO("misc", "j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", 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(),
@@ -2270,7 +2270,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;
@@ -2305,7 +2305,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;
}
@@ -2479,7 +2479,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;
}
@@ -2847,7 +2847,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;
}
@@ -2894,7 +2894,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;
}
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index c807bdc347a..2106cab78fb 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -185,7 +185,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
if (!IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_PETS, "Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
+ 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;
}
@@ -229,7 +229,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;
}
@@ -321,7 +321,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();
@@ -555,7 +555,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;
}
@@ -720,7 +720,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;
}
@@ -728,7 +728,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;
}
@@ -757,7 +757,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))
@@ -804,7 +804,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());
}
}
@@ -1082,7 +1082,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;
}
@@ -1095,7 +1095,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());
@@ -1199,7 +1199,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());
@@ -1233,7 +1233,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;
}
@@ -1264,7 +1264,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());
@@ -1340,7 +1340,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);
@@ -1349,7 +1349,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;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 83cae25bb37..09121846096 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -956,7 +956,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;
}
@@ -969,7 +969,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;
}
@@ -984,7 +984,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;
}
@@ -1206,7 +1206,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)
@@ -1235,7 +1235,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;
}
@@ -1302,7 +1302,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
SendDurabilityLoss(this, 10);
@@ -1551,9 +1551,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;
}
@@ -1763,7 +1763,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;
@@ -1852,7 +1852,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;
}
@@ -2104,14 +2104,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;
}
@@ -2129,7 +2129,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())
{
@@ -2144,7 +2144,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();
@@ -2463,7 +2463,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);
}
@@ -2841,7 +2841,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));
}
}
@@ -3454,7 +3454,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)
@@ -3548,12 +3548,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;
}
@@ -3563,12 +3563,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;
}
@@ -3613,12 +3613,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;
}
@@ -3628,12 +3628,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;
}
@@ -4358,7 +4358,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;
}
@@ -4368,7 +4368,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());
}
@@ -5035,7 +5035,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;
}
@@ -5068,7 +5068,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)));
@@ -5076,7 +5076,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();
@@ -5107,7 +5107,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;
}
@@ -5116,7 +5116,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);
@@ -5468,7 +5468,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;
}
@@ -5476,7 +5476,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;
}
@@ -5492,7 +5492,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;
}
@@ -5507,7 +5507,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
}
else if (!HasEnoughMoney(uint64(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
@@ -5608,7 +5608,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)
@@ -5710,7 +5710,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;
}
@@ -5735,7 +5735,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;
}
@@ -5749,7 +5749,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;
}
@@ -6096,7 +6096,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);
@@ -6128,7 +6128,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);
@@ -6156,7 +6156,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);
@@ -6175,13 +6175,13 @@ bool Player::UpdateSkillPro(uint16 skillId, int32 chance, uint32 step)
static uint32 bonusSkillLevels[] = { 75, 150, 225, 300, 375, 450, 525 };
static const size_t bonusSkillLevelsSize = sizeof(bonusSkillLevels) / sizeof(uint32);
- 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;
}
@@ -6200,7 +6200,7 @@ bool Player::UpdateSkillPro(uint16 skillId, int32 chance, uint32 step)
if (irand(1, 1000) > chance)
{
- 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;
}
@@ -6224,7 +6224,7 @@ bool Player::UpdateSkillPro(uint16 skillId, int32 chance, uint32 step)
UpdateSkillEnchantments(skillId, value, 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;
}
@@ -6391,7 +6391,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
SkillLineEntry const* skillEntry = sSkillLineStore.LookupEntry(id);
if (!skillEntry)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Skill not found in SkillLineStore: skill #%u", id);
+ TC_LOG_ERROR("misc", "Skill not found in SkillLineStore: skill #%u", id);
return;
}
@@ -6604,20 +6604,20 @@ void Player::SendActionButtons(uint32 state) const
data << uint8(state);
GetSession()->SendPacket(&data);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "Action Buttons for '%u' spec '%u' Sent", GetGUIDLow(), GetActiveSpec());
+ TC_LOG_INFO("network", "Action Buttons for '%u' spec '%u' Sent", GetGUIDLow(), GetActiveSpec());
}
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;
}
@@ -6626,20 +6626,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;
@@ -6650,7 +6650,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
case ACTION_BUTTON_DROPDOWN:
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
}
@@ -6668,7 +6668,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;
}
@@ -6683,7 +6683,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)
@@ -6795,7 +6795,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;
}
@@ -6811,7 +6811,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;
}
@@ -6846,7 +6846,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);
}
}
}
@@ -6860,10 +6860,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;
}
@@ -7949,7 +7949,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);
@@ -8073,7 +8073,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);
@@ -8087,7 +8087,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*/)
@@ -8525,7 +8525,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);
}
@@ -8631,7 +8631,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;
}
@@ -8689,7 +8689,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;
}
@@ -8734,7 +8734,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_INTERNAL_BAG_ERROR, item, NULL);
return;
}
@@ -8766,7 +8766,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;
}
@@ -8797,7 +8797,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;
}
@@ -8814,7 +8814,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)
{
@@ -8854,12 +8854,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)
{
@@ -8900,7 +8900,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)
@@ -8967,10 +8967,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)
@@ -9307,7 +9307,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
@@ -9937,7 +9937,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;
}
@@ -9969,7 +9969,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();
@@ -10903,7 +10903,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)
@@ -11231,7 +11231,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
@@ -11390,7 +11390,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)
{
@@ -11559,7 +11559,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)
@@ -11595,7 +11595,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_CANT_SWAP : EQUIP_ERR_ITEM_NOT_FOUND;
@@ -11610,7 +11610,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
// Currency Tokenizer are not supposed to be swapped out of their hidden bag
if (pItem->IsCurrencyToken())
{
- 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_CANT_SWAP;
}
@@ -11778,7 +11778,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_PLAYER_DEAD;
@@ -12020,7 +12020,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);
@@ -12162,7 +12162,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;
@@ -12286,7 +12286,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());
@@ -12316,7 +12316,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);
@@ -12435,7 +12435,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())
@@ -12532,7 +12532,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
@@ -12695,7 +12695,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++)
@@ -12722,7 +12722,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++)
@@ -12773,7 +12773,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)
{
@@ -12836,7 +12836,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)
{
@@ -12921,7 +12921,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())
{
@@ -13297,7 +13297,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);
@@ -13319,7 +13319,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;
@@ -13327,7 +13327,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];
@@ -13353,7 +13353,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);
@@ -13396,7 +13396,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);
@@ -13406,7 +13406,7 @@ void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32
void Player::SendSellError(SellResult msg, Creature* creature, uint64 guid)
{
- 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+1)); // last check 4.3.4
data << uint64(creature ? creature->GetGUID() : 0);
data << uint64(guid);
@@ -13485,7 +13485,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();)
{
@@ -14018,81 +14018,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
@@ -14127,13 +14127,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;
// case ITEM_MOD_HIT_TAKEN_RATING: // Unused since 3.3.5
// ApplyRatingMod(CR_HIT_TAKEN_MELEE, enchant_amount, apply);
@@ -14147,54 +14147,54 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
// break;
case ITEM_MOD_RESILIENCE_RATING:
ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, 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_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_MASTERY_RATING:
ApplyRatingMod(CR_MASTERY, enchant_amount, apply);
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "+ %u MASTERY", enchant_amount);
+ TC_LOG_DEBUG("entities.player.items", "+ %u MASTERY", enchant_amount);
break;
default:
break;
@@ -14226,7 +14226,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*/
@@ -14396,7 +14396,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;
@@ -14430,7 +14430,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:
@@ -14446,7 +14446,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;
}
@@ -14541,7 +14541,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;
}
}
@@ -14645,7 +14645,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;
}
@@ -15460,7 +15460,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;
@@ -15476,7 +15476,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;
}
@@ -15485,7 +15485,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;
}
@@ -15502,7 +15502,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;
}
@@ -15546,7 +15546,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;
}
@@ -15579,7 +15579,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;
@@ -15595,7 +15595,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;
@@ -15613,7 +15613,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;
@@ -15632,7 +15632,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;
@@ -15648,7 +15648,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;
}
@@ -15659,7 +15659,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;
}
@@ -15672,7 +15672,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;
}
@@ -15687,7 +15687,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;
}
@@ -15702,9 +15702,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;
@@ -15717,7 +15717,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;
}
@@ -15747,7 +15747,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;
@@ -15759,7 +15759,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;
}
@@ -15779,7 +15779,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;
}
@@ -15806,7 +15806,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;
}
@@ -15850,7 +15850,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;
}
@@ -16672,14 +16672,14 @@ void Player::SendQuestComplete(Quest const* quest)
WorldPacket data(SMSG_QUESTUPDATE_COMPLETE, 4);
data << uint32(quest->GetQuestId());
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest->GetQuestId());
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest->GetQuestId());
}
}
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);
uint32 xp;
@@ -16720,7 +16720,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");
}
}
@@ -16731,7 +16731,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");
}
}
@@ -16740,7 +16740,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)
@@ -16760,7 +16760,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");
}
}
@@ -16772,7 +16772,7 @@ 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");
}
}
@@ -16786,7 +16786,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);
@@ -16804,7 +16804,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());
@@ -16872,7 +16872,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;
}
@@ -17029,7 +17029,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;
}
@@ -17041,13 +17041,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;
}
@@ -17073,7 +17073,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;
}
@@ -17123,7 +17123,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)
@@ -17190,7 +17190,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
@@ -17230,7 +17230,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
@@ -17252,7 +17252,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// 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.",
+ 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, GetPositionX()+m_movementInfo.transport.pos.GetPositionX(), GetPositionY()+m_movementInfo.transport.pos.GetPositionY(),
GetPositionZ()+m_movementInfo.transport.pos.GetPositionZ(), GetOrientation()+m_movementInfo.transport.pos.GetOrientation());
@@ -17270,7 +17270,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.",
+ TC_LOG_ERROR("entities.player", "Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.",
guid, transGUID);
RelocateToHomebind();
@@ -17297,12 +17297,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);
}
@@ -17331,7 +17331,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();
}
@@ -17352,13 +17352,13 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
AreaTriggerStruct 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();
}
@@ -17368,11 +17368,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;
}
}
@@ -17386,7 +17386,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();
}
}
@@ -17428,7 +17428,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
m_stableSlots = fields[33].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;
}
@@ -17506,7 +17506,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
if (GetSpecsCount() > MAX_TALENT_SPECS || GetActiveSpec() > MAX_TALENT_SPEC || GetSpecsCount() < MIN_TALENT_SPECS)
{
SetActiveSpec(0);
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName().c_str(), GetGUIDLow(), GetSpecsCount(), GetActiveSpec());
+ TC_LOG_ERROR("entities.player", "Player %s(GUID: %u) has SpecCount = %u and ActiveSpec = %u.", GetName().c_str(), GetGUIDLow(), GetSpecsCount(), GetActiveSpec());
}
// Only load selected specializations, learning mastery spells requires this
@@ -17618,7 +17618,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
SetAtLoginFlag(AT_LOGIN_RESET_TALENTS); // invalid tree, reset talents
}
- 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
@@ -17714,7 +17714,7 @@ void Player::_LoadCUFProfiles(PreparedQueryResult result)
if (id > MAX_CUF_PROFILES)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadCUFProfiles - Player (GUID: %u, name: %s) has an CUF profile with invalid id (id: %u), max is %i.", GetGUIDLow(), GetName().c_str(), id, MAX_CUF_PROFILES);
+ TC_LOG_ERROR("entities.player", "Player::_LoadCUFProfiles - Player (GUID: %u, name: %s) has an CUF profile with invalid id (id: %u), max is %i.", GetGUIDLow(), GetName().c_str(), id, MAX_CUF_PROFILES);
continue;
}
@@ -17787,7 +17787,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;
@@ -17798,7 +17798,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,
@@ -17831,7 +17831,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;
}
@@ -17865,7 +17865,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());
@@ -17888,13 +17888,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);
@@ -18004,7 +18004,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;
@@ -18018,7 +18018,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);
@@ -18066,26 +18066,26 @@ void Player::_LoadVoidStorage(PreparedQueryResult result)
if (!itemId)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid id (item id: " UI64FMTD ", entry: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry);
+ TC_LOG_ERROR("entities.player", "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid id (item id: " UI64FMTD ", entry: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry);
continue;
}
if (!sObjectMgr->GetItemTemplate(itemEntry))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid entry (item id: " UI64FMTD ", entry: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry);
+ TC_LOG_ERROR("entities.player", "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid entry (item id: " UI64FMTD ", entry: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry);
continue;
}
if (slot >= VOID_STORAGE_MAX_SLOT)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid slot (item id: " UI64FMTD ", entry: %u, slot: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry, slot);
+ TC_LOG_ERROR("entities.player", "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid slot (item id: " UI64FMTD ", entry: %u, slot: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry, slot);
continue;
}
std::string name;
if (creatorGuid && !sObjectMgr->GetPlayerNameByGUID(creatorGuid, name))
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid creator guid, set to 0 (item id: " UI64FMTD ", entry: %u, creatorGuid: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry, creatorGuid);
+ TC_LOG_ERROR("entities.player", "Player::_LoadVoidStorage - Player (GUID: %u, name: %s) has an item with an invalid creator guid, set to 0 (item id: " UI64FMTD ", entry: %u, creatorGuid: %u).", GetGUIDLow(), GetName().c_str(), itemId, itemEntry, creatorGuid);
creatorGuid = 0;
}
@@ -18110,14 +18110,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;
}
@@ -18125,7 +18125,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);
@@ -18148,7 +18148,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);
}
@@ -18176,7 +18176,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);
}
@@ -18198,7 +18198,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;
}
@@ -18213,7 +18213,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);
@@ -18244,7 +18244,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);
@@ -18260,7 +18260,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);
@@ -18323,7 +18323,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;
}
@@ -18380,7 +18380,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);
}
@@ -18430,7 +18430,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());
@@ -18504,7 +18504,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;
}
@@ -18520,7 +18520,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());
}
@@ -18543,7 +18543,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());
}
@@ -18567,7 +18567,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());
}
@@ -18590,7 +18590,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());
}
@@ -18660,12 +18660,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
@@ -18673,12 +18673,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;
}
}
@@ -18804,7 +18804,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;
}
@@ -19055,7 +19055,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 (%u/%u) pair. Can't be loaded.",
+ TC_LOG_ERROR("entities.player", "Player (Name %s) has incorrect race/class (%u/%u) pair. Can't be loaded.",
GetName().c_str(), uint32(getRace()), uint32(getClass()));
return false;
}
@@ -19104,7 +19104,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;
@@ -19129,7 +19129,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;
@@ -19572,7 +19572,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);
}
}
@@ -19603,7 +19603,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);
@@ -19619,7 +19619,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);
@@ -20119,21 +20119,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));
}
/*********************************************************/
@@ -20446,7 +20446,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);
}
@@ -20460,7 +20460,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;
@@ -20548,10 +20548,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
@@ -20685,7 +20685,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();
@@ -20770,7 +20770,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;
}
@@ -20818,7 +20818,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;
}
@@ -20882,7 +20882,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;
}
@@ -20952,7 +20952,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);
Opcodes opcode = Opcodes((mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER);
int i = 0;
@@ -21462,7 +21462,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)
@@ -21599,7 +21599,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;
}
@@ -21615,7 +21615,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;
}
}
@@ -21704,7 +21704,7 @@ bool Player::BuyCurrencyFromVendorSlot(uint64 vendorGuid, uint32 vendorSlot, uin
Creature* creature = GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: BuyCurrencyFromVendorSlot - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
+ TC_LOG_DEBUG("network", "WORLD: BuyCurrencyFromVendorSlot - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
SendBuyError(BUY_ERR_DISTANCE_TOO_FAR, NULL, currency, 0);
return false;
}
@@ -21743,7 +21743,7 @@ bool Player::BuyCurrencyFromVendorSlot(uint64 vendorGuid, uint32 vendorSlot, uin
iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost);
if (!iece)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "Currency %u have wrong ExtendedCost field value %u", currency, crItem->ExtendedCost);
+ TC_LOG_ERROR("entities.player", "Currency %u have wrong ExtendedCost field value %u", currency, crItem->ExtendedCost);
return false;
}
@@ -21868,7 +21868,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;
}
@@ -21923,7 +21923,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;
}
@@ -21999,7 +21999,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
@@ -22104,7 +22104,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());
}
}
@@ -22326,7 +22326,7 @@ void Player::ModifySpellCooldown(uint32 spellId, int32 cooldown)
data << int32(cooldown); // Cooldown mod in milliseconds
GetSession()->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, "ModifySpellCooldown:: Player: %s (GUID: %u) Spell: %u cooldown: %u", GetName().c_str(), GetGUIDLow(), spellId, GetSpellCooldownDelay(spellId));
+ TC_LOG_DEBUG("misc", "ModifySpellCooldown:: Player: %s (GUID: %u) Spell: %u cooldown: %u", GetName().c_str(), GetGUIDLow(), spellId, GetSpellCooldownDelay(spellId));
}
void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/, Spell* spell /*= NULL*/, bool setCooldown /*= true*/)
@@ -22455,7 +22455,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;
}
@@ -22567,7 +22567,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())
@@ -22788,7 +22788,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
}
}
@@ -22800,7 +22800,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
@@ -22876,7 +22876,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
}
}
@@ -22888,7 +22888,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
}
}
@@ -23347,7 +23347,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
@@ -23983,7 +23983,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;
}
@@ -24061,7 +24061,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;
}
@@ -24649,11 +24649,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;
}
@@ -24665,11 +24665,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;
}
@@ -25197,7 +25197,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;
}
@@ -25215,7 +25215,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);
@@ -25258,7 +25258,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;
}
}
@@ -25380,7 +25380,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
{
// calculate total z distance of the fall
float z_diff = m_lastFallZ - movementInfo.pos.GetPositionZ();
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "zDiff = %f", z_diff);
+ //TC_LOG_DEBUG("misc", "zDiff = %f", z_diff);
//Players with low fall distance, Feather Fall or physical immunity (charges used) are ignored
// 14.57 can be calculated by resolving damageperc formula below to 0
@@ -25419,7 +25419,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.jump.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.jump.fallTime, height, damage, safe_fall);
}
}
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LANDING); // No fly zone - Parachute
@@ -25581,7 +25581,7 @@ bool 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 false;
}
@@ -25593,7 +25593,7 @@ bool Player::LearnTalent(uint32 talentId, uint32 talentRank)
learnSpell(spellid, false);
AddTalent(spellid, GetActiveSpec(), true);
- TC_LOG_INFO(LOG_FILTER_GENERAL, "TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, GetActiveSpec());
+ TC_LOG_INFO("misc", "TalentID: %u Rank: %u Spell: %u Spec: %u\n", talentId, talentRank, spellid, GetActiveSpec());
// set talent tree for player
if (!GetPrimaryTalentTree(GetActiveSpec()))
@@ -25735,7 +25735,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;
}
@@ -25745,7 +25745,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));
@@ -26065,7 +26065,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;
}
}
@@ -26582,7 +26582,7 @@ void Player::SendTimeSync()
m_timeSyncServer = getMSTime();
if (m_timeSyncQueue.size() > 3)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Not received CMSG_TIME_SYNC_RESP for over 30 seconds from player %u (%s), possible cheater", GetGUIDLow(), GetName().c_str());
+ TC_LOG_ERROR("network", "Not received CMSG_TIME_SYNC_RESP for over 30 seconds from player %u (%s), possible cheater", GetGUIDLow(), GetName().c_str());
}
void Player::SetReputation(uint32 factionentry, uint32 value)
@@ -26627,13 +26627,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;
}
@@ -26641,7 +26641,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;
}
@@ -26775,7 +26775,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;
}
@@ -26788,7 +26788,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;
}
@@ -26796,7 +26796,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;
}
@@ -26999,7 +26999,7 @@ void Player::AddVoidStorageItemAtSlot(uint8 slot, const VoidStorageItem& item)
if (_voidStorageItems[slot])
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Player::AddVoidStorageItemAtSlot - Player (GUID: %u, name: %s) tried to add an item to an used slot (item id: " UI64FMTD ", entry: %u, slot: %u).", GetGUIDLow(), GetName().c_str(), _voidStorageItems[slot]->ItemId, _voidStorageItems[slot]->ItemEntry, slot);
+ TC_LOG_ERROR("misc", "Player::AddVoidStorageItemAtSlot - Player (GUID: %u, name: %s) tried to add an item to an used slot (item id: " UI64FMTD ", entry: %u, slot: %u).", GetGUIDLow(), GetName().c_str(), _voidStorageItems[slot]->ItemId, _voidStorageItems[slot]->ItemEntry, slot);
GetSession()->SendVoidStorageTransferResult(VOID_TRANSFER_ERROR_INTERNAL_ERROR_1);
return;
}
@@ -27168,7 +27168,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;
}
@@ -27177,7 +27177,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;
}
@@ -27256,7 +27256,7 @@ void Player::ReadMovementInfo(WorldPacket& data, MovementInfo* mi, Movement::Ext
MovementStatusElements const* sequence = GetMovementStatusElementsSequence(data.GetOpcode());
if (!sequence)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player::ReadMovementInfo: No movement sequence found for opcode %s", GetOpcodeNameForLogging(data.GetOpcode()).c_str());
+ TC_LOG_ERROR("network", "Player::ReadMovementInfo: No movement sequence found for opcode %s", GetOpcodeNameForLogging(data.GetOpcode()).c_str());
return;
}
@@ -27473,7 +27473,7 @@ void Player::ReadMovementInfo(WorldPacket& data, MovementInfo* mi, Movement::Ext
{ \
if (check) \
{ \
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "Player::ReadMovementInfo: Violation of MovementFlags found (%s). " \
+ TC_LOG_DEBUG("entities.unit", "Player::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(), GetGUIDLow(), maskToRemove); \
mi->RemoveMovementFlag((maskToRemove)); \
diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp
index 163bc719ce6..27da99cd9c8 100644
--- a/src/server/game/Entities/Player/SocialMgr.cpp
+++ b/src/server/game/Entities/Player/SocialMgr.cpp
@@ -173,7 +173,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)
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index bd099280fc0..e3b4bbc5b56 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -50,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;
}
@@ -61,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;
}
@@ -70,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;
}
@@ -105,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;
@@ -165,7 +165,7 @@ void Transport::Update(uint32 diff)
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())
@@ -195,7 +195,7 @@ 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);
@@ -206,7 +206,7 @@ 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);
@@ -243,7 +243,7 @@ Creature* Transport::CreateNPCPassenger(uint32 guid, CreatureData const* data)
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;
}
@@ -283,7 +283,7 @@ 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;
}
@@ -548,7 +548,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/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 7d112c23f11..84ab938a443 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -649,10 +649,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;
@@ -706,7 +706,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);
@@ -715,7 +715,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);
@@ -803,7 +803,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;
}
@@ -819,7 +819,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;
}
@@ -847,7 +847,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;
}
@@ -897,7 +897,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;
@@ -911,7 +911,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;
@@ -925,7 +925,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;
@@ -1066,7 +1066,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;
}
@@ -1853,10 +1853,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);
}
}
@@ -1887,7 +1887,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));
}
@@ -1905,22 +1905,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;
}
@@ -1929,7 +1929,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
{
@@ -1948,7 +1948,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;
}
}
@@ -1957,7 +1957,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
@@ -1973,7 +1973,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;
}
}
@@ -1985,7 +1985,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;
}
}
@@ -1996,9 +1996,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;
}
@@ -2016,7 +2016,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;
}
}
@@ -2037,13 +2037,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;
}
@@ -2108,7 +2108,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)
@@ -2118,12 +2118,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*/)
@@ -2308,7 +2308,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;
}
}
@@ -2809,7 +2809,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)
@@ -3175,7 +3175,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);
@@ -3905,7 +3905,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());
}
}
}
@@ -4778,7 +4778,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;
}
@@ -4821,7 +4821,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;
@@ -4950,7 +4950,7 @@ bool Unit::HandleAuraProcOnPowerAmount(Unit* victim, uint32 /*damage*/, AuraEffe
if (!powerRequired || !powerAmountRequired)
{
- TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Unit::HandleAuraProcOnPowerAmount: Spell %u have 0 powerAmountRequired in EffectAmount[%d] or 0 powerRequired in EffectMiscValue, not handled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex());
+ TC_LOG_ERROR("spells", "Unit::HandleAuraProcOnPowerAmount: Spell %u have 0 powerAmountRequired in EffectAmount[%d] or 0 powerRequired in EffectMiscValue, not handled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex());
return false;
}
@@ -6018,7 +6018,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;
}
@@ -6384,7 +6384,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;
}
@@ -6769,7 +6769,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);
@@ -6897,7 +6897,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;
}
@@ -7188,7 +7188,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;
}
@@ -7251,11 +7251,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();
}
@@ -7627,7 +7627,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);
}
}
@@ -7797,7 +7797,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);
}
@@ -7812,7 +7812,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);
}
@@ -7826,7 +7826,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);
}
@@ -7848,13 +7848,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;
}
@@ -7928,7 +7928,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;
}
@@ -8040,7 +8040,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
@@ -8053,7 +8053,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)
@@ -8066,11 +8066,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)
{
@@ -8211,14 +8211,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
@@ -10515,7 +10515,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;
}
@@ -11305,7 +11305,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;
}
@@ -11369,7 +11369,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;
}
@@ -11399,7 +11399,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;
}
@@ -11737,7 +11737,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);
}
@@ -11745,7 +11745,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);
}
}
@@ -12364,7 +12364,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;
}
@@ -12390,7 +12390,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
case SPELL_AURA_PROC_TRIGGER_SPELL:
case SPELL_AURA_PROC_TRIGGER_SPELL_2:
{
- 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;
@@ -12409,14 +12409,14 @@ 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;
}
case SPELL_AURA_PROC_ON_POWER_AMOUNT:
{
- 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 (HandleAuraProcOnPowerAmount(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
@@ -12427,19 +12427,19 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
case SPELL_AURA_MOD_POWER_REGEN_PERCENT:
case SPELL_AURA_MOD_MELEE_HASTE:
case SPELL_AURA_MOD_MELEE_HASTE_3:
- 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);
@@ -12448,7 +12448,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);
@@ -12457,7 +12457,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;
@@ -13197,7 +13197,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;
}
@@ -13325,7 +13325,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;
}
@@ -13375,7 +13375,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;
}
@@ -13552,7 +13552,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);
}
@@ -13579,7 +13579,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
{
double baseLoss = sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH);
uint32 loss = uint32(baseLoss - (baseLoss * plrVictim->GetTotalAuraMultiplier(SPELL_AURA_MOD_DURABILITY_LOSS)));
- TC_LOG_DEBUG(LOG_FILTER_UNITS, "We are dead, losing %u percent durability", loss);
+ TC_LOG_DEBUG("entities.unit", "We are dead, losing %u percent durability", loss);
// Durability loss is calculated more accurately again for each item in Player::DurabilityLoss
plrVictim->DurabilityLossAll(baseLoss, false);
// durability lost message
@@ -13599,7 +13599,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())
{
@@ -13920,11 +13920,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;
}
@@ -13933,14 +13933,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;
}
@@ -13965,7 +13965,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;
}
@@ -14065,7 +14065,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;
@@ -14145,7 +14145,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;
@@ -15134,7 +15134,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;
}
@@ -15185,7 +15185,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())
@@ -15361,7 +15361,7 @@ void Unit::WriteMovementInfo(WorldPacket& data, Movement::ExtraMovementStatusEle
MovementStatusElements const* sequence = GetMovementStatusElementsSequence(data.GetOpcode());
if (!sequence)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Unit::WriteMovementInfo: No movement sequence found for opcode %s", GetOpcodeNameForLogging(data.GetOpcode()).c_str());
+ TC_LOG_ERROR("network", "Unit::WriteMovementInfo: No movement sequence found for opcode %s", GetOpcodeNameForLogging(data.GetOpcode()).c_str());
return;
}
@@ -15645,7 +15645,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;
}
@@ -15701,7 +15701,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);
@@ -15721,7 +15721,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());
@@ -15738,7 +15738,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);
@@ -15746,7 +15746,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());
@@ -15815,31 +15815,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())
@@ -15848,11 +15848,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/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 86614da38fa..e7bc1d75bfb 100644
--- 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)
@@ -869,7 +869,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.
@@ -878,7 +878,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/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index b38010dc8d4..e3d15728297 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, type 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;
}
@@ -832,11 +832,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();
@@ -844,7 +844,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;
@@ -856,7 +856,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;
}
@@ -866,11 +866,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();
@@ -879,7 +879,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;
@@ -894,13 +894,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;
}
@@ -911,7 +911,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));
}
}
}
@@ -973,7 +973,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;
}
@@ -982,12 +982,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);
}
@@ -1001,7 +1001,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
@@ -1022,14 +1022,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
@@ -1057,13 +1057,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
@@ -1090,7 +1090,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);
@@ -1164,7 +1164,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;
}
@@ -1182,7 +1182,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;
}
@@ -1191,7 +1191,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;
}
@@ -1209,7 +1209,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;
@@ -1224,7 +1224,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;
}
@@ -1239,7 +1239,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;
}
@@ -1261,7 +1261,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;
}
@@ -1282,7 +1282,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;
}
diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp
index c917f8370a1..ec2b76883c6 100644
--- a/src/server/game/Globals/ObjectAccessor.cpp
+++ b/src/server/game/Globals/ObjectAccessor.cpp
@@ -52,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;
}
@@ -339,7 +339,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/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 8d6be31017b..f1bbb1d6839 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -308,14 +308,14 @@ void ObjectMgr::LoadGraveyardOrientations()
uint32 id = fields[0].GetUInt32();
if (!sWorldSafeLocsStore.LookupEntry(id))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Graveyard %u referenced in graveyard_orientation doesn't exist.", id);
+ TC_LOG_ERROR("server.loading", "Graveyard %u referenced in graveyard_orientation doesn't exist.", id);
continue;
}
_graveyardOrientations[id] = fields[1].GetFloat();
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu graveyard orientations in %u ms", (unsigned long)_graveyardOrientations.size(), GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %lu graveyard orientations in %u ms", (unsigned long)_graveyardOrientations.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadCreatureLocales()
@@ -345,7 +345,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()
@@ -381,7 +381,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()
@@ -407,7 +407,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()
@@ -434,7 +434,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;
}
@@ -538,7 +538,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()
@@ -550,7 +550,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;
}
@@ -563,7 +563,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;
}
@@ -583,12 +583,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));
}
@@ -597,14 +597,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;
}
@@ -612,7 +612,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)
@@ -630,7 +630,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;
}
@@ -641,20 +641,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;
}
@@ -665,45 +665,45 @@ 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 (!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;
}
@@ -715,11 +715,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;
@@ -729,7 +729,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)
@@ -737,7 +737,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)
@@ -745,7 +745,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)
@@ -753,7 +753,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)
@@ -761,7 +761,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)
@@ -769,7 +769,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)
@@ -777,7 +777,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)
@@ -785,11 +785,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)
{
@@ -797,7 +797,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;
}
}
@@ -805,13 +805,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;
}
@@ -822,42 +822,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;
}
@@ -866,7 +866,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;
}
}
@@ -875,21 +875,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;
}
@@ -904,19 +904,19 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
if (cInfo->expansion > MAX_CREATURE_BASE_HP)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_template` lists creature (Entry: %u) with `exp` %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion);
+ TC_LOG_ERROR("sql.sql", "Table `creature_template` lists creature (Entry: %u) with `exp` %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansion);
const_cast<CreatureTemplate*>(cInfo)->expansion = 0;
}
if (cInfo->expansionUnknown > MAX_CREATURE_BASE_HP)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_template` lists creature (Entry: %u) with `exp_unk` %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansionUnknown);
+ TC_LOG_ERROR("sql.sql", "Table `creature_template` lists creature (Entry: %u) with `exp_unk` %u. Ignored and set to 0.", cInfo->Entry, cInfo->expansionUnknown);
const_cast<CreatureTemplate*>(cInfo)->expansionUnknown = 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;
}
@@ -932,7 +932,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;
}
@@ -946,7 +946,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;
}
@@ -956,7 +956,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();
@@ -972,12 +972,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));
}
@@ -986,14 +986,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;
}
@@ -1001,7 +1001,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)
@@ -1057,7 +1057,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;
}
@@ -1070,7 +1070,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;
}
@@ -1091,7 +1091,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;
@@ -1107,7 +1107,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;
}
@@ -1117,7 +1117,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)
@@ -1168,7 +1168,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
@@ -1188,7 +1188,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;
}
@@ -1211,17 +1211,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;
}
@@ -1232,7 +1232,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()
@@ -1245,7 +1245,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;
}
@@ -1266,7 +1266,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", "Couldn't get creature data for GUIDLow %u", guidLow);
error = true;
break;
}
@@ -1274,7 +1274,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", "Couldn't get creature data for GUIDLow %u", linkedGuidLow);
error = true;
break;
}
@@ -1282,14 +1282,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", "Creature '%u' linking to '%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 '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1303,7 +1303,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", "Couldn't get creature data for GUIDLow %u", guidLow);
error = true;
break;
}
@@ -1311,7 +1311,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", "Couldn't get gameobject data for GUIDLow %u", linkedGuidLow);
error = true;
break;
}
@@ -1319,14 +1319,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", "Creature '%u' linking to '%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 '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1340,7 +1340,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", "Couldn't get gameobject data for GUIDLow %u", guidLow);
error = true;
break;
}
@@ -1348,7 +1348,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", "Couldn't get gameobject data for GUIDLow %u", linkedGuidLow);
error = true;
break;
}
@@ -1356,14 +1356,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", "Creature '%u' linking to '%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 '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1377,7 +1377,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", "Couldn't get gameobject data for GUIDLow %u", guidLow);
error = true;
break;
}
@@ -1385,7 +1385,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", "Couldn't get creature data for GUIDLow %u", linkedGuidLow);
error = true;
break;
}
@@ -1393,14 +1393,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", "Creature '%u' linking to '%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 '%u' with not corresponding spawnMask", guidLow, linkedGuidLow);
error = true;
break;
}
@@ -1416,7 +1416,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)
@@ -1441,13 +1441,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;
}
@@ -1472,7 +1472,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;
}
@@ -1490,26 +1490,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;
}
@@ -1518,7 +1518,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;
}
@@ -1533,7 +1533,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;
}
@@ -1546,7 +1546,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()
@@ -1563,7 +1563,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;
}
@@ -1587,7 +1587,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;
}
@@ -1617,19 +1617,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) spawnMasks[data.mapid]: %u.", guid, data.spawnMask, data.mapid, spawnMasks[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) spawnMasks[data.mapid]: %u.", guid, data.spawnMask, data.mapid, spawnMasks[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;
}
@@ -1642,7 +1642,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;
}
}
@@ -1650,19 +1650,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;
}
}
@@ -1670,14 +1670,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;
}
@@ -1689,7 +1689,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)
@@ -1759,13 +1759,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;
}
@@ -1794,7 +1794,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;
}
@@ -1846,7 +1846,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;
}
@@ -1871,7 +1871,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;
}
@@ -1894,7 +1894,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;
}
@@ -1906,14 +1906,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;
}
@@ -1934,13 +1934,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();
@@ -1949,7 +1949,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);
@@ -1957,7 +1957,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();
@@ -1965,25 +1965,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;
}
@@ -1992,7 +1992,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)
@@ -2160,7 +2160,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 FillItemDamageFields(float* minDamage, float* maxDamage, float* dps, uint32 itemLevel, uint32 itemClass, uint32 itemSubClass, uint32 quality, uint32 delay, float statScalingFactor, uint32 inventoryType, uint32 flags2)
@@ -2683,9 +2683,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 from Item-sparse.db2 and %u from database in %u ms", sparseCount, dbCount, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u item templates from Item-sparse.db2 and %u from database in %u ms", sparseCount, dbCount, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadItemTemplateAddon()
@@ -2702,7 +2702,7 @@ void ObjectMgr::LoadItemTemplateAddon()
uint32 itemId = fields[0].GetUInt32();
if (!GetItemTemplate(itemId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item %u specified in `item_template_addon` does not exist, skipped.", itemId);
+ TC_LOG_ERROR("sql.sql", "Item %u specified in `item_template_addon` does not exist, skipped.", itemId);
continue;
}
@@ -2710,7 +2710,7 @@ void ObjectMgr::LoadItemTemplateAddon()
uint32 maxMoneyLoot = fields[4].GetUInt32();
if (minMoneyLoot > maxMoneyLoot)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Minimum money loot specified in `item_template_addon` for item %u was greater than maximum amount, swapping.", itemId);
+ TC_LOG_ERROR("sql.sql", "Minimum money loot specified in `item_template_addon` for item %u was greater than maximum amount, swapping.", itemId);
std::swap(minMoneyLoot, maxMoneyLoot);
}
ItemTemplate& itemTemplate = _itemTemplateStore[itemId];
@@ -2722,7 +2722,7 @@ void ObjectMgr::LoadItemTemplateAddon()
++count;
} while (result->NextRow());
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item addon templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u item addon templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadItemScriptNames()
@@ -2739,7 +2739,7 @@ void ObjectMgr::LoadItemScriptNames()
uint32 itemId = fields[0].GetUInt32();
if (!GetItemTemplate(itemId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Item %u specified in `item_script_names` does not exist, skipped.", itemId);
+ TC_LOG_ERROR("sql.sql", "Item %u specified in `item_script_names` does not exist, skipped.", itemId);
continue;
}
@@ -2748,7 +2748,7 @@ void ObjectMgr::LoadItemScriptNames()
} while (result->NextRow());
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u item script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u item script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry)
{
@@ -2771,7 +2771,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;
}
@@ -2788,19 +2788,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;
}
@@ -2810,7 +2810,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()
@@ -2826,7 +2826,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;
}
@@ -2843,7 +2843,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;
}
@@ -2853,7 +2853,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()
@@ -2865,7 +2865,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;
}
@@ -2878,7 +2878,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;
}
@@ -2886,17 +2886,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;
}
@@ -2929,7 +2929,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);
}
@@ -2938,13 +2938,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
@@ -2969,7 +2969,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)
{
@@ -2987,7 +2987,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);
}
}
}
@@ -3003,7 +3003,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
@@ -3025,39 +3025,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;
}
@@ -3076,12 +3076,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
@@ -3089,7 +3089,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
{
@@ -3102,14 +3102,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;
}
@@ -3117,7 +3117,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;
}
@@ -3125,7 +3125,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;
}
@@ -3146,12 +3146,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();
@@ -3160,7 +3160,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
{
@@ -3175,13 +3175,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;
}
@@ -3201,7 +3201,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);
}
}
}
@@ -3209,12 +3209,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();
@@ -3223,7 +3223,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
{
@@ -3236,14 +3236,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;
}
@@ -3254,12 +3254,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/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();
@@ -3268,7 +3268,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);
}
@@ -3281,14 +3281,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;
}
@@ -3296,10 +3296,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;
@@ -3347,7 +3347,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);
}
@@ -3356,18 +3356,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();
@@ -3380,7 +3380,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);
}
@@ -3396,10 +3396,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;
@@ -3415,12 +3415,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));
}
}
@@ -3437,7 +3437,7 @@ void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint8 level, uint32& base
if (!hp || !mp)
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Tried to get non-existant Class-Level combination data for base hp/mp. Class %u Level %u", class_, level);
+ TC_LOG_ERROR("misc", "Tried to get non-existant Class-Level combination data for base hp/mp. Class %u Level %u", class_, level);
return;
}
@@ -3585,7 +3585,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;
}
@@ -3614,18 +3614,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;
}
@@ -3633,7 +3633,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;
}
}
@@ -3642,7 +3642,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;
}
}
@@ -3651,7 +3651,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;
}
}
@@ -3663,7 +3663,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
}
@@ -3672,7 +3672,7 @@ void ObjectMgr::LoadQuests()
if (qinfo->MinLevel == uint32(-1) || qinfo->MinLevel > DEFAULT_MAX_LEVEL)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u should be disabled because `MinLevel` = %i", qinfo->GetQuestId(), int32(qinfo->MinLevel));
+ TC_LOG_ERROR("sql.sql", "Quest %u should be disabled because `MinLevel` = %i", qinfo->GetQuestId(), int32(qinfo->MinLevel));
// no changes needed, sending -1 in SMSG_QUEST_QUERY_RESPONSE is valid
}
@@ -3681,7 +3681,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
}
@@ -3692,7 +3692,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)
}
@@ -3701,7 +3701,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?
}
@@ -3713,7 +3713,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;
}
}
@@ -3722,7 +3722,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;
}
}
@@ -3731,7 +3731,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);
}
}
@@ -3740,7 +3740,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
}
@@ -3749,77 +3749,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
@@ -3829,20 +3829,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
}
@@ -3852,13 +3852,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
}
@@ -3871,7 +3871,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
}
@@ -3880,14 +3880,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
}
@@ -3900,7 +3900,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
}
@@ -3909,7 +3909,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
}
@@ -3921,14 +3921,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
}
@@ -3941,14 +3941,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
}
@@ -3961,21 +3961,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
}
@@ -3988,21 +3988,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
}
@@ -4014,18 +4014,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
}
@@ -4037,21 +4037,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
}
@@ -4063,21 +4063,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
}
@@ -4087,7 +4087,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
@@ -4095,7 +4095,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
@@ -4109,7 +4109,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;
}
@@ -4123,21 +4123,21 @@ void ObjectMgr::LoadQuests()
{
if (qinfo->RewardCurrencyCount[j] == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardCurrencyId%d` = %u but `RewardCurrencyCount%d` = 0, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardCurrencyId%d` = %u but `RewardCurrencyCount%d` = 0, quest can't be done.",
qinfo->GetQuestId(), j+1, qinfo->RewardCurrencyId[j], j+1);
// no changes, quest can't be done for this requirement
}
if (!sCurrencyTypesStore.LookupEntry(qinfo->RewardCurrencyId[j]))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardCurrencyId%d` = %u but currency with entry %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardCurrencyId%d` = %u but currency with entry %u does not exist, quest can't be done.",
qinfo->GetQuestId(), j+1, qinfo->RewardCurrencyId[j], qinfo->RewardCurrencyId[j]);
qinfo->RewardCurrencyCount[j] = 0; // prevent incorrect work of quest
}
}
else if (qinfo->RewardCurrencyCount[j] > 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardCurrencyId%d` = 0 but `RewardCurrencyCount%d` = %u, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardCurrencyId%d` = 0 but `RewardCurrencyCount%d` = %u, quest can't be done.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RewardCurrencyCount[j]);
qinfo->RewardCurrencyCount[j] = 0; // prevent incorrect work of quest
}
@@ -4149,21 +4149,21 @@ void ObjectMgr::LoadQuests()
{
if (qinfo->RequiredCurrencyCount[j] == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredCurrencyId%d` = %u but `RequiredCurrencyCount%d` = 0, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredCurrencyId%d` = %u but `RequiredCurrencyCount%d` = 0, quest can't be done.",
qinfo->GetQuestId(), j+1, qinfo->RequiredCurrencyId[j], j+1);
// no changes, quest can't be done for this requirement
}
if (!sCurrencyTypesStore.LookupEntry(qinfo->RequiredCurrencyId[j]))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredCurrencyId%d` = %u but currency with entry %u does not exist, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredCurrencyId%d` = %u but currency with entry %u does not exist, quest can't be done.",
qinfo->GetQuestId(), j+1, qinfo->RequiredCurrencyId[j], qinfo->RequiredCurrencyId[j]);
qinfo->RequiredCurrencyCount[j] = 0; // prevent incorrect work of quest
}
}
else if (qinfo->RequiredCurrencyCount[j] > 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredCurrencyId%d` = 0 but `RequiredCurrencyCount%d` = %u, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredCurrencyId%d` = 0 but `RequiredCurrencyCount%d` = %u, quest can't be done.",
qinfo->GetQuestId(), j+1, j+1, qinfo->RequiredCurrencyCount[j]);
qinfo->RequiredCurrencyCount[j] = 0; // prevent incorrect work of quest
}
@@ -4173,7 +4173,7 @@ void ObjectMgr::LoadQuests()
{
if (!sSoundEntriesStore.LookupEntry(qinfo->SoundAccept))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SoundAccept` = %u but sound %u does not exist, set to 0.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SoundAccept` = %u but sound %u does not exist, set to 0.",
qinfo->GetQuestId(), qinfo->SoundAccept, qinfo->SoundAccept);
qinfo->SoundAccept = 0; // no sound will be played
}
@@ -4183,7 +4183,7 @@ void ObjectMgr::LoadQuests()
{
if (!sSoundEntriesStore.LookupEntry(qinfo->SoundTurnIn))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `SoundTurnIn` = %u but sound %u does not exist, set to 0.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `SoundTurnIn` = %u but sound %u does not exist, set to 0.",
qinfo->GetQuestId(), qinfo->SoundTurnIn, qinfo->SoundTurnIn);
qinfo->SoundTurnIn = 0; // no sound will be played
}
@@ -4195,14 +4195,14 @@ void ObjectMgr::LoadQuests()
if (!spellInfo)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredSpell` = %u but spell %u does not exist, quest will not require a spell.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredSpell` = %u but spell %u does not exist, quest will not require a spell.",
qinfo->GetQuestId(), qinfo->RequiredSpell, qinfo->RequiredSpell);
qinfo->RequiredSpell = 0; // no spell will be required
}
else if (!SpellMgr::IsSpellValid(spellInfo))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RequiredSpell` = %u but spell %u is broken, quest will not require a spell.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RequiredSpell` = %u but spell %u is broken, quest will not require a spell.",
qinfo->GetQuestId(), qinfo->RequiredSpell, qinfo->RequiredSpell);
qinfo->RequiredSpell = 0; // no spell will be required
}
@@ -4210,7 +4210,7 @@ void ObjectMgr::LoadQuests()
/* Can we require talents?
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
}
@@ -4221,12 +4221,12 @@ void ObjectMgr::LoadQuests()
{
if (!sSkillLineStore.LookupEntry(qinfo->RewardSkillId))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSkillId` = %u but this skill does not exist",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSkillId` = %u but this skill does not exist",
qinfo->GetQuestId(), qinfo->RewardSkillId);
}
if (!qinfo->RewardSkillPoints)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSkillId` = %u but `RewardSkillPoints` is 0",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSkillId` = %u but `RewardSkillPoints` is 0",
qinfo->GetQuestId(), qinfo->RewardSkillId);
}
}
@@ -4235,13 +4235,13 @@ void ObjectMgr::LoadQuests()
{
if (qinfo->RewardSkillPoints > sWorld->GetConfigMaxSkillValue())
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSkillPoints` = %u but max possible skill is %u, quest can't be done.",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSkillPoints` = %u but max possible skill is %u, quest can't be done.",
qinfo->GetQuestId(), qinfo->RewardSkillPoints, sWorld->GetConfigMaxSkillValue());
// no changes, quest can't be done for this requirement
}
if (!qinfo->RewardSkillId)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `RewardSkillPoints` = %u but `RewardSkillId` is 0",
+ TC_LOG_ERROR("sql.sql", "Quest %u has `RewardSkillPoints` = %u but `RewardSkillId` is 0",
qinfo->GetQuestId(), qinfo->RewardSkillPoints);
}
}
@@ -4250,7 +4250,7 @@ void ObjectMgr::LoadQuests()
if (qinfo->PrevQuestId)
{
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
qinfo->prevQuests.push_back(qinfo->PrevQuestId);
}
@@ -4259,7 +4259,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
{
int32 signedQuestId = qinfo->NextQuestId < 0 ? -int32(qinfo->GetQuestId()) : int32(qinfo->GetQuestId());
@@ -4297,7 +4297,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);
@@ -4305,7 +4305,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()
@@ -4358,7 +4358,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)
@@ -4376,7 +4376,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
@@ -4386,7 +4386,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;
}
@@ -4417,19 +4417,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;
}
@@ -4441,7 +4441,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;
}
@@ -4452,14 +4452,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;
}
@@ -4471,14 +4471,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
@@ -4489,21 +4489,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;
}
@@ -4515,7 +4515,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;
}
@@ -4527,7 +4527,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;
}
@@ -4535,7 +4535,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;
}
@@ -4546,7 +4546,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;
}
@@ -4557,14 +4557,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;
}
@@ -4577,7 +4577,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;
}
@@ -4585,14 +4585,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;
}
@@ -4604,13 +4604,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;
}
@@ -4621,25 +4621,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;
}
@@ -4650,13 +4650,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;
}
@@ -4677,7 +4677,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()
@@ -4692,14 +4692,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);
}
}
@@ -4741,7 +4741,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);
}
}
@@ -4772,7 +4772,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()
@@ -4785,7 +4785,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;
}
@@ -4809,18 +4809,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, fields[0].GetInt32());
+ TC_LOG_ERROR("sql.sql", "Scriptname: `%s` spell (Id: %d) does not exist.", scriptName, fields[0].GetInt32());
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;
}
while (spellInfo)
@@ -4832,7 +4832,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)));
}
@@ -4841,7 +4841,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()
@@ -4850,7 +4850,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;
}
@@ -4870,7 +4870,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)
@@ -4897,7 +4897,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()
@@ -4909,7 +4909,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;
}
@@ -4933,12 +4933,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)
@@ -4973,7 +4973,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()
@@ -4985,7 +4985,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;
}
@@ -4998,7 +4998,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;
}
@@ -5014,7 +5014,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)
@@ -5034,7 +5034,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;
}
@@ -5050,13 +5050,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, 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, lastEncounterDungeon);
continue;
}
@@ -5065,7 +5065,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, itr->second->id, itr->second->encounterName);
+ 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, itr->second->id, itr->second->encounterName);
continue;
}
@@ -5079,7 +5079,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);
+ 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);
continue;
}
const_cast<CreatureTemplate*>(creatureInfo)->flags_extra |= CREATURE_FLAG_EXTRA_DUNGEON_BOSS;
@@ -5088,12 +5088,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);
+ 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);
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);
+ TC_LOG_ERROR("sql.sql", "Table `instance_encounters` has an invalid credit type (%u) for encounter %u (%s), skipped!", creditType, entry, dungeonEncounter->encounterName);
continue;
}
@@ -5117,7 +5117,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
@@ -5137,7 +5137,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());
@@ -5154,7 +5154,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;
}
@@ -5176,7 +5176,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()
@@ -5218,7 +5218,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
@@ -5230,7 +5230,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)
@@ -5244,7 +5244,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
}
@@ -5347,7 +5347,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()
@@ -5360,7 +5360,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;
}
@@ -5378,7 +5378,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;
}
@@ -5386,13 +5386,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);
@@ -5404,7 +5404,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()
@@ -5417,7 +5417,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;
}
@@ -5434,14 +5434,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()
@@ -5453,7 +5453,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;
}
@@ -5471,13 +5471,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)
@@ -5572,7 +5572,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;
}
}
@@ -5595,7 +5595,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;
}
@@ -5614,34 +5614,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)
@@ -5668,7 +5668,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);
}
}
@@ -5686,7 +5686,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);
}
@@ -5712,7 +5712,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;
}
@@ -5827,7 +5827,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;
}
@@ -5881,7 +5881,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;
}
@@ -5906,20 +5906,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;
}
@@ -5927,7 +5927,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()
@@ -5946,7 +5946,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;
}
@@ -5978,7 +5978,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;
}
}
@@ -5988,7 +5988,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;
}
}
@@ -5997,7 +5997,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;
}
}
@@ -6006,7 +6006,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;
}
}
@@ -6015,7 +6015,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;
}
}
@@ -6023,7 +6023,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));
}
/*
@@ -6141,7 +6141,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++;
@@ -6151,7 +6151,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++;
@@ -6161,7 +6161,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++;
@@ -6256,7 +6256,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)
@@ -6264,7 +6264,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);
}
@@ -6273,7 +6273,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);
}
}
@@ -6283,7 +6283,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);
}
@@ -6292,7 +6292,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
@@ -6305,7 +6305,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)
@@ -6314,7 +6314,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);
}
@@ -6334,7 +6334,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;
}
@@ -6419,7 +6419,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);
}
@@ -6437,7 +6437,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);
@@ -6462,7 +6462,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;
@@ -6504,7 +6504,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()
@@ -6515,7 +6515,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;
}
@@ -6531,7 +6531,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)
@@ -6554,7 +6554,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;
}
@@ -6574,7 +6574,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()
@@ -6588,7 +6588,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)
@@ -6632,7 +6632,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;
}
@@ -6644,7 +6644,7 @@ void ObjectMgr::LoadCorpses()
CorpseType type = CorpseType(fields[12].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;
}
@@ -6660,7 +6660,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()
@@ -6673,7 +6673,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;
}
@@ -6696,49 +6696,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;
}
@@ -6748,7 +6748,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()
@@ -6768,7 +6768,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;
}
@@ -6791,7 +6791,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;
}
@@ -6800,7 +6800,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;
}
}
@@ -6810,7 +6810,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;
}
}
@@ -6820,7 +6820,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()
@@ -6834,7 +6834,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;
}
@@ -6866,13 +6866,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;
}
@@ -6884,19 +6884,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;
}
}
@@ -6905,31 +6905,31 @@ 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;
}
FactionEntry const* factionEntry4 = sFactionStore.LookupEntry(repTemplate.faction[4]);
if (repTemplate.faction[4] && !factionEntry4)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[4]);
+ TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[4]);
continue;
}
@@ -6939,7 +6939,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()
@@ -6955,7 +6955,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;
}
@@ -6976,7 +6976,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;
}
@@ -6985,7 +6985,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()
@@ -7001,7 +7001,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;
}
@@ -7055,7 +7055,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()
@@ -7068,7 +7068,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;
}
@@ -7082,7 +7082,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;
}
@@ -7090,13 +7090,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;
@@ -7116,12 +7116,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)
@@ -7170,7 +7170,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;
}
@@ -7186,7 +7186,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;
}
@@ -7198,7 +7198,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()
@@ -7209,9 +7209,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);
}
}
@@ -7223,9 +7223,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);
}
}
@@ -7237,9 +7237,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);
}
}
@@ -7251,9 +7251,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);
}
}
@@ -7267,7 +7267,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;
}
@@ -7282,7 +7282,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;
}
@@ -7293,7 +7293,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
@@ -7451,7 +7451,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;
}
@@ -7499,7 +7499,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)
@@ -7513,7 +7513,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;
}
@@ -7526,7 +7526,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;
}
}
@@ -7545,9 +7545,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;
}
@@ -7562,12 +7562,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;
}
@@ -7575,7 +7575,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;
}
@@ -7587,9 +7587,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;
}
@@ -7605,9 +7605,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>";
}
@@ -7621,7 +7621,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;
}
@@ -7636,7 +7636,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;
}
@@ -7645,7 +7645,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)
@@ -7747,7 +7747,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;
}
@@ -7770,13 +7770,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;
}
@@ -7788,7 +7788,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
@@ -7905,7 +7905,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;
}
@@ -7922,25 +7922,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;
}
@@ -7950,7 +7950,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)
@@ -7961,32 +7961,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;
}
@@ -8014,7 +8014,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;
}
@@ -8044,7 +8044,7 @@ void ObjectMgr::LoadTrainerSpell()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!");
return;
}
@@ -8068,7 +8068,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, uint8 type, std::set<uint32> *skip_vendors)
@@ -8127,7 +8127,7 @@ void ObjectMgr::LoadVendors()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!");
return;
}
@@ -8161,7 +8161,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()
@@ -8174,7 +8174,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;
}
@@ -8191,7 +8191,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;
}
@@ -8201,7 +8201,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()
@@ -8217,7 +8217,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;
}
@@ -8243,16 +8243,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;
}
@@ -8261,7 +8261,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, uint8 type, bool persist /*= true*/)
@@ -8315,7 +8315,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
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;
}
@@ -8326,7 +8326,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
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);
@@ -8340,7 +8340,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (player)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_NOT_FOUND, id, type);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u, type %u), ignore", vendor_entry, id, type);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u, type %u), ignore", vendor_entry, id, type);
return false;
}
@@ -8349,7 +8349,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
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", 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", id, ExtendedCost, vendor_entry);
return false;
}
@@ -8360,7 +8360,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
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, 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, id, vendor_entry);
return false;
}
else if (maxcount == 0 && incrtime > 0)
@@ -8368,7 +8368,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
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", 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", id, vendor_entry);
return false;
}
}
@@ -8382,13 +8382,13 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 id, int32 maxcount
if (player)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST, id, ExtendedCost, type);
else
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `npc_vendor` has duplicate items %u (with extended cost %u, type %u) for vendor (Entry: %u), ignoring", id, ExtendedCost, type, vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `npc_vendor` has duplicate items %u (with extended cost %u, type %u) for vendor (Entry: %u), ignoring", id, ExtendedCost, type, vendor_entry);
return false;
}
if (type == ITEM_VENDOR_TYPE_CURRENCY && maxcount == 0)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Table `(game_event_)npc_vendor` have Item (Entry: %u, type: %u) with missing maxcount for vendor (%u), ignore", id, type, vendor_entry);
+ TC_LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` have Item (Entry: %u, type: %u) with missing maxcount for vendor (%u), ignore", id, type, vendor_entry);
return false;
}
@@ -8427,7 +8427,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;
}
@@ -8441,7 +8441,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)
@@ -8473,7 +8473,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);
@@ -8499,7 +8499,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)
@@ -8508,7 +8508,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;
}
@@ -8544,7 +8544,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;
}
@@ -8565,13 +8565,13 @@ void ObjectMgr::LoadCreatureClassLevelStats()
stats.BaseArmor = fields[7].GetUInt32();
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;
}
}
@@ -8588,11 +8588,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()
@@ -8603,7 +8603,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;
}
@@ -8617,9 +8617,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;
@@ -8627,7 +8627,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()
@@ -8638,7 +8638,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;
}
@@ -8652,9 +8652,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;
@@ -8662,7 +8662,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()
@@ -8673,7 +8673,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;
}
@@ -8687,9 +8687,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;
@@ -8697,7 +8697,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()
@@ -8708,7 +8708,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;
}
@@ -8722,9 +8722,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;
@@ -8732,7 +8732,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::LoadHotfixData()
@@ -8743,7 +8743,7 @@ void ObjectMgr::LoadHotfixData()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 hotfix info entries. DB table `hotfix_data` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 hotfix info entries. DB table `hotfix_data` is empty.");
return;
}
@@ -8765,7 +8765,7 @@ void ObjectMgr::LoadHotfixData()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u hotfix info entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u hotfix info entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadMissingKeyChains()
@@ -8780,7 +8780,7 @@ void ObjectMgr::LoadMissingKeyChains()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 KeyChain entries. DB table `keychain_db2` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 KeyChain entries. DB table `keychain_db2` is empty.");
return;
}
@@ -8800,7 +8800,7 @@ void ObjectMgr::LoadMissingKeyChains()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u KeyChain entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u KeyChain entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadFactionChangeSpells()
@@ -8811,7 +8811,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;
}
@@ -8825,9 +8825,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;
@@ -8835,7 +8835,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()
@@ -8846,7 +8846,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;
}
@@ -8860,9 +8860,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;
@@ -8870,7 +8870,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));
}
void ObjectMgr::LoadPhaseDefinitions()
@@ -8884,7 +8884,7 @@ void ObjectMgr::LoadPhaseDefinitions()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 phasing definitions. DB table `phase_definitions` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 phasing definitions. DB table `phase_definitions` is empty.");
return;
}
@@ -8906,7 +8906,7 @@ void ObjectMgr::LoadPhaseDefinitions()
// Checks
if ((PhaseDefinition.flags & PHASE_FLAG_OVERWRITE_EXISTING) && (PhaseDefinition.flags & PHASE_FLAG_NEGATE_PHASE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Flags defined in phase_definitions in zoneId %d and entry %u does contain PHASE_FLAG_OVERWRITE_EXISTING and PHASE_FLAG_NEGATE_PHASE. Setting flags to PHASE_FLAG_OVERWRITE_EXISTING", PhaseDefinition.zoneId, PhaseDefinition.entry);
+ TC_LOG_ERROR("sql.sql", "Flags defined in phase_definitions in zoneId %d and entry %u does contain PHASE_FLAG_OVERWRITE_EXISTING and PHASE_FLAG_NEGATE_PHASE. Setting flags to PHASE_FLAG_OVERWRITE_EXISTING", PhaseDefinition.zoneId, PhaseDefinition.entry);
PhaseDefinition.flags &= ~PHASE_FLAG_NEGATE_PHASE;
}
@@ -8916,7 +8916,7 @@ void ObjectMgr::LoadPhaseDefinitions()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u phasing definitions in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u phasing definitions in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadSpellPhaseInfo()
@@ -8930,7 +8930,7 @@ void ObjectMgr::LoadSpellPhaseInfo()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 spell dbc infos. DB table `spell_phase` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 spell dbc infos. DB table `spell_phase` is empty.");
return;
}
@@ -8945,13 +8945,13 @@ void ObjectMgr::LoadSpellPhaseInfo()
SpellInfo const* spell = sSpellMgr->GetSpellInfo(spellPhaseInfo.spellId);
if (!spell)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u defined in `spell_phase` does not exists, skipped.", spellPhaseInfo.spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u defined in `spell_phase` does not exists, skipped.", spellPhaseInfo.spellId);
continue;
}
if (!spell->HasAura(SPELL_AURA_PHASE))
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Spell %u defined in `spell_phase` does not have aura effect type SPELL_AURA_PHASE, useless value.", spellPhaseInfo.spellId);
+ TC_LOG_ERROR("sql.sql", "Spell %u defined in `spell_phase` does not have aura effect type SPELL_AURA_PHASE, useless value.", spellPhaseInfo.spellId);
continue;
}
@@ -8963,7 +8963,7 @@ void ObjectMgr::LoadSpellPhaseInfo()
++count;
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell dbc infos in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell dbc infos 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 5a628bcfc88..22fc83b1e7f 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -850,13 +850,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();
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/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index d85655ae24b..1109cc40a61 100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -120,7 +120,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;
@@ -211,7 +211,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/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 144b4ddffa0..d33845d454f 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -66,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())
@@ -942,7 +942,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;
}
@@ -1029,7 +1029,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;
}
@@ -1226,7 +1226,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;
@@ -2094,7 +2094,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;
@@ -2137,7 +2137,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/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/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 28d801af511..2b3654d1da1 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -105,7 +105,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());
}
@@ -115,7 +115,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
@@ -402,7 +402,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);
@@ -497,21 +497,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);
@@ -614,13 +614,13 @@ void Guild::BankTab::SendText(Guild const* guild, WorldSession* session) const
if (session)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_BANK_QUERY_TEXT_RESULT [%s]: Tabid: %u, Text: %s"
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_BANK_QUERY_TEXT_RESULT [%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, "SMSG_GUILD_BANK_QUERY_TEXT_RESULT [Broadcast]: Tabid: %u, Text: %s", m_tabId, m_text.c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_BANK_QUERY_TEXT_RESULT [Broadcast]: Tabid: %u, Text: %s", m_tabId, m_text.c_str());
guild->BroadcastPacket(&data);
}
}
@@ -724,7 +724,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();
@@ -736,13 +736,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;
@@ -996,7 +996,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());
}
@@ -1107,7 +1107,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();
@@ -1215,7 +1215,7 @@ bool Guild::Create(Player* pLeader, std::string const& name)
_todayExperience = 0;
_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();
@@ -1339,7 +1339,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();
@@ -1476,12 +1476,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);
}
}
@@ -1524,7 +1524,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::SendGuildRankInfo(WorldSession* session) const
@@ -1562,7 +1562,7 @@ void Guild::SendGuildRankInfo(WorldSession* session) const
data.FlushBits();
data.append(rankData);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_RANK [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_RANK [%s]", session->GetPlayerInfo().c_str());
}
void Guild::HandleSetMOTD(WorldSession* session, std::string const& motd)
@@ -1651,7 +1651,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;
}
@@ -1686,7 +1686,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);
@@ -1778,7 +1778,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());
@@ -1843,7 +1843,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
data.WriteByteSeq(newGuildGuid[3]);
data.WriteByteSeq(oldGuildGuid[4]);
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)
@@ -2134,7 +2134,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;
}
}
@@ -2156,7 +2156,7 @@ void Guild::HandleGuildPartyRequest(WorldSession* session)
data << uint32(0); // Needed guild members
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_PARTY_STATE_RESPONSE [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_PARTY_STATE_RESPONSE [%s]", session->GetPlayerInfo().c_str());
}
void Guild::SendEventLog(WorldSession* session) const
@@ -2164,7 +2164,7 @@ void Guild::SendEventLog(WorldSession* session) const
WorldPacket data(SMSG_GUILD_EVENT_LOG_QUERY_RESULT, 1 + m_eventLog->GetSize() * (1 + 8 + 4));
m_eventLog->WritePacket(data);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_EVENT_LOG_QUERY_RESULT [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_EVENT_LOG_QUERY_RESULT [%s]", session->GetPlayerInfo().c_str());
}
void Guild::SendNewsUpdate(WorldSession* session)
@@ -2219,7 +2219,7 @@ void Guild::SendNewsUpdate(WorldSession* session)
}
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_NEWS_UPDATE [%s]", session->GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_NEWS_UPDATE [%s]", session->GetPlayerInfo().c_str());
}
void Guild::SendBankLog(WorldSession* session, uint8 tabId) const
@@ -2235,7 +2235,7 @@ void Guild::SendBankLog(WorldSession* session, uint8 tabId) const
//if (tabId == GUILD_BANK_MAX_TABS && hasCashFlow)
// data << uint64(cashFlowContribution);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_BANK_LOG_QUERY_RESULT [%s] TabId: %u", session->GetPlayerInfo().c_str(), tabId);
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_BANK_LOG_QUERY_RESULT [%s] TabId: %u", session->GetPlayerInfo().c_str(), tabId);
}
}
@@ -2266,7 +2266,7 @@ void Guild::SendPermissions(WorldSession* session) const
}
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_PERMISSIONS_QUERY_RESULTS [%s] Rank: %u", session->GetPlayerInfo().c_str(), rankId);
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_PERMISSIONS_QUERY_RESULTS [%s] Rank: %u", session->GetPlayerInfo().c_str(), rankId);
}
void Guild::SendMoneyInfo(WorldSession* session) const
@@ -2279,7 +2279,7 @@ void Guild::SendMoneyInfo(WorldSession* session) const
WorldPacket data(SMSG_GUILD_BANK_MONEY_WITHDRAWN, 8);
data << int64(amount);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_BANK_MONEY_WITHDRAWN [%s] Money: %u", session->GetPlayerInfo().c_str(), amount);
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_BANK_MONEY_WITHDRAWN [%s] Money: %u", session->GetPlayerInfo().c_str(), amount);
}
void Guild::SendLoginInfo(WorldSession* session)
@@ -2306,7 +2306,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());
SendGuildRankInfo(session);
_BroadcastEvent(GE_SIGNED_ON, player->GetGUID(), player->GetName().c_str());
@@ -2429,13 +2429,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(
@@ -2472,7 +2472,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);
}
@@ -2482,7 +2482,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;
}
@@ -2501,7 +2501,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
@@ -2511,7 +2511,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
@@ -3141,7 +3141,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!!
}
@@ -3328,7 +3328,7 @@ void Guild::_SendBankContentUpdate(uint8 tabId, SlotIds slots) const
player->GetSession()->SendPacket(&data);
}
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
+ TC_LOG_DEBUG("guild", "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
}
}
@@ -3352,8 +3352,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, uint8 tabId, bool withContent, bool withTabInfo) const
@@ -3442,7 +3442,7 @@ void Guild::SendBankList(WorldSession* session, uint8 tabId, bool withContent, b
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
+ TC_LOG_DEBUG("guild", "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
}
void Guild::SendGuildRanksUpdate(uint64 setterGuid, uint64 targetGuid, uint32 rank)
@@ -3495,7 +3495,7 @@ void Guild::SendGuildRanksUpdate(uint64 setterGuid, uint64 targetGuid, uint32 ra
member->ChangeRank(rank);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "SMSG_GUILD_RANKS_UPDATE [Broadcast] Target: %u, Issuer: %u, RankId: %u",
+ TC_LOG_DEBUG("network", "SMSG_GUILD_RANKS_UPDATE [Broadcast] Target: %u, Issuer: %u, RankId: %u",
GUID_LOPART(targetGuid), GUID_LOPART(setterGuid), rank);
}
@@ -3574,7 +3574,7 @@ void Guild::SendGuildReputationWeeklyCap(WorldSession* session, uint32 reputatio
WorldPacket data(SMSG_GUILD_REPUTATION_WEEKLY_CAP, 4);
data << uint32(cap);
session->SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "SMSG_GUILD_REPUTATION_WEEKLY_CAP [%s]: Left: %u",
+ TC_LOG_DEBUG("guild", "SMSG_GUILD_REPUTATION_WEEKLY_CAP [%s]: Left: %u",
session->GetPlayerInfo().c_str(), cap);
}
@@ -3629,7 +3629,7 @@ void Guild::HandleNewsSetSticky(WorldSession* session, uint32 newsId, bool stick
if (itr == logs->end())
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "HandleNewsSetSticky: [%s] requested unknown newsId %u - Sticky: %u",
+ TC_LOG_DEBUG("guild", "HandleNewsSetSticky: [%s] requested unknown newsId %u - Sticky: %u",
session->GetPlayerInfo().c_str(), newsId, sticky);
return;
}
@@ -3637,7 +3637,7 @@ void Guild::HandleNewsSetSticky(WorldSession* session, uint32 newsId, bool stick
NewsLogEntry* news = (NewsLogEntry*)(*itr);
news->SetSticky(sticky);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "HandleNewsSetSticky: [%s] chenged newsId %u sticky to %u",
+ TC_LOG_DEBUG("guild", "HandleNewsSetSticky: [%s] chenged newsId %u sticky to %u",
session->GetPlayerInfo().c_str(), newsId, sticky);
WorldPacket data(SMSG_GUILD_NEWS_UPDATE, 7 + 32);
diff --git a/src/server/game/Guilds/GuildFinderMgr.cpp b/src/server/game/Guilds/GuildFinderMgr.cpp
index 6125b62ebdf..d5c8cdb2744 100644
--- a/src/server/game/Guilds/GuildFinderMgr.cpp
+++ b/src/server/game/Guilds/GuildFinderMgr.cpp
@@ -36,7 +36,7 @@ void GuildFinderMgr::LoadFromDB()
void GuildFinderMgr::LoadGuildSettings()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guild finder guild-related settings...");
+ TC_LOG_INFO("server.loading", "Loading guild finder guild-related settings...");
// 0 1 2 3 4 5 6 7
QueryResult result = CharacterDatabase.Query("SELECT gfgs.guildId, gfgs.availability, gfgs.classRoles, gfgs.interests, gfgs.level, gfgs.listed, gfgs.comment, c.race "
"FROM guild_finder_guild_settings gfgs "
@@ -45,7 +45,7 @@ void GuildFinderMgr::LoadGuildSettings()
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild finder guild-related settings. Table `guild_finder_guild_settings` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild finder guild-related settings. Table `guild_finder_guild_settings` is empty.");
return;
}
@@ -73,19 +73,19 @@ void GuildFinderMgr::LoadGuildSettings()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild finder guild-related settings in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild finder guild-related settings in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
}
void GuildFinderMgr::LoadMembershipRequests()
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading guild finder membership requests...");
+ TC_LOG_INFO("server.loading", "Loading guild finder membership requests...");
// 0 1 2 3 4 5 6
QueryResult result = CharacterDatabase.Query("SELECT guildId, playerGuid, availability, classRole, interests, comment, submitTime "
"FROM guild_finder_applicant");
if (!result)
{
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild finder membership requests. Table `guild_finder_applicant` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild finder membership requests. Table `guild_finder_applicant` is empty.");
return;
}
@@ -109,7 +109,7 @@ void GuildFinderMgr::LoadMembershipRequests()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild finder membership requests in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild finder membership requests in %u ms.", count, GetMSTimeDiffToNow(oldMSTime));
}
void GuildFinderMgr::AddMembershipRequest(uint32 guildGuid, MembershipRequest const& request)
diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp
index 0d90c34b860..55d336dca34 100644
--- a/src/server/game/Guilds/GuildMgr.cpp
+++ b/src/server/game/Guilds/GuildMgr.cpp
@@ -47,7 +47,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++;
@@ -115,7 +115,7 @@ uint32 GuildMgr::GetXPForGuildLevel(uint8 level) 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();
@@ -127,7 +127,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
@@ -150,12 +150,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();
@@ -167,7 +167,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
{
@@ -184,12 +184,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();
@@ -206,7 +206,7 @@ void GuildMgr::LoadGuilds()
"LEFT JOIN characters c ON c.guid = gm.guid ORDER BY gm.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;
@@ -223,12 +223,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();
@@ -240,7 +240,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
{
@@ -257,12 +257,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();
@@ -273,7 +273,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
{
@@ -290,12 +290,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();
@@ -307,7 +307,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
{
@@ -324,12 +324,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 news event logs
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Guild News...");
+ TC_LOG_INFO("server.loading", "Loading Guild News...");
{
uint32 oldMSTime = getMSTime();
@@ -339,7 +339,7 @@ void GuildMgr::LoadGuilds()
QueryResult result = CharacterDatabase.Query("SELECT guildid, LogGuid, EventType, PlayerGuid, Flags, Value, Timestamp FROM guild_newslog ORDER BY TimeStamp DESC, LogGuid DESC");
if (!result)
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild event logs. DB table `guild_newslog` is empty.");
+ TC_LOG_INFO("server.loading", ">> Loaded 0 guild event logs. DB table `guild_newslog` is empty.");
else
{
uint32 count = 0;
@@ -355,13 +355,13 @@ void GuildMgr::LoadGuilds()
}
while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild new logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild new logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
// 8. 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();
@@ -373,7 +373,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
{
@@ -390,12 +390,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));
}
}
// 9. 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();
@@ -409,7 +409,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
{
@@ -426,7 +426,7 @@ 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));
}
}
@@ -448,7 +448,7 @@ void GuildMgr::LoadGuilds()
}
// 11. Validate loaded guild data
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Validating data of loaded guilds...");
+ TC_LOG_INFO("misc", "Validating data of loaded guilds...");
{
uint32 oldMSTime = getMSTime();
@@ -460,7 +460,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));
}
}
@@ -477,7 +477,7 @@ void GuildMgr::LoadGuildXpForLevel()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 xp for guild level definitions. DB table `guild_xp_for_level` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 xp for guild level definitions. DB table `guild_xp_for_level` is empty.");
return;
}
@@ -492,7 +492,7 @@ void GuildMgr::LoadGuildXpForLevel()
if (level >= sWorld->getIntConfig(CONFIG_GUILD_MAX_LEVEL))
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Unused (> Guild.MaxLevel in worldserver.conf) level %u in `guild_xp_for_level` table, ignoring.", uint32(level));
+ TC_LOG_INFO("misc", "Unused (> Guild.MaxLevel in worldserver.conf) level %u in `guild_xp_for_level` table, ignoring.", uint32(level));
continue;
}
@@ -506,12 +506,12 @@ void GuildMgr::LoadGuildXpForLevel()
{
if (!GuildXPperLevel[level])
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Level %i does not have XP for guild level data. Using data of level [%i] + 1660000.", level+1, level);
+ TC_LOG_ERROR("sql.sql", "Level %i does not have XP for guild level data. Using data of level [%i] + 1660000.", level+1, level);
GuildXPperLevel[level] = GuildXPperLevel[level - 1] + 1660000;
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u xp for guild level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u xp for guild level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void GuildMgr::LoadGuildRewards()
@@ -523,7 +523,7 @@ void GuildMgr::LoadGuildRewards()
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild reward definitions. DB table `guild_rewards` is empty.");
+ TC_LOG_ERROR("server.loading", ">> Loaded 0 guild reward definitions. DB table `guild_rewards` is empty.");
return;
}
@@ -541,19 +541,19 @@ void GuildMgr::LoadGuildRewards()
if (!sObjectMgr->GetItemTemplate(reward.Entry))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Guild rewards constains not existing item entry %u", reward.Entry);
+ TC_LOG_ERROR("server.loading", "Guild rewards constains not existing item entry %u", reward.Entry);
continue;
}
if (reward.AchievementId != 0 && (!sAchievementMgr->GetAchievement(reward.AchievementId)))
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Guild rewards constains not existing achievement entry %u", reward.AchievementId);
+ TC_LOG_ERROR("server.loading", "Guild rewards constains not existing achievement entry %u", reward.AchievementId);
continue;
}
if (reward.Standing >= MAX_REPUTATION_RANK)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Guild rewards contains wrong reputation standing %u, max is %u", uint32(reward.Standing), MAX_REPUTATION_RANK - 1);
+ TC_LOG_ERROR("server.loading", "Guild rewards contains wrong reputation standing %u, max is %u", uint32(reward.Standing), MAX_REPUTATION_RANK - 1);
continue;
}
@@ -561,7 +561,7 @@ void GuildMgr::LoadGuildRewards()
++count;
} while (result->NextRow());
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u guild reward definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u guild reward definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void GuildMgr::ResetTimes(bool week)
diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp
index 31404113eca..3a5a5ba8bf0 100644
--- a/src/server/game/Handlers/AddonHandler.cpp
+++ b/src/server/game/Handlers/AddonHandler.cpp
@@ -74,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);
@@ -128,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 6f48176db60..7767f5cadd9 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::HandleArenaTeamCreateOpcode(WorldPacket & recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_CREATE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ARENA_TEAM_CREATE");
uint32 slot, icon, iconcolor, border, bordercolor, background;
std::string name;
@@ -113,7 +113,7 @@ void WorldSession::HandleArenaTeamCreateOpcode(WorldPacket & recvData)
ArenaTeam* arenaTeam = new ArenaTeam;
if (!arenaTeam->Create(GUID_LOPART(_player->GetGUID()), type, name, background, icon, iconcolor, border, bordercolor))
{
- TC_LOG_ERROR(LOG_FILTER_ARENAS, "Arena team create failed.");
+ TC_LOG_ERROR("bg.arena", "Arena team create failed.");
delete arenaTeam;
return;
}
@@ -125,7 +125,7 @@ void WorldSession::HandleArenaTeamCreateOpcode(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;
@@ -195,7 +195,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());
@@ -204,12 +204,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)
@@ -242,7 +242,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);
@@ -250,7 +250,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;
@@ -292,7 +292,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;
@@ -314,7 +314,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;
@@ -360,7 +360,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 7e0ee4fd080..50e21edb1fd 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;
}
@@ -173,7 +173,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(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -182,14 +182,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;
}
@@ -292,7 +292,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) "
+ 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 " UI64FMTD " with buyout " UI64FMTD " 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());
@@ -317,7 +317,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(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
delete AH;
return;
@@ -342,7 +342,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 "
+ 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 " UI64FMTD " with buyout " UI64FMTD " 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());
@@ -393,7 +393,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;
@@ -408,7 +408,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;
}
@@ -522,7 +522,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;
@@ -532,7 +532,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;
}
@@ -567,7 +567,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Auction id: %u got non existing item (item guid : %u)!", auction->Id, auction->itemGUIDLow);
+ TC_LOG_ERROR("network", "Auction id: %u got non existing item (item guid : %u)!", auction->Id, auction->itemGUIDLow);
SendAuctionCommandResult(NULL, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -576,7 +576,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
{
SendAuctionCommandResult(NULL, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
//this code isn't possible ... maybe there should be assert
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CHEATER: %u tried to cancel auction (id: %u) of another player or auction is NULL", player->GetGUIDLow(), auctionId);
+ TC_LOG_ERROR("network", "CHEATER: %u tried to cancel auction (id: %u) of another player or auction is NULL", player->GetGUIDLow(), auctionId);
return;
}
@@ -597,7 +597,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
@@ -608,14 +608,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;
}
@@ -654,7 +654,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;
@@ -665,7 +665,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;
}
@@ -691,7 +691,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;
@@ -716,7 +716,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;
}
@@ -726,7 +726,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Auctionhouse search (GUID: %u TypeId: %u)",, list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
+ //TC_LOG_DEBUG("misc", "Auctionhouse search (GUID: %u TypeId: %u)",, list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
// GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
WorldPacket data(SMSG_AUCTION_LIST_RESULT, (4+4+4));
@@ -754,7 +754,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 16063e39657..c239881c56b 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)
@@ -104,7 +104,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;
}
@@ -115,7 +115,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
}
BattlegroundTypeId bgTypeId = BattlegroundTypeId(bgTypeId_);
- //TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID:"UI64FMTD" TypeId:%u)", guid, bgTypeId_);
+ //TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID:"UI64FMTD" TypeId:%u)", guid, bgTypeId_);
// can do this, since it's battleground, not arena
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, 0);
@@ -207,7 +207,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, _player, queueSlot, STATUS_WAIT_QUEUE, avgTime, ginfo->JoinTime, ginfo->ArenaType);
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
@@ -229,7 +229,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
if (!err)
{
- 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());
}
@@ -257,10 +257,10 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
WorldPacket data; // send status packet (in queue)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, member, queueSlot, STATUS_WAIT_QUEUE, avgTime, ginfo->JoinTime, ginfo->ArenaType);
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());
@@ -268,7 +268,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEGROUND_PLAYER_POSITIONS Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEGROUND_PLAYER_POSITIONS Message");
Battleground* bg = _player->GetBattleground();
if (!bg) // can't be received if player not in battleground
@@ -359,7 +359,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvDa
void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_PVP_LOG_DATA Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_PVP_LOG_DATA Message");
Battleground* bg = _player->GetBattleground();
if (!bg)
@@ -373,12 +373,12 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recvData*/)
sBattlegroundMgr->BuildPvpLogDataPacket(&data, bg);
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_PVP_LOG_DATA Message");
+ TC_LOG_DEBUG("network", "WORLD: Sent SMSG_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
@@ -386,7 +386,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;
}
@@ -397,7 +397,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket& recvData)
void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message");
uint32 time;
uint32 queueSlot;
@@ -431,7 +431,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
if (!_player->InBattlegroundQueue())
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player not in queue!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player not in queue!",
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
return;
}
@@ -439,7 +439,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
BattlegroundQueueTypeId bgQueueTypeId = _player->GetBattlegroundQueueTypeId(queueSlot);
if (bgQueueTypeId == BATTLEGROUND_QUEUE_NONE)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Invalid queueSlot!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Invalid queueSlot!",
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
return;
}
@@ -450,14 +450,14 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
GroupQueueInfo ginfo;
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player not in queue (No player Group Info)!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player not in queue (No player Group Info)!",
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
return;
}
// if action == 1, then instanceId is required
if (!ginfo.IsInvitedToBGInstanceGUID && action == 1)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player is not invited to any bg!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Player is not invited to any bg!",
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
return;
}
@@ -470,7 +470,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
{
if (action)
{
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Cant find BG with id %u!",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u. Cant find BG with id %u!",
GetPlayerInfo().c_str(), queueSlot, unk, time, action, ginfo.IsInvitedToBGInstanceGUID);
return;
}
@@ -478,12 +478,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 Slot: %u, Unk: %u, Time: %u, Action: %u.",
+ TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, Action: %u.",
GetPlayerInfo().c_str(), queueSlot, unk, time, action);
// get real bg type
@@ -505,12 +505,12 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
sBattlegroundMgr->BuildStatusFailedPacket(&data2, bg, _player, 0, 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_DEBUG(LOG_FILTER_NETWORKIO, "Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
+ TC_LOG_DEBUG("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;
}
@@ -557,7 +557,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
{
@@ -567,7 +567,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();
}
@@ -581,13 +581,13 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
if (!ginfo.ArenaType)
sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
- 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_BATTLEFIELD_LEAVE Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEFIELD_LEAVE Message");
// not allow leave battleground in combat
if (_player->IsInCombat())
@@ -601,7 +601,7 @@ void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recvData*/)
{
// empty opcode
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_STATUS Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEFIELD_STATUS Message");
WorldPacket data;
// we must update all queues here
@@ -665,7 +665,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");
uint8 arenaslot; // 2v2, 3v3 or 5v5
@@ -684,7 +684,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;
}
@@ -734,7 +734,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
err = grp->CanJoinBattlegroundQueue(bg, bgQueueTypeId, arenatype, arenatype, true, arenaslot);
if (!err)
{
- 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);
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, arenatype, true, false, arenaRating, matchmakerRating, ateamId);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
@@ -764,7 +764,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, member, queueSlot, STATUS_WAIT_QUEUE, avgTime, ginfo->JoinTime, arenatype);
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());
}
sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
@@ -778,23 +778,23 @@ 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);
}
void WorldSession::HandleRequestRatedBgInfo(WorldPacket & recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REQUEST_RATED_BG_INFO");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_REQUEST_RATED_BG_INFO");
uint8 unk;
recvData >> unk;
- TC_LOG_DEBUG(LOG_FILTER_BATTLEGROUND, "WorldSession::HandleRequestRatedBgInfo: unk = %u", unk);
+ TC_LOG_DEBUG("bg.battleground", "WorldSession::HandleRequestRatedBgInfo: unk = %u", unk);
/// @Todo: perfome research in this case
/// The unk fields are related to arenas
@@ -823,7 +823,7 @@ void WorldSession::HandleRequestRatedBgInfo(WorldPacket & recvData)
void WorldSession::HandleRequestPvpOptions(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REQUEST_PVP_OPTIONS_ENABLED");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_REQUEST_PVP_OPTIONS_ENABLED");
/// @Todo: perfome research in this case
WorldPacket data(SMSG_PVP_OPTIONS_ENABLED, 1);
@@ -840,14 +840,14 @@ void WorldSession::HandleRequestPvpOptions(WorldPacket& /*recvData*/)
void WorldSession::HandleRequestPvpReward(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REQUEST_PVP_REWARDS");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_REQUEST_PVP_REWARDS");
_player->SendPvpRewards();
}
void WorldSession::HandleRequestRatedBgStats(WorldPacket& /*recvData*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REQUEST_RATED_BG_STATS");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_REQUEST_RATED_BG_STATS");
WorldPacket data(SMSG_BATTLEFIELD_RATED_INFO, 29);
data << uint32(0); // Reward
diff --git a/src/server/game/Handlers/BattlefieldHandler.cpp b/src/server/game/Handlers/BattlefieldHandler.cpp
index 9cf9e59427e..54bf0857c19 100644
--- a/src/server/game/Handlers/BattlefieldHandler.cpp
+++ b/src/server/game/Handlers/BattlefieldHandler.cpp
@@ -241,7 +241,7 @@ void WorldSession::HandleBfQueueInviteResponse(WorldPacket& recvData)
recvData.ReadByteSeq(guid[0]);
recvData.ReadByteSeq(guid[5]);
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "HandleQueueInviteResponse: GUID:"UI64FMTD" Accepted:%u", (uint64)guid, accepted);
+ TC_LOG_ERROR("misc", "HandleQueueInviteResponse: GUID:"UI64FMTD" Accepted:%u", (uint64)guid, accepted);
Battlefield* bf = sBattlefieldMgr->GetBattlefieldByGUID(guid);
if (!bf)
@@ -276,7 +276,7 @@ void WorldSession::HandleBfEntryInviteResponse(WorldPacket& recvData)
recvData.ReadByteSeq(guid[7]);
recvData.ReadByteSeq(guid[5]);
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "HandleBattlefieldInviteResponse: GUID:"UI64FMTD" Accepted:%u", (uint64)guid, accepted);
+ TC_LOG_ERROR("misc", "HandleBattlefieldInviteResponse: GUID:"UI64FMTD" Accepted:%u", (uint64)guid, accepted);
Battlefield* bf = sBattlefieldMgr->GetBattlefieldByGUID(guid);
if (!bf)
@@ -311,7 +311,7 @@ void WorldSession::HandleBfExitRequest(WorldPacket& recvData)
recvData.ReadByteSeq(guid[7]);
recvData.ReadByteSeq(guid[6]);
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "HandleBfExitRequest: GUID:"UI64FMTD" ", (uint64)guid);
+ TC_LOG_ERROR("misc", "HandleBfExitRequest: GUID:"UI64FMTD" ", (uint64)guid);
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldByGUID(guid))
bf->AskToLeaveQueue(_player);
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index 72a0df34fe7..12b7971a620 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);
@@ -184,7 +184,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))
@@ -195,7 +195,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;
@@ -206,12 +206,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;
@@ -296,7 +296,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(),
@@ -342,7 +342,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))
@@ -364,7 +364,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();
@@ -462,7 +462,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))
{
@@ -489,7 +489,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);
@@ -529,7 +529,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);
@@ -559,7 +559,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);
@@ -593,7 +593,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);
@@ -620,7 +620,7 @@ void WorldSession::HandleCalendarComplain(WorldPacket& recvData)
uint64 inviteId;
recvData >> complainGUID >> eventId >> inviteId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COMPLAIN [" UI64FMTD "] EventId ["
+ TC_LOG_DEBUG("network", "CMSG_CALENDAR_COMPLAIN [" UI64FMTD "] EventId ["
UI64FMTD "] guid [" UI64FMTD "] InviteId [" UI64FMTD "]", guid, eventId, complainGUID, inviteId);
// what to do with complains?
@@ -631,7 +631,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);
@@ -644,7 +644,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));
@@ -661,7 +661,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);
@@ -684,7 +684,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 c5a3638e1f0..cfdb19585e1 100644
--- a/src/server/game/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
@@ -35,7 +35,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
channelName = recvPacket.ReadString(channelLength);
password = recvPacket.ReadString(passLength);
- 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)
@@ -68,7 +68,7 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
uint32 length = recvPacket.ReadBits(8);
channelName = recvPacket.ReadString(length);
- 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())
@@ -87,7 +87,7 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket)
uint32 length = recvPacket.ReadBits(8);
std::string channelName = recvPacket.ReadString(length);
- 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());
@@ -104,7 +104,7 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
std::string channelName = recvPacket.ReadString(nameLength);
std::string password = recvPacket.ReadString(passLength);
- 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()))
@@ -120,7 +120,7 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
- 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))
@@ -136,7 +136,7 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
uint32 length = recvPacket.ReadBits(8);
std::string channelName = recvPacket.ReadString(length);
- 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()))
@@ -152,7 +152,7 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
- 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))
@@ -171,7 +171,7 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
std::string channelName = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
- 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))
@@ -190,7 +190,7 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
std::string channelName = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
- 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))
@@ -209,7 +209,7 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
- 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))
@@ -228,7 +228,7 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
- 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))
@@ -247,7 +247,7 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
std::string channelName = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
- 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))
@@ -269,7 +269,7 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
targetName = recvPacket.ReadString(nameLength);
channelName = recvPacket.ReadString(channelLength);
- 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))
@@ -288,7 +288,7 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
- 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))
@@ -304,7 +304,7 @@ void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
uint32 length = recvPacket.ReadBits(8);
std::string channelName = recvPacket.ReadString(length);
- 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()))
@@ -323,14 +323,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);
@@ -347,7 +347,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 126be2978c1..279befb88b1 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -241,7 +241,7 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
{
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());
Player::BuildEnumData(result, &dataBuffer, &bitBuffer);
@@ -335,7 +335,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;
}
@@ -344,7 +344,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;
}
@@ -352,7 +352,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;
}
@@ -361,7 +361,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;
}
@@ -393,7 +393,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;
}
@@ -660,7 +660,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);
@@ -708,7 +708,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());
@@ -767,10 +767,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))
@@ -792,14 +792,14 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
{
if (PlayerLoading() || GetPlayer() != NULL)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player tries to login again, AccountId = %d", GetAccountId());
+ TC_LOG_ERROR("network", "Player tries to login again, AccountId = %d", GetAccountId());
return;
}
m_playerLoading = true;
ObjectGuid playerGuid;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd Player Logon Message");
+ TC_LOG_DEBUG("network", "WORLD: Recvd Player Logon Message");
playerGuid[2] = recvData.ReadBit();
playerGuid[3] = recvData.ReadBit();
playerGuid[0] = recvData.ReadBit();
@@ -818,11 +818,11 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
recvData.ReadByteSeq(playerGuid[1]);
recvData.ReadByteSeq(playerGuid[4]);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Character (Guid: %u) logging in", GUID_LOPART(playerGuid));
+ TC_LOG_DEBUG("network", "Character (Guid: %u) logging in", GUID_LOPART(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;
}
@@ -840,7 +840,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
void WorldSession::HandleLoadScreenOpcode(WorldPacket& recvPacket)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "WORLD: Recvd CMSG_LOAD_SCREEN");
+ TC_LOG_INFO("misc", "WORLD: Recvd CMSG_LOAD_SCREEN");
uint32 mapID;
recvPacket >> mapID;
@@ -942,13 +942,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());
@@ -1022,7 +1022,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
else
{
// remove wrong guild data
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "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("misc", "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);
}
}
@@ -1133,7 +1133,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))
@@ -1147,7 +1147,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;
@@ -1161,7 +1161,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();
}
@@ -1195,7 +1195,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);
@@ -1203,7 +1203,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;
@@ -1213,14 +1213,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);
}
@@ -1311,7 +1311,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);
@@ -1415,7 +1415,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;
@@ -1492,7 +1492,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;
}
@@ -1515,7 +1515,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();
@@ -1599,7 +1599,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);
@@ -1635,7 +1635,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);
@@ -1687,7 +1687,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);
@@ -1700,7 +1700,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)
{
@@ -1710,7 +1710,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)
@@ -1759,7 +1759,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();
@@ -2290,7 +2290,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);
@@ -2315,13 +2315,13 @@ void WorldSession::HandleRandomizeCharNameOpcode(WorldPacket& recvData)
if (!Player::IsValidRace(race))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Invalid race (%u) sent by accountId: %u", race, GetAccountId());
+ TC_LOG_ERROR("misc", "Invalid race (%u) sent by accountId: %u", race, GetAccountId());
return;
}
if (!Player::IsValidGender(gender))
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "Invalid gender (%u) sent by accountId: %u", gender, GetAccountId());
+ TC_LOG_ERROR("misc", "Invalid gender (%u) sent by accountId: %u", gender, GetAccountId());
return;
}
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index fa8731946e7..d90cc09bede 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -87,21 +87,21 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
type = CHAT_MSG_RAID_WARNING;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleMessagechatOpcode : Unknown chat opcode (%u)", recvData.GetOpcode());
+ TC_LOG_ERROR("network", "HandleMessagechatOpcode : Unknown chat opcode (%u)", recvData.GetOpcode());
recvData.hexlike();
return;
}
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;
}
Player* sender = GetPlayer();
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "CHAT: packet received. type %u, lang %u", type, lang);
+ //TC_LOG_DEBUG("misc", "CHAT: packet received. type %u, lang %u", type, lang);
// no language sent with emote packet.
if (type != CHAT_MSG_EMOTE && type != CHAT_MSG_AFK && type != CHAT_MSG_DND)
@@ -163,7 +163,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();
@@ -282,7 +282,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))
@@ -516,7 +516,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;
}
}
@@ -547,7 +547,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
type = CHAT_MSG_WHISPER;
break;
default:
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleAddonMessagechatOpcode: Unknown addon chat opcode (%u)", recvData.GetOpcode());
+ TC_LOG_ERROR("network", "HandleAddonMessagechatOpcode: Unknown addon chat opcode (%u)", recvData.GetOpcode());
recvData.hexlike();
return;
}
@@ -653,7 +653,7 @@ void WorldSession::HandleAddonMessagechatOpcode(WorldPacket& recvData)
}
default:
{
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "HandleAddonMessagechatOpcode: unknown addon message type %u", type);
+ TC_LOG_ERROR("misc", "HandleAddonMessagechatOpcode: unknown addon message type %u", type);
break;
}
}
@@ -768,7 +768,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData)
{
ObjectGuid guid;
uint8 unk;
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_CHAT_IGNORED");
+ //TC_LOG_DEBUG("network", "WORLD: Received CMSG_CHAT_IGNORED");
recvData >> unk; // probably related to spam reporting
guid[5] = recvData.ReadBit();
@@ -800,7 +800,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 2f32b53fd0b..1bca1a55c4c 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -60,7 +60,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");
ObjectGuid crossRealmGuid; // unused
@@ -323,7 +323,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupInviteResponseOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_INVITE_RESPONSE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_INVITE_RESPONSE");
recvData.ReadBit(); // unk always 0
bool accept = recvData.ReadBit();
@@ -344,7 +344,7 @@ void WorldSession::HandleGroupInviteResponseOpcode(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;
}
@@ -400,7 +400,7 @@ void WorldSession::HandleGroupInviteResponseOpcode(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;
@@ -410,7 +410,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;
}
@@ -449,7 +449,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;
@@ -461,7 +461,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;
}
@@ -494,7 +494,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;
@@ -515,7 +515,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupSetRolesOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_SET_ROLES");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_SET_ROLES");
uint32 newRole;
ObjectGuid guid1; // Assigner GUID
@@ -589,7 +589,7 @@ void WorldSession::HandleGroupSetRolesOpcode(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)
@@ -612,7 +612,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;
@@ -663,7 +663,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;
@@ -672,7 +672,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recvData)
recvData >> x;
recvData >> y;
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "Received opcode MSG_MINIMAP_PING X: %f, Y: %f", x, y);
+ //TC_LOG_DEBUG("misc", "Received opcode MSG_MINIMAP_PING X: %f, Y: %f", x, y);
/** error handling **/
/********************/
@@ -687,7 +687,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;
@@ -701,7 +701,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recvData)
// everything's fine, do it
roll = urand(minimum, maximum);
- //TC_LOG_DEBUG(LOG_FILTER_GENERAL, "ROLL: MIN: %u, MAX: %u, ROLL: %u", minimum, maximum, roll);
+ //TC_LOG_DEBUG("misc", "ROLL: MIN: %u, MAX: %u, ROLL: %u", minimum, maximum, roll);
WorldPacket data(MSG_RANDOM_ROLL, 4+4+4+8);
data << uint32(minimum);
@@ -716,7 +716,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)
@@ -744,7 +744,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)
@@ -773,7 +773,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();
@@ -811,7 +811,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupSwapSubGroupOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_SWAP_SUB_GROUP");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_SWAP_SUB_GROUP");
std::string unk1;
std::string unk2;
@@ -821,7 +821,7 @@ void WorldSession::HandleGroupSwapSubGroupOpcode(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)
@@ -842,7 +842,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)
@@ -876,7 +876,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)
@@ -1163,7 +1163,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;
@@ -1349,7 +1349,7 @@ void WorldSession::HandleRequestRaidInfoOpcode(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");
bool passOnLoot;
recvData >> passOnLoot; // 1 always pass, 0 do not pass
@@ -1358,7 +1358,7 @@ void WorldSession::HandleOptOutOfLootOpcode(WorldPacket& recvData)
if (!GetPlayer()) // needed because STATUS_AUTHED
{
if (passOnLoot)
- 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/GuildFinderHandler.cpp b/src/server/game/Handlers/GuildFinderHandler.cpp
index 6855dac43fa..a2ab3877ed8 100644
--- a/src/server/game/Handlers/GuildFinderHandler.cpp
+++ b/src/server/game/Handlers/GuildFinderHandler.cpp
@@ -24,7 +24,7 @@
void WorldSession::HandleGuildFinderAddRecruit(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_ADD_RECRUIT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_ADD_RECRUIT");
if (sGuildFinderMgr->GetAllMembershipRequestsForPlayer(GetPlayer()->GetGUIDLow()).size() == 10)
return;
@@ -75,7 +75,7 @@ void WorldSession::HandleGuildFinderAddRecruit(WorldPacket& recvPacket)
void WorldSession::HandleGuildFinderBrowse(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_BROWSE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_BROWSE");
uint32 classRoles = 0;
uint32 availability = 0;
uint32 guildInterests = 0;
@@ -176,7 +176,7 @@ void WorldSession::HandleGuildFinderBrowse(WorldPacket& recvPacket)
void WorldSession::HandleGuildFinderDeclineRecruit(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_DECLINE_RECRUIT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_DECLINE_RECRUIT");
ObjectGuid playerGuid;
@@ -206,7 +206,7 @@ void WorldSession::HandleGuildFinderDeclineRecruit(WorldPacket& recvPacket)
void WorldSession::HandleGuildFinderGetApplications(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_GET_APPLICATIONS"); // Empty opcode
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_GET_APPLICATIONS"); // Empty opcode
std::list<MembershipRequest> applicatedGuilds = sGuildFinderMgr->GetAllMembershipRequestsForPlayer(GetPlayer()->GetGUIDLow());
uint32 applicationsCount = applicatedGuilds.size();
@@ -268,7 +268,7 @@ void WorldSession::HandleGuildFinderGetApplications(WorldPacket& /*recvPacket*/)
// Lists all recruits for a guild - Misses times
void WorldSession::HandleGuildFinderGetRecruits(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_GET_RECRUITS");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_GET_RECRUITS");
uint32 unkTime = 0;
recvPacket >> unkTime;
@@ -337,7 +337,7 @@ void WorldSession::HandleGuildFinderGetRecruits(WorldPacket& recvPacket)
void WorldSession::HandleGuildFinderPostRequest(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_POST_REQUEST"); // Empty opcode
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_POST_REQUEST"); // Empty opcode
Player* player = GetPlayer();
@@ -372,7 +372,7 @@ void WorldSession::HandleGuildFinderPostRequest(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildFinderRemoveRecruit(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_REMOVE_RECRUIT");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_REMOVE_RECRUIT");
ObjectGuid guildGuid;
@@ -403,7 +403,7 @@ void WorldSession::HandleGuildFinderRemoveRecruit(WorldPacket& recvPacket)
// Sent any time a guild master sets an option in the interface and when listing / unlisting his guild
void WorldSession::HandleGuildFinderSetGuildPost(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LF_GUILD_SET_GUILD_POST");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_LF_GUILD_SET_GUILD_POST");
uint32 classRoles = 0;
uint32 availability = 0;
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index b21b0a90c3d..975690d4c92 100644
--- a/src/server/game/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
@@ -33,7 +33,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
uint64 guildGuid, playerGuid;
recvPacket >> guildGuid >> playerGuid;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_QUERY [%s]: Guild: %u Target: %u",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_QUERY [%s]: Guild: %u Target: %u",
GetPlayerInfo().c_str(), GUID_LOPART(guildGuid), GUID_LOPART(playerGuid));
if (Guild* guild = sGuildMgr->GetGuildByGuid(guildGuid))
@@ -46,7 +46,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
uint32 nameLength = recvPacket.ReadBits(7);
std::string invitedName = recvPacket.ReadString(nameLength);
- 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)
recvPacket.ReadByteSeq(playerGuid[3]);
recvPacket.ReadByteSeq(playerGuid[0]);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_REMOVE [%s]: Target: %u", GetPlayerInfo().c_str(), GUID_LOPART(playerGuid));
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_REMOVE [%s]: Target: %u", GetPlayerInfo().c_str(), GUID_LOPART(playerGuid));
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRemoveMember(this, playerGuid);
@@ -82,7 +82,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ACCEPT [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_ACCEPT [%s]", GetPlayerInfo().c_str());
if (!GetPlayer()->GetGuildId())
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited()))
@@ -91,7 +91,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);
@@ -99,7 +99,7 @@ void WorldSession::HandleGuildDeclineOpcode(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());
recvPacket.rfinish();
if (Guild* guild = GetPlayer()->GetGuild())
@@ -130,7 +130,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
recvPacket.ReadByteSeq(targetGuid[1]);
recvPacket.ReadByteSeq(targetGuid[7]);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_PROMOTE [%s]: Target: %u", GetPlayerInfo().c_str(), GUID_LOPART(targetGuid));
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_PROMOTE [%s]: Target: %u", GetPlayerInfo().c_str(), GUID_LOPART(targetGuid));
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleUpdateMemberRank(this, targetGuid, false);
@@ -158,7 +158,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
recvPacket.ReadByteSeq(targetGuid[4]);
recvPacket.ReadByteSeq(targetGuid[3]);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DEMOTE [%s]: Target: %u", GetPlayerInfo().c_str(), GUID_LOPART(targetGuid));
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_DEMOTE [%s]: Target: %u", GetPlayerInfo().c_str(), GUID_LOPART(targetGuid));
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleUpdateMemberRank(this, targetGuid, true);
@@ -206,7 +206,7 @@ void WorldSession::HandleGuildAssignRankOpcode(WorldPacket& recvPacket)
recvPacket.ReadByteSeq(targetGuid[6]);
recvPacket.ReadByteSeq(setterGuid[7]);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ASSIGN_MEMBER_RANK [%s]: Target: %u Rank: %u, Issuer: %u",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_ASSIGN_MEMBER_RANK [%s]: Target: %u Rank: %u, Issuer: %u",
GetPlayerInfo().c_str(), GUID_LOPART(targetGuid), rankId, GUID_LOPART(setterGuid));
if (Guild* guild = GetPlayer()->GetGuild())
@@ -215,7 +215,7 @@ void WorldSession::HandleGuildAssignRankOpcode(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);
@@ -223,7 +223,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);
@@ -233,7 +233,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
{
uint32 motdLength = recvPacket.ReadBits(11);
std::string motd = recvPacket.ReadString(motdLength);
- 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);
@@ -264,7 +264,7 @@ void WorldSession::HandleGuildSetNoteOpcode(WorldPacket& recvPacket)
std::string note = recvPacket.ReadString(noteLength);
recvPacket.ReadByteSeq(playerGuid[2]);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_SET_NOTE [%s]: Target: %u, Note: %s, Public: %u",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_SET_NOTE [%s]: Target: %u, Note: %s, Public: %u",
GetPlayerInfo().c_str(), GUID_LOPART(playerGuid), note.c_str(), ispublic);
if (Guild* guild = GetPlayer()->GetGuild())
@@ -293,7 +293,7 @@ void WorldSession::HandleGuildQueryRanksOpcode(WorldPacket& recvPacket)
recvPacket.ReadByteSeq(guildGuid[6]);
recvPacket.ReadByteSeq(guildGuid[2]);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_QUERY_RANKS [%s]: Guild: %u",
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_QUERY_RANKS [%s]: Guild: %u",
GetPlayerInfo().c_str(), GUID_LOPART(guildGuid));
if (Guild* guild = sGuildMgr->GetGuildByGuid(guildGuid))
@@ -309,7 +309,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
uint32 length = recvPacket.ReadBits(7);
std::string rankName = recvPacket.ReadString(length);
- 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);
@@ -320,7 +320,7 @@ void WorldSession::HandleGuildDelRankOpcode(WorldPacket& recvPacket)
uint32 rankId;
recvPacket >> rankId;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DEL_RANK [%s]: Rank: %u", GetPlayerInfo().c_str(), rankId);
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_DEL_RANK [%s]: Rank: %u", GetPlayerInfo().c_str(), rankId);
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRemoveRank(this, rankId);
@@ -331,7 +331,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
uint32 length = recvPacket.ReadBits(12);
std::string info = recvPacket.ReadString(length);
- 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);
@@ -345,7 +345,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()
@@ -368,7 +368,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);
@@ -376,7 +376,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket& /* recvPacket */)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendMoneyInfo(this);
@@ -384,7 +384,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket& /* recvPacket */)
void WorldSession::HandleGuildPermissions(WorldPacket& /* recvPacket */)
{
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendPermissions(this);
@@ -397,7 +397,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket& recvPacket)
bool sendAllSlots;
recvPacket >> 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);
GameObject const* const go = GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK);
@@ -423,7 +423,7 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket& recvPacket)
recvPacket >> guid >> tabId >> sendAllSlots;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, AllSlots: %u"
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, AllSlots: %u"
, GetPlayerInfo().c_str(), guid, tabId, sendAllSlots);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -437,7 +437,7 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket& recvPacket)
uint64 money;
recvPacket >> guid >> money;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [" UI64FMTD "], money: " UI64FMTD,
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [" UI64FMTD "], money: " UI64FMTD,
GetPlayerInfo().c_str(), guid, money);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -452,7 +452,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvPacket)
uint64 money;
recvPacket >> guid >> money;
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [" UI64FMTD "], money: " UI64FMTD,
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [" UI64FMTD "], money: " UI64FMTD,
GetPlayerInfo().c_str(), guid, money);
if (money && GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -462,7 +462,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvPacket)
void WorldSession::HandleGuildBankSwapItems(WorldPacket& recvPacket)
{
- 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;
recvPacket >> GoGuid;
@@ -550,7 +550,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket& recvPacket)
uint8 tabId;
recvPacket >> 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 (!guid || GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -565,7 +565,7 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket& recvPacket)
recvPacket >> 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())
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -578,7 +578,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket& recvPacket)
uint32 tabId;
recvPacket >> 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);
@@ -589,7 +589,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recvPacket)
uint8 tabId;
recvPacket >> 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);
@@ -603,7 +603,7 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket& recvPacket)
uint32 textLen = recvPacket.ReadBits(14);
std::string text = recvPacket.ReadString(textLen);
- 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);
@@ -611,7 +611,7 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket& recvPacket)
void WorldSession::HandleGuildQueryXPOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUERY_GUILD_XP");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUERY_GUILD_XP");
ObjectGuid guildGuid;
@@ -633,7 +633,7 @@ void WorldSession::HandleGuildQueryXPOpcode(WorldPacket& recvPacket)
recvPacket.ReadByteSeq(guildGuid[0]);
recvPacket.ReadByteSeq(guildGuid[4]);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_QUERY_GUILD_XP [%s]: Guild: %u", GetPlayerInfo().c_str(), GUID_LOPART(guildGuid));
+ TC_LOG_DEBUG("guild", "CMSG_QUERY_GUILD_XP [%s]: Guild: %u", GetPlayerInfo().c_str(), GUID_LOPART(guildGuid));
if (Guild* guild = sGuildMgr->GetGuildByGuid(guildGuid))
if (guild->IsMember(_player->GetGUID()))
@@ -676,14 +676,14 @@ void WorldSession::HandleGuildSetRankPermissionsOpcode(WorldPacket& recvPacket)
uint32 nameLength = recvPacket.ReadBits(7);
std::string rankName = recvPacket.ReadString(nameLength);
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_SET_RANK_PERMISSIONS [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), newRankId);
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_SET_RANK_PERMISSIONS [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), newRankId);
guild->HandleSetRankInfo(this, newRankId, rankName, newRights, moneyPerDay, rightsAndSlots);
}
void WorldSession::HandleGuildRequestPartyState(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_REQUEST_PARTY_STATE");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_GUILD_REQUEST_PARTY_STATE");
ObjectGuid guildGuid;
@@ -778,7 +778,7 @@ void WorldSession::HandleGuildRewardsQueryOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildQueryNewsOpcode(WorldPacket& recvPacket)
{
recvPacket.read_skip<uint32>();
- TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_QUERY_NEWS [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG("guild", "CMSG_GUILD_QUERY_NEWS [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendNewsUpdate(this);
}
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 3b8659c7d6a..796e70e688f 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -32,7 +32,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;
@@ -65,7 +65,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;
@@ -114,7 +114,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;
@@ -144,7 +144,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;
@@ -238,7 +238,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket& recvData)
void WorldSession::HandleDestroyItemOpcode(WorldPacket& recvData)
{
- //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: CMSG_DESTROY_ITEM");
+ //TC_LOG_DEBUG("network", "WORLD: CMSG_DESTROY_ITEM");
uint8 bag, slot, count, data1, data2, data3;
recvData >> bag >> slot >> count >> data1 >> data2 >> data3;
@@ -294,12 +294,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();
@@ -311,7 +311,7 @@ void WorldSession::HandleReadItem(WorldPacket& recvData)
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;
@@ -323,7 +323,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);
return;
}
@@ -385,7 +385,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);
return;
}
@@ -423,7 +423,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;
@@ -432,7 +432,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);
return;
}
@@ -471,7 +471,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;
@@ -504,7 +504,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, bagGuid;
uint32 item, slot, count;
uint8 itemType; // 1 = item, 2 = currency
@@ -533,7 +533,7 @@ void WorldSession::HandleBuyItemOpcode(WorldPacket& recvData)
else if (itemType == ITEM_VENDOR_TYPE_CURRENCY)
GetPlayer()->BuyCurrencyFromVendorSlot(vendorguid, slot, item, count);
else
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: received wrong itemType (%u) in HandleBuyItemOpcode", itemType);
+ TC_LOG_DEBUG("network", "WORLD: received wrong itemType (%u) in HandleBuyItemOpcode", itemType);
}
void WorldSession::HandleListInventoryOpcode(WorldPacket& recvData)
@@ -545,19 +545,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);
return;
}
@@ -614,7 +614,7 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(vendor->GetEntry(), vendorItem->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(), vendorItem->item);
+ TC_LOG_DEBUG("condition", "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), vendorItem->item);
continue;
}
@@ -724,7 +724,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;
@@ -775,7 +775,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;
@@ -795,7 +795,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);
@@ -828,11 +828,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)
@@ -859,11 +859,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)
@@ -921,14 +921,14 @@ void WorldSession::SendItemEnchantTimeUpdate(uint64 Playerguid, uint64 Itemguid,
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)
@@ -1032,7 +1032,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];
@@ -1239,7 +1239,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 slot;
@@ -1263,7 +1263,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
@@ -1271,7 +1271,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;
}
@@ -1280,14 +1280,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;
}
@@ -1304,7 +1304,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, 14); // guess size
@@ -1324,7 +1324,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket& recvData )
void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TRANSMOGRIFY_ITEMS");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_TRANSMOGRIFY_ITEMS");
Player* player = GetPlayer();
// Read data
@@ -1332,7 +1332,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
if (count >= EQUIPMENT_SLOT_END)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) sent a wrong count (%u) when transmogrifying items.", player->GetGUIDLow(), player->GetName().c_str(), count);
+ TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) sent a wrong count (%u) when transmogrifying items.", player->GetGUIDLow(), player->GetName().c_str(), count);
recvData.rfinish();
return;
}
@@ -1394,7 +1394,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
if (!player->GetNPCIfCanInteractWith(npcGuid, UNIT_NPC_FLAG_TRANSMOGRIFIER))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
+ TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
return;
}
@@ -1404,7 +1404,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
// slot of the transmogrified item
if (slots[i] >= EQUIPMENT_SLOT_END)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify an item (lowguid: %u) with a wrong slot (%u) when transmogrifying items.", player->GetGUIDLow(), player->GetName().c_str(), GUID_LOPART(itemGuids[i]), slots[i]);
+ TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify an item (lowguid: %u) with a wrong slot (%u) when transmogrifying items.", player->GetGUIDLow(), player->GetName().c_str(), GUID_LOPART(itemGuids[i]), slots[i]);
return;
}
@@ -1414,7 +1414,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(newEntries[i]);
if (!proto)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify to an invalid item (entry: %u).", player->GetGUIDLow(), player->GetName().c_str(), newEntries[i]);
+ TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify to an invalid item (entry: %u).", player->GetGUIDLow(), player->GetName().c_str(), newEntries[i]);
return;
}
}
@@ -1426,7 +1426,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
itemTransmogrifier = player->GetItemByGuid(itemGuids[i]);
if (!itemTransmogrifier)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify with an invalid item (lowguid: %u).", player->GetGUIDLow(), player->GetName().c_str(), GUID_LOPART(itemGuids[i]));
+ TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify with an invalid item (lowguid: %u).", player->GetGUIDLow(), player->GetName().c_str(), GUID_LOPART(itemGuids[i]));
return;
}
}
@@ -1435,7 +1435,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
Item* itemTransmogrified = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slots[i]);
if (!itemTransmogrified)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify an invalid item in a valid slot (slot: %u).", player->GetGUIDLow(), player->GetName().c_str(), slots[i]);
+ TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) tried to transmogrify an invalid item in a valid slot (slot: %u).", player->GetGUIDLow(), player->GetName().c_str(), slots[i]);
return;
}
@@ -1443,14 +1443,14 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
//// has to be able to equip item transmogrified item
//if (!player->CanEquipItem(slots[i], tempDest, itemTransmogrified, true, true))
//{
- // TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) can't equip the item to be transmogrified (slot: %u, entry: %u).", player->GetGUIDLow(), player->GetName().c_str(), slots[i], itemTransmogrified->GetEntry());
+ // TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) can't equip the item to be transmogrified (slot: %u, entry: %u).", player->GetGUIDLow(), player->GetName().c_str(), slots[i], itemTransmogrified->GetEntry());
// return;
//}
//
//// has to be able to equip item transmogrifier item
//if (!player->CanEquipItem(slots[i], tempDest, itemTransmogrifier, true, true))
//{
- // TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) can't equip the transmogrifier item (slot: %u, entry: %u).", player->GetGUIDLow(), player->GetName().c_str(), slots[i], itemTransmogrifier->GetEntry());
+ // TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) can't equip the transmogrifier item (slot: %u, entry: %u).", player->GetGUIDLow(), player->GetName().c_str(), slots[i], itemTransmogrifier->GetEntry());
// return;
//}
@@ -1463,7 +1463,7 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
{
if (!Item::CanTransmogrifyItemWithItem(itemTransmogrified, itemTransmogrifier))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) failed CanTransmogrifyItemWithItem (%u with %u).", player->GetGUIDLow(), player->GetName().c_str(), itemTransmogrified->GetEntry(), itemTransmogrifier->GetEntry());
+ TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (GUID: %u, name: %s) failed CanTransmogrifyItemWithItem (%u with %u).", player->GetGUIDLow(), player->GetName().c_str(), itemTransmogrified->GetEntry(), itemTransmogrifier->GetEntry());
return;
}
@@ -1531,7 +1531,7 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
if (!player->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_REFORGER))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleReforgeItemOpcode - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: HandleReforgeItemOpcode - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(guid));
SendReforgeResult(false);
return;
}
@@ -1540,7 +1540,7 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
if (!item)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to reforge an invalid/non-existant item.", player->GetGUIDLow(), player->GetName().c_str());
+ TC_LOG_DEBUG("network", "WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to reforge an invalid/non-existant item.", player->GetGUIDLow(), player->GetName().c_str());
SendReforgeResult(false);
return;
}
@@ -1558,7 +1558,7 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
ItemReforgeEntry const* stats = sItemReforgeStore.LookupEntry(reforgeEntry);
if (!stats)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to reforge an item with invalid reforge entry (%u).", player->GetGUIDLow(), player->GetName().c_str(), reforgeEntry);
+ TC_LOG_DEBUG("network", "WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to reforge an item with invalid reforge entry (%u).", player->GetGUIDLow(), player->GetName().c_str(), reforgeEntry);
SendReforgeResult(false);
return;
}
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index 9c0cfe41c5e..69b382be37e 100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -100,7 +100,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
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;
}
@@ -115,7 +115,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
newDungeons.insert((dungeon & 0x00FFFFFF)); // remove the type from the dungeon entry
}
- 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);
@@ -151,7 +151,7 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& recvData)
recvData.ReadByteSeq(leaveGuid[1]);
recvData.ReadByteSeq(leaveGuid[5]);
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LEAVE %s in group: %u sent guid " UI64FMTD ".",
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_LEAVE %s in group: %u sent guid " UI64FMTD ".",
GetPlayerInfo().c_str(), group ? 1 : 0, uint64(leaveGuid));
// Check cheating - only leader can leave the queue
@@ -209,7 +209,7 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
recvData.ReadByteSeq(guid1[0]);
recvData.ReadByteSeq(guid1[2]);
- 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(), proposalID, accept ? 1 : 0);
sLFGMgr->UpdateProposal(proposalID, GetPlayer()->GetGUID(), accept);
}
@@ -222,12 +222,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);
}
@@ -237,7 +237,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);
@@ -249,7 +249,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);
}
@@ -259,7 +259,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);
}
@@ -267,7 +267,7 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
void WorldSession::HandleLfgGetLockInfoOpcode(WorldPacket& recvData)
{
bool forPlayer = recvData.ReadBit();
- TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LOCK_INFO_REQUEST %s for %s", GetPlayerInfo().c_str(), (forPlayer ? "player" : "party"));
+ TC_LOG_DEBUG("lfg", "CMSG_LFG_LOCK_INFO_REQUEST %s for %s", GetPlayerInfo().c_str(), (forPlayer ? "player" : "party"));
if (forPlayer)
SendLfgPlayerLockInfo();
@@ -289,7 +289,7 @@ void WorldSession::SendLfgPlayerLockInfo()
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
@@ -373,7 +373,7 @@ void WorldSession::SendLfgPartyLockInfo()
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4 + 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);
@@ -383,7 +383,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);
}
@@ -392,14 +392,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());
if (!GetPlayer()->isUsingLfg())
return;
@@ -451,7 +451,7 @@ void WorldSession::SendLfgUpdateStatus(lfg::LfgUpdateData const& updateData, boo
break;
}
- TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_STATUS %s updatetype: %u, party %s",
+ TC_LOG_DEBUG("lfg", "SMSG_LFG_UPDATE_STATUS %s updatetype: %u, party %s",
GetPlayerInfo().c_str(), updateData.updateType, party ? "true" : "false");
WorldPacket data(SMSG_LFG_UPDATE_STATUS, 1 + 8 + 3 + 2 + 1 + updateData.comment.length() + 4 + 4 + 1 + 1 + 1 + 4 + size);
@@ -494,7 +494,7 @@ void WorldSession::SendLfgUpdateStatus(lfg::LfgUpdateData const& updateData, boo
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);
@@ -512,7 +512,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
@@ -559,7 +559,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 + 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);
@@ -626,7 +626,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,
@@ -674,7 +674,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() + rewardData.quest->GetRewCurrencyCount();
@@ -702,7 +702,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),
@@ -731,7 +731,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
uint32 queueId = sLFGMgr->GetQueueId(_player->GetGUID());
time_t joinTime = sLFGMgr->GetQueueJoinTime(_player->GetGUID());
- 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
@@ -825,7 +825,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?
@@ -834,14 +834,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);
@@ -850,7 +850,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
@@ -860,7 +860,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 3dd0ab9f6d2..9a32df7d4af 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -34,7 +34,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;
@@ -102,7 +102,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();
@@ -226,7 +226,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;
@@ -244,7 +244,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
@@ -423,7 +423,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;
@@ -452,7 +452,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 4542b264ab1..9b75219cc93 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -131,7 +131,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, " UI64FMTD " copper and " UI64FMTD " COD copper with unk1 = %u, unk2 = %u",
player->GetGUIDLow(), receiverName.c_str(), subject.c_str(), body.c_str(),
items_count, money, COD, unk1, unk2);
@@ -139,7 +139,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, " UI64FMTD " copper and " UI64FMTD " 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);
@@ -767,7 +767,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 54448766885..1fa912f9732 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -59,7 +59,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>();
@@ -76,7 +76,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();
}
@@ -89,7 +89,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;
@@ -108,7 +108,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;
}
}
@@ -117,13 +117,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;
}
@@ -133,7 +133,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)
@@ -174,7 +174,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)
@@ -205,7 +205,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)
@@ -213,7 +213,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)
@@ -226,7 +226,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;
@@ -363,12 +363,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);
@@ -418,12 +418,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())
@@ -447,7 +447,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)
@@ -486,7 +486,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;
@@ -512,7 +512,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::HandleStandStateChangeOpcode(WorldPacket& recvData)
void WorldSession::HandleContactListOpcode(WorldPacket& recvData)
{
recvData.read_skip<uint32>(); // always 1
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_CONTACT_LIST");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_CONTACT_LIST");
_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;
@@ -714,12 +714,12 @@ void WorldSession::HandleBugOpcode(WorldPacket& recvData)
type = recvData.ReadString(typelen);
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);
@@ -731,7 +731,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;
@@ -768,7 +768,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;
@@ -812,12 +812,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;
}
@@ -825,14 +825,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;
}
@@ -846,7 +846,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;
}
@@ -877,7 +877,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;
}
@@ -939,12 +939,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;
@@ -964,7 +964,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;
}
@@ -975,7 +975,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;
}
@@ -994,12 +994,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;
@@ -1015,7 +1015,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;
}
@@ -1042,7 +1042,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);
@@ -1052,17 +1052,17 @@ 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)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_MOVE_TIME_SKIPPED");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_MOVE_TIME_SKIPPED");
ObjectGuid guid;
uint32 time;
@@ -1093,7 +1093,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
@@ -1105,7 +1105,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
@@ -1126,7 +1126,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
@@ -1152,7 +1152,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
@@ -1170,7 +1170,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;
}
@@ -1194,12 +1194,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;
}
@@ -1251,7 +1251,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recvData)
if (!player)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, (uint64)guid);
+ TC_LOG_DEBUG("network", "CMSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, (uint64)guid);
return;
}
@@ -1296,16 +1296,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))
@@ -1316,7 +1316,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;
@@ -1371,13 +1371,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;
@@ -1413,12 +1413,12 @@ void WorldSession::HandleComplainOpcode(WorldPacket& recvData)
data << uint8(0); // value 0xC generates a "CalendarError" in client.
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";
@@ -1438,22 +1438,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);
}
@@ -1462,7 +1462,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;
@@ -1481,20 +1481,20 @@ 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_timeSyncQueue.front())
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Wrong time sync counter from player %s (cheater?)", _player->GetName().c_str());
+ TC_LOG_ERROR("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;
_player->m_timeSyncQueue.pop();
@@ -1502,7 +1502,7 @@ void WorldSession::HandleTimeSyncResp(WorldPacket& recvData)
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())
{
@@ -1515,14 +1515,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;
}
@@ -1533,7 +1533,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;
}
@@ -1554,7 +1554,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;
}
@@ -1574,14 +1574,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;
}
@@ -1589,7 +1589,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;
}
@@ -1612,7 +1612,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;
}
}
@@ -1631,7 +1631,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
@@ -1652,7 +1652,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);
@@ -1671,21 +1671,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)
@@ -1693,7 +1693,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;
@@ -1713,7 +1713,7 @@ void WorldSession::HandleGuildAchievementProgressQuery(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));
@@ -1723,7 +1723,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);
}
@@ -1779,7 +1779,7 @@ void WorldSession::SendSetPhaseShift(std::set<uint32> const& phaseIds, std::set<
// 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();
@@ -1802,7 +1802,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();
@@ -1850,7 +1850,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;
}
@@ -1871,7 +1871,7 @@ void WorldSession::HandleRequestHotfix(WorldPacket& recvPacket)
DB2StorageBase const* store = GetDB2Storage(type);
if (!store)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CMSG_REQUEST_HOTFIX: Received unknown hotfix type: %u", type);
+ TC_LOG_ERROR("network", "CMSG_REQUEST_HOTFIX: Received unknown hotfix type: %u", type);
recvPacket.rfinish();
return;
}
@@ -1933,7 +1933,7 @@ void WorldSession::HandleRequestHotfix(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;
@@ -2005,7 +2005,7 @@ void WorldSession::HandleObjectUpdateFailedOpcode(WorldPacket& recvPacket)
recvPacket.ReadByteSeq(guid[5]);
WorldObject* obj = ObjectAccessor::GetWorldObject(*GetPlayer(), guid);
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Object update failed for object " UI64FMTD " (%s) for player %s (%u)", uint64(guid), obj ? obj->GetName().c_str() : "object-not-found", GetPlayerName().c_str(), GetGuidLow());
+ TC_LOG_ERROR("network", "Object update failed for object " UI64FMTD " (%s) for player %s (%u)", uint64(guid), obj ? obj->GetName().c_str() : "object-not-found", GetPlayerName().c_str(), GetGuidLow());
// If create object failed for current player then client will be stuck on loading screen
if (_player->GetGUID() == guid)
@@ -2020,13 +2020,13 @@ void WorldSession::HandleObjectUpdateFailedOpcode(WorldPacket& recvPacket)
void WorldSession::HandleSaveCUFProfiles(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SAVE_CUF_PROFILES");
+ TC_LOG_DEBUG("network", "WORLD: CMSG_SAVE_CUF_PROFILES");
uint8 count = (uint8)recvPacket.ReadBits(20);
if (count > MAX_CUF_PROFILES)
{
- TC_LOG_ERROR(LOG_FILTER_PLAYER, "HandleSaveCUFProfiles - %s tried to save more than %i CUF profiles. Hacking attempt?", GetPlayerName().c_str(), MAX_CUF_PROFILES);
+ TC_LOG_ERROR("entities.player", "HandleSaveCUFProfiles - %s tried to save more than %i CUF profiles. Hacking attempt?", GetPlayerName().c_str(), MAX_CUF_PROFILES);
recvPacket.rfinish();
return;
}
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index b5bc3657f95..fd845efff3a 100644
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -36,7 +36,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();
}
@@ -71,7 +71,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);
}
@@ -80,7 +80,7 @@ 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;
}
@@ -93,7 +93,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);
@@ -194,7 +194,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
void WorldSession::HandleMoveTeleportAck(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "MSG_MOVE_TELEPORT_ACK");
+ TC_LOG_DEBUG("network", "MSG_MOVE_TELEPORT_ACK");
ObjectGuid guid;
uint32 flags, time;
@@ -218,8 +218,8 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recvPacket)
recvPacket.ReadByteSeq(guid[3]);
recvPacket.ReadByteSeq(guid[0]);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Guid " UI64FMTD, uint64(guid));
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Flags %u, time %u", flags, time/IN_MILLISECONDS);
+ TC_LOG_DEBUG("network", "Guid " UI64FMTD, uint64(guid));
+ TC_LOG_DEBUG("network", "Flags %u, time %u", flags, time/IN_MILLISECONDS);
Player* plMover = _player->m_mover->ToPlayer();
@@ -284,12 +284,12 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
// prevent tampered movement data
if (movementInfo.guid != mover->GetGUID())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleMovementOpcodes: guid error");
+ TC_LOG_ERROR("network", "HandleMovementOpcodes: guid error");
return;
}
if (!movementInfo.pos.IsPositionValid())
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "HandleMovementOpcodes: Invalid Position");
+ TC_LOG_ERROR("network", "HandleMovementOpcodes: Invalid Position");
return;
}
@@ -467,7 +467,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
case CMSG_MOVE_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT_BACK; break;
case CMSG_MOVE_FORCE_PITCH_RATE_CHANGE_ACK: 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;
}
@@ -484,13 +484,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();
}
@@ -499,7 +499,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
void WorldSession::HandleSetActiveMoverOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
ObjectGuid guid;
@@ -524,13 +524,13 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket& recvPacket)
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, uint64(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, uint64(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");
MovementInfo mi;
GetPlayer()->ReadMovementInfo(recvData, &mi);
@@ -547,7 +547,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");
MovementInfo movementInfo;
GetPlayer()->ReadMovementInfo(recvData, &movementInfo);
@@ -564,7 +564,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);
@@ -579,7 +579,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);
@@ -607,7 +607,7 @@ void WorldSession::HandleSummonResponseOpcode(WorldPacket& recvData)
void WorldSession::HandleSetCollisionHeightAck(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_MOVE_SET_COLLISION_HEIGHT_ACK");
+ TC_LOG_DEBUG("network", "CMSG_MOVE_SET_COLLISION_HEIGHT_ACK");
static MovementStatusElements const heightElement = MSEExtraFloat;
Movement::ExtraMovementStatusElement extra(&heightElement);
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index ad7cb112a29..4215b7f5db1 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -57,7 +57,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;
}
@@ -79,14 +79,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;
}
@@ -120,12 +120,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;
}
@@ -137,14 +137,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;
}
@@ -241,12 +241,12 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
uint32 trainerId;
recvData >> guid >> trainerId >> 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;
}
@@ -315,7 +315,7 @@ void WorldSession::SendTrainerBuyFailed(uint64 guid, uint32 spellId, uint32 reas
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;
@@ -323,7 +323,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;
}
@@ -362,7 +362,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;
@@ -373,15 +373,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;
}
@@ -403,7 +403,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;
@@ -412,7 +412,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;
}
@@ -467,7 +467,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;
}
@@ -499,7 +499,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;
@@ -535,7 +535,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
@@ -593,7 +593,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;
@@ -667,7 +667,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;
@@ -748,7 +748,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;
@@ -781,12 +781,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;
@@ -880,7 +880,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
@@ -890,7 +890,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;
}
@@ -903,7 +903,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)
@@ -911,7 +911,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 d65653ae242..b87840a74ec 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;
}
@@ -75,17 +75,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;
}
@@ -121,19 +121,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;
}
@@ -149,7 +149,7 @@ 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!",
+ TC_LOG_ERROR("network", "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());
return;
}
@@ -279,7 +279,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
charmInfo->SaveStayPosition();
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
@@ -308,7 +308,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;
}
@@ -409,13 +409,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;
@@ -464,7 +464,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;
}
}
@@ -473,7 +473,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;
}
}
@@ -482,7 +482,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;
@@ -493,14 +493,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;
}
@@ -562,7 +562,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
@@ -599,7 +599,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;
@@ -688,7 +688,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;
@@ -706,7 +706,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
@@ -722,7 +722,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;
}
@@ -734,7 +734,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;
}
@@ -748,7 +748,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;
@@ -757,7 +757,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())
@@ -767,14 +767,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;
}
@@ -847,7 +847,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;
@@ -859,7 +859,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 00de2225912..08a87ef03d7 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");
+ TC_LOG_DEBUG("network", "Received opcode MSG_PETITION_RENAME");
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;
}
@@ -566,7 +566,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);
@@ -588,12 +588,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);
@@ -618,7 +618,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;
@@ -644,7 +644,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())
{
@@ -727,7 +727,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;
@@ -740,7 +740,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;
@@ -760,7 +760,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;
}
@@ -882,14 +882,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();
}
@@ -908,7 +908,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;
@@ -917,7 +917,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;
@@ -930,7 +930,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;
}
@@ -974,5 +974,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 08c7d8bac3e..43bb843f0f1 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
@@ -143,16 +143,16 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
data << uint32(ci->movementId); // CreatureMovementInfo.dbc
data << uint32(ci->expansionUnknown); // unknown meaning
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");
}
}
@@ -184,7 +184,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);
@@ -200,22 +200,22 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
data << uint32(info->questItems[i]); // itemId[6], quest drop
data << int32(info->unkInt32); // 4.x, unknown
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();
@@ -270,7 +270,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;
@@ -343,13 +343,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;
@@ -383,13 +383,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 transportGuidLow;
recvData >> transportGuidLow;
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 8aee473e116..7f2b219942f 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);
Quest const* quest = sObjectMgr->GetQuestTemplate(questId);
if (!quest)
@@ -338,7 +338,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;
}
@@ -407,7 +407,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))
@@ -429,7 +429,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();
}
@@ -442,7 +442,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);
}
@@ -452,7 +452,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)
{
@@ -477,7 +477,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);
@@ -491,7 +491,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
uint32 questId;
recvData >> questId;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT questId = %u", questId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT questId = %u", questId);
if (const Quest* quest = sObjectMgr->GetQuestTemplate(questId))
{
@@ -520,7 +520,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
bool autoCompleteMode; // 0 - standart complete quest mode with npc, 1 - auto-complete mode
recvData >> playerGuid >> questId >> autoCompleteMode;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, questId = %u", uint32(GUID_LOPART(playerGuid)), questId);
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, questId = %u", uint32(GUID_LOPART(playerGuid)), questId);
Quest const* quest = sObjectMgr->GetQuestTemplate(questId);
if (!quest)
@@ -539,7 +539,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;
}
@@ -568,7 +568,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)
@@ -579,7 +579,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)
@@ -654,7 +654,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)
{
@@ -693,7 +693,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;
}
@@ -770,7 +770,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 98d7d74d539..cc19cceec7e 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);
@@ -66,7 +66,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 82f569ebb1e..6bcb83b7d8e 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");
int32 tabPage;
uint32 talentsCount;
@@ -77,14 +77,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 4d8b162ece4..9324f52be3e 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -112,7 +112,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)
@@ -188,7 +188,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;
@@ -200,7 +200,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)
@@ -220,7 +220,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_CLIENT_LOCKED_OUT, 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;
}
@@ -234,7 +234,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;
}
@@ -267,7 +267,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;
}
@@ -288,7 +288,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))
{
@@ -306,7 +306,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)
@@ -335,7 +335,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
recvPacket >> glyphIndex;
recvPacket >> 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;
@@ -348,7 +348,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;
}
@@ -492,7 +492,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;
}
@@ -500,13 +500,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;
}
@@ -567,7 +567,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
@@ -602,7 +602,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;
recvData.read_skip<uint32>(); // DisplayId ?
@@ -695,7 +695,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 2c159f4ab0d..d51598e789b 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)
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");
recvData.read_skip<uint32>(); // unk
@@ -248,7 +248,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());
@@ -272,18 +272,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;
}
@@ -296,5 +296,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 94edc024e8c..51e383c1e37 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 f04e23dcf92..44e590cb795 100644
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
@@ -74,12 +74,12 @@ 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());
}
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());
}
void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
@@ -212,7 +212,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)",
@@ -230,7 +230,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)",
@@ -253,21 +253,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());
}
}
}
@@ -285,7 +285,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();
@@ -293,7 +293,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 36ea31d170b..ec90a160326 100644
--- a/src/server/game/Handlers/VehicleHandler.cpp
+++ b/src/server/game/Handlers/VehicleHandler.cpp
@@ -26,7 +26,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();
@@ -46,7 +46,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)
@@ -59,7 +59,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;
}
@@ -162,7 +162,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;
}
@@ -174,13 +174,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;
}
@@ -189,7 +189,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))
@@ -197,13 +197,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;
}
@@ -215,15 +215,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())
{
@@ -232,7 +232,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 6c236ff39af..389d9f49d0d 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,7 +32,7 @@ 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
recvData.ReadString(recvData.ReadBits(8));
//channel->EnableVoice(recvData.GetOpcode() == CMSG_CHANNEL_VOICE_ON);
@@ -40,7 +40,7 @@ void WorldSession::HandleChannelVoiceOnOpcode(WorldPacket& recvData)
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/Handlers/VoidStorageHandler.cpp b/src/server/game/Handlers/VoidStorageHandler.cpp
index 7ac4f687509..aa45bef473a 100644
--- a/src/server/game/Handlers/VoidStorageHandler.cpp
+++ b/src/server/game/Handlers/VoidStorageHandler.cpp
@@ -37,7 +37,7 @@ void WorldSession::SendVoidStorageTransferResult(VoidTransferError result)
void WorldSession::HandleVoidStorageUnlock(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_VOID_STORAGE_UNLOCK");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_VOID_STORAGE_UNLOCK");
Player* player = GetPlayer();
ObjectGuid npcGuid;
@@ -62,13 +62,13 @@ void WorldSession::HandleVoidStorageUnlock(WorldPacket& recvData)
Creature* unit = player->GetNPCIfCanInteractWith(npcGuid, UNIT_NPC_FLAG_VAULTKEEPER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageUnlock - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageUnlock - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
return;
}
if (player->IsVoidStorageUnlocked())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageUnlock - Player (GUID: %u, name: %s) tried to unlock void storage a 2nd time.", player->GetGUIDLow(), player->GetName().c_str());
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageUnlock - Player (GUID: %u, name: %s) tried to unlock void storage a 2nd time.", player->GetGUIDLow(), player->GetName().c_str());
return;
}
@@ -78,7 +78,7 @@ void WorldSession::HandleVoidStorageUnlock(WorldPacket& recvData)
void WorldSession::HandleVoidStorageQuery(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_VOID_STORAGE_QUERY");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_VOID_STORAGE_QUERY");
Player* player = GetPlayer();
ObjectGuid npcGuid;
@@ -103,13 +103,13 @@ void WorldSession::HandleVoidStorageQuery(WorldPacket& recvData)
Creature* unit = player->GetNPCIfCanInteractWith(npcGuid, UNIT_NPC_FLAG_VAULTKEEPER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageQuery - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageQuery - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
return;
}
if (!player->IsVoidStorageUnlocked())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageQuery - Player (GUID: %u, name: %s) queried void storage without unlocking it.", player->GetGUIDLow(), player->GetName().c_str());
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageQuery - Player (GUID: %u, name: %s) queried void storage without unlocking it.", player->GetGUIDLow(), player->GetName().c_str());
return;
}
@@ -187,7 +187,7 @@ void WorldSession::HandleVoidStorageQuery(WorldPacket& recvData)
void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_VOID_STORAGE_TRANSFER");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_VOID_STORAGE_TRANSFER");
Player* player = GetPlayer();
// Read everything
@@ -199,7 +199,7 @@ void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
if (countDeposit > 9)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) wants to deposit more than 9 items (%u).", player->GetGUIDLow(), player->GetName().c_str(), countDeposit);
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) wants to deposit more than 9 items (%u).", player->GetGUIDLow(), player->GetName().c_str(), countDeposit);
return;
}
@@ -227,7 +227,7 @@ void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
if (countWithdraw > 9)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) wants to withdraw more than 9 items (%u).", player->GetGUIDLow(), player->GetName().c_str(), countWithdraw);
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) wants to withdraw more than 9 items (%u).", player->GetGUIDLow(), player->GetName().c_str(), countWithdraw);
return;
}
@@ -283,13 +283,13 @@ void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
Creature* unit = player->GetNPCIfCanInteractWith(npcGuid, UNIT_NPC_FLAG_VAULTKEEPER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageTransfer - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageTransfer - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
return;
}
if (!player->IsVoidStorageUnlocked())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) queried void storage without unlocking it.", player->GetGUIDLow(), player->GetName().c_str());
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) queried void storage without unlocking it.", player->GetGUIDLow(), player->GetName().c_str());
return;
}
@@ -330,7 +330,7 @@ void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
Item* item = player->GetItemByGuid(*itr);
if (!item)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) wants to deposit an invalid item (item guid: " UI64FMTD ").", player->GetGUIDLow(), player->GetName().c_str(), uint64(*itr));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) wants to deposit an invalid item (item guid: " UI64FMTD ").", player->GetGUIDLow(), player->GetName().c_str(), uint64(*itr));
continue;
}
@@ -355,7 +355,7 @@ void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
VoidStorageItem* itemVS = player->GetVoidStorageItem(*itr, slot);
if (!itemVS)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) tried to withdraw an invalid item (id: " UI64FMTD ")", player->GetGUIDLow(), player->GetName().c_str(), uint64(*itr));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) tried to withdraw an invalid item (id: " UI64FMTD ")", player->GetGUIDLow(), player->GetName().c_str(), uint64(*itr));
continue;
}
@@ -364,7 +364,7 @@ void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
if (msg != EQUIP_ERR_OK)
{
SendVoidStorageTransferResult(VOID_TRANSFER_ERROR_INVENTORY_FULL);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) couldn't withdraw item id " UI64FMTD " because inventory was full.", player->GetGUIDLow(), player->GetName().c_str(), uint64(*itr));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidStorageTransfer - Player (GUID: %u, name: %s) couldn't withdraw item id " UI64FMTD " because inventory was full.", player->GetGUIDLow(), player->GetName().c_str(), uint64(*itr));
return;
}
@@ -474,7 +474,7 @@ void WorldSession::HandleVoidStorageTransfer(WorldPacket& recvData)
void WorldSession::HandleVoidSwapItem(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_VOID_SWAP_ITEM");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_VOID_SWAP_ITEM");
Player* player = GetPlayer();
uint32 newSlot;
@@ -520,20 +520,20 @@ void WorldSession::HandleVoidSwapItem(WorldPacket& recvData)
Creature* unit = player->GetNPCIfCanInteractWith(npcGuid, UNIT_NPC_FLAG_VAULTKEEPER);
if (!unit)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidSwapItem - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidSwapItem - Unit (GUID: %u) not found or player can't interact with it.", GUID_LOPART(npcGuid));
return;
}
if (!player->IsVoidStorageUnlocked())
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidSwapItem - Player (GUID: %u, name: %s) queried void storage without unlocking it.", player->GetGUIDLow(), player->GetName().c_str());
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidSwapItem - Player (GUID: %u, name: %s) queried void storage without unlocking it.", player->GetGUIDLow(), player->GetName().c_str());
return;
}
uint8 oldSlot;
if (!player->GetVoidStorageItem(itemId, oldSlot))
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandleVoidSwapItem - Player (GUID: %u, name: %s) requested swapping an invalid item (slot: %u, itemid: " UI64FMTD ").", player->GetGUIDLow(), player->GetName().c_str(), newSlot, uint64(itemId));
+ TC_LOG_DEBUG("network", "WORLD: HandleVoidSwapItem - Player (GUID: %u, name: %s) requested swapping an invalid item (slot: %u, itemid: " UI64FMTD ").", player->GetGUIDLow(), player->GetName().c_str(), newSlot, uint64(itemId));
return;
}
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index d552f822f0a..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)
@@ -272,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));
}
@@ -362,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;
}
@@ -455,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
@@ -524,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;
@@ -563,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/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp
index 447dc5c3e5a..58498be8f3a 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;
}
@@ -445,7 +445,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, dungeonId);
+ TC_LOG_DEBUG("lfg", "UpdateEncounterState: Instance %s (instanceId %u) completed encounter %s. Credit Dungeon: %u", instance->GetMapName(), instance->GetInstanceId(), encounter->dbcEntry->encounterName, dungeonId);
break;
}
}
diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h
index e53a9c3c5c4..2d7dbad2541 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;
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index 037127d160e..8f658986123 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;
}
@@ -1191,10 +1191,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
@@ -1433,7 +1433,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;
}
@@ -1498,7 +1498,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();
@@ -1525,14 +1525,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();
@@ -1559,14 +1559,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();
@@ -1583,14 +1583,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();
@@ -1617,14 +1617,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();
@@ -1641,14 +1641,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();
@@ -1670,14 +1670,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();
@@ -1704,14 +1704,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();
@@ -1733,14 +1733,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();
@@ -1757,14 +1757,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();
@@ -1791,14 +1791,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();
@@ -1833,14 +1833,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();
@@ -1863,5 +1863,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/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index fd4bcbd5dc0..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;
}
}
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index dc7b3b82ea3..e08ccfab31d 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -92,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;
@@ -121,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;
}
}
@@ -135,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)
@@ -147,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;
}
}
@@ -180,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]);
@@ -192,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);
@@ -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;
}
@@ -522,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
}
@@ -532,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);
@@ -559,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
}
@@ -856,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();
@@ -889,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
@@ -921,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
@@ -1013,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
@@ -1066,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());
+ sLog->outDebug("maps", "GameObject (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.", go->GetGUIDLow(), go->GetEntry());
#endif
AddObjectToRemoveList(go);
}
@@ -1085,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();
@@ -1094,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
}
@@ -1107,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();
@@ -1120,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();
@@ -1132,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;
}
@@ -1146,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();
@@ -1155,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
}
@@ -1168,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();
@@ -1181,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();
@@ -1193,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;
}
@@ -1212,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)
@@ -1239,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)
@@ -1269,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)
{
@@ -1328,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;
}
@@ -1342,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());
}
}
@@ -1416,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;
}
@@ -1438,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;
@@ -2029,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);
@@ -2110,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)
{
@@ -2265,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(),
@@ -2305,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(player->GetMapId());
@@ -2365,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;
@@ -2397,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)
@@ -2442,7 +2442,7 @@ void Map::RemoveAllObjectsInRemoveList()
}
}
- //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();
@@ -2454,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;
@@ -2475,14 +2475,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
@@ -2559,7 +2559,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);
}
}
@@ -2590,7 +2590,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);
}
}
@@ -2649,7 +2649,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;
}
@@ -2662,7 +2662,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;
}
@@ -2732,7 +2732,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);
}
@@ -2745,7 +2745,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;
}
}
@@ -2757,9 +2757,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;
}
@@ -2771,12 +2771,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
@@ -2809,7 +2809,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;
@@ -2835,7 +2835,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);
@@ -2876,7 +2876,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());
}
}
@@ -2930,7 +2930,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;
}
@@ -2984,7 +2984,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()));
}
}
@@ -3046,7 +3046,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;
}
@@ -3074,7 +3074,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/MapManager.cpp b/src/server/game/Maps/MapManager.cpp
index 45a860a0622..05047e9bcf6 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -78,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];
}
@@ -195,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;
}
}
@@ -219,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
@@ -404,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/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp
index c0da12c5614..b84a8ddb217 100644
--- a/src/server/game/Maps/TransportMgr.cpp
+++ b/src/server/game/Maps/TransportMgr.cpp
@@ -49,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;
}
@@ -62,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;
}
@@ -78,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)
@@ -354,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;
}
@@ -381,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;
}
@@ -424,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/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h
index 74a988acf70..a400520ab43 100644
--- a/src/server/game/Miscellaneous/Formulas.h
+++ b/src/server/game/Miscellaneous/Formulas.h
@@ -132,7 +132,7 @@ namespace Trinity
nBaseExp = 1878;
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/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 00ec1b7fa65..e4694dae91c 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;
}
@@ -410,12 +410,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);
}
@@ -438,11 +438,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);
@@ -454,11 +454,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);
}
@@ -474,14 +474,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(),
@@ -499,19 +499,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);
}
}
@@ -523,11 +523,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);
}
@@ -579,7 +579,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");
}
@@ -638,7 +638,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/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index f8b52af2371..6787144e2e5 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);
}
@@ -324,7 +324,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);
}
}
@@ -355,9 +355,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/MovementStructures.cpp b/src/server/game/Movement/MovementStructures.cpp
index db305e52454..f6fff709af0 100644
--- a/src/server/game/Movement/MovementStructures.cpp
+++ b/src/server/game/Movement/MovementStructures.cpp
@@ -5188,7 +5188,7 @@ void Movement::ExtraMovementStatusElement::WriteNextElement(ByteBuffer& packet)
bool Movement::PrintInvalidSequenceElement(MovementStatusElements const element, char const* function)
{
- TC_LOG_ERROR(LOG_FILTER_UNITS, "Incorrect sequence element %d detected at %s", element, function);
+ TC_LOG_ERROR("entities.unit", "Incorrect sequence element %d detected at %s", element, function);
return false;
}
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 9aafd52db37..6e3d7680637 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -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();
@@ -201,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);
@@ -228,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;
}
}
diff --git a/src/server/game/Movement/Waypoints/WaypointManager.cpp b/src/server/game/Movement/Waypoints/WaypointManager.cpp
index 406ac95322a..7fc8ae1a63c 100644
--- a/src/server/game/Movement/Waypoints/WaypointManager.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp
@@ -46,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;
}
@@ -83,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 4d68e03a1c6..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);
@@ -252,7 +252,7 @@ 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*/) { }
@@ -380,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/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/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp
index 8cb0c8e6191..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)
{
@@ -566,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;
}
@@ -584,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();
@@ -598,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
{
@@ -614,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];
@@ -639,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();
@@ -654,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
{
@@ -670,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;
}
@@ -679,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;
}
@@ -707,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();
@@ -722,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
{
@@ -737,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];
@@ -782,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;
@@ -791,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();
@@ -804,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
{
@@ -830,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;
}
@@ -853,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;
}
@@ -863,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;
}
@@ -879,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();
@@ -894,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
{
@@ -910,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;
}
@@ -925,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/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 3f8f58df8a7..d3873bc330e 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -47,7 +47,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;
}
@@ -70,7 +70,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/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp
index ff133272724..e70c88d2181 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,7 +497,7 @@ 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());
else
@@ -511,7 +511,7 @@ 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());
else
@@ -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/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index b4fe3ef8640..ddf6fe3a093 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
@@ -186,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()
@@ -1419,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);
}
@@ -1428,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);
}
@@ -1437,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 bd283f87a91..86ddc377bc2 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -310,7 +310,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/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index d110d96d879..0fda2a75be1 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -32,7 +32,7 @@ void OpcodeTable::ValidateAndSetOpcode<true, true>(uint16 opcode, char const* na
{
if (_internalTable[opcode] != NULL)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Tried to override handler of %s with %s (opcode %u)", opcodeTable[opcode]->Name, name, opcode);
+ TC_LOG_ERROR("network", "Tried to override handler of %s with %s (opcode %u)", opcodeTable[opcode]->Name, name, opcode);
return;
}
@@ -42,13 +42,13 @@ void OpcodeTable::ValidateAndSetOpcode<true, true>(uint16 opcode, char const* na
template<>
void OpcodeTable::ValidateAndSetOpcode<false, true>(uint16 opcode, char const* /*name*/, SessionStatus /*status*/, PacketProcessing /*processing*/, pOpcodeHandler /*handler*/)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Tried to set handler for an invalid opcode %d", opcode);
+ TC_LOG_ERROR("network", "Tried to set handler for an invalid opcode %d", opcode);
}
template<>
void OpcodeTable::ValidateAndSetOpcode<true, false>(uint16 /*opcode*/, char const* name, SessionStatus /*status*/, PacketProcessing /*processing*/, pOpcodeHandler /*handler*/)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Opcode %s got value 0", name);
+ TC_LOG_ERROR("network", "Opcode %s got value 0", name);
}
/// Correspondence between opcodes and their names
diff --git a/src/server/game/Server/WorldPacket.cpp b/src/server/game/Server/WorldPacket.cpp
index 8efcb4909ac..c25b9fea202 100644
--- a/src/server/game/Server/WorldPacket.cpp
+++ b/src/server/game/Server/WorldPacket.cpp
@@ -25,7 +25,7 @@ void WorldPacket::Compress(z_stream* compressionStream)
Opcodes uncompressedOpcode = GetOpcode();
if (uncompressedOpcode & COMPRESSED_OPCODE_MASK)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Packet with opcode 0x%04X is already compressed!", uncompressedOpcode);
+ TC_LOG_ERROR("network", "Packet with opcode 0x%04X is already compressed!", uncompressedOpcode);
return;
}
@@ -45,7 +45,7 @@ void WorldPacket::Compress(z_stream* compressionStream)
*this << uint32(size);
append(&storage[0], destsize);
SetOpcode(opcode);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "%s (len %u) successfully compressed to %04X (len %u)", GetOpcodeNameForLogging(uncompressedOpcode).c_str(), size, opcode, destsize);
+ TC_LOG_INFO("network", "%s (len %u) successfully compressed to %04X (len %u)", GetOpcodeNameForLogging(uncompressedOpcode).c_str(), size, opcode, destsize);
}
//! Compresses another packet and stores it in self (source left intact)
@@ -56,7 +56,7 @@ void WorldPacket::Compress(z_stream* compressionStream, WorldPacket const* sourc
Opcodes uncompressedOpcode = source->GetOpcode();
if (uncompressedOpcode & COMPRESSED_OPCODE_MASK)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Packet with opcode 0x%04X is already compressed!", uncompressedOpcode);
+ TC_LOG_ERROR("network", "Packet with opcode 0x%04X is already compressed!", uncompressedOpcode);
return;
}
@@ -77,7 +77,7 @@ void WorldPacket::Compress(z_stream* compressionStream, WorldPacket const* sourc
SetOpcode(opcode);
- TC_LOG_INFO(LOG_FILTER_NETWORKIO, "%s (len %u) successfully compressed to %04X (len %u)", GetOpcodeNameForLogging(uncompressedOpcode).c_str(), size, opcode, destsize);
+ TC_LOG_INFO("network", "%s (len %u) successfully compressed to %04X (len %u)", GetOpcodeNameForLogging(uncompressedOpcode).c_str(), size, opcode, destsize);
}
void WorldPacket::Compress(void* dst, uint32 *dst_size, const void* src, int src_size)
@@ -90,14 +90,14 @@ void WorldPacket::Compress(void* dst, uint32 *dst_size, const void* src, int src
int32 z_res = deflate(_compressionStream, Z_SYNC_FLUSH);
if (z_res != Z_OK)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Can't compress packet (zlib: deflate) Error code: %i (%s, msg: %s)", z_res, zError(z_res), _compressionStream->msg);
+ TC_LOG_ERROR("network", "Can't compress packet (zlib: deflate) Error code: %i (%s, msg: %s)", z_res, zError(z_res), _compressionStream->msg);
*dst_size = 0;
return;
}
if (_compressionStream->avail_in != 0)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Can't compress packet (zlib: deflate not greedy)");
+ TC_LOG_ERROR("network", "Can't compress packet (zlib: deflate not greedy)");
*dst_size = 0;
return;
}
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index f5c96e09961..100658d7958 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -144,7 +144,7 @@ WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8
_compressionStream->next_in = NULL;
int32 z_res = deflateInit(_compressionStream, sWorld->getIntConfig(CONFIG_COMPRESSION));
if (z_res != Z_OK)
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Can't initialize packet compression (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res));
+ TC_LOG_ERROR("network", "Can't initialize packet compression (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res));
}
/// WorldSession destructor
@@ -174,7 +174,7 @@ WorldSession::~WorldSession()
int32 z_res = deflateEnd(_compressionStream);
if (z_res != Z_OK && z_res != Z_DATA_ERROR) // Z_DATA_ERROR signals that internal state was BUSY
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Can't close packet compression stream (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res));
+ TC_LOG_ERROR("network", "Can't close packet compression stream (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res));
delete _compressionStream;
}
@@ -209,12 +209,12 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
if (packet->GetOpcode() == NULL_OPCODE)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Prevented sending of NULL_OPCODE to %s", GetPlayerInfo().c_str());
+ TC_LOG_ERROR("network.opcode", "Prevented sending of NULL_OPCODE to %s", GetPlayerInfo().c_str());
return;
}
else if (packet->GetOpcode() == UNKNOWN_OPCODE)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Prevented sending of UNKNOWN_OPCODE to %s", GetPlayerInfo().c_str());
+ TC_LOG_ERROR("network.opcode", "Prevented sending of UNKNOWN_OPCODE to %s", GetPlayerInfo().c_str());
return;
}
@@ -223,7 +223,7 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
OpcodeHandler const* handler = opcodeTable[packet->GetOpcode()];
if (!handler || handler->Status == STATUS_UNHANDLED)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "Prevented sending disabled opcode %s to %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str(), GetPlayerInfo().c_str());
+ TC_LOG_ERROR("network.opcode", "Prevented sending disabled opcode %s to %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str(), GetPlayerInfo().c_str());
return;
}
}
@@ -253,8 +253,8 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
{
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;
@@ -275,17 +275,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();
}
@@ -342,7 +342,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());
}
}
@@ -396,18 +396,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_ERROR(LOG_FILTER_OPCODES, "Received not handled opcode %s from %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str()
+ TC_LOG_ERROR("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_NETWORKIO, "WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.",
+ TC_LOG_ERROR("network", "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();
}
@@ -574,7 +574,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);
@@ -585,7 +585,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);
@@ -655,25 +655,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());
}
@@ -723,14 +723,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;
}
@@ -835,7 +835,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;
}
@@ -865,7 +865,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);
@@ -873,15 +873,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.
@@ -890,10 +890,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()
@@ -932,7 +932,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));
@@ -976,14 +976,14 @@ bool WorldSession::IsAddonRegistered(const std::string& prefix) const
void WorldSession::HandleUnregisterAddonPrefixesOpcode(WorldPacket& /*recvPacket*/) // empty packet
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_UNREGISTER_ALL_ADDON_PREFIXES");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_UNREGISTER_ALL_ADDON_PREFIXES");
_registeredAddonPrefixes.clear();
}
void WorldSession::HandleAddonRegisteredPrefixesOpcode(WorldPacket& recvPacket)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADDON_REGISTERED_PREFIXES");
+ TC_LOG_DEBUG("network", "WORLD: Received CMSG_ADDON_REGISTERED_PREFIXES");
// This is always sent after CMSG_UNREGISTER_ALL_ADDON_PREFIXES
@@ -1144,7 +1144,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);
}
@@ -1159,7 +1159,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;
@@ -1167,7 +1167,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;
@@ -1179,7 +1179,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)
@@ -1187,7 +1187,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:
{
@@ -1201,7 +1201,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/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 461b7f56dde..35908b1204c 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);
@@ -174,7 +174,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);
@@ -205,7 +205,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;
}
@@ -248,7 +248,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;
}
@@ -265,7 +265,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;
}
@@ -301,14 +301,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;
@@ -377,7 +377,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;
}
@@ -412,7 +412,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;
}
@@ -490,7 +490,7 @@ int WorldSocket::handle_input_header (void)
if ((header.size < 4) || (header.size > 10240) || (header.cmd > 0xFFFF && (header.cmd >> 16) != 0x4C52)) // LR (from MSG_VERIFY_CONNECTIVITY)
{
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>",
@@ -596,7 +596,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;
}
@@ -642,7 +642,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;
}
@@ -661,7 +661,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;
}
@@ -686,7 +686,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
{
@@ -697,26 +697,26 @@ 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;
case CMSG_LOG_DISCONNECT:
new_pct->rfinish(); // contains uint32 disconnectReason;
- 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;
// not an opcode, client sends string "WORLD OF WARCRAFT CONNECTION - CLIENT TO SERVER" without opcode
// first 4 bytes become the opcode (2 dropped)
case MSG_VERIFY_CONNECTIVITY:
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "%s", opcodeName.c_str());
+ TC_LOG_DEBUG("network", "%s", opcodeName.c_str());
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
std::string str;
*new_pct >> str;
@@ -726,7 +726,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
}
case CMSG_ENABLE_NAGLE:
{
- 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 m_Session ? m_Session->HandleEnableNagleAlgorithm() : -1;
}
@@ -735,7 +735,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;
}
@@ -746,7 +746,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
OpcodeHandler const* handler = opcodeTable[opcode];
if (!handler || handler->Status == STATUS_UNHANDLED)
{
- TC_LOG_ERROR(LOG_FILTER_OPCODES, "No defined handler for opcode %s sent by %s", GetOpcodeNameForLogging(new_pct->GetOpcode()).c_str(), m_Session->GetPlayerInfo().c_str());
+ TC_LOG_ERROR("network.opcode", "No defined handler for opcode %s sent by %s", GetOpcodeNameForLogging(new_pct->GetOpcode()).c_str(), m_Session->GetPlayerInfo().c_str());
return 0;
}
@@ -765,7 +765,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;
@@ -845,7 +845,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;
}
@@ -862,7 +862,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;
}
@@ -879,7 +879,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;
}
}
@@ -913,7 +913,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;
}
@@ -944,17 +944,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;
}
@@ -974,11 +974,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());
@@ -1054,7 +1054,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;
@@ -1076,7 +1076,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 12da93fb537..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;
}
@@ -234,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;
}
@@ -242,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);
@@ -251,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;
}
@@ -261,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;
}
@@ -274,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)
@@ -325,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;
}
}
@@ -340,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 94fd0ac4428..d911a20081a 100644
--- a/src/server/game/Skills/SkillDiscovery.cpp
+++ b/src/server/game/Skills/SkillDiscovery.cpp
@@ -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 ddd8d1908fa..fec0c1c7c88 100644
--- a/src/server/game/Skills/SkillExtraItems.cpp
+++ b/src/server/game/Skills/SkillExtraItems.cpp
@@ -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 2ba3d7e0899..4a9854333a5 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -907,7 +907,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
{
@@ -1702,7 +1702,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);
@@ -2037,7 +2037,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
{
@@ -3616,7 +3616,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;
}
@@ -3642,7 +3642,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;
}
@@ -3772,7 +3772,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;
}
@@ -5704,7 +5704,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
@@ -5712,7 +5712,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());
}
}
@@ -5725,11 +5725,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
@@ -5843,7 +5843,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);
@@ -5913,7 +5913,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);
@@ -5959,7 +5959,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);
@@ -6036,7 +6036,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;
@@ -6105,7 +6105,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());
int32 drainedAmount = -target->ModifyPower(powerType, -drainAmount);
@@ -6162,7 +6162,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);
@@ -6197,7 +6197,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);
@@ -6256,11 +6256,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)
@@ -6272,11 +6272,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)
@@ -6289,7 +6289,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);
}
@@ -6311,7 +6311,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;
}
@@ -6337,7 +6337,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());
}
@@ -6349,7 +6349,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;
@@ -6378,7 +6378,7 @@ 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/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index e6692c6a274..1f2542de0be 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);
@@ -158,7 +158,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)
{
@@ -441,7 +441,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);
}
@@ -583,7 +583,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);
@@ -1242,7 +1242,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);
@@ -1345,7 +1345,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);
@@ -1794,7 +1794,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 140038a7698..aa4c672c0c4 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -459,23 +459,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 +604,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;
}
@@ -901,7 +901,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");
@@ -920,7 +920,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())
@@ -933,7 +933,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:
@@ -946,7 +946,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());
@@ -991,7 +991,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:
@@ -1018,7 +1018,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;
}
@@ -1384,7 +1384,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);
}
@@ -1642,7 +1642,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);
@@ -1658,11 +1658,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;
@@ -1670,7 +1670,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)\
@@ -1732,7 +1732,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);
@@ -1741,7 +1741,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);)
}
}
@@ -2810,7 +2810,7 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
if (CanExecuteTriggersOnHit(effMask, i->triggeredByAura) && roll_chance_i(i->chance))
{
m_caster->CastSpell(unit, i->triggeredSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_TARGET_CHECK));
- 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
@@ -3066,7 +3066,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
@@ -3573,7 +3573,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;
}
@@ -3614,7 +3614,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();
}
@@ -3678,7 +3678,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;
}
@@ -3874,7 +3874,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_HAS_TRAJECTORY;
@@ -3960,7 +3960,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;
@@ -4379,7 +4379,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;
}
@@ -4476,7 +4476,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;
}
@@ -4719,7 +4719,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::HandleHolyPower(Player* caster)
@@ -4767,7 +4767,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);
damage = CalculateDamage(i, unitTarget);
@@ -5922,7 +5922,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;
}
@@ -6404,7 +6404,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());
@@ -6439,7 +6439,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)
@@ -6620,7 +6620,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);
}
@@ -6973,7 +6973,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;
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 7fcac6080fe..51fd45f9880 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -256,7 +256,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*/)
@@ -644,7 +644,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;
}
@@ -662,7 +662,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
@@ -774,7 +774,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;
}
@@ -826,7 +826,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;
}
@@ -882,7 +882,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;
}
@@ -930,7 +930,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;
}
@@ -1000,7 +1000,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;
}
@@ -1012,7 +1012,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);
@@ -1020,7 +1020,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;
}
@@ -1156,7 +1156,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)
@@ -1223,7 +1223,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);
@@ -1321,7 +1321,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;
}
@@ -1410,7 +1410,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);
@@ -1774,7 +1774,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;
}
@@ -1813,7 +1813,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);
}
@@ -1838,7 +1838,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;
}
@@ -1894,7 +1894,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;
}
@@ -2073,7 +2073,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;
}
@@ -2260,7 +2260,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;
@@ -2618,7 +2618,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;
}
@@ -2665,14 +2665,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;
}
@@ -3722,7 +3722,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;
}
@@ -3820,7 +3820,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
@@ -3884,7 +3884,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);
}
@@ -4039,8 +4039,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;
@@ -4911,7 +4911,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;
}
@@ -4999,7 +4999,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);
@@ -5084,7 +5084,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
@@ -5115,7 +5115,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();
@@ -5130,7 +5130,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;
@@ -5550,7 +5550,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;
}
@@ -5603,7 +5603,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;
}
@@ -5754,7 +5754,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 c07a567decd..79a8c54cdbb 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1491,7 +1491,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
shapeInfo = sSpellShapeshiftFormStore.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
@@ -2334,7 +2334,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;
}
@@ -2359,10 +2359,10 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) c
break;
case POWER_RUNES:
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/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index d8ad267b26b..3e9c564e874 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -388,7 +388,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;
}
@@ -402,7 +402,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;
}
@@ -420,7 +420,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;
}
@@ -440,7 +440,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;
}
@@ -472,7 +472,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
}
@@ -483,23 +483,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]);
}
@@ -512,11 +512,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;
}
@@ -1207,7 +1207,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;
}
@@ -1221,7 +1221,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;
}
@@ -1253,7 +1253,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;
}
@@ -1292,13 +1292,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;
@@ -1309,14 +1309,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;
}
@@ -1332,7 +1332,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);
@@ -1354,7 +1354,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()
@@ -1369,7 +1369,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;
}
@@ -1386,26 +1386,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;
}
@@ -1414,7 +1414,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));
}
@@ -1452,7 +1452,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()
@@ -1465,7 +1465,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;
}
@@ -1483,19 +1483,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;
}
@@ -1540,7 +1540,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;
@@ -1582,7 +1582,7 @@ void SpellMgr::LoadSpellLearnSpells()
{
if (itr->second.spell == mastery)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "Found redundant record (entry: %u, SpellID: %u) in `spell_learn_spell`, spell added automatically as mastery learned spell from TalentTab.dbc", masteryMainSpell, mastery);
+ TC_LOG_ERROR("sql.sql", "Found redundant record (entry: %u, SpellID: %u) in `spell_learn_spell`, spell added automatically as mastery learned spell from TalentTab.dbc", masteryMainSpell, mastery);
found = true;
break;
}
@@ -1617,7 +1617,7 @@ void SpellMgr::LoadSpellLearnSpells()
}
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell learn spells, %u found in Spell.dbc and %u from TalentTab.dbc in %u ms", count, dbc_count, mastery_count, GetMSTimeDiffToNow(oldMSTime));
+ TC_LOG_INFO("server.loading", ">> Loaded %u spell learn spells, %u found in Spell.dbc and %u from TalentTab.dbc in %u ms", count, dbc_count, mastery_count, GetMSTimeDiffToNow(oldMSTime));
}
void SpellMgr::LoadSpellTargetPositions()
@@ -1630,7 +1630,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;
}
@@ -1653,20 +1653,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;
}
@@ -1678,7 +1678,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;
}
@@ -1715,11 +1715,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()
@@ -1733,7 +1733,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;
}
@@ -1746,7 +1746,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();
@@ -1762,7 +1762,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
@@ -1774,12 +1774,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
@@ -1799,7 +1799,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()
@@ -1812,7 +1812,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;
}
@@ -1825,7 +1825,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;
}
@@ -1833,7 +1833,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;
}
@@ -1842,7 +1842,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()
@@ -1855,7 +1855,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;
}
@@ -1877,18 +1877,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;
}
}
@@ -1910,12 +1910,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;
@@ -1929,7 +1929,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()
@@ -1942,7 +1942,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;
}
@@ -1963,18 +1963,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;
}
}
@@ -2001,7 +2001,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;
}
@@ -2017,47 +2017,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;
@@ -2070,7 +2070,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()
@@ -2083,7 +2083,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;
}
@@ -2096,7 +2096,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;
}
@@ -2109,7 +2109,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()
@@ -2122,7 +2122,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;
}
@@ -2135,7 +2135,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;
}
@@ -2148,7 +2148,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()
@@ -2169,7 +2169,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()
@@ -2182,7 +2182,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;
}
@@ -2204,21 +2204,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;
}
@@ -2229,7 +2229,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
@@ -2269,7 +2269,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()
@@ -2282,7 +2282,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;
}
@@ -2296,7 +2296,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;
}
@@ -2311,7 +2311,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()
@@ -2324,7 +2324,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;
}
@@ -2340,13 +2340,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;
}
@@ -2362,7 +2362,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()
@@ -2418,7 +2418,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)
@@ -2502,9 +2502,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
@@ -2545,7 +2545,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()
@@ -2561,7 +2561,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;
}
@@ -2591,7 +2591,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;
}
@@ -2620,20 +2620,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;
}
@@ -2641,7 +2641,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;
}
}
@@ -2651,13 +2651,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;
}
@@ -2677,7 +2677,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;
}
@@ -2693,7 +2693,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;
}
}
@@ -2701,13 +2701,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;
}
@@ -2732,7 +2732,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));
}
// Temporary structure to hold spell effect entries for faster loading
@@ -2770,7 +2770,7 @@ void SpellMgr::LoadSpellInfoStore()
if (SpellEntry const* spellEntry = sSpellStore.LookupEntry(i))
mSpellInfoMap[i] = new SpellInfo(spellEntry, effectsBySpell[i].effects);
- 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()
@@ -3081,7 +3081,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()
@@ -3796,5 +3796,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 172a9dbcc52..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;
@@ -284,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);
}
@@ -412,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;
@@ -422,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)
@@ -435,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)
@@ -448,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;
@@ -458,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;
@@ -468,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;
@@ -478,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;
@@ -488,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;
@@ -498,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;
@@ -508,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;
@@ -518,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)
@@ -532,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)
@@ -543,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;
@@ -554,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;
@@ -564,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;
@@ -595,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;
}
@@ -611,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);
}
@@ -929,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;
}
}
@@ -1116,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/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 0b23ece574b..aaafe219157 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -127,7 +127,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;
}
@@ -154,25 +154,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;
}
}
@@ -186,7 +186,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));
}
@@ -216,7 +216,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));
}
@@ -228,7 +228,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;
}
@@ -236,7 +236,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;
}
@@ -442,7 +442,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)
@@ -468,7 +468,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;
}
@@ -476,7 +476,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/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index 50ed1bff8fc..45c45cd10e4 100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
@@ -294,7 +294,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;
}
@@ -321,7 +321,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));
}
@@ -334,7 +334,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 a9026dcc880..50956ccfbb2 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -324,7 +324,7 @@ bool PlayerDumpWriter::DumpTable(std::string& dump, uint32 guid, char const*tabl
{
if (result->GetFieldCount() <= 64) // 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.");
return false;
}
@@ -502,7 +502,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);
}
@@ -519,7 +519,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);
}
@@ -669,7 +669,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/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
index 5e2cd82f6cc..f7f71647d71 100644
--- a/src/server/game/Warden/Warden.cpp
+++ b/src/server/game/Warden/Warden.cpp
@@ -42,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;
@@ -68,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;
@@ -103,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();
}
@@ -139,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;
}
}
@@ -220,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)
@@ -235,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 cdd2a2f6bac..0aac3711137 100644
--- a/src/server/game/Warden/WardenCheckMgr.cpp
+++ b/src/server/game/Warden/WardenCheckMgr.cpp
@@ -41,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;
}
@@ -49,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;
}
@@ -141,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()
@@ -149,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;
}
@@ -158,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;
}
@@ -175,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);
@@ -187,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 1cd4a4ea877..a232a0e0b39 100644
--- a/src/server/game/Warden/WardenMac.cpp
+++ b/src/server/game/Warden/WardenMac.cpp
@@ -54,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();
}
@@ -90,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;
@@ -163,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 };
@@ -189,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);
@@ -213,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;
@@ -246,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;
}
@@ -261,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 a9fcc041ff6..ca20f4ca8e3 100644
--- a/src/server/game/Warden/WardenWin.cpp
+++ b/src/server/game/Warden/WardenWin.cpp
@@ -50,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();
}
@@ -86,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;
@@ -130,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;
@@ -152,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);
@@ -172,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())
@@ -319,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;
@@ -337,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;
}
@@ -348,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;
}
@@ -358,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;
@@ -386,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:
@@ -412,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;
@@ -424,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:
@@ -438,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;
}
@@ -451,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:
@@ -465,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
@@ -490,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 461dc04588a..26437f109b8 100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
@@ -39,7 +39,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
@@ -100,7 +100,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
{
@@ -264,7 +264,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 799ea569ab5..8cb313de3b6 100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -97,7 +97,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;
}
@@ -118,19 +118,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);
}
}
@@ -140,7 +140,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 0d6ce27dc07..68fe06f5f9f 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -274,7 +274,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;
}
@@ -291,7 +291,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);
}
}
@@ -402,7 +402,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();
@@ -412,11 +412,11 @@ void World::LoadConfigSettings(bool reload)
if (m_defaultDbcLocale >= 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_defaultDbcLocale = LOCALE_enUS;
}
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Using %s DBC Locale", localeNames[m_defaultDbcLocale]);
+ TC_LOG_INFO("server.loading", "Using %s DBC Locale", localeNames[m_defaultDbcLocale]);
///- Read the player limit and the Message of the day from the config file
SetPlayerAmountLimit(sConfigMgr->GetIntDefault("PlayerLimit", 100));
@@ -435,27 +435,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);
@@ -479,7 +479,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);
@@ -514,13 +514,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];
@@ -529,12 +529,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;
}
@@ -542,12 +542,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;
@@ -555,25 +555,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
@@ -583,7 +583,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);
@@ -606,14 +606,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)
@@ -622,7 +622,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)
@@ -634,7 +634,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);
@@ -653,7 +653,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);
@@ -662,7 +662,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);
@@ -680,21 +680,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;
}
@@ -705,7 +705,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;
}
@@ -713,14 +713,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;
}
@@ -729,7 +729,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;
}
@@ -737,14 +737,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;
}
@@ -753,25 +753,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];
}
@@ -779,12 +779,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.." UI64FMTD ". Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], uint64(MAX_MONEY_AMOUNT), 0);
+ TC_LOG_ERROR("server.loading", "StartPlayerMoney (%i) must be in range 0.." UI64FMTD ". Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], uint64(MAX_MONEY_AMOUNT), 0);
m_int_configs[CONFIG_START_PLAYER_MONEY] = 0;
}
else if (m_int_configs[CONFIG_START_PLAYER_MONEY] > 0x7FFFFFFF-1) // TODO: (See 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], 0x7FFFFFFF-1, 0x7FFFFFFF-1);
m_int_configs[CONFIG_START_PLAYER_MONEY] = 0x7FFFFFFF-1;
}
@@ -792,32 +792,32 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CURRENCY_RESET_HOUR] = sConfigMgr->GetIntDefault("Currency.ResetHour", 3);
if (m_int_configs[CONFIG_CURRENCY_RESET_HOUR] > 23)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_CURRENCY_RESET_HOUR]);
+ TC_LOG_ERROR("server.loading", "Currency.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_CURRENCY_RESET_HOUR]);
m_int_configs[CONFIG_CURRENCY_RESET_HOUR] = 3;
}
m_int_configs[CONFIG_CURRENCY_RESET_DAY] = sConfigMgr->GetIntDefault("Currency.ResetDay", 3);
if (m_int_configs[CONFIG_CURRENCY_RESET_DAY] > 6)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.ResetDay (%i) can't be load. Set to 3.", m_int_configs[CONFIG_CURRENCY_RESET_DAY]);
+ TC_LOG_ERROR("server.loading", "Currency.ResetDay (%i) can't be load. Set to 3.", m_int_configs[CONFIG_CURRENCY_RESET_DAY]);
m_int_configs[CONFIG_CURRENCY_RESET_DAY] = 3;
}
m_int_configs[CONFIG_CURRENCY_RESET_INTERVAL] = sConfigMgr->GetIntDefault("Currency.ResetInterval", 7);
if (int32(m_int_configs[CONFIG_CURRENCY_RESET_INTERVAL]) <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.ResetInterval (%i) must be > 0, set to default 7.", m_int_configs[CONFIG_CURRENCY_RESET_INTERVAL]);
+ TC_LOG_ERROR("server.loading", "Currency.ResetInterval (%i) must be > 0, set to default 7.", m_int_configs[CONFIG_CURRENCY_RESET_INTERVAL]);
m_int_configs[CONFIG_CURRENCY_RESET_INTERVAL] = 7;
}
m_int_configs[CONFIG_CURRENCY_START_HONOR_POINTS] = sConfigMgr->GetIntDefault("Currency.StartHonorPoints", 0);
if (int32(m_int_configs[CONFIG_CURRENCY_START_HONOR_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.StartHonorPoints (%i) must be >= 0, set to default 0.", m_int_configs[CONFIG_CURRENCY_START_HONOR_POINTS]);
+ TC_LOG_ERROR("server.loading", "Currency.StartHonorPoints (%i) must be >= 0, set to default 0.", m_int_configs[CONFIG_CURRENCY_START_HONOR_POINTS]);
m_int_configs[CONFIG_CURRENCY_START_HONOR_POINTS] = 0;
}
m_int_configs[CONFIG_CURRENCY_MAX_HONOR_POINTS] = sConfigMgr->GetIntDefault("Currency.MaxHonorPoints", 4000);
if (int32(m_int_configs[CONFIG_CURRENCY_MAX_HONOR_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.MaxHonorPoints (%i) can't be negative. Set to default 4000.", m_int_configs[CONFIG_CURRENCY_MAX_HONOR_POINTS]);
+ TC_LOG_ERROR("server.loading", "Currency.MaxHonorPoints (%i) can't be negative. Set to default 4000.", m_int_configs[CONFIG_CURRENCY_MAX_HONOR_POINTS]);
m_int_configs[CONFIG_CURRENCY_MAX_HONOR_POINTS] = 4000;
}
m_int_configs[CONFIG_CURRENCY_MAX_HONOR_POINTS] *= 100; //precision mod
@@ -825,13 +825,13 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CURRENCY_START_JUSTICE_POINTS] = sConfigMgr->GetIntDefault("Currency.StartJusticePoints", 0);
if (int32(m_int_configs[CONFIG_CURRENCY_START_JUSTICE_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.StartJusticePoints (%i) must be >= 0, set to default 0.", m_int_configs[CONFIG_CURRENCY_START_JUSTICE_POINTS]);
+ TC_LOG_ERROR("server.loading", "Currency.StartJusticePoints (%i) must be >= 0, set to default 0.", m_int_configs[CONFIG_CURRENCY_START_JUSTICE_POINTS]);
m_int_configs[CONFIG_CURRENCY_START_JUSTICE_POINTS] = 0;
}
m_int_configs[CONFIG_CURRENCY_MAX_JUSTICE_POINTS] = sConfigMgr->GetIntDefault("Currency.MaxJusticePoints", 4000);
if (int32(m_int_configs[CONFIG_CURRENCY_MAX_JUSTICE_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.MaxJusticePoints (%i) can't be negative. Set to default 4000.", m_int_configs[CONFIG_CURRENCY_MAX_JUSTICE_POINTS]);
+ TC_LOG_ERROR("server.loading", "Currency.MaxJusticePoints (%i) can't be negative. Set to default 4000.", m_int_configs[CONFIG_CURRENCY_MAX_JUSTICE_POINTS]);
m_int_configs[CONFIG_CURRENCY_MAX_JUSTICE_POINTS] = 4000;
}
m_int_configs[CONFIG_CURRENCY_MAX_JUSTICE_POINTS] *= 100; //precision mod
@@ -839,13 +839,13 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CURRENCY_START_CONQUEST_POINTS] = sConfigMgr->GetIntDefault("Currency.StartConquestPoints", 0);
if (int32(m_int_configs[CONFIG_CURRENCY_START_CONQUEST_POINTS]) < 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.StartConquestPoints (%i) must be >= 0, set to default 0.", m_int_configs[CONFIG_CURRENCY_START_CONQUEST_POINTS]);
+ TC_LOG_ERROR("server.loading", "Currency.StartConquestPoints (%i) must be >= 0, set to default 0.", m_int_configs[CONFIG_CURRENCY_START_CONQUEST_POINTS]);
m_int_configs[CONFIG_CURRENCY_START_CONQUEST_POINTS] = 0;
}
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP] = sConfigMgr->GetIntDefault("Currency.ConquestPointsWeekCap", 1650);
if (int32(m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP]) <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.ConquestPointsWeekCap (%i) must be > 0, set to default 1650.", m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP]);
+ TC_LOG_ERROR("server.loading", "Currency.ConquestPointsWeekCap (%i) must be > 0, set to default 1650.", m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP]);
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP] = 1650;
}
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP] *= 100; //precision mod
@@ -853,7 +853,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD] = sConfigMgr->GetIntDefault("Currency.ConquestPointsArenaReward", 180);
if (int32(m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD]) <= 0)
{
- TC_LOG_ERROR(LOG_FILTER_SERVER_LOADING, "Currency.ConquestPointsArenaReward (%i) must be > 0, set to default 180.", m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD]);
+ TC_LOG_ERROR("server.loading", "Currency.ConquestPointsArenaReward (%i) must be > 0, set to default 180.", m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD]);
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD] = 180;
}
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD] *= 100; //precision mod
@@ -861,7 +861,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;
}
@@ -881,7 +881,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;
}
@@ -895,13 +895,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);
@@ -915,7 +915,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)
@@ -928,7 +928,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)
@@ -937,7 +937,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);
@@ -959,7 +959,7 @@ void World::LoadConfigSettings(bool reload)
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;
}
@@ -972,7 +972,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);
@@ -1004,14 +1004,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;
}
@@ -1075,10 +1075,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_NEWS_LOG_COUNT] = sConfigMgr->GetIntDefault("Guild.NewsLogRecordsCount", GUILD_NEWSLOG_MAX_RECORDS);
@@ -1095,12 +1095,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;
}
@@ -1108,12 +1108,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;
}
@@ -1121,12 +1121,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;
}
@@ -1157,16 +1157,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);
@@ -1174,17 +1174,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);
@@ -1336,7 +1336,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);
}
@@ -1348,7 +1348,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
@@ -1367,36 +1367,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);
LoadDB2Stores(m_dataPath);
- 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();
@@ -1408,344 +1408,344 @@ 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 Spell Phase Dbc Info...");
+ TC_LOG_INFO("server.loading", "Loading Spell Phase Dbc Info...");
sObjectMgr->LoadSpellPhaseInfo();
- 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->LoadItemTemplateAddon();
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Item Scripts..."); // must be after LoadItemPrototypes
+ TC_LOG_INFO("misc", "Loading Item Scripts..."); // must be after LoadItemPrototypes
sObjectMgr->LoadItemScriptNames();
- 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 Graveyard Orientations...");
+ TC_LOG_INFO("server.loading", "Loading Graveyard Orientations...");
sObjectMgr->LoadGraveyardOrientations();
- 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 Guild XP for level...");
+ TC_LOG_INFO("server.loading", "Loading Guild XP for level...");
sGuildMgr->LoadGuildXpForLevel();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Guild rewards...");
+ TC_LOG_INFO("server.loading", "Loading Guild rewards...");
sGuildMgr->LoadGuildRewards();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Guilds...");
+ TC_LOG_INFO("server.loading", "Loading Guilds...");
sGuildMgr->LoadGuilds();
sGuildFinderMgr->LoadFromDB();
- 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 Phase definitions...");
+ TC_LOG_INFO("server.loading", "Loading Phase definitions...");
sObjectMgr->LoadPhaseDefinitions();
- 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
@@ -1753,33 +1753,33 @@ 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 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;
@@ -1810,16 +1810,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
@@ -1829,68 +1829,68 @@ 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();
///- 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();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Calculate next currency reset time...");
+ TC_LOG_INFO("server.loading", "Calculate next currency reset time...");
InitCurrencyResetTime();
LoadCharacterNameData();
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Initializing Opcodes...");
+ TC_LOG_INFO("misc", "Initializing Opcodes...");
opcodeTable.Initialize();
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading hotfix info...");
+ TC_LOG_INFO("misc", "Loading hotfix info...");
sObjectMgr->LoadHotfixData();
- TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading missing KeyChains...");
+ TC_LOG_INFO("server.loading", "Loading missing KeyChains...");
sObjectMgr->LoadMissingKeyChains();
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);
@@ -1916,7 +1916,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;
@@ -1936,7 +1936,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;
}
@@ -1953,7 +1953,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 !
@@ -1965,7 +1965,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;
}
@@ -2133,7 +2133,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();
@@ -2626,7 +2626,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());
}
}
@@ -2644,7 +2644,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();
}
@@ -2700,7 +2700,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);
@@ -2769,7 +2769,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)
@@ -2937,7 +2937,7 @@ void World::InitCurrencyResetTime()
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);
@@ -2983,7 +2983,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);
@@ -3001,7 +3001,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);
@@ -3056,7 +3056,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);
@@ -3076,7 +3076,7 @@ void World::ResetGuildCap()
uint32 week = getWorldState(WS_GUILD_WEEKLY_RESET_TIME);
week = week < 7 ? week + 1 : 1;
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Guild Daily Cap reset. Week: %u", week == 1);
+ TC_LOG_INFO("misc", "Guild Daily Cap reset. Week: %u", week == 1);
sWorld->setWorldState(WS_GUILD_WEEKLY_RESET_TIME, week);
sGuildMgr->ResetTimes(week == 1);
}
@@ -3132,7 +3132,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;
}
@@ -3147,7 +3147,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));
}
@@ -3225,12 +3225,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;
}
@@ -3244,7 +3244,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)
@@ -3301,7 +3301,7 @@ void World::UpdatePhaseDefinitions()
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 fd6c0b7a149..05b56e7b25d 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -414,11 +414,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, true);
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName().c_str());
@@ -1354,7 +1354,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 7f50ceed1d6..a49926678ba 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_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 57097e41831..406fac9cd67 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1109,7 +1109,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)
@@ -1188,7 +1188,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();
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index 859bec5b347..81a9c7d59ac 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:
{
int64 newmoney = int64(targetMoney) + moneyToAdd;
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(newmoney));
+ TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_CURRENT_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(newmoney));
if (newmoney <= 0)
{
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
@@ -1045,7 +1045,7 @@ public:
target->ModifyMoney(moneyToAdd);
}
- TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(target->GetMoney()));
+ TC_LOG_DEBUG("misc", handler->GetTrinityString(LANG_NEW_MONEY), uint32(targetMoney), int32(moneyToAdd), uint32(target->GetMoney()));
return true;
}
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 422ca31a4c2..1e91e3087bf 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -970,7 +970,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
@@ -978,7 +978,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;
}
}
@@ -987,10 +987,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 14b66c8a4e1..94295993280 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -218,7 +218,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);
@@ -241,7 +241,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;
@@ -256,7 +256,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.");
@@ -318,7 +318,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.");
@@ -327,7 +327,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;
@@ -335,7 +335,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;
@@ -343,7 +343,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;
@@ -351,7 +351,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;
@@ -359,7 +359,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;
@@ -367,7 +367,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;
@@ -382,7 +382,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;
@@ -390,7 +390,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;
@@ -424,7 +424,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();
@@ -516,7 +516,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;
@@ -524,7 +524,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;
@@ -532,7 +532,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;
@@ -540,7 +540,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);
@@ -549,7 +549,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);
@@ -558,7 +558,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;
@@ -566,7 +566,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;
@@ -574,7 +574,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;
@@ -582,12 +582,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;
@@ -595,7 +595,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.");
@@ -605,7 +605,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.");
@@ -615,7 +615,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.");
@@ -625,7 +625,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.");
@@ -635,7 +635,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.");
@@ -645,7 +645,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.");
@@ -655,7 +655,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.");
@@ -665,7 +665,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.");
@@ -675,7 +675,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.");
@@ -685,7 +685,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);
@@ -694,7 +694,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.");
@@ -704,7 +704,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.");
@@ -714,7 +714,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;
@@ -729,7 +729,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;
@@ -737,7 +737,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;
@@ -745,7 +745,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;
@@ -753,7 +753,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;
@@ -761,7 +761,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;
@@ -769,7 +769,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;
@@ -777,7 +777,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;
@@ -785,7 +785,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;
@@ -793,7 +793,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;
@@ -801,7 +801,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;
@@ -809,7 +809,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;
@@ -817,7 +817,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;
@@ -825,7 +825,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;
@@ -833,7 +833,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;
@@ -841,7 +841,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;
@@ -849,7 +849,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;
@@ -857,7 +857,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;
@@ -865,7 +865,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;
@@ -873,7 +873,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;
@@ -881,7 +881,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;
@@ -889,7 +889,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;
@@ -897,7 +897,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;
@@ -905,7 +905,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;
@@ -913,7 +913,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;
@@ -921,7 +921,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;
@@ -929,7 +929,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;
@@ -945,7 +945,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();
@@ -965,7 +965,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();
@@ -978,7 +978,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();
@@ -998,7 +998,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();
@@ -1010,7 +1010,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;
@@ -1018,7 +1018,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();
@@ -1029,7 +1029,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();
@@ -1040,9 +1040,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;
@@ -1050,7 +1050,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;
@@ -1058,7 +1058,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;
@@ -1066,7 +1066,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;
@@ -1074,7 +1074,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;
@@ -1082,7 +1082,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;
@@ -1090,7 +1090,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;
@@ -1098,7 +1098,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;
@@ -1106,7 +1106,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;
@@ -1114,7 +1114,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;
@@ -1122,7 +1122,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;
@@ -1130,7 +1130,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;
@@ -1138,7 +1138,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;
@@ -1147,7 +1147,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.");
@@ -1156,7 +1156,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;
@@ -1164,7 +1164,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;
@@ -1172,7 +1172,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;
@@ -1180,7 +1180,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;
@@ -1188,7 +1188,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;
@@ -1197,7 +1197,7 @@ public:
static bool HandleReloadPhaseDefinitionsCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Reloading phase_definitions table...");
+ TC_LOG_INFO("misc", "Reloading phase_definitions table...");
sObjectMgr->LoadPhaseDefinitions();
sWorld->UpdatePhaseDefinitions();
handler->SendGlobalGMSysMessage("Phase Definitions reloaded.");
@@ -1206,7 +1206,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 a75c503112e..ccde8deb981 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -89,7 +89,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/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
index 1f393205bc1..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;
}
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 fbec94887b2..f1ccf35e490 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
@@ -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/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index beff85b730f..504b3bc6e97 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -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/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 6997b7123bc..8efcbf29d30 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -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;
}
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_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index c31eb1bea11..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;
}
}
@@ -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/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
index f7abb46b9b7..41261549e38 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
@@ -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/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 57ac54d807d..ae2ba650915 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;
}
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/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
index 4460fb99f2b..f1aa47df8f8 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp
@@ -167,7 +167,7 @@ public:
else
{
//Madrigosa not found, end intro
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Madrigosa was not found");
+ TC_LOG_ERROR("scripts", "Madrigosa was not found");
EndIntro();
}
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 2895e85de71..9cd929981bf 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -264,7 +264,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;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 2730d308828..f1c0fd9cc83 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -748,7 +748,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;
@@ -1406,7 +1406,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/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
index 8a7944464a1..0f23cd67ab3 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
@@ -136,7 +136,7 @@ public:
}
}
else
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
+ TC_LOG_DEBUG("scripts", "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
return NULL;
}
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index 4652eef3faa..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;
}
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/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index bb84100152c..c40f2981be4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -247,7 +247,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/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
index e9edbb46537..8250f1ec3c0 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp
@@ -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/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 8cdf5f246d0..cc3cf8192dc 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/the_black_morass.cpp
@@ -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/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
index 4bf2ed9d8bf..59a24032d5f 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -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/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/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index ce33f4dbba6..697b4bee5bc 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -554,7 +554,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
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 9e401c4f962..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
@@ -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/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
index a5c35650032..68387279c1d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
@@ -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/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 718ac1667b8..3a790ec683b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -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)");
}
}
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index cf552abe042..057bb725c32 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -161,7 +161,7 @@ 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 { }
@@ -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;
}
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/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index f109dcf22ba..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);
}
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index ed7d90cf808..0aad4973000 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -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();
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index e69b6b017a4..5cf152bd6e2 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -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;
}
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 75fee6b749e..4c19931153a 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -84,7 +84,7 @@ class spell_rog_blade_flurry : public SpellScriptLoader
{
PreventDefaultAction();
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "damage: %u procSpell: %u",
+ TC_LOG_ERROR("misc", "damage: %u procSpell: %u",
eventInfo.GetDamageInfo()->GetDamage(), eventInfo.GetDamageInfo()->GetSpellInfo() ? eventInfo.GetDamageInfo()->GetSpellInfo()->Id : 0);
GetTarget()->CastCustomSpell(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK, SPELLVALUE_BASE_POINT0, eventInfo.GetDamageInfo()->GetDamage(), _procTarget, true, NULL, aurEff);
@@ -297,7 +297,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/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 6f142fda19b..2ad372e991e 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());
}
}
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index cb1c036e6bf..b723497d545 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 0f2a984860d..ef2cd0a3a31 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;
}
@@ -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;
}
@@ -848,7 +848,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;
}
diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h
index 1ddd790cc46..bf373433844 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/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/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index 25ffbc18614..f569b8352d3 100644
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
@@ -76,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;
}
@@ -122,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
@@ -139,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;
}
@@ -163,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
@@ -172,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;
@@ -200,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
@@ -212,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
@@ -221,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;
@@ -250,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
@@ -262,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)
@@ -272,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();
@@ -312,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
@@ -321,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);
@@ -377,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;
}
@@ -389,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;
}
@@ -412,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;
@@ -438,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;
}
@@ -489,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");
@@ -514,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/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 84f1e1b6fd1..30089cfb197 100644
--- a/src/server/shared/Database/PreparedStatement.cpp
+++ b/src/server/shared/Database/PreparedStatement.cpp
@@ -77,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
}
@@ -240,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;
}
@@ -250,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;
}
diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp
index 31a464ed165..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;
}
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/Logging/AppenderDB.cpp b/src/server/shared/Logging/AppenderDB.cpp
index c461186089c..204592720dc 100644
--- a/src/server/shared/Logging/AppenderDB.cpp
+++ b/src/server/shared/Logging/AppenderDB.cpp
@@ -25,7 +25,7 @@ AppenderDB::~AppenderDB() { }
void AppenderDB::_write(LogMessage const& message)
{
- // Avoid infinite loop, PExecute triggers Logging with LOG_FILTER_SQL type
+ // Avoid infinite loop, PExecute triggers Logging with "sql.sql" type
if (!enabled || !message.type.find("sql"))
return;
diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp
index 9cd4e4a8cce..58c22d19df1 100644
--- a/src/server/shared/Logging/Log.cpp
+++ b/src/server/shared/Logging/Log.cpp
@@ -385,14 +385,14 @@ void Log::outFatal(std::string const& filter, const char * str, ...)
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;
@@ -403,7 +403,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;
@@ -412,7 +412,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;
diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h
index 81daee02503..e2e942d7e9b 100644
--- a/src/server/shared/Logging/Log.h
+++ b/src/server/shared/Logging/Log.h
@@ -28,53 +28,6 @@
#include <string>
#include <ace/Singleton.h>
-// TODO: Replace all defines in core
-#define LOG_FILTER_ACHIEVEMENTSYS "achievement"
-#define LOG_FILTER_AUCTIONHOUSE "auctionHouse"
-#define LOG_FILTER_ARENAS "bg.arena"
-#define LOG_FILTER_BATTLEFIELD "bg.battlefield"
-#define LOG_FILTER_BATTLEGROUND "bg.battleground"
-#define LOG_FILTER_PLAYER_CHATLOG "chat.log"
-#define LOG_FILTER_CALENDAR "calendar"
-#define LOG_FILTER_CHATSYS "chat.system"
-#define LOG_FILTER_CHEAT "cheat"
-#define LOG_FILTER_REMOTECOMMAND "commands.ra"
-#define LOG_FILTER_GMCOMMAND "commands.gm"
-#define LOG_FILTER_CONDITIONSYS "condition"
-#define LOG_FILTER_PETS "entities.pet"
-#define LOG_FILTER_CHARACTER "entities.player.character"
-#define LOG_FILTER_PLAYER_DUMP "entities.player.dump"
-#define LOG_FILTER_PLAYER "entities.player"
-#define LOG_FILTER_PLAYER_ITEMS "entities.player.items"
-#define LOG_FILTER_PLAYER_LOADING "entities.player.loading"
-#define LOG_FILTER_PLAYER_SKILLS "entities.player.skills"
-#define LOG_FILTER_TRANSPORTS "entities.transport"
-#define LOG_FILTER_UNITS "entities.unit"
-#define LOG_FILTER_VEHICLES "entities.vehicle"
-#define LOG_FILTER_GAMEEVENTS "gameevent"
-#define LOG_FILTER_GUILD "guild"
-#define LOG_FILTER_LFG "lfg"
-#define LOG_FILTER_LOOT "loot"
-#define LOG_FILTER_MAPSCRIPTS "maps.script"
-#define LOG_FILTER_MAPS "maps"
-#define LOG_FILTER_GENERAL "misc"
-#define LOG_FILTER_NETWORKIO "network"
-#define LOG_FILTER_OPCODES "network.opcode"
-#define LOG_FILTER_SOAP "network.soap"
-#define LOG_FILTER_OUTDOORPVP "outdoorpvp"
-#define LOG_FILTER_POOLSYS "pool"
-#define LOG_FILTER_RBAC "rbac"
-#define LOG_FILTER_TSCR "scripts"
-#define LOG_FILTER_DATABASE_AI "scripts.ai"
-#define LOG_FILTER_SERVER_LOADING "server.loading"
-#define LOG_FILTER_AUTHSERVER "server.authserver"
-#define LOG_FILTER_WORLDSERVER "server.worldserver"
-#define LOG_FILTER_SPELLS_AURAS "spells"
-#define LOG_FILTER_SQL_DEV "sql.dev"
-#define LOG_FILTER_SQL_DRIVER "sql.driver"
-#define LOG_FILTER_SQL "sql.sql"
-#define LOG_FILTER_WARDEN "warden"
-
#define LOGGER_ROOT "root"
class Log
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/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/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 14954f29f09..27e570c697f 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2902,7 +2902,7 @@ Currency.ConquestPointsArenaReward = 180
# 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 d824ac2a4f0..10d870e9c3a 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -135,7 +135,7 @@ TCHAR const* LocalesT[] =
void CreateDir(std::string const& path)
{
- if (chdir(Path.c_str()) == 0)
+ if (chdir(path.c_str()) == 0)
{
chdir("../");
return;