summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/Collision/Management/MMapManager.cpp22
-rw-r--r--src/common/Collision/Management/VMapManager2.cpp4
-rw-r--r--src/common/Collision/Maps/MapTree.cpp16
-rw-r--r--src/common/Collision/Models/GameObjectModel.cpp6
-rw-r--r--src/common/Configuration/Config.cpp18
-rw-r--r--src/server/authserver/Server/AuthSocket.cpp87
-rw-r--r--src/server/authserver/Server/RealmAcceptor.h4
-rw-r--r--src/server/database/Database/AdhocStatement.h2
-rw-r--r--src/server/database/Database/Callback.h2
-rw-r--r--src/server/game/AI/CoreAI/CombatAI.cpp6
-rw-r--r--src/server/game/AI/CoreAI/GuardAI.cpp4
-rw-r--r--src/server/game/AI/CoreAI/PetAI.cpp8
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp2
-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.cpp6
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp16
-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.cpp112
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp36
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h2
-rw-r--r--src/server/game/Achievements/AchievementMgr.cpp68
-rw-r--r--src/server/game/Addons/AddonMgr.cpp12
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp26
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp20
-rw-r--r--src/server/game/Battlefield/BattlefieldHandler.cpp6
-rw-r--r--src/server/game/Battlefield/BattlefieldMgr.cpp18
-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.cpp14
-rw-r--r--src/server/game/Battlegrounds/ArenaTeamMgr.cpp10
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp36
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp32
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp102
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp24
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp6
-rw-r--r--src/server/game/Calendar/CalendarMgr.cpp8
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp4
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.cpp18
-rw-r--r--src/server/game/Chat/Chat.cpp9
-rw-r--r--src/server/game/Chat/ChatLink.cpp100
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp50
-rw-r--r--src/server/game/Conditions/DisableMgr.cpp32
-rw-r--r--src/server/game/DataStores/DBCStores.cpp24
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp74
-rw-r--r--src/server/game/DungeonFinding/LFGQueue.cpp59
-rw-r--r--src/server/game/DungeonFinding/LFGScripts.cpp16
-rw-r--r--src/server/game/Entities/Corpse/Corpse.cpp8
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp35
-rw-r--r--src/server/game/Entities/Creature/CreatureGroups.cpp22
-rw-r--r--src/server/game/Entities/Creature/GossipDef.cpp12
-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.cpp20
-rw-r--r--src/server/game/Entities/Item/Container/Bag.cpp2
-rw-r--r--src/server/game/Entities/Item/Item.cpp8
-rw-r--r--src/server/game/Entities/Item/ItemEnchantmentMgr.cpp6
-rw-r--r--src/server/game/Entities/Object/Object.cpp63
-rw-r--r--src/server/game/Entities/Object/ObjectGuid.cpp2
-rw-r--r--src/server/game/Entities/Object/Updates/UpdateData.cpp10
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp30
-rw-r--r--src/server/game/Entities/Player/Player.cpp492
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp14
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp268
-rw-r--r--src/server/game/Entities/Vehicle/Vehicle.cpp39
-rw-r--r--src/server/game/Events/GameEventMgr.cpp192
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp636
-rw-r--r--src/server/game/Globals/ObjectMgr.h8
-rw-r--r--src/server/game/Grids/ObjectGridLoader.cpp6
-rw-r--r--src/server/game/Groups/Group.cpp23
-rw-r--r--src/server/game/Groups/GroupMgr.cpp22
-rw-r--r--src/server/game/Guilds/Guild.cpp74
-rw-r--r--src/server/game/Guilds/GuildMgr.cpp88
-rw-r--r--src/server/game/Handlers/AddonHandler.cpp6
-rw-r--r--src/server/game/Handlers/ArenaTeamHandler.cpp26
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp48
-rw-r--r--src/server/game/Handlers/BattleGroundHandler.cpp16
-rw-r--r--src/server/game/Handlers/CalendarHandler.cpp2
-rw-r--r--src/server/game/Handlers/ChannelHandler.cpp34
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp76
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp8
-rw-r--r--src/server/game/Handlers/CombatHandler.cpp4
-rw-r--r--src/server/game/Handlers/DuelHandler.cpp8
-rw-r--r--src/server/game/Handlers/GroupHandler.cpp40
-rw-r--r--src/server/game/Handlers/GuildHandler.cpp68
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp74
-rw-r--r--src/server/game/Handlers/LFGHandler.cpp52
-rw-r--r--src/server/game/Handlers/LootHandler.cpp14
-rw-r--r--src/server/game/Handlers/MailHandler.cpp16
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp150
-rw-r--r--src/server/game/Handlers/MovementHandler.cpp46
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp58
-rw-r--r--src/server/game/Handlers/PetHandler.cpp78
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp54
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp26
-rw-r--r--src/server/game/Handlers/QuestHandler.cpp52
-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.cpp34
-rw-r--r--src/server/game/Handlers/TaxiHandler.cpp32
-rw-r--r--src/server/game/Handlers/TicketHandler.cpp2
-rw-r--r--src/server/game/Handlers/TradeHandler.cpp24
-rw-r--r--src/server/game/Handlers/VehicleHandler.cpp26
-rw-r--r--src/server/game/Handlers/VoiceChatHandler.cpp6
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp16
-rw-r--r--src/server/game/Instances/InstanceScript.cpp13
-rw-r--r--src/server/game/Instances/InstanceScript.h2
-rw-r--r--src/server/game/Loot/LootItemStorage.cpp8
-rw-r--r--src/server/game/Loot/LootMgr.cpp76
-rw-r--r--src/server/game/Mails/Mail.cpp2
-rw-r--r--src/server/game/Maps/Map.cpp102
-rw-r--r--src/server/game/Maps/MapInstanced.cpp8
-rw-r--r--src/server/game/Maps/MapManager.cpp10
-rw-r--r--src/server/game/Maps/MapUpdater.cpp2
-rw-r--r--src/server/game/Maps/TransportMgr.cpp20
-rw-r--r--src/server/game/Misc/GameGraveyard.cpp20
-rw-r--r--src/server/game/Miscellaneous/Formulas.cpp2
-rw-r--r--src/server/game/Movement/MotionMaster.cpp116
-rw-r--r--src/server/game/Movement/MovementGenerators/PathGenerator.cpp10
-rw-r--r--src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp12
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp3
-rw-r--r--src/server/game/Movement/Waypoints/WaypointManager.cpp6
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvP.cpp14
-rw-r--r--src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp14
-rw-r--r--src/server/game/Petitions/PetitionMgr.cpp16
-rw-r--r--src/server/game/Pools/PoolMgr.cpp64
-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.cpp6
-rw-r--r--src/server/game/Scripting/ScriptMgr.h12
-rw-r--r--src/server/game/Scripting/ScriptSystem.cpp8
-rw-r--r--src/server/game/Server/WorldSession.cpp40
-rw-r--r--src/server/game/Server/WorldSocket.cpp53
-rw-r--r--src/server/game/Server/WorldSocketAcceptor.h4
-rw-r--r--src/server/game/Server/WorldSocketMgr.cpp20
-rw-r--r--src/server/game/Skills/SkillDiscovery.cpp6
-rw-r--r--src/server/game/Skills/SkillExtraItems.cpp32
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp64
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp20
-rw-r--r--src/server/game/Spells/Spell.cpp80
-rw-r--r--src/server/game/Spells/SpellEffects.cpp74
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
-rw-r--r--src/server/game/Spells/SpellMgr.cpp186
-rw-r--r--src/server/game/Spells/SpellScript.cpp98
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp16
-rw-r--r--src/server/game/Tickets/TicketMgr.cpp10
-rw-r--r--src/server/game/Tools/CharacterDatabaseCleaner.cpp8
-rw-r--r--src/server/game/Tools/PlayerDump.cpp8
-rw-r--r--src/server/game/Warden/Warden.cpp16
-rw-r--r--src/server/game/Warden/WardenCheckMgr.cpp32
-rw-r--r--src/server/game/Warden/WardenMac.cpp20
-rw-r--r--src/server/game/Warden/WardenWin.cpp42
-rw-r--r--src/server/game/Weather/Weather.cpp12
-rw-r--r--src/server/game/Weather/WeatherMgr.cpp6
-rw-r--r--src/server/game/World/World.cpp552
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp2
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp10
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp8
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp5
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp190
-rw-r--r--src/server/scripts/Commands/cs_reset.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp8
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp2
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp2
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp2
-rw-r--r--src/server/scripts/World/npc_professions.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp2
-rw-r--r--src/server/shared/Network/RealmSocket.cpp2
-rw-r--r--src/server/worldserver/ACSoap/ACSoap.cpp28
-rw-r--r--src/server/worldserver/Master.cpp24
-rw-r--r--src/server/worldserver/WorldThread/WorldRunnable.cpp4
-rw-r--r--src/server/worldserver/worldserver.conf.dist36
-rw-r--r--src/tools/map_extractor/wdt.h2
-rw-r--r--src/tools/mesh_extractor/ADT.h2
-rw-r--r--src/tools/mesh_extractor/Chunk.h2
-rw-r--r--src/tools/mesh_extractor/ChunkedData.h2
-rw-r--r--src/tools/mesh_extractor/Constants.h2
-rw-r--r--src/tools/mesh_extractor/DBC.h2
-rw-r--r--src/tools/mesh_extractor/Geometry.h2
-rw-r--r--src/tools/mesh_extractor/LiquidHandler.h2
-rw-r--r--src/tools/mesh_extractor/MPQManager.h2
-rw-r--r--src/tools/mesh_extractor/MapChunk.h2
-rw-r--r--src/tools/mesh_extractor/Model.h2
-rw-r--r--src/tools/mesh_extractor/ObjectDataHandler.h2
-rw-r--r--src/tools/mesh_extractor/TileBuilder.h2
-rw-r--r--src/tools/mesh_extractor/WDT.h2
-rw-r--r--src/tools/mesh_extractor/WorldModelGroup.h2
-rw-r--r--src/tools/mesh_extractor/WorldModelHandler.h2
-rw-r--r--src/tools/mesh_extractor/WorldModelRoot.h2
199 files changed, 2312 insertions, 4487 deletions
diff --git a/src/common/Collision/Management/MMapManager.cpp b/src/common/Collision/Management/MMapManager.cpp
index 00f57fb023..4c763a1efb 100644
--- a/src/common/Collision/Management/MMapManager.cpp
+++ b/src/common/Collision/Management/MMapManager.cpp
@@ -86,7 +86,7 @@ namespace MMAP
if (DT_SUCCESS != mesh->init(&params))
{
dtFreeNavMesh(mesh);
- LOG_ERROR("server", "MMAP:loadMapData: Failed to initialize dtNavMesh for mmap %03u from file %s", mapId, fileName.c_str());
+ LOG_ERROR("maps", "MMAP:loadMapData: Failed to initialize dtNavMesh for mmap %03u from file %s", mapId, fileName.c_str());
return false;
}
@@ -117,7 +117,7 @@ namespace MMAP
uint32 packedGridPos = packTileID(x, y);
if (mmap->loadedTileRefs.find(packedGridPos) != mmap->loadedTileRefs.end())
{
- LOG_ERROR("server", "MMAP:loadMap: Asked to load already loaded navmesh tile. %03u%02i%02i.mmtile", mapId, x, y);
+ LOG_ERROR("maps", "MMAP:loadMap: Asked to load already loaded navmesh tile. %03u%02i%02i.mmtile", mapId, x, y);
return false;
}
@@ -134,14 +134,14 @@ namespace MMAP
MmapTileHeader fileHeader;
if (fread(&fileHeader, sizeof(MmapTileHeader), 1, file) != 1 || fileHeader.mmapMagic != MMAP_MAGIC)
{
- LOG_ERROR("server", "MMAP:loadMap: Bad header in mmap %03u%02i%02i.mmtile", mapId, x, y);
+ 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)
{
- LOG_ERROR("server", "MMAP:loadMap: %03u%02i%02i.mmtile was built with generator v%i, expected v%i",
+ 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;
@@ -153,7 +153,7 @@ namespace MMAP
size_t result = fread(data, fileHeader.size, 1, file);
if (!result)
{
- LOG_ERROR("server", "MMAP:loadMap: Bad header or data in mmap %03u%02i%02i.mmtile", mapId, x, y);
+ LOG_ERROR("maps", "MMAP:loadMap: Bad header or data in mmap %03u%02i%02i.mmtile", mapId, x, y);
fclose(file);
return false;
}
@@ -188,9 +188,7 @@ namespace MMAP
if (itr == loadedMMaps.end())
{
// file may not exist, therefore not loaded
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "MMAP:unloadMap: Asked to unload not loaded navmesh map. %03u%02i%02i.mmtile", mapId, x, y);
-#endif
return false;
}
@@ -201,9 +199,7 @@ namespace MMAP
if (mmap->loadedTileRefs.find(packedGridPos) == mmap->loadedTileRefs.end())
{
// file may not exist, therefore not loaded
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "MMAP:unloadMap: Asked to unload not loaded navmesh tile. %03u%02i%02i.mmtile", mapId, x, y);
-#endif
return false;
}
@@ -215,7 +211,7 @@ 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
- LOG_ERROR("server", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
+ LOG_ERROR("maps", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
ABORT();
}
else
@@ -247,11 +243,11 @@ namespace MMAP
uint32 y = (i.first & 0x0000FFFF);
if (dtStatusFailed(mmap->navMesh->removeTile(i.second, nullptr, nullptr)))
- LOG_ERROR("server", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
+ LOG_ERROR("maps", "MMAP:unloadMap: Could not unload %03u%02i%02i.mmtile from navmesh", mapId, x, y);
else
{
--loadedTiles;
- LOG_DEBUG("server", "MMAP:unloadMap: Unloaded mmtile %03i[%02i,%02i] from %03i", mapId, x, y, mapId);
+ LOG_DEBUG("maps", "MMAP:unloadMap: Unloaded mmtile %03i[%02i,%02i] from %03i", mapId, x, y, mapId);
}
}
@@ -317,7 +313,7 @@ namespace MMAP
if (dtStatusFailed(query->init(mmap->navMesh, 1024)))
{
dtFreeNavMeshQuery(query);
- LOG_ERROR("server", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
+ LOG_ERROR("maps", "MMAP:GetNavMeshQuery: Failed to initialize dtNavMeshQuery for mapId %03u instanceId %u", mapId, instanceId);
return nullptr;
}
diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager2.cpp
index ff819e1336..0383b8c0dc 100644
--- a/src/common/Collision/Management/VMapManager2.cpp
+++ b/src/common/Collision/Management/VMapManager2.cpp
@@ -299,7 +299,7 @@ namespace VMAP
WorldModel* worldmodel = new WorldModel();
if (!worldmodel->readFile(basepath + filename + ".vmo"))
{
- LOG_ERROR("server", "VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
+ LOG_ERROR("maps", "VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
delete worldmodel;
return nullptr;
}
@@ -319,7 +319,7 @@ namespace VMAP
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
{
- LOG_ERROR("server", "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
+ LOG_ERROR("maps", "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
return;
}
if (model->second.decRefCount() == 0)
diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp
index 7e68464ab8..46feecb65c 100644
--- a/src/common/Collision/Maps/MapTree.cpp
+++ b/src/common/Collision/Maps/MapTree.cpp
@@ -42,7 +42,7 @@ namespace VMAP
AreaInfoCallback(ModelInstance* val): prims(val) {}
void operator()(const Vector3& point, uint32 entry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) && defined(VMAP_DEBUG)
+#if defined(VMAP_DEBUG)
LOG_DEBUG("maps", "AreaInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
#endif
prims[entry].intersectPoint(point, aInfo);
@@ -58,7 +58,7 @@ namespace VMAP
LocationInfoCallback(ModelInstance* val, LocationInfo& info): prims(val), locInfo(info), result(false) {}
void operator()(const Vector3& point, uint32 entry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) && defined(VMAP_DEBUG)
+#if defined(VMAP_DEBUG)
LOG_DEBUG("maps", "LocationInfoCallback: trying to intersect '%s'", prims[entry].name.c_str());
#endif
if (prims[entry].GetLocationInfo(point, locInfo))
@@ -336,7 +336,7 @@ namespace VMAP
}
if (!iTreeValues)
{
- LOG_ERROR("server", "StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY);
+ LOG_ERROR("maps", "StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY);
return false;
}
bool result = true;
@@ -362,7 +362,7 @@ namespace VMAP
// acquire model instance
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
if (!model)
- LOG_ERROR("server", "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
+ LOG_ERROR("maps", "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
// update tree
uint32 referencedVal;
@@ -371,7 +371,7 @@ namespace VMAP
{
if (!iLoadedSpawns.count(referencedVal))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) && defined(VMAP_DEBUG)
+#if defined(VMAP_DEBUG)
if (referencedVal > iNTreeValues)
{
LOG_DEBUG("maps", "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u)", referencedVal, iNTreeValues);
@@ -384,7 +384,7 @@ namespace VMAP
else
{
++iLoadedSpawns[referencedVal];
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) && defined(VMAP_DEBUG)
+#if defined(VMAP_DEBUG)
if (iTreeValues[referencedVal].ID != spawn.ID)
LOG_DEBUG("maps", "StaticMapTree::LoadMapTile() : trying to load wrong spawn in node");
else if (iTreeValues[referencedVal].name != spawn.name)
@@ -412,7 +412,7 @@ namespace VMAP
loadedTileMap::iterator tile = iLoadedTiles.find(tileID);
if (tile == iLoadedTiles.end())
{
- LOG_ERROR("server", "StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY);
+ LOG_ERROR("maps", "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
@@ -446,7 +446,7 @@ namespace VMAP
else
{
if (!iLoadedSpawns.count(referencedNode))
- LOG_ERROR("server", "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
+ LOG_ERROR("maps", "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/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp
index 56b91c49d5..dbac4440d3 100644
--- a/src/common/Collision/Models/GameObjectModel.cpp
+++ b/src/common/Collision/Models/GameObjectModel.cpp
@@ -81,8 +81,8 @@ void LoadGameObjectModelList(std::string const& dataPath)
fclose(model_list_file);
- LOG_INFO("server", ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
GameObjectModel::~GameObjectModel()
@@ -101,7 +101,7 @@ bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> model
// ignore models with no bounds
if (mdl_box == G3D::AABox::zero())
{
- LOG_ERROR("server", "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
+ LOG_ERROR("maps", "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
return false;
}
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp
index d24e082190..5899f74ff5 100644
--- a/src/common/Configuration/Config.cpp
+++ b/src/common/Configuration/Config.cpp
@@ -60,7 +60,7 @@ namespace
{
if (!replace)
{
- LOG_ERROR("server", "> Config: Option '%s' is exist! Option key - '%s'", optionName.c_str(), itr->second.c_str());
+ LOG_ERROR("server.loading", "> Config: Option '%s' is exist! Option key - '%s'", optionName.c_str(), itr->second.c_str());
return;
}
@@ -213,7 +213,7 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
{
if (showLogs)
{
- LOG_ERROR("server", "> Config: Missing name %s in config, add \"%s = %s\"",
+ LOG_ERROR("server.loading", "> Config: Missing name %s in config, add \"%s = %s\"",
name.c_str(), name.c_str(), Acore::ToString(def).c_str());
}
@@ -225,7 +225,7 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
{
if (showLogs)
{
- LOG_ERROR("server", "> Config: Bad value defined for name '%s', going to use '%s' instead",
+ LOG_ERROR("server.loading", "> Config: Bad value defined for name '%s', going to use '%s' instead",
name.c_str(), Acore::ToString(def).c_str());
}
@@ -243,7 +243,7 @@ std::string ConfigMgr::GetValueDefault<std::string>(std::string const& name, std
{
if (showLogs)
{
- LOG_ERROR("server", "> Config: Missing name %s in config, add \"%s = %s\"",
+ LOG_ERROR("server.loading", "> Config: Missing name %s in config, add \"%s = %s\"",
name.c_str(), name.c_str(), def.c_str());
}
@@ -269,7 +269,7 @@ bool ConfigMgr::GetOption<bool>(std::string const& name, bool const& def, bool s
{
if (showLogs)
{
- LOG_ERROR("server", "> Config: Bad value defined for name '%s', going to use '%s' instead",
+ LOG_ERROR("server.loading", "> Config: Bad value defined for name '%s', going to use '%s' instead",
name.c_str(), def ? "true" : "false");
}
@@ -379,13 +379,13 @@ bool ConfigMgr::LoadModulesConfigs()
void ConfigMgr::PrintLoadedModulesConfigs()
{
// Print modules configurations
- LOG_INFO("server", " ");
- LOG_INFO("server", "Using modules configuration:");
+ LOG_INFO("server.loading", " ");
+ LOG_INFO("server.loading", "Using modules configuration:");
for (auto const& itr : _moduleConfigFiles)
- LOG_INFO("server", "> %s", itr.c_str());
+ LOG_INFO("server.loading", "> %s", itr.c_str());
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
/*
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index 102ef5ca25..53e9e6052c 100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -222,14 +222,12 @@ AuthSocket::~AuthSocket() = default;
// Accept the connection
void AuthSocket::OnAccept()
{
- LOG_INFO("server", "'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
+ LOG_INFO("server.authserver", "'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
}
void AuthSocket::OnClose()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "AuthSocket::OnClose");
-#endif
+ LOG_DEBUG("server.authserver", "AuthSocket::OnClose");
}
// Read the packet from the client
@@ -252,7 +250,7 @@ void AuthSocket::OnRead()
++challengesInARow;
if (challengesInARow == MAX_AUTH_LOGON_CHALLENGES_IN_A_ROW)
{
- LOG_INFO("server", "Got %u AUTH_LOGON_CHALLENGE in a row from '%s', possible ongoing DoS", challengesInARow, socket().getRemoteAddress().c_str());
+ LOG_INFO("server.authserver", "Got %u AUTH_LOGON_CHALLENGE in a row from '%s', possible ongoing DoS", challengesInARow, socket().getRemoteAddress().c_str());
socket().shutdown();
return;
}
@@ -262,7 +260,7 @@ void AuthSocket::OnRead()
challengesInARowRealmList++;
if (challengesInARowRealmList == MAX_AUTH_GET_REALM_LIST)
{
- LOG_INFO("server", "Got %u REALM_LIST in a row from '%s', possible ongoing DoS", challengesInARowRealmList, socket().getRemoteAddress().c_str());
+ LOG_INFO("server.authserver", "Got %u REALM_LIST in a row from '%s', possible ongoing DoS", challengesInARowRealmList, socket().getRemoteAddress().c_str());
socket().shutdown();
return;
}
@@ -275,15 +273,11 @@ void AuthSocket::OnRead()
{
if ((uint8)table[i].cmd == _cmd && (table[i].status == _status))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
-#endif
+ LOG_DEBUG("server.authserver", "Got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
if (!(*this.*table[i].handler)())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
-#endif
+ LOG_DEBUG("server.authserver", "Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
return;
}
break;
@@ -293,9 +287,7 @@ void AuthSocket::OnRead()
// Report unknown packets in the error log
if (i == AUTH_TOTAL_COMMANDS)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Got unknown packet from '%s'", socket().getRemoteAddress().c_str());
-#endif
+ LOG_DEBUG("server.authserver", "Got unknown packet from '%s'", socket().getRemoteAddress().c_str());
socket().shutdown();
return;
}
@@ -309,9 +301,7 @@ std::mutex LastLoginAttemptMutex;
// Logon Challenge command handler
bool AuthSocket::_HandleLogonChallenge()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Entering _HandleLogonChallenge");
-#endif
+ LOG_DEBUG("server.authserver", "Entering _HandleLogonChallenge");
if (socket().recv_len() < sizeof(sAuthLogonChallenge_C))
return false;
@@ -327,9 +317,7 @@ bool AuthSocket::_HandleLogonChallenge()
EndianConvertPtr<uint16>(&buf[0]);
uint16 remaining = ((sAuthLogonChallenge_C*)&buf[0])->size;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "[AuthChallenge] got header, body is %#04x bytes", remaining);
-#endif
+ 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;
@@ -341,10 +329,8 @@ bool AuthSocket::_HandleLogonChallenge()
// Read the remaining of the packet
socket().recv((char*)&buf[4], remaining);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "[AuthChallenge] got full packet, %#04x bytes", ch->size);
- LOG_DEBUG("network", "[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I);
-#endif
+ LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", ch->size);
+ LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I);
// BigEndian code, nop in little endian case
// size already converted
@@ -412,7 +398,7 @@ bool AuthSocket::_HandleLogonChallenge()
if (_accountInfo.LastIP != ipAddress)
{
- LOG_DEBUG("network", "[AuthChallenge] Account IP differs");
+ LOG_DEBUG("server.authserver", "[AuthChallenge] Account IP differs");
pkt << uint8(WOW_FAIL_LOCKED_ENFORCED);
SendAuthPacket();
return true;
@@ -550,7 +536,7 @@ bool AuthSocket::_HandleLogonProof()
if (_expversion == NO_VALID_EXP_FLAG)
{
// Check if we have the appropriate patch on the disk
- LOG_DEBUG("network", "Client with invalid version, patching is not implemented");
+ LOG_DEBUG("server.authserver", "Client with invalid version, patching is not implemented");
socket().shutdown();
return true;
}
@@ -558,6 +544,7 @@ bool AuthSocket::_HandleLogonProof()
if (std::optional<SessionKey> K = _srp6->VerifyChallengeResponse(lp.A, lp.clientM))
{
_sessionKey = *K;
+ LOG_DEBUG("server.authserver", "'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _accountInfo.Login.c_str());
// Check auth token
bool tokenSuccess = false;
@@ -688,7 +675,7 @@ bool AuthSocket::_HandleLogonProof()
// Reconnect Challenge command handler
bool AuthSocket::_HandleReconnectChallenge()
{
- LOG_TRACE("network", "Entering _HandleReconnectChallenge");
+ LOG_TRACE("server.authserver", "Entering _HandleReconnectChallenge");
if (socket().recv_len() < sizeof(sAuthLogonChallenge_C))
return false;
@@ -702,9 +689,7 @@ bool AuthSocket::_HandleReconnectChallenge()
EndianConvertPtr<uint16>(&buf[0]);
uint16 remaining = ((sAuthLogonChallenge_C*)&buf[0])->size;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "[ReconnectChallenge] got header, body is %#04x bytes", remaining);
-#endif
+ 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;
@@ -719,10 +704,8 @@ bool AuthSocket::_HandleReconnectChallenge()
// Read the remaining of the packet
socket().recv((char*)&buf[4], remaining);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "[ReconnectChallenge] got full packet, %#04x bytes", ch->size);
- LOG_DEBUG("network", "[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I);
-#endif
+ LOG_DEBUG("server.authserver", "[ReconnectChallenge] got full packet, %#04x bytes", ch->size);
+ LOG_DEBUG("server.authserver", "[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I);
std::string login((char const*)ch->I, ch->I_len);
LOG_DEBUG("server.authserver", "[ReconnectChallenge] '%s'", login.c_str());
@@ -743,7 +726,7 @@ bool AuthSocket::_HandleReconnectChallenge()
// Stop if the account is not found
if (!result)
{
- LOG_ERROR("server", "'%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());
+ 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;
}
@@ -773,9 +756,7 @@ bool AuthSocket::_HandleReconnectChallenge()
// Reconnect Proof command handler
bool AuthSocket::_HandleReconnectProof()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Entering _HandleReconnectProof");
-#endif
+ LOG_TRACE("server.authserver", "Entering _HandleReconnectProof");
// Read the packet
sAuthReconnectProof_C lp;
if (!socket().recv((char*)&lp, sizeof(sAuthReconnectProof_C)))
@@ -846,9 +827,7 @@ ACE_INET_Addr const& AuthSocket::GetAddressForClient(Realm const& realm, ACE_INE
// Realm List command handler
bool AuthSocket::_HandleRealmList()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Entering _HandleRealmList");
-#endif
+ LOG_TRACE("server.authserver", "Entering _HandleRealmList");
if (socket().recv_len() < 5)
return false;
@@ -862,7 +841,7 @@ bool AuthSocket::_HandleRealmList()
PreparedQueryResult result = LoginDatabase.Query(stmt);
if (!result)
{
- LOG_ERROR("server", "'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _accountInfo.Login.c_str());
+ 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(), _accountInfo.Login.c_str());
socket().shutdown();
return false;
}
@@ -979,13 +958,11 @@ bool AuthSocket::_HandleRealmList()
// Resume patch transfer
bool AuthSocket::_HandleXferResume()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Entering _HandleXferResume");
-#endif
+ LOG_TRACE("server.authserver", "Entering _HandleXferResume");
// Check packet length and patch existence
if (socket().recv_len() < 9 || !pPatch) // FIXME: pPatch is never used
{
- LOG_ERROR("server", "Error while resuming patch transfer (wrong packet)");
+ LOG_ERROR("server.authserver", "Error while resuming patch transfer (wrong packet)");
return false;
}
@@ -1002,9 +979,7 @@ bool AuthSocket::_HandleXferResume()
// Cancel patch transfer
bool AuthSocket::_HandleXferCancel()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Entering _HandleXferCancel");
-#endif
+ LOG_DEBUG("server.authserver", "Entering _HandleXferCancel");
// Close and delete the socket
socket().recv_skip(1); //clear input buffer
@@ -1016,14 +991,12 @@ bool AuthSocket::_HandleXferCancel()
// Accept patch transfer
bool AuthSocket::_HandleXferAccept()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Entering _HandleXferAccept");
-#endif
+ LOG_DEBUG("server.authserver", "Entering _HandleXferAccept");
// Check packet length and patch existence
if (!pPatch)
{
- LOG_ERROR("server", "Error while accepting patch transfer (wrong packet)");
+ LOG_ERROR("server.authserver", "Error while accepting patch transfer (wrong packet)");
return false;
}
@@ -1104,13 +1077,11 @@ void Patcher::LoadPatchMD5(char* szFileName)
std::string path = "./patches/";
path += szFileName;
FILE* pPatch = fopen(path.c_str(), "rb");
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "Loading patch info from %s\n", path.c_str());
-#endif
+ LOG_DEBUG("server.authserver", "Loading patch info from %s\n", path.c_str());
if (!pPatch)
{
- LOG_ERROR("server", "Error loading patch %s\n", path.c_str());
+ 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 1dfd6b568c..f11c3b81fb 100644
--- a/src/server/authserver/Server/RealmAcceptor.h
+++ b/src/server/authserver/Server/RealmAcceptor.h
@@ -36,7 +36,7 @@ protected:
virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/)
{
- LOG_INFO("server", "Resuming acceptor");
+ LOG_INFO("network", "Resuming acceptor");
reactor()->cancel_timer(this, 1);
return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK);
}
@@ -46,7 +46,7 @@ protected:
#if defined(ENFILE) && defined(EMFILE)
if (errno == ENFILE || errno == EMFILE)
{
- LOG_ERROR("server", "Out of file descriptors, suspending incoming connections for 10 seconds");
+ LOG_ERROR("network", "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, nullptr, ACE_Time_Value(10));
}
diff --git a/src/server/database/Database/AdhocStatement.h b/src/server/database/Database/AdhocStatement.h
index 07e83400d4..61b60af98a 100644
--- a/src/server/database/Database/AdhocStatement.h
+++ b/src/server/database/Database/AdhocStatement.h
@@ -27,4 +27,4 @@ private:
QueryResultFuture m_result;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/server/database/Database/Callback.h b/src/server/database/Database/Callback.h
index e71e6653b3..32da3adc4b 100644
--- a/src/server/database/Database/Callback.h
+++ b/src/server/database/Database/Callback.h
@@ -296,4 +296,4 @@ private:
uint8 _stage;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index 5cc5c3ff65..b260794520 100644
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -158,7 +158,7 @@ void CasterAI::UpdateAI(uint32 diff)
ArcherAI::ArcherAI(Creature* c) : CreatureAI(c)
{
if (!me->m_spells[0])
- LOG_ERROR("server", "ArcherAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
+ LOG_ERROR("entities.unit.ai", "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;
@@ -207,7 +207,7 @@ void ArcherAI::UpdateAI(uint32 /*diff*/)
TurretAI::TurretAI(Creature* c) : CreatureAI(c)
{
if (!me->m_spells[0])
- LOG_ERROR("server", "TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
+ LOG_ERROR("entities.unit.ai", "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;
@@ -280,10 +280,8 @@ void VehicleAI::OnCharmed(bool apply)
void VehicleAI::LoadConditions()
{
conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE, me->GetEntry());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (!conditions.empty())
LOG_DEBUG("condition", "VehicleAI::LoadConditions: loaded %u conditions", uint32(conditions.size()));
-#endif
}
void VehicleAI::CheckConditions(uint32 diff)
diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp
index 0261d7243a..9b4cc27970 100644
--- a/src/server/game/AI/CoreAI/GuardAI.cpp
+++ b/src/server/game/AI/CoreAI/GuardAI.cpp
@@ -36,9 +36,7 @@ void GuardAI::EnterEvadeMode()
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Guard entry: %u enters evade mode.", me->GetEntry());
-#endif
me->RemoveAllAuras();
me->DeleteThreatList();
@@ -53,4 +51,4 @@ void GuardAI::JustDied(Unit* killer)
{
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
me->SendZoneUnderAttackMessage(player);
-} \ No newline at end of file
+}
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp
index aff727f4b4..81c9996e34 100644
--- a/src/server/game/AI/CoreAI/PetAI.cpp
+++ b/src/server/game/AI/CoreAI/PetAI.cpp
@@ -55,9 +55,7 @@ void PetAI::_stopAttack()
{
if (!me->IsAlive())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature stoped attacking cuz his dead [%s]", me->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("entities.unit.ai", "Creature stoped attacking cuz his dead [%s]", me->GetGUID().ToString().c_str());
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
me->CombatStop();
@@ -153,9 +151,7 @@ void PetAI::UpdateAI(uint32 diff)
if (_needToStop())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Pet AI stopped attacking [%s]", me->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("entities.unit.ai", "Pet AI stopped attacking [%s]", me->GetGUID().ToString().c_str());
_stopAttack();
return;
}
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 9056ff7d5e..caa69cd9ac 100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -126,7 +126,7 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
void UnitAI::DoCast(uint32 spellId)
{
Unit* target = nullptr;
- //LOG_ERROR("server", "aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target);
+
switch (AISpellInfo[spellId].target)
{
default:
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index b3f3c87d21..aa460d654a 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -41,7 +41,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/, float maxRange
Map* map = creature->GetMap();
if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
{
- LOG_ERROR("server", "DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0);
+ LOG_ERROR("entities.unit.ai", "DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0);
return;
}
@@ -64,7 +64,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/, float maxRange
if (!creature->HasReactState(REACT_PASSIVE) && !creature->GetVictim())
{
- LOG_ERROR("server", "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
+ LOG_ERROR("entities.unit.ai", "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
return;
}
@@ -152,9 +152,7 @@ void CreatureAI::EnterEvadeMode()
if (!_EnterEvadeMode())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Creature %u enters evade mode.", me->GetEntry());
-#endif
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 c3bb47671e..34f9496d4a 100644
--- a/src/server/game/AI/CreatureAISelector.cpp
+++ b/src/server/game/AI/CreatureAISelector.cpp
@@ -81,11 +81,9 @@ namespace FactorySelector
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
// select NullCreatureAI if not another cases
ainame = (ai_factory == nullptr) ? "NullCreatureAI" : ai_factory->key();
LOG_DEBUG("scripts.ai", "Creature %s used AI is %s.", creature->GetGUID().ToString().c_str(), ainame.c_str());
-#endif
return (ai_factory == nullptr ? new NullCreatureAI(creature) : ai_factory->Create(creature));
}
@@ -129,10 +127,8 @@ namespace FactorySelector
//future goAI types go here
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
std::string ainame = (ai_factory == nullptr || go->GetScriptId()) ? "NullGameObjectAI" : ai_factory->key();
LOG_DEBUG("scripts.ai", "GameObject %s used AI is %s.", go->GetGUID().ToString().c_str(), ainame.c_str());
-#endif
return (ai_factory == nullptr ? 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 c771fdf6c5..bf554a3d69 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp
@@ -198,7 +198,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* source, uint32 soundId)
if (!sSoundEntriesStore.LookupEntry(soundId))
{
- LOG_ERROR("server", "TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: %s)", soundId, source->GetGUID().ToString().c_str());
+ LOG_ERROR("entities.unit.ai", "TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: %s)", soundId, source->GetGUID().ToString().c_str());
return;
}
@@ -330,7 +330,7 @@ void ScriptedAI::DoResetThreat()
{
if (!me->CanHaveThreatList() || me->getThreatManager().isThreatListEmpty())
{
- LOG_ERROR("server", "DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
+ LOG_ERROR("entities.unit.ai", "DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
return;
}
@@ -359,7 +359,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
- LOG_ERROR("server", "TSCR: Creature %s Tried to teleport non-player unit %s to x: %f y:%f z: %f o: %f. Aborted.",
+ LOG_ERROR("entities.unit.ai", "TSCR: Creature %s Tried to teleport non-player unit %s to x: %f y:%f z: %f o: %f. Aborted.",
me->GetGUID().ToString().c_str(), unit->GetGUID().ToString().c_str(), x, y, z, o);
}
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 34316eaecf..fa9e2aaac1 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -197,9 +197,7 @@ void npc_escortAI::EnterEvadeMode()
{
AddEscortState(STATE_ESCORT_RETURNING);
ReturnToLastPoint();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: EscortAI has left combat and is now returning to last point");
-#endif
}
else
{
@@ -325,9 +323,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
//Combat start position reached, continue waypoint movement
if (pointId == POINT_LAST_POINT)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: EscortAI has returned to original position before combat");
-#endif
me->SetWalk(!m_bIsRunning);
RemoveEscortState(STATE_ESCORT_RETURNING);
@@ -337,9 +333,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
}
else if (pointId == POINT_HOME)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list.");
-#endif
CurrentWP = WaypointList.begin();
m_uiWPWaitTimer = 1;
@@ -445,13 +439,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
{
if (me->GetVictim())
{
- LOG_ERROR("server", "TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry());
+ LOG_ERROR("entities.unit.ai", "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))
{
- LOG_ERROR("server", "TSCR: EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry());
+ LOG_ERROR("entities.unit.ai", "TSCR: EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry());
return;
}
@@ -479,18 +473,14 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
m_bCanInstantRespawn = instantRespawn;
m_bCanReturnToStart = canLoopPath;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (m_bCanReturnToStart && m_bCanInstantRespawn)
LOG_DEBUG("scripts.ai", "TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
-#endif
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
{
me->GetMotionMaster()->MovementExpired();
me->GetMotionMaster()->MoveIdle();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
-#endif
}
//disable npcflags
@@ -501,10 +491,8 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %s",
uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID.ToString().c_str());
-#endif
CurrentWP = WaypointList.begin();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index 053d05bef3..f0e66454e1 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -147,9 +147,7 @@ void FollowerAI::EnterEvadeMode()
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI left combat, returning to CombatStartPosition.");
-#endif
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
{
@@ -175,9 +173,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI is set completed, despawns.");
-#endif
me->DespawnOrUnsummon();
return;
}
@@ -188,9 +184,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
{
if (HasFollowState(STATE_FOLLOW_RETURNING))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI is returning to leader.");
-#endif
RemoveFollowState(STATE_FOLLOW_RETURNING);
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
@@ -219,9 +213,7 @@ void FollowerAI::UpdateAI(uint32 uiDiff)
if (bIsMaxRangeExceeded)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI failed because player/group was to far away or not found");
-#endif
me->DespawnOrUnsummon();
return;
}
@@ -264,15 +256,13 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
{
if (me->GetVictim())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI attempt to StartFollow while in combat.");
-#endif
return;
}
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
{
- LOG_ERROR("server", "TSCR: FollowerAI attempt to StartFollow while already following.");
+ LOG_ERROR("entities.unit.ai", "TSCR: FollowerAI attempt to StartFollow while already following.");
return;
}
@@ -288,9 +278,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
-#endif
}
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
@@ -299,9 +287,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI start follow %s (%s)", player->GetName().c_str(), m_uiLeaderGUID.ToString().c_str());
-#endif
}
Player* FollowerAI::GetLeaderForFollower()
@@ -320,9 +306,7 @@ Player* FollowerAI::GetLeaderForFollower()
if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE) && member->IsAlive())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI GetLeader changed and returned new leader.");
-#endif
m_uiLeaderGUID = member->GetGUID();
return member;
}
@@ -331,9 +315,7 @@ Player* FollowerAI::GetLeaderForFollower()
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: FollowerAI GetLeader can not find suitable leader.");
-#endif
return nullptr;
}
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 33d6d596a9..abc5ed8213 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -98,7 +98,7 @@ WayPoint* SmartAI::GetNextWayPoint()
{
mLastWP = (*itr).second;
if (mLastWP->id != mCurrentWPID)
- LOG_ERROR("server", "SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
+ LOG_ERROR("scripts.ai.sai", "SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
return (*itr).second;
}
@@ -172,7 +172,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* invoker)
{
if (me->IsInCombat())// no wp movement in combat
{
- LOG_ERROR("server", "SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
+ LOG_ERROR("scripts.ai.sai", "SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
return;
}
@@ -231,7 +231,7 @@ void SmartAI::PausePath(uint32 delay, bool forced)
if (HasEscortState(SMART_ESCORT_PAUSED))
{
- LOG_ERROR("server", "SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
+ LOG_ERROR("scripts.ai.sai", "SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
return;
}
@@ -1096,9 +1096,7 @@ void SmartGameObjectAI::Reset()
// Called when a player opens a gossip dialog with the gameobject.
bool SmartGameObjectAI::GossipHello(Player* player, bool reportUse)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartGameObjectAI::GossipHello");
-#endif
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, (uint32)reportUse, 0, false, nullptr, go);
return false;
}
@@ -1178,9 +1176,7 @@ public:
if (!player->IsAlive())
return false;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "AreaTrigger %u is using SmartTrigger script", trigger->entry);
-#endif
SmartScript script;
script.OnInitialize(nullptr, trigger);
script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->entry);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 1c863a5d98..6410a60a6e 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -141,10 +141,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (unit)
mLastInvoker = unit->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (Unit* tempInvoker = GetLastInvoker())
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: Invoker: %s (%s)", tempInvoker->GetName().c_str(), tempInvoker->GetGUID().ToString().c_str());
-#endif
bool isControlled = e.action.MoveToPos.controlled > 0;
@@ -198,9 +196,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
mTextTimer = e.action.talk.duration;
mUseTextTimer = true;
sCreatureTextMgr->SendChat(talker, uint8(e.action.talk.textGroupID), talkTarget);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_TALK: talker: %s (%s), textId: %u", talker->GetName().c_str(), talker->GetGUID().ToString().c_str(), mLastTextID);
-#endif
break;
}
case SMART_ACTION_SIMPLE_TALK:
@@ -217,10 +213,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
Unit* templastInvoker = GetLastInvoker();
sCreatureTextMgr->SendChat(me, uint8(e.action.talk.textGroupID), IsPlayer(templastInvoker) ? templastInvoker : 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_NEUTRAL, false, (*itr)->ToPlayer());
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SIMPLE_TALK: talker: %s (%s), textGroupId: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), uint8(e.action.talk.textGroupID));
-#endif
}
delete targets;
@@ -237,10 +231,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->ToUnit()->HandleEmoteCommand(e.action.emote.emote);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_PLAY_EMOTE: target: %s (%s), emote: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), e.action.emote.emote);
-#endif
}
}
@@ -258,10 +250,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->SendPlaySound(e.action.sound.sound, e.action.sound.onlySelf > 0);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (%s), sound: %u, onlyself: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), e.action.sound.sound, e.action.sound.onlySelf);
-#endif
}
}
@@ -303,10 +293,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 sound = temp[urand(0, count - 1)];
(*itr)->SendPlaySound(sound, e.action.randomSound.onlySelf > 0);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_SOUND: target: %s (%s), sound: %u, onlyself: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), sound, e.action.randomSound.onlySelf);
-#endif
}
}
@@ -353,10 +341,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->SendPlayMusic(e.action.music.sound, e.action.music.onlySelf > 0);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_MUSIC: target: %s (%s), sound: %u, onlySelf: %u, type: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), e.action.music.sound, e.action.music.onlySelf, e.action.music.type);
-#endif
}
}
@@ -428,10 +414,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 sound = temp[urand(0, count - 1)];
(*itr)->SendPlayMusic(sound, e.action.randomMusic.onlySelf > 0);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_MUSIC: target: %s (%s), sound: %u, onlyself: %u, type: %u",
(*itr)->GetName().c_str(), (*itr)->GetGUID().ToString().c_str(), sound, e.action.randomMusic.onlySelf, e.action.randomMusic.type);
-#endif
}
}
@@ -450,10 +434,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.action.faction.factionID)
{
(*itr)->ToCreature()->setFaction(e.action.faction.factionID);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u (%s) set faction to %u",
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), e.action.faction.factionID);
-#endif
}
else
{
@@ -462,10 +444,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if ((*itr)->ToCreature()->getFaction() != ci->faction)
{
(*itr)->ToCreature()->setFaction(ci->faction);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u (%s) set faction to %u",
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), ci->faction);
-#endif
}
}
}
@@ -496,29 +476,23 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 displayId = ObjectMgr::ChooseDisplayId(ci);
(*itr)->ToCreature()->SetDisplayId(displayId);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u (%s) set displayid to %u",
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), displayId);
-#endif
}
}
//if no param1, then use value from param2 (modelId)
else
{
(*itr)->ToCreature()->SetDisplayId(e.action.morphOrMount.model);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u (%s) set displayid to %u",
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), e.action.morphOrMount.model);
-#endif
}
}
else
{
(*itr)->ToCreature()->DeMorph();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u (%s) demorphs.",
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str());
-#endif
}
}
@@ -536,10 +510,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsPlayer(*itr))
{
(*itr)->ToPlayer()->FailQuest(e.action.quest.quest);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_FAIL_QUEST: Player %s fails quest %u",
(*itr)->GetGUID().ToString().c_str(), e.action.quest.quest);
-#endif
}
}
@@ -565,19 +537,15 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
PlayerMenu menu(session);
menu.SendQuestGiverQuestDetails(q, me->GetGUID(), true);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_OFFER_QUEST: Player %s- offering quest %u",
(*itr)->GetGUID().ToString().c_str(), e.action.questOffer.questID);
-#endif
}
}
else
{
(*itr)->ToPlayer()->AddQuestAndCheckCompletion(q, nullptr);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_OFFER_QUEST: Player %s - quest %u added",
(*itr)->GetGUID().ToString().c_str(), e.action.questOffer.questID);
-#endif
}
}
}
@@ -639,10 +607,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
uint32 emote = temp[urand(0, count - 1)];
(*itr)->ToUnit()->HandleEmoteCommand(emote);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_RANDOM_EMOTE: Creature %s handle random emote %u",
(*itr)->GetGUID().ToString().c_str(), emote);
-#endif
}
}
@@ -660,10 +626,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Unit* target = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
{
me->getThreatManager().modifyThreatPercent(target, e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_THREAT_ALL_PCT: Creature %s modify threat for unit %s, value %i",
me->GetGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
-#endif
}
}
break;
@@ -682,10 +646,8 @@ 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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_THREAT_SINGLE_PCT: Creature %s modify threat for unit %s, value %i",
me->GetGUID().ToString().c_str(), (*itr)->GetGUID().ToString().c_str(), e.action.threatPCT.threatINC ? (int32)e.action.threatPCT.threatINC : -(int32)e.action.threatPCT.threatDEC);
-#endif
}
}
@@ -711,10 +673,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Player* player = (*itr)->ToUnit()->GetCharmerOrOwnerPlayerOrPlayerItself())
{
player->GroupEventHappens(e.action.quest.quest, me);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS: Player %s credited quest %u",
(*itr)->GetGUID().ToString().c_str(), e.action.quest.quest);
-#endif
}
}
}
@@ -823,10 +783,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->ToUnit()->AddAura(e.action.cast.spell, (*itr)->ToUnit());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ADD_AURA: Adding aura %u to unit %s",
e.action.cast.spell, (*itr)->GetGUID().ToString().c_str());
-#endif
}
}
@@ -847,10 +805,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
// xinef: wtf is this shit?
(*itr)->ToGameObject()->SetLootState(GO_READY);
(*itr)->ToGameObject()->UseDoorOrButton(0, !!e.action.activateObject.alternative, unit);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject %s activated",
(*itr)->GetGUID().ToString().c_str());
-#endif
}
}
@@ -868,10 +824,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsGameObject(*itr))
{
(*itr)->ToGameObject()->ResetDoorOrButton();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_RESET_GOBJECT. Gameobject %s reset",
(*itr)->GetGUID().ToString().c_str());
-#endif
}
}
@@ -889,10 +843,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (IsUnit(*itr))
{
(*itr)->ToUnit()->SetUInt32Value(UNIT_NPC_EMOTESTATE, e.action.emote.emote);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SET_EMOTE_STATE. Unit %s set emotestate to %u",
(*itr)->GetGUID().ToString().c_str(), e.action.emote.emote);
-#endif
}
}
@@ -961,10 +913,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
CAST_AI(SmartAI, me->AI())->SetAutoAttack(e.action.autoAttack.attack);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: Creature: %s bool on = %u",
me->GetGUID().ToString().c_str(), e.action.autoAttack.attack);
-#endif
break;
}
case SMART_ACTION_ALLOW_COMBAT_MOVEMENT:
@@ -981,10 +931,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
else
CAST_AI(SmartAI, me->AI())->SetCombatMove(move);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: Creature %s bool on = %u",
me->GetGUID().ToString().c_str(), e.action.combatMove.move);
-#endif
break;
}
case SMART_ACTION_SET_EVENT_PHASE:
@@ -993,10 +941,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
SetPhase(e.action.setEventPhase.phase);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SET_EVENT_PHASE: Creature %s set event phase %u",
GetBaseObject()->GetGUID().ToString().c_str(), e.action.setEventPhase.phase);
-#endif
break;
}
case SMART_ACTION_INC_EVENT_PHASE:
@@ -1006,10 +952,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
IncPhase(e.action.incEventPhase.inc);
DecPhase(e.action.incEventPhase.dec);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_INC_EVENT_PHASE: Creature %s inc event phase by %u, "
"decrease by %u", GetBaseObject()->GetGUID().ToString().c_str(), e.action.incEventPhase.inc, e.action.incEventPhase.dec);
-#endif
break;
}
case SMART_ACTION_EVADE:
@@ -1041,9 +985,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
AcoreStringTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, LANG_FLEE, LANG_UNIVERSAL, nullptr);
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %s DoFleeToGetAssistance", me->GetGUID().ToString().c_str());
-#endif
break;
}
case SMART_ACTION_COMBAT_STOP:
@@ -1069,10 +1011,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (Player* player = (*itr)->ToUnit()->GetCharmerOrOwnerPlayerOrPlayerItself())
player->GroupEventHappens(e.action.quest.quest, GetBaseObject());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %s, group credit for quest %u",
(*itr)->GetGUID().ToString().c_str(), e.action.quest.quest);
-#endif
}
}
@@ -1103,10 +1043,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
else
(*itr)->ToUnit()->RemoveAllAuras();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_REMOVEAURASFROMSPELL: Unit %s, spell %u",
(*itr)->GetGUID().ToString().c_str(), e.action.removeAura.spell);
-#endif
}
delete targets;
@@ -1130,10 +1068,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
float angle = e.action.follow.angle > 6 ? (e.action.follow.angle * M_PI / 180.0f) : e.action.follow.angle;
CAST_AI(SmartAI, me->AI())->SetFollow((*itr)->ToUnit(), float(int32(e.action.follow.dist)) + 0.1f, angle, e.action.follow.credit, e.action.follow.entry, e.action.follow.creditType, e.action.follow.aliveState);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature %s following target %s",
me->GetGUID().ToString().c_str(), (*itr)->GetGUID().ToString().c_str());
-#endif
break;
}
}
@@ -1169,10 +1105,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 phase = temp[urand(0, count - 1)];
SetPhase(phase);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE: Creature %s sets event phase to %u",
GetBaseObject()->GetGUID().ToString().c_str(), phase);
-#endif
break;
}
case SMART_ACTION_RANDOM_PHASE_RANGE:
@@ -1182,10 +1116,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 phase = urand(e.action.randomPhaseRange.phaseMin, e.action.randomPhaseRange.phaseMax);
SetPhase(phase);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_RANDOM_PHASE_RANGE: Creature %s sets event phase to %u",
GetBaseObject()->GetGUID().ToString().c_str(), phase);
-#endif
break;
}
case SMART_ACTION_CALL_KILLEDMONSTER:
@@ -1193,10 +1125,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (trigger && IsPlayer(unit))
{
unit->ToPlayer()->RewardPlayerAndGroupAtEvent(e.action.killedMonster.creature, unit);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: (trigger == true) Player %s, Killcredit: %u",
unit->GetGUID().ToString().c_str(), e.action.killedMonster.creature);
-#endif
}
else if (e.target.type == SMART_TARGET_NONE || e.target.type == SMART_TARGET_SELF) // Loot recipient and his group members
{
@@ -1226,10 +1156,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
continue;
player->RewardPlayerAndGroupAtEvent(e.action.killedMonster.creature, player);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_CALL_KILLEDMONSTER: Player %s, Killcredit: %u",
(*itr)->GetGUID().ToString().c_str(), e.action.killedMonster.creature);
-#endif
}
delete targets;
@@ -1253,10 +1181,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
instance->SetData(e.action.setInstanceData.field, e.action.setInstanceData.data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: Field: %u, data: %u",
e.action.setInstanceData.field, e.action.setInstanceData.data);
-#endif
break;
}
case SMART_ACTION_SET_INST_DATA64:
@@ -1280,10 +1206,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
instance->SetGuidData(e.action.setInstanceData64.field, targets->front()->GetGUID());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: %lu",
e.action.setInstanceData64.field, targets->front()->GetGUID().GetRawValue());
-#endif
delete targets;
break;
}
@@ -1305,9 +1229,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me && !me->isDead())
{
Unit::Kill(me, me);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_DIE: Creature %s", me->GetGUID().ToString().c_str());
-#endif
}
break;
}
@@ -1364,10 +1286,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (me)
{
me->SetSheath(SheathState(e.action.setSheath.sheath));
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction: SMART_ACTION_SET_SHEATH: Creature %s, State: %u",
me->GetGUID().ToString().c_str(), e.action.setSheath.sheath);
-#endif
}
break;
}
@@ -1765,14 +1685,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (SmartAI* ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI()))
ai->GetScript()->StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset);
else
- LOG_ERROR("server", "SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartAI, skipping");
+ LOG_ERROR("scripts.ai.sai", "SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartAI, skipping");
}
else if (IsGameObject(*itr))
{
if (SmartGameObjectAI* ai = CAST_AI(SmartGameObjectAI, (*itr)->ToGameObject()->AI()))
ai->GetScript()->StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset);
else
- LOG_ERROR("server", "SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartGameObjectAI, skipping");
+ LOG_ERROR("scripts.ai.sai", "SmartScript: Action target for SMART_ACTION_SET_COUNTER is not using SmartGameObjectAI, skipping");
}
}
@@ -2039,7 +1959,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
EquipmentInfo const* einfo = sObjectMgr->GetEquipmentInfo(npc->GetEntry(), equipId);
if (!einfo)
{
- LOG_ERROR("server", "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry());
+ LOG_ERROR("scripts.ai.sai", "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry());
break;
}
npc->SetCurrentEquipmentId(equipId);
@@ -2584,10 +2504,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!GetBaseObject())
break;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_SEND_GOSSIP_MENU: gossipMenuId %d, gossipNpcTextId %d",
e.action.sendGossipMenu.gossipMenuId, e.action.sendGossipMenu.gossipNpcTextId);
-#endif
ObjectList* targets = GetTargets(e, unit);
if (!targets)
break;
@@ -2783,7 +2701,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 eventId = e.action.gameEventStop.id;
if (!sGameEventMgr->IsActiveEvent(eventId))
{
- LOG_ERROR("server", "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: %u)", eventId);
+ LOG_ERROR("scripts.ai.sai", "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_STOP, inactive event (id: %u)", eventId);
break;
}
sGameEventMgr->StopEvent(eventId, true);
@@ -2794,7 +2712,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 eventId = e.action.gameEventStart.id;
if (sGameEventMgr->IsActiveEvent(eventId))
{
- LOG_ERROR("server", "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: %u)", eventId);
+ LOG_ERROR("scripts.ai.sai", "SmartScript::ProcessAction: At case SMART_ACTION_GAME_EVENT_START, already activated event (id: %u)", eventId);
break;
}
sGameEventMgr->StartEvent(eventId, true);
@@ -3621,7 +3539,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
{
if (!scriptTrigger && !baseObject)
{
- LOG_ERROR("server", "SMART_TARGET_CREATURE_GUID can not be used without invoker");
+ LOG_ERROR("scripts.ai.sai", "SMART_TARGET_CREATURE_GUID can not be used without invoker");
break;
}
@@ -3634,7 +3552,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
{
if (!scriptTrigger && !GetBaseObject())
{
- LOG_ERROR("server", "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker");
+ LOG_ERROR("scripts.ai.sai", "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker");
break;
}
@@ -4267,9 +4185,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
}
case SMART_EVENT_GOSSIP_SELECT:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript: Gossip Select: menu %u action %u", var0, var1); //little help for scripters
-#endif
if (e.event.gossip.sender != var0 || e.event.gossip.action != var1)
return;
ProcessAction(e, unit, var0, var1);
@@ -4649,13 +4565,11 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTrigger c
if (e.empty())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (obj)
LOG_DEBUG("sql.sql", "SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry());
if (at)
LOG_DEBUG("sql.sql", "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->entry);
-#endif
return;
}
for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i)
@@ -4713,19 +4627,15 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTrigger const* at)
case TYPEID_UNIT:
mScriptType = SMART_SCRIPT_TYPE_CREATURE;
me = obj->ToCreature();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::OnInitialize: source is Creature %u", me->GetEntry());
-#endif
break;
case TYPEID_GAMEOBJECT:
mScriptType = SMART_SCRIPT_TYPE_GAMEOBJECT;
go = obj->ToGameObject();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::OnInitialize: source is GameObject %u", go->GetEntry());
-#endif
break;
default:
- LOG_ERROR("server", "SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
+ LOG_ERROR("scripts.ai.sai", "SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
return;
}
}
@@ -4733,13 +4643,11 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTrigger const* at)
{
mScriptType = SMART_SCRIPT_TYPE_AREATRIGGER;
trigger = at;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("sql.sql", "SmartScript::OnInitialize: source is AreaTrigger %u", trigger->entry);
-#endif
}
else
{
- LOG_ERROR("server", "SmartScript::OnInitialize: !WARNING! Initialized objects are nullptr.");
+ LOG_ERROR("scripts.ai.sai", "SmartScript::OnInitialize: !WARNING! Initialized objects are nullptr.");
return;
}
@@ -4886,7 +4794,7 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry)
// any SmartScriptHolder contained like the "e" parameter passed to this function
if (isProcessingTimedActionList)
{
- LOG_ERROR("server", "Entry %d SourceType %u Event %u Action %u is trying to overwrite timed action list from a timed action, this is not allowed!.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
+ LOG_ERROR("scripts.ai.sai", "Entry %d SourceType %u Event %u Action %u is trying to overwrite timed action list from a timed action, this is not allowed!.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
return;
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 065cc6b518..e7dfce587e 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -44,8 +44,8 @@ void SmartWaypointMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -81,8 +81,8 @@ void SmartWaypointMgr::LoadFromDB()
total++;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
SmartWaypointMgr::~SmartWaypointMgr()
@@ -114,8 +114,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 SmartAI scripts. DB table `smart_scripts` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 SmartAI scripts. DB table `smart_scripts` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -275,8 +275,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
mEventMap[source_type][temp.entryOrGuid].push_back(temp);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
@@ -527,7 +527,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_EVENT_VICTIM_CASTING:
if (e.event.targetCasting.spellId > 0 && !sSpellMgr->GetSpellInfo(e.event.targetCasting.spellId))
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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;
}
@@ -1058,7 +1058,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_REMOVE_POWER:
if (e.action.power.powerType > MAX_POWERS)
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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;
@@ -1069,14 +1069,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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())
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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;
@@ -1088,14 +1088,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
if (eventId < 1 || eventId >= events.size())
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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())
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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;
@@ -1111,7 +1111,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
EquipmentInfo const* einfo = sObjectMgr->GetEquipmentInfo(e.entryOrGuid, equipId);
if (!einfo)
{
- LOG_ERROR("server", "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u, skipped.", equipId, e.entryOrGuid);
+ LOG_ERROR("scripts.ai.sai", "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u, skipped.", equipId, e.entryOrGuid);
return false;
}
}
@@ -1122,7 +1122,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
{
if (!Acore::IsValidMapCoord(e.target.x, e.target.y))
{
- LOG_ERROR("server", "SmartScript: SMART_ACTION_LOAD_GRID uses invalid map coords: %u, skipped.", e.entryOrGuid);
+ LOG_ERROR("scripts.ai.sai", "SmartScript: SMART_ACTION_LOAD_GRID uses invalid map coords: %u, skipped.", e.entryOrGuid);
return false;
}
break;
@@ -1251,7 +1251,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
CreatureData const* data = sObjectMgr->GetCreatureData(entry);
if (!data)
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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
@@ -1261,7 +1261,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
error = true;
if (error)
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("scripts.ai.sai", "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 f5bfc6e103..df8db3a9d0 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -1802,10 +1802,8 @@ public:
return mEventMap[uint32(type)][entry];
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (entry > 0) //first search is for guid (negative), do not drop error if not found
LOG_DEBUG("sql.sql", "SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type));
-#endif
return temp;
}
}
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index e5cb702303..f50bf9aec2 100644
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -630,7 +630,7 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ
if (!criteria)
{
// we will remove not existed criteria for all characters
- LOG_ERROR("server", "Non-existing achievement criteria %u data removed from table `character_achievement_progress`.", id);
+ 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);
@@ -661,9 +661,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
if (achievement->flags & ACHIEVEMENT_FLAG_HIDDEN)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) && defined(ACORE_DEBUG)
LOG_DEBUG("achievement", "AchievementMgr::SendAchievementEarned(%u)", achievement->ID);
-#endif
Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildId());
if (guild)
@@ -776,7 +774,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
if (m_player->IsGameMaster())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (type >= ACHIEVEMENT_CRITERIA_TYPE_TOTAL)
{
LOG_DEBUG("achievement", "UpdateAchievementCriteria: Wrong criteria type %u", type);
@@ -784,7 +781,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
}
LOG_DEBUG("achievement", "AchievementMgr::UpdateAchievementCriteria(%u, %u, %u)", type, miscValue1, miscValue2);
-#endif
AchievementCriteriaEntryList const* achievementCriteriaList = nullptr;
@@ -2030,9 +2026,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("achievement", "AchievementMgr::SetCriteriaProgress(%u, %u) for %s", entry->ID, changeValue, m_player->GetGUID().ToString().c_str());
-#endif
CriteriaProgress* progress = GetCriteriaProgress(entry);
if (!progress)
@@ -2180,7 +2174,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
// disable for gamemasters with GM-mode enabled
if (m_player->IsGameMaster())
{
- LOG_INFO("server", "Not available in GM mode.");
+ LOG_INFO("achievement", "Not available in GM mode.");
ChatHandler(m_player->GetSession()).PSendSysMessage("Not available in GM mode");
return;
}
@@ -2193,9 +2187,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID))
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "AchievementMgr::CompletedAchievement(%u)", achievement->ID);
-#endif
+ LOG_DEBUG("achievement", "AchievementMgr::CompletedAchievement(%u)", achievement->ID);
SendAchievementEarned(achievement);
CompletedAchievementData& ca = m_completedAchievements[achievement->ID];
@@ -2459,8 +2451,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
if (sAchievementCriteriaStore.GetNumRows() == 0)
{
- LOG_ERROR("sql.sql", ">> Loaded 0 achievement criteria.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 achievement criteria.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2598,8 +2590,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
++loaded;
}
- LOG_INFO("server", ">> Loaded %u achievement criteria in %u ms", loaded, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u achievement criteria in %u ms", loaded, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void AchievementGlobalMgr::LoadAchievementReferenceList()
@@ -2608,8 +2600,8 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
if (sAchievementStore.GetNumRows() == 0)
{
- LOG_INFO("server", ">> Loaded 0 achievement references.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 achievement references.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2625,8 +2617,8 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
++count;
}
- LOG_INFO("server", ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void AchievementGlobalMgr::LoadAchievementCriteriaData()
@@ -2639,8 +2631,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2665,7 +2657,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
if (scriptName.length()) // not empty
{
if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT)
- LOG_ERROR("server", "Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType);
+ 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());
}
@@ -2760,8 +2752,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
LOG_ERROR("sql.sql", "Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement);
}
- LOG_INFO("server", ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void AchievementGlobalMgr::LoadCompletedAchievements()
@@ -2780,8 +2772,8 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2794,12 +2786,10 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
if (!achievement)
{
// Remove non existent achievements from all characters
- LOG_ERROR("server", "Non-existing achievement %u data removed from table `character_achievement`.", achievementId);
+ 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));
-
CharacterDatabase.Execute(stmt);
continue;
@@ -2808,8 +2798,8 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
m_allCompletedAchievements[achievementId] = std::chrono::system_clock::time_point::max();
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void AchievementGlobalMgr::LoadRewards()
@@ -2823,8 +2813,8 @@ void AchievementGlobalMgr::LoadRewards()
if (!result)
{
- LOG_ERROR("sql.sql", ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2929,8 +2919,8 @@ void AchievementGlobalMgr::LoadRewards()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void AchievementGlobalMgr::LoadRewardLocales()
@@ -2944,8 +2934,8 @@ void AchievementGlobalMgr::LoadRewardLocales()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 achievement reward locale strings. DB table `achievement_reward_locale` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 achievement reward locale strings. DB table `achievement_reward_locale` is empty");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2969,8 +2959,8 @@ void AchievementGlobalMgr::LoadRewardLocales()
ObjectMgr::AddLocaleString(fields[3].GetString(), locale, data.Text);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %lu Achievement Reward Locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %lu Achievement Reward Locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
AchievementEntry const* AchievementGlobalMgr::GetAchievement(uint32 achievementId) const
diff --git a/src/server/game/Addons/AddonMgr.cpp b/src/server/game/Addons/AddonMgr.cpp
index 8c8a2d1b2c..f3c08d267f 100644
--- a/src/server/game/Addons/AddonMgr.cpp
+++ b/src/server/game/Addons/AddonMgr.cpp
@@ -33,8 +33,8 @@ namespace AddonMgr
QueryResult result = CharacterDatabase.Query("SELECT name, crc FROM addons");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 known addons. DB table `addons` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 known addons. DB table `addons` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -52,8 +52,8 @@ namespace AddonMgr
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
oldMSTime = getMSTime();
result = CharacterDatabase.Query("SELECT id, name, version, UNIX_TIMESTAMP(timestamp) FROM banned_addons");
@@ -81,8 +81,8 @@ namespace AddonMgr
++count2;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u banned addons in %u ms", count2, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u banned addons in %u ms", count2, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index 041b69a845..773f1e16f1 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -89,12 +89,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));
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("auctionHouse", "MSV: %u", MSV);
LOG_DEBUG("auctionHouse", "Items: %u", count);
LOG_DEBUG("auctionHouse", "Multiplier: %f", multiplier);
LOG_DEBUG("auctionHouse", "Deposit: %u", deposit);
-#endif
if (deposit < AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT))
return AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT);
@@ -295,8 +293,8 @@ void AuctionHouseMgr::LoadAuctionItems()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -312,7 +310,7 @@ void AuctionHouseMgr::LoadAuctionItems()
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_template);
if (!proto)
{
- LOG_ERROR("server", "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template);
+ LOG_ERROR("auctionHouse", "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template);
continue;
}
@@ -327,8 +325,8 @@ void AuctionHouseMgr::LoadAuctionItems()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void AuctionHouseMgr::LoadAuctions()
@@ -340,8 +338,8 @@ void AuctionHouseMgr::LoadAuctions()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -366,8 +364,8 @@ void AuctionHouseMgr::LoadAuctions()
CharacterDatabase.CommitTransaction(trans);
- LOG_INFO("server", ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void AuctionHouseMgr::AddAItem(Item* it)
@@ -675,7 +673,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
Item* item = sAuctionMgr->GetAItem(item_guid);
if (!item)
{
- LOG_ERROR("server", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %s", Id, item_guid.ToString().c_str());
+ LOG_ERROR("auctionHouse", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %s", Id, item_guid.ToString().c_str());
return false;
}
data << uint32(Id);
@@ -758,7 +756,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntryFromHouse(houseId);
if (!auctionHouseEntry)
{
- LOG_ERROR("server", "Auction %u has invalid house id %u", Id, houseId);
+ LOG_ERROR("auctionHouse", "Auction %u has invalid house id %u", Id, houseId);
return false;
}
@@ -766,7 +764,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
// and item_template in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems)
if (!sAuctionMgr->GetAItem(item_guid))
{
- LOG_ERROR("server", "Auction %u has not a existing item : %s", Id, item_guid.ToString().c_str());
+ LOG_ERROR("auctionHouse", "Auction %u has not a existing item : %s", Id, item_guid.ToString().c_str());
return false;
}
return true;
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index be64bc35d1..13ca273142 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -292,7 +292,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
- LOG_ERROR("server", "Battlefield::InitStalker: could not spawn Stalker (Creature entry %u), zone messeges will be un-available", entry);
+ LOG_ERROR("bg.battlefield", "Battlefield::InitStalker: could not spawn Stalker (Creature entry %u), zone messeges will be un-available", entry);
}
void Battlefield::KickAfkPlayers()
@@ -582,10 +582,10 @@ BfGraveyard* Battlefield::GetGraveyardById(uint32 id) const
if (m_GraveyardList[id])
return m_GraveyardList[id];
else
- LOG_ERROR("server", "Battlefield::GetGraveyardById Id:%u not existed", id);
+ LOG_ERROR("bg.battlefield", "Battlefield::GetGraveyardById Id:%u not existed", id);
}
else
- LOG_ERROR("server", "Battlefield::GetGraveyardById Id:%u cant be found", id);
+ LOG_ERROR("bg.battlefield", "Battlefield::GetGraveyardById Id:%u cant be found", id);
return nullptr;
}
@@ -677,7 +677,7 @@ void BfGraveyard::SetSpirit(Creature* spirit, TeamId team)
{
if (!spirit)
{
- LOG_ERROR("server", "BfGraveyard::SetSpirit: Invalid Spirit.");
+ LOG_ERROR("bg.battlefield", "BfGraveyard::SetSpirit: Invalid Spirit.");
return;
}
@@ -784,7 +784,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
Map* map = sMapMgr->CreateBaseMap(m_MapId);
if (!map)
{
- LOG_ERROR("server", "Battlefield::SpawnCreature: Can't create creature entry: %u map not found", entry);
+ LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u map not found", entry);
return nullptr;
}
@@ -798,7 +798,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
Creature* creature = new Creature(true);
if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, PHASEMASK_NORMAL, entry, 0, x, y, z, o))
{
- LOG_ERROR("server", "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
+ LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
delete creature;
return nullptr;
}
@@ -830,7 +830,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, PHASEMASK_NORMAL, x, y, z, o, G3D::Quat(), 100, GO_STATE_READY))
{
LOG_ERROR("sql.sql", "Battlefield::SpawnGameObject: Gameobject template %u not found in database! Battlefield not created!", entry);
- LOG_ERROR("server", "Battlefield::SpawnGameObject: Cannot create gameobject template %u! Battlefield not created!", entry);
+ LOG_ERROR("bg.battlefield", "Battlefield::SpawnGameObject: Cannot create gameobject template %u! Battlefield not created!", entry);
delete go;
return nullptr;
}
@@ -923,9 +923,7 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
{
ASSERT(capturePoint);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battlefield", "Creating capture point %u", capturePoint->GetEntry());
-#endif
m_capturePoint = capturePoint->GetGUID();
@@ -933,7 +931,7 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
GameObjectTemplate const* goinfo = capturePoint->GetGOInfo();
if (goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
{
- LOG_ERROR("server", "OutdoorPvP: GO %u is not capture point!", capturePoint->GetEntry());
+ LOG_ERROR("bg.battlefield", "OutdoorPvP: GO %u is not capture point!", capturePoint->GetEntry());
return false;
}
@@ -1089,7 +1087,7 @@ bool BfCapturePoint::Update(uint32 diff)
if (m_OldState != m_State)
{
- //LOG_ERROR("server", "%u->%u", m_OldState, m_State);
+ //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/BattlefieldHandler.cpp b/src/server/game/Battlefield/BattlefieldHandler.cpp
index ea2fcc9f81..894807a4df 100644
--- a/src/server/game/Battlefield/BattlefieldHandler.cpp
+++ b/src/server/game/Battlefield/BattlefieldHandler.cpp
@@ -89,7 +89,7 @@ void WorldSession::HandleBfQueueInviteResponse(WorldPacket& recvData)
uint8 Accepted;
recvData >> BattleId >> Accepted;
- //LOG_ERROR("server", "HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
+
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
@@ -107,7 +107,7 @@ void WorldSession::HandleBfEntryInviteResponse(WorldPacket& recvData)
uint8 Accepted;
recvData >> BattleId >> Accepted;
- //LOG_ERROR("server", "HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
+
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
@@ -129,7 +129,7 @@ void WorldSession::HandleBfExitRequest(WorldPacket& recvData)
uint32 BattleId;
recvData >> BattleId;
- //LOG_ERROR("server", "HandleBfExitRequest: BattleID:%u ", BattleId);
+
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
if (!Bf)
return;
diff --git a/src/server/game/Battlefield/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp
index 4447f53c4b..e2b3581403 100644
--- a/src/server/game/Battlefield/BattlefieldMgr.cpp
+++ b/src/server/game/Battlefield/BattlefieldMgr.cpp
@@ -34,17 +34,15 @@ void BattlefieldMgr::InitBattlefield()
// respawn, init variables
if (!pBf->SetupBattlefield())
{
- LOG_INFO("server", " ");
- LOG_INFO("server", "Battlefield : Wintergrasp init failed.");
- LOG_INFO("server", " ");
+ LOG_ERROR("server.loading", "Battlefield: Wintergrasp init failed.");
+ LOG_INFO("server.loading", " ");
delete pBf;
}
else
{
m_BattlefieldSet.push_back(pBf);
- LOG_INFO("server", " ");
- LOG_INFO("server", "Battlefield : Wintergrasp successfully initiated.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Battlefield: Wintergrasp successfully initiated.");
+ LOG_INFO("server.loading", " ");
}
/* For Cataclysm: Tol Barad
@@ -52,17 +50,13 @@ void BattlefieldMgr::InitBattlefield()
// respawn, init variables
if(!pBf->SetupBattlefield())
{
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad init failed.");
- #endif
delete pBf;
}
else
{
m_BattlefieldSet.push_back(pBf);
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battlefield", "Battlefield : Tol Barad successfully initiated.");
- #endif
} */
}
@@ -81,9 +75,7 @@ void BattlefieldMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
return;
itr->second->HandlePlayerEnterZone(player, zoneid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battlefield", "Player %s entered outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
-#endif
}
void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
@@ -96,9 +88,7 @@ void BattlefieldMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
if (!itr->second->HasPlayer(player))
return;
itr->second->HandlePlayerLeaveZone(player, zoneid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battlefield", "Player %s left outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
-#endif
}
Battlefield* BattlefieldMgr::GetBattlefieldToZoneId(uint32 zoneid)
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 7ede449542..53bff2e096 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -219,7 +219,7 @@ void BattlefieldWG::OnBattleStart()
m_titansRelic = go->GetGUID();
}
else
- LOG_ERROR("server", "WG: Failed to spawn titan relic.");
+ LOG_ERROR("bg.battlefield", "WG: Failed to spawn titan relic.");
// Update tower visibility and update faction
for (GuidUnorderedSet::const_iterator itr = CanonList.begin(); itr != CanonList.end(); ++itr)
@@ -498,7 +498,7 @@ uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) const
case AREA_THE_CHILLED_QUAGMIRE:
return BATTLEFIELD_WG_GY_HORDE;
default:
- LOG_ERROR("server", "BattlefieldWG::GetSpiritGraveyardId: Unexpected Area Id %u", areaId);
+ 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 c174ae4de7..95803b9d12 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.h
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h
@@ -1194,7 +1194,7 @@ struct BfWGGameObjectBuilding
if (GameObject* go = m_WG->GetRelic())
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
else
- LOG_ERROR("server", "BattlefieldWG: Relic not found.");
+ LOG_ERROR("bg.battlefield", "BattlefieldWG: Relic not found.");
break;
case BATTLEFIELD_WG_OBJECTTYPE_DOOR:
case BATTLEFIELD_WG_OBJECTTYPE_WALL:
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 7ec96a18c7..7a758486b9 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -106,7 +106,7 @@ bool ArenaTeam::AddMember(ObjectGuid playerGuid)
// Check if player is already in a similar arena team
if ((player && player->GetArenaTeamId(GetSlot())) || Player::GetArenaTeamIdFromStorage(playerGuid.GetCounter(), GetSlot()) != 0)
{
- LOG_ERROR("server", "Arena: Player %s (%s) already has an arena team of type %u", playerName.c_str(), playerGuid.ToString().c_str(), GetType());
+ LOG_ERROR("bg.arena", "Arena: Player %s (%s) already has an arena team of type %u", playerName.c_str(), playerGuid.ToString().c_str(), GetType());
return false;
}
@@ -258,9 +258,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
if (Empty() || !captainPresentInTeam)
{
// Arena team is empty or captain is not in team, delete from db
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
-#endif
return false;
}
@@ -458,9 +456,7 @@ void ArenaTeam::Roster(WorldSession* session)
}
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_ROSTER");
-#endif
}
void ArenaTeam::Query(WorldSession* session)
@@ -475,9 +471,7 @@ void ArenaTeam::Query(WorldSession* session)
data << uint32(BorderStyle); // border style
data << uint32(BorderColor); // border color
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_QUERY_RESPONSE");
-#endif
}
void ArenaTeam::SendStats(WorldSession* session)
@@ -578,7 +572,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, ObjectGuid guid, uint8 str
data << str1 << str2 << str3;
break;
default:
- LOG_ERROR("server", "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
+ LOG_ERROR("bg.arena", "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
return;
}
@@ -587,9 +581,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, ObjectGuid guid, uint8 str
BroadcastPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_EVENT");
-#endif
}
void ArenaTeam::MassInviteToEvent(WorldSession* session)
@@ -630,7 +622,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
return slot;
}
- LOG_ERROR("server", "FATAL: Unknown arena team type %u for some arena team", type);
+ LOG_ERROR("bg.arena", "FATAL: Unknown arena team type %u for some arena team", type);
return 0xFF;
}
diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
index fa0377fe84..3d4821bd42 100644
--- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp
@@ -117,7 +117,7 @@ uint32 ArenaTeamMgr::GenerateArenaTeamId()
{
if (NextArenaTeamId >= MAX_ARENA_TEAM_ID)
{
- LOG_ERROR("server", "Arena team ids overflow!! Can't continue, shutting down server. ");
+ LOG_ERROR("bg.arena", "Arena team ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
@@ -146,8 +146,8 @@ void ArenaTeamMgr::LoadArenaTeams()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -176,8 +176,8 @@ void ArenaTeamMgr::LoadArenaTeams()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ArenaTeamMgr::DistributeArenaPoints()
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 156e4b2e90..0059613164 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -307,9 +307,7 @@ inline void Battleground::_CheckSafePositions(uint32 diff)
GetTeamStartLoc(itr->second->GetBgTeamId(), x, y, z, o);
if (pos.GetExactDistSq(x, y, z) > maxDist)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", itr->second->GetName().c_str(), GetMapId());
-#endif
itr->second->TeleportTo(GetMapId(), x, y, z, o);
}
}
@@ -442,7 +440,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
if (!FindBgMap())
{
- LOG_ERROR("server", "Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
+ LOG_ERROR("bg.battleground", "Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
EndNow();
return;
}
@@ -1169,7 +1167,7 @@ void Battleground::Init()
if (m_BgInvitedPlayers[TEAM_ALLIANCE] > 0 || m_BgInvitedPlayers[TEAM_HORDE] > 0)
{
- LOG_ERROR("server", "Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!", m_BgInvitedPlayers[TEAM_ALLIANCE], m_BgInvitedPlayers[TEAM_HORDE], m_MapId, m_InstanceID);
+ 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_BgInvitedPlayers[TEAM_ALLIANCE], m_BgInvitedPlayers[TEAM_HORDE], m_MapId, m_InstanceID);
ABORT();
}
@@ -1268,9 +1266,7 @@ void Battleground::AddPlayer(Player* player)
sScriptMgr->OnBattlegroundAddPlayer(this, player);
// Log
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "BATTLEGROUND: Player %s joined the battle.", player->GetName().c_str());
-#endif
+ LOG_DEBUG("bg.battleground", "BATTLEGROUND: Player %s joined the battle.", player->GetName().c_str());
}
// this method adds player to his team's bg group, or sets his correct group if player is already in bg group
@@ -1447,7 +1443,7 @@ void Battleground::UpdatePlayerScore(Player* player, uint32 type, uint32 value,
}
break;
default:
- LOG_ERROR("server", "Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!",
+ LOG_ERROR("bg.battleground", "Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!",
type, m_MapId, m_InstanceID);
break;
}
@@ -1517,7 +1513,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
{
LOG_ERROR("sql.sql", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
entry, m_MapId, m_InstanceID);
- LOG_ERROR("server", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
+ 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;
@@ -1568,7 +1564,7 @@ void Battleground::DoorClose(uint32 type)
}
}
else
- LOG_ERROR("server", "Battleground::DoorClose: door gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
+ LOG_ERROR("bg.battleground", "Battleground::DoorClose: door gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
}
@@ -1580,7 +1576,7 @@ void Battleground::DoorOpen(uint32 type)
obj->SetGoState(GO_STATE_ACTIVE);
}
else
- LOG_ERROR("server", "Battleground::DoorOpen: door gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
+ LOG_ERROR("bg.battleground", "Battleground::DoorOpen: door gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
}
@@ -1588,7 +1584,7 @@ GameObject* Battleground::GetBGObject(uint32 type)
{
GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]);
if (!obj)
- LOG_ERROR("server", "Battleground::GetBGObject: gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
+ LOG_ERROR("bg.battleground", "Battleground::GetBGObject: gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
return obj;
}
@@ -1597,7 +1593,7 @@ Creature* Battleground::GetBGCreature(uint32 type)
{
Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]);
if (!creature)
- LOG_ERROR("server", "Battleground::GetBGCreature: creature (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
+ LOG_ERROR("bg.battleground", "Battleground::GetBGCreature: creature (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
type, BgCreatures[type].ToString().c_str(), m_MapId, m_InstanceID);
return creature;
}
@@ -1642,7 +1638,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, float x, float y,
Creature* creature = new Creature();
if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, PHASEMASK_NORMAL, entry, 0, x, y, z, o))
{
- LOG_ERROR("server", "Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!",
+ 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 nullptr;
@@ -1653,7 +1649,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, float x, float y,
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
if (!cinfo)
{
- LOG_ERROR("server", "Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!",
+ 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 nullptr;
@@ -1692,7 +1688,7 @@ bool Battleground::DelCreature(uint32 type)
return true;
}
- LOG_ERROR("server", "Battleground::DelCreature: creature (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
+ LOG_ERROR("bg.battleground", "Battleground::DelCreature: creature (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
type, BgCreatures[type].ToString().c_str(), m_MapId, m_InstanceID);
BgCreatures[type].Clear();
@@ -1712,7 +1708,7 @@ bool Battleground::DelObject(uint32 type)
return true;
}
- LOG_ERROR("server", "Battleground::DelObject: gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
+ LOG_ERROR("bg.battleground", "Battleground::DelObject: gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
BgObjects[type].Clear();
@@ -1737,7 +1733,7 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
//creature->CastSpell(creature, SPELL_SPIRIT_HEAL_CHANNEL, true);
return true;
}
- LOG_ERROR("server", "Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!",
+ 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;
@@ -1926,7 +1922,7 @@ int32 Battleground::GetObjectType(ObjectGuid guid)
if (BgObjects[i] == guid)
return i;
- LOG_ERROR("server", "Battleground::GetObjectType: player used gameobject (%s) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
+ LOG_ERROR("bg.battleground", "Battleground::GetObjectType: player used gameobject (%s) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
guid.ToString().c_str(), m_MapId, m_InstanceID);
return -1;
@@ -1983,7 +1979,7 @@ uint32 Battleground::GetTeamScore(TeamId teamId) const
if (teamId == TEAM_ALLIANCE || teamId == TEAM_HORDE)
return m_TeamScores[teamId];
- LOG_ERROR("server", "GetTeamScore with wrong Team %u for BG %u", teamId, GetBgTypeID());
+ LOG_ERROR("bg.battleground", "GetTeamScore with wrong Team %u for BG %u", teamId, GetBgTypeID());
return 0;
}
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index f159146ab0..286ab3d667 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -248,7 +248,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
itr2 = itr++;
if (!bg->IsPlayerInBattleground(itr2->first))
{
- LOG_ERROR("server", "Player %s has scoreboard entry for battleground %u but is not in battleground!", itr->first.ToString().c_str(), bg->GetBgTypeID());
+ LOG_ERROR("bg.battleground", "Player %s has scoreboard entry for battleground %u but is not in battleground!", itr->first.ToString().c_str(), bg->GetBgTypeID());
continue;
}
@@ -519,7 +519,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
+ LOG_ERROR("bg.battleground", ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
return;
}
@@ -538,7 +538,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
if (!bl)
{
- LOG_ERROR("server", "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeId);
+ LOG_ERROR("bg.battleground", "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeId);
continue;
}
@@ -559,14 +559,14 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
{
- LOG_ERROR("server", "Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
+ LOG_ERROR("bg.battleground", "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)
{
- LOG_ERROR("server", "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
+ LOG_ERROR("bg.battleground", "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
data.bgTypeId, data.LevelMin, data.LevelMax);
continue;
}
@@ -594,7 +594,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
}
else
{
- LOG_ERROR("server", "Table `battleground_template` for id %u have non-existed `game_graveyard` table id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
+ LOG_ERROR("bg.battleground", "Table `battleground_template` for id %u have non-existed `game_graveyard` table id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
continue;
}
@@ -608,7 +608,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
}
else
{
- LOG_ERROR("server", "Table `battleground_template` for id %u have non-existed `game_graveyard` table id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
+ LOG_ERROR("bg.battleground", "Table `battleground_template` for id %u have non-existed `game_graveyard` table id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
continue;
}
}
@@ -624,8 +624,8 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void BattlegroundMgr::InitAutomaticArenaPointDistribution()
@@ -635,15 +635,15 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
time_t wstime = time_t(sWorld->getWorldState(WS_ARENA_DISTRIBUTION_TIME));
time_t curtime = time(nullptr);
- LOG_INFO("server", "AzerothCore Battleground: Initializing Automatic Arena Point Distribution");
+ LOG_INFO("server.loading", "Initializing Automatic Arena Point Distribution");
if (wstime < curtime)
{
m_NextAutoDistributionTime = curtime; // reset will be called in the next update
- LOG_INFO("server", "AzerothCore Battleground: Next arena point distribution time in the past, reseting it now.");
+ LOG_INFO("server.loading", "Next arena point distribution time in the past, reseting it now.");
}
else
m_NextAutoDistributionTime = wstime;
- LOG_INFO("server", "AzerothCore Battleground: Automatic Arena Point Distribution initialized.");
+ LOG_INFO("server.loading", "Automatic Arena Point Distribution initialized.");
}
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid guid, Player* player, BattlegroundTypeId bgTypeId, uint8 fromWhere)
@@ -848,8 +848,8 @@ void BattlegroundMgr::LoadBattleMastersEntry()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -885,8 +885,8 @@ void BattlegroundMgr::LoadBattleMastersEntry()
CheckBattleMasters();
- LOG_INFO("server", ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void BattlegroundMgr::CheckBattleMasters()
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index ffc7933a6d..6b9b2ff27e 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -59,9 +59,7 @@ void BattlegroundAV::HandleKillPlayer(Player* player, Player* killer)
void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "bg_av HandleKillUnit %i", unit->GetEntry());
-#endif
if (GetStatus() != STATUS_IN_PROGRESS)
return;
uint32 entry = unit->GetEntry();
@@ -96,7 +94,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
{
if (!m_CaptainAlive[0])
{
- LOG_ERROR("server", "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
+ LOG_ERROR("bg.battleground", "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
return;
}
m_CaptainAlive[0] = false;
@@ -115,7 +113,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
{
if (!m_CaptainAlive[1])
{
- LOG_ERROR("server", "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
+ LOG_ERROR("bg.battleground", "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
return;
}
m_CaptainAlive[1] = false;
@@ -142,9 +140,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
return;//maybe we should log this, cause this must be a cheater or a big bug
TeamId teamId = player->GetTeamId();
//TODO add reputation, events (including quest not available anymore, next quest availabe, go/npc de/spawning)and maybe honor
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed", questid);
-#endif
switch (questid)
{
case AV_QUEST_A_SCRAPS1:
@@ -154,9 +150,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[teamId][0] += 20;
if (m_Team_QuestStatus[teamId][0] == 500 || m_Team_QuestStatus[teamId][0] == 1000 || m_Team_QuestStatus[teamId][0] == 1500) //25, 50, 75 turn ins
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed starting with unit upgrading..", questid);
-#endif
for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i)
if (m_Nodes[i].OwnerId == player->GetTeamId() && m_Nodes[i].State == POINT_CONTROLED)
{
@@ -170,28 +164,22 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
case AV_QUEST_H_COMMANDER1:
m_Team_QuestStatus[teamId][1]++;
RewardReputationToTeam(teamId, 1, teamId);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (m_Team_QuestStatus[teamId][1] == 30)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
-#endif
break;
case AV_QUEST_A_COMMANDER2:
case AV_QUEST_H_COMMANDER2:
m_Team_QuestStatus[teamId][2]++;
RewardReputationToTeam(teamId, 1, teamId);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (m_Team_QuestStatus[teamId][2] == 60)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
-#endif
break;
case AV_QUEST_A_COMMANDER3:
case AV_QUEST_H_COMMANDER3:
m_Team_QuestStatus[teamId][3]++;
RewardReputationToTeam(teamId, 1, teamId);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (m_Team_QuestStatus[teamId][3] == 120)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
-#endif
break;
case AV_QUEST_A_BOSS1:
case AV_QUEST_H_BOSS1:
@@ -200,22 +188,18 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
case AV_QUEST_A_BOSS2:
case AV_QUEST_H_BOSS2:
m_Team_QuestStatus[teamId][4]++;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (m_Team_QuestStatus[teamId][4] >= 200)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
-#endif
break;
case AV_QUEST_A_NEAR_MINE:
case AV_QUEST_H_NEAR_MINE:
m_Team_QuestStatus[teamId][5]++;
if (m_Team_QuestStatus[teamId][5] == 28)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[teamId][6] == 7)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
-#endif
}
break;
case AV_QUEST_A_OTHER_MINE:
@@ -223,12 +207,10 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[teamId][6]++;
if (m_Team_QuestStatus[teamId][6] == 7)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[teamId][5] == 20)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
-#endif
}
break;
case AV_QUEST_A_RIDER_HIDE:
@@ -236,12 +218,10 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[teamId][7]++;
if (m_Team_QuestStatus[teamId][7] == 25)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[teamId][8] == 25)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
-#endif
}
break;
case AV_QUEST_A_RIDER_TAME:
@@ -249,18 +229,14 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
m_Team_QuestStatus[teamId][8]++;
if (m_Team_QuestStatus[teamId][8] == 25)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[teamId][7] == 25)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
-#endif
}
break;
default:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed but is not interesting at all", questid);
-#endif
return; //was no interesting quest at all
break;
}
@@ -448,9 +424,7 @@ void BattlegroundAV::StartingEventCloseDoors()
void BattlegroundAV::StartingEventOpenDoors()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV: start spawning mine stuff");
-#endif
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++)
@@ -599,9 +573,7 @@ void BattlegroundAV::UpdatePlayerScore(Player* player, uint32 type, uint32 value
void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
uint32 object = GetObjectThroughNode(node);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "bg_av: player destroyed point node %i object %i", node, object);
-#endif
//despawn banner
SpawnBGObject(object, RESPAWN_ONE_DAY);
@@ -616,7 +588,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
if (BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
DelCreature(AV_CPLACE_A_MARSHAL_SOUTH + tmp);
else
- LOG_ERROR("server", "BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
+ 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);
@@ -674,9 +646,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, TeamId teamId, bool initial)
if (!initial)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "bg_av depopulating mine %i (0=north, 1=south)", mine);
-#endif
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])
@@ -687,9 +657,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, TeamId teamId, bool initial)
}
SendMineWorldStates(mine);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "bg_av populating mine %i (0=north, 1=south)", mine);
-#endif
uint16 miner;
//also neutral team exists.. after a big time, the neutral team tries to conquer the mine
if (mine == AV_NORTH_MINE)
@@ -711,9 +679,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, TeamId teamId, bool initial)
else
miner = AV_NPC_S_MINE_N_1;
//vermin
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "spawning vermin");
-#endif
if (teamId == TEAM_ALLIANCE)
cinfo = AV_NPC_S_MINE_A_3;
else if (teamId == TEAM_HORDE)
@@ -781,7 +747,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], ownerId))
- LOG_ERROR("server", "AV: couldn't spawn spiritguide at node %i", node);
+ 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);
@@ -830,9 +796,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node)
BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "bg_AV getnodethroughobject %i", object);
-#endif
if (object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER)
return BG_AV_Nodes(object);
if (object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_HUT)
@@ -847,7 +811,7 @@ 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;
- LOG_ERROR("server", "BattlegroundAV: ERROR! GetPlace got a wrong object :(");
+ LOG_ERROR("bg.battleground", "BattlegroundAV: ERROR! GetPlace got a wrong object :(");
ABORT();
return BG_AV_Nodes(0);
}
@@ -855,9 +819,7 @@ BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
{
//this function is the counterpart to GetNodeThroughObject()
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "bg_AV GetObjectThroughNode %i", node);
-#endif
if (m_Nodes[node].OwnerId == TEAM_ALLIANCE)
{
if (m_Nodes[node].State == POINT_ASSAULTED)
@@ -888,7 +850,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
}
else if (m_Nodes[node].OwnerId == TEAM_NEUTRAL)
return BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE;
- LOG_ERROR("server", "BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node);
+ LOG_ERROR("bg.battleground", "BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node);
ABORT();
return 0;
}
@@ -939,12 +901,10 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
EventPlayerAssaultsPoint(player, object);
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "player defends point object: %i node: %i", object, node);
-#endif
if (m_Nodes[node].PrevOwnerId != teamId)
{
- LOG_ERROR("server", "BG_AV: player defends point which doesn't belong to his team %i", node);
+ LOG_ERROR("bg.battleground", "BG_AV: player defends point which doesn't belong to his team %i", node);
return;
}
@@ -1003,9 +963,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
BG_AV_Nodes node = GetNodeThroughObject(object);
TeamId prevOwnerId = m_Nodes[node].OwnerId;
TeamId teamId = player->GetTeamId();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "bg_av: player assaults point object %i node %i", object, node);
-#endif
if (prevOwnerId == teamId || teamId == m_Nodes[node].TotalOwnerId)
return; //surely a gm used this object
@@ -1157,7 +1115,7 @@ uint8 BattlegroundAV::GetWorldStateType(uint8 state, TeamId teamId) //this is us
if (state == POINT_ASSAULTED)
return 3;
}
- LOG_ERROR("server", "BG_AV: should update a strange worldstate state:%i team:%i", state, teamId);
+ LOG_ERROR("bg.battleground", "BG_AV: should update a strange worldstate state:%i team:%i", state, teamId);
return 5; //this will crash the game, but i want to know if something is wrong here
}
@@ -1234,7 +1192,7 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION + i * 3, BG_AV_OBJECTID_AURA_A, BG_AV_ObjectPos[i][0], BG_AV_ObjectPos[i][1], BG_AV_ObjectPos[i][2], BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3] / 2), cos(BG_AV_ObjectPos[i][3] / 2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_AURA_H_FIRSTAID_STATION + i * 3, BG_AV_OBJECTID_AURA_H, BG_AV_ObjectPos[i][0], BG_AV_ObjectPos[i][1], BG_AV_ObjectPos[i][2], BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3] / 2), cos(BG_AV_ObjectPos[i][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!2");
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!2");
return false;
}
}
@@ -1249,7 +1207,7 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH + (2 * (i - BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_A, 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, sin(BG_AV_ObjectPos[i + 8][3] / 2), cos(BG_AV_ObjectPos[i + 8][3] / 2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH + (2 * (i - BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_PH, 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, sin(BG_AV_ObjectPos[i + 8][3] / 2), cos(BG_AV_ObjectPos[i + 8][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!3");
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!3");
return false;
}
}
@@ -1262,7 +1220,7 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH + (2 * (i - BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_PA, 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, sin(BG_AV_ObjectPos[i + 8][3] / 2), cos(BG_AV_ObjectPos[i + 8][3] / 2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH + (2 * (i - BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_H, 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, sin(BG_AV_ObjectPos[i + 8][3] / 2), cos(BG_AV_ObjectPos[i + 8][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!4");
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!4");
return false;
}
}
@@ -1270,7 +1228,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i);
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i);
return false;
}
}
@@ -1284,7 +1242,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE + (i * 10) + j, BG_AV_OBJECTID_SMOKE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i);
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i);
return false;
}
}
@@ -1292,7 +1250,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE + (i * 10) + j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i);
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i);
return false;
}
}
@@ -1302,7 +1260,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_N_MIN + i, BG_AV_OBJECTID_MINE_N, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i);
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i);
return false;
}
}
@@ -1310,14 +1268,14 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_S_MIN + i, BG_AV_OBJECTID_MINE_S, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i);
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i);
return false;
}
}
if (!AddObject(BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE, BG_AV_OBJECTID_BANNER_SNOWFALL_N, BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][0], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][1], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][2], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3], 0, 0, sin(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3] / 2), cos(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!8");
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!8");
return false;
}
for (uint8 i = 0; i < 4; i++)
@@ -1327,7 +1285,7 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_H + i, BG_AV_OBJECTID_SNOWFALL_CANDY_H, 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, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PH + i, BG_AV_OBJECTID_SNOWFALL_CANDY_PH, 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, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i);
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i);
return false;
}
}
@@ -1343,19 +1301,17 @@ bool BattlegroundAV::SetupBattleground()
// Quest banners
if (!AddObject(BG_AV_OBJECT_FROSTWOLF_BANNER, BG_AV_OBJECTID_FROSTWOLF_BANNER, BG_AV_ObjectPos[AV_OPLACE_FROSTWOLF_BANNER][0], BG_AV_ObjectPos[AV_OPLACE_FROSTWOLF_BANNER][1], BG_AV_ObjectPos[AV_OPLACE_FROSTWOLF_BANNER][2], BG_AV_ObjectPos[AV_OPLACE_FROSTWOLF_BANNER][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_FROSTWOLF_BANNER][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_FROSTWOLF_BANNER][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!8");
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!8");
return false;
}
if (!AddObject(BG_AV_OBJECT_STORMPIKE_BANNER, BG_AV_OBJECTID_STORMPIKE_BANNER, BG_AV_ObjectPos[AV_OPLACE_STORMPIKE_BANNER][0], BG_AV_ObjectPos[AV_OPLACE_STORMPIKE_BANNER][1], BG_AV_ObjectPos[AV_OPLACE_STORMPIKE_BANNER][2], BG_AV_ObjectPos[AV_OPLACE_STORMPIKE_BANNER][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_STORMPIKE_BANNER][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_STORMPIKE_BANNER][3] / 2), RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "BatteGroundAV: Failed to spawn some object Battleground not created!8");
+ LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!8");
return false;
}
uint16 i;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "Alterac Valley: entering state STATUS_WAIT_JOIN ...");
-#endif
// Initial Nodes
for (i = 0; i < BG_AV_OBJECT_MAX; i++)
SpawnBGObject(i, RESPAWN_ONE_DAY);
@@ -1402,30 +1358,22 @@ bool BattlegroundAV::SetupBattleground()
SpawnBGObject(BG_AV_OBJECT_STORMPIKE_BANNER, RESPAWN_IMMEDIATELY);
//creatures
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV start poputlating nodes");
-#endif
for (i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
{
if (m_Nodes[i].OwnerId != TEAM_NEUTRAL)
PopulateNode(BG_AV_Nodes(i));
}
//all creatures which don't get despawned through the script are static
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV: start spawning static creatures");
-#endif
for (i = 0; i < AV_STATICCPLACE_MAX; i++)
AddAVCreature(0, i + AV_CPLACE_MAX);
//mainspiritguides:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV: start spawning spiritguides creatures");
-#endif
AddSpiritGuide(7, BG_AV_CreaturePos[7][0], BG_AV_CreaturePos[7][1], BG_AV_CreaturePos[7][2], BG_AV_CreaturePos[7][3], TEAM_ALLIANCE);
AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], TEAM_HORDE);
//spawn the marshals (those who get deleted, if a tower gets destroyed)
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "BG_AV: start spawning marshal creatures");
-#endif
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);
@@ -1478,7 +1426,7 @@ char const* BattlegroundAV::GetNodeName(BG_AV_Nodes node)
case BG_AV_NODES_FROSTWOLF_HUT:
return GetAcoreString(LANG_BG_AV_NODE_GRAVE_FROST_HUT);
default:
- LOG_ERROR("server", "tried to get name for node %u", node);
+ LOG_ERROR("bg.battleground", "tried to get name for node %u", node);
break;
}
@@ -1489,22 +1437,22 @@ void BattlegroundAV::AssaultNode(BG_AV_Nodes node, TeamId teamId)
{
if (m_Nodes[node].TotalOwnerId == teamId)
{
- LOG_FATAL("server", "Assaulting team is TotalOwner of node");
+ LOG_FATAL("bg.battleground", "Assaulting team is TotalOwner of node");
ABORT();
}
if (m_Nodes[node].OwnerId == teamId)
{
- LOG_FATAL("server", "Assaulting team is owner of node");
+ LOG_FATAL("bg.battleground", "Assaulting team is owner of node");
ABORT();
}
if (m_Nodes[node].State == POINT_DESTROYED)
{
- LOG_FATAL("server", "Destroyed node is being assaulted");
+ LOG_FATAL("bg.battleground", "Destroyed node is being assaulted");
ABORT();
}
if (m_Nodes[node].State == POINT_ASSAULTED && m_Nodes[node].TotalOwnerId != TEAM_NEUTRAL) //only assault an assaulted node if no totalowner exists
{
- LOG_FATAL("server", "Assault on an not assaulted node with total owner");
+ LOG_FATAL("bg.battleground", "Assault on an not assaulted node with total owner");
ABORT();
}
//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 a347bf5072..adb56206cc 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.cpp
@@ -72,7 +72,7 @@ void BattlegroundBE::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- LOG_ERROR("server", "Killer player not found");
+ LOG_ERROR("bg.battleground", "Killer player not found");
return;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
index 2d6d17ab23..172dd623fa 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
@@ -160,7 +160,7 @@ void BattlegroundDS::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- LOG_ERROR("server", "BattlegroundDS: Killer player not found");
+ LOG_ERROR("bg.battleground", "BattlegroundDS: Killer player not found");
return;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index 891222426f..35ed348605 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -397,7 +397,7 @@ bool BattlegroundIC::SetupBattleground()
{
if (!AddObject(BG_IC_ObjSpawnlocs[i].type, BG_IC_ObjSpawnlocs[i].entry, BG_IC_ObjSpawnlocs[i].x, BG_IC_ObjSpawnlocs[i].y, BG_IC_ObjSpawnlocs[i].z, BG_IC_ObjSpawnlocs[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry);
+ LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry);
return false;
}
@@ -410,7 +410,7 @@ bool BattlegroundIC::SetupBattleground()
{
if (!AddObject(BG_IC_Teleporters[i].type, BG_IC_Teleporters[i].entry, BG_IC_Teleporters[i].x, BG_IC_Teleporters[i].y, BG_IC_Teleporters[i].z, BG_IC_Teleporters[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
+ LOG_ERROR("bg.battleground", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
return false;
}
}
@@ -419,7 +419,7 @@ bool BattlegroundIC::SetupBattleground()
{
if (!AddObject(BG_IC_TeleporterEffects[i].type, BG_IC_TeleporterEffects[i].entry, BG_IC_TeleporterEffects[i].x, BG_IC_TeleporterEffects[i].y, BG_IC_TeleporterEffects[i].z, BG_IC_TeleporterEffects[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
+ LOG_ERROR("bg.battleground", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
return false;
}
}
@@ -428,7 +428,7 @@ bool BattlegroundIC::SetupBattleground()
{
if (!AddCreature(BG_IC_NpcSpawnlocs[i].entry, BG_IC_NpcSpawnlocs[i].type, BG_IC_NpcSpawnlocs[i].x, BG_IC_NpcSpawnlocs[i].y, BG_IC_NpcSpawnlocs[i].z, BG_IC_NpcSpawnlocs[i].o, RESPAWN_ONE_DAY))
{
- LOG_ERROR("server", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
+ LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
return false;
}
}
@@ -438,7 +438,7 @@ bool BattlegroundIC::SetupBattleground()
|| !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1 + 5, BG_IC_SpiritGuidePos[7][0], BG_IC_SpiritGuidePos[7][1], BG_IC_SpiritGuidePos[7][2], BG_IC_SpiritGuidePos[7][3], TEAM_ALLIANCE)
|| !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1 + 6, BG_IC_SpiritGuidePos[8][0], BG_IC_SpiritGuidePos[8][1], BG_IC_SpiritGuidePos[8][2], BG_IC_SpiritGuidePos[8][3], TEAM_HORDE))
{
- LOG_ERROR("server", "Isle of Conquest: Failed to spawn initial spirit guide!");
+ LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn initial spirit guide!");
return false;
}
@@ -447,7 +447,7 @@ bool BattlegroundIC::SetupBattleground()
if (!gunshipAlliance || !gunshipHorde)
{
- LOG_ERROR("server", "Isle of Conquest: There was an error creating gunships!");
+ LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error creating gunships!");
return false;
}
@@ -676,7 +676,7 @@ uint32 BattlegroundIC::GetNextBanner(ICNodePoint* nodePoint, uint32 team, bool r
return nodePoint->last_entry;
// we should never be here...
- LOG_ERROR("server", "Isle Of Conquest: Unexpected return in GetNextBanner function");
+ LOG_ERROR("bg.battleground", "Isle Of Conquest: Unexpected return in GetNextBanner function");
return 0;
}
@@ -728,7 +728,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))
- LOG_ERROR("server", "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
+ LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
}
switch (nodePoint->gameobject_type)
@@ -751,20 +751,20 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = BG_IC_GO_HANGAR_TELEPORTER_1 + u;
if (!AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL : GO_HORDE_GUNSHIP_PORTAL), BG_IC_HangarTeleporters[u].GetPositionX(), BG_IC_HangarTeleporters[u].GetPositionY(), BG_IC_HangarTeleporters[u].GetPositionZ(), BG_IC_HangarTeleporters[u].GetOrientation(), 0, 0, 0, 0, RESPAWN_ONE_DAY))
- LOG_ERROR("server", "Isle of Conquest: There was an error spawning a gunship portal. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
+ LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
}
for (uint8 u = 0; u < MAX_HANGAR_TELEPORTER_EFFECTS_SPAWNS; ++u)
{
uint8 type = BG_IC_GO_HANGAR_TELEPORTER_EFFECT_1 + u;
if (!AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL_EFFECTS : GO_HORDE_GUNSHIP_PORTAL_EFFECTS), BG_IC_HangarTeleporterEffects[u].GetPositionX(), BG_IC_HangarTeleporterEffects[u].GetPositionY(), BG_IC_HangarTeleporterEffects[u].GetPositionZ(), BG_IC_HangarTeleporterEffects[u].GetOrientation(), 0, 0, 0, 0, RESPAWN_ONE_DAY, GO_STATE_ACTIVE))
- LOG_ERROR("server", "Isle of Conquest: There was an error spawning a gunship portal effects. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
+ LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal effects. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
}
for (uint8 u = 0; u < MAX_TRIGGER_SPAWNS_PER_FACTION; ++u)
{
if (!AddCreature(NPC_WORLD_TRIGGER_NOT_FLOATING, BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING, BG_IC_HangarTrigger[nodePoint->faction].GetPositionX(), BG_IC_HangarTrigger[nodePoint->faction].GetPositionY(), BG_IC_HangarTrigger[nodePoint->faction].GetPositionZ(), BG_IC_HangarTrigger[nodePoint->faction].GetOrientation(), RESPAWN_ONE_DAY, nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde))
- LOG_ERROR("server", "Isle of Conquest: There was an error spawning a world trigger. Type: %u", BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING);
+ LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a world trigger. Type: %u", BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING);
}
for (uint8 u = 0; u < MAX_CAPTAIN_SPAWNS_PER_FACTION; ++u)
@@ -777,7 +777,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
if (type == BG_IC_NPC_GUNSHIP_CAPTAIN_2)
if (!AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_ALLIANCE_GUNSHIP_CAPTAIN : NPC_HORDE_GUNSHIP_CAPTAIN, type, BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetPositionX(), BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetPositionY(), BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetPositionZ(), BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetOrientation(), RESPAWN_ONE_DAY, nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde))
- LOG_ERROR("server", "Isle of Conquest: There was an error spawning a world trigger. Type: %u", BG_IC_NPC_GUNSHIP_CAPTAIN_2);
+ LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a world trigger. Type: %u", BG_IC_NPC_GUNSHIP_CAPTAIN_2);
}
(nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->EnableMovement(true);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
index 7fd1a1a9f8..2dd7d9b471 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.cpp
@@ -69,7 +69,7 @@ void BattlegroundNA::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- LOG_ERROR("server", "BattlegroundNA: Killer player not found");
+ LOG_ERROR("bg.battleground", "BattlegroundNA: Killer player not found");
return;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
index 10a4a7d605..61a9bd3ff8 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.cpp
@@ -67,7 +67,7 @@ void BattlegroundRL::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
- LOG_ERROR("server", "Killer player not found");
+ LOG_ERROR("bg.battleground", "Killer player not found");
return;
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index ff5be698e2..e574ba64b9 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -169,7 +169,7 @@ bool BattlegroundSA::ResetObjs()
if (!sg)
{
- LOG_ERROR("server", "SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
+ LOG_ERROR("bg.battleground", "SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
return false;
}
@@ -182,7 +182,7 @@ bool BattlegroundSA::ResetObjs()
{
GraveyardStatus[i] = GetOtherTeamId(Attackers);
if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], GetOtherTeamId(Attackers)))
- LOG_ERROR("server", "SOTA: couldn't spawn GY: %u", i);
+ LOG_ERROR("bg.battleground", "SOTA: couldn't spawn GY: %u", i);
}
}
@@ -919,7 +919,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
GraveyardStruct const* sg = sGraveyard->GetGraveyard(BG_SA_GYEntries[i]);
if (!sg)
{
- LOG_ERROR("server", "BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
+ LOG_ERROR("bg.battleground", "BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
return;
}
diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp
index e06336d3c2..84e0bea068 100644
--- a/src/server/game/Calendar/CalendarMgr.cpp
+++ b/src/server/game/Calendar/CalendarMgr.cpp
@@ -76,7 +76,7 @@ void CalendarMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u calendar events", count);
+ LOG_INFO("server.loading", ">> Loaded %u calendar events", count);
count = 0;
// 0 1 2 3 4 5 6 7
@@ -102,8 +102,8 @@ void CalendarMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u calendar invites", count);
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u calendar invites", count);
+ LOG_INFO("server.loading", " ");
for (uint64 i = 1; i < _maxEventId; ++i)
if (!GetEvent(i))
@@ -314,9 +314,7 @@ CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId) const
if ((*itr2)->GetInviteId() == inviteId)
return *itr2;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
-#endif
return nullptr;
}
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index c18b868212..e7598075bb 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -96,9 +96,7 @@ void Channel::UpdateChannelInDB() const
stmt->setUInt32(2, _channelDBId);
CharacterDatabase.Execute(stmt);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "Channel(%s) updated in database", _name.c_str());
-#endif
}
}
@@ -696,9 +694,7 @@ void Channel::List(Player const* player)
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "SMSG_CHANNEL_LIST %s Channel: %s", player->GetSession()->GetPlayerInfo().c_str(), GetName().c_str());
-#endif
WorldPacket data(SMSG_CHANNEL_LIST, 1 + (GetName().size() + 1) + 1 + 4 + playersStore.size() * (8 + 1));
data << uint8(1); // channel type?
data << GetName(); // channel name
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index 82cec3778a..54fb1a76d0 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
@@ -42,7 +42,7 @@ void ChannelMgr::LoadChannels()
QueryResult result = CharacterDatabase.PQuery("SELECT channelId, name, team, announce, ownership, password FROM channels ORDER BY channelId ASC");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 channels. DB table `channels` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 channels. DB table `channels` is empty.");
return;
}
@@ -59,7 +59,7 @@ void ChannelMgr::LoadChannels()
std::wstring channelWName;
if (!Utf8toWStr(channelName, channelWName))
{
- LOG_ERROR("server", "Failed to load channel '%s' from database - invalid utf8 sequence? Deleted.", channelName.c_str());
+ LOG_ERROR("server.loading", "Failed to load channel '%s' from database - invalid utf8 sequence? Deleted.", channelName.c_str());
toDelete.push_back({ channelName, team });
continue;
}
@@ -67,7 +67,7 @@ void ChannelMgr::LoadChannels()
ChannelMgr* mgr = forTeam(team);
if (!mgr)
{
- LOG_ERROR("server", "Failed to load custom chat channel '%s' from database - invalid team %u. Deleted.", channelName.c_str(), team);
+ LOG_ERROR("server.loading", "Failed to load custom chat channel '%s' from database - invalid team %u. Deleted.", channelName.c_str(), team);
toDelete.push_back({ channelName, team });
continue;
}
@@ -100,8 +100,8 @@ void ChannelMgr::LoadChannels()
CharacterDatabase.Execute(stmt);
}
- LOG_INFO("server", ">> Loaded %u channels in %ums", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u channels in %ums", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId)
@@ -157,8 +157,8 @@ void ChannelMgr::LoadChannelRights()
QueryResult result = CharacterDatabase.Query("SELECT name, flags, speakdelay, joinmessage, delaymessage, moderators FROM channels_rights");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 Channel Rights!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 Channel Rights!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -184,8 +184,8 @@ void ChannelMgr::LoadChannelRights()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %d Channel Rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d Channel Rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
const ChannelRights& ChannelMgr::GetChannelRightsFor(const std::string& name)
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp
index 9671946ac8..04361aa82f 100644
--- a/src/server/game/Chat/Chat.cpp
+++ b/src/server/game/Chat/Chat.cpp
@@ -373,13 +373,10 @@ bool ChatHandler::SetDataForCommandInTable(std::vector<ChatCommand>& table, char
// expected subcommand by full name DB content
else if (*text)
{
- LOG_ERROR("server", "Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str());
+ LOG_ERROR("sql.sql", "Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str());
return false;
}
- //if (table[i].SecurityLevel != security)
- // LOG_DEBUG("server", "Table `command` overwrite for command '%s' default security (%u) by %u", fullcommand.c_str(), table[i].SecurityLevel, security);
-
table[i].SecurityLevel = security;
table[i].Help = help;
return true;
@@ -389,9 +386,9 @@ bool ChatHandler::SetDataForCommandInTable(std::vector<ChatCommand>& table, char
if (!cmd.empty())
{
if (&table == &getCommandTable())
- LOG_ERROR("server", "Table `command` have non-existing command '%s', skip.", cmd.c_str());
+ LOG_ERROR("sql.sql", "Table `command` have non-existing command '%s', skip.", cmd.c_str());
else
- LOG_ERROR("server", "Table `command` have non-existing subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str());
+ LOG_ERROR("sql.sql", "Table `command` have non-existing 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 e376a68afe..167dbd1ae5 100644
--- a/src/server/game/Chat/ChatLink.cpp
+++ b/src/server/game/Chat/ChatLink.cpp
@@ -65,9 +65,7 @@ inline bool CheckDelimiter(std::istringstream& iss, char delimiter, const char*
char c = iss.peek();
if (c != delimiter)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid %s link structure ('%c' expected, '%c' found)", iss.str().c_str(), context, delimiter, c);
-#endif
return false;
}
iss.ignore(1);
@@ -101,26 +99,20 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
uint32 itemEntry = 0;
if (!ReadUInt32(iss, itemEntry))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item entry", iss.str().c_str());
-#endif
return false;
}
// Validate item
_item = sObjectMgr->GetItemTemplate(itemEntry);
if (!_item)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid itemEntry %u in |item command", iss.str().c_str(), itemEntry);
-#endif
return false;
}
// Validate item's color
if (_color != ItemQualityColors[_item->Quality])
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): linked item has color %u, but user claims %u", iss.str().c_str(), ItemQualityColors[_item->Quality], _color);
-#endif
return false;
}
// Number of various item properties after item entry
@@ -134,9 +126,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
int32 id = 0;
if (!ReadInt32(iss, id))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item property (%u)", iss.str().c_str(), index);
-#endif
return false;
}
if (id && (index == randomPropertyPosition))
@@ -147,9 +137,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
_property = sItemRandomPropertiesStore.LookupEntry(id);
if (!_property)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), id);
-#endif
return false;
}
}
@@ -158,9 +146,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
_suffix = sItemRandomSuffixStore.LookupEntry(-id);
if (!_suffix)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -id);
-#endif
return false;
}
}
@@ -203,10 +189,8 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context)
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (!res)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): linked item (id: %u) name wasn't found in any localization", context, _item->ItemId);
-#endif
return res;
}
@@ -218,18 +202,14 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
uint32 questId = 0;
if (!ReadUInt32(iss, questId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest entry", iss.str().c_str());
-#endif
return false;
}
// Validate quest
_quest = sObjectMgr->GetQuestTemplate(questId);
if (!_quest)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): quest template %u not found", iss.str().c_str(), questId);
-#endif
return false;
}
// Check delimiter
@@ -238,17 +218,13 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
// Read quest level
if (!ReadInt32(iss, _questLevel))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest level", iss.str().c_str());
-#endif
return false;
}
// Validate quest level
if (_questLevel >= STRONG_MAX_LEVEL)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): quest level %d is too big", iss.str().c_str(), _questLevel);
-#endif
return false;
}
return true;
@@ -268,10 +244,8 @@ bool QuestChatLink::ValidateName(char* buffer, const char* context)
break;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (!res)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): linked quest (id: %u) title wasn't found in any localization", context, _quest->GetQuestId());
-#endif
return res;
}
@@ -285,18 +259,14 @@ bool SpellChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading spell entry", iss.str().c_str());
-#endif
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |spell command", iss.str().c_str(), spellId);
-#endif
return false;
}
return true;
@@ -312,25 +282,19 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(_spell->Id);
if (bounds.first == bounds.second)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line not found for spell %u", context, _spell->Id);
-#endif
return false;
}
SkillLineAbilityEntry const* skillInfo = bounds.first->second;
if (!skillInfo)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id);
-#endif
return false;
}
SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skillInfo->skillId);
if (!skillLine)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId);
-#endif
return false;
}
@@ -356,10 +320,8 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
break;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (!res)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
-#endif
return res;
}
@@ -373,18 +335,14 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
uint32 achievementId = 0;
if (!ReadUInt32(iss, achievementId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
-#endif
return false;
}
// Validate achievement
_achievement = sAchievementStore.LookupEntry(achievementId);
if (!_achievement)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
-#endif
return false;
}
// Check delimiter
@@ -393,9 +351,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
// Read HEX
if (!ReadHex(iss, _guid, 0))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading char's guid", iss.str().c_str());
-#endif
return false;
}
// Skip progress
@@ -407,9 +363,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
if (!ReadUInt32(iss, _data[index]))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement property (%u)", iss.str().c_str(), index);
-#endif
return false;
}
}
@@ -428,10 +382,8 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
break;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (!res)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
-#endif
return res;
}
@@ -445,18 +397,14 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
-#endif
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), spellId);
-#endif
return false;
}
// Check delimiter
@@ -465,9 +413,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Minimum talent level
if (!ReadInt32(iss, _minSkillLevel))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading minimum talent level", iss.str().c_str());
-#endif
return false;
}
// Check delimiter
@@ -476,9 +422,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Maximum talent level
if (!ReadInt32(iss, _maxSkillLevel))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading maximum talent level", iss.str().c_str());
-#endif
return false;
}
// Check delimiter
@@ -487,9 +431,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Something hexadecimal
if (!ReadHex(iss, _guid, 0))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement's owner guid", iss.str().c_str());
-#endif
return false;
}
// Skip base64 encoded stuff
@@ -506,27 +448,21 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
// Read talent entry
if (!ReadUInt32(iss, _talentId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent entry", iss.str().c_str());
-#endif
return false;
}
// Validate talent
TalentEntry const* talentInfo = sTalentStore.LookupEntry(_talentId);
if (!talentInfo)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid talent id %u in |talent command", iss.str().c_str(), _talentId);
-#endif
return false;
}
// Validate talent's spell
_spell = sSpellMgr->GetSpellInfo(talentInfo->RankID[0]);
if (!_spell)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]);
-#endif
return false;
}
// Delimiter
@@ -535,9 +471,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
// Rank
if (!ReadInt32(iss, _rankId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent rank", iss.str().c_str());
-#endif
return false;
}
return true;
@@ -553,18 +487,14 @@ bool EnchantmentChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading enchantment spell entry", iss.str().c_str());
-#endif
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
-#endif
return false;
}
return true;
@@ -579,9 +509,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
// Slot
if (!ReadUInt32(iss, _slotId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading slot id", iss.str().c_str());
-#endif
return false;
}
// Check delimiter
@@ -591,27 +519,21 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
uint32 glyphId = 0;
if (!ReadUInt32(iss, glyphId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading glyph entry", iss.str().c_str());
-#endif
return false;
}
// Validate glyph
_glyph = sGlyphPropertiesStore.LookupEntry(glyphId);
if (!_glyph)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid glyph id %u in |glyph command", iss.str().c_str(), glyphId);
-#endif
return false;
}
// Validate glyph's spell
_spell = sSpellMgr->GetSpellInfo(_glyph->SpellId);
if (!_spell)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
-#endif
return false;
}
return true;
@@ -649,18 +571,14 @@ bool LinkExtractor::IsValidMessage()
}
else if (_iss.get() != PIPE_CHAR)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence aborted unexpectedly", _iss.str().c_str());
-#endif
return false;
}
// pipe has always to be followed by at least one char
if (_iss.peek() == '\0')
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): pipe followed by '\\0'", _iss.str().c_str());
-#endif
return false;
}
@@ -683,18 +601,14 @@ bool LinkExtractor::IsValidMessage()
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid sequence, expected '%c' but got '%c'", _iss.str().c_str(), *validSequenceIterator, commandChar);
-#endif
return false;
}
}
else if (validSequence != validSequenceIterator)
{
// no escaped pipes in sequences
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got escaped pipe in sequence", _iss.str().c_str());
-#endif
return false;
}
@@ -703,9 +617,7 @@ bool LinkExtractor::IsValidMessage()
case 'c':
if (!ReadHex(_iss, color, 8))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading color", _iss.str().c_str());
-#endif
return false;
}
break;
@@ -714,9 +626,7 @@ bool LinkExtractor::IsValidMessage()
_iss.getline(buffer, 256, DELIMITER);
if (_iss.eof())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
-#endif
return false;
}
@@ -738,9 +648,7 @@ bool LinkExtractor::IsValidMessage()
link = new GlyphChatLink();
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): user sent unsupported link type '%s'", _iss.str().c_str(), buffer);
-#endif
return false;
}
_links.push_back(link);
@@ -755,17 +663,13 @@ bool LinkExtractor::IsValidMessage()
// links start with '['
if (_iss.get() != '[')
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): link caption doesn't start with '['", _iss.str().c_str());
-#endif
return false;
}
_iss.getline(buffer, 256, ']');
if (_iss.eof())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
-#endif
return false;
}
@@ -783,9 +687,7 @@ bool LinkExtractor::IsValidMessage()
// no further payload
break;
default:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid command |%c", _iss.str().c_str(), commandChar);
-#endif
return false;
}
}
@@ -793,9 +695,7 @@ bool LinkExtractor::IsValidMessage()
// check if every opened sequence was also closed properly
if (validSequence != validSequenceIterator)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "ChatHandler::isValidChatMessage('%s'): EOF in active sequence", _iss.str().c_str());
-#endif
return false;
}
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 9278871e19..7fa1208408 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -26,9 +26,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
// object not present, return false
if (!object)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "Condition object not found for condition (Entry: %u Type: %u Group: %u)", SourceEntry, SourceType, SourceGroup);
-#endif
return false;
}
bool condMeets = false;
@@ -693,9 +691,7 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo,
std::map<uint32, bool> ElseGroupStore;
for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u", (*i)->ConditionType, (*i)->ConditionValue1);
-#endif
if ((*i)->isLoaded())
{
//! Find ElseGroup in ElseGroupStore
@@ -716,9 +712,7 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo,
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "IsPlayerMeetToConditionList: Reference template -%u not found", (*i)->ReferenceId);
-#endif
}
}
else //handle normal condition
@@ -752,9 +746,7 @@ bool ConditionMgr::IsObjectMeetToConditions(ConditionSourceInfo& sourceInfo, Con
if (conditions.empty())
return true;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "ConditionMgr::IsObjectMeetToConditions");
-#endif
return IsObjectMeetToConditionList(sourceInfo, conditions);
}
@@ -798,9 +790,7 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType
if (i != (*itr).second.end())
{
spellCond = (*i).second;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "GetConditionsForNotGroupedEntry: found conditions for type %u and entry %u", uint32(sourceType), entry);
-#endif
}
}
}
@@ -817,9 +807,7 @@ ConditionList ConditionMgr::GetConditionsForSpellClickEvent(uint32 creatureId, u
if (i != (*itr).second.end())
{
cond = (*i).second;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "GetConditionsForSpellClickEvent: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
-#endif
}
}
return cond;
@@ -835,9 +823,7 @@ ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureId, uint
if (i != (*itr).second.end())
{
cond = (*i).second;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "GetConditionsForVehicleSpell: found conditions for Vehicle entry %u spell %u", creatureId, spellId);
-#endif
}
}
return cond;
@@ -853,9 +839,7 @@ ConditionList ConditionMgr::GetConditionsForSmartEvent(int32 entryOrGuid, uint32
if (i != (*itr).second.end())
{
cond = (*i).second;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "GetConditionsForSmartEvent: found conditions for Smart Event entry or guid %d event_id %u", entryOrGuid, eventId);
-#endif
}
}
return cond;
@@ -886,7 +870,7 @@ void ConditionMgr::LoadConditions(bool isReload)
//must clear all custom handled cases (groupped types) before reload
if (isReload)
{
- LOG_INFO("server", "Reseting Loot Conditions...");
+ LOG_INFO("server.loading", "Reseting Loot Conditions...");
LootTemplates_Creature.ResetConditions();
LootTemplates_Fishing.ResetConditions();
LootTemplates_Gameobject.ResetConditions();
@@ -900,10 +884,10 @@ void ConditionMgr::LoadConditions(bool isReload)
LootTemplates_Prospecting.ResetConditions();
LootTemplates_Spell.ResetConditions();
- LOG_INFO("server", "Re-Loading `gossip_menu` Table for Conditions!");
+ LOG_INFO("server.loading", "Re-Loading `gossip_menu` Table for Conditions!");
sObjectMgr->LoadGossipMenu();
- LOG_INFO("server", "Re-Loading `gossip_menu_option` Table for Conditions!");
+ LOG_INFO("server.loading", "Re-Loading `gossip_menu_option` Table for Conditions!");
sObjectMgr->LoadGossipMenuItems();
sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
}
@@ -913,7 +897,7 @@ void ConditionMgr::LoadConditions(bool isReload)
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 conditions. DB table `conditions` is empty!");
+ LOG_ERROR("server.loading", ">> Loaded 0 conditions. DB table `conditions` is empty!");
return;
}
@@ -1016,13 +1000,13 @@ void ConditionMgr::LoadConditions(bool isReload)
if (cond->ErrorType && cond->SourceType != CONDITION_SOURCE_TYPE_SPELL)
{
- LOG_ERROR("server", "Condition type %u entry %i can't have ErrorType (%u), set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorType);
+ LOG_ERROR("condition", "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)
{
- LOG_ERROR("server", "Condition type %u entry %i has any ErrorType, ErrorTextId (%u) is set, set to 0!", uint32(cond->SourceType), cond->SourceEntry, cond->ErrorTextId);
+ LOG_ERROR("condition", "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;
}
@@ -1144,8 +1128,8 @@ void ConditionMgr::LoadConditions(bool isReload)
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot)
@@ -1611,13 +1595,13 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
{
if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
{
- LOG_ERROR("server", "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
+ LOG_ERROR("condition", "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)
{
- LOG_ERROR("server", "SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry);
+ LOG_ERROR("condition", "SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceEntry);
return false;
}
break;
@@ -1874,14 +1858,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (!Player::IsValidGender(uint8(cond->ConditionValue1)))
{
- LOG_ERROR("server", "Gender condition has invalid gender (%u), skipped", cond->ConditionValue1);
+ LOG_ERROR("condition", "Gender condition has invalid gender (%u), skipped", cond->ConditionValue1);
return false;
}
if (cond->ConditionValue2)
- LOG_ERROR("server", "Gender condition has useless data in value2 (%u)!", cond->ConditionValue2);
+ LOG_ERROR("condition", "Gender condition has useless data in value2 (%u)!", cond->ConditionValue2);
if (cond->ConditionValue3)
- LOG_ERROR("server", "Gender condition has useless data in value3 (%u)!", cond->ConditionValue3);
+ LOG_ERROR("condition", "Gender condition has useless data in value3 (%u)!", cond->ConditionValue3);
break;
}
case CONDITION_MAPID:
@@ -2168,7 +2152,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (cond->ConditionValue1 > SPAWNMASK_RAID_ALL)
{
- LOG_ERROR("server", "SpawnMask condition has non existing SpawnMask in value1 (%u), skipped", cond->ConditionValue1);
+ LOG_ERROR("condition", "SpawnMask condition has non existing SpawnMask in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
break;
@@ -2177,7 +2161,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (!(cond->ConditionValue1 & UNIT_STATE_ALL_STATE_SUPPORTED))
{
- LOG_ERROR("server", "UnitState condition has non existing UnitState in value1 (%u), skipped", cond->ConditionValue1);
+ LOG_ERROR("condition", "UnitState condition has non existing UnitState in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
break;
@@ -2186,7 +2170,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
{
if (!cond->ConditionValue1 || cond->ConditionValue1 > CREATURE_TYPE_GAS_CLOUD)
{
- LOG_ERROR("server", "CreatureType condition has non existing CreatureType in value1 (%u), skipped", cond->ConditionValue1);
+ LOG_ERROR("condition", "CreatureType condition has non existing CreatureType in value1 (%u), skipped", cond->ConditionValue1);
return false;
}
break;
@@ -2196,7 +2180,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1);
if (!achievement)
{
- LOG_ERROR("server", "CONDITION_REALM_ACHIEVEMENT has non existing realm first achivement id (%u), skipped.", cond->ConditionValue1);
+ LOG_ERROR("condition", "CONDITION_REALM_ACHIEVEMENT has non existing realm first achivement id (%u), skipped.", cond->ConditionValue1);
return false;
}
break;
diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp
index 85b6b3f541..62114d22c2 100644
--- a/src/server/game/Conditions/DisableMgr.cpp
+++ b/src/server/game/Conditions/DisableMgr.cpp
@@ -49,8 +49,8 @@ namespace DisableMgr
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 disables. DB table `disables` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 disables. DB table `disables` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -198,28 +198,28 @@ namespace DisableMgr
{
case MAP_COMMON:
if (flags & VMAP::VMAP_DISABLE_AREAFLAG)
- LOG_INFO("server", "Areaflag disabled for world map %u.", entry);
+ LOG_INFO("disable", "Areaflag disabled for world map %u.", entry);
if (flags & VMAP::VMAP_DISABLE_LIQUIDSTATUS)
- LOG_INFO("server", "Liquid status disabled for world map %u.", entry);
+ LOG_INFO("disable", "Liquid status disabled for world map %u.", entry);
break;
case MAP_INSTANCE:
case MAP_RAID:
if (flags & VMAP::VMAP_DISABLE_HEIGHT)
- LOG_INFO("server", "Height disabled for instance map %u.", entry);
+ LOG_INFO("disable", "Height disabled for instance map %u.", entry);
if (flags & VMAP::VMAP_DISABLE_LOS)
- LOG_INFO("server", "LoS disabled for instance map %u.", entry);
+ LOG_INFO("disable", "LoS disabled for instance map %u.", entry);
break;
case MAP_BATTLEGROUND:
if (flags & VMAP::VMAP_DISABLE_HEIGHT)
- LOG_INFO("server", "Height disabled for battleground map %u.", entry);
+ LOG_INFO("disable", "Height disabled for battleground map %u.", entry);
if (flags & VMAP::VMAP_DISABLE_LOS)
- LOG_INFO("server", "LoS disabled for battleground map %u.", entry);
+ LOG_INFO("disable", "LoS disabled for battleground map %u.", entry);
break;
case MAP_ARENA:
if (flags & VMAP::VMAP_DISABLE_HEIGHT)
- LOG_INFO("server", "Height disabled for arena map %u.", entry);
+ LOG_INFO("disable", "Height disabled for arena map %u.", entry);
if (flags & VMAP::VMAP_DISABLE_LOS)
- LOG_INFO("server", "LoS disabled for arena map %u.", entry);
+ LOG_INFO("disable", "LoS disabled for arena map %u.", entry);
break;
default:
break;
@@ -234,8 +234,8 @@ namespace DisableMgr
++total_count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void CheckQuestDisables()
@@ -245,8 +245,8 @@ namespace DisableMgr
uint32 count = m_DisableMap[DISABLE_TYPE_QUEST].size();
if (!count)
{
- LOG_INFO("server", ">> Checked 0 quest disables.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Checked 0 quest disables.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -265,8 +265,8 @@ namespace DisableMgr
++itr;
}
- LOG_INFO("server", ">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags)
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index b0a5e5c7ba..645041c2ba 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -183,7 +183,7 @@ uint32 DBCFileCount = 0;
static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string& filename)
{
- LOG_ERROR("server", "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
+ LOG_ERROR("dbc", "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;
@@ -565,7 +565,7 @@ void LoadDBCStores(const std::string& dataPath)
// error checks
if (bad_dbc_files.size() >= DBCFileCount)
{
- LOG_ERROR("server", "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
+ LOG_ERROR("dbc", "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())
@@ -574,7 +574,7 @@ void LoadDBCStores(const std::string& dataPath)
for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
str += *i + "\n";
- LOG_ERROR("server", "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
+ LOG_ERROR("dbc", "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);
}
@@ -586,14 +586,14 @@ void LoadDBCStores(const std::string& dataPath)
!sMapStore.LookupEntry(724) || // last map added in 3.3.5a
!sSpellStore.LookupEntry(80864) ) // last client known item added in 3.3.5a
{
- LOG_ERROR("server", "You have _outdated_ DBC data. Please extract correct versions from current using client.");
+ LOG_ERROR("dbc", "You have _outdated_ DBC data. Please extract correct versions from current using client.");
exit(1);
}
LoadM2Cameras(dataPath);
- LOG_INFO("server", ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
// Convert the geomoetry from a spline value, to an actual WoW XYZ
@@ -775,7 +775,7 @@ bool readCamera(M2Camera const* cam, uint32 buffSize, M2Header const* header, Ci
void LoadM2Cameras(const std::string& dataPath)
{
sFlyByCameraStore.clear();
- LOG_INFO("server", ">> Loading Cinematic Camera files");
+ LOG_INFO("server.loading", ">> Loading Cinematic Camera files");
uint32 oldMSTime = getMSTime();
for (uint32 i = 0; i < sCinematicCameraStore.GetNumRows(); ++i)
@@ -813,7 +813,7 @@ void LoadM2Cameras(const std::string& dataPath)
// Reject if not at least the size of the header
if (static_cast<uint32>(fileSize) < sizeof(M2Header))
{
- LOG_ERROR("server", "Camera file %s is damaged. File is smaller than header size", filename.c_str());
+ LOG_ERROR("dbc", "Camera file %s is damaged. File is smaller than header size", filename.c_str());
m2file.close();
continue;
}
@@ -827,7 +827,7 @@ void LoadM2Cameras(const std::string& dataPath)
// Check file has correct magic (MD20)
if (strcmp(fileCheck, "MD20"))
{
- LOG_ERROR("server", "Camera file %s is damaged. File identifier not found", filename.c_str());
+ LOG_ERROR("dbc", "Camera file %s is damaged. File identifier not found", filename.c_str());
m2file.close();
continue;
}
@@ -847,7 +847,7 @@ void LoadM2Cameras(const std::string& dataPath)
if (header->ofsCameras + sizeof(M2Camera) > static_cast<uint32>(fileSize))
{
- LOG_ERROR("server", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
+ LOG_ERROR("dbc", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
continue;
}
@@ -855,11 +855,11 @@ void LoadM2Cameras(const std::string& dataPath)
M2Camera const* cam = reinterpret_cast<M2Camera const*>(buffer.data() + header->ofsCameras);
if (!readCamera(cam, fileSize, header, dbcentry))
{
- LOG_ERROR("server", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
+ LOG_ERROR("dbc", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
}
}
}
- LOG_INFO("server", ">> Loaded %u cinematic waypoint sets in %u ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u cinematic waypoint sets in %u ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
SimpleFactionsList const* GetFactionTeamList(uint32 faction)
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index 925e9bd423..d504ebd309 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -106,7 +106,7 @@ namespace lfg
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
+ LOG_ERROR("lfg", ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
return;
}
@@ -123,25 +123,25 @@ namespace lfg
if (!GetLFGDungeonEntry(dungeonId))
{
- LOG_ERROR("server", "Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId);
+ LOG_ERROR("lfg", "Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId);
continue;
}
if (!maxLevel || maxLevel > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
- LOG_ERROR("server", "Level %u specified for dungeon %u in table `lfg_dungeon_rewards` can never be reached!", maxLevel, dungeonId);
+ LOG_ERROR("lfg", "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))
{
- LOG_ERROR("server", "First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId);
+ LOG_ERROR("lfg", "First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId);
continue;
}
if (otherQuestId && !sObjectMgr->GetQuestTemplate(otherQuestId))
{
- LOG_ERROR("server", "Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId);
+ LOG_ERROR("lfg", "Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId);
otherQuestId = 0;
}
@@ -149,8 +149,8 @@ namespace lfg
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
LFGDungeonData const* LFGMgr::GetLFGDungeon(uint32 id)
@@ -192,8 +192,8 @@ namespace lfg
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 lfg entrance positions. DB table `lfg_dungeon_template` is empty!");
- LOG_INFO("server", " ");
+ LOG_ERROR("lfg", ">> Loaded 0 lfg entrance positions. DB table `lfg_dungeon_template` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -206,7 +206,7 @@ namespace lfg
LFGDungeonContainer::iterator dungeonItr = LfgDungeonStore.find(dungeonId);
if (dungeonItr == LfgDungeonStore.end())
{
- LOG_ERROR("server", "table `lfg_dungeon_template` contains coordinates for wrong dungeon %u", dungeonId);
+ LOG_ERROR("lfg", "table `lfg_dungeon_template` contains coordinates for wrong dungeon %u", dungeonId);
continue;
}
@@ -219,8 +219,8 @@ namespace lfg
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u lfg entrance positions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u lfg entrance positions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
// Fill all other teleport coords from areatriggers
for (LFGDungeonContainer::iterator itr = LfgDungeonStore.begin(); itr != LfgDungeonStore.end(); ++itr)
@@ -233,7 +233,7 @@ namespace lfg
AreaTriggerTeleport const* at = sObjectMgr->GetMapEntranceTrigger(dungeon.map);
if (!at)
{
- LOG_ERROR("server", "LFGMgr::LoadLFGDungeons: Failed to load dungeon %s, cant find areatrigger for map %u", dungeon.name.c_str(), dungeon.map);
+ LOG_ERROR("lfg", "LFGMgr::LoadLFGDungeons: Failed to load dungeon %s, cant find areatrigger for map %u", dungeon.name.c_str(), dungeon.map);
continue;
}
@@ -580,7 +580,7 @@ namespace lfg
isRaid = true;
break;
default:
- LOG_ERROR("server", "Wrong dungeon type %u for dungeon %u", type, *it);
+ LOG_ERROR("lfg", "Wrong dungeon type %u for dungeon %u", type, *it);
joinData.result = LFG_JOIN_DUNGEON_INVALID;
break;
}
@@ -665,9 +665,7 @@ namespace lfg
// Can't join. Send result
if (joinData.result != LFG_JOIN_OK)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::Join: [%s] joining with %u members. result: %u", guid.ToString().c_str(), grp ? grp->GetMembersCount() : 1, joinData.result);
-#endif
if (!dungeons.empty()) // Only should show lockmap when have no dungeons available
joinData.lockmap.clear();
player->GetSession()->SendLfgJoinResult(joinData);
@@ -758,9 +756,7 @@ namespace lfg
std::ostringstream o;
o << "LFGMgr::Join: [" << guid << "] joined (" << (grp ? "group" : "player") << ") Members: " << debugNames.c_str()
<< ". Dungeons (" << uint32(dungeons.size()) << "): " << ConcatenateDungeons(dungeons);
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "%s", o.str().c_str());
- #endif
}*/
}
@@ -1664,9 +1660,7 @@ namespace lfg
LfgProposalPlayer& player = itProposalPlayer->second;
player.accept = LfgAnswer(accept);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::UpdateProposal: Player [%s] of proposal %u selected: %u", guid.ToString().c_str(), proposalId, accept);
-#endif
if (!accept)
{
RemoveProposal(itProposal, LFG_UPDATETYPE_PROPOSAL_DECLINED);
@@ -1757,9 +1751,7 @@ namespace lfg
LfgProposal& proposal = itProposal->second;
proposal.state = LFG_PROPOSAL_FAILED;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: Proposal %u, state FAILED, UpdateType %u", itProposal->first, type);
-#endif
// 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)
@@ -1803,16 +1795,12 @@ namespace lfg
if (it->second.accept == LFG_ANSWER_DENY)
{
updateData.updateType = type;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: [%s] didn't accept. Removing from queue and compatible cache", guid.ToString().c_str());
-#endif
}
else
{
updateData.updateType = LFG_UPDATETYPE_REMOVED_FROM_QUEUE;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: [%s] in same group that someone that didn't accept. Removing from queue and compatible cache", guid.ToString().c_str());
-#endif
}
RestoreState(guid, "Proposal Fail (didn't accepted or in group with someone that didn't accept");
@@ -1826,9 +1814,7 @@ namespace lfg
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::RemoveProposal: Readding [%s] to queue.", guid.ToString().c_str());
-#endif
SetState(guid, LFG_STATE_QUEUED);
if (gguid != guid)
{
@@ -2211,9 +2197,7 @@ namespace lfg
else
state = PlayersStore[guid].GetState();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetState: [%s] = %u", guid.ToString().c_str(), state);
-#endif
return state;
}
@@ -2225,18 +2209,14 @@ namespace lfg
else
state = PlayersStore[guid].GetOldState();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetOldState: [%s] = %u", guid.ToString().c_str(), state);
-#endif
return state;
}
uint32 LFGMgr::GetDungeon(ObjectGuid guid, bool asId /*= true */)
{
uint32 dungeon = GroupsStore[guid].GetDungeon(asId);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetDungeon: [%s] asId: %u = %u", guid.ToString().c_str(), asId, dungeon);
-#endif
return dungeon;
}
@@ -2248,51 +2228,39 @@ namespace lfg
if (LFGDungeonData const* dungeon = GetLFGDungeon(dungeonId))
mapId = dungeon->map;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetDungeonMapId: [%s] = %u (DungeonId = %u)", guid.ToString().c_str(), mapId, dungeonId);
-#endif
return mapId;
}
uint8 LFGMgr::GetRoles(ObjectGuid guid)
{
uint8 roles = PlayersStore[guid].GetRoles();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetRoles: [%s] = %u", guid.ToString().c_str(), roles);
-#endif
return roles;
}
const std::string& LFGMgr::GetComment(ObjectGuid guid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetComment: [%s] = %s", guid.ToString().c_str(), PlayersStore[guid].GetComment().c_str());
-#endif
return PlayersStore[guid].GetComment();
}
LfgDungeonSet const& LFGMgr::GetSelectedDungeons(ObjectGuid guid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetSelectedDungeons: [%s]", guid.ToString().c_str());
-#endif
return PlayersStore[guid].GetSelectedDungeons();
}
LfgLockMap const& LFGMgr::GetLockedDungeons(ObjectGuid guid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetLockedDungeons: [%s]", guid.ToString().c_str());
-#endif
return PlayersStore[guid].GetLockedDungeons();
}
uint8 LFGMgr::GetKicksLeft(ObjectGuid guid)
{
uint8 kicks = GroupsStore[guid].GetKicksLeft();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::GetKicksLeft: [%s] = %u", guid.ToString().c_str(), kicks);
-#endif
return kicks;
}
@@ -2354,25 +2322,19 @@ namespace lfg
void LFGMgr::SetDungeon(ObjectGuid guid, uint32 dungeon)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::SetDungeon: [%s] dungeon %u", guid.ToString().c_str(), dungeon);
-#endif
GroupsStore[guid].SetDungeon(dungeon);
}
void LFGMgr::SetRoles(ObjectGuid guid, uint8 roles)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::SetRoles: [%s] roles: %u", guid.ToString().c_str(), roles);
-#endif
PlayersStore[guid].SetRoles(roles);
}
void LFGMgr::SetComment(ObjectGuid guid, std::string const& comment)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::SetComment: [%s] comment: %s", guid.ToString().c_str(), comment.c_str());
-#endif
PlayersStore[guid].SetComment(comment);
}
@@ -2391,33 +2353,25 @@ namespace lfg
void LFGMgr::SetSelectedDungeons(ObjectGuid guid, LfgDungeonSet const& dungeons)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::SetLockedDungeons: [%s]", guid.ToString().c_str());
-#endif
PlayersStore[guid].SetSelectedDungeons(dungeons);
}
void LFGMgr::SetLockedDungeons(ObjectGuid guid, LfgLockMap const& lock)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::SetLockedDungeons: [%s]", guid.ToString().c_str());
-#endif
PlayersStore[guid].SetLockedDungeons(lock);
}
void LFGMgr::DecreaseKicksLeft(ObjectGuid guid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::DecreaseKicksLeft: [%s]", guid.ToString().c_str());
-#endif
GroupsStore[guid].DecreaseKicksLeft();
}
void LFGMgr::RemoveGroupData(ObjectGuid guid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGMgr::RemoveGroupData: [%s]", guid.ToString().c_str());
-#endif
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 0dc2766928..e43080c143 100644
--- a/src/server/game/DungeonFinding/LFGQueue.cpp
+++ b/src/server/game/DungeonFinding/LFGQueue.cpp
@@ -25,23 +25,22 @@
namespace lfg
{
-
void LFGQueue::AddToQueue(ObjectGuid guid, bool failedProposal)
{
- //LOG_INFO("server", "ADD AddToQueue: %s, failed proposal: %u", guid.ToString().c_str(), failedProposal ? 1 : 0);
+ LOG_DEBUG("lfg", "ADD AddToQueue: %s, failed proposal: %u", guid.ToString().c_str(), failedProposal ? 1 : 0);
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(guid);
if (itQueue == QueueDataStore.end())
{
- LOG_ERROR("server", "LFGQueue::AddToQueue: Queue data not found for [%s]", guid.ToString().c_str());
+ LOG_ERROR("lfg", "LFGQueue::AddToQueue: Queue data not found for [%s]", guid.ToString().c_str());
return;
}
- //LOG_INFO("server", "AddToQueue success: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "AddToQueue success: %s", guid.ToString().c_str());
AddToNewQueue(guid, failedProposal);
}
void LFGQueue::RemoveFromQueue(ObjectGuid guid, bool partial)
{
- //LOG_INFO("server", "REMOVE RemoveFromQueue: %s, partial: %u", guid.ToString().c_str(), partial ? 1 : 0);
+ LOG_DEBUG("lfg", "REMOVE RemoveFromQueue: %s, partial: %u", guid.ToString().c_str(), partial ? 1 : 0);
RemoveFromNewQueue(guid);
RemoveFromCompatibles(guid);
@@ -52,13 +51,13 @@ namespace lfg
{
if (itr->second.bestCompatible.hasGuid(guid))
{
- //LOG_INFO("server", "CLEAR bestCompatible: %s, because of: %s", itr->second.bestCompatible.toString().c_str(), guid.ToString().c_str());
+ LOG_DEBUG("lfg", "CLEAR bestCompatible: %s, because of: %s", itr->second.bestCompatible.toString().c_str(), guid.ToString().c_str());
itr->second.bestCompatible.clear();
}
}
else
{
- //LOG_INFO("server", "CLEAR bestCompatible SELF: %s, because of: %s", itr->second.bestCompatible.toString().c_str(), guid.ToString().c_str());
+ LOG_DEBUG("lfg", "CLEAR bestCompatible SELF: %s, because of: %s", itr->second.bestCompatible.toString().c_str(), guid.ToString().c_str());
//itr->second.bestCompatible.clear(); // don't clear here, because UpdateQueueTimers will try to find with every diff update
itDelete = itr;
}
@@ -67,10 +66,10 @@ namespace lfg
// xinef: partial
if (!partial && itDelete != QueueDataStore.end())
{
- //LOG_INFO("server", "ERASE QueueDataStore for: %s", guid.ToString().c_str());
- //LOG_INFO("server", "ERASE QueueDataStore for: %s, itDelete: %u,%u,%u", guid.ToString().c_str(), itDelete->second.dps, itDelete->second.healers, itDelete->second.tanks);
+ LOG_DEBUG("lfg", "ERASE QueueDataStore for: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "ERASE QueueDataStore for: %s, itDelete: %u,%u,%u", guid.ToString().c_str(), itDelete->second.dps, itDelete->second.healers, itDelete->second.tanks);
QueueDataStore.erase(itDelete);
- //LOG_INFO("server", "ERASE QueueDataStore for: %s SUCCESS", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "ERASE QueueDataStore for: %s SUCCESS", guid.ToString().c_str());
}
}
@@ -78,34 +77,34 @@ namespace lfg
{
if (front)
{
- //LOG_INFO("server", "ADD AddToNewQueue at FRONT: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "ADD AddToNewQueue at FRONT: %s", guid.ToString().c_str());
restoredAfterProposal.push_back(guid);
newToQueueStore.push_front(guid);
}
else
{
- //LOG_INFO("server", "ADD AddToNewQueue at the END: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "ADD AddToNewQueue at the END: %s", guid.ToString().c_str());
newToQueueStore.push_back(guid);
}
}
void LFGQueue::RemoveFromNewQueue(ObjectGuid guid)
{
- //LOG_INFO("server", "REMOVE RemoveFromNewQueue: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "REMOVE RemoveFromNewQueue: %s", guid.ToString().c_str());
newToQueueStore.remove(guid);
restoredAfterProposal.remove(guid);
}
void LFGQueue::AddQueueData(ObjectGuid guid, time_t joinTime, LfgDungeonSet const& dungeons, LfgRolesMap const& rolesMap)
{
- //LOG_INFO("server", "JOINED AddQueueData: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "JOINED AddQueueData: %s", guid.ToString().c_str());
QueueDataStore[guid] = LfgQueueData(joinTime, dungeons, rolesMap);
AddToQueue(guid);
}
void LFGQueue::RemoveQueueData(ObjectGuid guid)
{
- //LOG_INFO("server", "LEFT RemoveQueueData: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "LEFT RemoveQueueData: %s", guid.ToString().c_str());
LfgQueueDataContainer::iterator it = QueueDataStore.find(guid);
if (it != QueueDataStore.end())
QueueDataStore.erase(it);
@@ -141,11 +140,11 @@ namespace lfg
void LFGQueue::RemoveFromCompatibles(ObjectGuid guid)
{
- //LOG_INFO("server", "COMPATIBLES REMOVE for: %s", guid.ToString().c_str());
+ LOG_DEBUG("lfg", "COMPATIBLES REMOVE for: %s", guid.ToString().c_str());
for (LfgCompatibleContainer::iterator it = CompatibleList.begin(); it != CompatibleList.end(); ++it)
if (it->hasGuid(guid))
{
- //LOG_INFO("server", "Removed Compatible: %s, because of: %s", it->toString().c_str(), guid.ToString().c_str());
+ LOG_DEBUG("lfg", "Removed Compatible: %s, because of: %s", it->toString().c_str(), guid.ToString().c_str());
it->clear(); // set to 0, this will be removed while iterating in FindNewGroups
}
for (LfgCompatibleContainer::iterator itr = CompatibleTempList.begin(); itr != CompatibleTempList.end(); )
@@ -153,7 +152,7 @@ namespace lfg
LfgCompatibleContainer::iterator it = itr++;
if (it->hasGuid(guid))
{
- //LOG_INFO("server", "Erased Temp Compatible: %s, because of: %s", it->toString().c_str(), guid.ToString().c_str());
+ LOG_DEBUG("lfg", "Erased Temp Compatible: %s, because of: %s", it->toString().c_str(), guid.ToString().c_str());
CompatibleTempList.erase(it);
}
}
@@ -161,20 +160,20 @@ namespace lfg
void LFGQueue::AddToCompatibles(Lfg5Guids const& key)
{
- //LOG_INFO("server", "COMPATIBLES ADD: %s", key.toString().c_str());
+ LOG_DEBUG("lfg", "COMPATIBLES ADD: %s", key.toString().c_str());
CompatibleTempList.push_back(key);
}
uint8 LFGQueue::FindGroups()
{
- //LOG_INFO("server", "FIND GROUPS!");
+ LOG_DEBUG("lfg", "FIND GROUPS!");
uint8 newGroupsProcessed = 0;
if (!newToQueueStore.empty())
{
++newGroupsProcessed;
ObjectGuid newGuid = newToQueueStore.front();
bool pushCompatiblesToFront = (std::find(restoredAfterProposal.begin(), restoredAfterProposal.end(), newGuid) != restoredAfterProposal.end());
- //LOG_INFO("server", "newToQueueStore: %s, front: %u", newGuid.ToString().c_str(), pushCompatiblesToFront ? 1 : 0);
+ LOG_DEBUG("lfg", "newToQueueStore: %s, front: %u", newGuid.ToString().c_str(), pushCompatiblesToFront ? 1 : 0);
RemoveFromNewQueue(newGuid);
FindNewGroups(newGuid);
@@ -194,7 +193,7 @@ namespace lfg
uint64 foundMask = 0;
uint32 foundCount = 0;
- //LOG_INFO("server", "FIND NEW GROUPS for: %s", newGuid.ToString().c_str());
+ LOG_DEBUG("lfg", "FIND NEW GROUPS for: %s", newGuid.ToString().c_str());
// we have to take into account that FindNewGroups is called every X minutes if number of compatibles is low!
// build set of already present compatibles for this guid
@@ -222,7 +221,7 @@ namespace lfg
Lfg5GuidsList::iterator itr = it++;
if (itr->empty())
{
- //LOG_INFO("server", "ERASE from CompatibleList");
+ LOG_DEBUG("lfg", "ERASE from CompatibleList");
CompatibleList.erase(itr);
continue;
}
@@ -238,7 +237,7 @@ namespace lfg
LfgCompatibility LFGQueue::CheckCompatibility(Lfg5Guids const& checkWith, const ObjectGuid& newGuid, uint64& foundMask, uint32& foundCount, const std::set<Lfg5Guids>& currentCompatibles)
{
- //LOG_INFO("server", "CHECK CheckCompatibility: %s, new guid: %s", checkWith.toString().c_str(), newGuid.ToString().c_str());
+ LOG_DEBUG("lfg", "CHECK CheckCompatibility: %s, new guid: %s", checkWith.toString().c_str(), newGuid.ToString().c_str());
Lfg5Guids check(checkWith, false); // here newGuid is at front
Lfg5Guids strGuids(checkWith, false); // here guids are sorted
check.force_insert_front(newGuid);
@@ -263,7 +262,7 @@ namespace lfg
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(guid);
if (itQueue == QueueDataStore.end())
{
- LOG_ERROR("server", "LFGQueue::CheckCompatibility: [%s] is not queued but listed as queued!", guid.ToString().c_str());
+ LOG_ERROR("lfg", "LFGQueue::CheckCompatibility: [%s] is not queued but listed as queued!", guid.ToString().c_str());
RemoveFromQueue(guid);
return LFG_COMPATIBILITY_PENDING;
}
@@ -317,7 +316,7 @@ namespace lfg
if (itRoles->first == itPlayer->first)
{
// pussywizard: LFG ZOMG! this means that this player was in two different LfgQueueData (in QueueDataStore), and at least one of them is a group guid, because we do checks so there aren't 2 same guids in current CHECK
- //LOG_ERROR("server", "LFGQueue::CheckCompatibility: ERROR! Player multiple times in queue! [%s]", itRoles->first.ToString().c_str());
+ //LOG_ERROR("lfg", "LFGQueue::CheckCompatibility: ERROR! Player multiple times in queue! [%s]", itRoles->first.ToString().c_str());
break;
}
else if (sLFGMgr->HasIgnore(itRoles->first, itPlayer->first))
@@ -453,13 +452,13 @@ namespace lfg
else
m_QueueStatusTimer += diff;
- //LOG_INFO("server", "UPDATE UpdateQueueTimers");
+ LOG_DEBUG("lfg", "UPDATE UpdateQueueTimers");
for (Lfg5GuidsList::iterator it = CompatibleList.begin(); it != CompatibleList.end(); )
{
Lfg5GuidsList::iterator itr = it++;
if (itr->empty())
{
- //LOG_INFO("server", "UpdateQueueTimers ERASE compatible");
+ LOG_DEBUG("lfg", "UpdateQueueTimers ERASE compatible");
CompatibleList.erase(itr);
}
}
@@ -527,7 +526,7 @@ namespace lfg
if (queueinfo.bestCompatible.empty())
{
- //LOG_INFO("server", "found empty bestCompatible");
+ LOG_DEBUG("lfg", "found empty bestCompatible");
FindBestCompatibleInQueue(itQueue);
}
@@ -559,7 +558,7 @@ namespace lfg
void LFGQueue::UpdateBestCompatibleInQueue(LfgQueueDataContainer::iterator itrQueue, Lfg5Guids const& key)
{
- //LOG_INFO("server", "UpdateBestCompatibleInQueue: %s", key.toString().c_str());
+ LOG_DEBUG("lfg", "UpdateBestCompatibleInQueue: %s", key.toString().c_str());
LfgQueueData& queueData = itrQueue->second;
uint8 storedSize = queueData.bestCompatible.size();
diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp
index 42d07c3533..73d1b05c10 100644
--- a/src/server/game/DungeonFinding/LFGScripts.cpp
+++ b/src/server/game/DungeonFinding/LFGScripts.cpp
@@ -65,8 +65,6 @@ namespace lfg
ObjectGuid gguid2 = group->GetGUID();
if (gguid != gguid2)
{
- //LOG_ERROR("server", "%s on group %s but LFG has group %s saved... Fixing.",
- // player->GetSession()->GetPlayerInfo().c_str(), gguid2.ToString().c_str(), gguid.ToString().c_str());
sLFGMgr->SetupGroupMember(guid, group->GetGUID());
}
}
@@ -100,10 +98,8 @@ namespace lfg
sLFGMgr->LeaveAllLfgQueues(player->GetGUID(), true);
player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, 0.0f);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGPlayerScript::OnMapChanged, Player %s (%s) is in LFG dungeon map but does not have a valid group! Teleporting to homebind.",
player->GetName().c_str(), player->GetGUID().ToString().c_str());
-#endif
return;
}
@@ -139,19 +135,15 @@ namespace lfg
if (leader == guid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGScripts::OnAddMember [%s]: added [%s] leader [%s]", gguid.ToString().c_str(), guid.ToString().c_str(), leader.ToString().c_str());
-#endif
sLFGMgr->SetLeader(gguid, guid);
}
else
{
LfgState gstate = sLFGMgr->GetState(gguid);
LfgState state = sLFGMgr->GetState(guid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGScripts::OnAddMember [%s]: added [%s] leader [%s] gstate: %u, state: %u",
gguid.ToString().c_str(), guid.ToString().c_str(), leader.ToString().c_str(), gstate, state);
-#endif
if (state == LFG_STATE_QUEUED)
sLFGMgr->LeaveLfg(guid);
@@ -184,10 +176,8 @@ namespace lfg
return;
ObjectGuid gguid = group->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGScripts::OnRemoveMember [%s]: remove [%s] Method: %d Kicker: [%s] Reason: %s",
gguid.ToString().c_str(), guid.ToString().c_str(), method, kicker.ToString().c_str(), (reason ? reason : ""));
-#endif
bool isLFG = group->isLFGGroup();
LfgState state = sLFGMgr->GetState(gguid);
@@ -246,9 +236,7 @@ namespace lfg
return;
ObjectGuid gguid = group->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGScripts::OnDisband [%s]", gguid.ToString().c_str());
-#endif
// pussywizard: after all necessary actions handle raid browser
if (sLFGMgr->GetState(group->GetLeaderGUID()) == LFG_STATE_RAIDBROWSER)
@@ -264,10 +252,8 @@ namespace lfg
ObjectGuid gguid = group->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGScripts::OnChangeLeader [%s]: old [%s] new [%s]",
gguid.ToString().c_str(), newLeaderGuid.ToString().c_str(), oldLeaderGuid.ToString().c_str());
-#endif
sLFGMgr->SetLeader(gguid, newLeaderGuid);
// pussywizard: after all necessary actions handle raid browser
@@ -285,9 +271,7 @@ namespace lfg
ObjectGuid gguid = group->GetGUID();
ObjectGuid leader = group->GetLeaderGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "LFGScripts::OnInviteMember [%s]: invite [%s] leader [%s]", gguid.ToString().c_str(), guid.ToString().c_str(), leader.ToString().c_str());
-#endif
// No gguid == new group being formed
// No leader == after group creation first invite is new leader
// leader and no gguid == first invite after leader is added to new group (this is the real invite)
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index 26e43e11d2..f4d0222b8d 100644
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -63,8 +63,8 @@ bool Corpse::Create(ObjectGuid::LowType guidlow, Player* owner)
if (!IsPositionValid())
{
- LOG_ERROR("server", "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());
+ 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;
}
@@ -156,8 +156,8 @@ bool Corpse::LoadCorpseFromDB(ObjectGuid::LowType guid, Field* fields)
if (!IsPositionValid())
{
- LOG_ERROR("server", "Corpse ( %s, owner: %s) is not created, given coordinates are not valid (X: %f, Y: %f, Z: %f)",
- GetGUID().ToString().c_str(), GetOwnerGUID().ToString().c_str(), posX, posY, posZ);
+ LOG_ERROR("entities.player", "Corpse ( %s, owner: %s) is not created, given coordinates are not valid (X: %f, Y: %f, Z: %f)",
+ GetGUID().ToString().c_str(), GetOwnerGUID().ToString().c_str(), posX, posY, posZ);
return false;
}
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 3b593a9243..4c7df1aa70 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -200,9 +200,6 @@ Creature::~Creature()
delete i_AI;
i_AI = nullptr;
-
- //if (m_uint32Values)
- // LOG_ERROR("server", "Deconstruct Creature Entry = %u", GetEntry());
}
void Creature::AddToWorld()
@@ -542,11 +539,11 @@ void Creature::Update(uint32 diff)
{
case JUST_RESPAWNED:
// Must not be called, see Creature::setDeathState JUST_RESPAWNED -> ALIVE promoting.
- LOG_ERROR("server", "Creature (%s) in wrong state: JUST_RESPAWNED (4)", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.unit", "Creature (%s) in wrong state: JUST_RESPAWNED (4)", GetGUID().ToString().c_str());
break;
case JUST_DIED:
// Must not be called, see Creature::setDeathState JUST_DIED -> CORPSE promoting.
- LOG_ERROR("server", "Creature (%s) in wrong state: JUST_DEAD (1)", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.unit", "Creature (%s) in wrong state: JUST_DEAD (1)", GetGUID().ToString().c_str());
break;
case DEAD:
{
@@ -595,9 +592,7 @@ void Creature::Update(uint32 diff)
else if (m_corpseRemoveTime <= time(nullptr))
{
RemoveCorpse(false);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
-#endif
+ LOG_DEBUG("entities.unit", "Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY));
}
break;
}
@@ -910,9 +905,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
// make sure nothing can change the AI during AI update
if (m_AI_locked)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "AIM_Initialize: failed to init, locked.");
-#endif
return false;
}
@@ -970,7 +963,7 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u
if (!IsPositionValid())
{
- LOG_ERROR("server", "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);
+ 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;
}
@@ -1187,7 +1180,7 @@ void Creature::SaveToDB()
CreatureData const* data = sObjectMgr->GetCreatureData(m_spawnId);
if (!data)
{
- LOG_ERROR("server", "Creature::SaveToDB failed, cannot get creature data!");
+ LOG_ERROR("entities.unit", "Creature::SaveToDB failed, cannot get creature data!");
return;
}
@@ -1635,7 +1628,7 @@ void Creature::DeleteFromDB()
{
if (!m_spawnId)
{
- LOG_ERROR("server", "Trying to delete not saved creature: %s", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.unit", "Trying to delete not saved creature: %s", GetGUID().ToString().c_str());
return;
}
@@ -1825,9 +1818,7 @@ void Creature::Respawn(bool force)
if (m_spawnId)
GetMap()->RemoveCreatureRespawnTime(m_spawnId);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Respawning creature %s (SpawnId: %u, %s)", GetName().c_str(), GetSpawnId(), GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("entities.unit", "Respawning creature %s (SpawnId: %u, %s)", GetName().c_str(), GetSpawnId(), GetGUID().ToString().c_str());
m_respawnTime = 0;
ResetPickPocketLootTime();
@@ -1991,7 +1982,7 @@ SpellInfo const* Creature::reachWithSpellAttack(Unit* victim)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]);
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown spell id %i", m_spells[i]);
+ LOG_ERROR("entities.unit", "WORLD: unknown spell id %i", m_spells[i]);
continue;
}
@@ -2039,7 +2030,7 @@ SpellInfo const* Creature::reachWithSpellCure(Unit* victim)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(m_spells[i]);
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown spell id %i", m_spells[i]);
+ LOG_ERROR("entities.unit", "WORLD: unknown spell id %i", m_spells[i]);
continue;
}
@@ -2115,9 +2106,7 @@ void Creature::SendAIReaction(AiReaction reactionType)
((WorldObject*)this)->SendMessageToSet(&data, true);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
-#endif
}
void Creature::CallAssistance()
@@ -2445,9 +2434,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
}
AddAura(*itr, this);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Spell: %u added to creature (%s)", *itr, GetGUID().ToString().c_str());
-#endif
}
}
@@ -2466,7 +2453,7 @@ void Creature::SetInCombatWithZone()
{
if (!CanHaveThreatList())
{
- LOG_ERROR("server", "Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry());
+ LOG_ERROR("entities.unit", "Creature entry %u call SetInCombatWithZone but creature cannot have threat list.", GetEntry());
return;
}
@@ -2474,7 +2461,7 @@ void Creature::SetInCombatWithZone()
if (!map->IsDungeon())
{
- LOG_ERROR("server", "Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), map->GetId());
+ LOG_ERROR("entities.unit", "Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.", GetEntry(), map->GetId());
return;
}
diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp
index 09c0354284..d1d6ac7c53 100644
--- a/src/server/game/Entities/Creature/CreatureGroups.cpp
+++ b/src/server/game/Entities/Creature/CreatureGroups.cpp
@@ -33,17 +33,13 @@ void FormationMgr::AddCreatureToGroup(uint32 groupId, Creature* member)
//Add member to an existing group
if (itr != map->CreatureGroupHolder.end())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Group found: %u, inserting creature %s, Group InstanceID %u", groupId, member->GetGUID().ToString().c_str(), member->GetInstanceId());
-#endif
itr->second->AddMember(member);
}
//Create new group
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Group not found: %u. Creating new group.", groupId);
-#endif
CreatureGroup* group = new CreatureGroup(groupId);
map->CreatureGroupHolder[groupId] = group;
group->AddMember(member);
@@ -52,9 +48,7 @@ void FormationMgr::AddCreatureToGroup(uint32 groupId, Creature* member)
void FormationMgr::RemoveCreatureFromGroup(CreatureGroup* group, Creature* member)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Deleting member pointer to spawnId: %u from group %u", member->GetSpawnId(), group->GetId());
-#endif
group->RemoveMember(member);
if (group->isEmpty())
@@ -63,9 +57,7 @@ void FormationMgr::RemoveCreatureFromGroup(CreatureGroup* group, Creature* membe
if (!map)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Deleting group with InstanceID %u", member->GetInstanceId());
-#endif
map->CreatureGroupHolder.erase(group->GetId());
delete group;
}
@@ -85,7 +77,7 @@ void FormationMgr::LoadCreatureFormations()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -137,22 +129,18 @@ void FormationMgr::LoadCreatureFormations()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void CreatureGroup::AddMember(Creature* member)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "CreatureGroup::AddMember: Adding unit %s.", member->GetGUID().ToString().c_str());
-#endif
//Check if it is a leader
if (member->GetSpawnId() == m_groupID)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Unit %s is formation leader. Adding group.", member->GetGUID().ToString().c_str());
-#endif
m_leader = member;
}
@@ -180,10 +168,8 @@ void CreatureGroup::MemberAttackStart(Creature* member, Unit* target)
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (m_leader) // avoid crash if leader was killed and reset.
LOG_DEBUG("entities.unit", "GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
-#endif
//Skip one check
if (itr->first == member)
@@ -213,9 +199,7 @@ void CreatureGroup::FormationReset(bool dismiss)
itr->first->GetMotionMaster()->Initialize();
else
itr->first->GetMotionMaster()->MoveIdle();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Set %s movement for member %s", dismiss ? "default" : "idle", itr->first->GetGUID().ToString().c_str());
-#endif
}
}
m_Formed = !dismiss;
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index 05b8b9477a..b870600481 100644
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -332,9 +332,7 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote const& eEmote, const std::string
data.put<uint8>(count_pos, count);
_session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC %s", npcGUID.ToString().c_str());
-#endif
}
void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, ObjectGuid npcGUID) const
@@ -344,9 +342,7 @@ void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, ObjectGuid npcGUID) con
data << uint8(questStatus);
_session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC %s, status=%u", npcGUID.ToString().c_str(), questStatus);
-#endif
}
void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGUID, bool activateAccept) const
@@ -448,9 +444,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU
}
_session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS %s, questid=%u", npcGUID.ToString().c_str(), quest->GetQuestId());
-#endif
}
void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
@@ -581,9 +575,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const* quest) const
data << questObjectiveText[i];
_session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", quest->GetQuestId());
-#endif
}
void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUID, bool enableNext) const
@@ -671,9 +663,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* quest, ObjectGuid npcGUI
data << uint32(quest->RewardFactionValueIdOverride[i]);
_session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD %s, questid=%u", npcGUID.ToString().c_str(), quest->GetQuestId());
-#endif
}
void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, ObjectGuid npcGUID, bool canComplete, bool closeOnCancel) const
@@ -764,7 +754,5 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const* quest, ObjectGuid npcGU
data << uint32(0x10);
_session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS %s, questid=%u", npcGUID.ToString().c_str(), quest->GetQuestId());
-#endif
}
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index 5a6668ec31..73c031724c 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -138,7 +138,7 @@ void TempSummon::Update(uint32 diff)
}
default:
UnSummon();
- LOG_ERROR("server", "Temporary summoned creature (entry: %u) have unknown type %u of ", GetEntry(), m_type);
+ LOG_ERROR("entities.unit", "Temporary summoned creature (entry: %u) have unknown type %u of ", GetEntry(), m_type);
break;
}
}
@@ -262,7 +262,7 @@ void TempSummon::RemoveFromWorld()
owner->m_SummonSlot[slot].Clear();
//if (GetOwnerGUID())
- // LOG_ERROR("server", "Unit %u has owner guid when removed from world", GetEntry());
+ // 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 c44f54fbd0..fd796800ed 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -91,7 +91,7 @@ bool DynamicObject::CreateDynamicObject(ObjectGuid::LowType guidlow, Unit* caste
Relocate(pos);
if (!IsPositionValid())
{
- LOG_ERROR("server", "DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spellId, GetPositionX(), GetPositionY());
+ LOG_ERROR("dyobject", "DynamicObject (spell %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", spellId, GetPositionX(), GetPositionY());
return false;
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index edce6c199e..3f39df984a 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -119,7 +119,7 @@ void GameObject::RemoveFromOwner()
return;
}
- LOG_FATAL("server", "Delete GameObject (%s Entry: %u SpellId %u LinkedGO %u) that lost references to owner %s GO list. Crash possible later.",
+ LOG_FATAL("entities.gameobject", "Delete GameObject (%s Entry: %u SpellId %u LinkedGO %u) that lost references to owner %s GO list. Crash possible later.",
GetGUID().ToString().c_str(), GetGOInfo()->entry, m_spellId, GetGOInfo()->GetLinkedGameObjectEntry(), ownerGUID.ToString().c_str());
SetOwnerGUID(ObjectGuid::Empty);
@@ -235,7 +235,7 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u
m_stationaryPosition.Relocate(x, y, z, ang);
if (!IsPositionValid())
{
- LOG_ERROR("server", "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y);
+ LOG_ERROR("entities.gameobject", "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y);
return false;
}
@@ -372,7 +372,7 @@ void GameObject::Update(uint32 diff)
if (AI())
AI()->UpdateAI(diff);
else if (!AIM_Initialize())
- LOG_ERROR("server", "Could not initialize GameObjectAI");
+ LOG_ERROR("entities.gameobject", "Could not initialize GameObjectAI");
switch (m_lootState)
{
@@ -850,7 +850,7 @@ void GameObject::SaveToDB(bool saveAddon /*= false*/)
GameObjectData const* data = sObjectMgr->GetGOData(m_spawnId);
if (!data)
{
- LOG_ERROR("server", "GameObject::SaveToDB failed, cannot get gameobject data!");
+ LOG_ERROR("entities.gameobject", "GameObject::SaveToDB failed, cannot get gameobject data!");
return;
}
@@ -1456,9 +1456,7 @@ void GameObject::Use(Unit* user)
if (info->goober.eventId)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps.script", "Goober ScriptStart id %u for GO entry %u (spawnId %u).", info->goober.eventId, GetEntry(), m_spawnId);
-#endif
GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this);
EventInform(info->goober.eventId);
}
@@ -1559,9 +1557,7 @@ void GameObject::Use(Unit* user)
int32 roll = irand(1, 100);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Fishing check (skill: %i zone min skill: %i chance %i roll: %i", skill, zone_skill, chance, roll);
-#endif
+ LOG_DEBUG("entities.gameobject", "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)
@@ -1841,7 +1837,7 @@ void GameObject::Use(Unit* user)
}
default:
if (GetGoType() >= MAX_GAMEOBJECT_TYPE)
- LOG_ERROR("server", "GameObject::Use(): unit (%s, name: %s) tries to use object (%s, name: %s) of unknown type (%u)",
+ LOG_ERROR("entities.gameobject", "GameObject::Use(): unit (%s, name: %s) tries to use object (%s, name: %s) of unknown type (%u)",
user->GetGUID().ToString().c_str(), user->GetName().c_str(), GetGUID().ToString().c_str(), GetGOInfo()->name.c_str(), GetGoType());
break;
}
@@ -1853,11 +1849,9 @@ void GameObject::Use(Unit* user)
if (!spellInfo)
{
if (user->GetTypeId() != TYPEID_PLAYER || !sOutdoorPvPMgr->HandleCustomSpell(user->ToPlayer(), spellId, this))
- LOG_ERROR("server", "WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId, GetEntry(), GetGoType());
+ LOG_ERROR("entities.gameobject", "WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId, GetEntry(), GetGoType());
else
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("outdoorpvp", "WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId);
-#endif
return;
}
diff --git a/src/server/game/Entities/Item/Container/Bag.cpp b/src/server/game/Entities/Item/Container/Bag.cpp
index 4a44fea6d8..7c941199e5 100644
--- a/src/server/game/Entities/Item/Container/Bag.cpp
+++ b/src/server/game/Entities/Item/Container/Bag.cpp
@@ -28,7 +28,7 @@ Bag::~Bag()
{
if (item->IsInWorld())
{
- LOG_FATAL("server", "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.",
+ LOG_FATAL("entities.item", "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 ae77612b5d..c11c733178 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -85,7 +85,7 @@ void AddItemsSetItem(Player* player, Item* item)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(set->spells[x]);
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid);
+ LOG_ERROR("entities.item", "WORLD: unknown spell id %u in items set %u effects", set->spells[x], setid);
break;
}
@@ -287,9 +287,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff)
if (!GetUInt32Value(ITEM_FIELD_DURATION))
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)", GetEntry(), GetUInt32Value(ITEM_FIELD_DURATION), diff);
-#endif
if (GetUInt32Value(ITEM_FIELD_DURATION) <= diff)
{
@@ -704,9 +702,7 @@ void Item::AddToUpdateQueueOf(Player* player)
if (player->GetGUID() != GetOwnerGUID())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item::AddToUpdateQueueOf - Owner's guid (%s) and player's guid (%s) don't match!", GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
-#endif
return;
}
@@ -726,9 +722,7 @@ void Item::RemoveFromUpdateQueueOf(Player* player)
if (player->GetGUID() != GetOwnerGUID())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item::RemoveFromUpdateQueueOf - Owner's guid (%s) and player's guid (%s) don't match!", GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
-#endif
return;
}
diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
index d718e2b123..8286235df4 100644
--- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
+++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
@@ -58,13 +58,13 @@ void LoadRandomEnchantmentsTable()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
else
{
LOG_ERROR("sql.sql", ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
}
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 02c42943b7..787a5685c4 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -75,7 +75,7 @@ WorldObject::~WorldObject()
{
if (GetTypeId() == TYPEID_CORPSE)
{
- LOG_FATAL("server", "Object::~Object Corpse %s, type=%d deleted but still in map!!", GetGUID().ToString().c_str(), ((Corpse*)this)->GetType());
+ LOG_FATAL("entities.object", "Object::~Object Corpse %s, type=%d deleted but still in map!!", GetGUID().ToString().c_str(), ((Corpse*)this)->GetType());
ABORT();
}
ResetMap();
@@ -88,15 +88,15 @@ Object::~Object()
if (IsInWorld())
{
- LOG_FATAL("server", "Object::~Object - %s deleted but still in world!!", GetGUID().ToString().c_str());
+ LOG_FATAL("entities.object", "Object::~Object - %s deleted but still in world!!", GetGUID().ToString().c_str());
if (isType(TYPEMASK_ITEM))
- LOG_FATAL("server", "Item slot %u", ((Item*)this)->GetSlot());
+ LOG_FATAL("entities.object", "Item slot %u", ((Item*)this)->GetSlot());
ABORT();
}
if (m_objectUpdated)
{
- LOG_FATAL("server", "Object::~Object - %s deleted but still in update list!!", GetGUID().ToString().c_str());
+ LOG_FATAL("entities.object", "Object::~Object - %s deleted but still in update list!!", GetGUID().ToString().c_str());
ABORT();
}
@@ -686,7 +686,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value)
if (offset > 3)
{
- LOG_ERROR("server", "Object::SetByteValue: wrong offset %u", offset);
+ LOG_ERROR("entities.object", "Object::SetByteValue: wrong offset %u", offset);
return;
}
@@ -706,7 +706,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value)
if (offset > 1)
{
- LOG_ERROR("server", "Object::SetUInt16Value: wrong offset %u", offset);
+ LOG_ERROR("entities.object", "Object::SetUInt16Value: wrong offset %u", offset);
return;
}
@@ -806,7 +806,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
if (offset > 3)
{
- LOG_ERROR("server", "Object::SetByteFlag: wrong offset %u", offset);
+ LOG_ERROR("entities.object", "Object::SetByteFlag: wrong offset %u", offset);
return;
}
@@ -825,7 +825,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
if (offset > 3)
{
- LOG_ERROR("server", "Object::RemoveByteFlag: wrong offset %u", offset);
+ LOG_ERROR("entities.object", "Object::RemoveByteFlag: wrong offset %u", offset);
return;
}
@@ -840,7 +840,8 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
bool Object::PrintIndexError(uint32 index, bool set) const
{
- LOG_INFO("server", "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);
+ LOG_INFO("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;
@@ -912,32 +913,36 @@ ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& st
void MovementInfo::OutDebug()
{
- LOG_INFO("server", "MOVEMENT INFO");
- LOG_INFO("server", "guid %s", guid.ToString().c_str());
- LOG_INFO("server", "flags %u", flags);
- LOG_INFO("server", "flags2 %u", flags2);
- LOG_INFO("server", "time %u current time " UI64FMTD "", flags2, uint64(::time(nullptr)));
- LOG_INFO("server", "position: `%s`", pos.ToString().c_str());
+ LOG_INFO("movement", "MOVEMENT INFO");
+ LOG_INFO("movement", "guid %s", guid.ToString().c_str());
+ LOG_INFO("movement", "flags %u", flags);
+ LOG_INFO("movement", "flags2 %u", flags2);
+ LOG_INFO("movement", "time %u current time " UI64FMTD "", flags2, uint64(::time(nullptr)));
+ LOG_INFO("movement", "position: `%s`", pos.ToString().c_str());
+
if (flags & MOVEMENTFLAG_ONTRANSPORT)
{
- LOG_INFO("server", "TRANSPORT:");
- LOG_INFO("server", "guid: %s", transport.guid.ToString().c_str());
- LOG_INFO("server", "position: `%s`", transport.pos.ToString().c_str());
- LOG_INFO("server", "seat: %i", transport.seat);
- LOG_INFO("server", "time: %u", transport.time);
+ LOG_INFO("movement", "TRANSPORT:");
+ LOG_INFO("movement", "guid: %s", transport.guid.ToString().c_str());
+ LOG_INFO("movement", "position: `%s`", transport.pos.ToString().c_str());
+ LOG_INFO("movement", "seat: %i", transport.seat);
+ LOG_INFO("movement", "time: %u", transport.time);
+
if (flags2 & MOVEMENTFLAG2_INTERPOLATED_MOVEMENT)
- LOG_INFO("server", "time2: %u", transport.time2);
+ {
+ LOG_INFO("movement", "time2: %u", transport.time2);
+ }
}
if ((flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (flags2 & MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING))
- LOG_INFO("server", "pitch: %f", pitch);
+ LOG_INFO("movement", "pitch: %f", pitch);
- LOG_INFO("server", "fallTime: %u", fallTime);
+ LOG_INFO("movement", "fallTime: %u", fallTime);
if (flags & MOVEMENTFLAG_FALLING)
- LOG_INFO("server", "j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed);
+ LOG_INFO("movement", "j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed);
if (flags & MOVEMENTFLAG_SPLINE_ELEVATION)
- LOG_INFO("server", "splineElevation: %f", splineElevation);
+ LOG_INFO("movement", "splineElevation: %f", splineElevation);
}
WorldObject::WorldObject(bool isWorldObject) : WorldLocation(),
@@ -1920,7 +1925,7 @@ namespace Acore
ChatHandler::BuildChatPacket(data, i_msgtype, i_language, i_object, i_target, text, 0, "", loc_idx);
}
else
- LOG_ERROR("server", "MonsterChatBuilder: `broadcast_text` id %i missing", i_textId);
+ LOG_ERROR("entities.object", "MonsterChatBuilder: `broadcast_text` id %i missing", i_textId);
}
private:
@@ -2092,7 +2097,7 @@ void WorldObject::SetMap(Map* map)
return;
if (m_currMap)
{
- LOG_FATAL("server", "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId());
+ LOG_FATAL("entities.object", "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId());
ABORT();
}
m_currMap = map;
@@ -2140,7 +2145,7 @@ void WorldObject::AddObjectToRemoveList()
Map* map = FindMap();
if (!map)
{
- LOG_ERROR("server", "Object %s at attempt add to move list not have valid map (Id: %u).", GetGUID().ToString().c_str(), GetMapId());
+ LOG_ERROR("entities.object", "Object %s at attempt add to move list not have valid map (Id: %u).", GetGUID().ToString().c_str(), GetMapId());
return;
}
@@ -2693,7 +2698,7 @@ void WorldObject::MovePosition(Position& pos, float dist, float angle)
// Prevent invalid coordinates here, position is unchanged
if (!Acore::IsValidMapCoord(destx, desty))
{
- LOG_FATAL("server", "WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty);
+ LOG_FATAL("entities.object", "WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty);
return;
}
diff --git a/src/server/game/Entities/Object/ObjectGuid.cpp b/src/server/game/Entities/Object/ObjectGuid.cpp
index 3932040942..ca2a9a485d 100644
--- a/src/server/game/Entities/Object/ObjectGuid.cpp
+++ b/src/server/game/Entities/Object/ObjectGuid.cpp
@@ -80,7 +80,7 @@ ByteBuffer& operator>>(ByteBuffer& buf, PackedGuidReader const& guid)
void ObjectGuidGeneratorBase::HandleCounterOverflow(HighGuid high)
{
- LOG_ERROR("server", "%s guid overflow!! Can't continue, shutting down server. ", ObjectGuid::GetTypeName(high));
+ LOG_ERROR("entities.object", "%s guid overflow!! Can't continue, shutting down server. ", ObjectGuid::GetTypeName(high));
World::StopNow(ERROR_EXIT_CODE);
}
diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp
index d76618e180..6da85d4695 100644
--- a/src/server/game/Entities/Object/Updates/UpdateData.cpp
+++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp
@@ -47,7 +47,7 @@ void UpdateData::Compress(void* dst, uint32* dst_size, void* src, int src_size)
int z_res = deflateInit(&c_stream, sWorld->getIntConfig(CONFIG_COMPRESSION));
if (z_res != Z_OK)
{
- LOG_ERROR("server", "Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res));
+ LOG_ERROR("entities.object", "Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
@@ -60,14 +60,14 @@ void UpdateData::Compress(void* dst, uint32* dst_size, void* src, int src_size)
z_res = deflate(&c_stream, Z_NO_FLUSH);
if (z_res != Z_OK)
{
- LOG_ERROR("server", "Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res));
+ LOG_ERROR("entities.object", "Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
if (c_stream.avail_in != 0)
{
- LOG_ERROR("server", "Can't compress update packet (zlib: deflate not greedy)");
+ LOG_ERROR("entities.object", "Can't compress update packet (zlib: deflate not greedy)");
*dst_size = 0;
return;
}
@@ -75,7 +75,7 @@ void UpdateData::Compress(void* dst, uint32* dst_size, void* src, int src_size)
z_res = deflate(&c_stream, Z_FINISH);
if (z_res != Z_STREAM_END)
{
- LOG_ERROR("server", "Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res));
+ LOG_ERROR("entities.object", "Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
@@ -83,7 +83,7 @@ void UpdateData::Compress(void* dst, uint32* dst_size, void* src, int src_size)
z_res = deflateEnd(&c_stream);
if (z_res != Z_OK)
{
- LOG_ERROR("server", "Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res));
+ LOG_ERROR("entities.object", "Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res));
*dst_size = 0;
return;
}
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index cbc8660529..8972052fd0 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -119,7 +119,7 @@ SpellCastResult Pet::TryLoadFromDB(Player* owner, bool current /*= false*/, PetT
CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(petentry);
if (!creatureInfo)
{
- LOG_ERROR("server", "Pet entry %u does not exist but used at pet load (owner: %s).", petentry, owner->GetName().c_str());
+ LOG_ERROR("entities.pet", "Pet entry %u does not exist but used at pet load (owner: %s).", petentry, owner->GetName().c_str());
return SPELL_FAILED_NO_PET;
}
@@ -395,7 +395,7 @@ void Pet::Update(uint32 diff)
{
if (owner->GetPetGUID() != GetGUID())
{
- LOG_ERROR("server", "Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName().c_str());
+ LOG_ERROR("entities.pet", "Pet %u is not pet of owner %s, removed", GetEntry(), m_owner->GetName().c_str());
Remove(getPetType() == HUNTER_PET ? PET_SAVE_AS_DELETED : PET_SAVE_NOT_IN_SLOT);
return;
}
@@ -646,7 +646,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
if (!IsPositionValid())
{
- LOG_ERROR("server", "Pet %s not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
+ LOG_ERROR("entities.pet", "Pet %s not created base at creature. Suggested coordinates isn't valid (X: %f Y: %f)",
GetGUID().ToString().c_str(), GetPositionX(), GetPositionY());
return false;
}
@@ -654,7 +654,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
CreatureTemplate const* cinfo = GetCreatureTemplate();
if (!cinfo)
{
- LOG_ERROR("server", "CreateBaseAtCreature() failed, creatureInfo is missing!");
+ LOG_ERROR("entities.pet", "CreateBaseAtCreature() failed, creatureInfo is missing!");
return false;
}
@@ -683,9 +683,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner)
bool Pet::CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.pet", "Pet::CreateBaseForTamed");
-#endif
ObjectGuid::LowType guid = map->GenerateLowGuid<HighGuid::Pet>();
uint32 pet_number = sObjectMgr->GeneratePetNumber();
if (!Create(guid, map, phaseMask, cinfo->Entry, pet_number))
@@ -750,7 +748,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
if (petType == HUNTER_PET)
m_unitTypeMask |= UNIT_MASK_HUNTER_PET;
else if (petType != SUMMON_PET)
- LOG_ERROR("server", "Unknown type pet %u is summoned by player class %u", GetEntry(), owner->getClass());
+ LOG_ERROR("entities.pet", "Unknown type pet %u is summoned by player class %u", GetEntry(), owner->getClass());
}
}
@@ -1143,7 +1141,7 @@ void Pet::_LoadSpellCooldowns(PreparedQueryResult result)
if (!sSpellMgr->GetSpellInfo(spell_id))
{
- LOG_ERROR("server", "Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.", m_charmInfo->GetPetNumber(), spell_id);
+ LOG_ERROR("entities.pet", "Pet %u have unknown spell %u in `pet_spell_cooldown`, skipping.", m_charmInfo->GetPetNumber(), spell_id);
continue;
}
@@ -1155,9 +1153,7 @@ void Pet::_LoadSpellCooldowns(PreparedQueryResult result)
cooldowns[spell_id] = cooldown;
_AddCreatureSpellCooldown(spell_id, cooldown);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.pet", "Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time - curTime));
-#endif
} while (result->NextRow());
if (!cooldowns.empty() && GetOwner())
@@ -1261,9 +1257,7 @@ void Pet::_SaveSpells(SQLTransaction& trans)
void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.pet", "Loading auras for pet %s", GetGUID().ToString().c_str());
-#endif
if (result)
{
@@ -1293,7 +1287,7 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
if (!spellInfo)
{
- LOG_ERROR("server", "Unknown aura (spellid %u), ignore.", spellid);
+ LOG_ERROR("entities.pet", "Unknown aura (spellid %u), ignore.", spellid);
continue;
}
@@ -1333,9 +1327,7 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff)
}
aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, &damage[0]);
aura->ApplyForTargets();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
-#endif
+ LOG_DEBUG("entities.pet", "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
}
} while (result->NextRow());
}
@@ -1432,7 +1424,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel
// do pet spell book cleanup
if (state == PETSPELL_UNCHANGED) // spell load case
{
- LOG_ERROR("server", "Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.", spellId);
+ 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);
@@ -1441,7 +1433,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel
CharacterDatabase.Execute(stmt);
}
else
- LOG_ERROR("server", "Pet::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
+ LOG_ERROR("entities.pet", "Pet::addSpell: Non-existed in SpellStore spell #%u request.", spellId);
return false;
}
@@ -2189,7 +2181,7 @@ void Pet::HandleAsynchLoadFailed(AsynchPetSummon* info, Player* player, uint8 as
uint32 pet_number = sObjectMgr->GeneratePetNumber();
if (!pet->Create(map->GenerateLowGuid<HighGuid::Pet>(), map, player->GetPhaseMask(), info->m_entry, pet_number))
{
- LOG_ERROR("server", "no such creature entry %u", info->m_entry);
+ LOG_ERROR("entities.pet", "no such creature entry %u", info->m_entry);
delete pet;
return;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index e51b1e1452..a84db68cfd 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1056,7 +1056,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(createInfo->Race, createInfo->Class);
if (!info)
{
- LOG_ERROR("server", "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.",
+ 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;
}
@@ -1069,7 +1069,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(createInfo->Class);
if (!cEntry)
{
- LOG_ERROR("server", "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?)",
+ 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;
}
@@ -1087,7 +1087,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
if (!IsValidGender(createInfo->Gender))
{
- LOG_ERROR("server", "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid gender (%u) - refusing to do so",
+ 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;
}
@@ -1274,9 +1274,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: Creating initial item, itemId = %u, count = %u", titem_id, titem_amount);
-#endif
// attempt equip by one
while (titem_amount > 0)
@@ -1305,7 +1303,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
}
// item can't be added
- LOG_ERROR("server", "STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(true), getClass(), msg);
+ LOG_ERROR("entities.player", "STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id, getRace(true), getClass(), msg);
return false;
}
@@ -1372,9 +1370,7 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
{
if (type == DAMAGE_FALL) // DealDamage not apply item durability loss at self damage
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "We are fall to death, loosing 10 percents durability");
-#endif
+ LOG_DEBUG("entities.player", "We are fall to death, loosing 10 percents durability");
DurabilityLossAll(0.10f, false);
// durability lost message
WorldPacket data2(SMSG_DURABILITY_DAMAGE_DEATH, 0);
@@ -1975,7 +1971,7 @@ void Player::setDeathState(DeathState s, bool /*despawn = false*/)
{
if (!cur)
{
- LOG_ERROR("server", "setDeathState: attempt to kill a dead player %s (%s)", GetName().c_str(), GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "setDeathState: attempt to kill a dead player %s (%s)", GetName().c_str(), GetGUID().ToString().c_str());
return;
}
@@ -2060,12 +2056,12 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(plrRace, plrClass);
if (!info)
{
- LOG_ERROR("server", "Player %s has incorrect race/class pair. Don't build enum.", guid.ToString().c_str());
+ LOG_ERROR("entities.player", "Player %s has incorrect race/class pair. Don't build enum.", guid.ToString().c_str());
return false;
}
else if (!IsValidGender(gender))
{
- LOG_ERROR("server", "Player (%s) has incorrect gender (%u), don't build enum.", guid.ToString().c_str(), gender);
+ LOG_ERROR("entities.player", "Player (%s) has incorrect gender (%u), don't build enum.", guid.ToString().c_str(), gender);
return false;
}
@@ -2242,14 +2238,14 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (!MapManager::IsValidMapCoord(mapid, x, y, z, orientation))
{
- LOG_ERROR("server", "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (%s, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
+ LOG_ERROR("entities.player", "TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (%s, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
mapid, x, y, z, orientation, GetGUID().ToString().c_str(), GetName().c_str(), GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
return false;
}
if (AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, mapid, this))
{
- LOG_ERROR("server", "Player (%s, name: %s) tried to enter a forbidden map %u", GetGUID().ToString().c_str(), GetName().c_str(), mapid);
+ LOG_ERROR("entities.player", "Player (%s, name: %s) tried to enter a forbidden map %u", GetGUID().ToString().c_str(), GetName().c_str(), mapid);
SendTransferAborted(mapid, TRANSFER_ABORT_MAP_NOT_ALLOWED);
return false;
}
@@ -2273,9 +2269,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// client without expansion support
if (GetSession()->Expansion() < mEntry->Expansion())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "Player %s using client without required expansion tried teleport to non accessible map %u", GetName().c_str(), mapid);
-#endif
if (GetTransport())
{
@@ -2291,9 +2285,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
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "Player %s is being teleported to map %u", GetName().c_str(), mapid);
-#endif
// xinef: do this here in case teleport failed in above checks
if (!(options & TELE_TO_NOT_LEAVE_TAXI) && IsInFlight())
@@ -2643,7 +2635,7 @@ void Player::RemoveFromWorld()
{
if (WorldObject* viewpoint = GetViewpoint())
{
- LOG_FATAL("server", "Player %s has viewpoint %u %u when removed from world", GetName().c_str(), viewpoint->GetEntry(), viewpoint->GetTypeId());
+ LOG_FATAL("entities.player", "Player %s has viewpoint %u %u when removed from world", GetName().c_str(), viewpoint->GetEntry(), viewpoint->GetTypeId());
SetViewpoint(viewpoint, false);
}
}
@@ -3022,10 +3014,8 @@ GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTy
if (go->IsWithinDistInMap(this, go->GetInteractionDistance()))
return go;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "IsGameObjectOfTypeInRange: GameObject '%s' [%s] is too far away from player %s [%s] to be used by him (distance=%f, maximal 10 is allowed)",
go->GetGOInfo()->name.c_str(), go->GetGUID().ToString().c_str(), GetName().c_str(), GetGUID().ToString().c_str(), go->GetDistance(this));
-#endif
}
}
return nullptr;
@@ -3998,7 +3988,7 @@ bool Player::_addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool l
{
if (spellInfo->Effects[i].Effect != SPELL_EFFECT_LEARN_SPELL)
{
- LOG_INFO("server", "TRYING TO LEARN SPELL WITH EFFECT LEARN: %u, PLAYER: %s", spellId, GetGUID().ToString().c_str());
+ LOG_INFO("entities.player", "TRYING TO LEARN SPELL WITH EFFECT LEARN: %u, PLAYER: %s", spellId, GetGUID().ToString().c_str());
return false;
//ABORT();
}
@@ -4050,7 +4040,7 @@ bool Player::_addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool l
// xinef: do not add spells with effect learn spell
if (spellInfo->HasEffect(SPELL_EFFECT_LEARN_SPELL))
{
- LOG_INFO("server", "TRYING TO LEARN SPELL WITH EFFECT LEARN 2: %u, PLAYER: %s", spellId, GetGUID().ToString().c_str());
+ LOG_INFO("entities.player", "TRYING TO LEARN SPELL WITH EFFECT LEARN 2: %u, PLAYER: %s", spellId, GetGUID().ToString().c_str());
m_spells.erase(spellInfo->Id); // mem leak, but should never happen
return false;
//ABORT();
@@ -4168,7 +4158,7 @@ void Player::learnSpell(uint32 spellId)
// Xinef: don't allow to learn active spell once more
if (HasActiveSpell(spellId))
{
- LOG_ERROR("server", "Player (%s) tries to learn already active spell: %u", GetGUID().ToString().c_str(), spellId);
+ LOG_ERROR("entities.player", "Player (%s) tries to learn already active spell: %u", GetGUID().ToString().c_str(), spellId);
return;
}
@@ -4476,7 +4466,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result)
if (!sSpellMgr->GetSpellInfo(spell_id))
{
- LOG_ERROR("server", "Player %s has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUID().ToString().c_str(), spell_id);
+ LOG_ERROR("entities.player", "Player %s has unknown spell %u in `character_spell_cooldown`, skipping.", GetGUID().ToString().c_str(), spell_id);
continue;
}
@@ -4486,9 +4476,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result)
AddSpellCooldown(spell_id, item_id, (db_time - curTime)*IN_MILLISECONDS, needSend);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player (%s) spell %u, item %u cooldown loaded (%u secs).", GetGUID().ToString().c_str(), spell_id, item_id, uint32(db_time - curTime));
-#endif
} while (result->NextRow());
}
}
@@ -5177,7 +5165,7 @@ void Player::DeleteFromDB(ObjectGuid::LowType lowGuid, uint32 accountId, bool up
break;
}
default:
- LOG_ERROR("server", "Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
+ LOG_ERROR("entities.player", "Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
return;
}
@@ -5202,8 +5190,8 @@ void Player::DeleteOldCharacters()
*/
void Player::DeleteOldCharacters(uint32 keepDays)
{
- LOG_INFO("server", "Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
+ LOG_INFO("server.loading", " ");
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_OLD_CHARS);
stmt->setUInt32(0, uint32(time(nullptr) - time_t(keepDays * DAY)));
@@ -5211,7 +5199,7 @@ void Player::DeleteOldCharacters(uint32 keepDays)
if (result)
{
- LOG_INFO("server", "Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount());
+ LOG_INFO("server.loading", "Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete", result->GetRowCount());
do
{
Field* fields = result->Fetch();
@@ -5238,7 +5226,7 @@ void Player::SetMovement(PlayerMovementType pType)
data.Initialize(SMSG_MOVE_LAND_WALK, GetPackGUID().size() + 4);
break;
default:
- LOG_ERROR("server", "Player::SetMovement: Unsupported move type (%d), data not sent to client.", pType);
+ LOG_ERROR("entities.player", "Player::SetMovement: Unsupported move type (%d), data not sent to client.", pType);
return;
}
data << GetPackGUID();
@@ -5268,7 +5256,7 @@ void Player::BuildPlayerRepop()
WorldLocation corpseLocation = GetCorpseLocation();
if (corpseLocation.GetMapId() == GetMapId())
{
- LOG_ERROR("server", "BuildPlayerRepop: player %s (%s) already has a corpse", GetName().c_str(), GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "BuildPlayerRepop: player %s (%s) already has a corpse", GetName().c_str(), GetGUID().ToString().c_str());
return;
}
@@ -5276,7 +5264,7 @@ void Player::BuildPlayerRepop()
Corpse* corpse = CreateCorpse();
if (!corpse)
{
- LOG_ERROR("server", "Error creating corpse for Player %s [%s]", GetName().c_str(), GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Error creating corpse for Player %s [%s]", GetName().c_str(), GetGUID().ToString().c_str());
return;
}
GetMap()->AddToMap(corpse);
@@ -5680,7 +5668,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityCostsEntry const* dcost = sDurabilityCostsStore.LookupEntry(ditemProto->ItemLevel);
if (!dcost)
{
- LOG_ERROR("server", "RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
+ LOG_ERROR("entities.player", "RepairDurability: Wrong item lvl %u", ditemProto->ItemLevel);
return TotalCost;
}
@@ -5688,7 +5676,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
DurabilityQualityEntry const* dQualitymodEntry = sDurabilityQualityStore.LookupEntry(dQualitymodEntryId);
if (!dQualitymodEntry)
{
- LOG_ERROR("server", "RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
+ LOG_ERROR("entities.player", "RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
return TotalCost;
}
@@ -5704,9 +5692,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
{
if (GetGuildId() == 0)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "You are not member of a guild");
-#endif
+ // LOG_DEBUG("entities.player", "You are not member of a guild");
return TotalCost;
}
@@ -5721,9 +5707,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g
}
else if (!HasEnoughMoney(costs))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "You do not have enough money");
-#endif
+ // LOG_DEBUG("entities.player", "You do not have enough money");
return TotalCost;
}
else
@@ -5935,7 +5919,7 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa
{
if (modGroup >= BASEMOD_END)
{
- LOG_ERROR("server", "ERROR in HandleBaseModValue(): non existed BaseModGroup!");
+ LOG_ERROR("entities.player", "ERROR in HandleBaseModValue(): non existed BaseModGroup!");
return;
}
@@ -5975,7 +5959,7 @@ float Player::GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
{
if (modGroup >= BASEMOD_END)
{
- LOG_ERROR("server", "trial to access non existed BaseModGroup!");
+ LOG_ERROR("entities.player", "trial to access non existed BaseModGroup!");
return 0.0f;
}
@@ -5989,7 +5973,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
{
if (modGroup >= BASEMOD_END)
{
- LOG_ERROR("server", "wrong BaseModGroup in GetTotalBaseModValue()!");
+ LOG_ERROR("entities.player", "wrong BaseModGroup in GetTotalBaseModValue()!");
return 0.0f;
}
@@ -6365,9 +6349,7 @@ inline int SkillGainChance(uint32 SkillValue, uint32 GrayLevel, uint32 GreenLeve
bool Player::UpdateCraftSkill(uint32 spellid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.skills", "UpdateCraftSkill spellid %d", spellid);
-#endif
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellid);
@@ -6399,9 +6381,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLevel, uint32 Multiplicator)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.skills", "UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel);
-#endif
uint32 gathering_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_GATHERING);
@@ -6447,9 +6427,7 @@ float getProbabilityOfLevelUp(uint32 SkillValue)
bool Player::UpdateFishingSkill()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.skills", "UpdateFishingSkill");
-#endif
uint32 SkillValue = GetPureSkillValue(SKILL_FISHING);
@@ -6472,17 +6450,13 @@ static const size_t bonusSkillLevelsSize = sizeof(bonusSkillLevels) / sizeof(uin
bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.skills", "UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance / 10.0f);
-#endif
if (!SkillId)
return false;
if (Chance <= 0) // speedup in 0 chance case
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.skills", "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
-#endif
return false;
}
@@ -6522,15 +6496,11 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
}
UpdateSkillEnchantments(SkillId, SkillValue, new_value);
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL, SkillId);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.skills", "Player::UpdateSkillPro Chance=%3.1f%% taken", Chance / 10.0f);
-#endif
return true;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.skills", "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
-#endif
return false;
}
@@ -6760,7 +6730,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(id);
if (!pSkill)
{
- LOG_ERROR("server", "Skill not found in SkillLineStore: skill #%u", id);
+ LOG_ERROR("entities.player", "Skill not found in SkillLineStore: skill #%u", id);
return;
}
@@ -6925,9 +6895,7 @@ int16 Player::GetSkillTempBonusValue(uint32 skill) const
void Player::SendActionButtons(uint32 state) const
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Sending Action Buttons for %s spec %u", GetGUID().ToString().c_str(), m_activeSpec);
-#endif
+ LOG_DEBUG("entities.player", "Sending Action Buttons for %s spec %u", GetGUID().ToString().c_str(), m_activeSpec);
WorldPacket data(SMSG_ACTION_BUTTONS, 1 + (MAX_ACTION_BUTTONS * 4));
data << uint8(state);
@@ -6950,22 +6918,20 @@ void Player::SendActionButtons(uint32 state) const
}
GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Action Buttons for %s spec %u Sent", GetGUID().ToString().c_str(), m_activeSpec);
-#endif
+ LOG_DEBUG("entities.player", "Action Buttons for %s spec %u Sent", GetGUID().ToString().c_str(), m_activeSpec);
}
bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
{
if (button >= MAX_ACTION_BUTTONS)
{
- LOG_ERROR("server", "Action %u not added into button %u for player %s: button must be < %u", action, button, GetName().c_str(), MAX_ACTION_BUTTONS);
+ LOG_ERROR("entities.player", "Action %u not added into button %u for player %s: button must be < %u", action, button, GetName().c_str(), MAX_ACTION_BUTTONS);
return false;
}
if (action >= MAX_ACTION_BUTTON_ACTION_VALUE)
{
- LOG_ERROR("server", "Action %u not added into button %u for player %s: action must be < %u", action, button, GetName().c_str(), MAX_ACTION_BUTTON_ACTION_VALUE);
+ LOG_ERROR("entities.player", "Action %u not added into button %u for player %s: action must be < %u", action, button, GetName().c_str(), MAX_ACTION_BUTTON_ACTION_VALUE);
return false;
}
@@ -6974,22 +6940,20 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
case ACTION_BUTTON_SPELL:
if (!sSpellMgr->GetSpellInfo(action))
{
- LOG_ERROR("server", "Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName().c_str());
+ LOG_ERROR("entities.player", "Spell action %u not added into button %u for player %s: spell not exist", action, button, GetName().c_str());
return false;
}
if (!HasSpell(action))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player::IsActionButtonDataValid Spell action %u not added into button %u for player %s: player don't known this spell", action, button, GetName().c_str());
-#endif
return false;
}
break;
case ACTION_BUTTON_ITEM:
if (!sObjectMgr->GetItemTemplate(action))
{
- LOG_ERROR("server", "Item action %u not added into button %u for player %s: item not exist", action, button, GetName().c_str());
+ LOG_ERROR("entities.player", "Item action %u not added into button %u for player %s: item not exist", action, button, GetName().c_str());
return false;
}
break;
@@ -7011,9 +6975,7 @@ ActionButton* Player::addActionButton(uint8 button, uint32 action, uint8 type)
// set data and update to CHANGED if not NEW
ab.SetActionAndType(action, ActionButtonType(type));
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player %s Added Action %u (type %u) to Button %u", GetGUID().ToString().c_str(), action, type, button);
-#endif
+ LOG_DEBUG("entities.player", "Player %s Added Action %u (type %u) to Button %u", GetGUID().ToString().c_str(), action, type, button);
return &ab;
}
@@ -7028,9 +6990,7 @@ void Player::removeActionButton(uint8 button)
else
buttonItr->second.uState = ACTIONBUTTON_DELETED; // saved, will deleted at next save
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Action Button %u Removed from Player %s", button, GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("entities.player", "Action Button %u Removed from Player %s", button, GetGUID().ToString().c_str());
}
ActionButton const* Player::GetActionButton(uint8 button)
@@ -7136,7 +7096,7 @@ void Player::CheckAreaExploreAndOutdoor()
if (!areaEntry)
{
- LOG_ERROR("server", "Player '%s' (%s) discovered unknown area (x: %f y: %f z: %f map: %u)",
+ LOG_ERROR("entities.player", "Player '%s' (%s) discovered unknown area (x: %f y: %f z: %f map: %u)",
GetName().c_str(), GetGUID().ToString().c_str(), GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId());
return;
}
@@ -7145,9 +7105,7 @@ void Player::CheckAreaExploreAndOutdoor()
if (offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_ERROR("server", "Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < %u ).", areaEntry->flags, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE);
-#endif
+ 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 ).", areaEntry->flags, GetPositionX(), GetPositionY(), offset, offset, PLAYER_EXPLORED_ZONES_SIZE);
return;
}
@@ -7192,9 +7150,7 @@ void Player::CheckAreaExploreAndOutdoor()
GiveXP(XP, nullptr);
SendExplorationExperience(areaId, XP);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player %s discovered a new area: %u", GetGUID().ToString().c_str(), areaId);
-#endif
+ LOG_DEBUG("entities.player", "Player %s discovered a new area: %u", GetGUID().ToString().c_str(), areaId);
}
}
}
@@ -7210,10 +7166,10 @@ TeamId Player::TeamIdForRace(uint8 race)
case 7:
return TEAM_ALLIANCE;
}
- LOG_ERROR("server", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID);
+ LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID);
}
else
- LOG_ERROR("server", "Race (%u) not found in DBC: wrong DBC files?", uint32(race));
+ LOG_ERROR("entities.player", "Race (%u) not found in DBC: wrong DBC files?", uint32(race));
return TEAM_ALLIANCE;
}
@@ -7976,9 +7932,7 @@ void Player::DuelComplete(DuelCompleteType type)
if (!duel || !duel->opponent || !duel->initiator)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Duel Complete %s %s", GetName().c_str(), duel->opponent->GetName().c_str());
-#endif
WorldPacket data(SMSG_DUEL_COMPLETE, (1));
data << (uint8)((type != DUEL_INTERRUPTED) ? 1 : 0);
@@ -8101,9 +8055,7 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
if (item->IsBroken())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "applying mods for item %s ", item->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("entities.player", "applying mods for item %s ", item->GetGUID().ToString().c_str());
uint8 attacktype = Player::GetAttackBySlot(slot);
@@ -8121,9 +8073,7 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply)
ApplyItemEquipSpell(item, apply);
ApplyEnchantment(item, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "_ApplyItemMods complete.");
-#endif
}
void Player::_ApplyItemBonuses(ItemTemplate const* proto, uint8 slot, bool apply, bool only_level_scale /*= false*/)
@@ -8677,9 +8627,7 @@ void Player::ApplyEquipSpell(SpellInfo const* spellInfo, Item* item, bool apply,
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id);
-#endif
+ LOG_DEBUG("entities.player", "WORLD: cast %s Equip spellId - %i", (item ? "item" : "itemset"), spellInfo->Id);
CastSpell(this, spellInfo, true, item);
}
@@ -8812,7 +8760,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown Item spellid %i", spellData.SpellId);
+ LOG_ERROR("entities.player", "WORLD: unknown Item spellid %i", spellData.SpellId);
continue;
}
@@ -8869,7 +8817,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
if (!spellInfo)
{
- LOG_ERROR("server", "Player::CastItemCombatSpell(%s, name: %s, enchant: %i): unknown spell %i is casted, ignoring...",
+ LOG_ERROR("entities.player", "Player::CastItemCombatSpell(%s, name: %s, enchant: %i): unknown spell %i is casted, ignoring...",
GetGUID().ToString().c_str(), GetName().c_str(), pEnchant->ID, pEnchant->spellid[s]);
continue;
}
@@ -8929,7 +8877,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(learn_spell_id);
if (!spellInfo)
{
- LOG_ERROR("server", "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id);
+ LOG_ERROR("entities.player", "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->ItemId, learn_spell_id);
SendEquipError(EQUIP_ERR_NONE, item, nullptr);
return;
}
@@ -8962,7 +8910,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
if (!spellInfo)
{
- LOG_ERROR("server", "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId);
+ LOG_ERROR("entities.player", "Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->ItemId, spellData.SpellId);
continue;
}
@@ -9007,7 +8955,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pEnchant->spellid[s]);
if (!spellInfo)
{
- LOG_ERROR("server", "Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
+ LOG_ERROR("entities.player", "Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->ID, pEnchant->spellid[s]);
continue;
}
@@ -9045,9 +8993,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
void Player::_RemoveAllItemMods()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "_RemoveAllItemMods start.");
-#endif
for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@@ -9090,16 +9036,12 @@ void Player::_RemoveAllItemMods()
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "_RemoveAllItemMods complete.");
-#endif
}
void Player::_ApplyAllItemMods()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "_ApplyAllItemMods start.");
-#endif
for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@@ -9143,9 +9085,7 @@ void Player::_ApplyAllItemMods()
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "_ApplyAllItemMods complete.");
-#endif
}
void Player::_ApplyAllLevelScaleItemMods(bool apply)
@@ -9274,14 +9214,10 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
Loot* loot = 0;
PermissionTypes permission = ALL_PERMISSION;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("loot", "Player::SendLoot");
-#endif
if (guid.IsGameObject())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("loot", "guid.IsGameObject");
-#endif
GameObject* go = GetMap()->GetGameObject(guid);
// not check distance for GO in case owned GO (fishing bobber case, for example)
@@ -9689,9 +9625,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
InstanceScript* instance = GetInstanceScript();
Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(zoneid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid);
-#endif
WorldPacket data(SMSG_INIT_WORLD_STATES, (4 + 4 + 4 + 2 + (12 * 8)));
data << uint32(mapid); // mapid
@@ -10363,9 +10297,7 @@ uint32 Player::GetXPRestBonus(uint32 xp)
SetRestBonus(GetRestBonus() - rested_bonus);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp + rested_bonus, rested_bonus, GetRestBonus());
-#endif
+ LOG_DEBUG("entities.player", "Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp + rested_bonus, rested_bonus, GetRestBonus());
return rested_bonus;
}
@@ -10397,7 +10329,7 @@ void Player::ResetPetTalents()
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- LOG_ERROR("server", "Object (%s) is considered pet-like but doesn't have a charminfo!", pet->GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Object (%s) is considered pet-like but doesn't have a charminfo!", pet->GetGUID().ToString().c_str());
return;
}
pet->resetTalents();
@@ -11459,9 +11391,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
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
-#endif
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(entry);
if (!pProto)
@@ -11951,9 +11881,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
if (!pItem)
continue;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: CanStoreItems %i. item = %u, count = %u", k + 1, pItem->GetEntry(), pItem->GetCount());
-#endif
ItemTemplate const* pProto = pItem->GetTemplate();
// strange item
@@ -12170,9 +12098,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16& dest, Item* pItem, bool
dest = 0;
if (pItem)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount());
-#endif
ItemTemplate const* pProto = pItem->GetTemplate();
if (pProto)
{
@@ -12353,9 +12279,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const
if (!pItem)
return EQUIP_ERR_OK;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount());
-#endif
ItemTemplate const* pProto = pItem->GetTemplate();
if (!pProto)
@@ -12395,9 +12319,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec& dest
uint32 count = pItem->GetCount();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount());
-#endif
ItemTemplate const* pProto = pItem->GetTemplate();
if (!pProto)
return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND;
@@ -12413,7 +12335,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec& dest
uint8 pItemslot = pItem->GetSlot();
if (pItemslot >= CURRENCYTOKEN_SLOT_START && pItemslot < CURRENCYTOKEN_SLOT_END)
{
- LOG_ERROR("server", "Possible hacking attempt: Player %s [%s] tried to move token [%s, entry: %u] out of the currency bag!",
+ LOG_ERROR("entities.player", "Possible hacking attempt: Player %s [%s] tried to move token [%s, entry: %u] out of the currency bag!",
GetName().c_str(), GetGUID().ToString().c_str(), pItem->GetGUID().ToString().c_str(), pProto->ItemId);
return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED;
}
@@ -12581,9 +12503,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const
{
if (pItem)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: CanUseItem item = %u", pItem->GetEntry());
-#endif
if (!IsAlive() && not_loading)
return EQUIP_ERR_YOU_ARE_DEAD;
@@ -12765,9 +12685,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
InventoryResult Player::CanUseAmmo(uint32 item) const
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: CanUseAmmo item = %u", item);
-#endif
if (!IsAlive())
return EQUIP_ERR_YOU_ARE_DEAD;
//if (isStunned())
@@ -12918,9 +12836,7 @@ Item* Player::_StoreItem(uint16 pos, Item* pItem, uint32 count, bool clone, bool
uint8 bag = pos >> 8;
uint8 slot = pos & 255;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, %s", bag, slot, pItem->GetEntry(), count, pItem->GetGUID().ToString().c_str());
-#endif
Item* pItem2 = GetItemByPos(bag, slot);
@@ -13060,7 +12976,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cooldownSpell);
if (!spellProto)
- LOG_ERROR("server", "Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
+ LOG_ERROR("entities.player", "Weapon switch cooldown spell %u couldn't be found in Spell.dbc", cooldownSpell);
else
{
m_weaponChangeTimer = spellProto->StartRecoveryTime;
@@ -13195,9 +13111,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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
-#endif
m_items[slot] = pItem;
SetGuidValue(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID());
@@ -13222,9 +13136,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update, bool swap)
Item* pItem = GetItemByPos(bag, slot);
if (pItem)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
-#endif
RemoveEnchantmentDurations(pItem);
RemoveItemDurations(pItem);
@@ -13335,9 +13247,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
Item* pItem = GetItemByPos(bag, slot);
if (pItem)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
-#endif
// 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())
@@ -13432,9 +13342,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
void Player::DestroyItemCount(uint32 itemEntry, uint32 count, bool update, bool unequip_check)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: DestroyItemCount item = %u, count = %u", itemEntry, count);
-#endif
uint32 remcount = 0;
// in inventory
@@ -13625,9 +13533,7 @@ void Player::DestroyItemCount(uint32 itemEntry, uint32 count, bool update, bool
void Player::DestroyZoneLimitedItem(bool update, uint32 new_zone)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone);
-#endif
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
@@ -13659,9 +13565,7 @@ void Player::DestroyConjuredItems(bool update)
{
// used when entering arena
// destroys all conjured items
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: DestroyConjuredItems");
-#endif
// in inventory
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
@@ -13717,9 +13621,7 @@ void Player::DestroyItemCount(Item* pItem, uint32& count, bool update)
if (!pItem)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: DestroyItemCount item (%s, Entry: %u) count = %u", pItem->GetGUID().ToString().c_str(), pItem->GetEntry(), count);
-#endif
if (pItem->GetCount() <= count)
{
@@ -13782,9 +13684,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
-#endif
Item* pNewItem = pSrcItem->CloneItem(count, this);
if (!pNewItem)
{
@@ -13869,9 +13769,7 @@ void Player::SwapItem(uint16 src, uint16 dst)
if (!pSrcItem)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
-#endif
if (!IsAlive())
{
@@ -14262,9 +14160,7 @@ void Player::AddItemToBuyBackSlot(Item* pItem)
}
RemoveItemFromBuyBackSlot(slot, true);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot);
-#endif
m_items[slot] = pItem;
time_t base = time(nullptr);
@@ -14286,9 +14182,7 @@ void Player::AddItemToBuyBackSlot(Item* pItem)
Item* Player::GetItemFromBuyBackSlot(uint32 slot)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: GetItemFromBuyBackSlot slot = %u", slot);
-#endif
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
return m_items[slot];
return nullptr;
@@ -14296,9 +14190,7 @@ Item* Player::GetItemFromBuyBackSlot(uint32 slot)
void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot);
-#endif
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
{
Item* pItem = m_items[slot];
@@ -14324,9 +14216,7 @@ void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del)
void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint32 itemid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
-#endif
WorldPacket data(SMSG_INVENTORY_CHANGE_FAILURE, (msg == EQUIP_ERR_CANT_EQUIP_LEVEL_I ? 22 : 18));
data << uint8(msg);
@@ -14369,9 +14259,7 @@ void Player::SendEquipError(InventoryResult msg, Item* pItem, Item* pItem2, uint
void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32 param)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_BUY_FAILED");
-#endif
WorldPacket data(SMSG_BUY_FAILED, (8 + 4 + 4 + 1));
data << (creature ? creature->GetGUID() : ObjectGuid::Empty);
data << uint32(item);
@@ -14383,9 +14271,7 @@ void Player::SendBuyError(BuyResult msg, Creature* creature, uint32 item, uint32
void Player::SendSellError(SellResult msg, Creature* creature, ObjectGuid guid, uint32 param)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_SELL_ITEM");
-#endif
WorldPacket data(SMSG_SELL_ITEM, (8 + 8 + (param ? 4 : 0) + 1)); // last check 2.0.10
data << (creature ? creature->GetGUID() : ObjectGuid::Empty);
data << guid;
@@ -14457,9 +14343,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
if (m_itemDuration.empty())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Player::UpdateItemDuration(%u, %u)", time, realtimeonly);
-#endif
for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end();)
{
@@ -14745,117 +14629,81 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Adding %u to stat nb %u", enchant_amount, enchant_spell_id);
-#endif
switch (enchant_spell_id)
{
case ITEM_MOD_MANA:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u MANA", enchant_amount);
-#endif
HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_HEALTH:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u HEALTH", enchant_amount);
-#endif
HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_AGILITY:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u AGILITY", enchant_amount);
-#endif
HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_AGILITY, (float)enchant_amount, apply);
break;
case ITEM_MOD_STRENGTH:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u STRENGTH", enchant_amount);
-#endif
HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_STRENGTH, (float)enchant_amount, apply);
break;
case ITEM_MOD_INTELLECT:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u INTELLECT", enchant_amount);
-#endif
HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_INTELLECT, (float)enchant_amount, apply);
break;
case ITEM_MOD_SPIRIT:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u SPIRIT", enchant_amount);
-#endif
HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_SPIRIT, (float)enchant_amount, apply);
break;
case ITEM_MOD_STAMINA:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u STAMINA", enchant_amount);
-#endif
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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u DEFENCE", enchant_amount);
-#endif
break;
case ITEM_MOD_DODGE_RATING:
ApplyRatingMod(CR_DODGE, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u DODGE", enchant_amount);
-#endif
break;
case ITEM_MOD_PARRY_RATING:
ApplyRatingMod(CR_PARRY, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u PARRY", enchant_amount);
-#endif
break;
case ITEM_MOD_BLOCK_RATING:
ApplyRatingMod(CR_BLOCK, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u SHIELD_BLOCK", enchant_amount);
-#endif
break;
case ITEM_MOD_HIT_MELEE_RATING:
ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u MELEE_HIT", enchant_amount);
-#endif
break;
case ITEM_MOD_HIT_RANGED_RATING:
ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u RANGED_HIT", enchant_amount);
-#endif
break;
case ITEM_MOD_HIT_SPELL_RATING:
ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u SPELL_HIT", enchant_amount);
-#endif
break;
case ITEM_MOD_CRIT_MELEE_RATING:
ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u MELEE_CRIT", enchant_amount);
-#endif
break;
case ITEM_MOD_CRIT_RANGED_RATING:
ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u RANGED_CRIT", enchant_amount);
-#endif
break;
case ITEM_MOD_CRIT_SPELL_RATING:
ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u SPELL_CRIT", enchant_amount);
-#endif
break;
// Values from ITEM_STAT_MELEE_HA_RATING to ITEM_MOD_HASTE_RANGED_RATING are never used
// in Enchantments
@@ -14890,17 +14738,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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u HIT", enchant_amount);
-#endif
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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u CRITICAL", enchant_amount);
-#endif
break;
// Values ITEM_MOD_HIT_TAKEN_RATING and ITEM_MOD_CRIT_TAKEN_RATING are never used in Enchantment
// case ITEM_MOD_HIT_TAKEN_RATING:
@@ -14917,78 +14761,54 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
ApplyRatingMod(CR_CRIT_TAKEN_MELEE, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_TAKEN_RANGED, enchant_amount, apply);
ApplyRatingMod(CR_CRIT_TAKEN_SPELL, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u RESILIENCE", enchant_amount);
-#endif
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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u HASTE", enchant_amount);
-#endif
break;
case ITEM_MOD_EXPERTISE_RATING:
ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u EXPERTISE", enchant_amount);
-#endif
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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u ATTACK_POWER", enchant_amount);
-#endif
break;
case ITEM_MOD_RANGED_ATTACK_POWER:
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u RANGED_ATTACK_POWER", enchant_amount);
-#endif
break;
// case ITEM_MOD_FERAL_ATTACK_POWER:
// ApplyFeralAPBonus(enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
// LOG_DEBUG("entities.player.items", "+ %u FERAL_ATTACK_POWER", enchant_amount);
-#endif
// break;
case ITEM_MOD_MANA_REGENERATION:
ApplyManaRegenBonus(enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u MANA_REGENERATION", enchant_amount);
-#endif
break;
case ITEM_MOD_ARMOR_PENETRATION_RATING:
ApplyRatingMod(CR_ARMOR_PENETRATION, enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u ARMOR PENETRATION", enchant_amount);
-#endif
break;
case ITEM_MOD_SPELL_POWER:
ApplySpellPowerBonus(enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u SPELL_POWER", enchant_amount);
-#endif
break;
case ITEM_MOD_HEALTH_REGEN:
ApplyHealthRegenBonus(enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u HEALTH_REGENERATION", enchant_amount);
-#endif
break;
case ITEM_MOD_SPELL_PENETRATION:
ApplySpellPenetrationBonus(enchant_amount, apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u SPELL_PENETRATION", enchant_amount);
-#endif
break;
case ITEM_MOD_BLOCK_VALUE:
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "+ %u BLOCK_VALUE", enchant_amount);
-#endif
break;
case ITEM_MOD_SPELL_HEALING_DONE: // deprecated
case ITEM_MOD_SPELL_DAMAGE_DONE: // deprecated
@@ -15022,7 +14842,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
// nothing do..
break;
default:
- LOG_ERROR("server", "Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type);
+ LOG_ERROR("entities.player", "Unknown item enchantment (id = %d) display type: %d", enchant_id, enchant_display_type);
break;
} /*switch (enchant_display_type)*/
} /*for*/
@@ -15390,7 +15210,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
{
if (gossipOptionId > GOSSIP_OPTION_QUESTGIVER)
{
- LOG_ERROR("server", "Player guid %s request invalid gossip option for GameObject entry %u", GetGUID().ToString().c_str(), source->GetEntry());
+ LOG_ERROR("entities.player", "Player guid %s request invalid gossip option for GameObject entry %u", GetGUID().ToString().c_str(), source->GetEntry());
return;
}
}
@@ -15495,7 +15315,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
if (bgTypeId == BATTLEGROUND_TYPE_NONE)
{
- LOG_ERROR("server", "A user (%s) requested battlegroundlist from a npc who is no battlemaster", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "A user (%s) requested battlegroundlist from a npc who is no battlemaster", GetGUID().ToString().c_str());
return;
}
@@ -16495,9 +16315,7 @@ bool Player::SatisfyQuestLog(bool msg)
{
WorldPacket data(SMSG_QUESTLOG_FULL, 0);
GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTLOG_FULL");
-#endif
}
return false;
}
@@ -16669,9 +16487,7 @@ bool Player::SatisfyQuestConditions(Quest const* qInfo, bool msg)
{
if (msg)
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId());
-#endif
return false;
}
return true;
@@ -17756,18 +17572,14 @@ void Player::SendQuestComplete(uint32 quest_id)
WorldPacket data(SMSG_QUESTUPDATE_COMPLETE, 4);
data << uint32(quest_id);
GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id);
-#endif
}
}
void Player::SendQuestReward(Quest const* quest, uint32 XP)
{
uint32 questid = quest->GetQuestId();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid);
-#endif
sGameEventMgr->HandleQuestComplete(questid);
WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4 + 4 + 4 + 4 + 4));
data << uint32(questid);
@@ -17797,9 +17609,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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
-#endif
}
}
@@ -17810,9 +17620,7 @@ void Player::SendQuestTimerFailed(uint32 quest_id)
WorldPacket data(SMSG_QUESTUPDATE_FAILEDTIMER, 4);
data << uint32(quest_id);
GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
-#endif
}
}
@@ -17821,9 +17629,7 @@ void Player::SendCanTakeQuestResponse(uint32 msg) const
WorldPacket data(SMSG_QUESTGIVER_QUEST_INVALID, 4);
data << uint32(msg);
GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
-#endif
}
void Player::SendQuestConfirmAccept(const Quest* quest, Player* pReceiver)
@@ -17844,9 +17650,7 @@ void Player::SendQuestConfirmAccept(const Quest* quest, Player* pReceiver)
data << GetGUID();
pReceiver->GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
-#endif
}
}
@@ -17858,18 +17662,14 @@ void Player::SendPushToPartyResponse(Player const* player, uint8 msg) const
data << player->GetGUID();
data << uint8(msg); // valid values: 0-8
GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent MSG_QUEST_PUSH_RESULT");
-#endif
}
}
void Player::SendQuestUpdateAddItem(Quest const* /*quest*/, uint32 /*item_idx*/, uint16 /*count*/)
{
WorldPacket data(SMSG_QUESTUPDATE_ADD_ITEM, 0);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM");
-#endif
//data << quest->RequiredItemId[item_idx];
//data << count;
GetSession()->SendPacket(&data);
@@ -17885,9 +17685,7 @@ void Player::SendQuestUpdateAddCreatureOrGo(Quest const* quest, ObjectGuid guid,
entry = (-entry) | 0x80000000;
WorldPacket data(SMSG_QUESTUPDATE_ADD_KILL, (4 * 4 + 8));
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL");
-#endif
data << uint32(quest->GetQuestId());
data << uint32(entry);
data << uint32(old_count + add_count);
@@ -17905,9 +17703,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));
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_QUESTUPDATE_ADD_PVP_KILL");
-#endif
data << uint32(quest->GetQuestId());
data << uint32(old_count + add_count);
data << uint32(quest->GetPlayersSlain());
@@ -18120,7 +17916,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
if (!result)
{
- LOG_ERROR("server", "Player (%s) not found in table `characters`, can't load. ", playerGuid.ToString().c_str());
+ LOG_ERROR("entities.player", "Player (%s) not found in table `characters`, can't load. ", playerGuid.ToString().c_str());
return false;
}
@@ -18132,13 +17928,13 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
// player should be able to load/delete character only with correct account!
if (dbAccountId != GetSession()->GetAccountId())
{
- LOG_ERROR("server", "Player (%s) loading from wrong account (is: %u, should be: %u)", playerGuid.ToString().c_str(), GetSession()->GetAccountId(), dbAccountId);
+ LOG_ERROR("entities.player", "Player (%s) loading from wrong account (is: %u, should be: %u)", playerGuid.ToString().c_str(), GetSession()->GetAccountId(), dbAccountId);
return false;
}
if (holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BANNED))
{
- LOG_ERROR("server", "Player (%s) is banned, can't load.", playerGuid.ToString().c_str());
+ LOG_ERROR("entities.player", "Player (%s) is banned, can't load.", playerGuid.ToString().c_str());
return false;
}
@@ -18162,7 +17958,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
uint8 Gender = fields[5].GetUInt8();
if (!IsValidGender(Gender))
{
- LOG_ERROR("server", "Player (GUID: %u) has wrong gender (%u), can't be loaded.", guid, Gender);
+ LOG_ERROR("entities.player", "Player (GUID: %u) has wrong gender (%u), can't be loaded.", guid, Gender);
return false;
}
@@ -18224,9 +18020,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
m_items[slot] = nullptr;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Load Basic value of player %s is: ", m_name.c_str());
-#endif
outDebugValues();
//Need to call it to initialize m_team (m_team can be calculated from race)
@@ -18304,7 +18098,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
if (!mapEntry || !IsPositionValid())
{
- LOG_ERROR("server", "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());
+ 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
@@ -18421,9 +18215,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
{
if (GetSession()->Expansion() < mapEntry->Expansion())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player %s using client without required expansion tried login at non accessible map %u", GetName().c_str(), mapId);
-#endif
RelocateToHomebind();
}
@@ -18457,13 +18249,13 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
AreaTriggerTeleport const* at = sObjectMgr->GetGoBackTrigger(mapId);
if (at)
{
- LOG_ERROR("server", "Player (guidlow %d) is teleported to gobacktrigger (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
+ 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
{
- LOG_ERROR("server", "Player (guidlow %d) is teleported to home (Map: %u X: %f Y: %f Z: %f O: %f).", guid, mapId, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
+ 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();
}
@@ -18473,11 +18265,11 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(true), getClass());
mapId = info->mapId;
Relocate(info->positionX, info->positionY, info->positionZ, 0.0f);
- LOG_ERROR("server", "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());
+ 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)
{
- LOG_ERROR("server", "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());
+ 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;
}
}
@@ -18520,7 +18312,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
m_stableSlots = fields[37].GetUInt8();
if (m_stableSlots > MAX_PET_STABLES)
{
- LOG_ERROR("server", "Player can have not more %u stable slots, but have in DB %u", MAX_PET_STABLES, uint32(m_stableSlots));
+ 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;
}
@@ -18528,7 +18320,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
if (HasAtLoginFlag(AT_LOGIN_RENAME))
{
- LOG_ERROR("server", "Player %s tried to login while forced to rename, can't load.'", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Player %s tried to login while forced to rename, can't load.'", GetGUID().ToString().c_str());
return false;
}
@@ -18681,9 +18473,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, SQLQueryHolder* holder)
SetPower(Powers(i), savedPower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedPower);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "The value of player %s after load item and aura is: ", m_name.c_str());
-#endif
outDebugValues();
// GM state
@@ -18863,9 +18653,7 @@ void Player::_LoadActions(PreparedQueryResult result)
ab->uState = ACTIONBUTTON_UNCHANGED;
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_ERROR("server", "ActionButton loading problem, will be deleted from db...");
-#endif
+ LOG_ERROR("entities.player", "ActionButton loading problem, will be deleted from db...");
// Will deleted in DB at next save (it can create data until save but marked as deleted)
m_actionButtons[button].uState = ACTIONBUTTON_DELETED;
@@ -18876,9 +18664,7 @@ void Player::_LoadActions(PreparedQueryResult result)
void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Loading auras for player %s", GetGUID().ToString().c_str());
-#endif
/* 0 1 2 3 4 5 6 7 8 9 10
QueryResult* result = CharacterDatabase.PQuery("SELECT casterGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2,
@@ -18911,7 +18697,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
if (!spellInfo)
{
- LOG_ERROR("server", "Unknown aura (spellid %u), ignore.", spellid);
+ LOG_ERROR("entities.player", "Unknown aura (spellid %u), ignore.", spellid);
continue;
}
@@ -18952,9 +18738,7 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff)
aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, &damage[0]);
aura->ApplyForTargets();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
-#endif
+ LOG_DEBUG("entities.player", "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask);
}
} while (result->NextRow());
}
@@ -18978,13 +18762,13 @@ void Player::_LoadGlyphAuras()
continue;
}
else
- LOG_ERROR("server", "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), glyphEntry->TypeFlags, glyphSlotEntry->TypeFlags);
+ LOG_ERROR("entities.player", "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), glyphEntry->TypeFlags, glyphSlotEntry->TypeFlags);
}
else
- LOG_ERROR("server", "Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i);
+ LOG_ERROR("entities.player", "Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i);
}
else
- LOG_ERROR("server", "Player %s has not existing glyph entry %u on index %u", m_name.c_str(), glyph, i);
+ 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, true);
@@ -19102,7 +18886,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
}
else
{
- LOG_ERROR("server", "Player::_LoadInventory: player (%s, name: '%s') has item (%s, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?",
+ LOG_ERROR("entities.player", "Player::_LoadInventory: player (%s, name: '%s') has item (%s, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?",
GetGUID().ToString().c_str(), GetName().c_str(), item->GetGUID().ToString().c_str(), item->GetEntry(), bagGuid, slot);
item->DeleteFromInventoryDB(trans);
delete item;
@@ -19115,7 +18899,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
item->SetState(ITEM_UNCHANGED, this);
else
{
- LOG_ERROR("server", "Player::_LoadInventory: player (%s, name: '%s') has item (%s, entry: %u) which can't be loaded into inventory (Bag GUID: %u, slot: %u) by reason %u. Item will be sent by mail.",
+ LOG_ERROR("entities.player", "Player::_LoadInventory: player (%s, name: '%s') has item (%s, entry: %u) which can't be loaded into inventory (Bag GUID: %u, slot: %u) by reason %u. Item will be sent by mail.",
GetGUID().ToString().c_str(), GetName().c_str(), item->GetGUID().ToString().c_str(), item->GetEntry(), bagGuid, slot, err);
item->DeleteFromInventoryDB(trans);
problematicItems.push_back(item);
@@ -19160,29 +18944,23 @@ 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))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (%s, name: '%s', map: %u) has item (%s, entry: %u) limited to another map (%u). Deleting item.",
GetGUID().ToString().c_str(), GetName().c_str(), GetMapId(), item->GetGUID().ToString().c_str(), item->GetEntry(), zoneId);
-#endif
remove = true;
}
// "Conjured items disappear if you are logged out for more than 15 minutes"
else if (timeDiff > 15 * MINUTE && proto->Flags & ITEM_FLAG_CONJURED)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (%s, name: '%s', diff: %u) has conjured item (%s, entry: %u) with expired lifetime (15 minutes). Deleting item.",
GetGUID().ToString().c_str(), GetName().c_str(), timeDiff, item->GetGUID().ToString().c_str(), item->GetEntry());
-#endif
remove = true;
}
else if (item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE))
{
if (item->GetPlayedTime() > (2 * HOUR))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (%s, name: '%s') has item (%s, entry: %u) with expired refund time (%u). Deleting refund data and removing refundable flag.",
GetGUID().ToString().c_str(), GetName().c_str(), item->GetGUID().ToString().c_str(), item->GetEntry(), item->GetPlayedTime());
-#endif
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_REFUND_INSTANCE);
stmt->setUInt32(0, item->GetGUID().GetCounter());
trans->Append(stmt);
@@ -19204,10 +18982,8 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (%s, name: '%s') has item (%s, entry: %u) with refundable flags, but without data in item_refund_instance. Removing flag.",
GetGUID().ToString().c_str(), GetName().c_str(), item->GetGUID().ToString().c_str(), item->GetEntry());
-#endif
item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE);
}
}
@@ -19234,10 +19010,8 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Player::_LoadInventory: player (%s, name: '%s') has item (%s, entry: %u) with ITEM_FIELD_FLAG_BOP_TRADEABLE flag, but without data in item_soulbound_trade_data. Removing flag.",
GetGUID().ToString().c_str(), GetName().c_str(), item->GetGUID().ToString().c_str(), item->GetEntry());
-#endif
item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE);
}
}
@@ -19258,7 +19032,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
- LOG_ERROR("server", "Player::_LoadInventory: player (%s, name: '%s') has broken item (GUID: %u, entry: %u) in inventory. Deleting item.",
+ LOG_ERROR("entities.player", "Player::_LoadInventory: player (%s, name: '%s') has broken item (GUID: %u, entry: %u) in inventory. Deleting item.",
GetGUID().ToString().c_str(), GetName().c_str(), itemGuid, itemEntry);
remove = true;
}
@@ -19273,7 +19047,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
}
else
{
- LOG_ERROR("server", "Player::_LoadInventory: player (%s, name: '%s') has unknown item (entry: %u) in inventory. Deleting item.",
+ LOG_ERROR("entities.player", "Player::_LoadInventory: player (%s, name: '%s') has unknown item (entry: %u) in inventory. Deleting item.",
GetGUID().ToString().c_str(), GetName().c_str(), itemEntry);
Item::DeleteFromInventoryDB(trans, itemGuid);
Item::DeleteFromDB(trans, itemGuid);
@@ -19304,7 +19078,7 @@ void Player::_LoadMailedItems(Mail* mail)
if (!proto)
{
- LOG_ERROR("server", "Player %s has unknown item_template (ProtoType) in mailed items (GUID: %u, template: %u) in mail (%u), deleted.",
+ LOG_ERROR("entities.player", "Player %s has unknown item_template (ProtoType) in mailed items (GUID: %u, template: %u) in mail (%u), deleted.",
GetGUID().ToString().c_str(), itemGuid, itemTemplate, mail->messageID);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_MAIL_ITEM);
@@ -19320,7 +19094,7 @@ void Player::_LoadMailedItems(Mail* mail)
Item* item = NewItemOrBag(proto);
if (!item->LoadFromDB(itemGuid, ObjectGuid::Create<HighGuid::Player>(fields[13].GetUInt32()), fields, itemTemplate))
{
- LOG_ERROR("server", "Player::_LoadMailedItems - Item in mail (%u) doesn't exist !!!! - item guid: %u, deleted from mail", mail->messageID, itemGuid);
+ 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);
@@ -19421,7 +19195,7 @@ void Player::_LoadMail()
if (m->mailTemplateId && !sMailTemplateStore.LookupEntry(m->mailTemplateId))
{
- LOG_ERROR("server", "Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
+ LOG_ERROR("entities.player", "Player::_LoadMail - Mail (%u) have not existed MailTemplateId (%u), remove at load", m->messageID, m->mailTemplateId);
m->mailTemplateId = 0;
}
@@ -19475,7 +19249,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
else
{
questStatusData.Status = QUEST_STATUS_INCOMPLETE;
- LOG_ERROR("server", "Player %s (%s) has invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).",
+ LOG_ERROR("entities.player", "Player %s (%s) has invalid quest %d status (%u), replaced by QUEST_STATUS_INCOMPLETE(3).",
GetName().c_str(), GetGUID().ToString().c_str(), quest_id, qstatus);
}
@@ -19523,9 +19297,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result)
++slot;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Quest status is {%u} for quest {%u} for player (%s)", questStatusData.Status, quest_id, GetGUID().ToString().c_str());
-#endif
}
} while (result->NextRow());
}
@@ -19598,7 +19370,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result)
if (quest_daily_idx >= PLAYER_MAX_DAILY_QUESTS) // max amount with exist data in query
{
- LOG_ERROR("server", "Player (%s) have more 25 daily quest records in `charcter_queststatus_daily`", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Player (%s) have more 25 daily quest records in `charcter_queststatus_daily`", GetGUID().ToString().c_str());
break;
}
@@ -19614,9 +19386,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result)
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1 + quest_daily_idx, quest_id);
++quest_daily_idx;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Daily quest (%u) cooldown for player (%s)", quest_id, GetGUID().ToString().c_str());
-#endif
} while (result->NextRow());
}
@@ -19638,9 +19408,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result)
continue;
m_weeklyquests.insert(quest_id);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Weekly quest {%u} cooldown for player (%s)", quest_id, GetGUID().ToString().c_str());
-#endif
} while (result->NextRow());
}
@@ -19663,9 +19431,7 @@ void Player::_LoadSeasonalQuestStatus(PreparedQueryResult result)
continue;
m_seasonalquests[event_id].insert(quest_id);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.loading", "Seasonal quest {%u} cooldown for player (%s)", quest_id, GetGUID().ToString().c_str());
-#endif
} while (result->NextRow());
}
@@ -20202,7 +19968,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(true), getClass());
if (!info)
{
- LOG_ERROR("server", "Player (Name %s) has incorrect race/class pair. Can't be loaded.", GetName().c_str());
+ LOG_ERROR("entities.player", "Player (Name %s) has incorrect race/class pair. Can't be loaded.", GetName().c_str());
return false;
}
@@ -20250,10 +20016,8 @@ bool Player::_LoadHomeBind(PreparedQueryResult result)
CharacterDatabase.Execute(stmt);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Setting player home position - mapid: %u, areaid: %u, X: %f, Y: %f, Z: %f",
+ 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);
-#endif
return true;
}
@@ -20280,9 +20044,7 @@ void Player::SaveToDB(bool create, bool logout)
// first save/honor gain after midnight will also update the player's honor fields
UpdateHonorFields();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "The value of player %s at save: ", m_name.c_str());
-#endif
outDebugValues();
if (!create)
@@ -20510,7 +20272,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
}
else
{
- LOG_ERROR("server", "Can't find item %s but is in refundable storage for player %s ! Removing.", (*itr).ToString().c_str(), GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Can't find item %s but is in refundable storage for player %s ! Removing.", (*itr).ToString().c_str(), GetGUID().ToString().c_str());
m_refundableItems.erase(itr);
}
}
@@ -20541,7 +20303,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
ObjectGuid::LowType bagTestGUID = 0;
if (Item* test2 = GetItemByPos(INVENTORY_SLOT_BAG_0, item->GetBagSlot()))
bagTestGUID = test2->GetGUID().GetCounter();
- LOG_ERROR("server", "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item %s (state %d) are incorrect, the player doesn't have an item at that position!",
+ LOG_ERROR("entities.player", "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item %s (state %d) are incorrect, the player doesn't have an item at that position!",
lowGuid, GetName().c_str(), item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString().c_str(), (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);
@@ -20562,7 +20324,7 @@ void Player::_SaveInventory(SQLTransaction& trans)
}
else if (test != item)
{
- LOG_ERROR("server", "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item (%s) are incorrect, the item (%s) is there instead!",
+ LOG_ERROR("entities.player", "Player(GUID: %u Name: %s)::_SaveInventory - the bag(%u) and slot(%u) values for the item (%s) are incorrect, the item (%s) is there instead!",
lowGuid, GetName().c_str(), item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString().c_str(), test->GetGUID().ToString().c_str());
// save all changes to the item...
if (item->GetState() != ITEM_NEW) // only for existing items, no dupes
@@ -21000,7 +20762,6 @@ void Player::outDebugValues() const
if (!sLog->ShouldLog("entities.player", LogLevel::LOG_LEVEL_DEBUG)) // optimize disabled debug output
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player", "HP is: \t\t\t%u\t\tMP is: \t\t\t%u", GetMaxHealth(), GetMaxPower(POWER_MANA));
LOG_DEBUG("entities.player", "AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f", GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH));
LOG_DEBUG("entities.player", "INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f", GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT));
@@ -21013,7 +20774,6 @@ void Player::outDebugValues() const
LOG_DEBUG("entities.player", "MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f", GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE));
LOG_DEBUG("entities.player", "MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f", GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE));
LOG_DEBUG("entities.player", "ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u", GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK));
-#endif
}
/*********************************************************/
@@ -21415,7 +21175,7 @@ Pet* Player::GetPet() const
return pet;
//there may be a guardian in slot
- //LOG_ERROR("server", "Player::GetPet: Pet %s not exist.", pet_guid.ToString().c_str());
+ //LOG_ERROR("entities.player", "Player::GetPet: Pet %s not exist.", pet_guid.ToString().c_str());
//const_cast<Player*>(this)->SetPetGUID(0);
}
@@ -21436,9 +21196,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
m_temporaryUnsummonedPetNumber = 0;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.pet", "RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent);
-#endif
if (pet->m_removed)
return;
}
@@ -21517,10 +21275,10 @@ void Player::StopCastingCharm()
if (GetCharmGUID())
{
- LOG_FATAL("server", "Player %s (%s is not able to uncharm unit (%s)", GetName().c_str(), GetGUID().ToString().c_str(), GetCharmGUID().ToString().c_str());
+ LOG_FATAL("entities.player", "Player %s (%s is not able to uncharm unit (%s)", GetName().c_str(), GetGUID().ToString().c_str(), GetCharmGUID().ToString().c_str());
if (charm->GetCharmerGUID())
{
- LOG_FATAL("server", "Charmed unit has charmer %s", charm->GetCharmerGUID().ToString().c_str());
+ LOG_FATAL("entities.player", "Charmed unit has charmer %s", charm->GetCharmerGUID().ToString().c_str());
ABORT();
}
else
@@ -21637,9 +21395,7 @@ void Player::PetSpellInitialize()
if (!pet)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.pet", "Pet Spells Groups");
-#endif
CharmInfo* charmInfo = pet->GetCharmInfo();
@@ -21703,7 +21459,7 @@ void Player::PossessSpellInitialize()
if (!charmInfo)
{
- LOG_ERROR("server", "Player::PossessSpellInitialize(): charm (%s) has no charminfo!", charm->GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Player::PossessSpellInitialize(): charm (%s) has no charminfo!", charm->GetGUID().ToString().c_str());
return;
}
@@ -21751,9 +21507,7 @@ void Player::VehicleSpellInitialize()
ConditionList conditions = sConditionMgr->GetConditionsForVehicleSpell(vehicle->GetEntry(), spellId);
if (!sConditionMgr->IsObjectMeetToConditions(this, vehicle, conditions))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("condition", "VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", vehicle->ToCreature()->GetEntry(), spellId);
-#endif
data << uint16(0) << uint8(0) << uint8(i + 8);
continue;
}
@@ -21795,7 +21549,7 @@ void Player::CharmSpellInitialize()
CharmInfo* charmInfo = charm->GetCharmInfo();
if (!charmInfo)
{
- LOG_ERROR("server", "Player::CharmSpellInitialize(): the player's charm (%s) has no charminfo!", charm->GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Player::CharmSpellInitialize(): the player's charm (%s) has no charminfo!", charm->GetGUID().ToString().c_str());
return;
}
@@ -21901,9 +21655,7 @@ public:
void Player::AddSpellMod(SpellModifier* mod, bool apply)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Player::AddSpellMod %d", mod->spellId);
-#endif
uint16 Opcode = (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER;
int i = 0;
@@ -22465,9 +22217,7 @@ void Player::ContinueTaxiFlight()
if (!sourceNode)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "WORLD: Restart character %s taxi flight", GetGUID().ToString().c_str());
-#endif
uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourceNode, GetTeamId(true), true);
if (!mountDisplayId)
@@ -22596,7 +22346,7 @@ void Player::InitDisplayIds()
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(true), getClass());
if (!info)
{
- LOG_ERROR("server", "Player %s has incorrect race/class pair. Can't init display ids.", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.player", "Player %s has incorrect race/class pair. Can't init display ids.", GetGUID().ToString().c_str());
return;
}
@@ -22612,7 +22362,7 @@ void Player::InitDisplayIds()
SetNativeDisplayId(info->displayId_m);
break;
default:
- LOG_ERROR("server", "Invalid gender %u for player", gender);
+ LOG_ERROR("entities.player", "Invalid gender %u for player", gender);
return;
}
}
@@ -22720,9 +22470,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
Creature* creature = GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: BuyItemFromVendor - Unit (%s) not found or you can't interact with him.", vendorguid.ToString().c_str());
-#endif
SendBuyError(BUY_ERR_DISTANCE_TOO_FAR, nullptr, item, 0);
return false;
}
@@ -22777,7 +22525,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost);
if (!iece)
{
- LOG_ERROR("server", "Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost);
+ LOG_ERROR("entities.player", "Item %u have wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost);
return false;
}
@@ -22820,7 +22568,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
uint32 maxCount = MAX_MONEY_AMOUNT / pProto->BuyPrice;
if ((uint32)count > maxCount)
{
- LOG_ERROR("server", "Player %s tried to buy %u item id %u, causing overflow", GetName().c_str(), (uint32)count, pProto->ItemId);
+ 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
@@ -22917,9 +22665,7 @@ void Player::UpdateHomebindTime(uint32 time)
data << uint32(m_HomebindTimer);
data << uint32(1);
GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "PLAYER: Player '%s' (%s) will be teleported to homebind in 60 seconds", GetName().c_str(), GetGUID().ToString().c_str());
-#endif
}
}
@@ -23291,9 +23037,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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");
-#endif
return activate;
}
@@ -24680,7 +24424,7 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons
break;
}
default:
- LOG_ERROR("server", "HasItemFitToSpellRequirements: Not handled spell requirement for item class %u", spellInfo->EquippedItemClass);
+ LOG_ERROR("entities.player", "HasItemFitToSpellRequirements: Not handled spell requirement for item class %u", spellInfo->EquippedItemClass);
break;
}
@@ -24771,7 +24515,7 @@ uint32 Player::GetResurrectionSpellId()
spell_id = 47882;
break; // rank 7
default:
- LOG_ERROR("server", "Unhandled spell %u: S.Resurrection", (*itr)->GetId());
+ LOG_ERROR("entities.player", "Unhandled spell %u: S.Resurrection", (*itr)->GetId());
continue;
}
@@ -25432,13 +25176,11 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
if (!IsInWorld() || IsDuringRemoveFromWorld())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName().c_str(), target->GetEntry(), target->GetTypeId());
-#endif
if (!AddGuidValue(PLAYER_FARSIGHT, target->GetGUID()))
{
- LOG_FATAL("server", "Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName().c_str());
+ LOG_FATAL("entities.player", "Player::CreateViewpoint: Player %s cannot add new viewpoint!", GetName().c_str());
return;
}
@@ -25453,16 +25195,14 @@ void Player::SetViewpoint(WorldObject* target, bool apply)
//must immediately set seer back otherwise may crash
m_seer = this;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "Player::CreateViewpoint: Player %s remove seer", GetName().c_str());
-#endif
if (target->isType(TYPEMASK_UNIT) && !GetVehicle())
((Unit*)target)->RemovePlayerFromVision(this);
if (!RemoveGuidValue(PLAYER_FARSIGHT, target->GetGUID()))
{
- LOG_FATAL("server", "Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName().c_str());
+ LOG_FATAL("entities.player", "Player::CreateViewpoint: Player %s cannot remove current viewpoint!", GetName().c_str());
return;
}
@@ -26093,7 +25833,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
if (!pSkill)
{
- LOG_ERROR("server", "Character %s has skill %u that does not exist.", GetGUID().ToString().c_str(), skill);
+ LOG_ERROR("entities.player", "Character %s has skill %u that does not exist.", GetGUID().ToString().c_str(), skill);
continue;
}
@@ -26111,7 +25851,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
}
if (value == 0)
{
- LOG_ERROR("server", "Character %s has skill %u with value 0. Will be deleted.", GetGUID().ToString().c_str(), skill);
+ LOG_ERROR("entities.player", "Character %s has skill %u with value 0. Will be deleted.", GetGUID().ToString().c_str(), skill);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHARACTER_SKILL);
@@ -26140,7 +25880,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
if (count >= PLAYER_MAX_SKILLS) // client limit
{
- LOG_ERROR("server", "Character %s has more than %u skills.", GetGUID().ToString().c_str(), PLAYER_MAX_SKILLS);
+ LOG_ERROR("entities.player", "Character %s has more than %u skills.", GetGUID().ToString().c_str(), PLAYER_MAX_SKILLS);
break;
}
} while (result->NextRow());
@@ -26304,9 +26044,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
}
//Z given by moveinfo, LastZ, FallTime, WaterZ, MapZ, Damage, Safefall reduction
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "FALLDAMAGE mZ=%f z=%f fallTime=%u damage=%u SF=%d", movementInfo.pos.GetPositionZ(), GetPositionZ(), movementInfo.fallTime, damage, safe_fall);
-#endif
+ LOG_DEBUG("entities.player", "FALLDAMAGE mZ=%f z=%f fallTime=%u damage=%u SF=%d", movementInfo.pos.GetPositionZ(), GetPositionZ(), movementInfo.fallTime, damage, safe_fall);
}
// recheck alive, might have died of EnvironmentalDamage, avoid cases when player die in fact like Spirit of Redemption case
@@ -26598,7 +26336,7 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa
uint32 spellid = talentInfo->RankID[talentRank];
if (spellid == 0)
{
- LOG_ERROR("server", "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
+ LOG_ERROR("entities.player", "Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
return;
}
@@ -26608,9 +26346,7 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa
// learn! (other talent ranks will unlearned at learning)
pet->learnSpell(spellid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
-#endif
+ LOG_DEBUG("entities.player", "PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
// update free talent points
pet->SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1));
@@ -26910,7 +26646,7 @@ void Player::SetEquipmentSet(uint32 index, EquipmentSet eqset)
if (!found) // something wrong...
{
- LOG_ERROR("server", "Player %s tried to save equipment set " UI64FMTD " (index %u), but that equipment set not found!", GetName().c_str(), eqset.Guid, index);
+ 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;
}
}
@@ -27883,17 +27619,13 @@ void Player::SendRefundInfo(Item* item)
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item refund: item not refundable!");
-#endif
return;
}
if (GetGUID().GetCounter() != item->GetRefundRecipient()) // Formerly refundable item got traded
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item refund: item was traded!");
-#endif
item->SetNotRefundable(this);
return;
}
@@ -27901,9 +27633,7 @@ void Player::SendRefundInfo(Item* item)
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost());
if (!iece)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item refund: cannot find extendedcost data.");
-#endif
return;
}
@@ -27949,9 +27679,7 @@ void Player::RefundItem(Item* item)
{
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item refund: item not refundable!");
-#endif
return;
}
@@ -27967,9 +27695,7 @@ void Player::RefundItem(Item* item)
if (GetGUID().GetCounter() != item->GetRefundRecipient()) // Formerly refundable item got traded
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item refund: item was traded!");
-#endif
item->SetNotRefundable(this);
return;
}
@@ -27977,9 +27703,7 @@ void Player::RefundItem(Item* item)
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost());
if (!iece)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item refund: cannot find extendedcost data.");
-#endif
return;
}
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 4cd181d29f..c1e9ef1d98 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -37,7 +37,7 @@ bool MotionTransport::CreateMoTrans(ObjectGuid::LowType guidlow, uint32 entry, u
if (!IsPositionValid())
{
- LOG_ERROR("server", "Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
+ LOG_ERROR("entities.transport", "Transport (GUID: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",
guidlow, x, y);
return false;
}
@@ -48,7 +48,7 @@ bool MotionTransport::CreateMoTrans(ObjectGuid::LowType guidlow, uint32 entry, u
if (!goinfo)
{
- LOG_ERROR("server", "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);
+ LOG_ERROR("entities.transport", "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;
}
@@ -57,7 +57,7 @@ bool MotionTransport::CreateMoTrans(ObjectGuid::LowType guidlow, uint32 entry, u
TransportTemplate const* tInfo = sTransportMgr->GetTransportTemplate(entry);
if (!tInfo)
{
- LOG_ERROR("server", "Transport %u (name: %s) will not be created, missing `transport_template` entry.", entry, goinfo->name.c_str());
+ LOG_ERROR("entities.transport", "Transport %u (name: %s) will not be created, missing `transport_template` entry.", entry, goinfo->name.c_str());
return false;
}
@@ -128,7 +128,7 @@ void MotionTransport::Update(uint32 diff)
if (AI())
AI()->UpdateAI(diff);
else if (!AIM_Initialize())
- LOG_ERROR("server", "Could not initialize GameObjectAI for Transport");
+ LOG_ERROR("entities.transport", "Could not initialize GameObjectAI for Transport");
if (GetKeyFrames().size() <= 1)
return;
@@ -332,7 +332,7 @@ Creature* MotionTransport::CreateNPCPassenger(ObjectGuid::LowType guid, Creature
if (!creature->IsPositionValid())
{
- LOG_ERROR("server", "Creature (%s) not created. Suggested coordinates aren't valid (X: %f Y: %f)",
+ LOG_ERROR("entities.transport", "Creature (%s) not created. Suggested coordinates aren't valid (X: %f Y: %f)",
creature->GetGUID().ToString().c_str(), creature->GetPositionX(), creature->GetPositionY());
delete creature;
return nullptr;
@@ -374,7 +374,7 @@ GameObject* MotionTransport::CreateGOPassenger(ObjectGuid::LowType guid, GameObj
if (!go->IsPositionValid())
{
- LOG_ERROR("server", "GameObject (%s) not created. Suggested coordinates aren't valid (X: %f Y: %f)",
+ LOG_ERROR("entities.transport", "GameObject (%s) not created. Suggested coordinates aren't valid (X: %f Y: %f)",
go->GetGUID().ToString().c_str(), go->GetPositionX(), go->GetPositionY());
delete go;
return nullptr;
@@ -670,7 +670,7 @@ bool StaticTransport::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* m
m_stationaryPosition.Relocate(x, y, z, ang);
if (!IsPositionValid())
{
- LOG_ERROR("server", "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y);
+ LOG_ERROR("entities.transport", "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y);
return false;
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index b67c5f0aa9..0b323f08a1 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -844,14 +844,10 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
return 0;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "DealDamageStart");
-#endif
+ LOG_DEBUG("entities.unit", "DealDamageStart");
uint32 health = victim->GetHealth();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "deal dmg:%d to health:%d ", damage, health);
-#endif
+ LOG_DEBUG("entities.unit", "deal dmg:%d to health:%d ", damage, health);
// duel ends when player has 1 or less hp
bool duel_hasEnded = false;
@@ -915,9 +911,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
if (health <= damage)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "DealDamage: victim just died");
-#endif
+ LOG_DEBUG("entities.unit", "DealDamage: victim just died");
//if (attacker && victim->GetTypeId() == TYPEID_PLAYER && victim != attacker)
//victim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, health); // pussywizard: optimization
@@ -926,9 +920,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "DealDamageAlive");
-#endif
+ LOG_DEBUG("entities.unit", "DealDamageAlive");
//if (victim->GetTypeId() == TYPEID_PLAYER)
// victim->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, damage); // pussywizard: optimization
@@ -1019,9 +1011,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "DealDamageEnd returned %d damage", damage);
-#endif
+ LOG_DEBUG("entities.unit", "DealDamageEnd returned %d damage", damage);
return damage;
}
@@ -1290,9 +1280,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss)
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(damageInfo->SpellID);
if (spellProto == nullptr)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "Unit::DealSpellDamage has wrong damageInfo->SpellID: %u", damageInfo->SpellID);
-#endif
return;
}
@@ -2236,14 +2224,12 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
DealMeleeDamage(&damageInfo, true);
ProcDamageAndSpell(damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, damageInfo.procEx, damageInfo.damage, damageInfo.attackType);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (GetTypeId() == TYPEID_PLAYER)
- LOG_DEBUG("server", "AttackerStateUpdate: (Player) %s attacked %s for %u dmg, absorbed %u, blocked %u, resisted %u.",
+ LOG_DEBUG("entities.unit", "AttackerStateUpdate: (Player) %s attacked %s for %u dmg, absorbed %u, blocked %u, resisted %u.",
GetGUID().ToString().c_str(), victim->GetGUID().ToString().c_str(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
else
- LOG_DEBUG("server", "AttackerStateUpdate: (NPC) %s attacked %s for %u dmg, absorbed %u, blocked %u, resisted %u.",
+ LOG_DEBUG("entities.unit", "AttackerStateUpdate: (NPC) %s attacked %s for %u dmg, absorbed %u, blocked %u, resisted %u.",
GetGUID().ToString().c_str(), victim->GetGUID().ToString().c_str(), damageInfo.damage, damageInfo.absorb, damageInfo.blocked_amount, damageInfo.resist);
-#endif
}
}
@@ -2363,7 +2349,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
- //LOG_DEBUG("server", "MELEE OUTCOME: miss %f crit %f dodge %f parry %f block %f", miss_chance, crit_chance, dodge_chance, parry_chance, block_chance);
+ //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));
}
@@ -2388,19 +2374,15 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
int32 sum = 0, tmp = 0;
int32 roll = urand (0, 10000);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus);
-#endif
- //LOG_DEBUG("server", "RollMeleeOutcomeAgainst: rolled %d, miss %d, dodge %d, parry %d, block %d, crit %d",
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: skill bonus of %d for attacker", skillBonus);
+ //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))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: MISS");
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: MISS");
return MELEE_HIT_MISS;
}
@@ -2409,7 +2391,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
// 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))
{
- //LOG_DEBUG("server", "RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
+ //LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
}
// Xinef: do not allow to dodge with CREATURE_FLAG_EXTRA_NO_DODGE flag
else if (victim->GetTypeId() == TYPEID_PLAYER || !(victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_DODGE))
@@ -2434,9 +2416,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
&& ((tmp -= skillBonus) > 0)
&& roll < (sum += tmp))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum - tmp, sum);
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: DODGE <%d, %d)", sum - tmp, sum);
return MELEE_HIT_DODGE;
}
}
@@ -2446,9 +2426,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
// 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))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: attack came from behind.");
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: attack came from behind.");
}
else
{
@@ -2470,9 +2448,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
&& (tmp -= skillBonus) > 0
&& roll < (sum += tmp))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum - tmp, sum);
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum - tmp, sum);
return MELEE_HIT_PARRY;
}
}
@@ -2489,9 +2465,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
&& (tmp -= skillBonus) > 0
&& roll < (sum += tmp))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum - tmp, sum);
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: BLOCK <%d, %d)", sum - tmp, sum);
return MELEE_HIT_BLOCK;
}
}
@@ -2512,9 +2486,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
tmp = tmp > 4000 ? 4000 : tmp;
if (roll < (sum += tmp))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum - 4000, sum);
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: GLANCING <%d, %d)", sum - 4000, sum);
return MELEE_HIT_GLANCING;
}
}
@@ -2538,9 +2510,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
tmp = tmp * 200 - 1500;
if (roll < (sum += tmp))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum - tmp, sum);
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRUSHING <%d, %d)", sum - tmp, sum);
return MELEE_HIT_CRUSHING;
}
}
@@ -2551,22 +2521,16 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
if (tmp > 0 && roll < (sum += tmp))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum - tmp, sum);
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT <%d, %d)", sum - tmp, sum);
if (GetTypeId() == TYPEID_UNIT && (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_CRIT))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: CRIT DISABLED)");
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: CRIT DISABLED)");
}
else
return MELEE_HIT_CRIT;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "RollMeleeOutcomeAgainst: NORMAL");
-#endif
+ LOG_DEBUG("entities.unit", "RollMeleeOutcomeAgainst: NORMAL");
return MELEE_HIT_NORMAL;
}
@@ -2638,9 +2602,7 @@ void Unit::SendMeleeAttackStart(Unit* victim, Player* sendTo)
sendTo->SendDirectMessage(&data);
else
SendMessageToSet(&data, true);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Sent SMSG_ATTACKSTART");
-#endif
+ LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTART");
}
void Unit::SendMeleeAttackStop(Unit* victim)
@@ -2654,14 +2616,12 @@ void Unit::SendMeleeAttackStop(Unit* victim)
data << (victim ? victim->GetPackGUID() : PackedGuid());
data << uint32(0); //! Can also take the value 0x01, which seems related to updating rotation
SendMessageToSet(&data, true);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Sent SMSG_ATTACKSTOP");
+ LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTOP");
if (victim)
- LOG_DEBUG("server", "%s %s stopped attacking %s %s", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUID().ToString().c_str(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUID().ToString().c_str());
+ LOG_DEBUG("entities.unit", "%s %s stopped attacking %s %s", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUID().ToString().c_str(), (victim->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), victim->GetGUID().ToString().c_str());
else
- LOG_DEBUG("server", "%s %s stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("entities.unit", "%s %s stopped attacking", (GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), GetGUID().ToString().c_str());
}
bool Unit::isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType)
@@ -2826,9 +2786,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spell)
canParry = false;
break;
default:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
-#endif
+ LOG_DEBUG("entities.unit", "Spell %u SPELL_AURA_IGNORE_COMBAT_RESULT has unhandled state %d", (*i)->GetId(), (*i)->GetMiscValue());
break;
}
}
@@ -4162,9 +4120,7 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMo
aurApp->SetRemoveMode(removeMode);
Aura* aura = aurApp->GetBase();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Aura %u now is remove mode %d", aura->GetId(), removeMode);
-#endif
// dead loop is killing the server probably
ASSERT(m_removedAurasCount < 0xFFFFFFFF);
@@ -5044,9 +5000,7 @@ void Unit::DelayOwnedAuras(uint32 spellId, ObjectGuid caster, int32 delaytime)
// update for out of range group members (on 1 slot use)
aura->SetNeedClientUpdateForTargets();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Aura %u partially interrupted on unit %s, new duration: %u ms", aura->GetId(), GetGUID().ToString().c_str(), aura->GetDuration());
-#endif
}
}
}
@@ -5937,7 +5891,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo)
data << float(pInfo->multiplier); // gain multiplier
break;
default:
- LOG_ERROR("server", "Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType()));
+ LOG_ERROR("entities.unit", "Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraType()));
return;
}
@@ -5980,9 +5934,7 @@ void Unit::SendSpellDamageImmune(Unit* target, uint32 spellId)
void Unit::SendAttackStateUpdate(CalcDamageInfo* damageInfo)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
-#endif
//IF we are in cheat mode we swap absorb with damage and set damage to 0, this way we can still debug damage but our hp bar will not drop
uint32 damage = damageInfo->damage;
@@ -6654,7 +6606,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = 42771;
break;
default:
- LOG_ERROR("server", "Unit::HandleDummyAuraProc: non handled spell id: %u (SW)", dummySpell->Id);
+ LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non handled spell id: %u (SW)", dummySpell->Id);
return false;
}
@@ -7659,7 +7611,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
break; // 8 Rank
default:
{
- LOG_ERROR("server", "Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)",
+ LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non handled item enchantment (rank?) %u for spell id: %u (Windfury)",
castItem->GetEnchantmentId(EnchantmentSlot(TEMP_ENCHANTMENT_SLOT)), dummySpell->Id);
return false;
}
@@ -7668,7 +7620,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
SpellInfo const* windfurySpellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!windfurySpellInfo)
{
- LOG_ERROR("server", "Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId);
+ LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId);
return false;
}
@@ -8246,7 +8198,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
SpellInfo const* triggerEntry = sSpellMgr->GetSpellInfo(triggered_spell_id);
if (!triggerEntry)
{
- LOG_ERROR("server", "Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id);
+ LOG_ERROR("entities.unit", "Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->Id, triggered_spell_id);
return false;
}
@@ -8562,7 +8514,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
trigger_spell_id = 31643;
break;
default:
- LOG_ERROR("server", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id);
+ LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id);
return false;
}
}
@@ -8639,7 +8591,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
trigger_spell_id = 27818;
break;
default:
- LOG_ERROR("server", "Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
+ LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
return false;
}
basepoints0 = CalculatePct(int32(damage), triggerAmount) / 3;
@@ -8717,7 +8669,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
trigger_spell_id = 63468;
break;
default:
- LOG_ERROR("server", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->Id);
+ LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->Id);
return false;
}
SpellInfo const* TriggerPS = sSpellMgr->GetSpellInfo(trigger_spell_id);
@@ -8848,14 +8800,14 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
originalSpellId = 48825;
break;
default:
- LOG_ERROR("server", "Unit::HandleProcTriggerSpell: Spell %u not handled in HShock", procSpell->Id);
+ LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u not handled in HShock", procSpell->Id);
return false;
}
}
SpellInfo const* originalSpell = sSpellMgr->GetSpellInfo(originalSpellId);
if (!originalSpell)
{
- LOG_ERROR("server", "Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu", originalSpellId);
+ LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu", originalSpellId);
return false;
}
// percent stored in effect 1 (class scripts) base points
@@ -8943,7 +8895,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
if (triggerEntry == nullptr)
{
// Don't cast unknown spell
- // LOG_ERROR("server", "Unit::HandleProcTriggerSpell: Spell %u has 0 in EffectTriggered[%d]. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex());
+ // LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u has 0 in EffectTriggered[%d]. Unhandled custom case?", auraSpellInfo->Id, triggeredByAura->GetEffIndex());
return false;
}
@@ -9520,7 +9472,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au
if (!triggerEntry)
{
- LOG_ERROR("server", "Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u", triggered_spell_id, scriptId);
+ LOG_ERROR("entities.unit", "Unit::HandleOverrideClassScriptAuraProc: Spell %u triggering for class script id %u", triggered_spell_id, scriptId);
return false;
}
@@ -9602,11 +9554,11 @@ FactionTemplateEntry const* Unit::GetFactionTemplateEntry() const
if (GetGUID() != guid)
{
if (Player const* player = ToPlayer())
- LOG_ERROR("server", "Player %s has invalid faction (faction template id) #%u", player->GetName().c_str(), getFaction());
+ LOG_ERROR("entities.unit", "Player %s has invalid faction (faction template id) #%u", player->GetName().c_str(), getFaction());
else if (Creature const* creature = ToCreature())
- LOG_ERROR("server", "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction());
+ LOG_ERROR("entities.unit", "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction());
else
- LOG_ERROR("server", "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName().c_str(), uint32(GetTypeId()), getFaction());
+ LOG_ERROR("entities.unit", "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName().c_str(), uint32(GetTypeId()), getFaction());
guid = GetGUID();
}
@@ -10012,7 +9964,7 @@ void Unit::RemoveAllAttackers()
AttackerSet::iterator iter = m_attackers.begin();
if (!(*iter)->AttackStop())
{
- LOG_ERROR("server", "WORLD: Unit has an attacker that isn't attacking it!");
+ LOG_ERROR("entities.unit", "WORLD: Unit has an attacker that isn't attacking it!");
m_attackers.erase(iter);
}
}
@@ -10165,7 +10117,7 @@ Minion* Unit::GetFirstMinion() const
if (pet->HasUnitTypeMask(UNIT_MASK_MINION))
return (Minion*)pet;
- LOG_ERROR("server", "Unit::GetFirstMinion: Minion %s not exist.", pet_guid.ToString().c_str());
+ LOG_ERROR("entities.unit", "Unit::GetFirstMinion: Minion %s not exist.", pet_guid.ToString().c_str());
const_cast<Unit*>(this)->SetMinionGUID(ObjectGuid::Empty);
}
@@ -10180,7 +10132,7 @@ Guardian* Unit::GetGuardianPet() const
if (pet->HasUnitTypeMask(UNIT_MASK_GUARDIAN))
return (Guardian*)pet;
- LOG_FATAL("server", "Unit::GetGuardianPet: Guardian %s not exist.", pet_guid.ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit::GetGuardianPet: Guardian %s not exist.", pet_guid.ToString().c_str());
const_cast<Unit*>(this)->SetPetGUID(ObjectGuid::Empty);
}
@@ -10194,7 +10146,7 @@ Unit* Unit::GetCharm() const
if (Unit* pet = ObjectAccessor::GetUnit(*this, charm_guid))
return pet;
- LOG_ERROR("server", "Unit::GetCharm: Charmed creature %s not exist.", charm_guid.ToString().c_str());
+ LOG_ERROR("entities.unit", "Unit::GetCharm: Charmed creature %s not exist.", charm_guid.ToString().c_str());
const_cast<Unit*>(this)->SetGuidValue(UNIT_FIELD_CHARM, ObjectGuid::Empty);
}
@@ -10203,15 +10155,13 @@ Unit* Unit::GetCharm() const
void Unit::SetMinion(Minion* minion, bool apply)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply);
-#endif
if (apply)
{
if (minion->GetOwnerGUID())
{
- LOG_FATAL("server", "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
+ LOG_FATAL("entities.unit", "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
return;
}
@@ -10283,7 +10233,7 @@ void Unit::SetMinion(Minion* minion, bool apply)
{
if (minion->GetOwnerGUID() != GetGUID())
{
- LOG_FATAL("server", "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
+ LOG_FATAL("entities.unit", "SetMinion: Minion %u is not the minion of owner %u", minion->GetEntry(), GetEntry());
return;
}
@@ -10399,7 +10349,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
if (GetTypeId() == TYPEID_PLAYER)
{
if (!AddGuidValue(UNIT_FIELD_CHARM, charm->GetGUID()))
- LOG_FATAL("server", "Player %s is trying to charm unit %u, but it already has a charmed unit %s", GetName().c_str(), charm->GetEntry(), GetCharmGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Player %s is trying to charm unit %u, but it already has a charmed unit %s", GetName().c_str(), charm->GetEntry(), GetCharmGUID().ToString().c_str());
charm->m_ControlledByPlayer = true;
// TODO: maybe we can use this flag to check if controlled by player
@@ -10412,7 +10362,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
charm->SetByteValue(UNIT_FIELD_BYTES_2, 1, GetByteValue(UNIT_FIELD_BYTES_2, 1));
if (!charm->AddGuidValue(UNIT_FIELD_CHARMEDBY, GetGUID()))
- LOG_FATAL("server", "Unit %u is being charmed, but it already has a charmer %s", charm->GetEntry(), charm->GetCharmerGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit %u is being charmed, but it already has a charmer %s", charm->GetEntry(), charm->GetCharmerGUID().ToString().c_str());
if (charm->HasUnitMovementFlag(MOVEMENTFLAG_WALKING))
charm->SetWalk(false);
@@ -10424,11 +10374,11 @@ void Unit::SetCharm(Unit* charm, bool apply)
if (GetTypeId() == TYPEID_PLAYER)
{
if (!RemoveGuidValue(UNIT_FIELD_CHARM, charm->GetGUID()))
- LOG_FATAL("server", "Player %s is trying to uncharm unit %u, but it has another charmed unit %s", GetName().c_str(), charm->GetEntry(), GetCharmGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Player %s is trying to uncharm unit %u, but it has another charmed unit %s", GetName().c_str(), charm->GetEntry(), GetCharmGUID().ToString().c_str());
}
if (!charm->RemoveGuidValue(UNIT_FIELD_CHARMEDBY, GetGUID()))
- LOG_FATAL("server", "Unit %u is being uncharmed, but it has another charmer %s", charm->GetEntry(), charm->GetCharmerGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit %u is being uncharmed, but it has another charmer %s", charm->GetEntry(), charm->GetCharmerGUID().ToString().c_str());
if (charm->GetTypeId() == TYPEID_PLAYER)
{
@@ -10607,14 +10557,14 @@ void Unit::RemoveAllControlled()
else if (target->GetOwnerGUID() == GetGUID() && target->IsSummon())
target->ToTempSummon()->UnSummon();
else
- LOG_ERROR("server", "Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
+ 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())
- LOG_FATAL("server", "Unit %u is not able to release its pet %s", GetEntry(), GetPetGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit %u is not able to release its pet %s", GetEntry(), GetPetGUID().ToString().c_str());
if (GetMinionGUID())
- LOG_FATAL("server", "Unit %u is not able to release its minion %s", GetEntry(), GetMinionGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit %u is not able to release its minion %s", GetEntry(), GetMinionGUID().ToString().c_str());
if (GetCharmGUID())
- LOG_FATAL("server", "Unit %u is not able to release its charm %s", GetEntry(), GetCharmGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit %u is not able to release its charm %s", GetEntry(), GetCharmGUID().ToString().c_str());
}
Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
@@ -13568,7 +13518,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
break;
}
default:
- LOG_ERROR("server", "Unit::UpdateSpeed: Unsupported move type (%d)", mtype);
+ LOG_ERROR("entities.unit", "Unit::UpdateSpeed: Unsupported move type (%d)", mtype);
return;
}
@@ -13726,7 +13676,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
data.Initialize(MSG_MOVE_SET_PITCH_RATE, 8 + 4 + 2 + 4 + 4 + 4 + 4 + 4 + 4 + 4);
break;
default:
- LOG_ERROR("server", "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
+ LOG_ERROR("entities.unit", "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
return;
}
@@ -13791,7 +13741,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
data.Initialize(SMSG_FORCE_PITCH_RATE_CHANGE, 16);
break;
default:
- LOG_ERROR("server", "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
+ LOG_ERROR("entities.unit", "Unit::SetSpeed: Unsupported move type (%d), data not sent to client.", mtype);
return;
}
data << GetPackGUID();
@@ -14447,7 +14397,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
{
if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
{
- LOG_ERROR("server", "ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!");
+ LOG_ERROR("entities.unit", "ERROR in HandleStatModifier(): non-existing UnitMods or wrong UnitModifierType!");
return false;
}
@@ -14532,7 +14482,7 @@ float Unit::GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) co
{
if (unitMod >= UNIT_MOD_END || modifierType >= MODIFIER_TYPE_END)
{
- LOG_ERROR("server", "attempt to access non-existing modifier value from UnitMods!");
+ LOG_ERROR("entities.unit", "attempt to access non-existing modifier value from UnitMods!");
return 0.0f;
}
@@ -14562,7 +14512,7 @@ float Unit::GetTotalAuraModValue(UnitMods unitMod) const
{
if (unitMod >= UNIT_MOD_END)
{
- LOG_ERROR("server", "attempt to access non-existing UnitMods in GetTotalAuraModValue()!");
+ LOG_ERROR("entities.unit", "attempt to access non-existing UnitMods in GetTotalAuraModValue()!");
return 0.0f;
}
@@ -14930,7 +14880,7 @@ void Unit::RemoveFromWorld()
if (GetCharmerGUID())
{
- LOG_FATAL("server", "Unit %u has charmer guid when removed from world", GetEntry());
+ LOG_FATAL("entities.unit", "Unit %u has charmer guid when removed from world", GetEntry());
ABORT();
}
@@ -14940,7 +14890,7 @@ void Unit::RemoveFromWorld()
{
if (HasUnitTypeMask(UNIT_MASK_MINION | UNIT_MASK_GUARDIAN))
owner->SetMinion((Minion*)this, false);
- LOG_INFO("server", "Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
+ LOG_INFO("entities.unit", "Unit %u is in controlled list of %u when removed from world", GetEntry(), owner->GetEntry());
//ABORT();
}
}
@@ -15776,10 +15726,8 @@ 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))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
uint32 Id = i->aura->GetId();
LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), Id);
-#endif
takeCharges = true;
}
@@ -15803,9 +15751,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
{
case SPELL_AURA_PROC_TRIGGER_SPELL:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId());
-#endif
// Don`t drop charge or add cooldown for not started trigger
if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -15824,9 +15770,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
case SPELL_AURA_MANA_SHIELD:
case SPELL_AURA_DUMMY:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId());
-#endif
if (HandleDummyAuraProc(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
break;
@@ -15840,19 +15784,15 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
break;
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId());
-#endif
if (HandleOverrideClassScriptAuraProc(target, damage, triggeredByAura, procSpell, cooldown))
takeCharges = true;
break;
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
(isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId());
-#endif
if (damage > 0)
{
HandleAuraRaidProcFromChargeWithValue(triggeredByAura);
@@ -15862,19 +15802,15 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
}
case SPELL_AURA_RAID_PROC_FROM_CHARGE:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
(isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId());
-#endif
HandleAuraRaidProcFromCharge(triggeredByAura);
takeCharges = true;
break;
}
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId());
-#endif
if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
takeCharges = true;
@@ -16691,7 +16627,7 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id)
if (!pet->InitStatsForLevel(level))
{
- LOG_ERROR("server", "Pet::InitStatsForLevel() failed for creature (Entry: %u)!", pet->GetEntry());
+ LOG_ERROR("entities.unit", "Pet::InitStatsForLevel() failed for creature (Entry: %u)!", pet->GetEntry());
return false;
}
@@ -16836,9 +16772,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura)
// Currently only Prayer of Mending
if (!(spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellFamilyFlags[1] & 0x20))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
-#endif
return false;
}
@@ -16936,7 +16870,7 @@ bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura)
damageSpellId = 43594;
break;
default:
- LOG_ERROR("server", "Unit::HandleAuraRaidProcFromCharge, received unhandled spell: %u", spellProto->Id);
+ LOG_ERROR("entities.unit", "Unit::HandleAuraRaidProcFromCharge, received unhandled spell: %u", spellProto->Id);
return false;
}
@@ -17144,9 +17078,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
if (!spiritOfRedemption)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "SET JUST_DIED");
-#endif
+ LOG_DEBUG("entities.unit", "SET JUST_DIED");
victim->setDeathState(JUST_DIED);
}
@@ -17171,9 +17103,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
// only if not player and not controlled by player pet. And not at BG
if ((durabilityLoss && !player && !plrVictim->InBattleground()) || (player && sWorld->getBoolConfig(CONFIG_DURABILITY_LOSS_IN_PVP)))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
-#endif
+ LOG_DEBUG("entities.unit", "We are dead, losing %f percent durability", sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH));
plrVictim->DurabilityLossAll(sWorld->getRate(RATE_DURABILITY_LOSS_ON_DEATH), false);
// durability lost message
WorldPacket data(SMSG_DURABILITY_DAMAGE_DEATH, 0);
@@ -17193,9 +17123,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
}
else // creature died
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "DealDamageNotPlayer");
-#endif
+ LOG_DEBUG("entities.unit", "DealDamageNotPlayer");
if (!creature->IsPet() && creature->GetLootMode() > 0)
{
@@ -17635,14 +17563,12 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
throw 1;
ASSERT((type == CHARM_TYPE_VEHICLE) == IsVehicle());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "SetCharmedBy: charmer %u (%s), charmed %u (%s), type %u.",
charmer->GetEntry(), charmer->GetGUID().ToString().c_str(), GetEntry(), GetGUID().ToString().c_str(), uint32(type));
-#endif
if (this == charmer)
{
- LOG_FATAL("server", "Unit::SetCharmedBy: Unit %u (%s) is trying to charm itself!", GetEntry(), GetGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit::SetCharmedBy: Unit %u (%s) is trying to charm itself!", GetEntry(), GetGUID().ToString().c_str());
return false;
}
@@ -17651,14 +17577,14 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->GetTransport())
{
- LOG_FATAL("server", "Unit::SetCharmedBy: Player on transport is trying to charm %u (%s)", GetEntry(), GetGUID().ToString().c_str());
+ LOG_FATAL("entities.unit", "Unit::SetCharmedBy: Player on transport is trying to charm %u (%s)", GetEntry(), GetGUID().ToString().c_str());
return false;
}
// Already charmed
if (GetCharmerGUID())
{
- LOG_FATAL("server", "Unit::SetCharmedBy: %u (%s) has already been charmed but %u (%s) is trying to charm it!",
+ LOG_FATAL("entities.unit", "Unit::SetCharmedBy: %u (%s) has already been charmed but %u (%s) is trying to charm it!",
GetEntry(), GetGUID().ToString().c_str(), charmer->GetEntry(), charmer->GetGUID().ToString().c_str());
return false;
}
@@ -17689,7 +17615,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
// StopCastingCharm may remove a possessed pet?
if (!IsInWorld())
{
- LOG_FATAL("server", "Unit::SetCharmedBy: %u (%s) is not in world but %u (%s) is trying to charm it!",
+ LOG_FATAL("entities.unit", "Unit::SetCharmedBy: %u (%s) is not in world but %u (%s) is trying to charm it!",
GetEntry(), GetGUID().ToString().c_str(), charmer->GetEntry(), charmer->GetGUID().ToString().c_str());
return false;
}
@@ -17819,7 +17745,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
charmer = GetCharmer();
if (charmer != GetCharmer()) // one aura overrides another?
{
- // LOG_FATAL("server", "Unit::RemoveCharmedBy: this: %s true charmer: %s false charmer: %s",
+ // LOG_FATAL("entities.unit", "Unit::RemoveCharmedBy: this: %s true charmer: %s false charmer: %s",
// GetGUID().ToString().c_str(), GetCharmerGUID().ToString().c_str(), charmer->GetGUID().ToString().c_str());
// ABORT();
return;
@@ -17904,7 +17830,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
if (GetCharmInfo())
GetCharmInfo()->SetPetNumber(0, true);
else
- LOG_ERROR("server", "Aura::HandleModCharm: target=%s has a charm aura but no charm info!", GetGUID().ToString().c_str());
+ LOG_ERROR("entities.unit", "Aura::HandleModCharm: target=%s has a charm aura but no charm info!", GetGUID().ToString().c_str());
}
}
break;
@@ -18878,9 +18804,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
{
if (seatId >= 0 && seatId != GetTransSeat())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId);
-#endif
ChangeSeat(seatId);
}
@@ -18888,9 +18812,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry());
-#endif
ExitVehicle();
}
}
@@ -19299,9 +19221,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
{
uint32 count = getThreatManager().getThreatList().size();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
-#endif
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
data << GetPackGUID();
data << pHostileReference->getUnitGuid().WriteAsPacked();
@@ -19318,9 +19238,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
void Unit::SendClearThreatListOpcode()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "WORLD: Send SMSG_THREAT_CLEAR Message");
-#endif
WorldPacket data(SMSG_THREAT_CLEAR, 8);
data << GetPackGUID();
SendMessageToSet(&data, false);
@@ -19328,9 +19246,7 @@ void Unit::SendClearThreatListOpcode()
void Unit::SendRemoveFromThreatListOpcode(HostileReference* pHostileReference)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "WORLD: Send SMSG_THREAT_REMOVE Message");
-#endif
WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8);
data << GetPackGUID();
data << pHostileReference->getUnitGuid().WriteAsPacked();
@@ -19404,40 +19320,40 @@ void Unit::StopAttackFaction(uint32 faction_id)
void Unit::OutDebugInfo() const
{
- LOG_ERROR("server", "Unit::OutDebugInfo");
- LOG_INFO("server", "GUID %s, name %s", GetGUID().ToString().c_str(), GetName().c_str());
- LOG_INFO("server", "OwnerGUID %s, MinionGUID %s, CharmerGUID %s, CharmedGUID %s",
+ LOG_ERROR("entities.unit", "Unit::OutDebugInfo");
+ LOG_INFO("entities.unit", "GUID %s, name %s", GetGUID().ToString().c_str(), GetName().c_str());
+ LOG_INFO("entities.unit", "OwnerGUID %s, MinionGUID %s, CharmerGUID %s, CharmedGUID %s",
GetOwnerGUID().ToString().c_str(), GetMinionGUID().ToString().c_str(), GetCharmerGUID().ToString().c_str(), GetCharmGUID().ToString().c_str());
- LOG_INFO("server", "In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
+ LOG_INFO("entities.unit", "In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
if (IsInWorld())
- LOG_INFO("server", "Mapid %u", GetMapId());
+ LOG_INFO("entities.unit", "Mapid %u", GetMapId());
- LOG_INFO("server", "Summon Slot: ");
+ LOG_INFO("entities.unit", "Summon Slot: ");
for (uint32 i = 0; i < MAX_SUMMON_SLOT; ++i)
- LOG_INFO("server", "%s, ", m_SummonSlot[i].ToString().c_str());
- LOG_INFO("server", " ");
+ LOG_INFO("entities.unit", "%s, ", m_SummonSlot[i].ToString().c_str());
+ LOG_INFO("server.loading", " ");
- LOG_INFO("server", "Controlled List: ");
+ LOG_INFO("entities.unit", "Controlled List: ");
for (ControlSet::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
- LOG_INFO("server", "%s, ", (*itr)->GetGUID().ToString().c_str());
- LOG_INFO("server", " ");
+ LOG_INFO("entities.unit", "%s, ", (*itr)->GetGUID().ToString().c_str());
+ LOG_INFO("server.loading", " ");
- LOG_INFO("server", "Aura List: ");
+ LOG_INFO("entities.unit", "Aura List: ");
for (AuraApplicationMap::const_iterator itr = m_appliedAuras.begin(); itr != m_appliedAuras.end(); ++itr)
- LOG_INFO("server", "%u, ", itr->first);
- LOG_INFO("server", " ");
+ LOG_INFO("entities.unit", "%u, ", itr->first);
+ LOG_INFO("server.loading", " ");
if (IsVehicle())
{
- LOG_INFO("server", "Passenger List: ");
+ LOG_INFO("entities.unit", "Passenger List: ");
for (SeatMap::iterator itr = GetVehicleKit()->Seats.begin(); itr != GetVehicleKit()->Seats.end(); ++itr)
if (Unit* passenger = ObjectAccessor::GetUnit(*GetVehicleBase(), itr->second.Passenger.Guid))
- LOG_INFO("server", "%s, ", passenger->GetGUID().ToString().c_str());
- LOG_INFO("server", " ");
+ LOG_INFO("entities.unit", "%s, ", passenger->GetGUID().ToString().c_str());
+ LOG_INFO("server.loading", " ");
}
if (GetVehicle())
- LOG_INFO("server", "On vehicle %u.", GetVehicleBase()->GetEntry());
+ LOG_INFO("entities.unit", "On vehicle %u.", GetVehicleBase()->GetEntry());
}
class AuraMunchingQueue : public BasicEvent
diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp
index 24f5db3e64..9323c090f2 100644
--- a/src/server/game/Entities/Vehicle/Vehicle.cpp
+++ b/src/server/game/Entities/Vehicle/Vehicle.cpp
@@ -50,13 +50,12 @@ Vehicle::~Vehicle()
{
if (Unit* unit = ObjectAccessor::GetUnit(*_me, itr->second.Passenger.Guid))
{
- LOG_INFO("server", "ZOMG! ~Vehicle(), unit: %s, entry: %u, typeid: %u, this_entry: %u, this_typeid: %u!", unit->GetName().c_str(), unit->GetEntry(), unit->GetTypeId(), _me ? _me->GetEntry() : 0, _me ? _me->GetTypeId() : 0);
+ LOG_FATAL("vehicles", "ZOMG! ~Vehicle(), unit: %s, entry: %u, typeid: %u, this_entry: %u, this_typeid: %u!", unit->GetName().c_str(), unit->GetEntry(), unit->GetTypeId(), _me ? _me->GetEntry() : 0, _me ? _me->GetTypeId() : 0);
unit->_ExitVehicle();
}
else
- LOG_INFO("server", "ZOMG! ~Vehicle(), unknown guid!");
+ LOG_FATAL("vehicles", "ZOMG! ~Vehicle(), unknown guid!");
}
- //ASSERT(!itr->second.IsEmpty());
}
void Vehicle::Install()
@@ -93,14 +92,12 @@ void Vehicle::Uninstall()
/// @Prevent recursive uninstall call. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
if (_status == STATUS_UNINSTALLING && !GetBase()->HasUnitTypeMask(UNIT_MASK_MINION))
{
- LOG_ERROR("server", "Vehicle %s attempts to uninstall, but already has STATUS_UNINSTALLING! "
+ LOG_ERROR("vehicles", "Vehicle %s attempts to uninstall, but already has STATUS_UNINSTALLING! "
"Check Uninstall/PassengerBoarded script hooks for errors.", _me->GetGUID().ToString().c_str());
return;
}
_status = STATUS_UNINSTALLING;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Vehicle::Uninstall %s", _me->GetGUID().ToString().c_str());
-#endif
RemoveAllPassengers();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
@@ -109,9 +106,7 @@ void Vehicle::Uninstall()
void Vehicle::Reset(bool evading /*= false*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Vehicle::Reset: %s", _me->GetGUID().ToString().c_str());
-#endif
if (_me->GetTypeId() == TYPEID_PLAYER)
{
if (_usableSeatNum)
@@ -195,9 +190,7 @@ void Vehicle::ApplyAllImmunities()
void Vehicle::RemoveAllPassengers()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Vehicle::RemoveAllPassengers. %s", _me->GetGUID().ToString().c_str());
-#endif
// Passengers always cast an aura with SPELL_AURA_CONTROL_VEHICLE on the vehicle
// We just remove the aura and the unapply handler will make the target leave the vehicle.
@@ -261,14 +254,12 @@ 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)
{
- LOG_ERROR("server", "Vehicle %s attempts to install accessory Entry: %u on seat %d with STATUS_UNINSTALLING! "
+ LOG_ERROR("vehicles", "Vehicle %s attempts to install accessory Entry: %u on seat %d with STATUS_UNINSTALLING! "
"Check Uninstall/PassengerBoarded script hooks for errors.", _me->GetGUID().ToString().c_str(), entry, (int32)seatId);
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Vehicle: Installing accessory entry %u on vehicle entry %u (seat:%i)", entry, GetCreatureEntry(), seatId);
-#endif
if (Unit* passenger = GetPassenger(seatId))
{
// already installed
@@ -307,10 +298,8 @@ 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)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Passenger %s, attempting to board vehicle %s during uninstall! SeatId: %i",
unit->GetGUID().ToString().c_str(), _me->GetGUID().ToString().c_str(), (int32)seatId);
-#endif
return false;
}
@@ -344,10 +333,8 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
ASSERT(seat->second.IsEmpty());
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Unit %s enter vehicle entry %u id %u (%s) seat %d",
unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().ToString().c_str(), (int32)seat->first);
-#endif
seat->second.Passenger.Guid = unit->GetGUID();
seat->second.Passenger.IsUnselectable = unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -394,15 +381,15 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
}
catch (...)
{
- LOG_INFO("server", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy()!");
- LOG_INFO("server", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). not null: %u", _me ? 1 : 0);
+ LOG_INFO("vehicles", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy()!");
+ LOG_INFO("vehicles", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). not null: %u", _me ? 1 : 0);
if (!_me)
return false;
- LOG_INFO("server", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Is: %u!", _me->IsInWorld());
- LOG_INFO("server", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Is2: %u!", _me->IsDuringRemoveFromWorld());
- LOG_INFO("server", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Unit %s!", _me->GetName().c_str());
- LOG_INFO("server", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). typeid: %u!", _me->GetTypeId());
- LOG_INFO("server", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Unit %s, typeid: %u, in world: %u, duringremove: %u has wrong CharmType! Charmer %s, typeid: %u, in world: %u, duringremove: %u.", _me->GetName().c_str(), _me->GetTypeId(), _me->IsInWorld(), _me->IsDuringRemoveFromWorld(), unit->GetName().c_str(), unit->GetTypeId(), unit->IsInWorld(), unit->IsDuringRemoveFromWorld());
+ LOG_INFO("vehicles", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Is: %u!", _me->IsInWorld());
+ LOG_INFO("vehicles", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Is2: %u!", _me->IsDuringRemoveFromWorld());
+ LOG_INFO("vehicles", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Unit %s!", _me->GetName().c_str());
+ LOG_INFO("vehicles", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). typeid: %u!", _me->GetTypeId());
+ LOG_INFO("vehicles", "ZOMG! CRASH! Try-catch in Unit::SetCharmedBy(). Unit %s, typeid: %u, in world: %u, duringremove: %u has wrong CharmType! Charmer %s, typeid: %u, in world: %u, duringremove: %u.", _me->GetName().c_str(), _me->GetTypeId(), _me->IsInWorld(), _me->IsDuringRemoveFromWorld(), unit->GetName().c_str(), unit->GetTypeId(), unit->IsInWorld(), unit->IsDuringRemoveFromWorld());
return false;
}
}
@@ -456,10 +443,8 @@ void Vehicle::RemovePassenger(Unit* unit)
if (seat == Seats.end())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Unit %s exit vehicle entry %u id %u (%s) seat %d",
unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().ToString().c_str(), (int32)seat->first);
-#endif
if (seat->second.SeatInfo->CanEnterOrExit() && ++_usableSeatNum)
_me->SetFlag(UNIT_NPC_FLAGS, (_me->GetTypeId() == TYPEID_PLAYER ? UNIT_NPC_FLAG_PLAYER_VEHICLE : UNIT_NPC_FLAG_SPELLCLICK));
@@ -525,9 +510,7 @@ void Vehicle::Dismiss()
if (GetBase()->GetTypeId() != TYPEID_UNIT)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("vehicles", "Vehicle::Dismiss %s", _me->GetGUID().ToString().c_str());
-#endif
Uninstall();
GetBase()->ToCreature()->DespawnOrUnsummon();
}
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp
index ae8a97238c..b090218aac 100644
--- a/src/server/game/Events/GameEventMgr.cpp
+++ b/src/server/game/Events/GameEventMgr.cpp
@@ -223,7 +223,7 @@ void GameEventMgr::LoadFromDB()
{
mGameEvent.clear();
LOG_ERROR("sql.sql", ">> Loaded 0 game events. DB table `game_event` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -276,11 +276,11 @@ void GameEventMgr::LoadFromDB()
}
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
- LOG_INFO("server", "Loading Game Event Saves Data...");
+ LOG_INFO("server.loading", "Loading Game Event Saves Data...");
{
uint32 oldMSTime = getMSTime();
@@ -289,8 +289,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 game event saves in game events. DB table `game_event_save` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -321,12 +321,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u game event saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Prerequisite Data...");
+ LOG_INFO("server.loading", "Loading Game Event Prerequisite Data...");
{
uint32 oldMSTime = getMSTime();
@@ -334,8 +334,8 @@ void GameEventMgr::LoadFromDB()
QueryResult result = WorldDatabase.Query("SELECT eventEntry, prerequisite_event FROM game_event_prerequisite");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 game event prerequisites in game events. DB table `game_event_prerequisite` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -371,12 +371,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u game event prerequisites in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Creature Data...");
+ LOG_INFO("server.loading", "Loading Game Event Creature Data...");
{
uint32 oldMSTime = getMSTime();
@@ -386,8 +386,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 creatures in game events. DB table `game_event_creature` is empty");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -413,12 +413,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creatures in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event GO Data...");
+ LOG_INFO("server.loading", "Loading Game Event GO Data...");
{
uint32 oldMSTime = getMSTime();
@@ -428,8 +428,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 gameobjects in game events. DB table `game_event_gameobject` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -455,12 +455,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u gameobjects in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Model/Equipment Change Data...");
+ LOG_INFO("server.loading", "Loading Game Event Model/Equipment Change Data...");
{
uint32 oldMSTime = getMSTime();
@@ -470,8 +470,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 model/equipment changes in game events. DB table `game_event_model_equip` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -513,12 +513,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u model/equipment changes in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Quest Data...");
+ LOG_INFO("server.loading", "Loading Game Event Quest Data...");
{
uint32 oldMSTime = getMSTime();
@@ -527,8 +527,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 quests additions in game events. DB table `game_event_creature_quest` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -553,12 +553,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event GO Quest Data...");
+ LOG_INFO("server.loading", "Loading Game Event GO Quest Data...");
{
uint32 oldMSTime = getMSTime();
@@ -567,8 +567,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 go quests additions in game events. DB table `game_event_gameobject_quest` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -593,12 +593,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Quest Condition Data...");
+ LOG_INFO("server.loading", "Loading Game Event Quest Condition Data...");
{
uint32 oldMSTime = getMSTime();
@@ -607,8 +607,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 quest event conditions in game events. DB table `game_event_quest_condition` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -635,12 +635,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quest event conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Condition Data...");
+ LOG_INFO("server.loading", "Loading Game Event Condition Data...");
{
uint32 oldMSTime = getMSTime();
@@ -649,8 +649,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 conditions in game events. DB table `game_event_condition` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -676,12 +676,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u conditions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Condition Save Data...");
+ LOG_INFO("server.loading", "Loading Game Event Condition Save Data...");
{
uint32 oldMSTime = getMSTime();
@@ -690,8 +690,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 condition saves in game events. DB table `game_event_condition_save` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -723,12 +723,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u condition saves in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event NPCflag Data...");
+ LOG_INFO("server.loading", "Loading Game Event NPCflag Data...");
{
uint32 oldMSTime = getMSTime();
@@ -737,8 +737,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 npcflags in game events. DB table `game_event_npcflag` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -762,12 +762,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u npcflags in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Seasonal Quest Relations...");
+ LOG_INFO("server.loading", "Loading Game Event Seasonal Quest Relations...");
{
uint32 oldMSTime = getMSTime();
@@ -776,8 +776,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 seasonal quests additions in game events. DB table `game_event_seasonal_questrelation` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -807,12 +807,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quests additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Vendor Additions Data...");
+ LOG_INFO("server.loading", "Loading Game Event Vendor Additions Data...");
{
uint32 oldMSTime = getMSTime();
@@ -821,8 +821,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 vendor additions in game events. DB table `game_event_npc_vendor` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -872,12 +872,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u vendor additions in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Battleground Data...");
+ LOG_INFO("server.loading", "Loading Game Event Battleground Data...");
{
uint32 oldMSTime = getMSTime();
@@ -886,8 +886,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -909,12 +909,12 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u battleground holidays in game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Game Event Pool Data...");
+ LOG_INFO("server.loading", "Loading Game Event Pool Data...");
{
uint32 oldMSTime = getMSTime();
@@ -924,8 +924,8 @@ void GameEventMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 pools for game events. DB table `game_event_pool` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -957,8 +957,8 @@ void GameEventMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u pools for game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
}
@@ -972,7 +972,7 @@ void GameEventMgr::LoadHolidayDates()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 holiday dates. DB table `holiday_dates` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 holiday dates. DB table `holiday_dates` is empty.");
return;
}
@@ -1009,7 +1009,7 @@ void GameEventMgr::LoadHolidayDates()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u holiday dates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u holiday dates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
uint32 GameEventMgr::GetNPCFlag(Creature* cr)
@@ -1067,7 +1067,7 @@ void GameEventMgr::StartArenaSeason()
if (!result)
{
- LOG_ERROR("server", "ArenaSeason (%u) must be an existant Arena Season", season);
+ LOG_ERROR("gameevent", "ArenaSeason (%u) must be an existant Arena Season", season);
return;
}
@@ -1076,13 +1076,13 @@ void GameEventMgr::StartArenaSeason()
if (eventId >= mGameEvent.size())
{
- LOG_ERROR("server", "EventEntry %u for ArenaSeason (%u) does not exists", eventId, season);
+ LOG_ERROR("gameevent", "EventEntry %u for ArenaSeason (%u) does not exists", eventId, season);
return;
}
StartEvent(eventId, true);
- LOG_INFO("server", "Arena Season %u started...", season);
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Arena Season %u started...", season);
+ LOG_INFO("server.loading", " ");
}
uint32 GameEventMgr::Update() // return the next event delay in ms
@@ -1154,17 +1154,13 @@ uint32 GameEventMgr::Update() // return the next e
for (std::set<uint16>::iterator itr = deactivate.begin(); itr != deactivate.end(); ++itr)
StopEvent(*itr);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Next game event check in %u seconds.", nextEventDelay + 1);
-#endif
+ LOG_DEBUG("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)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str());
-#endif
+ LOG_DEBUG("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
@@ -1193,9 +1189,7 @@ void GameEventMgr::ApplyNewEvent(uint16 event_id)
if (announce == 1 || (announce == 2 && sWorld->getIntConfig(CONFIG_EVENT_ANNOUNCE)))
sWorld->SendWorldText(LANG_EVENTMESSAGE, mGameEvent[event_id].description.c_str());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str());
-#endif
+ LOG_DEBUG("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);
@@ -1278,7 +1272,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- LOG_ERROR("server", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SZFMTD ")",
+ LOG_ERROR("gameevent", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SZFMTD ")",
internal_event_id, mGameEventCreatureGuids.size());
return;
}
@@ -1304,7 +1298,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- LOG_ERROR("server", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SZFMTD ")",
+ LOG_ERROR("gameevent", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SZFMTD ")",
internal_event_id, mGameEventGameobjectGuids.size());
return;
}
@@ -1336,7 +1330,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if (internal_event_id >= int32(mGameEventPoolIds.size()))
{
- LOG_ERROR("server", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SZFMTD ")",
+ LOG_ERROR("gameevent", "GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SZFMTD ")",
internal_event_id, mGameEventPoolIds.size());
return;
}
@@ -1351,7 +1345,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
{
- LOG_ERROR("server", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SZFMTD ")",
+ LOG_ERROR("gameevent", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SZFMTD ")",
internal_event_id, mGameEventCreatureGuids.size());
return;
}
@@ -1382,7 +1376,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if (internal_event_id >= int32(mGameEventGameobjectGuids.size()))
{
- LOG_ERROR("server", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SZFMTD ")",
+ LOG_ERROR("gameevent", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SZFMTD ")",
internal_event_id, mGameEventGameobjectGuids.size());
return;
}
@@ -1411,7 +1405,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
}
if (internal_event_id >= int32(mGameEventPoolIds.size()))
{
- LOG_ERROR("server", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SZFMTD ")", internal_event_id, mGameEventPoolIds.size());
+ LOG_ERROR("gameevent", "GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SZFMTD ")", internal_event_id, mGameEventPoolIds.size());
return;
}
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index ea363bed03..ceae6dec88 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -396,7 +396,7 @@ void ObjectMgr::LoadCreatureLocales()
AddLocaleString(fields[3].GetString(), locale, data.Title);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %lu Creature Locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %lu Creature Locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadGossipMenuItemsLocales()
@@ -427,7 +427,7 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
AddLocaleString(fields[4].GetString(), locale, data.BoxText);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Gossip Menu Option Locale strings in %u ms", (uint32)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Gossip Menu Option Locale strings in %u ms", (uint32)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadPointOfInterestLocales()
@@ -456,7 +456,7 @@ void ObjectMgr::LoadPointOfInterestLocales()
AddLocaleString(fields[2].GetString(), locale, data.Name);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Points Of Interest Locale strings in %u ms", (uint32)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Points Of Interest Locale strings in %u ms", (uint32)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadCreatureTemplates()
@@ -479,7 +479,7 @@ void ObjectMgr::LoadCreatureTemplates()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creature template definitions. DB table `creature_template` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 creature template definitions. DB table `creature_template` is empty.");
return;
}
@@ -518,8 +518,8 @@ void ObjectMgr::LoadCreatureTemplates()
itr->second.InitializeQueryData();
}
- LOG_INFO("server", ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadCreatureTemplate(Field* fields)
@@ -709,8 +709,8 @@ void ObjectMgr::LoadCreatureTemplateAddons()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 creature template addon definitions. DB table `creature_template_addon` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -768,8 +768,8 @@ void ObjectMgr::LoadCreatureTemplateAddons()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
@@ -1121,8 +1121,8 @@ void ObjectMgr::LoadCreatureAddons()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 creature addon definitions. DB table `creature_addon` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1187,8 +1187,8 @@ void ObjectMgr::LoadCreatureAddons()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadGameObjectAddons()
@@ -1200,8 +1200,8 @@ void ObjectMgr::LoadGameObjectAddons()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 gameobject addon definitions. DB table `gameobject_addon` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 gameobject addon definitions. DB table `gameobject_addon` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1239,8 +1239,8 @@ void ObjectMgr::LoadGameObjectAddons()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u gameobject addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u gameobject addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
GameObjectAddon const* ObjectMgr::GetGameObjectAddon(ObjectGuid::LowType lowguid)
@@ -1305,8 +1305,8 @@ void ObjectMgr::LoadEquipmentTemplates()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 creature equipment templates. DB table `creature_equip_template` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1319,14 +1319,14 @@ void ObjectMgr::LoadEquipmentTemplates()
if (!sObjectMgr->GetCreatureTemplate(entry))
{
- LOG_ERROR("server", "Creature template (CreatureID: %u) does not exist but has a record in `creature_equip_template`", entry);
+ LOG_ERROR("sql.sql", "Creature template (CreatureID: %u) does not exist but has a record in `creature_equip_template`", entry);
continue;
}
uint8 id = fields[1].GetUInt8();
if (!id)
{
- LOG_ERROR("server", "Creature equipment template with id 0 found for creature %u, skipped.", entry);
+ LOG_ERROR("sql.sql", "Creature equipment template with id 0 found for creature %u, skipped.", entry);
continue;
}
@@ -1370,8 +1370,8 @@ void ObjectMgr::LoadEquipmentTemplates()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u equipment templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
CreatureModelInfo const* ObjectMgr::GetCreatureModelInfo(uint32 modelId)
@@ -1443,8 +1443,8 @@ void ObjectMgr::LoadCreatureModelInfo()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 creature model definitions. DB table `creature_model_info` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1487,8 +1487,8 @@ void ObjectMgr::LoadCreatureModelInfo()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature model based info in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadLinkedRespawn()
@@ -1502,7 +1502,7 @@ void ObjectMgr::LoadLinkedRespawn()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 linked respawns. DB table `linked_respawn` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1672,8 +1672,8 @@ void ObjectMgr::LoadLinkedRespawn()
_linkedRespawnStore[guid] = linkedGuid;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded " UI64FMTD " linked respawns in %u ms", uint64(_linkedRespawnStore.size()), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool ObjectMgr::SetCreatureLinkedRespawn(ObjectGuid::LowType guidLow, ObjectGuid::LowType linkedGuidLow)
@@ -1696,7 +1696,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(ObjectGuid::LowType guidLow, ObjectGuid
CreatureData const* slave = GetCreatureData(linkedGuidLow);
if (!slave)
{
- // LOG_ERROR("server", "sql.sql", "Creature '%u' linking to non-existent creature '%u'.", guidLow, linkedGuidLow);
+ LOG_ERROR("sql.sql", "Creature '%u' linking to non-existent creature '%u'.", guidLow, linkedGuidLow);
return false;
}
@@ -1732,7 +1732,7 @@ void ObjectMgr::LoadTempSummons()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 temp summons. DB table `creature_summon_groups` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 temp summons. DB table `creature_summon_groups` is empty.");
return;
}
@@ -1750,26 +1750,26 @@ void ObjectMgr::LoadTempSummons()
case SUMMONER_TYPE_CREATURE:
if (!GetCreatureTemplate(summonerId))
{
- LOG_ERROR("server", "Table `creature_summon_groups` has summoner with non existing entry %u for creature summoner type, skipped.", summonerId);
+ 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))
{
- LOG_ERROR("server", "Table `creature_summon_groups` has summoner with non existing entry %u for gameobject summoner type, skipped.", summonerId);
+ 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))
{
- LOG_ERROR("server", "Table `creature_summon_groups` has summoner with non existing entry %u for map summoner type, skipped.", summonerId);
+ LOG_ERROR("sql.sql", "Table `creature_summon_groups` has summoner with non existing entry %u for map summoner type, skipped.", summonerId);
continue;
}
break;
default:
- LOG_ERROR("server", "Table `creature_summon_groups` has unhandled summoner type %u for summoner %u, skipped.", summonerType, summonerId);
+ LOG_ERROR("sql.sql", "Table `creature_summon_groups` has unhandled summoner type %u for summoner %u, skipped.", summonerType, summonerId);
continue;
}
@@ -1778,7 +1778,7 @@ void ObjectMgr::LoadTempSummons()
if (!GetCreatureTemplate(data.entry))
{
- LOG_ERROR("server", "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);
+ 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;
}
@@ -1793,7 +1793,7 @@ void ObjectMgr::LoadTempSummons()
if (data.type > TEMPSUMMON_MANUAL_DESPAWN)
{
- LOG_ERROR("server", "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);
+ 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;
}
@@ -1805,8 +1805,8 @@ void ObjectMgr::LoadTempSummons()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u temp summons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u temp summons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadCreatures()
@@ -1824,7 +1824,7 @@ void ObjectMgr::LoadCreatures()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 creatures. DB table `creature` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1972,8 +1972,8 @@ void ObjectMgr::LoadCreatures()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::AddCreatureToGrid(ObjectGuid::LowType guid, CreatureData const* data)
@@ -2044,15 +2044,13 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
GameObject* go = sObjectMgr->IsGameObjectStaticTransport(data.id) ? new StaticTransport() : new GameObject();
if (!go->LoadGameObjectFromDB(spawnId, map))
{
- LOG_ERROR("server", "AddGOData: cannot add gameobject entry %u to map", entry);
+ LOG_ERROR("sql.sql", "AddGOData: cannot add gameobject entry %u to map", entry);
delete go;
return 0;
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "AddGOData: spawnId %u entry %u map %u x %f y %f z %f o %f", spawnId, entry, mapId, x, y, z, o);
-#endif
return spawnId;
}
@@ -2101,7 +2099,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 mapId, float x, float y, float
Creature* creature = new Creature();
if (!creature->LoadCreatureFromDB(spawnId, map, true, false, true))
{
- LOG_ERROR("server", "AddCreature: Cannot add creature entry %u to map", entry);
+ LOG_ERROR("sql.sql", "AddCreature: Cannot add creature entry %u to map", entry);
delete creature;
return 0;
}
@@ -2126,7 +2124,7 @@ void ObjectMgr::LoadGameobjects()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 gameobjects. DB table `gameobject` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2273,8 +2271,8 @@ void ObjectMgr::LoadGameobjects()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %lu gameobjects in %u ms", (unsigned long)_gameObjectDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::AddGameobjectToGrid(ObjectGuid::LowType guid, GameObjectData const* data)
@@ -2380,7 +2378,7 @@ void ObjectMgr::LoadItemLocales()
AddLocaleString(fields[3].GetString(), locale, data.Description);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Item Locale strings in %u ms", (uint32)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Item Locale strings in %u ms", (uint32)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadItemTemplates()
@@ -2422,8 +2420,8 @@ void ObjectMgr::LoadItemTemplates()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 item templates. DB table `item_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 item templates. DB table `item_template` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2968,8 +2966,8 @@ void ObjectMgr::LoadItemTemplates()
for (std::set<uint32>::const_iterator itr = notFoundOutfit.begin(); itr != notFoundOutfit.end(); ++itr)
LOG_ERROR("sql.sql", "Item (Entry: %u) does not exist in `item_template` but is referenced in `CharStartOutfit.dbc`", *itr);
- LOG_INFO("server", ">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u item templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
ItemTemplate const* ObjectMgr::GetItemTemplate(uint32 entry)
@@ -3002,7 +3000,7 @@ void ObjectMgr::LoadItemSetNameLocales()
AddLocaleString(fields[2].GetString(), locale, data.Name);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Item Set Name Locale strings in %u ms", uint32(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Item Set Name Locale strings in %u ms", uint32(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadItemSetNames()
@@ -3030,8 +3028,8 @@ void ObjectMgr::LoadItemSetNames()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 item set names. DB table `item_set_names` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 item set names. DB table `item_set_names` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -3085,8 +3083,8 @@ void ObjectMgr::LoadItemSetNames()
}
}
- LOG_INFO("server", ">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u item set names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadVehicleTemplateAccessories()
@@ -3103,7 +3101,7 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 vehicle template accessories. DB table `vehicle_template_accessory` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -3141,8 +3139,8 @@ void ObjectMgr::LoadVehicleTemplateAccessories()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Vehicle Template Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadVehicleAccessories()
@@ -3158,8 +3156,8 @@ void ObjectMgr::LoadVehicleAccessories()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 Vehicle Accessories in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
return;
}
@@ -3185,8 +3183,8 @@ void ObjectMgr::LoadVehicleAccessories()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadPetLevelInfo()
@@ -3199,7 +3197,7 @@ void ObjectMgr::LoadPetLevelInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 level pet stats definitions. DB table `pet_levelstats` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -3223,9 +3221,7 @@ void ObjectMgr::LoadPetLevelInfo()
LOG_ERROR("sql.sql", "Wrong (> %u) level %u in `pet_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level);
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `pet_levelstats` table, ignoring.", current_level);
-#endif
+ LOG_DEBUG("sql.sql", "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;
@@ -3280,8 +3276,8 @@ void ObjectMgr::LoadPetLevelInfo()
}
}
- LOG_INFO("server", ">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u level pet stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
PetLevelInfo const* ObjectMgr::GetPetLevelInfo(uint32 creature_id, uint8 level) const
@@ -3306,7 +3302,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3
else
{
if (count < -1)
- LOG_ERROR("server", "Invalid count %i specified on item %u be removed from original player create info (use -1)!", count, itemId);
+ 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)
{
@@ -3324,7 +3320,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3
}
if (!found)
- LOG_ERROR("server", "Item %u specified to be removed from original create info not found in dbc!", itemId);
+ LOG_ERROR("sql.sql", "Item %u specified to be removed from original create info not found in dbc!", itemId);
}
}
}
@@ -3340,7 +3336,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
LOG_ERROR("sql.sql", ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty.");
exit(1);
}
@@ -3395,7 +3391,7 @@ void ObjectMgr::LoadPlayerInfo()
if (sMapStore.LookupEntry(mapId)->Instanceable())
{
- LOG_ERROR("server", "Home position in instanceable map for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
+ LOG_ERROR("sql.sql", "Home position in instanceable map for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
continue;
}
@@ -3413,13 +3409,13 @@ void ObjectMgr::LoadPlayerInfo()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// Load playercreate items
- LOG_INFO("server", "Loading Player Create Items Data...");
+ LOG_INFO("server.loading", "Loading Player Create Items Data...");
{
uint32 oldMSTime = getMSTime();
// 0 1 2 3
@@ -3427,8 +3423,8 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 custom player create items. DB table `playercreateinfo_item` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -3484,13 +3480,13 @@ void ObjectMgr::LoadPlayerInfo()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u custom player create items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// Load playercreate spells
- LOG_INFO("server", "Loading Player Create Spell Data...");
+ LOG_INFO("server.loading", "Loading Player Create Spell Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3537,23 +3533,19 @@ void ObjectMgr::LoadPlayerInfo()
info->spell.push_back(spellId);
++count;
}
- // 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)
- // LOG_ERROR("server", 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);
}
}
}
}
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u player create spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// Load playercreate actions
- LOG_INFO("server", "Loading Player Create Action Data...");
+ LOG_INFO("server.loading", "Loading Player Create Action Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3563,7 +3555,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 player create actions. DB table `playercreateinfo_action` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -3593,13 +3585,13 @@ void ObjectMgr::LoadPlayerInfo()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u player create actions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// Loading levels data (class only dependent)
- LOG_INFO("server", "Loading Player Create Level HP/Mana Data...");
+ LOG_INFO("server.loading", "Loading Player Create Level HP/Mana Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3608,7 +3600,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 level health/mana definitions. DB table `player_classlevelstats` is empty.");
+ LOG_FATAL("server.loading", ">> Loaded 0 level health/mana definitions. DB table `player_classlevelstats` is empty.");
exit(1);
}
@@ -3621,14 +3613,14 @@ void ObjectMgr::LoadPlayerInfo()
uint32 current_class = fields[0].GetUInt8();
if (current_class >= MAX_CLASSES)
{
- LOG_ERROR("server", "Wrong class %u in `player_classlevelstats` table, ignoring.", current_class);
+ LOG_ERROR("sql.sql", "Wrong class %u in `player_classlevelstats` table, ignoring.", current_class);
continue;
}
uint8 current_level = fields[1].GetUInt8(); // Can't be > than STRONG_MAX_LEVEL (hardcoded level maximum) due to var type
if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
- LOG_INFO("server", "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.", current_level);
+ LOG_INFO("sql.sql", "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.", current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
continue;
}
@@ -3661,7 +3653,7 @@ void ObjectMgr::LoadPlayerInfo()
// fatal error if no level 1 data
if (!pClassInfo->levelInfo || pClassInfo->levelInfo[0].basehealth == 0)
{
- LOG_ERROR("server", "Class %i Level 1 does not have health/mana data!", class_);
+ LOG_ERROR("sql.sql", "Class %i Level 1 does not have health/mana data!", class_);
exit(1);
}
@@ -3670,18 +3662,18 @@ void ObjectMgr::LoadPlayerInfo()
{
if (pClassInfo->levelInfo[level].basehealth == 0)
{
- LOG_ERROR("server", "Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level + 1, level);
+ LOG_ERROR("sql.sql", "Class %i Level %i does not have health/mana data. Using stats data of level %i.", class_, level + 1, level);
pClassInfo->levelInfo[level] = pClassInfo->levelInfo[level - 1];
}
}
}
- LOG_INFO("server", ">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u level health/mana definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
// Loading levels data (class/race dependent)
- LOG_INFO("server", "Loading Player Create Level Stats Data...");
+ LOG_INFO("server.loading", "Loading Player Create Level Stats Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3691,7 +3683,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 level stats definitions. DB table `player_levelstats` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
exit(1);
}
@@ -3722,9 +3714,7 @@ void ObjectMgr::LoadPlayerInfo()
LOG_ERROR("sql.sql", "Wrong (> %u) level %u in `player_levelstats` table, ignoring.", STRONG_MAX_LEVEL, current_level);
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_levelstats` table, ignoring.", current_level);
-#endif
+ LOG_DEBUG("sql.sql", "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;
@@ -3771,7 +3761,7 @@ void ObjectMgr::LoadPlayerInfo()
// fatal error if no level 1 data
if (!info->levelInfo || info->levelInfo[0].stats[0] == 0)
{
- LOG_ERROR("server", "Race %i Class %i Level 1 does not have stats data!", race, class_);
+ LOG_ERROR("sql.sql", "Race %i Class %i Level 1 does not have stats data!", race, class_);
exit(1);
}
@@ -3780,19 +3770,19 @@ void ObjectMgr::LoadPlayerInfo()
{
if (info->levelInfo[level].stats[0] == 0)
{
- LOG_ERROR("server", "Race %i Class %i Level %i does not have stats data. Using stats data of level %i.", race, class_, level + 1, level);
+ 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];
}
}
}
}
- LOG_INFO("server", ">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u level stats definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
// Loading xp per level data
- LOG_INFO("server", "Loading Player Create XP Data...");
+ LOG_INFO("server.loading", "Loading Player Create XP Data...");
{
uint32 oldMSTime = getMSTime();
@@ -3806,7 +3796,7 @@ void ObjectMgr::LoadPlayerInfo()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 xp for level definitions. DB table `player_xp_for_level` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
exit(1);
}
@@ -3825,9 +3815,7 @@ void ObjectMgr::LoadPlayerInfo()
LOG_ERROR("sql.sql", "Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL, current_level);
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_xp_for_levels` table, ignoring.", current_level);
-#endif
+ LOG_DEBUG("sql.sql", "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;
@@ -3847,8 +3835,8 @@ void ObjectMgr::LoadPlayerInfo()
}
}
- LOG_INFO("server", ">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u xp for level definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
@@ -3998,7 +3986,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 quests definitions. DB table `quest_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -4039,7 +4027,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 quest details. DB table `quest_details` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 quest details. DB table `quest_details` is empty.");
}
else
{
@@ -4052,7 +4040,7 @@ void ObjectMgr::LoadQuests()
if (itr != _questTemplates.end())
itr->second->LoadQuestDetails(fields);
else
- LOG_ERROR("server", "Table `quest_details` has data for quest %u but such quest does not exist", questId);
+ LOG_ERROR("sql.sql", "Table `quest_details` has data for quest %u but such quest does not exist", questId);
} while (result->NextRow());
}
@@ -4062,7 +4050,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 quest request items. DB table `quest_request_items` is empty.");
+ LOG_ERROR("server.loading", ">> Loaded 0 quest request items. DB table `quest_request_items` is empty.");
}
else
{
@@ -4075,7 +4063,7 @@ void ObjectMgr::LoadQuests()
if (itr != _questTemplates.end())
itr->second->LoadQuestRequestItems(fields);
else
- LOG_ERROR("server", "Table `quest_request_items` has data for quest %u but such quest does not exist", questId);
+ LOG_ERROR("sql.sql", "Table `quest_request_items` has data for quest %u but such quest does not exist", questId);
} while (result->NextRow());
}
@@ -4085,7 +4073,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 quest reward emotes. DB table `quest_offer_reward` is empty.");
+ LOG_ERROR("server.loading", ">> Loaded 0 quest reward emotes. DB table `quest_offer_reward` is empty.");
}
else
{
@@ -4098,7 +4086,7 @@ void ObjectMgr::LoadQuests()
if (itr != _questTemplates.end())
itr->second->LoadQuestOfferReward(fields);
else
- LOG_ERROR("server", "Table `quest_offer_reward` has data for quest %u but such quest does not exist", questId);
+ LOG_ERROR("sql.sql", "Table `quest_offer_reward` has data for quest %u but such quest does not exist", questId);
} while (result->NextRow());
}
@@ -4110,7 +4098,7 @@ void ObjectMgr::LoadQuests()
if (!result)
{
- LOG_ERROR("server", ">> Loaded 0 quest template addons. DB table `quest_template_addon` is empty.");
+ LOG_ERROR("server.loading", ">> Loaded 0 quest template addons. DB table `quest_template_addon` is empty.");
}
else
{
@@ -4123,7 +4111,7 @@ void ObjectMgr::LoadQuests()
if (itr != _questTemplates.end())
itr->second->LoadQuestTemplateAddon(fields);
else
- LOG_ERROR("server", "Table `quest_template_addon` has data for quest %u but such quest does not exist", questId);
+ LOG_ERROR("sql.sql", "Table `quest_template_addon` has data for quest %u but such quest does not exist", questId);
} while (result->NextRow());
}
@@ -4176,7 +4164,7 @@ void ObjectMgr::LoadQuests()
{
if (!(qinfo->SpecialFlags & QUEST_SPECIAL_FLAGS_REPEATABLE))
{
- LOG_ERROR("server", "Monthly quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
+ LOG_ERROR("sql.sql", "Monthly quest %u not marked as repeatable in `SpecialFlags`, added.", qinfo->GetQuestId());
qinfo->SpecialFlags |= QUEST_SPECIAL_FLAGS_REPEATABLE;
}
}
@@ -4701,8 +4689,8 @@ void ObjectMgr::LoadQuests()
}
}
- LOG_INFO("server", ">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %lu quests definitions in %u ms", (unsigned long)_questTemplates.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadQuestLocales()
@@ -4738,7 +4726,7 @@ void ObjectMgr::LoadQuestLocales()
AddLocaleString(fields[i + 7].GetString(), locale, data.ObjectiveText[i]);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Quest Locale strings in %u ms", (uint32)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Quest Locale strings in %u ms", (uint32)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadScripts(ScriptsType type)
@@ -4756,7 +4744,7 @@ void ObjectMgr::LoadScripts(ScriptsType type)
if (sScriptMgr->IsScriptScheduled()) // function cannot be called when scripts are in use.
return;
- LOG_INFO("server", "Loading %s...", tableName.c_str());
+ LOG_INFO("server.loading", "Loading %s...", tableName.c_str());
scripts->clear(); // need for reload support
@@ -4766,8 +4754,8 @@ void ObjectMgr::LoadScripts(ScriptsType type)
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str());
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 script definitions. DB table `%s` is empty!", tableName.c_str());
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5051,8 +5039,8 @@ void ObjectMgr::LoadScripts(ScriptsType type)
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u script definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadSpellScripts()
@@ -5159,8 +5147,8 @@ void ObjectMgr::LoadSpellScriptNames()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell script names. DB table `spell_script_names` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5205,8 +5193,8 @@ void ObjectMgr::LoadSpellScriptNames()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell script names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::ValidateSpellScripts()
@@ -5215,8 +5203,8 @@ void ObjectMgr::ValidateSpellScripts()
if (_spellScriptsStore.empty())
{
- LOG_INFO("server", ">> Validated 0 scripts.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Validated 0 scripts.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5236,7 +5224,7 @@ void ObjectMgr::ValidateSpellScripts()
bool valid = true;
if (!spellScript && !auraScript)
{
- LOG_ERROR("server", "TSCR: Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second).c_str());
+ LOG_ERROR("sql.sql", "TSCR: Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second).c_str());
valid = false;
}
if (spellScript)
@@ -5263,8 +5251,8 @@ void ObjectMgr::ValidateSpellScripts()
++count;
}
- LOG_INFO("server", ">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Validated %u scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::InitializeSpellInfoPrecomputedData()
@@ -5288,8 +5276,8 @@ void ObjectMgr::LoadPageTexts()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 page texts. DB table `page_text` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 page texts. DB table `page_text` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5316,8 +5304,8 @@ void ObjectMgr::LoadPageTexts()
}
}
- LOG_INFO("server", ">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u page texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
PageText const* ObjectMgr::GetPageText(uint32 pageEntry)
@@ -5355,7 +5343,7 @@ void ObjectMgr::LoadPageTextLocales()
AddLocaleString(fields[2].GetString(), locale, data.Text);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Page Text Locale strings in %u ms", (uint32)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Page Text Locale strings in %u ms", (uint32)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadInstanceTemplate()
@@ -5367,8 +5355,8 @@ void ObjectMgr::LoadInstanceTemplate()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 instance templates. DB table `page_text` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 instance templates. DB table `page_text` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5396,8 +5384,8 @@ void ObjectMgr::LoadInstanceTemplate()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u instance templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
InstanceTemplate const* ObjectMgr::GetInstanceTemplate(uint32 mapID)
@@ -5418,7 +5406,7 @@ void ObjectMgr::LoadInstanceEncounters()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 instance encounters, table is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5490,8 +5478,8 @@ void ObjectMgr::LoadInstanceEncounters()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u instance encounters in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
GossipText const* ObjectMgr::GetGossipText(uint32 Text_ID) const
@@ -5520,7 +5508,7 @@ void ObjectMgr::LoadGossipText()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 npc texts, table is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5574,8 +5562,8 @@ void ObjectMgr::LoadGossipText()
count++;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadNpcTextLocales()
@@ -5610,7 +5598,7 @@ void ObjectMgr::LoadNpcTextLocales()
}
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Npc Text Locale strings in %u ms", (uint32)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Npc Text Locale strings in %u ms", (uint32)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
@@ -5733,8 +5721,8 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
++deletedCount;
} while (result->NextRow());
- LOG_INFO("server", ">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Processed %u expired mails: %u deleted and %u returned in %u ms", deletedCount + returnedCount, deletedCount, returnedCount, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadQuestAreaTriggers()
@@ -5747,8 +5735,8 @@ void ObjectMgr::LoadQuestAreaTriggers()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 quest trigger points. DB table `areatrigger_involvedrelation` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5791,8 +5779,8 @@ void ObjectMgr::LoadQuestAreaTriggers()
_questAreaTriggerStore[trigger_ID] = quest_ID;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadQuestOfferRewardLocale()
@@ -5821,7 +5809,7 @@ void ObjectMgr::LoadQuestOfferRewardLocale()
AddLocaleString(fields[2].GetString(), locale, data.RewardText);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %lu Quest Offer Reward locale strings in %u ms", _questOfferRewardLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %lu Quest Offer Reward locale strings in %u ms", _questOfferRewardLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadQuestRequestItemsLocale()
@@ -5850,7 +5838,7 @@ void ObjectMgr::LoadQuestRequestItemsLocale()
AddLocaleString(fields[2].GetString(), locale, data.CompletionText);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %lu Quest Request Items locale strings in %u ms", _questRequestItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %lu Quest Request Items locale strings in %u ms", _questRequestItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadTavernAreaTriggers()
@@ -5863,8 +5851,8 @@ void ObjectMgr::LoadTavernAreaTriggers()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 tavern triggers. DB table `areatrigger_tavern` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5888,8 +5876,8 @@ void ObjectMgr::LoadTavernAreaTriggers()
_tavernAreaTriggerStore.insert(Trigger_ID);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u tavern triggers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadAreaTriggerScripts()
@@ -5901,8 +5889,8 @@ void ObjectMgr::LoadAreaTriggerScripts()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 areatrigger scripts. DB table `areatrigger_scripts` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -5926,8 +5914,8 @@ void ObjectMgr::LoadAreaTriggerScripts()
_areaTriggerScriptStore[Trigger_ID] = GetScriptId(scriptName);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u areatrigger scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
uint32 ObjectMgr::GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 teamId)
@@ -6044,8 +6032,8 @@ void ObjectMgr::LoadAreaTriggers()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 area trigger definitions. DB table `areatrigger` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 area trigger definitions. DB table `areatrigger` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -6080,8 +6068,8 @@ void ObjectMgr::LoadAreaTriggers()
_areaTriggerStore[at.entry] = at;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u area trigger definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u area trigger definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadAreaTriggerTeleports()
@@ -6095,8 +6083,8 @@ void ObjectMgr::LoadAreaTriggerTeleports()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -6141,8 +6129,8 @@ void ObjectMgr::LoadAreaTriggerTeleports()
_areaTriggerTeleportStore[Trigger_ID] = at;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadAccessRequirements()
@@ -6260,7 +6248,7 @@ void ObjectMgr::LoadAccessRequirements()
ItemTemplate const* pProto = GetItemTemplate(progression_requirement->id);
if (!pProto)
{
- LOG_ERROR("server", "Required item %u for faction %u does not exist for map %u difficulty %u, remove or fix this item requirement.", progression_requirement->id, requirement_faction, mapid, difficulty);
+ LOG_ERROR("sql.sql", "Required item %u for faction %u does not exist for map %u difficulty %u, remove or fix this item requirement.", progression_requirement->id, requirement_faction, mapid, difficulty);
break;
}
@@ -6268,7 +6256,7 @@ void ObjectMgr::LoadAccessRequirements()
break;
}
default:
- LOG_ERROR("server", "requirement_type of %u is not valid for map %u difficulty %u. Please use 0 for achievements, 1 for quest, 2 for items or remove this entry from the db.", requirement_type, mapid, difficulty);
+ LOG_ERROR("sql.sql", "requirement_type of %u is not valid for map %u difficulty %u. Please use 0 for achievements, 1 for quest, 2 for items or remove this entry from the db.", requirement_type, mapid, difficulty);
break;
}
@@ -6418,7 +6406,7 @@ uint32 ObjectMgr::GenerateAuctionID()
{
if (_auctionId >= 0xFFFFFFFE)
{
- LOG_ERROR("server", "Auctions ids overflow!! Can't continue, shutting down server. ");
+ LOG_ERROR("server.worldserver", "Auctions ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return _auctionId++;
@@ -6428,7 +6416,7 @@ uint64 ObjectMgr::GenerateEquipmentSetGuid()
{
if (_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL))
{
- LOG_ERROR("server", "EquipmentSet guid overflow!! Can't continue, shutting down server. ");
+ LOG_ERROR("server.worldserver", "EquipmentSet guid overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
return _equipmentSetGuid++;
@@ -6438,7 +6426,7 @@ uint32 ObjectMgr::GenerateMailID()
{
if (_mailId >= 0xFFFFFFFE)
{
- LOG_ERROR("server", "Mail ids overflow!! Can't continue, shutting down server. ");
+ LOG_ERROR("server.worldserver", "Mail ids overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
std::lock_guard<std::mutex> guard(_mailIdMutex);
@@ -6449,7 +6437,7 @@ uint32 ObjectMgr::GenerateCreatureSpawnId()
{
if (_creatureSpawnId >= uint32(0xFFFFFF))
{
- LOG_ERROR("server", "Creature spawn id overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info.");
+ LOG_ERROR("server.worldserver", "Creature spawn id overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info.");
World::StopNow(ERROR_EXIT_CODE);
}
return _creatureSpawnId++;
@@ -6459,7 +6447,7 @@ uint32 ObjectMgr::GenerateGameObjectSpawnId()
{
if (_gameObjectSpawnId >= uint32(0xFFFFFF))
{
- LOG_ERROR("server", "GameObject spawn id overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info. ");
+ LOG_ERROR("server.worldserver", "GameObject spawn id overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info. ");
World::StopNow(ERROR_EXIT_CODE);
}
return _gameObjectSpawnId++;
@@ -6491,7 +6479,7 @@ void ObjectMgr::LoadGameObjectLocales()
AddLocaleString(fields[3].GetString(), locale, data.CastBarCaption);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Gameobject Locale strings in %u ms", (uint32)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Gameobject Locale strings in %u ms", (uint32)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
inline void CheckGOLockId(GameObjectTemplate const* goInfo, uint32 dataN, uint32 N)
@@ -6567,8 +6555,8 @@ void ObjectMgr::LoadGameObjectTemplate()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 gameobject definitions. DB table `gameobject_template` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -6734,8 +6722,8 @@ void ObjectMgr::LoadGameObjectTemplate()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u game object templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadGameObjectTemplateAddons()
@@ -6747,8 +6735,8 @@ void ObjectMgr::LoadGameObjectTemplateAddons()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 gameobject template addon definitions. DB table `gameobject_template_addon` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 gameobject template addon definitions. DB table `gameobject_template_addon` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -6798,8 +6786,8 @@ void ObjectMgr::LoadGameObjectTemplateAddons()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u game object template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u game object template addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadExplorationBaseXP()
@@ -6811,7 +6799,7 @@ void ObjectMgr::LoadExplorationBaseXP()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 BaseXP definitions. DB table `exploration_basexp` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -6826,8 +6814,8 @@ void ObjectMgr::LoadExplorationBaseXP()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u BaseXP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
uint32 ObjectMgr::GetBaseXP(uint8 level)
@@ -6850,8 +6838,8 @@ void ObjectMgr::LoadPetNames()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 pet name parts. DB table `pet_name_generation` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -6870,8 +6858,8 @@ void ObjectMgr::LoadPetNames()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u pet name parts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadPetNumber()
@@ -6885,8 +6873,8 @@ void ObjectMgr::LoadPetNumber()
_hiPetNumber = fields[0].GetUInt32() + 1;
}
- LOG_INFO("server", ">> Loaded the max pet number: %d in %u ms", _hiPetNumber - 1, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded the max pet number: %d in %u ms", _hiPetNumber - 1, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
std::string ObjectMgr::GeneratePetName(uint32 entry)
@@ -6923,7 +6911,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)
{
- LOG_ERROR("server", ">> Loaded `reputation_reward_rate`, table is empty!");
+ LOG_INFO("server.loading", ">> Loaded `reputation_reward_rate`, table is empty!");
return;
}
@@ -6946,49 +6934,49 @@ void ObjectMgr::LoadReputationRewardRate()
FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
if (!factionEntry)
{
- LOG_ERROR("server", "Faction (faction.dbc) %u does not exist but is used in `reputation_reward_rate`", factionId);
+ 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)
{
- LOG_ERROR("server", "Table reputation_reward_rate has quest_rate with invalid rate %f, skipping data for faction %u", repRate.questRate, factionId);
+ 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)
{
- LOG_ERROR("server", "Table reputation_reward_rate has quest_daily_rate with invalid rate %f, skipping data for faction %u", repRate.questDailyRate, factionId);
+ 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)
{
- LOG_ERROR("server", "Table reputation_reward_rate has quest_weekly_rate with invalid rate %f, skipping data for faction %u", repRate.questWeeklyRate, factionId);
+ 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)
{
- LOG_ERROR("server", "Table reputation_reward_rate has quest_monthly_rate with invalid rate %f, skipping data for faction %u", repRate.questMonthlyRate, factionId);
+ 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)
{
- LOG_ERROR("server", "Table reputation_reward_rate has quest_repeatable_rate with invalid rate %f, skipping data for faction %u", repRate.questRepeatableRate, factionId);
+ 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)
{
- LOG_ERROR("server", "Table reputation_reward_rate has creature_rate with invalid rate %f, skipping data for faction %u", repRate.creatureRate, factionId);
+ 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)
{
- LOG_ERROR("server", "Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spellRate, factionId);
+ LOG_ERROR("sql.sql", "Table reputation_reward_rate has spell_rate with invalid rate %f, skipping data for faction %u", repRate.spellRate, factionId);
continue;
}
@@ -6997,8 +6985,8 @@ void ObjectMgr::LoadReputationRewardRate()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u reputation_reward_rate in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadReputationOnKill()
@@ -7019,7 +7007,7 @@ void ObjectMgr::LoadReputationOnKill()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 creature award reputation definitions. DB table `creature_onkill_reputation` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7071,8 +7059,8 @@ void ObjectMgr::LoadReputationOnKill()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature award reputation definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadReputationSpilloverTemplate()
@@ -7086,8 +7074,8 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
if (!result)
{
- LOG_INFO("server", ">> Loaded `reputation_spillover_template`, table is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded `reputation_spillover_template`, table is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7182,8 +7170,8 @@ void ObjectMgr::LoadReputationSpilloverTemplate()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u reputation_spillover_template in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadPointsOfInterest()
@@ -7200,7 +7188,7 @@ void ObjectMgr::LoadPointsOfInterest()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 Points of Interest definitions. DB table `points_of_interest` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7230,8 +7218,8 @@ void ObjectMgr::LoadPointsOfInterest()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Points of Interest definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadQuestPOI()
@@ -7248,7 +7236,7 @@ void ObjectMgr::LoadQuestPOI()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7301,13 +7289,13 @@ void ObjectMgr::LoadQuestPOI()
_questPOIStore[questId].push_back(POI);
}
else
- LOG_ERROR("server", "Table quest_poi references unknown quest points for quest %u POI id %u", questId, id);
+ LOG_ERROR("sql.sql", "Table quest_poi references unknown quest points for quest %u POI id %u", questId, id);
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quest POI definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadNPCSpellClickSpells()
@@ -7321,7 +7309,7 @@ void ObjectMgr::LoadNPCSpellClickSpells()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 spellclick spells. DB table `npc_spellclick_spells` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7373,8 +7361,8 @@ void ObjectMgr::LoadNPCSpellClickSpells()
}
}
- LOG_INFO("server", ">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spellclick definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::DeleteCreatureData(ObjectGuid::LowType guid)
@@ -7410,7 +7398,7 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const&
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 quest relations from `%s`, table is empty.", table.c_str());
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7438,8 +7426,8 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const&
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadGameobjectQuestStarters()
@@ -7508,8 +7496,8 @@ void ObjectMgr::LoadReservedPlayersNames()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 reserved player names. DB table `reserved_name` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7524,7 +7512,7 @@ void ObjectMgr::LoadReservedPlayersNames()
std::wstring wstr;
if (!Utf8toWStr (name, wstr))
{
- LOG_ERROR("server", "Table `reserved_name` have invalid name: %s", name.c_str());
+ LOG_ERROR("sql.sql", "Table `reserved_name` have invalid name: %s", name.c_str());
continue;
}
@@ -7534,8 +7522,8 @@ void ObjectMgr::LoadReservedPlayersNames()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u reserved player names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool ObjectMgr::IsReservedName(const std::string& name) const
@@ -7729,8 +7717,8 @@ void ObjectMgr::LoadGameObjectForQuests()
if (sObjectMgr->GetGameObjectTemplates()->empty())
{
- LOG_INFO("server", ">> Loaded 0 GameObjects for quests");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 GameObjects for quests");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7792,8 +7780,8 @@ void ObjectMgr::LoadGameObjectForQuests()
}
}
- LOG_INFO("server", ">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u GameObjects for quests in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool ObjectMgr::LoadAcoreStrings()
@@ -7804,8 +7792,8 @@ bool ObjectMgr::LoadAcoreStrings()
QueryResult result = WorldDatabase.PQuery("SELECT entry, content_default, locale_koKR, locale_frFR, locale_deDE, locale_zhCN, locale_zhTW, locale_esES, locale_esMX, locale_ruRU FROM acore_string");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 acore strings. DB table `acore_strings` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 acore strings. DB table `acore_strings` is empty.");
+ LOG_INFO("server.loading", " ");
return false;
}
@@ -7823,8 +7811,8 @@ bool ObjectMgr::LoadAcoreStrings()
AddLocaleString(fields[i + 1].GetString(), LocaleConstant(i), data.Content);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u acore strings in %u ms", (uint32)_acoreStringStore.size(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u acore strings in %u ms", (uint32)_acoreStringStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
return true;
}
@@ -7855,7 +7843,7 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 areas for fishing base skill level. DB table `skill_fishing_base_level` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -7878,8 +7866,8 @@ void ObjectMgr::LoadFishingBaseSkillLevel()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u areas for fishing base skill level in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::ChangeFishingBaseSkillLevel(uint32 entry, int32 skill)
@@ -7893,8 +7881,8 @@ void ObjectMgr::ChangeFishingBaseSkillLevel(uint32 entry, int32 skill)
_fishingBaseForAreaStore[entry] = skill;
- LOG_INFO("server", ">> Fishing base skill level of area %u changed to %u", entry, skill);
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Fishing base skill level of area %u changed to %u", entry, skill);
+ LOG_INFO("server.loading", " ");
}
bool ObjectMgr::CheckDeclinedNames(std::wstring w_ownname, DeclinedName const& names)
@@ -8000,7 +7988,7 @@ void ObjectMgr::LoadGameTele()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 GameTeleports. DB table `game_tele` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8040,8 +8028,8 @@ void ObjectMgr::LoadGameTele()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u GameTeleports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
GameTele const* ObjectMgr::GetGameTele(const std::string& name) const
@@ -8140,7 +8128,7 @@ void ObjectMgr::LoadMailLevelRewards()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 level dependent mail rewards. DB table `mail_level_reward` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8184,8 +8172,8 @@ void ObjectMgr::LoadMailLevelRewards()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u level dependent mail rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, uint32 spellCost, uint32 reqSkill, uint32 reqSkillValue, uint32 reqLevel)
@@ -8280,7 +8268,7 @@ void ObjectMgr::LoadTrainerSpell()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 Trainers. DB table `npc_trainer` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8302,8 +8290,8 @@ void ObjectMgr::LoadTrainerSpell()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d Trainers in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32>* skip_vendors)
@@ -8359,7 +8347,7 @@ void ObjectMgr::LoadVendors()
QueryResult result = WorldDatabase.Query("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor ORDER BY entry, slot ASC, item, ExtendedCost");
if (!result)
{
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
LOG_ERROR("sql.sql", ">> Loaded 0 Vendors. DB table `npc_vendor` is empty!");
return;
}
@@ -8392,8 +8380,8 @@ void ObjectMgr::LoadVendors()
}
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d Vendors in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadGossipMenu()
@@ -8407,7 +8395,7 @@ void ObjectMgr::LoadGossipMenu()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 gossip_menu entries. DB table `gossip_menu` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8429,8 +8417,8 @@ void ObjectMgr::LoadGossipMenu()
_gossipMenusStore.insert(GossipMenusContainer::value_type(gMenu.MenuID, gMenu));
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u gossip_menu entries in %u ms", (uint32)_gossipMenusStore.size(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u gossip_menu entries in %u ms", (uint32)_gossipMenusStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadGossipMenuItems()
@@ -8447,7 +8435,7 @@ void ObjectMgr::LoadGossipMenuItems()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 gossip_menu_option IDs. DB table `gossip_menu_option` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8501,8 +8489,8 @@ void ObjectMgr::LoadGossipMenuItems()
_gossipMenuItemsStore.insert(GossipMenuItemsContainer::value_type(gMenuItem.MenuID, gMenuItem));
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u gossip_menu_option entries in %u ms", uint32(_gossipMenuItemsStore.size()), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u gossip_menu_option entries in %u ms", uint32(_gossipMenuItemsStore.size()), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/)
@@ -8658,7 +8646,7 @@ void ObjectMgr::LoadScriptNames()
if (!result)
{
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
LOG_ERROR("sql.sql", ">> Loaded empty set of Script Names!");
return;
}
@@ -8672,8 +8660,8 @@ void ObjectMgr::LoadScriptNames()
} while (result->NextRow());
std::sort(_scriptNamesStore.begin(), _scriptNamesStore.end());
- LOG_INFO("server", ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d Script Names in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
std::string const& ObjectMgr::GetScriptName(uint32 id) const
@@ -8706,8 +8694,8 @@ void ObjectMgr::LoadBroadcastTexts()
QueryResult result = WorldDatabase.Query("SELECT ID, Language, MaleText, FemaleText, EmoteID0, EmoteID1, EmoteID2, EmoteDelay0, EmoteDelay1, EmoteDelay2, SoundId, Unk1, Unk2 FROM broadcast_text");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 broadcast texts. DB table `broadcast_text` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 broadcast texts. DB table `broadcast_text` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8778,7 +8766,7 @@ void ObjectMgr::LoadBroadcastTexts()
_broadcastTextStore[bct.Id] = bct;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded " SZFMTD " broadcast texts in %u ms", _broadcastTextStore.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded " SZFMTD " broadcast texts in %u ms", _broadcastTextStore.size(), GetMSTimeDiffToNow(oldMSTime));
}
void ObjectMgr::LoadBroadcastTextLocales()
@@ -8790,8 +8778,8 @@ void ObjectMgr::LoadBroadcastTextLocales()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 broadcast text locales. DB table `broadcast_text_locale` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 broadcast text locales. DB table `broadcast_text_locale` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8816,8 +8804,8 @@ void ObjectMgr::LoadBroadcastTextLocales()
AddLocaleString(fields[3].GetString(), locale, bct->second.FemaleText);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Broadcast Text Locales in %u ms", uint32(_broadcastTextStore.size()), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Broadcast Text Locales in %u ms", uint32(_broadcastTextStore.size()), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unitClass)
@@ -8854,8 +8842,8 @@ void ObjectMgr::LoadCreatureClassLevelStats()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 creature base stats. DB table `creature_classlevelstats` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8925,8 +8913,8 @@ void ObjectMgr::LoadCreatureClassLevelStats()
}
}
- LOG_INFO("server", ">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature base stats in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadFactionChangeAchievements()
@@ -8938,7 +8926,7 @@ void ObjectMgr::LoadFactionChangeAchievements()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change achievement pairs. DB table `player_factionchange_achievement` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8961,8 +8949,8 @@ void ObjectMgr::LoadFactionChangeAchievements()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u faction change achievement pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadFactionChangeItems()
@@ -8973,8 +8961,8 @@ void ObjectMgr::LoadFactionChangeItems()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 faction change item pairs. DB table `player_factionchange_items` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -8997,8 +8985,8 @@ void ObjectMgr::LoadFactionChangeItems()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u faction change item pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadFactionChangeQuests()
@@ -9010,7 +8998,7 @@ void ObjectMgr::LoadFactionChangeQuests()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change quest pairs. DB table `player_factionchange_quests` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -9024,17 +9012,17 @@ void ObjectMgr::LoadFactionChangeQuests()
uint32 horde = fields[1].GetUInt32();
if (!sObjectMgr->GetQuestTemplate(alliance))
- LOG_ERROR("server", "Quest %u (alliance_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", alliance);
+ LOG_ERROR("sql.sql", "Quest %u (alliance_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", alliance);
else if (!sObjectMgr->GetQuestTemplate(horde))
- LOG_ERROR("server", "Quest %u (horde_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", horde);
+ LOG_ERROR("sql.sql", "Quest %u (horde_id) referenced in `player_factionchange_quests` does not exist, pair skipped!", horde);
else
FactionChangeQuests[alliance] = horde;
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u faction change quest pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u faction change quest pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadFactionChangeReputations()
@@ -9046,7 +9034,7 @@ void ObjectMgr::LoadFactionChangeReputations()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change reputation pairs. DB table `player_factionchange_reputations` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -9060,17 +9048,17 @@ void ObjectMgr::LoadFactionChangeReputations()
uint32 horde = fields[1].GetUInt32();
if (!sFactionStore.LookupEntry(alliance))
- LOG_ERROR("server", "Reputation %u (alliance_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", alliance);
+ LOG_ERROR("sql.sql", "Reputation %u (alliance_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", alliance);
else if (!sFactionStore.LookupEntry(horde))
- LOG_ERROR("server", "Reputation %u (horde_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde);
+ LOG_ERROR("sql.sql", "Reputation %u (horde_id) referenced in `player_factionchange_reputations` does not exist, pair skipped!", horde);
else
FactionChangeReputation[alliance] = horde;
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u faction change reputation pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadFactionChangeSpells()
@@ -9082,7 +9070,7 @@ void ObjectMgr::LoadFactionChangeSpells()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 faction change spell pairs. DB table `player_factionchange_spells` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -9105,8 +9093,8 @@ void ObjectMgr::LoadFactionChangeSpells()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u faction change spell pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadFactionChangeTitles()
@@ -9117,7 +9105,7 @@ void ObjectMgr::LoadFactionChangeTitles()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 faction change title pairs. DB table `player_factionchange_title` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 faction change title pairs. DB table `player_factionchange_title` is empty.");
return;
}
@@ -9131,17 +9119,17 @@ void ObjectMgr::LoadFactionChangeTitles()
uint32 horde = fields[1].GetUInt32();
if (!sCharTitlesStore.LookupEntry(alliance))
- LOG_ERROR("server", "Title %u (alliance_id) referenced in `player_factionchange_title` does not exist, pair skipped!", alliance);
+ LOG_ERROR("sql.sql", "Title %u (alliance_id) referenced in `player_factionchange_title` does not exist, pair skipped!", alliance);
else if (!sCharTitlesStore.LookupEntry(horde))
- LOG_ERROR("server", "Title %u (horde_id) referenced in `player_factionchange_title` does not exist, pair skipped!", horde);
+ LOG_ERROR("sql.sql", "Title %u (horde_id) referenced in `player_factionchange_title` does not exist, pair skipped!", horde);
else
FactionChangeTitles[alliance] = horde;
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u faction change title pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u faction change title pairs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
GameObjectTemplate const* ObjectMgr::GetGameObjectTemplate(uint32 entry)
@@ -9211,7 +9199,7 @@ void ObjectMgr::LoadGameObjectQuestItems()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 gameobject quest items. DB table `gameobject_questitem` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 gameobject quest items. DB table `gameobject_questitem` is empty.");
return;
}
@@ -9228,8 +9216,8 @@ void ObjectMgr::LoadGameObjectQuestItems()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u gameobject quest items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u gameobject quest items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void ObjectMgr::LoadCreatureQuestItems()
@@ -9241,7 +9229,7 @@ void ObjectMgr::LoadCreatureQuestItems()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creature quest items. DB table `creature_questitem` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 creature quest items. DB table `creature_questitem` is empty.");
return;
}
@@ -9258,6 +9246,6 @@ void ObjectMgr::LoadCreatureQuestItems()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creature quest items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature quest items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index 879f37fc2f..c852640b23 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -906,13 +906,13 @@ public:
void LoadQuests();
void LoadQuestStartersAndEnders()
{
- LOG_INFO("server", "Loading GO Start Quest Data...");
+ LOG_INFO("server.loading", "Loading GO Start Quest Data...");
LoadGameobjectQuestStarters();
- LOG_INFO("server", "Loading GO End Quest Data...");
+ LOG_INFO("server.loading", "Loading GO End Quest Data...");
LoadGameobjectQuestEnders();
- LOG_INFO("server", "Loading Creature Start Quest Data...");
+ LOG_INFO("server.loading", "Loading Creature Start Quest Data...");
LoadCreatureQuestStarters();
- LOG_INFO("server", "Loading Creature End Quest Data...");
+ LOG_INFO("server.loading", "Loading Creature End Quest Data...");
LoadCreatureQuestEnders();
}
void LoadGameobjectQuestStarters();
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index fb2b566e5c..e0b0e177e3 100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -93,7 +93,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefManager<T>&
{
T* obj = new T;
ObjectGuid::LowType guid = *i_guid;
- //LOG_INFO("server", "DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid);
+
if (!obj->LoadFromDB(guid, map))
{
delete obj;
@@ -112,7 +112,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord& cell, GridRefManager<Gam
ObjectGuid::LowType guid = *i_guid;
GameObjectData const* data = sObjectMgr->GetGOData(guid);
GameObject* obj = data && sObjectMgr->IsGameObjectStaticTransport(data->id) ? new StaticTransport() : new GameObject();
- //LOG_INFO("server", "DEBUG: LoadHelper from table: %s for (guid: %u) Loading", table, guid);
+
if (!obj->LoadFromDB(guid, map))
{
delete obj;
@@ -183,9 +183,7 @@ void ObjectGridLoader::LoadN(void)
}
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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());
-#endif
}
template<class T>
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index efd9d90eda..143d3194a8 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -65,13 +65,20 @@ Group::~Group()
if (m_bgGroup)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "Group::~Group: battleground group being deleted.");
-#endif
- if (m_bgGroup->GetBgRaid(TEAM_ALLIANCE) == this) m_bgGroup->SetBgRaid(TEAM_ALLIANCE, nullptr);
- else if (m_bgGroup->GetBgRaid(TEAM_HORDE) == this) m_bgGroup->SetBgRaid(TEAM_HORDE, nullptr);
- else LOG_ERROR("server", "Group::~Group: battleground group is not linked to the correct battleground.");
+
+ if (m_bgGroup->GetBgRaid(TEAM_ALLIANCE) == this)
+ {
+ m_bgGroup->SetBgRaid(TEAM_ALLIANCE, nullptr);
+ }
+ else if (m_bgGroup->GetBgRaid(TEAM_HORDE) == this)
+ {
+ m_bgGroup->SetBgRaid(TEAM_HORDE, nullptr);
+ }
+ else
+ LOG_ERROR("bg.battleground", "Group::~Group: battleground group is not linked to the correct battleground.");
}
+
Rolls::iterator itr;
while (!RollId.empty())
{
@@ -1222,9 +1229,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
void Group::MasterLoot(Loot* loot, WorldObject* pLootedObject)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330)");
-#endif
for (std::vector<LootItem>::iterator i = loot->items.begin(); i != loot->items.end(); ++i)
{
@@ -2046,9 +2051,7 @@ void Group::BroadcastGroupUpdate(void)
{
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2);
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "-- Forced group value update for '%s'", pp->GetName().c_str());
-#endif
+ LOG_DEBUG("group", "-- 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 3a3035845d..8f7daa92a5 100644
--- a/src/server/game/Groups/GroupMgr.cpp
+++ b/src/server/game/Groups/GroupMgr.cpp
@@ -59,7 +59,7 @@ ObjectGuid::LowType GroupMgr::GenerateGroupId()
if (_nextGroupId == 0xFFFFFFFF)
{
- LOG_ERROR("server", "Group ID overflow!! Can't continue, shutting down server.");
+ LOG_ERROR("server.worldserver", "Group ID overflow!! Can't continue, shutting down server.");
World::StopNow(ERROR_EXIT_CODE);
}
@@ -109,8 +109,8 @@ void GroupMgr::LoadGroups()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 group definitions. DB table `groups` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 group definitions. DB table `groups` is empty!");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -131,12 +131,12 @@ void GroupMgr::LoadGroups()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Group members...");
+ LOG_INFO("server.loading", "Loading Group members...");
{
uint32 oldMSTime = getMSTime();
@@ -149,8 +149,8 @@ void GroupMgr::LoadGroups()
QueryResult result = CharacterDatabase.Query("SELECT guid, memberGuid, memberFlags, subgroup, roles FROM group_member ORDER BY guid");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 group members. DB table `group_member` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 group members. DB table `group_member` is empty!");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -162,14 +162,12 @@ void GroupMgr::LoadGroups()
if (group)
group->LoadMemberFromDB(fields[1].GetUInt32(), fields[2].GetUInt8(), fields[3].GetUInt8(), fields[4].GetUInt8());
- //else
- // LOG_ERROR("server", "GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32());
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
}
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index ea273a7370..fe78422993 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -98,9 +98,7 @@ void Guild::SendCommandResult(WorldSession* session, GuildCommandType type, Guil
data << uint32(errCode);
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_COMMAND_RESULT [%s]: Type: %u, code: %u, param: %s", session->GetPlayerInfo().c_str(), type, errCode, param.c_str());
-#endif
}
void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode)
@@ -109,9 +107,7 @@ void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode
data << uint32(errCode);
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_SAVE_GUILD_EMBLEM [%s] Code: %u", session->GetPlayerInfo().c_str(), errCode);
-#endif
}
// LogHolder
@@ -288,7 +284,7 @@ void Guild::RankInfo::CreateMissingTabsIfNeeded(uint8 tabs, SQLTransaction& tran
rightsAndSlots.SetGuildMasterValues();
if (logOnCreate)
- LOG_ERROR("server", "Guild %u has broken Tab %u for rank %u. Created default tab.", m_guildId, i, m_rankId);
+ 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);
@@ -397,21 +393,21 @@ bool Guild::BankTab::LoadItemFromDB(Field* fields)
uint32 itemEntry = fields[15].GetUInt32();
if (slotId >= GUILD_BANK_MAX_SLOTS)
{
- LOG_ERROR("server", "Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
+ 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)
{
- LOG_ERROR("server", "Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
+ 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, ObjectGuid::Empty, fields, itemEntry))
{
- LOG_ERROR("server", "Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry);
+ 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);
@@ -570,17 +566,13 @@ void Guild::BankTab::SendText(Guild const* guild, WorldSession* session) const
if (session)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_QUERY_GUILD_BANK_TEXT [%s]: Tabid: %u, Text: %s"
, session->GetPlayerInfo().c_str(), m_tabId, m_text.c_str());
-#endif
session->SendPacket(&data);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_QUERY_GUILD_BANK_TEXT [Broadcast]: Tabid: %u, Text: %s", m_tabId, m_text.c_str());
-#endif
guild->BroadcastPacket(&data);
}
}
@@ -681,7 +673,7 @@ bool Guild::Member::LoadFromDB(Field* fields)
if (!m_zoneId)
{
- LOG_ERROR("server", "Player (%s) has broken zone-data", m_guid.ToString().c_str());
+ LOG_ERROR("guild", "Player (%s) has broken zone-data", m_guid.ToString().c_str());
m_zoneId = Player::GetZoneIdFromDB(m_guid);
}
ResetFlags();
@@ -693,13 +685,13 @@ bool Guild::Member::CheckStats() const
{
if (m_level < 1)
{
- LOG_ERROR("server", "Player (%s) has a broken data in field `characters`.`level`, deleting him from guild!", m_guid.ToString().c_str());
+ LOG_ERROR("guild", "Player (%s) has a broken data in field `characters`.`level`, deleting him from guild!", m_guid.ToString().c_str());
return false;
}
if (m_class < CLASS_WARRIOR || m_class >= MAX_CLASSES)
{
- LOG_ERROR("server", "Player (%s) has a broken data in field `characters`.`class`, deleting him from guild!", m_guid.ToString().c_str());
+ LOG_ERROR("guild", "Player (%s) has a broken data in field `characters`.`class`, deleting him from guild!", m_guid.ToString().c_str());
return false;
}
return true;
@@ -969,10 +961,8 @@ Item* Guild::BankMoveItemData::StoreItem(SQLTransaction& trans, Item* pItem)
ItemPosCount pos(*itr);
++itr;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u",
m_container, m_slotId, pItem->GetEntry(), pItem->GetCount());
-#endif
pLastItem = _StoreItem(trans, pTab, pItem, pos, itr != m_vec.end());
}
return pLastItem;
@@ -1074,10 +1064,8 @@ void Guild::BankMoveItemData::CanStoreItemInTab(Item* pItem, uint8 skipSlotId, b
InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u",
m_container, m_slotId, pItem->GetEntry(), pItem->GetCount());
-#endif
uint32 count = pItem->GetCount();
// Soulbound items cannot be moved
if (pItem->IsSoulBound())
@@ -1172,10 +1160,8 @@ bool Guild::Create(Player* pLeader, std::string const& name)
m_createdDate = sWorld->GetGameTime();
_CreateLogHolders();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "GUILD: creating guild [%s] for leader %s (%s)",
name.c_str(), pLeader->GetName().c_str(), m_leaderGuid.ToString().c_str());
-#endif
SQLTransaction trans = CharacterDatabase.BeginTransaction();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_MEMBERS);
@@ -1277,7 +1263,7 @@ void Guild::UpdateMemberData(Player* player, uint8 dataid, uint32 value)
member->SetLevel(value);
break;
default:
- LOG_ERROR("server", "Guild::UpdateMemberData: Called with incorrect DATAID %u (value %u)", dataid, value);
+ LOG_ERROR("guild", "Guild::UpdateMemberData: Called with incorrect DATAID %u (value %u)", dataid, value);
return;
}
//HandleRoster();
@@ -1309,9 +1295,7 @@ void Guild::HandleRoster(WorldSession* session)
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
itr->second->WritePacket(data, _HasRankRight(session->GetPlayer(), GR_RIGHT_VIEWOFFNOTE));
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_ROSTER [%s]", session->GetPlayerInfo().c_str());
-#endif
session->SendPacket(&data);
}
@@ -1334,9 +1318,7 @@ void Guild::HandleQuery(WorldSession* session)
data << uint32(_GetRanksSize()); // Number of ranks used
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_QUERY_RESPONSE [%s]", session->GetPlayerInfo().c_str());
-#endif
}
void Guild::HandleSetMOTD(WorldSession* session, std::string const& motd)
@@ -1425,7 +1407,7 @@ void Guild::HandleSetBankTabInfo(WorldSession* session, uint8 tabId, std::string
BankTab* tab = GetBankTab(tabId);
if (!tab)
{
- LOG_ERROR("server", "Guild::HandleSetBankTabInfo: Player %s trying to change bank tab info from unexisting tab %d.",
+ LOG_ERROR("guild", "Guild::HandleSetBankTabInfo: Player %s trying to change bank tab info from unexisting tab %d.",
session->GetPlayerInfo().c_str(), tabId);
return;
}
@@ -1457,9 +1439,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))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "Changed RankName to '%s', rights to 0x%08X", name.c_str(), rights);
-#endif
rankInfo->SetName(name);
rankInfo->SetRights(rights);
@@ -1543,9 +1523,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
SendCommandResult(session, GUILD_COMMAND_INVITE, ERR_GUILD_COMMAND_SUCCESS, name);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "Player %s invited %s to join his Guild", player->GetName().c_str(), name.c_str());
-#endif
pInvitee->SetGuildIdInvited(m_id);
_LogEvent(GUILD_EVENT_LOG_INVITE_PLAYER, player->GetGUID(), pInvitee->GetGUID());
@@ -1554,9 +1532,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
data << player->GetName();
data << m_name;
pInvitee->GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_INVITE [%s]", pInvitee->GetName().c_str());
-#endif
}
void Guild::HandleAcceptMember(WorldSession* session)
@@ -1813,9 +1789,7 @@ void Guild::HandleDisband(WorldSession* session)
if (_IsLeader(session->GetPlayer()))
{
Disband();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "Guild Successfully Disbanded");
-#endif
delete this;
}
}
@@ -1830,9 +1804,7 @@ void Guild::SendInfo(WorldSession* session) const
data << m_accountsNumber; // Number of accounts
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_INFO [%s]", session->GetPlayerInfo().c_str());
-#endif
}
void Guild::SendEventLog(WorldSession* session) const
@@ -1840,9 +1812,7 @@ void Guild::SendEventLog(WorldSession* session) const
WorldPacket data(MSG_GUILD_EVENT_LOG_QUERY, 1 + m_eventLog->GetSize() * (1 + 8 + 4));
m_eventLog->WritePacket(data);
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_EVENT_LOG_QUERY [%s]", session->GetPlayerInfo().c_str());
-#endif
}
void Guild::SendBankLog(WorldSession* session, uint8 tabId) const
@@ -1855,9 +1825,7 @@ void Guild::SendBankLog(WorldSession* session, uint8 tabId) const
data << uint8(tabId);
pLog->WritePacket(data);
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_BANK_LOG_QUERY [%s]", session->GetPlayerInfo().c_str());
-#endif
}
}
@@ -1898,9 +1866,7 @@ void Guild::SendPermissions(WorldSession* session) const
}
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_PERMISSIONS [%s] Rank: %u", session->GetPlayerInfo().c_str(), rankId);
-#endif
}
void Guild::SendMoneyInfo(WorldSession* session) const
@@ -1913,9 +1879,7 @@ void Guild::SendMoneyInfo(WorldSession* session) const
WorldPacket data(MSG_GUILD_BANK_MONEY_WITHDRAWN, 4);
data << int32(amount);
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s] Money: %u", session->GetPlayerInfo().c_str(), amount);
-#endif
}
void Guild::SendLoginInfo(WorldSession* session)
@@ -1926,9 +1890,7 @@ void Guild::SendLoginInfo(WorldSession* session)
data << m_motd;
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_EVENT [%s] MOTD", session->GetPlayerInfo().c_str());
-#endif
SendBankTabsInfo(session);
@@ -2034,13 +1996,13 @@ bool Guild::LoadBankEventLogFromDB(Field* fields)
{
if (!isMoneyTab)
{
- LOG_ERROR("server", "GuildBankEventLog ERROR: MoneyEvent(LogGuid: %u, Guild: %u) does not belong to money tab (%u), ignoring...", guid, m_id, dbTabId);
+ 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)
{
- LOG_ERROR("server", "GuildBankEventLog ERROR: non-money event (LogGuid: %u, Guild: %u) belongs to money tab, ignoring...", guid, m_id);
+ 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(
@@ -2062,7 +2024,7 @@ void Guild::LoadBankTabFromDB(Field* fields)
{
uint8 tabId = fields[1].GetUInt8();
if (tabId >= _GetPurchasedTabsSize())
- LOG_ERROR("server", "Invalid tab (tabId: %u) in guild bank, skipped.", tabId);
+ LOG_ERROR("guild", "Invalid tab (tabId: %u) in guild bank, skipped.", tabId);
else
m_bankTabs[tabId]->LoadFromDB(fields);
}
@@ -2072,7 +2034,7 @@ bool Guild::LoadBankItemFromDB(Field* fields)
uint8 tabId = fields[12].GetUInt8();
if (tabId >= _GetPurchasedTabsSize())
{
- LOG_ERROR("server", "Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.",
+ LOG_ERROR("guild", "Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.",
fields[14].GetUInt32(), fields[15].GetUInt32());
return false;
}
@@ -2091,7 +2053,7 @@ bool Guild::Validate()
uint8 ranks = _GetRanksSize();
if (ranks < GUILD_RANKS_MIN_COUNT || ranks > GUILD_RANKS_MAX_COUNT)
{
- LOG_ERROR("server", "Guild %u has invalid number of ranks, creating new...", m_id);
+ LOG_ERROR("guild", "Guild %u has invalid number of ranks, creating new...", m_id);
broken_ranks = true;
}
else
@@ -2101,7 +2063,7 @@ bool Guild::Validate()
RankInfo* rankInfo = GetRankInfo(rankId);
if (rankInfo->GetId() != rankId)
{
- LOG_ERROR("server", "Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId);
+ LOG_ERROR("guild", "Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId);
broken_ranks = true;
}
else
@@ -2859,9 +2821,7 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, ObjectGuid guid, const char*
data << guid;
BroadcastPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_EVENT [Broadcast] Event: %u", guildEvent);
-#endif
}
void Guild::_SendBankList(WorldSession* session /* = nullptr*/, uint8 tabId /*= 0*/, bool sendAllSlots /*= false*/, SlotIds* slots /*= nullptr*/) const
@@ -2904,10 +2864,8 @@ void Guild::_SendBankList(WorldSession* session /* = nullptr*/, uint8 tabId /*=
numSlots = _GetMemberRemainingSlots(member, tabId);
data.put<uint32>(rempos, numSlots);
session->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_BANK_LIST [%s]: TabId: %u, FullSlots: %u, slots: %d",
session->GetPlayerInfo().c_str(), tabId, sendAllSlots, numSlots);
-#endif
}
else // TODO - Probably this is just sent to session + those that have sent CMSG_GUILD_BANKER_ACTIVATE
{
@@ -2922,10 +2880,8 @@ void Guild::_SendBankList(WorldSession* session /* = nullptr*/, uint8 tabId /*=
uint32 numSlots = _GetMemberRemainingSlots(itr->second, tabId);
data.put<uint32>(rempos, numSlots);
player->GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "SMSG_GUILD_BANK_LIST [%s]: TabId: %u, FullSlots: %u, slots: %u"
, player->GetName().c_str(), tabId, sendAllSlots, numSlots);
-#endif
}
}
}
diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp
index 3fb16fe083..e0a06968d4 100644
--- a/src/server/game/Guilds/GuildMgr.cpp
+++ b/src/server/game/Guilds/GuildMgr.cpp
@@ -36,7 +36,7 @@ uint32 GuildMgr::GenerateGuildId()
{
if (NextGuildId >= 0xFFFFFFFE)
{
- LOG_ERROR("server", "Guild ids overflow!! Can't continue, shutting down server.");
+ LOG_ERROR("server.worldserver", "Guild ids overflow!! Can't continue, shutting down server.");
World::StopNow(ERROR_EXIT_CODE);
}
return NextGuildId++;
@@ -86,7 +86,7 @@ Guild* GuildMgr::GetGuildByLeader(ObjectGuid guid) const
void GuildMgr::LoadGuilds()
{
// 1. Load all guilds
- LOG_INFO("server", "Loading guilds definitions...");
+ LOG_INFO("server.loading", "Loading guilds definitions...");
{
uint32 oldMSTime = getMSTime();
@@ -100,8 +100,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild definitions. DB table `guild` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild definitions. DB table `guild` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -122,13 +122,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 2. Load all guild ranks
- LOG_INFO("server", "Loading guild ranks...");
+ LOG_INFO("server.loading", "Loading guild ranks...");
{
uint32 oldMSTime = getMSTime();
@@ -140,8 +140,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -157,13 +157,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 3. Load all guild members
- LOG_INFO("server", "Loading guild members...");
+ LOG_INFO("server.loading", "Loading guild members...");
{
uint32 oldMSTime = getMSTime();
@@ -181,8 +181,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild members. DB table `guild_member` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild members. DB table `guild_member` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -199,13 +199,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 4. Load all guild bank tab rights
- LOG_INFO("server", "Loading bank tab rights...");
+ LOG_INFO("server.loading", "Loading bank tab rights...");
{
uint32 oldMSTime = getMSTime();
@@ -217,8 +217,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -234,13 +234,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 5. Load all event logs
- LOG_INFO("server", "Loading guild event logs...");
+ LOG_INFO("server.loading", "Loading guild event logs...");
{
uint32 oldMSTime = getMSTime();
@@ -251,8 +251,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -268,13 +268,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 6. Load all bank event logs
- LOG_INFO("server", "Loading guild bank event logs...");
+ LOG_INFO("server.loading", "Loading guild bank event logs...");
{
uint32 oldMSTime = getMSTime();
@@ -286,8 +286,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -303,13 +303,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 7. Load all guild bank tabs
- LOG_INFO("server", "Loading guild bank tabs...");
+ LOG_INFO("server.loading", "Loading guild bank tabs...");
{
uint32 oldMSTime = getMSTime();
@@ -321,8 +321,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -338,13 +338,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 8. Fill all guild bank tabs
- LOG_INFO("server", "Filling bank tabs with items...");
+ LOG_INFO("server.loading", "Filling bank tabs with items...");
{
uint32 oldMSTime = getMSTime();
@@ -358,8 +358,8 @@ void GuildMgr::LoadGuilds()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -375,13 +375,13 @@ void GuildMgr::LoadGuilds()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 9. Validate loaded guild data
- LOG_INFO("server", "Validating data of loaded guilds...");
+ LOG_INFO("server.loading", "Validating data of loaded guilds...");
{
uint32 oldMSTime = getMSTime();
@@ -393,8 +393,8 @@ void GuildMgr::LoadGuilds()
delete guild;
}
- LOG_INFO("server", ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp
index 56fd9996b5..36588201be 100644
--- a/src/server/game/Handlers/AddonHandler.cpp
+++ b/src/server/game/Handlers/AddonHandler.cpp
@@ -72,9 +72,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket* Source, WorldPacket* Target)
AddOnPacked >> enabled >> crc >> unk2;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2);
-#endif
uint8 state = (enabled ? 2 : 1);
*Target << uint8(state);
@@ -127,14 +125,12 @@ bool AddonHandler::BuildAddonPacket(WorldPacket* Source, WorldPacket* Target)
uint32 count = 0;
*Target << uint32(count);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (AddOnPacked.rpos() != AddOnPacked.size())
LOG_DEBUG("network", "packet under read!");
-#endif
}
else
{
- LOG_ERROR("server", "Addon packet uncompress error :(");
+ 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 9a28b25a19..35224eaf14 100644
--- a/src/server/game/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Handlers/ArenaTeamHandler.cpp
@@ -17,15 +17,11 @@
void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "MSG_INSPECT_ARENA_TEAMS");
-#endif
ObjectGuid guid;
recvData >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Inspect Arena stats (%s)", guid.ToString().c_str());
-#endif
if (Player* player = ObjectAccessor::FindPlayer(guid))
{
@@ -42,9 +38,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ARENA_TEAM_QUERY");
-#endif
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -58,9 +52,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ARENA_TEAM_ROSTER");
-#endif
uint32 arenaTeamId; // arena team id
recvData >> arenaTeamId;
@@ -71,9 +63,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ARENA_TEAM_INVITE");
-#endif
uint32 arenaTeamId; // arena team id
std::string invitedName;
@@ -143,9 +133,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName().c_str(), invitedName.c_str());
-#endif
player->SetArenaTeamIdInvited(arenaTeam->GetId());
@@ -154,16 +142,12 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket& recvData)
data << arenaTeam->GetName();
player->GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_ARENA_TEAM_INVITE");
-#endif
}
void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
-#endif
ArenaTeam* arenaTeam = sArenaTeamMgr->GetArenaTeamById(_player->GetArenaTeamIdInvited());
if (!arenaTeam)
@@ -196,9 +180,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ARENA_TEAM_DECLINE"); // empty opcode
-#endif
// Remove invite from player
_player->SetArenaTeamIdInvited(0);
@@ -206,9 +188,7 @@ void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ARENA_TEAM_LEAVE");
-#endif
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -265,9 +245,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ARENA_TEAM_DISBAND");
-#endif
uint32 arenaTeamId;
recvData >> arenaTeamId;
@@ -299,9 +277,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ARENA_TEAM_REMOVE");
-#endif
uint32 arenaTeamId;
std::string name;
@@ -366,9 +342,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket& recvData)
void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ARENA_TEAM_LEADER");
-#endif
uint32 arenaTeamId;
std::string name;
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 6938ef657a..33309461da 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -28,9 +28,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionHelloOpcode - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -144,10 +142,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
if (bid > MAX_MONEY_AMOUNT || buyout > MAX_MONEY_AMOUNT)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Player %s (%s) attempted to sell item with higher price than max gold amount.",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str());
-#endif
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -155,18 +151,14 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (%s) not found or you can't interact with him.", auctioneer.ToString().c_str());
-#endif
return;
}
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction());
if (!auctionHouseEntry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (%s) has wrong faction.", auctioneer.ToString().c_str());
-#endif
return;
}
@@ -271,14 +263,14 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(creature->GetSpawnId());
if (!auctioneerData)
{
- LOG_ERROR("server", "Data for auctioneer not found (%s)", auctioneer.ToString().c_str());
+ LOG_ERROR("network.opcode", "Data for auctioneer not found (%s)", auctioneer.ToString().c_str());
return;
}
CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id);
if (!auctioneerInfo)
{
- LOG_ERROR("server", "Non existing auctioneer (%s)", auctioneer.ToString().c_str());
+ LOG_ERROR("network.opcode", "Non existing auctioneer (%s)", auctioneer.ToString().c_str());
return;
}
@@ -301,10 +293,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "CMSG_AUCTION_SELL_ITEM: Player %s (%s) is selling item %s entry %u (%s) with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
+ LOG_DEBUG("network.opcode", "CMSG_AUCTION_SELL_ITEM: Player %s (%s) is selling item %s entry %u (%s) with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUID().ToString().c_str(), item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
-#endif
sAuctionMgr->AddAItem(item);
auctionHouse->AddAuction(AH);
@@ -327,7 +317,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
Item* newItem = item->CloneItem(finalCount, _player);
if (!newItem)
{
- LOG_ERROR("server", "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
+ LOG_ERROR("network.opcode", "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -344,10 +334,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "CMSG_AUCTION_SELL_ITEM: Player %s (%s) is selling item %s entry %u (%s) with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
+ LOG_DEBUG("network.opcode", "CMSG_AUCTION_SELL_ITEM: Player %s (%s) is selling item %s entry %u (%s) with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUID().ToString().c_str(), newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
-#endif
sAuctionMgr->AddAItem(newItem);
auctionHouse->AddAuction(AH);
@@ -396,9 +384,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
//this function is called when client bids or buys out auction
void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_PLACE_BID");
-#endif
ObjectGuid auctioneer;
uint32 auctionId;
@@ -412,9 +398,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionPlaceBid - Unit (%s) not found or you can't interact with him.", auctioneer.ToString().c_str());
-#endif
return;
}
@@ -526,9 +510,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
//this void is called when auction_owner cancels his auction
void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_REMOVE_ITEM");
-#endif
ObjectGuid auctioneer;
uint32 auctionId;
@@ -538,9 +520,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionRemoveItem - Unit (%s) not found or you can't interact with him.", auctioneer.ToString().c_str());
-#endif
return;
}
@@ -576,7 +556,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
}
else
{
- LOG_ERROR("server", "Auction id: %u has non-existed item (item: %s)!!!", auction->Id, auction->item_guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Auction id: %u has non-existed item (item: %s)!!!", auction->Id, auction->item_guid.ToString().c_str());
SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -585,7 +565,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
{
SendAuctionCommandResult(0, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
//this code isn't possible ... maybe there should be assert
- LOG_ERROR("server", "CHEATER : %s, he tried to cancel auction (id: %u) of another player, or auction is nullptr", player->GetGUID().ToString().c_str(), auctionId);
+ LOG_ERROR("network.opcode", "CHEATER : %s, he tried to cancel auction (id: %u) of another player, or auction is nullptr", player->GetGUID().ToString().c_str(), auctionId);
return;
}
@@ -605,9 +585,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
//called when player lists his bids
void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_BIDDER_ITEMS");
-#endif
ObjectGuid guid; //NPC guid
uint32 listfrom; //page of auctions
@@ -618,16 +596,14 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
recvData >> outbiddedCount;
if (recvData.size() != (16 + outbiddedCount * 4))
{
- LOG_ERROR("server", "Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recvData.size(), (16 + outbiddedCount * 4));
+ LOG_ERROR("network.opcode", "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)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionListBidderItems - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
recvData.rfinish();
return;
}
@@ -688,18 +664,14 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData)
void WorldSession::HandleAuctionListOwnerItemsEvent(ObjectGuid creatureGuid)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_OWNER_ITEMS");
-#endif
_lastAuctionListOwnerItemsMSTime = World::GetGameTimeMS(); // pussywizard
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(creatureGuid, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleAuctionListOwnerItems - Unit (%s) not found or you can't interact with him.", creatureGuid.ToString().c_str());
-#endif
return;
}
@@ -725,9 +697,7 @@ void WorldSession::HandleAuctionListOwnerItemsEvent(ObjectGuid creatureGuid)
//this void is called when player clicks on search button
void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_ITEMS");
-#endif
std::string searchedname;
uint8 levelmin, levelmax, usable;
@@ -772,9 +742,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
void WorldSession::HandleAuctionListPendingSales(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_AUCTION_LIST_PENDING_SALES");
-#endif
recvData.read_skip<uint64>();
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index 586310c77c..928ff9f960 100644
--- a/src/server/game/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
@@ -23,9 +23,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
{
ObjectGuid guid;
recvData >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (%s)", guid.ToString().c_str());
-#endif
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
@@ -263,9 +261,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
-#endif
Battleground* bg = _player->GetBattleground();
if (!bg) // can't be received if player not in battleground
@@ -316,9 +312,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvDa
void WorldSession::HandlePVPLogDataOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd MSG_PVP_LOG_DATA Message");
-#endif
Battleground* bg = _player->GetBattleground();
if (!bg)
@@ -332,16 +326,12 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket& /*recvData*/)
sBattlegroundMgr->BuildPvpLogDataPacket(&data, bg);
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent MSG_PVP_LOG_DATA Message");
-#endif
}
void WorldSession::HandleBattlefieldListOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
-#endif
uint32 bgTypeId;
recvData >> bgTypeId; // id from DBC
@@ -491,9 +481,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket& recvData)
void WorldSession::HandleBattlefieldLeaveOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
-#endif
recvData.read_skip<uint8>(); // unk1
recvData.read_skip<uint8>(); // unk2
@@ -803,15 +791,11 @@ void WorldSession::HandleReportPvPAFK(WorldPacket& recvData)
if (!reportedPlayer)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "WorldSession::HandleReportPvPAFK: player not found");
-#endif
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battleground", "WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName().c_str(), reportedPlayer->GetName().c_str());
-#endif
reportedPlayer->ReportedAfkBy(_player);
}
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index 569e1a7e6c..d0225c5e2f 100644
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -210,7 +210,7 @@ bool validUtf8String(WorldPacket& recvData, std::string& s, std::string action,
{
if (!utf8::is_valid(s.begin(), s.end()))
{
- LOG_INFO("server", "CalendarHandler: Player (%s) attempt to %s an event with invalid name or description (packet modification)",
+ LOG_INFO("network.opcode", "CalendarHandler: Player (%s) attempt to %s an event with invalid name or description (packet modification)",
playerGUID.ToString().c_str(), action.c_str());
recvData.rfinish();
return false;
diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp
index 13da829755..2869c89e3d 100644
--- a/src/server/game/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Handlers/ChannelHandler.cpp
@@ -17,9 +17,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
recvPacket >> channelId >> unknown1 >> unknown2 >> channelName >> password;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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());
-#endif
if (channelId)
{
ChatChannelsEntry const* channel = sChatChannelsStore.LookupEntry(channelId);
@@ -55,10 +53,8 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> unk >> channelName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_LEAVE_CHANNEL %s Channel: %s, unk1: %u",
GetPlayerInfo().c_str(), channelName.c_str(), unk);
-#endif
if (channelName.empty())
return;
@@ -74,11 +70,9 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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());
-#endif
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->List(GetPlayer());
@@ -89,10 +83,8 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
std::string channelName, password;
recvPacket >> channelName >> password;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_PASSWORD %s Channel: %s, Password: %s",
GetPlayerInfo().c_str(), channelName.c_str(), password.c_str());
-#endif
if (password.length() > MAX_CHANNEL_PASS_STR)
return;
@@ -106,10 +98,8 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_SET_OWNER %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -123,10 +113,8 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_OWNER %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
-#endif
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->SendWhoOwner(GetPlayer()->GetGUID());
@@ -137,10 +125,8 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_MODERATOR %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -154,10 +140,8 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNMODERATOR %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -171,10 +155,8 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_MUTE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -188,10 +170,8 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNMUTE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -205,10 +185,8 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_INVITE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -222,10 +200,8 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_KICK %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -239,10 +215,8 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_BAN %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -256,10 +230,8 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
std::string channelName, targetName;
recvPacket >> channelName >> targetName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_UNBAN %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
-#endif
if (!normalizePlayerName(targetName))
return;
@@ -273,10 +245,8 @@ void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_ANNOUNCEMENTS %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
-#endif
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->Announce(GetPlayer());
@@ -287,10 +257,8 @@ void WorldSession::HandleChannelModerateOpcode(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_CHANNEL_MODERATE %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
-#endif
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
if (Channel* chn = cMgr->GetChannel(channelName, GetPlayer()))
@@ -308,10 +276,8 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket& recvPacket)
std::string channelName;
recvPacket >> channelName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", "CMSG_GET_CHANNEL_MEMBER_COUNT %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
-#endif
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeamId()))
{
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index aeed4321df..76ff50649c 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -213,9 +213,7 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
do
{
ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>((*result)[0].GetUInt32());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Loading char %s from account %u.", guid.ToString().c_str(), GetAccountId());
-#endif
+ LOG_DEBUG("network.opcode", "Loading char %s from account %u.", guid.ToString().c_str(), GetAccountId());
if (Player::BuildEnumData(result, &data))
{
_legitCharacters.insert(guid);
@@ -285,7 +283,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
{
data << (uint8)CHAR_CREATE_FAILED;
SendPacket(&data);
- LOG_ERROR("server", "Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", class_, GetAccountId());
+ LOG_ERROR("network.opcode", "Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", class_, GetAccountId());
return;
}
@@ -294,7 +292,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
{
data << (uint8)CHAR_CREATE_FAILED;
SendPacket(&data);
- LOG_ERROR("server", "Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", race_, GetAccountId());
+ LOG_ERROR("network.opcode", "Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", race_, GetAccountId());
return;
}
@@ -302,7 +300,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
if (raceEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION;
- LOG_ERROR("server", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
+ LOG_ERROR("network.opcode", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
SendPacket(&data);
return;
}
@@ -311,7 +309,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
if (classEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION_CLASS;
- LOG_ERROR("server", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
+ LOG_ERROR("network.opcode", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
SendPacket(&data);
return;
}
@@ -340,7 +338,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData)
{
data << (uint8)CHAR_NAME_NO_NAME;
SendPacket(&data);
- LOG_ERROR("server", "Account:[%d] but tried to Create character with empty [name] ", GetAccountId());
+ LOG_ERROR("network.opcode", "Account:[%d] but tried to Create character with empty [name] ", GetAccountId());
return;
}
@@ -602,9 +600,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
{
uint8 unk;
createInfo->Data >> unk;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Character creation %s (account %u) has unhandled tail data: [%u]", createInfo->Name.c_str(), GetAccountId(), unk);
-#endif
}
// pussywizard:
@@ -662,9 +658,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
SendPacket(&data);
std::string IP_str = GetRemoteAddress();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Account: %d (IP: %s) Create Character:[%s] (%s)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "Account: %d (IP: %s) Create Character:[%s] (%s)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUID().ToString().c_str());
LOG_INFO("entities.player", "Account: %d (IP: %s) Create Character:[%s] (%s)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUID().ToString().c_str());
sScriptMgr->OnPlayerCreate(&newChar);
sWorld->AddGlobalPlayerData(newChar.GetGUID().GetCounter(), GetAccountId(), newChar.GetName(), newChar.getGender(), newChar.getRace(), newChar.getClass(), newChar.getLevel(), 0, 0);
@@ -732,9 +726,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData)
}
std::string IP_str = GetRemoteAddress();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Account: %d (IP: %s) Delete Character:[%s] (%s)", GetAccountId(), IP_str.c_str(), name.c_str(), guid.ToString().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "Account: %d (IP: %s) Delete Character:[%s] (%s)", GetAccountId(), IP_str.c_str(), name.c_str(), guid.ToString().c_str());
LOG_INFO("entities.player", "Account: %d (IP: %s) Delete Character:[%s] (%s)", GetAccountId(), IP_str.c_str(), name.c_str(), guid.ToString().c_str());
// To prevent hook failure, place hook before removing reference from DB
@@ -761,7 +753,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
{
if (PlayerLoading() || GetPlayer() != nullptr)
{
- LOG_ERROR("server", "Player tries to login again, AccountId = %d", GetAccountId());
+ LOG_ERROR("network.opcode", "Player tries to login again, AccountId = %d", GetAccountId());
KickPlayer("Player tries to login again");
return;
}
@@ -771,7 +763,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
if (!playerGuid.IsPlayer() || !IsLegitCharacterForAccount(playerGuid))
{
- LOG_ERROR("server", "Account (%u) can't login with that character (%s).", GetAccountId(), playerGuid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Account (%u) can't login with that character (%s).", GetAccountId(), playerGuid.ToString().c_str());
KickPlayer("Account can't login with this character");
return;
}
@@ -922,9 +914,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder* holder)
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage("%s", GitRevision::GetFullVersion());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Sent server info");
-#endif
+ LOG_DEBUG("network.opcode", "WORLD: Sent server info");
}
if (uint32 guildId = Player::GetGuildIdFromStorage(pCurrChar->GetGUID().GetCounter()))
@@ -939,7 +929,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder* holder)
}
else
{
- LOG_ERROR("server", "Player %s (%s) marked as member of not existing guild (id: %u), removing guild membership for player.",
+ LOG_ERROR("network.opcode", "Player %s (%s) marked as member of not existing guild (id: %u), removing guild membership for player.",
pCurrChar->GetName().c_str(), pCurrChar->GetGUID().ToString().c_str(), guildId);
pCurrChar->SetInGuild(0);
pCurrChar->SetRank(0);
@@ -1231,9 +1221,7 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar)
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage("%s", GitRevision::GetFullVersion());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Sent server info");
-#endif
+ LOG_DEBUG("network.opcode", "WORLD: Sent server info");
}
data.Initialize(SMSG_LEARNED_DANCE_MOVES, 4 + 4);
@@ -1332,9 +1320,7 @@ void WorldSession::HandlePlayerLoginToCharOutOfWorld(Player* /*pCurrChar*/)
void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Received CMSG_SET_FACTION_ATWAR");
-#endif
+ LOG_DEBUG("network.opcode", "WORLD: Received CMSG_SET_FACTION_ATWAR");
uint32 repListID;
uint8 flag;
@@ -1348,7 +1334,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*/)
{
- LOG_ERROR("server", "WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
+ LOG_ERROR("network.opcode", "WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
GetPlayer()->GetReputationMgr().SendStates();
}
@@ -1382,9 +1368,7 @@ void WorldSession::HandleTutorialReset(WorldPacket& /*recvData*/)
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Received CMSG_SET_WATCHED_FACTION");
-#endif
+ LOG_DEBUG("network.opcode", "WORLD: Received CMSG_SET_WATCHED_FACTION");
uint32 fact;
recvData >> fact;
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
@@ -1392,9 +1376,7 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Received CMSG_SET_FACTION_INACTIVE");
-#endif
+ LOG_DEBUG("network.opcode", "WORLD: Received CMSG_SET_FACTION_INACTIVE");
uint32 replistid;
uint8 inactive;
recvData >> replistid >> inactive;
@@ -1404,18 +1386,14 @@ void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData)
void WorldSession::HandleShowingHelmOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "CMSG_SHOWING_HELM for %s", _player->GetName().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "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)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str());
recvData.read_skip<uint8>(); // unknown, bool?
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
}
@@ -1633,9 +1611,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recvData)
void WorldSession::HandleAlterAppearance(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ALTER_APPEARANCE");
-#endif
uint32 Hair, Color, FacialHair, SkinColor;
recvData >> Hair >> Color >> FacialHair >> SkinColor;
@@ -1712,9 +1688,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
if (slot >= MAX_GLYPH_SLOT_INDEX)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
-#endif
return;
}
@@ -1737,7 +1711,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
recvData >> guid;
if (!IsLegitCharacterForAccount(guid))
{
- LOG_ERROR("server", "Account %u, IP: %s tried to customise character %s, but it does not belong to their account!",
+ LOG_ERROR("network.opcode", "Account %u, IP: %s tried to customise character %s, but it does not belong to their account!",
GetAccountId(), GetRemoteAddress().c_str(), guid.ToString().c_str());
recvData.rfinish();
KickPlayer("HandleCharCustomize");
@@ -1875,9 +1849,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_SAVE");
-#endif
uint64 setGuid;
recvData.readPackGUID(setGuid);
@@ -1936,9 +1908,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData)
void WorldSession::HandleEquipmentSetDelete(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_DELETE");
-#endif
uint64 setGuid;
recvData.readPackGUID(setGuid);
@@ -1948,9 +1918,7 @@ void WorldSession::HandleEquipmentSetDelete(WorldPacket& recvData)
void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_USE");
-#endif
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
@@ -1960,9 +1928,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData)
uint8 srcbag, srcslot;
recvData >> srcbag >> srcslot;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.player.items", "Item %s: srcbag %u, srcslot %u", itemGuid.ToString().c_str(), srcbag, srcslot);
-#endif
// check if item slot is set to "ignored" (raw value == 1), must not be unequipped then
if (itemGuid.GetRawValue() == 1)
@@ -2043,7 +2009,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
if (!IsLegitCharacterForAccount(guid))
{
- LOG_ERROR("server", "Account %u, IP: %s tried to factionchange character %s, but it does not belong to their account!",
+ LOG_ERROR("network.opcode", "Account %u, IP: %s tried to factionchange character %s, but it does not belong to their account!",
GetAccountId(), GetRemoteAddress().c_str(), guid.ToString().c_str());
recvData.rfinish();
KickPlayer("HandleCharFactionOrRaceChange");
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index 2d472ad3dc..05c3eb4357 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -57,7 +57,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (type >= MAX_CHAT_MSG_TYPE)
{
- LOG_ERROR("server", "CHAT: Wrong message type received: %u", type);
+ LOG_ERROR("network.opcode", "CHAT: Wrong message type received: %u", type);
recvData.rfinish();
return;
}
@@ -298,7 +298,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
{
if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) && !ChatHandler(this).isValidChatMessage(msg.c_str()))
{
- //LOG_ERROR("server", "Player %s (%s) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName().c_str(),
+ //LOG_ERROR("network.opcode", "Player %s (%s) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName().c_str(),
// GetPlayer()->GetGUID().ToString().c_str(), msg.c_str());
if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK))
@@ -668,7 +668,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
break;
}
default:
- LOG_ERROR("server", "CHAT: unknown message type %u, lang: %u", type, lang);
+ LOG_ERROR("network.opcode", "CHAT: unknown message type %u, lang: %u", type, lang);
break;
}
}
@@ -813,9 +813,7 @@ void WorldSession::HandleChannelDeclineInvite(WorldPacket& recvPacket)
// used only with EXTRA_LOGS
(void)recvPacket;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Opcode %u", recvPacket.GetOpcode());
-#endif
}
void WorldSession::SendPlayerNotFoundNotice(std::string const& name)
diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp
index 0480565e04..ade2fe6f52 100644
--- a/src/server/game/Handlers/CombatHandler.cpp
+++ b/src/server/game/Handlers/CombatHandler.cpp
@@ -19,9 +19,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_ATTACKSWING: %s", guid.ToString().c_str());
-#endif
Unit* pEnemy = ObjectAccessor::GetUnit(*_player, guid);
@@ -68,7 +66,7 @@ void WorldSession::HandleSetSheathedOpcode(WorldPacket& recvData)
if (sheathed >= MAX_SHEATH_STATE)
{
- LOG_ERROR("server", "Unknown sheath state %u ??", sheathed);
+ LOG_ERROR("network.opcode", "Unknown sheath state %u ??", sheathed);
return;
}
diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp
index 0d59c2dcfb..d982a2f0c0 100644
--- a/src/server/game/Handlers/DuelHandler.cpp
+++ b/src/server/game/Handlers/DuelHandler.cpp
@@ -27,10 +27,8 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
if (player == player->duel->initiator || !plTarget || player == plTarget || player->duel->startTime != 0 || plTarget->duel->startTime != 0)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player 1 is: %s (%s)", player->GetGUID().ToString().c_str(), player->GetName().c_str());
- LOG_DEBUG("server", "Player 2 is: %s (%s)", plTarget->GetGUID().ToString().c_str(), plTarget->GetName().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "Player 1 is: %s (%s)", player->GetGUID().ToString().c_str(), player->GetName().c_str());
+ LOG_DEBUG("network.opcode", "Player 2 is: %s (%s)", plTarget->GetGUID().ToString().c_str(), plTarget->GetName().c_str());
time_t now = time(nullptr);
player->duel->startTimer = now;
@@ -42,9 +40,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
void WorldSession::HandleDuelCancelledOpcode(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_DUEL_CANCELLED");
-#endif
ObjectGuid guid;
recvPacket >> guid;
diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp
index ec2df2361a..6f7dcf7161 100644
--- a/src/server/game/Handlers/GroupHandler.cpp
+++ b/src/server/game/Handlers/GroupHandler.cpp
@@ -48,9 +48,7 @@ void WorldSession::SendPartyResult(PartyOperation operation, const std::string&
void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_INVITE");
-#endif
std::string membername;
recvData >> membername;
@@ -208,9 +206,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_ACCEPT");
-#endif
recvData.read_skip<uint32>();
Group* group = GetPlayer()->GetGroupInvite();
@@ -232,7 +228,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
if (group->GetLeaderGUID() == GetPlayer()->GetGUID())
{
- LOG_ERROR("server", "HandleGroupAcceptOpcode: player %s (%s) tried to accept an invite to his own group",
+ LOG_ERROR("network.opcode", "HandleGroupAcceptOpcode: player %s (%s) tried to accept an invite to his own group",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str());
return;
}
@@ -272,9 +268,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupDeclineOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_DECLINE");
-#endif
Group* group = GetPlayer()->GetGroupInvite();
if (!group)
@@ -297,9 +291,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_UNINVITE_GUID");
-#endif
ObjectGuid guid;
std::string reason, name;
@@ -309,7 +301,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
//can't uninvite yourself
if (guid == GetPlayer()->GetGUID())
{
- LOG_ERROR("server", "WorldSession::HandleGroupUninviteGuidOpcode: leader %s (%s) tried to uninvite himself from the group.",
+ LOG_ERROR("network.opcode", "WorldSession::HandleGroupUninviteGuidOpcode: leader %s (%s) tried to uninvite himself from the group.",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str());
return;
}
@@ -358,9 +350,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_UNINVITE");
-#endif
std::string membername;
recvData >> membername;
@@ -372,7 +362,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData)
// can't uninvite yourself
if (GetPlayer()->GetName() == membername)
{
- LOG_ERROR("server", "WorldSession::HandleGroupUninviteOpcode: leader %s (%s) tried to uninvite himself from the group.",
+ LOG_ERROR("network.opcode", "WorldSession::HandleGroupUninviteOpcode: leader %s (%s) tried to uninvite himself from the group.",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str());
return;
}
@@ -405,9 +395,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_SET_LEADER");
-#endif
ObjectGuid guid;
recvData >> guid;
@@ -428,9 +416,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupDisbandOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_DISBAND");
-#endif
Group* grp = GetPlayer()->GetGroup();
if (!grp)
@@ -453,9 +439,7 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleLootMethodOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_LOOT_METHOD");
-#endif
uint32 lootMethod;
ObjectGuid lootMaster;
@@ -516,9 +500,7 @@ void WorldSession::HandleLootRoll(WorldPacket& recvData)
void WorldSession::HandleMinimapPingOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_MINIMAP_PING");
-#endif
if (!GetPlayer()->GetGroup())
return;
@@ -540,9 +522,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recvData)
void WorldSession::HandleRandomRollOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_RANDOM_ROLL");
-#endif
uint32 minimum, maximum, roll;
recvData >> minimum;
@@ -569,9 +549,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recvData)
void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_RAID_TARGET_UPDATE");
-#endif
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -610,9 +588,7 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_RAID_CONVERT");
-#endif
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -633,9 +609,7 @@ void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP");
-#endif
// we will get correct pointer for group here, so we don't have to check if group is BG raid
Group* group = GetPlayer()->GetGroup();
@@ -674,9 +648,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket& recvData)
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER");
-#endif
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -697,9 +669,7 @@ void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket& recvData)
void WorldSession::HandlePartyAssignmentOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_PARTY_ASSIGNMENT");
-#endif
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -733,9 +703,7 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket& recvData)
void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_RAID_READY_CHECK");
-#endif
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -1120,9 +1088,7 @@ void WorldSession::HandleRequestRaidInfoOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleOptOutOfLootOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_OPT_OUT_OF_LOOT");
-#endif
uint32 passOnLoot;
recvData >> passOnLoot; // 1 always pass, 0 do not pass
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index 23a1a83916..b307096ebf 100644
--- a/src/server/game/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
@@ -25,9 +25,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
uint32 guildId;
recvPacket >> guildId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_QUERY [%s]: Guild: %u", GetPlayerInfo().c_str(), guildId);
-#endif
if (!guildId)
return;
@@ -40,7 +38,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
std::string name;
recvPacket >> name;
- LOG_ERROR("server", "CMSG_GUILD_CREATE: Possible hacking-attempt: %s tried to create a guild [Name: %s] using cheats", GetPlayerInfo().c_str(), name.c_str());
+ LOG_ERROR("network.opcode", "CMSG_GUILD_CREATE: Possible hacking-attempt: %s tried to create a guild [Name: %s] using cheats", GetPlayerInfo().c_str(), name.c_str());
}
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
@@ -48,9 +46,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
std::string invitedName;
recvPacket >> invitedName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_INVITE [%s]: Invited: %s", GetPlayerInfo().c_str(), invitedName.c_str());
-#endif
if (normalizePlayerName(invitedName))
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleInviteMember(this, invitedName);
@@ -61,9 +57,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_REMOVE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
-#endif
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -72,9 +66,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_ACCEPT [%s]", GetPlayer()->GetName().c_str());
-#endif
if (!GetPlayer()->GetGuildId())
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited()))
@@ -83,9 +75,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_DECLINE [%s]", GetPlayerInfo().c_str());
-#endif
GetPlayer()->SetGuildIdInvited(0);
GetPlayer()->SetInGuild(0);
@@ -93,9 +83,7 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_INFO [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendInfo(this);
@@ -103,9 +91,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_ROSTER [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRoster(this);
@@ -118,9 +104,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_PROMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
-#endif
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -132,9 +116,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_DEMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
-#endif
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -143,9 +125,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_LEAVE [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleLeaveMember(this);
@@ -153,9 +133,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_DISBAND [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleDisband(this);
@@ -166,9 +144,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
std::string name;
recvPacket >> name;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_LEADER [%s]: Target: %s", GetPlayerInfo().c_str(), name.c_str());
-#endif
if (normalizePlayerName(name))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -180,9 +156,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
std::string motd;
recvPacket >> motd;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_MOTD [%s]: MOTD: %s", GetPlayerInfo().c_str(), motd.c_str());
-#endif
// Check for overflow
if (motd.length() > 128)
@@ -201,9 +175,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
std::string note;
recvPacket >> playerName >> note;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_SET_PUBLIC_NOTE [%s]: Target: %s, Note: %s", GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
-#endif
// Check for overflow
if (note.length() > 31)
@@ -223,10 +195,8 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
std::string note;
recvPacket >> playerName >> note;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_SET_OFFICER_NOTE [%s]: Target: %s, Note: %s",
GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
-#endif
// Check for overflow
if (note.length() > 31)
@@ -254,9 +224,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
uint32 money;
recvPacket >> money;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_RANK [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), rankId);
-#endif
Guild* guild = GetPlayer()->GetGuild();
if (!guild)
@@ -293,9 +261,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
std::string rankName;
recvPacket >> rankName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_ADD_RANK [%s]: Rank: %s", GetPlayerInfo().c_str(), rankName.c_str());
-#endif
// Check for overflow
if (rankName.length() > 15)
@@ -310,9 +276,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_DEL_RANK [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRemoveLowestRank(this);
@@ -323,9 +287,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
std::string info;
recvPacket >> info;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_INFO_TEXT [%s]: %s", GetPlayerInfo().c_str(), info.c_str());
-#endif
// Check for overflow
if (info.length() > 500)
@@ -346,12 +308,10 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
EmblemInfo emblemInfo;
emblemInfo.ReadPacket(recvPacket);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_SAVE_GUILD_EMBLEM [%s]: Guid: [%s] Style: %d, Color: %d, BorderStyle: %d, BorderColor: %d, BackgroundColor: %d"
, GetPlayerInfo().c_str(), vendorGuid.ToString().c_str(), emblemInfo.GetStyle()
, emblemInfo.GetColor(), emblemInfo.GetBorderStyle()
, emblemInfo.GetBorderColor(), emblemInfo.GetBackgroundColor());
-#endif
if (GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_TABARDDESIGNER))
{
// Remove fake death
@@ -369,9 +329,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_EVENT_LOG_QUERY [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendEventLog(this);
@@ -379,9 +337,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket& /* recvData */)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendMoneyInfo(this);
@@ -389,9 +345,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket& /* recvData */)
void WorldSession::HandleGuildPermissions(WorldPacket& /* recvData */)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendPermissions(this);
@@ -404,10 +358,8 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket& recvData)
bool sendAllSlots;
recvData >> guid >> sendAllSlots;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [%s] AllSlots: %u"
, GetPlayerInfo().c_str(), guid.ToString().c_str(), sendAllSlots);
-#endif
Guild* const guild = GetPlayer()->GetGuild();
if (!guild)
{
@@ -427,10 +379,8 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket& recvData)
recvData >> guid >> tabId >> full;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [%s], TabId: %u, ShowTabs: %u"
, GetPlayerInfo().c_str(), guid.ToString().c_str(), tabId, full);
-#endif
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankTabData(this, tabId);
@@ -442,10 +392,8 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket& recvData)
uint32 money;
recvData >> guid >> money;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [%s], money: %u",
GetPlayerInfo().c_str(), guid.ToString().c_str(), money);
-#endif
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
if (money && GetPlayer()->HasEnoughMoney(money))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -458,10 +406,8 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvData)
uint32 money;
recvData >> guid >> money;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [%s], money: %u",
GetPlayerInfo().c_str(), guid.ToString().c_str(), money);
-#endif
if (money && GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleMemberWithdrawMoney(this, money);
@@ -469,9 +415,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvData)
void WorldSession::HandleGuildBankSwapItems(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_BANK_SWAP_ITEMS [%s]", GetPlayerInfo().c_str());
-#endif
ObjectGuid GoGuid;
recvData >> GoGuid;
@@ -557,9 +501,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket& recvData)
recvData >> guid >> tabId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_BANK_BUY_TAB [%s]: Go: [%s], TabId: %u", GetPlayerInfo().c_str(), guid.ToString().c_str(), tabId);
-#endif
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -574,10 +516,8 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket& recvData)
recvData >> guid >> tabId >> name >> icon;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_GUILD_BANK_UPDATE_TAB [%s]: Go: [%s], TabId: %u, Name: %s, Icon: %s"
, GetPlayerInfo().c_str(), guid.ToString().c_str(), tabId, name.c_str(), icon.c_str());
-#endif
// Check for overflow
if (name.length() > 16 || icon.length() > 128)
@@ -597,9 +537,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket& recvData)
uint8 tabId;
recvData >> tabId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_GUILD_BANK_LOG_QUERY [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankLog(this, tabId);
@@ -610,9 +548,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket& recvData)
uint8 tabId;
recvData >> tabId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "MSG_QUERY_GUILD_BANK_TEXT [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
-#endif
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankTabText(this, tabId);
@@ -624,9 +560,7 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket& recvData)
std::string text;
recvData >> tabId >> text;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("guild", "CMSG_SET_GUILD_BANK_TEXT [%s]: TabId: %u, Text: %s", GetPlayerInfo().c_str(), tabId, text.c_str());
-#endif
// Check for overflow
if (text.length() > 500)
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index f48429ea3c..b184fb8467 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -426,9 +426,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData)
uint32 item;
recvData >> item;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "STORAGE: Item Query = %u", item);
-#endif
+ LOG_DEBUG("network.opcode", "STORAGE: Item Query = %u", item);
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(item);
if (pProto)
@@ -574,9 +572,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket& recvData)
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item);
-#endif
WorldPacket queryData(SMSG_ITEM_QUERY_SINGLE_RESPONSE, 4);
queryData << uint32(item | 0x80000000);
SendPacket(&queryData);
@@ -590,7 +586,7 @@ void WorldSession::HandleReadItem(WorldPacket& recvData)
uint8 bag, slot;
recvData >> bag >> slot;
- //LOG_DEBUG("server", "STORAGE: Read bag = %u, slot = %u", bag, slot);
+ //LOG_DEBUG("network.opcode", "STORAGE: Read bag = %u, slot = %u", bag, slot);
Item* pItem = _player->GetItemByPos(bag, slot);
if (pItem && pItem->GetTemplate()->PageText)
@@ -601,16 +597,12 @@ void WorldSession::HandleReadItem(WorldPacket& recvData)
if (msg == EQUIP_ERR_OK)
{
data.Initialize (SMSG_READ_ITEM_OK, 8);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "STORAGE: Item page sent");
-#endif
+ LOG_DEBUG("network.opcode", "STORAGE: Item page sent");
}
else
{
data.Initialize(SMSG_READ_ITEM_FAILED, 8);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "STORAGE: Unable to read item");
-#endif
+ LOG_DEBUG("network.opcode", "STORAGE: Unable to read item");
_player->SendEquipError(msg, pItem, nullptr);
}
data << pItem->GetGUID();
@@ -622,9 +614,7 @@ void WorldSession::HandleReadItem(WorldPacket& recvData)
void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_SELL_ITEM");
-#endif
ObjectGuid vendorguid, itemguid;
uint32 count;
@@ -636,9 +626,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleSellItemOpcode - Unit (%s) not found or you can not interact with him.", vendorguid.ToString().c_str());
-#endif
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, itemguid, 0);
return;
}
@@ -714,7 +702,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
Item* pNewItem = pItem->CloneItem(count, _player);
if (!pNewItem)
{
- LOG_ERROR("server", "WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count);
+ LOG_ERROR("network.opcode", "WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count);
_player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, itemguid, 0);
return;
}
@@ -753,9 +741,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
void WorldSession::HandleBuybackItem(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_BUYBACK_ITEM");
-#endif
ObjectGuid vendorguid;
uint32 slot;
@@ -764,9 +750,7 @@ void WorldSession::HandleBuybackItem(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleBuybackItem - Unit (%s) not found or you can not interact with him.", vendorguid.ToString().c_str());
-#endif
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, ObjectGuid::Empty, 0);
return;
}
@@ -814,9 +798,7 @@ void WorldSession::HandleBuybackItem(WorldPacket& recvData)
void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
-#endif
ObjectGuid vendorguid, bagguid;
uint32 item, slot, count;
uint8 bagslot;
@@ -858,9 +840,7 @@ void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket& recvData)
void WorldSession::HandleBuyItemOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_BUY_ITEM");
-#endif
ObjectGuid vendorguid;
uint32 item, slot, count;
uint8 unk1;
@@ -885,25 +865,19 @@ void WorldSession::HandleListInventoryOpcode(WorldPacket& recvData)
if (!GetPlayer()->IsAlive())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_LIST_INVENTORY");
-#endif
SendListInventory(guid);
}
void WorldSession::SendListInventory(ObjectGuid vendorGuid, uint32 vendorEntry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_LIST_INVENTORY");
-#endif
Creature* vendor = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR);
if (!vendor)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: SendListInventory - Unit (%s) not found or you can not interact with him.", vendorGuid.ToString().c_str());
-#endif
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, ObjectGuid::Empty, 0);
return;
}
@@ -961,9 +935,7 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid, uint32 vendorEntry)
ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(vendor->GetEntry(), item->item);
if (!sConditionMgr->IsObjectMeetToConditions(_player, vendor, conditions))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), item->item);
-#endif
continue;
}
@@ -1049,9 +1021,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket& recvData)
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_BUY_BANK_SLOT");
-#endif
ObjectGuid guid;
recvPacket >> guid;
@@ -1067,9 +1037,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
// next slot
++slot;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PLAYER: Buy bank bag slot, slot number = %u", slot);
-#endif
+ LOG_DEBUG("network.opcode", "PLAYER: Buy bank bag slot, slot number = %u", slot);
BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot);
@@ -1102,15 +1070,11 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_AUTOBANK_ITEM");
-#endif
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
-#endif
if (!CanUseBank())
{
@@ -1144,15 +1108,11 @@ void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_AUTOSTORE_BANK_ITEM");
-#endif
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
-#endif
if (!CanUseBank())
{
@@ -1202,9 +1162,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket& recvData)
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_SET_AMMO");
-#endif
uint32 item;
recvData >> item;
@@ -1250,9 +1208,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket& recvData)
recvData >> itemid;
recvData.read_skip<uint64>(); // guid
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
-#endif
ItemSetNameEntry const* pName = sObjectMgr->GetItemSetNameEntry(itemid);
if (pName)
{
@@ -1272,18 +1228,14 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket& recvData)
void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_WRAP_ITEM");
-#endif
uint8 gift_bag, gift_slot, item_bag, item_slot;
recvData >> gift_bag >> gift_slot; // paper
recvData >> item_bag >> item_slot; // item
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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);
-#endif
Item* gift = _player->GetItemByPos(gift_bag, gift_slot);
if (!gift)
@@ -1403,9 +1355,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData)
void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_SOCKET_GEMS");
-#endif
ObjectGuid item_guid;
ObjectGuid gem_guids[MAX_GEM_SOCKETS];
@@ -1603,9 +1553,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
-#endif
uint32 eslot;
@@ -1629,9 +1577,7 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recvData)
void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_ITEM_REFUND_INFO");
-#endif
ObjectGuid guid;
recvData >> guid; // item guid
@@ -1639,9 +1585,7 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
Item* item = _player->GetItemByGuid(guid);
if (!item)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Item refund: item not found!");
-#endif
return;
}
@@ -1650,18 +1594,14 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
void WorldSession::HandleItemRefund(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_ITEM_REFUND");
-#endif
ObjectGuid guid;
recvData >> guid; // item guid
Item* item = _player->GetItemByGuid(guid);
if (!item)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Item refund: item not found!");
-#endif
return;
}
@@ -1682,9 +1622,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket& recvData )
ObjectGuid itemGuid;
recvData >> itemGuid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_ITEM_TEXT_QUERY item: %s", itemGuid.ToString().c_str());
-#endif
WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, 50); // guess size
diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp
index a5f4eb4459..a832dcd047 100644
--- a/src/server/game/Handlers/LFGHandler.cpp
+++ b/src/server/game/Handlers/LFGHandler.cpp
@@ -56,9 +56,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
recvData >> numDungeons;
if (!numDungeons)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_JOIN [%s] no dungeons selected", GetPlayer()->GetGUID().ToString().c_str());
-#endif
recvData.rfinish();
return;
}
@@ -77,10 +75,8 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
std::string comment;
recvData >> comment;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_JOIN [%s] roles: %u, Dungeons: %u, Comment: %s",
GetPlayer()->GetGUID().ToString().c_str(), roles, uint8(newDungeons.size()), comment.c_str());
-#endif
sLFGMgr->JoinLfg(GetPlayer(), uint8(roles), newDungeons, comment);
}
@@ -91,9 +87,7 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
ObjectGuid guid = GetPlayer()->GetGUID();
ObjectGuid gguid = group ? group->GetGUID() : guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_LEAVE [%s] in group: %u", guid.ToString().c_str(), group ? 1 : 0);
-#endif
// Check cheating - only leader can leave the queue
if (!group || group->GetLeaderGUID() == guid)
@@ -110,9 +104,7 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
recvData >> proposalID;
recvData >> accept;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_PROPOSAL_RESULT [%s] proposal: %u accept: %u", GetPlayer()->GetGUID().ToString().c_str(), proposalID, accept ? 1 : 0);
-#endif
sLFGMgr->UpdateProposal(proposalID, GetPlayer()->GetGUID(), accept);
}
@@ -124,15 +116,11 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
Group* group = GetPlayer()->GetGroup();
if (!group)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_SET_ROLES [%s] Not in group", guid.ToString().c_str());
-#endif
return;
}
ObjectGuid gguid = group->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_SET_ROLES: Group [%s], Player [%s], Roles: %u", gguid.ToString().c_str(), guid.ToString().c_str(), roles);
-#endif
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
@@ -140,10 +128,8 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recvData)
{
std::string comment;
recvData >> comment;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
ObjectGuid guid = GetPlayer()->GetGUID();
LOG_DEBUG("network", "CMSG_LFG_SET_COMMENT [%s] comment: %s", guid.ToString().c_str(), comment.c_str());
-#endif
sLFGMgr->SetComment(GetPlayer()->GetGUID(), comment);
sLFGMgr->LfrSetComment(GetPlayer(), comment);
@@ -155,9 +141,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData)
recvData >> agree;
ObjectGuid guid = GetPlayer()->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_SET_BOOT_VOTE [%s] agree: %u", guid.ToString().c_str(), agree ? 1 : 0);
-#endif
sLFGMgr->UpdateBoot(guid, agree);
}
@@ -166,18 +150,14 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
bool out;
recvData >> out;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_TELEPORT [%s] out: %u", GetPlayer()->GetGUID().ToString().c_str(), out ? 1 : 0);
-#endif
sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
}
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
ObjectGuid guid = GetPlayer()->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST [%s]", guid.ToString().c_str());
-#endif
// Get Random dungeons that can be done at a certain level and expansion
uint8 level = GetPlayer()->getLevel();
@@ -190,9 +170,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
uint32 rsize = uint32(randomDungeons.size());
uint32 lsize = uint32(lock.size());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_PLAYER_INFO [%s]", guid.ToString().c_str());
-#endif
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
@@ -250,9 +228,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
ObjectGuid guid = GetPlayer()->GetGUID();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LFG_PARTY_LOCK_INFO_REQUEST [%s]", guid.ToString().c_str());
-#endif
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -278,9 +254,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_PARTY_INFO [%s]", guid.ToString().c_str());
-#endif
WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
BuildPartyLockDungeonBlock(data, lockMap);
SendPacket(&data);
@@ -304,9 +278,7 @@ void WorldSession::HandleLfrSearchLeaveOpcode(WorldPacket& recvData)
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
-#endif
ObjectGuid guid = GetPlayer()->GetGUID();
lfg::LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
@@ -343,10 +315,8 @@ void WorldSession::SendLfgUpdatePlayer(lfg::LfgUpdateData const& updateData)
break;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
GetPlayerInfo().c_str(), updateData.updateType);
-#endif
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(size > 0); // Extra info
@@ -386,10 +356,8 @@ void WorldSession::SendLfgUpdateParty(lfg::LfgUpdateData const& updateData)
break;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("lfg", "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
GetPlayerInfo().c_str(), updateData.updateType);
-#endif
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(size > 0); // Extra info
@@ -412,9 +380,7 @@ void WorldSession::SendLfgUpdateParty(lfg::LfgUpdateData const& updateData)
void WorldSession::SendLfgRoleChosen(ObjectGuid guid, uint8 roles)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_ROLE_CHOSEN [%s] guid: [%s] roles: %u", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str(), roles);
-#endif
WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4);
data << guid; // Guid
@@ -431,9 +397,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
else
dungeons = roleCheck.dungeons;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_ROLE_CHECK_UPDATE [%s]", GetPlayer()->GetGUID().ToString().c_str());
-#endif
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
@@ -478,9 +442,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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_JOIN_RESULT [%s] checkResult: %u checkValue: %u", GetPlayer()->GetGUID().ToString().c_str(), joinData.result, joinData.state);
-#endif
WorldPacket data(SMSG_LFG_JOIN_RESULT, 4 + 4 + size);
data << uint32(joinData.result); // Check Result
data << uint32(joinData.state); // Check Value
@@ -491,11 +453,9 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
void WorldSession::SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "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",
GetPlayer()->GetGUID().ToString().c_str(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg, queueData.waitTimeTank,
queueData.waitTimeHealer, queueData.waitTimeDps, queueData.queuedTime, queueData.tanks, queueData.healers, queueData.dps);
-#endif
WorldPacket data(SMSG_LFG_QUEUE_STATUS, 4 + 4 + 4 + 4 + 4 + 4 + 1 + 1 + 1 + 4);
data << uint32(queueData.dungeonId); // Dungeon
data << int32(queueData.waitTimeAvg); // Average Wait time
@@ -560,11 +520,9 @@ void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
++agreeNum;
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_BOOT_PROPOSAL_UPDATE [%s] inProgress: %u - didVote: %u - agree: %u - victim: [%s] votes: %u - agrees: %u - left: %u - needed: %u - reason %s",
guid.ToString().c_str(), uint8(boot.inProgress), uint8(playerVote != lfg::LFG_ANSWER_PENDING), uint8(playerVote == lfg::LFG_ANSWER_AGREE),
boot.victim.ToString().c_str(), votesNum, agreeNum, secsleft, lfg::LFG_GROUP_KICK_VOTES_NEEDED, boot.reason.c_str());
-#endif
WorldPacket data(SMSG_LFG_BOOT_PROPOSAL_UPDATE, 1 + 1 + 1 + 8 + 4 + 4 + 4 + 4 + boot.reason.length());
data << uint8(boot.inProgress); // Vote in progress
data << uint8(playerVote != lfg::LFG_ANSWER_PENDING); // Did Vote
@@ -585,9 +543,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
bool silent = !proposal.isNew && gguid == proposal.group;
uint32 dungeonEntry = proposal.dungeonId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_PROPOSAL_UPDATE [%s state: %u", guid.ToString().c_str(), proposal.state);
-#endif
// show random dungeon if player selected random dungeon and it's not lfg group
if (!silent)
@@ -630,9 +586,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
void WorldSession::SendLfgLfrList(bool update)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_LFR_LIST [%s] update: %u", GetPlayer()->GetGUID().ToString().c_str(), update ? 1 : 0);
-#endif
WorldPacket data(SMSG_LFG_UPDATE_SEARCH, 1);
data << uint8(update); // In Lfg Queue?
SendPacket(&data);
@@ -640,18 +594,14 @@ void WorldSession::SendLfgLfrList(bool update)
void WorldSession::SendLfgDisabled()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_DISABLED [%s]", GetPlayer()->GetGUID().ToString().c_str());
-#endif
WorldPacket data(SMSG_LFG_DISABLED, 0);
SendPacket(&data);
}
void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_OFFER_CONTINUE [%s] dungeon entry: %u", GetPlayer()->GetGUID().ToString().c_str(), dungeonEntry);
-#endif
WorldPacket data(SMSG_LFG_OFFER_CONTINUE, 4);
data << uint32(dungeonEntry);
SendPacket(&data);
@@ -659,9 +609,7 @@ void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
void WorldSession::SendLfgTeleportError(uint8 err)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SMSG_LFG_TELEPORT_DENIED [%s] reason: %u", GetPlayer()->GetGUID().ToString().c_str(), err);
-#endif
WorldPacket data(SMSG_LFG_TELEPORT_DENIED, 4);
data << uint32(err); // Error
SendPacket(&data);
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index b8ef89e00b..adad066442 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -24,9 +24,7 @@
void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
-#endif
Player* player = GetPlayer();
ObjectGuid lguid = player->GetLootGUID();
Loot* loot = nullptr;
@@ -96,9 +94,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_LOOT_MONEY");
-#endif
Player* player = GetPlayer();
ObjectGuid guid = player->GetLootGUID();
@@ -218,9 +214,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleLootOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_LOOT");
-#endif
ObjectGuid guid;
recvData >> guid;
@@ -238,9 +232,7 @@ void WorldSession::HandleLootOpcode(WorldPacket& recvData)
void WorldSession::HandleLootReleaseOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_LOOT_RELEASE");
-#endif
// cheaters can modify lguid to prevent correct apply loot release code and re-loot
// use internal stored guid
@@ -300,9 +292,7 @@ void WorldSession::DoLootRelease(ObjectGuid lguid)
// Xinef: prevents exploits with just opening GO and spawning bilions of npcs, which can crash core if you know what you're doin ;)
if (go->GetGoType() == GAMEOBJECT_TYPE_CHEST && go->GetGOInfo()->chest.eventId)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Chest ScriptStart id %u for GO %u", go->GetGOInfo()->chest.eventId, go->GetSpawnId());
-#endif
player->GetMap()->ScriptsStart(sEventScripts, go->GetGOInfo()->chest.eventId, player, go);
}
}
@@ -420,9 +410,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName().c_str());
-#endif
if (_player->GetLootGUID() != lootguid)
{
@@ -461,9 +449,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
if (slotid >= loot->items.size() + loot->quest_items.size())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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());
-#endif
return;
}
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index b41130d400..7c81859346 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -27,7 +27,7 @@ bool WorldSession::CanOpenMailBox(ObjectGuid guid)
{
if (_player->GetSession()->GetSecurity() < SEC_MODERATOR)
{
- LOG_ERROR("server", "%s attempt open mailbox in cheating way.", _player->GetName().c_str());
+ LOG_ERROR("network.opcode", "%s attempt open mailbox in cheating way.", _player->GetName().c_str());
return false;
}
}
@@ -115,18 +115,14 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
if (!rc)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player %s is sending mail to %s (GUID: not existed!) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
+ LOG_DEBUG("network.opcode", "Player %s is sending mail to %s (GUID: not existed!) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
player->GetGUID().ToString().c_str(), receiver.c_str(), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
-#endif
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_NOT_FOUND);
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player %s is sending mail to %s (%s) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
+ LOG_DEBUG("network.opcode", "Player %s is sending mail to %s (%s) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
player->GetGUID().ToString().c_str(), receiver.c_str(), rc.ToString().c_str(), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
-#endif
if (player->GetGUID() == rc)
{
@@ -136,7 +132,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
if (money && COD) // cannot send money in a COD mail
{
- LOG_ERROR("server", "%s attempt to dupe money!!!.", receiver.c_str());
+ LOG_ERROR("network.opcode", "%s attempt to dupe money!!!.", receiver.c_str());
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_INTERNAL_ERROR);
return;
}
@@ -750,9 +746,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket& recvData)
bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender);
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_MAIL_TEXT_MASK);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "HandleMailCreateTextItem mailid=%u", mailId);
-#endif
+ LOG_DEBUG("network.opcode", "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 31f314b849..d07a4e6002 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -45,9 +45,7 @@
void WorldSession::HandleRepopRequestOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_REPOP_REQUEST Message");
-#endif
recv_data.read_skip<uint8>();
@@ -64,10 +62,8 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recv_data)
// release spirit after he's killed but before he is updated
if (GetPlayer()->getDeathState() == JUST_DIED)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "HandleRepopRequestOpcode: got request after player %s (%s) was killed and before he was updated",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str());
-#endif
GetPlayer()->KillPlayer();
}
@@ -83,9 +79,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket& recv_data)
void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_GOSSIP_SELECT_OPTION");
-#endif
uint32 gossipListId;
uint32 menuId;
@@ -105,9 +99,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
return;
}
}
@@ -116,9 +108,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
go = _player->GetMap()->GetGameObject(guid);
if (!go)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - GameObject (%s) not found.", guid.ToString().c_str());
-#endif
return;
}
}
@@ -141,9 +131,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for %s.", guid.ToString().c_str());
-#endif
return;
}
@@ -153,9 +141,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
if ((unit && unit->GetCreatureTemplate()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id");
-#endif
if (unit)
unit->LastUsedScriptID = unit->GetCreatureTemplate()->ScriptID;
if (go)
@@ -409,9 +395,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData)
void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recv_data*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity());
-#endif
if (ObjectGuid lguid = GetPlayer()->GetLootGUID())
DoLootRelease(lguid);
@@ -474,9 +458,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket& /*recv_data*/)
void WorldSession::HandlePlayerLogoutOpcode(WorldPacket& /*recv_data*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_PLAYER_LOGOUT Message");
-#endif
}
void WorldSession::HandleLogoutCancelOpcode(WorldPacket& /*recv_data*/)
@@ -525,9 +507,7 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket& recv_data)
uint32 newZone;
recv_data >> newZone;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd ZONE_UPDATE: %u", newZone);
-#endif
// use server size data
uint32 newzone, newarea;
@@ -627,7 +607,6 @@ void WorldSession::HandleBugOpcode(WorldPacket& recv_data)
recv_data >> typelen >> type;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (suggestion == 0)
LOG_DEBUG("network", "WORLD: Received CMSG_BUG [Bug Report]");
else
@@ -635,7 +614,6 @@ void WorldSession::HandleBugOpcode(WorldPacket& recv_data)
LOG_DEBUG("network", "%s", type.c_str());
LOG_DEBUG("network", "%s", content.c_str());
-#endif
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_BUG_REPORT);
@@ -647,9 +625,7 @@ void WorldSession::HandleBugOpcode(WorldPacket& recv_data)
void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_RECLAIM_CORPSE");
-#endif
ObjectGuid guid;
recv_data >> guid;
@@ -685,9 +661,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recv_data)
void WorldSession::HandleResurrectResponseOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_RESURRECT_RESPONSE");
-#endif
ObjectGuid guid;
uint8 status;
@@ -732,36 +706,28 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
uint32 triggerId;
recv_data >> triggerId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_AREATRIGGER. Trigger ID: %u", triggerId);
-#endif
Player* player = GetPlayer();
if (player->IsInFlight())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (%s) in flight, ignore Area Trigger ID:%u",
player->GetName().c_str(), player->GetGUID().ToString().c_str(), triggerId);
-#endif
return;
}
AreaTrigger const* atEntry = sObjectMgr->GetAreaTrigger(triggerId);
if (!atEntry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player '%s' (%s) send unknown (by DBC) Area Trigger ID:%u",
player->GetName().c_str(), player->GetGUID().ToString().c_str(), triggerId);
-#endif
return;
}
if (!player->IsInAreaTriggerRadius(atEntry))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player %s (%s) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u",
player->GetName().c_str(), player->GetGUID().ToString().c_str(), atEntry->map, player->GetMapId(), triggerId);
-#endif
return;
}
@@ -819,16 +785,12 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
void WorldSession::HandleUpdateAccountData(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
-#endif
uint32 type, timestamp, decompressedSize;
recv_data >> type >> timestamp >> decompressedSize;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize);
-#endif
if (type > NUM_ACCOUNT_DATA_TYPES)
return;
@@ -848,7 +810,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recv_data)
if (decompressedSize > 0xFFFF)
{
recv_data.rfinish(); // unnneded warning spam in this case
- LOG_ERROR("server", "UAD: Account data packet too big, size %u", decompressedSize);
+ LOG_ERROR("network.opcode", "UAD: Account data packet too big, size %u", decompressedSize);
return;
}
@@ -859,7 +821,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recv_data)
if (uncompress(dest.contents(), &realSize, recv_data.contents() + recv_data.rpos(), recv_data.size() - recv_data.rpos()) != Z_OK)
{
recv_data.rfinish(); // unnneded warning spam in this case
- LOG_ERROR("server", "UAD: Failed to decompress account data");
+ LOG_ERROR("network.opcode", "UAD: Failed to decompress account data");
return;
}
@@ -878,16 +840,12 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recv_data)
void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
-#endif
uint32 type;
recv_data >> type;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "RAD: type %u", type);
-#endif
if (type >= NUM_ACCOUNT_DATA_TYPES)
return;
@@ -903,9 +861,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
if (size && compress(dest.contents(), &destSize, (uint8 const*)adata->Data.c_str(), size) != Z_OK)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "RAD: Failed to compress account data");
-#endif
return;
}
@@ -922,9 +878,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_SET_ACTION_BUTTON");
-#endif
uint8 button;
uint32 packetData;
recv_data >> button >> packetData;
@@ -932,14 +886,10 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
uint32 action = ACTION_BUTTON_ACTION(packetData);
uint8 type = ACTION_BUTTON_TYPE(packetData);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "BUTTON: %u ACTION: %u TYPE: %u", button, action, type);
-#endif
+ LOG_DEBUG("network.opcode", "BUTTON: %u ACTION: %u TYPE: %u", button, action, type);
if (!packetData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MISC: Remove action from button %u", button);
-#endif
+ LOG_DEBUG("network.opcode", "MISC: Remove action from button %u", button);
GetPlayer()->removeActionButton(button);
}
else
@@ -948,27 +898,19 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
{
case ACTION_BUTTON_MACRO:
case ACTION_BUTTON_CMACRO:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MISC: Added Macro %u into button %u", action, button);
-#endif
+ LOG_DEBUG("network.opcode", "MISC: Added Macro %u into button %u", action, button);
break;
case ACTION_BUTTON_EQSET:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MISC: Added EquipmentSet %u into button %u", action, button);
-#endif
+ LOG_DEBUG("network.opcode", "MISC: Added EquipmentSet %u into button %u", action, button);
break;
case ACTION_BUTTON_SPELL:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MISC: Added Spell %u into button %u", action, button);
-#endif
+ LOG_DEBUG("network.opcode", "MISC: Added Spell %u into button %u", action, button);
break;
case ACTION_BUTTON_ITEM:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MISC: Added Item %u into button %u", action, button);
-#endif
+ LOG_DEBUG("network.opcode", "MISC: Added Item %u into button %u", action, button);
break;
default:
- LOG_ERROR("server", "MISC: Unknown action button type %u for action %u into button %u for player %s (%s)",
+ LOG_ERROR("network.opcode", "MISC: Unknown action button type %u for action %u into button %u for player %s (%s)",
type, action, button, _player->GetName().c_str(), _player->GetGUID().ToString().c_str());
return;
}
@@ -978,31 +920,25 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
void WorldSession::HandleCompleteCinematic(WorldPacket& /*recv_data*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
{
LOG_DEBUG("network", "WORLD: Received CMSG_COMPLETE_CINEMATIC");
}
-#endif
// If player has sight bound to visual waypoint NPC we should remove it
GetPlayer()->EndCinematic();
}
void WorldSession::HandleNextCinematicCamera(WorldPacket& /*recv_data*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
{
LOG_DEBUG("network", "WORLD: Received CMSG_NEXT_CINEMATIC_CAMERA");
}
-#endif
// Sent by client when cinematic actually begun. So we begin the server side process
GetPlayer()->BeginCinematic();
}
void WorldSession::HandleFeatherFallAck(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
-#endif
// no used
recv_data.rfinish(); // prevent warnings spam
@@ -1023,9 +959,7 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data)
return;
}
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network.opcode", "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK");
- #endif
recv_data.read_skip<uint32>(); // unk
@@ -1051,9 +985,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recv_data)
return;
}
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network.opcode", "WORLD: CMSG_FORCE_MOVE_ROOT_ACK");
- #endif
recv_data.read_skip<uint32>(); // unk
@@ -1071,7 +1003,7 @@ void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
if (!GetPlayer()) // ignore until not logged (check needed because STATUS_AUTHED)
{
if (ActionBar != 0)
- LOG_ERROR("server", "WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored", uint32(ActionBar));
+ LOG_ERROR("network.opcode", "WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored", uint32(ActionBar));
return;
}
@@ -1095,16 +1027,12 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
ObjectGuid guid;
recv_data >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_INSPECT");
-#endif
Player* player = ObjectAccessor::GetPlayer(*_player, guid);
if (!player)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_INSPECT: No player found from %s", guid.ToString().c_str());
-#endif
return;
}
@@ -1136,9 +1064,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
Player* player = ObjectAccessor::GetPlayer(*_player, guid);
if (!player)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "MSG_INSPECT_HONOR_STATS: No player found from %s", guid.ToString().c_str());
-#endif
return;
}
@@ -1168,21 +1094,15 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
recv_data >> PositionZ;
recv_data >> Orientation; // o (3.141593 = 180 degrees)
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_WORLD_TELEPORT");
-#endif
if (GetPlayer()->IsInFlight())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Player '%s' (%s) in flight, ignore worldport command.", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str());
-#endif
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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);
-#endif
if (AccountMgr::IsAdminAccount(GetSecurity()))
GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation);
@@ -1192,9 +1112,7 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_WHOIS");
-#endif
std::string charname;
recv_data >> charname;
@@ -1249,16 +1167,12 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
data << msg;
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received whois command from player %s for character %s", GetPlayer()->GetName().c_str(), charname.c_str());
-#endif
}
void WorldSession::HandleComplainOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_COMPLAIN");
-#endif
uint8 spam_type; // 0 - mail, 1 - chat
ObjectGuid spammer_guid;
@@ -1293,17 +1207,13 @@ void WorldSession::HandleComplainOpcode(WorldPacket& recv_data)
data << uint8(0);
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "REPORT SPAM: type %u, %s, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s",
spam_type, spammer_guid.ToString().c_str(), unk1, unk2, unk3, unk4, description.c_str());
-#endif
}
void WorldSession::HandleRealmSplitOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_REALM_SPLIT");
-#endif
uint32 unk;
std::string split_date = "01/01/01";
@@ -1322,32 +1232,24 @@ void WorldSession::HandleRealmSplitOpcode(WorldPacket& recv_data)
void WorldSession::HandleFarSightOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_FAR_SIGHT");
-#endif
bool apply;
recvData >> apply;
if (apply)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Added FarSight %s to player %s", _player->GetGuidValue(PLAYER_FARSIGHT).ToString().c_str(), _player->GetGUID().ToString().c_str());
-#endif
if (WorldObject* target = _player->GetViewpoint())
_player->SetSeer(target);
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_ERROR("server", "Player %s requests non-existing seer %s", _player->GetName().c_str(), _player->GetGuidValue(PLAYER_FARSIGHT).ToString().c_str());
-#endif
+ LOG_ERROR("network.opcode", "Player %s requests non-existing seer %s", _player->GetName().c_str(), _player->GetGuidValue(PLAYER_FARSIGHT).ToString().c_str());
}
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Player %s set vision to self", _player->GetGUID().ToString().c_str());
-#endif
_player->SetSeer(_player);
}
@@ -1356,9 +1258,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket& recvData)
void WorldSession::HandleSetTitleOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_SET_TITLE");
-#endif
int32 title;
recv_data >> title;
@@ -1377,9 +1277,7 @@ void WorldSession::HandleSetTitleOpcode(WorldPacket& recv_data)
void WorldSession::HandleResetInstancesOpcode(WorldPacket& /*recv_data*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_RESET_INSTANCES");
-#endif
if (Group* group = _player->GetGroup())
{
@@ -1392,9 +1290,7 @@ void WorldSession::HandleResetInstancesOpcode(WorldPacket& /*recv_data*/)
void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "MSG_SET_DUNGEON_DIFFICULTY");
-#endif
uint32 mode;
recv_data >> mode;
@@ -1447,9 +1343,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recv_data)
void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "MSG_SET_RAID_DIFFICULTY");
-#endif
uint32 mode;
recv_data >> mode;
@@ -1609,9 +1503,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
void WorldSession::HandleCancelMountAuraOpcode(WorldPacket& /*recv_data*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_CANCEL_MOUNT_AURA");
-#endif
//If player is not mounted, so go out :)
if (!_player->IsMounted()) // not blizz like; no any messages on blizz
@@ -1633,9 +1525,7 @@ void WorldSession::HandleCancelMountAuraOpcode(WorldPacket& /*recv_data*/)
void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
{
// fly mode on/off
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
-#endif
ObjectGuid guid;
recv_data >> guid.ReadAsPacked();
@@ -1662,9 +1552,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
void WorldSession::HandleRequestPetInfoOpcode(WorldPacket& /*recv_data */)
{
/*
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network.opcode", "WORLD: CMSG_REQUEST_PET_INFO");
- #endif
recv_data.hexlike();
*/
@@ -1681,9 +1569,7 @@ void WorldSession::HandleSetTaxiBenchmarkOpcode(WorldPacket& recv_data)
mode ? _player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK) : _player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Client used \"/timetest %d\" command", mode);
-#endif
}
void WorldSession::HandleQueryInspectAchievements(WorldPacket& recv_data)
@@ -1701,9 +1587,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket& recv_data)
void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
{
// empty opcode
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
-#endif
WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4);
data << uint32(time(nullptr));
@@ -1713,9 +1597,7 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& /*recv_data*/)
{
// empty opcode
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES");
-#endif
SendAccountDataTimes(GLOBAL_CACHE_MASK);
}
@@ -1730,9 +1612,7 @@ void WorldSession::SendSetPhaseShift(uint32 PhaseShift)
//Battlefield and Battleground
void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
-#endif
Battleground* bg = _player->GetBattleground();
@@ -1755,9 +1635,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recv_data)
void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket& recv_data)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
-#endif
Battleground* bg = _player->GetBattleground();
@@ -1806,10 +1684,8 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
if (!_player->HasPendingBind() || _player->GetPendingBind() != _player->GetInstanceId() || (_player->GetGroup() && _player->GetGroup()->isLFGGroup() && _player->GetGroup()->IsLfgRandomInstance()))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "InstanceLockResponse: Player %s (%s) tried to bind himself/teleport to graveyard without a pending bind!",
+ LOG_DEBUG("network.opcode", "InstanceLockResponse: Player %s (%s) tried to bind himself/teleport to graveyard without a pending bind!",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str());
-#endif
return;
}
@@ -1823,9 +1699,7 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
void WorldSession::HandleUpdateMissileTrajectory(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY");
-#endif
ObjectGuid guid;
uint32 spellId;
diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp
index bd92b58b89..790c554a16 100644
--- a/src/server/game/Handlers/MovementHandler.cpp
+++ b/src/server/game/Handlers/MovementHandler.cpp
@@ -31,9 +31,7 @@
void WorldSession::HandleMoveWorldportAckOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: got MSG_MOVE_WORLDPORT_ACK.");
-#endif
HandleMoveWorldportAck();
}
@@ -62,7 +60,7 @@ void WorldSession::HandleMoveWorldportAck()
Map* oldMap = GetPlayer()->GetMap();
if (GetPlayer()->IsInWorld())
{
- LOG_ERROR("server", "Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName().c_str(), oldMap->GetId(), loc.GetMapId());
+ LOG_ERROR("network.opcode", "Player (Name %s) is still in world when teleported from map %u to new map %u", GetPlayer()->GetName().c_str(), oldMap->GetId(), loc.GetMapId());
oldMap->RemovePlayerFromMap(GetPlayer(), false);
}
@@ -81,7 +79,7 @@ void WorldSession::HandleMoveWorldportAck()
// while the player is in transit, for example the map may get full
if (!newMap || !newMap->CanEnter(GetPlayer(), false))
{
- LOG_ERROR("server", "Map %d could not be created for player %s, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "Map %d could not be created for player %s, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUID().ToString().c_str());
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
return;
}
@@ -95,7 +93,7 @@ void WorldSession::HandleMoveWorldportAck()
GetPlayer()->SendInitialPacketsBeforeAddToMap();
if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer()))
{
- LOG_ERROR("server", "WORLD: failed to teleport player %s (%s) to map %d because of unknown reason!",
+ LOG_ERROR("network.opcode", "WORLD: failed to teleport player %s (%s) to map %d because of unknown reason!",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str(), loc.GetMapId());
GetPlayer()->ResetMap();
GetPlayer()->SetMap(oldMap);
@@ -238,21 +236,15 @@ void WorldSession::HandleMoveWorldportAck()
void WorldSession::HandleMoveTeleportAck(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "MSG_MOVE_TELEPORT_ACK");
-#endif
ObjectGuid guid;
recvData >> guid.ReadAsPacked();
uint32 flags, time;
recvData >> flags >> time; // unused
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Guid %s", guid.ToString().c_str());
-#endif
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Flags %u, time %u", flags, time / IN_MILLISECONDS);
-#endif
+ LOG_DEBUG("network.opcode", "Guid %s", guid.ToString().c_str());
+ LOG_DEBUG("network.opcode", "Flags %u, time %u", flags, time / IN_MILLISECONDS);
Player* plMover = _player->m_mover->ToPlayer();
@@ -583,9 +575,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
{
uint32 opcode = recvData.GetOpcode();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd %s (%u, 0x%X) opcode", GetOpcodeNameForLogging(static_cast<OpcodeClient>(opcode)).c_str(), opcode, opcode);
-#endif
/* extract packet */
ObjectGuid guid;
@@ -656,7 +646,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
force_move_type = MOVE_PITCH_RATE;
break;
default:
- LOG_ERROR("server", "WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
+ LOG_ERROR("network.opcode", "WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
return;
}
@@ -675,13 +665,13 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
{
if (_player->GetSpeed(move_type) > newspeed) // must be greater - just correct
{
- LOG_ERROR("server", "%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value",
+ LOG_ERROR("network.opcode", "%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
{
- LOG_INFO("server", "Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
+ LOG_INFO("network.opcode", "Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
_player->GetName().c_str(), GetAccountId(), _player->GetSpeed(move_type), newspeed);
KickPlayer("Incorrect speed");
}
@@ -690,9 +680,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
void WorldSession::HandleSetActiveMoverOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
-#endif
ObjectGuid guid;
recvData >> guid;
@@ -700,16 +688,14 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket& recvData)
if (GetPlayer()->IsInWorld() && _player->m_mover && _player->m_mover->IsInWorld())
{
if (_player->m_mover->GetGUID() != guid)
- LOG_ERROR("server", "HandleSetActiveMoverOpcode: incorrect mover guid: mover is %s and should be %s",
+ LOG_ERROR("network.opcode", "HandleSetActiveMoverOpcode: incorrect mover guid: mover is %s and should be %s",
guid.ToString().c_str(), _player->m_mover->GetGUID().ToString().c_str());
}
}
void WorldSession::HandleMoveNotActiveMover(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
-#endif
ObjectGuid old_mover_guid;
recvData >> old_mover_guid.ReadAsPacked();
@@ -738,9 +724,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_MOVE_KNOCK_BACK_ACK");
-#endif
ObjectGuid guid;
recvData >> guid.ReadAsPacked();
@@ -775,9 +759,7 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket& recvData)
void WorldSession::HandleMoveHoverAck(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_MOVE_HOVER_ACK");
-#endif
ObjectGuid guid;
recvData >> guid.ReadAsPacked();
@@ -793,9 +775,7 @@ void WorldSession::HandleMoveHoverAck(WorldPacket& recvData)
void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_MOVE_WATER_WALK_ACK");
-#endif
ObjectGuid guid;
recvData >> guid.ReadAsPacked();
@@ -835,9 +815,7 @@ void WorldSession::HandleSummonResponseOpcode(WorldPacket& recvData)
void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_MOVE_TIME_SKIPPED");
-#endif
ObjectGuid guid;
uint32 timeSkipped;
@@ -848,14 +826,14 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recvData)
if (!mover)
{
- LOG_ERROR("server", "WorldSession::HandleMoveTimeSkippedOpcode wrong mover state from the unit moved by the player [%s]", GetPlayer()->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "WorldSession::HandleMoveTimeSkippedOpcode wrong mover state from the unit moved by the player [%s]", GetPlayer()->GetGUID().ToString().c_str());
return;
}
// prevent tampered movement data
if (guid != mover->GetGUID())
{
- LOG_ERROR("server", "WorldSession::HandleMoveTimeSkippedOpcode wrong guid from the unit moved by the player [%s]", GetPlayer()->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "WorldSession::HandleMoveTimeSkippedOpcode wrong guid from the unit moved by the player [%s]", GetPlayer()->GetGUID().ToString().c_str());
return;
}
@@ -869,9 +847,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recvData)
void WorldSession::HandleTimeSyncResp(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_TIME_SYNC_RESP");
-#endif
uint32 counter, clientTimestamp;
recvData >> counter >> clientTimestamp;
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index 38bae0e000..ac82d11df4 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -41,9 +41,7 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleTabardVendorActivateOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -65,18 +63,14 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket& recvData)
{
ObjectGuid guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_BANKER_ACTIVATE");
-#endif
recvData >> guid;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleBankerActivateOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -118,16 +112,12 @@ void WorldSession::SendTrainerList(ObjectGuid guid)
void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: SendTrainerList");
-#endif
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: SendTrainerList - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -139,18 +129,14 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
if (!ci)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: SendTrainerList - (%s) NO CREATUREINFO!", guid.ToString().c_str());
-#endif
return;
}
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
if (!trainer_spells)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: SendTrainerList - Training spells not found for creature (%s)", guid.ToString().c_str());
-#endif
return;
}
@@ -243,16 +229,12 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
uint32 spellId = 0;
recvData >> guid >> spellId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_TRAINER_BUY_SPELL Npc %s, learn spell id is: %u", guid.ToString().c_str(), spellId);
-#endif
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleTrainerBuySpellOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -300,9 +282,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_GOSSIP_HELLO");
-#endif
ObjectGuid guid;
recvData >> guid;
@@ -310,9 +290,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleGossipHelloOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -363,9 +341,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network.opcode", "WORLD: CMSG_GOSSIP_SELECT_OPTION");
-#endif
uint32 option;
uint32 unk;
@@ -376,21 +352,15 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
if (_player->PlayerTalkClass->GossipOptionCoded(option))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network.opcode", "reading string");
-#endif
recvData >> code;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network.opcode", "string read: %s", code.c_str());
-#endif
}
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network.opcode", "WORLD: HandleGossipSelectOptionOpcode - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -412,9 +382,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
-#endif
ObjectGuid guid;
@@ -423,9 +391,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleSpiritHealerActivateOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -481,9 +447,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_INNKEEPER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleBinderActivateOpcode - Unit (%s) not found or you can not interact with him.", npcGUID.ToString().c_str());
-#endif
return;
}
@@ -515,9 +479,7 @@ void WorldSession::SendBindPoint(Creature* npc)
void WorldSession::HandleListStabledPetsOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv MSG_LIST_STABLED_PETS");
-#endif
ObjectGuid npcGUID;
recvData >> npcGUID;
@@ -553,9 +515,7 @@ void WorldSession::SendStablePetCallback(PreparedQueryResult result, ObjectGuid
if (!GetPlayer())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv MSG_LIST_STABLED_PETS Send.");
-#endif
WorldPacket data(MSG_LIST_STABLED_PETS, 200); // guess size
@@ -628,9 +588,7 @@ void WorldSession::SendStableResult(uint8 res)
void WorldSession::HandleStablePet(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv CMSG_STABLE_PET");
-#endif
ObjectGuid npcGUID;
recvData >> npcGUID;
@@ -735,9 +693,7 @@ void WorldSession::HandleStablePetCallback(PreparedQueryResult result)
void WorldSession::HandleUnstablePet(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv CMSG_UNSTABLE_PET.");
-#endif
ObjectGuid npcGUID;
uint32 petnumber;
@@ -838,9 +794,7 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32
void WorldSession::HandleBuyStableSlot(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv CMSG_BUY_STABLE_SLOT.");
-#endif
ObjectGuid npcGUID;
recvData >> npcGUID;
@@ -873,16 +827,12 @@ void WorldSession::HandleBuyStableSlot(WorldPacket& recvData)
void WorldSession::HandleStableRevivePet(WorldPacket& /* recvData */)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "HandleStableRevivePet: Not implemented");
-#endif
}
void WorldSession::HandleStableSwapPet(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv CMSG_STABLE_SWAP_PET.");
-#endif
ObjectGuid npcGUID;
uint32 petId;
@@ -993,9 +943,7 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_REPAIR_ITEM");
-#endif
ObjectGuid npcGUID, itemGUID;
uint8 guildBank; // new in 2.3.2, bool that means from guild bank money
@@ -1005,9 +953,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleRepairItemOpcode - Unit (%s) not found or you can not interact with him.", npcGUID.ToString().c_str());
-#endif
return;
}
@@ -1022,9 +968,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
if (itemGUID)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "ITEM: Repair item, item %s, npc %s", itemGUID.ToString().c_str(), npcGUID.ToString().c_str());
-#endif
Item* item = _player->GetItemByGuid(itemGUID);
if (item)
@@ -1032,9 +976,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "ITEM: Repair all items, npc %s", npcGUID.ToString().c_str());
-#endif
_player->DurabilityRepairAll(true, discountMod, guildBank);
}
}
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index 0ed01cedea..ed58076f6f 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -147,7 +147,7 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
owner->GetClosePoint(px, py, pz, pet->GetObjectSize(), PET_FOLLOW_DIST, pet->GetFollowAngle());
if (!pet->IsPositionValid())
{
- LOG_ERROR("server", "Pet (%s, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
+ LOG_ERROR("network.opcode", "Pet (%s, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)",
pet->GetGUID().ToString().c_str(), pet->GetEntry(), pet->GetPositionX(), pet->GetPositionY());
delete pet;
delete holder;
@@ -204,7 +204,7 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
break;
default:
if (!pet->IsPetGhoul())
- LOG_ERROR("server", "Pet have incorrect type (%u) for pet loading.", pet->getPetType());
+ LOG_ERROR("network.opcode", "Pet have incorrect type (%u) for pet loading.", pet->getPetType());
break;
}
@@ -365,18 +365,14 @@ void WorldSession::HandleDismissCritter(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_DISMISS_CRITTER for %s", guid.ToString().c_str());
-#endif
Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Vanitypet (%s) does not exist - player %s (%s / account: %u) attempted to dismiss it (possibly lagged out)",
guid.ToString().c_str(), GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str(), GetAccountId());
-#endif
return;
}
@@ -401,19 +397,17 @@ void WorldSession::HandlePetAction(WorldPacket& recvData)
// used also for charmed creature
Unit* pet = ObjectAccessor::GetUnit(*_player, guid1);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "HandlePetAction: Pet %s - flag: %u, spellid: %u, target: %s.", guid1.ToString().c_str(), uint32(flag), spellid, guid2.ToString().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "HandlePetAction: Pet %s - flag: %u, spellid: %u, target: %s.", guid1.ToString().c_str(), uint32(flag), spellid, guid2.ToString().c_str());
if (!pet)
{
- LOG_ERROR("server", "HandlePetAction: Pet (%s) doesn't exist for player %s", guid1.ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "HandlePetAction: Pet (%s) doesn't exist for player %s", guid1.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
if (pet != GetPlayer()->GetFirstControlled())
{
- LOG_ERROR("server", "HandlePetAction: Pet (%s) does not belong to player %s", guid1.ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "HandlePetAction: Pet (%s) does not belong to player %s", guid1.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
@@ -457,21 +451,19 @@ void WorldSession::HandlePetStopAttack(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_PET_STOP_ATTACK for %s", guid.ToString().c_str());
-#endif
Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet)
{
- LOG_ERROR("server", "HandlePetStopAttack: Pet %s does not exist", guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "HandlePetStopAttack: Pet %s does not exist", guid.ToString().c_str());
return;
}
if (pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm())
{
- LOG_ERROR("server", "HandlePetStopAttack: Pet %s isn't a pet or charmed creature of player %s", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "HandlePetStopAttack: Pet %s isn't a pet or charmed creature of player %s", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
@@ -487,7 +479,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint16 spe
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- LOG_ERROR("server", "WorldSession::HandlePetAction(petGuid: %s, tagGuid: %s, spellId: %u, flag: %u): object (%s) is considered pet-like but doesn't have a charminfo!",
+ LOG_ERROR("network.opcode", "WorldSession::HandlePetAction(petGuid: %s, tagGuid: %s, spellId: %u, flag: %u): object (%s) is considered pet-like but doesn't have a charminfo!",
guid1.ToString().c_str(), guid2.ToString().c_str(), spellid, flag, pet->GetGUID().ToString().c_str());
return;
}
@@ -644,7 +636,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint16 spe
}
break;
default:
- LOG_ERROR("server", "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
+ LOG_ERROR("network.opcode", "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
}
break;
case ACT_REACTION: // 0x6
@@ -676,7 +668,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint16 spe
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid);
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown PET spell id %i", spellid);
+ LOG_ERROR("network.opcode", "WORLD: unknown PET spell id %i", spellid);
return;
}
@@ -907,15 +899,13 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint16 spe
break;
}
default:
- LOG_ERROR("server", "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
+ LOG_ERROR("network.opcode", "WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
}
}
void WorldSession::HandlePetNameQuery(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "HandlePetNameQuery. CMSG_PET_NAME_QUERY");
-#endif
+ LOG_DEBUG("network.opcode", "HandlePetNameQuery. CMSG_PET_NAME_QUERY");
uint32 petnumber;
ObjectGuid petguid;
@@ -977,9 +967,7 @@ bool WorldSession::CheckStableMaster(ObjectGuid guid)
{
if (!GetPlayer()->IsGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) attempt open stable in cheating way.", guid.ToString().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "Player (%s) attempt open stable in cheating way.", guid.ToString().c_str());
return false;
}
}
@@ -988,9 +976,7 @@ bool WorldSession::CheckStableMaster(ObjectGuid guid)
{
if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Stablemaster (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "Stablemaster (%s) not found or you can't interact with him.", guid.ToString().c_str());
return false;
}
}
@@ -999,9 +985,7 @@ bool WorldSession::CheckStableMaster(ObjectGuid guid)
void WorldSession::HandlePetSetAction(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "HandlePetSetAction. CMSG_PET_SET_ACTION");
-#endif
+ LOG_DEBUG("network.opcode", "HandlePetSetAction. CMSG_PET_SET_ACTION");
ObjectGuid petguid;
uint8 count;
@@ -1011,7 +995,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
Unit* checkPet = ObjectAccessor::GetUnit(*_player, petguid);
if (!checkPet || checkPet != _player->GetFirstControlled())
{
- LOG_ERROR("server", "HandlePetSetAction: Unknown pet (%s) or pet owner (%s)", petguid.ToString().c_str(), _player->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "HandlePetSetAction: Unknown pet (%s) or pet owner (%s)", petguid.ToString().c_str(), _player->GetGUID().ToString().c_str());
return;
}
@@ -1060,7 +1044,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- LOG_ERROR("server", "WorldSession::HandlePetSetAction: object (%s TypeId: %u) is considered pet-like but doesn't have a charminfo!",
+ LOG_ERROR("network.opcode", "WorldSession::HandlePetSetAction: object (%s TypeId: %u) is considered pet-like but doesn't have a charminfo!",
pet->GetGUID().ToString().c_str(), pet->GetTypeId());
continue;
}
@@ -1145,9 +1129,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
void WorldSession::HandlePetRename(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "HandlePetRename. CMSG_PET_RENAME");
-#endif
+ LOG_DEBUG("network.opcode", "HandlePetRename. CMSG_PET_RENAME");
ObjectGuid petguid;
uint8 isdeclined;
@@ -1237,9 +1219,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData)
{
ObjectGuid guid;
recvData >> guid; //pet guid
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "HandlePetAbandon. CMSG_PET_ABANDON pet is %s", guid.ToString().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "HandlePetAbandon. CMSG_PET_ABANDON pet is %s", guid.ToString().c_str());
if (!_player->IsInWorld())
return;
@@ -1265,9 +1245,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData)
void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "CMSG_PET_SPELL_AUTOCAST");
-#endif
+ LOG_DEBUG("network.opcode", "CMSG_PET_SPELL_AUTOCAST");
ObjectGuid guid;
uint32 spellid;
uint8 state; //1 for on, 0 for off
@@ -1286,7 +1264,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
Creature* checkPet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!checkPet || (checkPet != _player->GetGuardianPet() && checkPet != _player->GetCharm()))
{
- LOG_ERROR("server", "HandlePetSpellAutocastOpcode.Pet %s isn't pet of player %s .", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "HandlePetSpellAutocastOpcode.Pet %s isn't pet of player %s .", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
@@ -1310,7 +1288,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- LOG_ERROR("server", "WorldSession::HandlePetSpellAutocastOpcod: object (%s TypeId: %u) is considered pet-like but doesn't have a charminfo!",
+ LOG_ERROR("network.opcode", "WorldSession::HandlePetSpellAutocastOpcod: object (%s TypeId: %u) is considered pet-like but doesn't have a charminfo!",
pet->GetGUID().ToString().c_str(), pet->GetTypeId());
continue;
}
@@ -1326,9 +1304,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_PET_CAST_SPELL");
-#endif
ObjectGuid guid;
uint8 castCount;
@@ -1337,9 +1313,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
recvPacket >> guid >> castCount >> spellId >> castFlags;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_PET_CAST_SPELL, guid: %s, castCount: %u, spellId %u, castFlags %u", guid.ToString().c_str(), castCount, spellId, castFlags);
-#endif
// This opcode is also sent from charmed and possessed units (players and creatures)
if (!_player->GetGuardianPet() && !_player->GetCharm())
@@ -1349,14 +1323,14 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
if (!caster || (caster != _player->GetGuardianPet() && caster != _player->GetCharm()))
{
- LOG_ERROR("server", "HandlePetCastSpellOpcode: Pet %s isn't pet of player %s .", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "HandlePetCastSpellOpcode: Pet %s isn't pet of player %s .", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown PET spell id %i", spellId);
+ LOG_ERROR("network.opcode", "WORLD: unknown PET spell id %i", spellId);
return;
}
@@ -1447,9 +1421,7 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec
void WorldSession::HandlePetLearnTalent(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_PET_LEARN_TALENT");
-#endif
ObjectGuid guid;
uint32 talent_id, requested_rank;
@@ -1461,9 +1433,7 @@ void WorldSession::HandlePetLearnTalent(WorldPacket& recvData)
void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LEARN_PREVIEW_TALENTS_PET");
-#endif
ObjectGuid guid;
recvData >> guid;
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 83a839b1d5..91e4ef1737 100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -21,9 +21,7 @@
void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_PETITION_BUY");
-#endif
ObjectGuid guidNPC;
uint32 clientIndex; // 1 for guild and arenaslot+1 for arenas in client
@@ -52,17 +50,13 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
recvData >> clientIndex; // index
recvData.read_skip<uint32>(); // 0
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Petitioner (%s) tried sell petition: name %s", guidNPC.ToString().c_str(), name.c_str());
-#endif
// prevent cheating
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC, UNIT_NPC_FLAG_PETITIONER);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandlePetitionBuyOpcode - Unit (%s) not found or you can't interact with him.", guidNPC.ToString().c_str());
-#endif
return;
}
@@ -111,9 +105,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
type = ARENA_TEAM_CHARTER_5v5_TYPE;
break;
default:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "unknown selection at buy arena petition: %u", clientIndex);
-#endif
return;
}
@@ -197,9 +189,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
if (petition)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Invalid petition: %s", petition->petitionGuid.ToString().c_str());
-#endif
trans->PAppend("DELETE FROM petition WHERE petitionguid = %u", petition->petitionGuid);
trans->PAppend("DELETE FROM petition_sign WHERE petitionguid = %u", petition->petitionGuid);
@@ -224,9 +214,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
-#endif
ObjectGuid petitionguid;
recvData >> petitionguid; // petition guid
@@ -265,17 +253,13 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionQueryOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_PETITION_QUERY"); // ok
-#endif
ObjectGuid::LowType guildguid;
ObjectGuid petitionguid;
recvData >> guildguid; // in Trinity always same as petition low guid
recvData >> petitionguid; // petition guid
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_PETITION_QUERY Petition (%s) Guild GUID %u", petitionguid.ToString().c_str(), guildguid);
-#endif
SendPetitionQueryOpcode(petitionguid);
}
@@ -285,9 +269,7 @@ void WorldSession::SendPetitionQueryOpcode(ObjectGuid petitionguid)
Petition const* petition = sPetitionMgr->GetPetition(petitionguid);
if (!petition)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_PETITION_QUERY failed for petition (%s)", petitionguid.ToString().c_str());
-#endif
return;
}
@@ -331,9 +313,7 @@ void WorldSession::SendPetitionQueryOpcode(ObjectGuid petitionguid)
void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode MSG_PETITION_RENAME"); // ok
-#endif
ObjectGuid petitionGuid;
std::string newName;
@@ -348,9 +328,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
Petition const* petition = sPetitionMgr->GetPetition(petitionGuid);
if (!petition)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_PETITION_QUERY failed for petition (%s)", petitionGuid.ToString().c_str());
-#endif
return;
}
@@ -391,9 +369,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
// xinef: update petition container
const_cast<Petition*>(petition)->petitionName = newName;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Petition (%s) renamed to %s", petitionGuid.ToString().c_str(), newName.c_str());
-#endif
WorldPacket data(MSG_PETITION_RENAME, (8 + newName.size() + 1));
data << petitionGuid;
data << newName;
@@ -402,9 +378,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_PETITION_SIGN"); // ok
-#endif
ObjectGuid petitionGuid;
uint8 unk;
@@ -414,7 +388,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
Petition const* petition = sPetitionMgr->GetPetition(petitionGuid);
if (!petition)
{
- LOG_ERROR("server", "Petition %s is not found for player %s (Name: %s)", petitionGuid.ToString().c_str(), GetPlayer()->GetGUID().ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "Petition %s is not found for player %s (Name: %s)", petitionGuid.ToString().c_str(), GetPlayer()->GetGUID().ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
@@ -519,9 +493,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
// xinef: fill petition store
sPetitionMgr->AddSignature(petitionGuid, GetAccountId(), playerGuid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "PETITION SIGN: %s by player: %s (%s, Account: %u)", petitionGuid.ToString().c_str(), _player->GetName().c_str(), playerGuid.ToString().c_str(), GetAccountId());
-#endif
WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8 + 8 + 4));
data << petitionGuid;
@@ -543,16 +515,12 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode MSG_PETITION_DECLINE"); // ok
-#endif
ObjectGuid petitionguid;
ObjectGuid ownerguid;
recvData >> petitionguid; // petition guid
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Petition %s declined by %s", petitionguid.ToString().c_str(), _player->GetGUID().ToString().c_str());
-#endif
Petition const* petition = sPetitionMgr->GetPetition(petitionguid);
if (!petition)
@@ -568,9 +536,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_OFFER_PETITION"); // ok
-#endif
ObjectGuid petitionguid, plguid;
uint32 junk;
@@ -658,9 +624,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received opcode CMSG_TURN_IN_PETITION");
-#endif
// Get petition guid from packet
WorldPacket data;
@@ -673,14 +637,12 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
if (!item)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Petition %s turned in by %s", petitionGuid.ToString().c_str(), _player->GetGUID().ToString().c_str());
-#endif
Petition const* petition = sPetitionMgr->GetPetition(petitionGuid);
if (!petition)
{
- LOG_ERROR("server", "Player %s (%s) tried to turn in petition (%s) that is not present in the database",
+ LOG_ERROR("network.opcode", "Player %s (%s) tried to turn in petition (%s) that is not present in the database",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), petitionGuid.ToString().c_str());
return;
}
@@ -799,17 +761,13 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
// Register arena team
sArenaTeamMgr->AddArenaTeam(arenaTeam);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "PetitonsHandler: Arena team (guid: %u) added to ObjectMgr", arenaTeam->GetId());
-#endif
// Add members
if (signs)
for (SignatureMap::const_iterator itr = signatureCopy.begin(); itr != signatureCopy.end(); ++itr)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "PetitionsHandler: Adding arena team (guid: %u) member %s", arenaTeam->GetId(), itr->first.ToString().c_str());
-#endif
arenaTeam->AddMember(itr->first);
}
}
@@ -830,9 +788,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
sPetitionMgr->RemovePetition(petitionGuid);
// created
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "TURN IN PETITION %s", petitionGuid.ToString().c_str());
-#endif
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << (uint32)PETITION_TURN_OK;
@@ -841,9 +797,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionShowListOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Received CMSG_PETITION_SHOWLIST");
-#endif
ObjectGuid guid;
recvData >> guid;
@@ -856,9 +810,7 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandlePetitionShowListOpcode - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -929,7 +881,5 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid)
}
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "Sent SMSG_PETITION_SHOWLIST");
-#endif
}
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 126a03e959..03ce4f00a7 100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -58,7 +58,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recvData)
recvData >> guid;
// This is disable by default to prevent lots of console spam
- // LOG_INFO("server", "HandleNameQueryOpcode %u", guid);
+ // LOG_INFO("network.opcode", "HandleNameQueryOpcode %u", guid);
SendNameQueryOpcode(guid);
}
@@ -134,15 +134,11 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (%s)", guid.ToString().c_str());
-#endif
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 4);
data << uint32(entry | 0x80000000);
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
-#endif
}
}
@@ -173,9 +169,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
ObjectMgr::GetLocaleString(gameObjectLocale->CastBarCaption, localeConstant, CastBarCaption);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
-#endif
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 150);
data << uint32(entry);
data << uint32(info->type);
@@ -197,29 +191,21 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
data << uint32(0);
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
-#endif
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (%s)", guid.ToString().c_str());
-#endif
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 4);
data << uint32(entry | 0x80000000);
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
-#endif
}
}
void WorldSession::HandleCorpseQueryOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_CORPSE_QUERY");
-#endif
if (!_player->HasCorpse())
{
@@ -273,9 +259,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> textID;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_NPC_TEXT_QUERY TextId: %u", textID);
-#endif
recvData >> guid;
@@ -352,17 +336,13 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData)
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_NPC_TEXT_UPDATE");
-#endif
}
/// Only _static_ data is sent in this packet !!!
void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_PAGE_TEXT_QUERY");
-#endif
uint32 pageID;
recvData >> pageID;
@@ -396,17 +376,13 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
}
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
-#endif
}
}
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
-#endif
uint32 unk;
recvData >> unk;
diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp
index 56db8d221c..61f1b88821 100644
--- a/src/server/game/Handlers/QuestHandler.cpp
+++ b/src/server/game/Handlers/QuestHandler.cpp
@@ -33,9 +33,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
Object* questGiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
if (!questGiver)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (%s)", guid.ToString().c_str());
-#endif
+ LOG_DEBUG("network.opcode", "Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (%s)", guid.ToString().c_str());
return;
}
@@ -43,23 +41,19 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket& recvData)
{
case TYPEID_UNIT:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc %s", guid.ToString().c_str());
-#endif
if (!questGiver->ToCreature()->IsHostileTo(_player)) // do not show quest status to enemies
questStatus = _player->GetQuestDialogStatus(questGiver);
break;
}
case TYPEID_GAMEOBJECT:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject %s", guid.ToString().c_str());
-#endif
questStatus = _player->GetQuestDialogStatus(questGiver);
break;
}
default:
- LOG_ERROR("server", "QuestGiver called for unexpected type %u", questGiver->GetTypeId());
+ LOG_ERROR("network.opcode", "QuestGiver called for unexpected type %u", questGiver->GetTypeId());
break;
}
@@ -72,16 +66,12 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_HELLO npc %s", guid.ToString().c_str());
-#endif
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!creature)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleQuestgiverHelloOpcode - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -113,9 +103,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket& recvData)
uint32 unk1;
recvData >> guid >> questId >> unk1;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc %s, quest = %u, unk1 = %u", guid.ToString().c_str(), questId, unk1);
-#endif
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT | TYPEMASK_ITEM | TYPEMASK_PLAYER);
@@ -204,9 +192,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket& recvData)
uint32 questId;
uint8 unk1;
recvData >> guid >> questId >> unk1;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc %s, quest = %u, unk1 = %u", guid.ToString().c_str(), questId, unk1);
-#endif
// 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);
@@ -241,9 +227,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket& recvData)
uint32 questId;
recvData >> questId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUEST_QUERY quest = %u", questId);
-#endif
if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId))
_player->PlayerTalkClass->SendQuestQueryResponse(quest);
@@ -257,14 +241,12 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
if (reward >= QUEST_REWARD_CHOICES_COUNT)
{
- LOG_ERROR("server", "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (%s) tried to get invalid reward (%u) (probably packet hacking)",
+ LOG_ERROR("network.opcode", "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (%s) tried to get invalid reward (%u) (probably packet hacking)",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), reward);
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc %s, quest = %u, reward = %u", guid.ToString().c_str(), questId, reward);
-#endif
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
if (!object || !object->hasInvolvedQuest(questId))
@@ -279,7 +261,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket& recvData)
if ((!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE) ||
(_player->GetQuestStatus(questId) != QUEST_STATUS_COMPLETE && !quest->IsAutoComplete()))
{
- LOG_ERROR("server", "HACK ALERT: Player %s (%s) is trying to complete quest (id: %u) but he has no right to do it!",
+ LOG_ERROR("network.opcode", "HACK ALERT: Player %s (%s) is trying to complete quest (id: %u) but he has no right to do it!",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), questId);
return;
}
@@ -356,9 +338,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid >> questId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc %s, quest = %u", guid.ToString().c_str(), questId);
-#endif
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
if (!object || !object->hasInvolvedQuest(questId))
@@ -380,9 +360,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket& recvData)
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_CANCEL");
-#endif
_player->PlayerTalkClass->SendCloseGossip();
}
@@ -395,9 +373,7 @@ void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recvData)
if (slot1 == slot2 || slot1 >= MAX_QUEST_LOG_SIZE || slot2 >= MAX_QUEST_LOG_SIZE)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2);
-#endif
GetPlayer()->SwapQuestSlot(slot1, slot2);
}
@@ -407,9 +383,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recvData)
uint8 slot;
recvData >> slot;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u", slot);
-#endif
if (slot < MAX_QUEST_LOG_SIZE)
{
@@ -437,9 +411,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recvData)
#ifdef ELUNA
sEluna->OnQuestAbandon(_player, questId);
#endif
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player %s abandoned quest %u", _player->GetGUID().ToString().c_str(), questId);
-#endif
+ LOG_DEBUG("network.opcode", "Player %s abandoned quest %u", _player->GetGUID().ToString().c_str(), questId);
// check if Quest Tracker is enabled
if (sWorld->getBoolConfig(CONFIG_QUEST_ENABLE_QUEST_TRACKER))
{
@@ -464,9 +436,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
uint32 questId;
recvData >> questId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", questId);
-#endif
if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId))
{
@@ -503,9 +473,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
recvData >> guid >> questId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc %s, quest = %u", guid.ToString().c_str(), questId);
-#endif
Object* object = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
if (!object || !object->hasInvolvedQuest(questId))
@@ -519,7 +487,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
{
if (!_player->CanSeeStartQuest(quest) && _player->GetQuestStatus(questId) == QUEST_STATUS_NONE)
{
- LOG_ERROR("server", "Possible hacking attempt: Player %s [%s] tried to complete quest [entry: %u] without being in possession of the quest!",
+ LOG_ERROR("network.opcode", "Possible hacking attempt: Player %s [%s] tried to complete quest [entry: %u] without being in possession of the quest!",
_player->GetName().c_str(), _player->GetGUID().ToString().c_str(), questId);
return;
}
@@ -547,9 +515,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
void WorldSession::HandleQuestgiverQuestAutoLaunch(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH");
-#endif
}
void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
@@ -560,9 +526,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
if (!_player->CanShareQuest(questId))
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
-#endif
if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId))
{
@@ -640,9 +604,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
uint8 msg;
recvPacket >> guid >> questId >> msg;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_QUEST_PUSH_RESULT");
-#endif
if (_player->GetDivider() && _player->GetDivider() == guid)
{
@@ -659,9 +621,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
-#endif
uint32 count = 0;
diff --git a/src/server/game/Handlers/ReferAFriendHandler.cpp b/src/server/game/Handlers/ReferAFriendHandler.cpp
index e746436072..d5b64c015d 100644
--- a/src/server/game/Handlers/ReferAFriendHandler.cpp
+++ b/src/server/game/Handlers/ReferAFriendHandler.cpp
@@ -11,9 +11,7 @@
void WorldSession::HandleGrantLevel(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_GRANT_LEVEL");
-#endif
ObjectGuid guid;
recvData >> guid.ReadAsPacked();
@@ -56,9 +54,7 @@ void WorldSession::HandleGrantLevel(WorldPacket& recvData)
void WorldSession::HandleAcceptGrantLevel(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_ACCEPT_LEVEL_GRANT");
-#endif
ObjectGuid guid;
recvData >> guid.ReadAsPacked();
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp
index 85f0df3ef1..31ee62504c 100644
--- a/src/server/game/Handlers/SkillHandler.cpp
+++ b/src/server/game/Handlers/SkillHandler.cpp
@@ -22,9 +22,7 @@ void WorldSession::HandleLearnTalentOpcode(WorldPacket& recvData)
void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "CMSG_LEARN_PREVIEW_TALENTS");
-#endif
uint32 talentsCount;
recvPacket >> talentsCount;
@@ -48,18 +46,14 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "MSG_TALENT_WIPE_CONFIRM");
-#endif
ObjectGuid guid;
recvData >> guid;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleTalentWipeConfirmOpcode - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
return;
}
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index 7a5f054785..9504bf7e44 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -84,9 +84,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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());
-#endif
ItemTemplate const* proto = pItem->GetTemplate();
if (!proto)
@@ -162,9 +160,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
-#endif
Player* pUser = _player;
@@ -183,9 +179,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
recvPacket >> bagIndex >> slot;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "bagIndex: %u, slot: %u", bagIndex, slot);
-#endif
+ LOG_DEBUG("network.opcode", "bagIndex: %u, slot: %u", bagIndex, slot);
Item* item = pUser->GetItemByPos(bagIndex, slot);
if (!item)
@@ -205,7 +199,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
if (!(proto->Flags & ITEM_FLAG_HAS_LOOT) && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED))
{
pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
- LOG_ERROR("server", "Possible hacking attempt: Player %s [%s] tried to open item [%s, entry: %u] which is not openable!",
+ LOG_ERROR("network.opcode", "Possible hacking attempt: Player %s [%s] tried to open item [%s, entry: %u] which is not openable!",
pUser->GetName().c_str(), pUser->GetGUID().ToString().c_str(), item->GetGUID().ToString().c_str(), proto->ItemId);
return;
}
@@ -219,7 +213,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
if (!lockInfo)
{
pUser->SendEquipError(EQUIP_ERR_ITEM_LOCKED, item, nullptr);
- LOG_ERROR("server", "WORLD::OpenItem: item [%s] has an unknown lockId: %u!", item->GetGUID().ToString().c_str(), lockId);
+ LOG_ERROR("network.opcode", "WORLD::OpenItem: item [%s] has an unknown lockId: %u!", item->GetGUID().ToString().c_str(), lockId);
return;
}
@@ -260,7 +254,7 @@ void WorldSession::HandleOpenWrappedItemCallback(PreparedQueryResult result, uin
if (!result)
{
- LOG_ERROR("server", "Wrapped item %s don't have record in character_gifts table and will deleted", item->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "Wrapped item %s don't have record in character_gifts table and will deleted", item->GetGUID().ToString().c_str());
GetPlayer()->DestroyItem(item->GetBagSlot(), item->GetSlot(), true);
return;
}
@@ -291,9 +285,7 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_USE Message [%s]", guid.ToString().c_str());
-#endif
if (GameObject* obj = GetPlayer()->GetMap()->GetGameObject(guid))
{
@@ -314,9 +306,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
ObjectGuid guid;
recvPacket >> guid;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [%s]", guid.ToString().c_str());
-#endif
// ignore for remote control state
if (_player->m_mover != _player)
@@ -343,9 +333,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
uint32 oldSpellId = spellId;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size());
-#endif
// ignore for remote control state (for player case)
Unit* mover = _player->m_mover;
@@ -359,7 +347,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown spell id %u", spellId);
+ LOG_ERROR("network.opcode", "WORLD: unknown spell id %u", spellId);
recvPacket.rfinish(); // prevent spam at ignore packet
return;
}
@@ -504,7 +492,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
{
- LOG_ERROR("server", "WORLD: unknown PET spell id %u", spellId);
+ LOG_ERROR("network.opcode", "WORLD: unknown PET spell id %u", spellId);
return;
}
@@ -512,13 +500,13 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
if (!pet)
{
- LOG_ERROR("server", "HandlePetCancelAura: Attempt to cancel an aura for non-existant pet %s by player %s", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "HandlePetCancelAura: Attempt to cancel an aura for non-existant pet %s by player %s", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
if (pet != GetPlayer()->GetGuardianPet() && pet != GetPlayer()->GetCharm())
{
- LOG_ERROR("server", "HandlePetCancelAura: Pet %s is not a pet of player %s", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
+ LOG_ERROR("network.opcode", "HandlePetCancelAura: Pet %s is not a pet of player %s", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
@@ -581,9 +569,7 @@ void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket)
void WorldSession::HandleSelfResOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_SELF_RES"); // empty opcode
-#endif
if (_player->HasAuraType(SPELL_AURA_PREVENT_RESURRECTION))
return; // silent return, client should display error by itself and not send this opcode
@@ -621,9 +607,7 @@ void WorldSession::HandleSpellClick(WorldPacket& recvData)
void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_GET_MIRRORIMAGE_DATA");
-#endif
ObjectGuid guid;
recvData >> guid;
@@ -716,9 +700,7 @@ void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_UPDATE_PROJECTILE_POSITION");
-#endif
ObjectGuid casterGuid;
uint32 spellId;
diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp
index 18b9cad48c..175f1f5468 100644
--- a/src/server/game/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Handlers/TaxiHandler.cpp
@@ -15,9 +15,7 @@
void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
-#endif
ObjectGuid guid;
@@ -31,9 +29,7 @@ void WorldSession::SendTaxiStatus(ObjectGuid guid)
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WorldSession::SendTaxiStatus - Unit (%s) not found.", guid.ToString().c_str());
-#endif
return;
}
@@ -43,24 +39,18 @@ void WorldSession::SendTaxiStatus(ObjectGuid guid)
if (curloc == 0)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: current location %u ", curloc);
-#endif
WorldPacket data(SMSG_TAXINODE_STATUS, 9);
data << guid;
data << uint8(GetPlayer()->m_taxi.IsTaximaskNodeKnown(curloc) ? 1 : 0);
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_TAXINODE_STATUS");
-#endif
}
void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES");
-#endif
ObjectGuid guid;
recvData >> guid;
@@ -69,9 +59,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!unit)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleTaxiQueryAvailableNodes - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
-#endif
return;
}
@@ -98,9 +86,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater();
if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it.
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ", curloc);
-#endif
WorldPacket data(SMSG_SHOWTAXINODES, (4 + 8 + 4 + 8 * 4));
data << uint32(1);
@@ -109,9 +95,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
GetPlayer()->m_taxi.AppendTaximaskTo(data, GetPlayer()->isTaxiCheater());
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_SHOWTAXINODES");
-#endif
GetPlayer()->SetTaxiCheater(lastTaxiCheaterState);
}
@@ -168,9 +152,7 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid)
void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
-#endif
ObjectGuid guid;
uint32 node_count;
@@ -180,9 +162,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleActivateTaxiExpressOpcode - Unit (%s) not found or you can't interact with it.", guid.ToString().c_str());
-#endif
return;
}
std::vector<uint32> nodes;
@@ -205,18 +185,14 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
if (nodes.empty())
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d", nodes.front(), nodes.back());
-#endif
GetPlayer()->ActivateTaxiPathTo(nodes, npc, 0);
}
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_MOVE_SPLINE_DONE");
-#endif
ObjectGuid guid; // used only for proper packet read
recvData >> guid.ReadAsPacked();
@@ -230,24 +206,18 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXI");
-#endif
ObjectGuid guid;
std::vector<uint32> nodes;
nodes.resize(2);
recvData >> guid >> nodes[0] >> nodes[1];
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXI from %d to %d", nodes[0], nodes[1]);
-#endif
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleActivateTaxiOpcode - Unit (%s) not found or you can't interact with it.", guid.ToString().c_str());
-#endif
return;
}
@@ -269,7 +239,5 @@ void WorldSession::SendActivateTaxiReply(ActivateTaxiReply reply)
data << uint32(reply);
SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_ACTIVATETAXIREPLY");
-#endif
}
diff --git a/src/server/game/Handlers/TicketHandler.cpp b/src/server/game/Handlers/TicketHandler.cpp
index 3eb2fe0b29..212f58bffa 100644
--- a/src/server/game/Handlers/TicketHandler.cpp
+++ b/src/server/game/Handlers/TicketHandler.cpp
@@ -77,7 +77,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData)
}
else
{
- LOG_ERROR("server", "CMSG_GMTICKET_CREATE possibly corrupt. Uncompression failed.");
+ LOG_ERROR("network.opcode", "CMSG_GMTICKET_CREATE possibly corrupt. Uncompression failed.");
recvData.rfinish();
return;
}
diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index 23f8ddb87f..248da5188e 100644
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
@@ -57,17 +57,13 @@ void WorldSession::SendTradeStatus(TradeStatus status)
void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Ignore Trade %s", _player->GetGUID().ToString().c_str());
-#endif
// recvPacket.print_storage();
}
void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Busy Trade %s", _player->GetGUID().ToString().c_str());
-#endif
// recvPacket.print_storage();
}
@@ -142,9 +138,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
// logging
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "partner storing: %s", myItems[i]->GetGUID().ToString().c_str());
-#endif
// adjust time (depends on /played)
if (myItems[i]->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE))
@@ -155,9 +149,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (hisItems[i])
{
// logging
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "player storing: %s", hisItems[i]->GetGUID().ToString().c_str());
-#endif
// adjust time (depends on /played)
if (hisItems[i]->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE))
@@ -173,21 +165,21 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
if (!traderCanTrade)
- LOG_ERROR("server", "trader can't store item: %s", myItems[i]->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "trader can't store item: %s", myItems[i]->GetGUID().ToString().c_str());
if (_player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, myItems[i], false) == EQUIP_ERR_OK)
_player->MoveItemToInventory(playerDst, myItems[i], true, true);
else
- LOG_ERROR("server", "player can't take item back: %s", myItems[i]->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "player can't take item back: %s", myItems[i]->GetGUID().ToString().c_str());
}
// return the already removed items to the original owner
if (hisItems[i])
{
if (!playerCanTrade)
- LOG_ERROR("server", "player can't store item: %s", hisItems[i]->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "player can't store item: %s", hisItems[i]->GetGUID().ToString().c_str());
if (trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false) == EQUIP_ERR_OK)
trader->MoveItemToInventory(traderDst, hisItems[i], true, true);
else
- LOG_ERROR("server", "trader can't take item back: %s", hisItems[i]->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "trader can't take item back: %s", hisItems[i]->GetGUID().ToString().c_str());
}
}
}
@@ -205,9 +197,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item * *
{
if (Item* item = myTrade->GetItem(TradeSlots(i)))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "player trade item %s bag: %u slot: %u", item->GetGUID().ToString().c_str(), item->GetBagSlot(), item->GetSlot());
-#endif
+ LOG_DEBUG("network.opcode", "player trade item %s bag: %u slot: %u", item->GetGUID().ToString().c_str(), item->GetBagSlot(), item->GetSlot());
//Can return nullptr
myItems[i] = item;
myItems[i]->SetInTrade();
@@ -215,9 +205,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item * *
if (Item* item = hisTrade->GetItem(TradeSlots(i)))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "partner trade item %s bag: %u slot: %u", item->GetGUID().ToString().c_str(), item->GetBagSlot(), item->GetSlot());
-#endif
+ LOG_DEBUG("network.opcode", "partner trade item %s bag: %u slot: %u", item->GetGUID().ToString().c_str(), 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 334dd25452..b61b90c602 100644
--- a/src/server/game/Handlers/VehicleHandler.cpp
+++ b/src/server/game/Handlers/VehicleHandler.cpp
@@ -14,9 +14,7 @@
void WorldSession::HandleDismissControlledVehicle(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
-#endif
ObjectGuid vehicleGUID = _player->GetCharmGUID();
@@ -48,9 +46,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket& recvData)
void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
-#endif
Unit* vehicle_base = GetPlayer()->GetVehicleBase();
if (!vehicle_base)
@@ -63,7 +59,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket& recvData)
if (!seat->CanSwitchFromSeat())
{
recvData.rfinish(); // prevent warnings spam
- LOG_ERROR("server", "HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %s tried to switch seats but current seatflags %u don't permit that.",
+ LOG_ERROR("network.opcode", "HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %s tried to switch seats but current seatflags %u don't permit that.",
recvData.GetOpcode(), GetPlayer()->GetGUID().ToString().c_str(), seat->m_flags);
return;
}
@@ -158,7 +154,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket& data)
if (!vehicle)
{
data.rfinish(); // prevent warnings spam
- LOG_ERROR("server", "HandleEjectPassenger: Player %s is not in a vehicle!", GetPlayer()->GetGUID().ToString().c_str());
+ LOG_ERROR("network.opcode", "HandleEjectPassenger: Player %s is not in a vehicle!", GetPlayer()->GetGUID().ToString().c_str());
return;
}
@@ -170,13 +166,13 @@ void WorldSession::HandleEjectPassenger(WorldPacket& data)
Player* player = ObjectAccessor::GetPlayer(*_player, guid);
if (!player)
{
- LOG_ERROR("server", "Player %s tried to eject player %s from vehicle, but the latter was not found in world!", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Player %s tried to eject player %s from vehicle, but the latter was not found in world!", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
return;
}
if (!player->IsOnVehicle(vehicle->GetBase()))
{
- LOG_ERROR("server", "Player %s tried to eject player %s, but they are not in the same vehicle", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Player %s tried to eject player %s, but they are not in the same vehicle", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
return;
}
@@ -185,20 +181,20 @@ void WorldSession::HandleEjectPassenger(WorldPacket& data)
if (seat->IsEjectable())
player->ExitVehicle();
else
- LOG_ERROR("server", "Player %s attempted to eject player %s from non-ejectable seat.", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Player %s attempted to eject player %s from non-ejectable seat.", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
}
else if (guid.IsCreature())
{
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
if (!unit) // creatures can be ejected too from player mounts
{
- LOG_ERROR("server", "Player %s tried to eject creature guid %s from vehicle, but the latter was not found in world!", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Player %s tried to eject creature guid %s from vehicle, but the latter was not found in world!", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
return;
}
if (!unit->IsOnVehicle(vehicle->GetBase()))
{
- LOG_ERROR("server", "Player %s tried to eject unit %s, but they are not in the same vehicle", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Player %s tried to eject unit %s, but they are not in the same vehicle", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
return;
}
@@ -210,17 +206,15 @@ void WorldSession::HandleEjectPassenger(WorldPacket& data)
unit->ExitVehicle();
}
else
- LOG_ERROR("server", "Player %s attempted to eject creature %s from non-ejectable seat.", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "Player %s attempted to eject creature %s from non-ejectable seat.", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
}
else
- LOG_ERROR("server", "HandleEjectPassenger: Player %s tried to eject invalid %s", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
+ LOG_ERROR("network.opcode", "HandleEjectPassenger: Player %s tried to eject invalid %s", GetPlayer()->GetGUID().ToString().c_str(), guid.ToString().c_str());
}
void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT");
-#endif
if (Vehicle* vehicle = GetPlayer()->GetVehicle())
{
@@ -229,7 +223,7 @@ void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recvData*/)
if (seat->CanEnterOrExit())
GetPlayer()->ExitVehicle();
else
- LOG_ERROR("server", "Player %s tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.",
+ LOG_ERROR("network.opcode", "Player %s tried to exit vehicle, but seatflags %u (ID: %u) don't permit that.",
GetPlayer()->GetGUID().ToString().c_str(), seat->m_ID, seat->m_flags);
}
}
diff --git a/src/server/game/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp
index c2c36098ee..e8ae937fde 100644
--- a/src/server/game/Handlers/VoiceChatHandler.cpp
+++ b/src/server/game/Handlers/VoiceChatHandler.cpp
@@ -10,9 +10,7 @@
void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_VOICE_SESSION_ENABLE");
-#endif
// uint8 isVoiceEnabled, uint8 isMicrophoneEnabled
recvData.read_skip<uint8>();
recvData.read_skip<uint8>();
@@ -20,17 +18,13 @@ void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket& recvData)
void WorldSession::HandleChannelVoiceOnOpcode(WorldPacket& /*recvData*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_CHANNEL_VOICE_ON");
-#endif
// Enable Voice button in channel context menu
}
void WorldSession::HandleSetActiveVoiceChannel(WorldPacket& recvData)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
-#endif
recvData.read_skip<uint32>();
recvData.read_skip<char*>();
}
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index 9bccb71624..1b06f92c50 100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
@@ -58,19 +58,19 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
const MapEntry* entry = sMapStore.LookupEntry(mapId);
if (!entry)
{
- LOG_ERROR("server", "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId);
+ LOG_ERROR("instance.save", "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId);
return nullptr;
}
if (instanceId == 0)
{
- LOG_ERROR("server", "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId);
+ LOG_ERROR("instance.save", "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId);
return nullptr;
}
if (difficulty >= (entry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
{
- LOG_ERROR("server", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty);
+ LOG_ERROR("instance.save", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty);
return nullptr;
}
@@ -243,8 +243,8 @@ void InstanceSaveManager::LoadInstances()
LoadInstanceSaves();
LoadCharacterBinds();
- LOG_INFO("server", ">> Loaded instances and binds in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded instances and binds in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void InstanceSaveManager::LoadResetTimes()
@@ -267,7 +267,7 @@ void InstanceSaveManager::LoadResetTimes()
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
if (!mapDiff)
{
- LOG_ERROR("server", "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty);
+ LOG_ERROR("instance.save", "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;
}
@@ -444,7 +444,7 @@ void InstanceSaveManager::Update()
// pussywizard: send updated calendar and raid info
if (resetOccurred)
{
- LOG_INFO("server", "Instance ID reset occurred, sending updated calendar and raid info to all players!");
+ LOG_INFO("instance.save", "Instance ID reset occurred, sending updated calendar and raid info to all players!");
WorldPacket dummy;
for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr)
if (Player* plr = itr->second->GetPlayer())
@@ -518,7 +518,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
if (!mapDiff || !mapDiff->resetTime)
{
- LOG_ERROR("server", "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid);
+ LOG_ERROR("instance.save", "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 dc6b88e6a5..98314a8486 100644
--- a/src/server/game/Instances/InstanceScript.cpp
+++ b/src/server/game/Instances/InstanceScript.cpp
@@ -43,9 +43,7 @@ void InstanceScript::HandleGameObject(ObjectGuid GUID, bool open, GameObject* go
go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: InstanceScript: HandleGameObject failed");
-#endif
}
}
@@ -67,9 +65,7 @@ void InstanceScript::LoadMinionData(const MinionData* data)
++data;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size()));
-#endif
}
void InstanceScript::LoadDoorData(const DoorData* data)
@@ -81,9 +77,7 @@ void InstanceScript::LoadDoorData(const DoorData* data)
++data;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size()));
-#endif
}
void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state)
@@ -201,7 +195,6 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
if (bossInfo->state == TO_BE_DECIDED) // loading
{
bossInfo->state = state;
- //LOG_ERROR("server", "Inialize boss %u state as %u.", id, (uint32)state);
return false;
}
else
@@ -271,7 +264,7 @@ void InstanceScript::DoUseDoorOrButton(ObjectGuid uiGuid, uint32 uiWithRestoreTi
go->ResetDoorOrButton();
}
else
- LOG_ERROR("server", "SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType());
+ LOG_ERROR("scripts.ai", "SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType());
}
}
@@ -303,9 +296,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: DoUpdateWorldState attempt send data but no players in map.");
-#endif
}
}
@@ -391,7 +382,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= nullptr*/, uint32 /*miscvalue1*/ /*= 0*/)
{
- LOG_ERROR("server", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
+ LOG_ERROR("scripts.ai", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
instance->GetId(), criteria_id);
return false;
}
diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h
index 8bd6daca54..26390f2d99 100644
--- a/src/server/game/Instances/InstanceScript.h
+++ b/src/server/game/Instances/InstanceScript.h
@@ -17,7 +17,7 @@
#define OUT_SAVE_INST_DATA_COMPLETE LOG_DEBUG("scripts.ai", "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) LOG_DEBUG("scripts.ai", "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 LOG_DEBUG("scripts.ai", "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 LOG_ERROR("server", "TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
+#define OUT_LOAD_INST_DATA_FAIL LOG_ERROR("scripts.ai", "TSCR: 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/LootItemStorage.cpp b/src/server/game/Loot/LootItemStorage.cpp
index b211a0147d..68d57b81d4 100644
--- a/src/server/game/Loot/LootItemStorage.cpp
+++ b/src/server/game/Loot/LootItemStorage.cpp
@@ -29,8 +29,8 @@ void LootItemStorage::LoadStorageFromDB()
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 stored items!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 stored items!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -46,8 +46,8 @@ void LootItemStorage::LoadStorageFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %d stored items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d stored items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void LootItemStorage::RemoveEntryFromDB(ObjectGuid containerGUID, uint32 itemid, uint32 count)
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp
index dd07705e9b..9f2959b671 100644
--- a/src/server/game/Loot/LootMgr.cpp
+++ b/src/server/game/Loot/LootMgr.cpp
@@ -160,7 +160,7 @@ uint32 LootStore::LoadLootTable()
if (lootmode == 0)
{
- LOG_ERROR("server", "Table '%s' Entry %d Item %d: LootMode is equal to 0, item will never drop - setting mode 1", GetName(), entry, item);
+ LOG_ERROR("sql.sql", "Table '%s' Entry %d Item %d: LootMode is equal to 0, item will never drop - setting mode 1", GetName(), entry, item);
lootmode = 1;
}
@@ -1647,7 +1647,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
if (!cond || !cond->isLoaded())//should never happen, checked at loading
{
- LOG_ERROR("server", "LootTemplate::addConditionItem: condition is null");
+ LOG_ERROR("condition", "LootTemplate::addConditionItem: condition is null");
return false;
}
@@ -1712,7 +1712,7 @@ bool LootTemplate::isReference(uint32 id) const
void LoadLootTemplates_Creature()
{
- LOG_INFO("server", "Loading creature loot templates...");
+ LOG_INFO("server.loading", "Loading creature loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1739,16 +1739,16 @@ void LoadLootTemplates_Creature()
LootTemplates_Creature.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Disenchant()
{
- LOG_INFO("server", "Loading disenchanting loot templates...");
+ LOG_INFO("server.loading", "Loading disenchanting loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1774,15 +1774,15 @@ void LoadLootTemplates_Disenchant()
LootTemplates_Disenchant.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Fishing()
{
- LOG_INFO("server", "Loading fishing loot templates...");
+ LOG_INFO("server.loading", "Loading fishing loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1799,16 +1799,16 @@ void LoadLootTemplates_Fishing()
LootTemplates_Fishing.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Gameobject()
{
- LOG_INFO("server", "Loading gameobject loot templates...");
+ LOG_INFO("server.loading", "Loading gameobject loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1835,16 +1835,16 @@ void LoadLootTemplates_Gameobject()
LootTemplates_Gameobject.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Item()
{
- LOG_INFO("server", "Loading item loot templates...");
+ LOG_INFO("server.loading", "Loading item loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1861,16 +1861,16 @@ void LoadLootTemplates_Item()
LootTemplates_Item.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Milling()
{
- LOG_INFO("server", "Loading milling loot templates...");
+ LOG_INFO("server.loading", "Loading milling loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1892,16 +1892,16 @@ void LoadLootTemplates_Milling()
LootTemplates_Milling.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Pickpocketing()
{
- LOG_INFO("server", "Loading pickpocketing loot templates...");
+ LOG_INFO("server.loading", "Loading pickpocketing loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1928,16 +1928,16 @@ void LoadLootTemplates_Pickpocketing()
LootTemplates_Pickpocketing.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Prospecting()
{
- LOG_INFO("server", "Loading prospecting loot templates...");
+ LOG_INFO("server.loading", "Loading prospecting loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1959,16 +1959,16 @@ void LoadLootTemplates_Prospecting()
LootTemplates_Prospecting.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Mail()
{
- LOG_INFO("server", "Loading mail loot templates...");
+ LOG_INFO("server.loading", "Loading mail loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1985,16 +1985,16 @@ void LoadLootTemplates_Mail()
LootTemplates_Mail.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Skinning()
{
- LOG_INFO("server", "Loading skinning loot templates...");
+ LOG_INFO("server.loading", "Loading skinning loot templates...");
uint32 oldMSTime = getMSTime();
@@ -2021,16 +2021,16 @@ void LoadLootTemplates_Skinning()
LootTemplates_Skinning.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Spell()
{
- LOG_INFO("server", "Loading spell loot templates...");
+ LOG_INFO("server.loading", "Loading spell loot templates...");
uint32 oldMSTime = getMSTime();
@@ -2065,15 +2065,15 @@ void LoadLootTemplates_Spell()
LootTemplates_Spell.ReportUnusedIds(lootIdSet);
if (count)
- LOG_INFO("server", ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Reference()
{
- LOG_INFO("server", "Loading reference loot templates...");
+ LOG_INFO("server.loading", "Loading reference loot templates...");
uint32 oldMSTime = getMSTime();
@@ -2096,6 +2096,6 @@ void LoadLootTemplates_Reference()
// output error for any still listed ids (not referenced from any loot table)
LootTemplates_Reference.ReportUnusedIds(lootIdSet);
- LOG_INFO("server", ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 4b356addfe..01b9c563bb 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -40,7 +40,7 @@ MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery
default:
m_messageType = MAIL_NORMAL;
m_senderId = 0; // will show mail from not existed player
- LOG_ERROR("server", "MailSender::MailSender - Mail have unexpected sender typeid (%u)", sender->GetTypeId());
+ LOG_ERROR("mail", "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 96db4436ca..6acaa2816b 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -75,14 +75,14 @@ bool Map::ExistMap(uint32 mapid, int gx, int gy)
FILE* pf = fopen(tmp, "rb");
if (!pf)
- LOG_ERROR("server", "Map file '%s': does not exist!", tmp);
+ LOG_ERROR("maps", "Map file '%s': does not exist!", tmp);
else
{
map_fileheader header;
if (fread(&header, sizeof(header), 1, pf) == 1)
{
if (header.mapMagic != MapMagic.asUInt || header.versionMagic != MapVersionMagic.asUInt)
- LOG_ERROR("server", "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", tmp);
+ LOG_ERROR("maps", "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", tmp);
else
ret = true;
}
@@ -102,7 +102,7 @@ bool Map::ExistVMap(uint32 mapid, int gx, int gy)
if (!exists)
{
std::string name = vmgr->getDirFileName(mapid, gx, gy);
- LOG_ERROR("server", "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());
+ 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;
}
}
@@ -120,19 +120,13 @@ void Map::LoadMMap(int gx, int gy)
switch (mmapLoadResult)
{
case MMAP::MMAP_LOAD_RESULT_OK:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
-#endif
+ LOG_DEBUG("maps", "MMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
break;
case MMAP::MMAP_LOAD_RESULT_ERROR:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Could not load MMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
-#endif
+ LOG_DEBUG("maps", "Could not load MMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
break;
case MMAP::MMAP_LOAD_RESULT_IGNORED:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Ignored MMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
-#endif
+ LOG_DEBUG("maps", "Ignored MMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
break;
}
}
@@ -144,19 +138,13 @@ void Map::LoadVMap(int gx, int gy)
switch (vmapLoadResult)
{
case VMAP::VMAP_LOAD_RESULT_OK:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
-#endif
+ LOG_DEBUG("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:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
-#endif
+ LOG_DEBUG("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:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
-#endif
+ 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;
}
}
@@ -181,9 +169,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])
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Unloading previously loaded map %u before reloading.", GetId());
-#endif
+ LOG_DEBUG("maps", "Unloading previously loaded map %u before reloading.", GetId());
sScriptMgr->OnUnloadGridMap(this, GridMaps[gx][gy], gx, gy);
delete (GridMaps[gx][gy]);
@@ -195,14 +181,12 @@ 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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Loading map %s", tmp);
-#endif
+ LOG_DEBUG("maps", "Loading map %s", tmp);
// loading data
GridMaps[gx][gy] = new GridMap();
if (!GridMaps[gx][gy]->loadData(tmp))
{
- LOG_ERROR("server", "Error loading map file: \n %s\n", tmp);
+ LOG_ERROR("maps", "Error loading map file: \n %s\n", tmp);
}
delete [] tmp;
@@ -333,7 +317,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on)
CellCoord p = Acore::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if (!p.IsCoordValid())
{
- LOG_ERROR("server", "Map::SwitchGridContainers: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
+ LOG_ERROR("maps", "Map::SwitchGridContainers: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
obj->GetGUID().ToString().c_str(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@@ -342,9 +326,7 @@ void Map::SwitchGridContainers(Creature* obj, bool on)
if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y)))
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "Switch object %s from grid[%u, %u] %d", obj->GetGUID().ToString().c_str(), cell.GridX(), cell.GridY(), on);
-#endif
NGridType* ngrid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(ngrid != nullptr);
@@ -373,7 +355,7 @@ void Map::SwitchGridContainers(GameObject* obj, bool on)
CellCoord p = Acore::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if (!p.IsCoordValid())
{
- LOG_ERROR("server", "Map::SwitchGridContainers: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
+ LOG_ERROR("maps", "Map::SwitchGridContainers: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
obj->GetGUID().ToString().c_str(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@@ -463,9 +445,7 @@ bool Map::EnsureGridLoaded(const Cell& cell)
{
//if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY()))
//{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "Loading grid[%u, %u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId);
-#endif
setGridObjectDataLoaded(true, cell.GridX(), cell.GridY());
@@ -497,7 +477,7 @@ bool Map::AddPlayerToMap(Player* player)
CellCoord cellCoord = Acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY());
if (!cellCoord.IsCoordValid())
{
- LOG_ERROR("server", "Map::Add: Player (%s) has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
+ LOG_ERROR("maps", "Map::Add: Player (%s) has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
player->GetGUID().ToString().c_str(), player->GetPositionX(), player->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return false;
}
@@ -560,7 +540,7 @@ bool Map::AddToMap(T* obj, bool checkTransport)
ASSERT(cellCoord.IsCoordValid());
if (!cellCoord.IsCoordValid())
{
- LOG_ERROR("server", "Map::Add: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
+ LOG_ERROR("maps", "Map::Add: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
obj->GetGUID().ToString().c_str(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return false; //Should delete object
}
@@ -609,7 +589,7 @@ bool Map::AddToMap(MotionTransport* obj, bool /*checkTransport*/)
CellCoord cellCoord = Acore::ComputeCellCoord(obj->GetPositionX(), obj->GetPositionY());
if (!cellCoord.IsCoordValid())
{
- LOG_ERROR("server", "Map::Add: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
+ LOG_ERROR("maps", "Map::Add: Object %s has invalid coordinates X:%f Y:%f grid cell [%u:%u]",
obj->GetGUID().ToString().c_str(), obj->GetPositionX(), obj->GetPositionY(), cellCoord.x_coord, cellCoord.y_coord);
return false; //Should delete object
}
@@ -1235,9 +1215,7 @@ bool Map::UnloadGrid(NGridType& ngrid)
GridMaps[gx][gy] = nullptr;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Unloading grid[%u, %u] for map %u finished", x, y, GetId());
-#endif
+ LOG_DEBUG("maps", "Unloading grid[%u, %u] for map %u finished", x, y, GetId());
return true;
}
@@ -1251,7 +1229,7 @@ void Map::RemoveAllPlayers()
if (!player->IsBeingTeleportedFar())
{
// this is happening for bg
- LOG_ERROR("server", "Map::UnloadAll: player %s is still in map %u during unload, this should not happen!", player->GetName().c_str(), GetId());
+ 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());
}
}
@@ -1357,28 +1335,28 @@ bool GridMap::loadData(char* filename)
// loadup area data
if (header.areaMapOffset && !loadAreaData(in, header.areaMapOffset, header.areaMapSize))
{
- LOG_ERROR("server", "Error loading map area data\n");
+ LOG_ERROR("maps", "Error loading map area data\n");
fclose(in);
return false;
}
// loadup height data
if (header.heightMapOffset && !loadHeightData(in, header.heightMapOffset, header.heightMapSize))
{
- LOG_ERROR("server", "Error loading map height data\n");
+ LOG_ERROR("maps", "Error loading map height data\n");
fclose(in);
return false;
}
// loadup liquid data
if (header.liquidMapOffset && !loadLiquidData(in, header.liquidMapOffset, header.liquidMapSize))
{
- LOG_ERROR("server", "Error loading map liquids data\n");
+ LOG_ERROR("maps", "Error loading map liquids data\n");
fclose(in);
return false;
}
fclose(in);
return true;
}
- LOG_ERROR("server", "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename);
+ LOG_ERROR("maps", "Map file '%s' is from an incompatible clientversion. Please recreate using the mapextractor.", filename);
fclose(in);
return false;
}
@@ -2088,9 +2066,7 @@ bool Map::IsOutdoors(float x, float y, float z) const
WMOAreaTableEntry const* wmoEntry = GetWMOAreaTableEntryByTripple(rootId, adtId, groupId);
if (wmoEntry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId);
-#endif
+ LOG_DEBUG("maps", "Got WMOAreaTableEntry! flag %u, areaid %u", wmoEntry->Flags, wmoEntry->areaId);
atEntry = sAreaTableStore.LookupEntry(wmoEntry->areaId);
}
return IsOutdoorWMO(mogpFlags, adtId, rootId, groupId, wmoEntry, atEntry);
@@ -2194,9 +2170,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))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "getLiquidStatus(): vmap liquid level: %f ground: %f type: %u", liquid_level, ground_level, liquid_type);
-#endif
// Check water level and ground level
if (liquid_level > ground_level && z > ground_level - 2)
{
@@ -2346,9 +2320,7 @@ char const* Map::GetMapName() const
void Map::SendInitSelf(Player* player)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creating player data for himself %s", player->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("maps", "Creating player data for himself %s", player->GetGUID().ToString().c_str());
UpdateData data;
@@ -2412,7 +2384,7 @@ inline void Map::setNGrid(NGridType* grid, uint32 x, uint32 y)
{
if (x >= MAX_NUMBER_OF_GRIDS || y >= MAX_NUMBER_OF_GRIDS)
{
- LOG_ERROR("server", "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y);
+ LOG_ERROR("maps", "map::setNGrid() Invalid grid coordinates found: %d, %d!", x, y);
ABORT();
}
i_grids[x][y] = grid;
@@ -2522,7 +2494,7 @@ void Map::RemoveAllObjectsInRemoveList()
{
Corpse* corpse = ObjectAccessor::GetCorpse(*obj, obj->GetGUID());
if (!corpse)
- LOG_ERROR("server", "Tried to delete corpse/bones %s that is not in map.", obj->GetGUID().ToString().c_str());
+ LOG_ERROR("maps", "Tried to delete corpse/bones %s that is not in map.", obj->GetGUID().ToString().c_str());
else
RemoveFromMap(corpse, true);
break;
@@ -2543,7 +2515,7 @@ void Map::RemoveAllObjectsInRemoveList()
RemoveFromMap(obj->ToCreature(), true);
break;
default:
- LOG_ERROR("server", "Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
+ LOG_ERROR("maps", "Non-grid object (TypeId: %u) is in grid object remove list, ignored.", obj->GetTypeId());
break;
}
}
@@ -2688,7 +2660,7 @@ bool InstanceMap::CanEnter(Player* player, bool loginCheck)
{
if (!loginCheck && player->GetMapRef().getTarget() == this)
{
- LOG_ERROR("server", "InstanceMap::CanEnter - player %s (%s) already in map %d, %d, %d!",
+ LOG_ERROR("maps", "InstanceMap::CanEnter - player %s (%s) already in map %d, %d, %d!",
player->GetName().c_str(), player->GetGUID().ToString().c_str(), GetId(), GetInstanceId(), GetSpawnMode());
ABORT();
return false;
@@ -2702,9 +2674,7 @@ bool InstanceMap::CanEnter(Player* player, bool loginCheck)
uint32 maxPlayers = GetMaxPlayers();
if (GetPlayersCountExceptGMs() >= (loginCheck ? maxPlayers + 1 : maxPlayers))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName().c_str());
-#endif
+ LOG_DEBUG("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;
}
@@ -2769,7 +2739,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
InstanceSave* mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId());
if (!mapSave)
{
- LOG_ERROR("server", "InstanceMap::Add: InstanceSave does not exist for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
+ LOG_ERROR("maps", "InstanceMap::Add: InstanceSave does not exist for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
return false;
}
@@ -2779,7 +2749,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
{
if (playerBind->save != mapSave)
{
- LOG_ERROR("server", "InstanceMap::Add: player %s (%s) is permanently bound to instance %d, %d, %d, %d but he is being put into instance %d, %d, %d, %d",
+ LOG_ERROR("maps", "InstanceMap::Add: player %s (%s) is permanently bound to instance %d, %d, %d, %d but he is being put into instance %d, %d, %d, %d",
player->GetName().c_str(), player->GetGUID().ToString().c_str(), playerBind->save->GetMapId(), playerBind->save->GetInstanceId(), playerBind->save->GetDifficulty(),
playerBind->save->CanReset(), mapSave->GetMapId(), mapSave->GetInstanceId(), mapSave->GetDifficulty(), mapSave->CanReset());
return false;
@@ -2952,7 +2922,7 @@ void InstanceMap::PermBindAllPlayers()
InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(GetInstanceId());
if (!save)
{
- LOG_ERROR("server", "Cannot bind players because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", GetMapName(), GetId(), GetInstanceId());
+ LOG_ERROR("maps", "Cannot bind players because no instance save is available for instance map (Name: %s, Entry: %u, InstanceId: %u)!", GetMapName(), GetId(), GetInstanceId());
return;
}
@@ -3053,7 +3023,7 @@ bool BattlegroundMap::CanEnter(Player* player, bool loginCheck)
{
if (!loginCheck && player->GetMapRef().getTarget() == this)
{
- LOG_ERROR("server", "BGMap::CanEnter - player %s is already in map!", player->GetGUID().ToString().c_str());
+ LOG_ERROR("maps", "BGMap::CanEnter - player %s is already in map!", player->GetGUID().ToString().c_str());
ABORT();
return false;
}
@@ -3695,7 +3665,7 @@ bool Map::CheckCollisionAndGetValidCoords(const WorldObject* source, float start
// Prevent invalid coordinates here, position is unchanged
if (!Acore::IsValidMapCoord(startX, startY, startZ) || !Acore::IsValidMapCoord(destX, destY, destZ))
{
- LOG_FATAL("server", "Map::CheckCollisionAndGetValidCoords invalid coordinates startX: %f, startY: %f, startZ: %f, destX: %f, destY: %f, destZ: %f", startX, startY, startZ, destX, destY, destZ);
+ LOG_FATAL("maps", "Map::CheckCollisionAndGetValidCoords invalid coordinates startX: %f, startY: %f, startZ: %f, destX: %f, destY: %f, destZ: %f", startX, startY, startZ, destX, destY, destZ);
return false;
}
@@ -3799,7 +3769,7 @@ void Map::LoadCorpseData()
uint32 guid = fields[16].GetUInt32();
if (type >= MAX_CORPSE_TYPE || type == CORPSE_BONES)
{
- LOG_ERROR("server", "Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type);
+ LOG_ERROR("maps", "Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type);
continue;
}
diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp
index b966ea12f3..066b350691 100644
--- a/src/server/game/Maps/MapInstanced.cpp
+++ b/src/server/game/Maps/MapInstanced.cpp
@@ -180,22 +180,20 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
const MapEntry* entry = sMapStore.LookupEntry(GetId());
if (!entry)
{
- LOG_ERROR("server", "CreateInstance: no entry for map %d", GetId());
+ LOG_ERROR("maps", "CreateInstance: no entry for map %d", GetId());
ABORT();
}
const InstanceTemplate* iTemplate = sObjectMgr->GetInstanceTemplate(GetId());
if (!iTemplate)
{
- LOG_ERROR("server", "CreateInstance: no instance template for map %d", GetId());
+ LOG_ERROR("maps", "CreateInstance: no instance template for map %d", GetId());
ABORT();
}
// some instances only have one difficulty
GetDownscaledMapDifficultyData(GetId(), difficulty);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save ? "" : "new ", InstanceId, GetId(), difficulty ? "heroic" : "normal");
-#endif
InstanceMap* map = new InstanceMap(GetId(), InstanceId, difficulty, this);
ASSERT(map->IsDungeon());
@@ -220,9 +218,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun
// load/create a map
std::lock_guard<std::mutex> guard(Lock);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());
-#endif
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 da70deefc3..c6285f1f56 100644
--- a/src/server/game/Maps/MapManager.cpp
+++ b/src/server/game/Maps/MapManager.cpp
@@ -163,9 +163,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()->GetAcoreString(LANG_INSTANCE_RAID_GROUP_ONLY), mapName);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "MAP: Player '%s' must be in a raid group to enter instance '%s'", player->GetName().c_str(), mapName);
-#endif
return false;
}
}
@@ -198,20 +196,14 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
{
WorldPacket data(SMSG_CORPSE_NOT_IN_INSTANCE, 0);
player->GetSession()->SendPacket(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "MAP: Player '%s' does not have a corpse in instance '%s' and cannot enter.", player->GetName().c_str(), mapName);
-#endif
return false;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName().c_str(), mapName);
-#endif
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps", "Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName().c_str());
-#endif
}
}
@@ -414,7 +406,7 @@ uint32 MapManager::GenerateInstanceId()
if (_nextInstanceId == 0xFFFFFFFF)
{
- LOG_ERROR("server", "Instance ID overflow!! Can't continue, shutting down server. ");
+ LOG_ERROR("server.worldserver", "Instance ID overflow!! Can't continue, shutting down server. ");
World::StopNow(ERROR_EXIT_CODE);
}
diff --git a/src/server/game/Maps/MapUpdater.cpp b/src/server/game/Maps/MapUpdater.cpp
index 26d6496e92..0f5b273cf6 100644
--- a/src/server/game/Maps/MapUpdater.cpp
+++ b/src/server/game/Maps/MapUpdater.cpp
@@ -143,4 +143,4 @@ void MapUpdater::WorkerThread()
delete request;
}
-} \ No newline at end of file
+}
diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp
index 9ef4de6bb1..0a5b504e52 100644
--- a/src/server/game/Maps/TransportMgr.cpp
+++ b/src/server/game/Maps/TransportMgr.cpp
@@ -44,7 +44,7 @@ void TransportMgr::LoadTransportTemplates()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
+ LOG_INFO("server.loading", ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
return;
}
@@ -57,13 +57,13 @@ void TransportMgr::LoadTransportTemplates()
GameObjectTemplate const* goInfo = sObjectMgr->GetGameObjectTemplate(entry);
if (goInfo == nullptr)
{
- LOG_ERROR("server", "Transport %u has no associated GameObjectTemplate from `gameobject_template` , skipped.", entry);
+ LOG_ERROR("entities.transport", "Transport %u has no associated GameObjectTemplate from `gameobject_template` , skipped.", entry);
continue;
}
if (goInfo->moTransport.taxiPathId >= sTaxiPathNodesByPath.size())
{
- LOG_ERROR("server", "Transport %u (name: %s) has an invalid path specified in `gameobject_template`.`data0` (%u) field, skipped.", entry, goInfo->name.c_str(), goInfo->moTransport.taxiPathId);
+ LOG_ERROR("entities.transport", "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;
}
@@ -79,8 +79,8 @@ void TransportMgr::LoadTransportTemplates()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
class SplineRawInitializer
@@ -361,7 +361,7 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, ObjectGuid::LowType
TransportTemplate const* tInfo = GetTransportTemplate(entry);
if (!tInfo)
{
- LOG_ERROR("server", "Transport %u will not be loaded, `transport_template` missing", entry);
+ LOG_ERROR("entities.transport", "Transport %u will not be loaded, `transport_template` missing", entry);
return nullptr;
}
@@ -389,7 +389,7 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, ObjectGuid::LowType
{
if (mapEntry->Instanceable() != tInfo->inInstance)
{
- LOG_ERROR("server", "Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId);
+ 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 nullptr;
}
@@ -434,8 +434,8 @@ void TransportMgr::SpawnContinentTransports()
} while (result->NextRow());
}
- LOG_INFO("server", ">> Spawned %u continent motion transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Spawned %u continent motion transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
if (sWorld->getBoolConfig(CONFIG_ENABLE_CONTINENT_TRANSPORT_PRELOADING))
{
@@ -462,7 +462,7 @@ void TransportMgr::SpawnContinentTransports()
} while (result->NextRow());
}
- LOG_INFO("server", ">> Preloaded grids for %u continent static transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Preloaded grids for %u continent static transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
}
diff --git a/src/server/game/Misc/GameGraveyard.cpp b/src/server/game/Misc/GameGraveyard.cpp
index 0f2b3abf48..932264ce2f 100644
--- a/src/server/game/Misc/GameGraveyard.cpp
+++ b/src/server/game/Misc/GameGraveyard.cpp
@@ -23,8 +23,8 @@ void Graveyard::LoadGraveyardFromDB()
QueryResult result = WorldDatabase.Query("SELECT ID, Map, x, y, z, Comment FROM game_graveyard");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 graveyard. Table `game_graveyard` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 graveyard. Table `game_graveyard` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -56,8 +56,8 @@ void Graveyard::LoadGraveyardFromDB()
++Count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %i graveyard in %u ms", Count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %i graveyard in %u ms", Count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
GraveyardStruct const* Graveyard::GetGraveyard(uint32 ID) const
@@ -89,7 +89,7 @@ GraveyardStruct const* Graveyard::GetClosestGraveyard(float x, float y, float z,
{
if (z > -500)
{
- LOG_ERROR("server", "ZoneId not found for map %u coords (%f, %f, %f)", MapId, x, y, z);
+ LOG_ERROR("sql.sql", "ZoneId not found for map %u coords (%f, %f, %f)", MapId, x, y, z);
return GetDefaultGraveyard(teamId);
}
}
@@ -249,7 +249,7 @@ void Graveyard::RemoveGraveyardLink(uint32 id, uint32 zoneId, TeamId teamId, boo
GraveyardMapBoundsNonConst range = GraveyardStore.equal_range(zoneId);
if (range.first == range.second)
{
- LOG_ERROR("server", "Table `graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, teamId);
+ LOG_ERROR("sql.sql", "Table `graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, teamId);
return;
}
@@ -304,8 +304,8 @@ void Graveyard::LoadGraveyardZones()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 graveyard-zone links. DB table `graveyard_zone` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 graveyard-zone links. DB table `graveyard_zone` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -352,8 +352,8 @@ void Graveyard::LoadGraveyardZones()
LOG_ERROR("sql.sql", "Table `graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
GraveyardStruct const* Graveyard::GetGraveyard(const std::string& name) const
diff --git a/src/server/game/Miscellaneous/Formulas.cpp b/src/server/game/Miscellaneous/Formulas.cpp
index fd60a692d6..6174e1ea86 100644
--- a/src/server/game/Miscellaneous/Formulas.cpp
+++ b/src/server/game/Miscellaneous/Formulas.cpp
@@ -27,7 +27,7 @@ uint32 Acore::XP::BaseGain(uint8 pl_level, uint8 mob_level, ContentLevels conten
nBaseExp = 580;
break;
default:
- LOG_ERROR("server", "BaseGain: Unsupported content level %u", content);
+ 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 146ef47fb2..63b7f1ed9b 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -240,9 +240,7 @@ void MotionMaster::MoveRandom(float wanderDistance)
if (_owner->GetTypeId() == TYPEID_UNIT)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) start moving random", _owner->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) start moving random", _owner->GetGUID().ToString().c_str());
Mutate(new RandomMovementGenerator<Creature>(wanderDistance), MOTION_SLOT_IDLE);
}
}
@@ -253,9 +251,7 @@ void MotionMaster::MoveTargetedHome()
if (_owner->GetTypeId() == TYPEID_UNIT && !_owner->ToCreature()->GetCharmerOrOwnerGUID())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) targeted home", _owner->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) targeted home", _owner->GetGUID().ToString().c_str());
Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE);
}
else if (_owner->GetTypeId() == TYPEID_UNIT && _owner->ToCreature()->GetCharmerOrOwnerGUID())
@@ -265,21 +261,17 @@ void MotionMaster::MoveTargetedHome()
if (_owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE))
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Pet or controlled creature (%s) targeting home", _owner->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("movement.motionmaster", "Pet or controlled creature (%s) targeting home", _owner->GetGUID().ToString().c_str());
Unit* target = _owner->ToCreature()->GetCharmerOrOwner();
if (target)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Following %s (%s)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("movement.motionmaster", "Following %s (%s)", target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetGUID().ToString().c_str());
Mutate(new FollowMovementGenerator<Creature>(target, PET_FOLLOW_DIST, _owner->GetFollowAngle()), MOTION_SLOT_ACTIVE);
}
}
else
{
- LOG_ERROR("server", "Player (%s) attempt targeted home", _owner->GetGUID().ToString().c_str());
+ LOG_ERROR("movement.motionmaster", "Player (%s) attempt targeted home", _owner->GetGUID().ToString().c_str());
}
}
@@ -291,16 +283,12 @@ void MotionMaster::MoveConfused()
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) move confused", _owner->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("movement.motionmaster", "Player (%s) move confused", _owner->GetGUID().ToString().c_str());
Mutate(new ConfusedMovementGenerator<Player>(), MOTION_SLOT_CONTROLLED);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) move confused", _owner->GetGUID().ToString().c_str());
-#endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) move confused", _owner->GetGUID().ToString().c_str());
Mutate(new ConfusedMovementGenerator<Creature>(), MOTION_SLOT_CONTROLLED);
}
}
@@ -315,18 +303,14 @@ void MotionMaster::MoveChase(Unit* target, std::optional<ChaseRange> dist, std:
//_owner->ClearUnitState(UNIT_STATE_FOLLOW);
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) chase to %s (%s)",
+ LOG_DEBUG("movement.motionmaster", "Player (%s) chase to %s (%s)",
_owner->GetGUID().ToString().c_str(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetGUID().ToString().c_str());
-#endif
Mutate(new ChaseMovementGenerator<Player>(target, dist, angle), MOTION_SLOT_ACTIVE);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) chase to %s (%s)",
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) chase to %s (%s)",
_owner->GetGUID().ToString().c_str(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetGUID().ToString().c_str());
-#endif
Mutate(new ChaseMovementGenerator<Creature>(target, dist, angle), MOTION_SLOT_ACTIVE);
}
}
@@ -389,18 +373,14 @@ void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlo
//_owner->AddUnitState(UNIT_STATE_FOLLOW);
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) follow to %s (%s)",
+ LOG_DEBUG("movement.motionmaster", "Player (%s) follow to %s (%s)",
_owner->GetGUID().ToString().c_str(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetGUID().ToString().c_str());
-#endif
Mutate(new FollowMovementGenerator<Player>(target, dist, angle), slot);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) follow to %s (%s)",
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) follow to %s (%s)",
_owner->GetGUID().ToString().c_str(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetGUID().ToString().c_str());
-#endif
Mutate(new FollowMovementGenerator<Creature>(target, dist, angle), slot);
}
}
@@ -413,16 +393,12 @@ void MotionMaster::MovePoint(uint32 id, float x, float y, float z, bool generate
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), id, x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "Player (%s) targeted point (Id: %u X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), id, x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z, 0.0f, orientation, nullptr, generatePath, forceDestination), slot);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) targeted point (ID: %u X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), id, x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) targeted point (ID: %u X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), id, x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z, 0.0f, orientation, nullptr, generatePath, forceDestination), slot);
}
}
@@ -452,9 +428,7 @@ void MotionMaster::MoveLand(uint32 id, Position const& pos, float speed /* = 0.0
float x, y, z;
pos.GetPosition(x, y, z);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "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);
@@ -484,9 +458,7 @@ void MotionMaster::MoveTakeoff(uint32 id, Position const& pos, float speed /* =
float x, y, z;
pos.GetPosition(x, y, z);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)", _owner->GetEntry(), id, x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "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);
@@ -549,9 +521,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, Unit const* target)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Unit (%s) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "Unit (%s) jump to point (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
if (speedXY <= 0.1f)
return;
@@ -579,10 +549,8 @@ void MotionMaster::MoveFall(uint32 id /*=0*/, bool addFlagForNPC)
float tz = _owner->GetMapHeight(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
if (tz <= INVALID_HEIGHT)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
+ LOG_DEBUG("movement.motionmaster", "MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
_owner->GetMap()->GetId(), _owner->GetPositionX(), _owner->GetPositionX(), _owner->GetPositionZ() + _owner->GetPositionZ());
-#endif
return;
}
@@ -623,16 +591,12 @@ void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id,
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) charge point (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "Player (%s) charge point (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
Mutate(new PointMovementGenerator<Player>(id, x, y, z, speed, orientation, path, generatePath, generatePath), MOTION_SLOT_CONTROLLED);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) charge point (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) charge point (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
Mutate(new PointMovementGenerator<Creature>(id, x, y, z, speed, orientation, path, generatePath, generatePath), MOTION_SLOT_CONTROLLED);
}
}
@@ -645,13 +609,11 @@ void MotionMaster::MoveSeekAssistance(float x, float y, float z)
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- LOG_ERROR("server", "Player (%s) attempt to seek assistance", _owner->GetGUID().ToString().c_str());
+ LOG_ERROR("movement.motionmaster", "Player (%s) attempt to seek assistance", _owner->GetGUID().ToString().c_str());
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) seek assistance (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
-#endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) seek assistance (X: %f Y: %f Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
_owner->AttackStop();
_owner->CastStop(0, false);
_owner->ToCreature()->SetReactState(REACT_PASSIVE);
@@ -667,13 +629,11 @@ void MotionMaster::MoveSeekAssistanceDistract(uint32 time)
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- LOG_ERROR("server", "Player (%s) attempt to call distract after assistance", _owner->GetGUID().ToString().c_str());
+ LOG_ERROR("movement.motionmaster", "Player (%s) attempt to call distract after assistance", _owner->GetGUID().ToString().c_str());
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) is distracted after assistance call (Time: %u)", _owner->GetGUID().ToString().c_str(), time);
-#endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) is distracted after assistance call (Time: %u)", _owner->GetGUID().ToString().c_str(), time);
Mutate(new AssistanceDistractMovementGenerator(time), MOTION_SLOT_ACTIVE);
}
}
@@ -689,18 +649,14 @@ void MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) flee from %s (%s)",
+ LOG_DEBUG("movement.motionmaster", "Player (%s) flee from %s (%s)",
_owner->GetGUID().ToString().c_str(), enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", enemy->GetGUID().ToString().c_str());
-#endif
Mutate(new FleeingMovementGenerator<Player>(enemy->GetGUID()), MOTION_SLOT_CONTROLLED);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) flee from %s (%s) %s",
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) flee from %s (%s) %s",
_owner->GetGUID().ToString().c_str(), enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", enemy->GetGUID().ToString().c_str(), time ? " for a limited time" : "");
-#endif
if (time)
Mutate(new TimedFleeingMovementGenerator(enemy->GetGUID(), time), MOTION_SLOT_CONTROLLED);
else
@@ -714,22 +670,20 @@ void MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode)
{
if (path < sTaxiPathNodesByPath.size())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "%s taxi to (Path %u node %u)", _owner->GetName().c_str(), path, pathnode);
-#endif
+ LOG_DEBUG("movement.motionmaster", "%s taxi to (Path %u node %u)", _owner->GetName().c_str(), path, pathnode);
FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(pathnode);
mgen->LoadPath(_owner->ToPlayer());
Mutate(mgen, MOTION_SLOT_CONTROLLED);
}
else
{
- LOG_ERROR("server", "%s attempt taxi to (not existed Path %u node %u)",
+ LOG_ERROR("movement.motionmaster", "%s attempt taxi to (not existed Path %u node %u)",
_owner->GetName().c_str(), path, pathnode);
}
}
else
{
- LOG_ERROR("server", "Creature (%s) attempt taxi to (Path %u node %u)", _owner->GetGUID().ToString().c_str(), path, pathnode);
+ LOG_ERROR("movement.motionmaster", "Creature (%s) attempt taxi to (Path %u node %u)", _owner->GetGUID().ToString().c_str(), path, pathnode);
}
}
@@ -744,15 +698,11 @@ void MotionMaster::MoveDistract(uint32 timer)
/*if (_owner->GetTypeId() == TYPEID_PLAYER)
{
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Player (%s) distracted (timer: %u)", _owner->GetGUID().ToString().c_str(), timer);
- #endif
+ LOG_DEBUG("movement.motionmaster", "Player (%s) distracted (timer: %u)", _owner->GetGUID().ToString().c_str(), timer);
}
else
{
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Creature (%s) (timer: %u)", _owner->GetGUID().ToString().c_str(), timer);
- #endif
+ LOG_DEBUG("movement.motionmaster", "Creature (%s) (timer: %u)", _owner->GetGUID().ToString().c_str(), timer);
}*/
DistractMovementGenerator* mgen = new DistractMovementGenerator(timer);
@@ -813,10 +763,8 @@ 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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "%s (%s) start moving over path(Id:%u, repeatable: %s)",
+ LOG_DEBUG("movement.motionmaster", "%s (%s) start moving over path(Id:%u, repeatable: %s)",
_owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature", _owner->GetGUID().ToString().c_str(), path_id, repeatable ? "YES" : "NO");
-#endif
}
void MotionMaster::MoveRotate(uint32 time, RotateDirection direction)
@@ -891,7 +839,7 @@ void MotionMaster::DirectDelete(_Ty curr)
void MotionMaster::DelayedDelete(_Ty curr)
{
- LOG_FATAL("server", "Unit (Entry %u) is trying to delete its updating MG (Type %u)!", _owner->GetEntry(), curr->GetMovementGeneratorType());
+ LOG_FATAL("movement.motionmaster", "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/PathGenerator.cpp b/src/server/game/Movement/MovementGenerators/PathGenerator.cpp
index 513fbb6f19..278429de33 100644
--- a/src/server/game/Movement/MovementGenerators/PathGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/PathGenerator.cpp
@@ -368,7 +368,7 @@ 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
- LOG_ERROR("server", "PathGenerator::BuildPolyPath: Path Build failed %s", _source->GetGUID().ToString().c_str());
+ LOG_ERROR("movement", "PathGenerator::BuildPolyPath: Path Build failed %s", _source->GetGUID().ToString().c_str());
}
// new path = prefix + suffix - overlap
@@ -469,7 +469,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
- LOG_ERROR("server", "PathGenerator::BuildPolyPath: %s Path Build failed: 0 length path", _source->GetGUID().ToString().c_str());
+ LOG_ERROR("movement", "PathGenerator::BuildPolyPath: %s Path Build failed: 0 length path", _source->GetGUID().ToString().c_str());
BuildShortcut();
_type = PATHFIND_NOPATH;
return;
@@ -478,7 +478,7 @@ void PathGenerator::BuildPolyPath(G3D::Vector3 const& startPos, G3D::Vector3 con
if (!_polyLength)
{
- LOG_ERROR("server", "PathGenerator::BuildPolyPath: %s Path Build failed: 0 length path", _source->GetGUID().ToString().c_str());
+ LOG_ERROR("movement", "PathGenerator::BuildPolyPath: %s Path Build failed: 0 length path", _source->GetGUID().ToString().c_str());
BuildShortcut();
_type = PATHFIND_NOPATH;
return;
@@ -508,7 +508,7 @@ void PathGenerator::BuildPointPath(const float* startPoint, const float* endPoin
if (_useRaycast)
{
// _straightLine uses raycast and it currently doesn't support building a point path, only a 2-point path with start and hitpoint/end is returned
- LOG_ERROR("server", "PathGenerator::BuildPointPath() called with _useRaycast for unit %s", _source->GetGUID().ToString().c_str());
+ LOG_ERROR("movement", "PathGenerator::BuildPointPath() called with _useRaycast for unit %s", _source->GetGUID().ToString().c_str());
BuildShortcut();
_type = PATHFIND_NOPATH;
return;
@@ -1040,7 +1040,7 @@ void PathGenerator::ShortenPathUntilDist(G3D::Vector3 const& target, float dist)
{
if (GetPathType() == PATHFIND_BLANK || _pathPoints.size() < 2)
{
- LOG_ERROR("server", "PathGenerator::ReducePathLengthByDist called before path was successfully built");
+ LOG_ERROR("movement", "PathGenerator::ReducePathLengthByDist called before path was successfully built");
return;
}
diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
index f66236562d..35876ee59b 100644
--- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
@@ -65,10 +65,8 @@ void WaypointMovementGenerator<Creature>::OnArrived(Creature* creature)
if (i_path->at(i_currentNode)->event_id && urand(0, 99) < i_path->at(i_currentNode)->event_chance)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("maps.script", "Creature movement start script %u at point %u for %s.",
i_path->at(i_currentNode)->event_id, i_currentNode, creature->GetGUID().ToString().c_str());
-#endif
creature->ClearUnitState(UNIT_STATE_ROAMING_MOVE);
creature->GetMap()->ScriptsStart(sWaypointScripts, i_path->at(i_currentNode)->event_id, creature, nullptr);
}
@@ -442,9 +440,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player* player, TaxiPathNodeEntry
{
if (uint32 eventid = departure ? node->departureEventID : node->arrivalEventID)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
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());
-#endif
player->GetMap()->ScriptsStart(sEventScripts, eventid, player, player);
}
}
@@ -480,15 +476,11 @@ void FlightPathMovementGenerator::PreloadEndGrid()
// Load the grid
if (endMap)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, (uint32)(i_path.size() - 1));
-#endif
+ LOG_DEBUG("movement", "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
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Unable to determine map to preload flightmaster grid");
-#endif
+ LOG_DEBUG("movement", "Unable to determine map to preload flightmaster grid");
}
}
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index 14478c9e15..1ccfcc1dce 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -137,7 +137,6 @@ namespace Movement
// TODO: what to do in such cases? problem is in input data (all points are at same coords)
if (spline.length() < minimal_duration)
{
- //LOG_ERROR("server", "MoveSpline::init_spline: zero length spline, wrong input data?"); // ZOMG! temp comment to avoid console spam from transports
spline.set_length(spline.last(), spline.isCyclic() ? 1000 : 1);
}
point_Idx = spline.first();
@@ -222,7 +221,7 @@ namespace Movement
offset = path[i] - middle;
if (fabs(offset.x) >= MAX_OFFSET || fabs(offset.y) >= MAX_OFFSET || fabs(offset.z) >= MAX_OFFSET)
{
- LOG_ERROR("server", "MoveSplineInitArgs::_checkPathBounds check failed");
+ LOG_ERROR("movement", "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 7d8ab1b983..a91299744a 100644
--- a/src/server/game/Movement/Waypoints/WaypointManager.cpp
+++ b/src/server/game/Movement/Waypoints/WaypointManager.cpp
@@ -42,7 +42,7 @@ void WaypointMgr::Load()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 waypoints. DB table `waypoint_data` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -86,8 +86,8 @@ void WaypointMgr::Load()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u waypoints in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void WaypointMgr::ReloadPath(uint32 id)
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 63ddc7038f..40ea3445bd 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -103,15 +103,13 @@ bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 map, float
bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("outdoorpvp", "Creating capture point %u", entry);
-#endif
// check info existence
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
{
- LOG_ERROR("server", "OutdoorPvP: GO %u is not capture point!", entry);
+ LOG_ERROR("outdoorpvp", "OutdoorPvP: GO %u is not capture point!", entry);
return false;
}
@@ -132,9 +130,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
ObjectGuid::LowType spawnId = m_Creatures[type];
if (!spawnId)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("outdoorpvp", "opvp creature type %u was already deleted", type);
-#endif
return false;
}
@@ -149,9 +145,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type)
c->RemoveCorpse();
c->AddObjectToRemoveList();
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("outdoorpvp", "deleting opvp creature type %u", type);
-#endif
// explicit removal from map
// beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
// so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
@@ -261,9 +255,7 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player* player, uint32 /*zone*/)
if (!player->GetSession()->PlayerLogout())
SendRemoveWorldStates(player);
m_players[player->GetTeamId()].erase(player->GetGUID());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("outdoorpvp", "Player %s left an outdoorpvp zone", player->GetName().c_str());
-#endif
}
void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/)
@@ -393,9 +385,11 @@ bool OPvPCapturePoint::Update(uint32 diff)
if (m_OldState != m_State)
{
- //LOG_ERROR("server", LOG_FILTER_OUTDOORPVP, "%u->%u", m_OldState, m_State);
if (oldTeam != m_team)
+ {
ChangeTeam(oldTeam);
+ }
+
ChangeState();
return true;
}
diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
index e84a9463a6..04cc2b581c 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp
@@ -42,7 +42,7 @@ void OutdoorPvPMgr::InitOutdoorPvP()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -86,13 +86,13 @@ void OutdoorPvPMgr::InitOutdoorPvP()
pvp = sScriptMgr->CreateOutdoorPvP(iter->second);
if (!pvp)
{
- LOG_ERROR("server", "Could not initialize OutdoorPvP object for type ID %u; got nullptr pointer from script.", uint32(i));
+ LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; got nullptr pointer from script.", uint32(i));
continue;
}
if (!pvp->SetupOutdoorPvP())
{
- LOG_ERROR("server", "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i));
+ LOG_ERROR("outdoorpvp", "Could not initialize OutdoorPvP object for type ID %u; SetupOutdoorPvP failed.", uint32(i));
delete pvp;
continue;
}
@@ -100,8 +100,8 @@ void OutdoorPvPMgr::InitOutdoorPvP()
m_OutdoorPvPSet.push_back(pvp);
}
- LOG_INFO("server", ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u outdoor PvP definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void OutdoorPvPMgr::AddZone(uint32 zoneid, OutdoorPvP* handle)
@@ -121,9 +121,7 @@ void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneid)
return;
itr->second->HandlePlayerEnterZone(player, zoneid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("outdoorpvp", "Player %s entered outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
-#endif
}
void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
@@ -139,9 +137,7 @@ void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneid)
return;
itr->second->HandlePlayerLeaveZone(player, zoneid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("outdoorpvp", "Player %s left outdoorpvp id %u", player->GetGUID().ToString().c_str(), itr->second->GetTypeId());
-#endif
}
OutdoorPvP* OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid)
diff --git a/src/server/game/Petitions/PetitionMgr.cpp b/src/server/game/Petitions/PetitionMgr.cpp
index bd94e286eb..ad1b98f3da 100644
--- a/src/server/game/Petitions/PetitionMgr.cpp
+++ b/src/server/game/Petitions/PetitionMgr.cpp
@@ -30,8 +30,8 @@ void PetitionMgr::LoadPetitions()
QueryResult result = CharacterDatabase.Query("SELECT ownerguid, petitionguid, name, type FROM petition");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 Petitions!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 Petitions!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -43,8 +43,8 @@ void PetitionMgr::LoadPetitions()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %d Petitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d Petitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void PetitionMgr::LoadSignatures()
@@ -55,8 +55,8 @@ void PetitionMgr::LoadSignatures()
QueryResult result = CharacterDatabase.Query("SELECT petitionguid, playerguid, player_account FROM petition_sign");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 Petition signs!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 Petition signs!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -68,8 +68,8 @@ void PetitionMgr::LoadSignatures()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %d Petition signs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d Petition signs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void PetitionMgr::AddPetition(ObjectGuid petitionGUID, ObjectGuid ownerGuid, std::string const& name, uint8 type)
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp
index d674d5cda4..a91f196f8a 100644
--- a/src/server/game/Pools/PoolMgr.cpp
+++ b/src/server/game/Pools/PoolMgr.cpp
@@ -429,9 +429,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)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("pool", "PoolGroup<Quest>: Adding quest %u to creature %u", itr->first, itr->second);
-#endif
questMap->insert(QuestRelations::value_type(itr->second, itr->first));
}
@@ -440,9 +438,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
qr = sPoolMgr->mQuestGORelation.equal_range(obj->guid);
for (PooledQuestRelation::iterator itr = qr.first; itr != qr.second; ++itr)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("pool", "PoolGroup<Quest>: Adding quest %u to GO %u", itr->first, itr->second);
-#endif
questMap->insert(QuestRelations::value_type(itr->second, itr->first));
}
}
@@ -450,9 +446,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
template <>
void PoolGroup<Quest>::SpawnObject(ActivePoolData& spawns, uint32 limit, uint32 triggerFrom)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("pool", "PoolGroup<Quest>: Spawning pool %u", poolId);
-#endif
// load state from db
if (!triggerFrom)
{
@@ -576,8 +570,8 @@ void PoolMgr::LoadFromDB()
if (!result)
{
mPoolTemplate.clear();
- LOG_INFO("server", ">> Loaded 0 object pools. DB table `pool_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 object pools. DB table `pool_template` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -594,13 +588,13 @@ void PoolMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
// Creatures
- LOG_INFO("server", "Loading Creatures Pooling Data...");
+ LOG_INFO("server.loading", "Loading Creatures Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -609,8 +603,8 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -651,14 +645,14 @@ void PoolMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// Gameobjects
- LOG_INFO("server", "Loading Gameobject Pooling Data...");
+ LOG_INFO("server.loading", "Loading Gameobject Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -667,8 +661,8 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -721,14 +715,14 @@ void PoolMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// Pool of pools
- LOG_INFO("server", "Loading Mother Pooling Data...");
+ LOG_INFO("server.loading", "Loading Mother Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -737,8 +731,8 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 pools in pools");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 pools in pools");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -813,12 +807,12 @@ void PoolMgr::LoadFromDB()
}
}
- LOG_INFO("server", ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
- LOG_INFO("server", "Loading Quest Pooling Data...");
+ LOG_INFO("server.loading", "Loading Quest Pooling Data...");
{
uint32 oldMSTime = getMSTime();
@@ -827,8 +821,8 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 quests in pools");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 quests in pools");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -903,13 +897,13 @@ void PoolMgr::LoadFromDB()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
// 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
- LOG_INFO("server", "Starting objects pooling system...");
+ LOG_INFO("server.loading", "Starting objects pooling system...");
{
uint32 oldMSTime = getMSTime();
@@ -919,8 +913,8 @@ void PoolMgr::LoadFromDB()
if (!result)
{
- LOG_INFO("server", ">> Pool handling system initialized, 0 pools spawned.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Pool handling system initialized, 0 pools spawned.");
+ LOG_INFO("server.loading", " ");
}
else
{
@@ -950,8 +944,8 @@ void PoolMgr::LoadFromDB()
}
} while (result->NextRow());
- LOG_INFO("server", "Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("pool", "Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
}
}
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 395e2d75b6..c536bc358f 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -36,7 +36,7 @@ bool ReputationMgr::IsAtWar(uint32 faction_id) const
if (!factionEntry)
{
- LOG_ERROR("server", "ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName().c_str(), faction_id);
+ LOG_ERROR("reputation", "ReputationMgr::IsAtWar: Can't get AtWar flag of %s for unknown faction (faction id) #%u.", _player->GetName().c_str(), faction_id);
return 0;
}
@@ -59,7 +59,7 @@ int32 ReputationMgr::GetReputation(uint32 faction_id) const
if (!factionEntry)
{
- LOG_ERROR("server", "ReputationMgr::GetReputation: Can't get reputation of %s for unknown faction (faction id) #%u.", _player->GetName().c_str(), faction_id);
+ LOG_ERROR("reputation", "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 944fc427b0..30426dfd77 100644
--- a/src/server/game/Scripting/MapScripts.cpp
+++ b/src/server/game/Scripting/MapScripts.cpp
@@ -90,7 +90,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
{
Player* player = nullptr;
if (!source && !target)
- LOG_ERROR("server", "%s source and target objects are nullptr.", scriptInfo->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s source and target objects are nullptr.", scriptInfo->GetDebugInfo().c_str());
else
{
// Check target first, then source.
@@ -100,7 +100,7 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
player = source->ToPlayer();
if (!player)
- LOG_ERROR("server", "%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %s; target: TypeId: %u, Entry: %u, GUID: %s), skipping.",
+ LOG_ERROR("maps.script", "%s neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %s; target: TypeId: %u, Entry: %u, GUID: %s), skipping.",
scriptInfo->GetDebugInfo().c_str(),
source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUID().ToString().c_str() : "",
target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUID().ToString().c_str() : "");
@@ -112,7 +112,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
{
Creature* creature = nullptr;
if (!source && !target)
- LOG_ERROR("server", "%s source and target objects are nullptr.", scriptInfo->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s source and target objects are nullptr.", scriptInfo->GetDebugInfo().c_str());
else
{
if (bReverse)
@@ -133,7 +133,7 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
}
if (!creature)
- LOG_ERROR("server", "%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %s; target: TypeId: %u, Entry: %u, GUID: %s), skipping.",
+ LOG_ERROR("maps.script", "%s neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %s; target: TypeId: %u, Entry: %u, GUID: %s), skipping.",
scriptInfo->GetDebugInfo().c_str(),
source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUID().ToString().c_str() : "",
target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUID().ToString().c_str() : "");
@@ -145,15 +145,15 @@ inline Unit* Map::_GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* s
{
Unit* unit = nullptr;
if (!obj)
- LOG_ERROR("server", "%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ LOG_ERROR("maps.script", "%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else if (!obj->isType(TYPEMASK_UNIT))
- LOG_ERROR("server", "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %s), skipping.",
+ LOG_ERROR("maps.script", "%s %s object is not unit (TypeId: %u, Entry: %u, GUID: %s), skipping.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetTypeId(), obj->GetEntry(), obj->GetGUID().ToString().c_str());
else
{
unit = obj->ToUnit();
if (!unit)
- LOG_ERROR("server", "%s %s object could not be casted to unit.",
+ LOG_ERROR("maps.script", "%s %s object could not be casted to unit.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
}
return unit;
@@ -163,12 +163,12 @@ inline Player* Map::_GetScriptPlayer(Object* obj, bool isSource, const ScriptInf
{
Player* player = nullptr;
if (!obj)
- LOG_ERROR("server", "%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ LOG_ERROR("maps.script", "%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
player = obj->ToPlayer();
if (!player)
- LOG_ERROR("server", "%s %s object is not a player (%s).",
+ LOG_ERROR("maps.script", "%s %s object is not a player (%s).",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetGUID().ToString().c_str());
}
return player;
@@ -178,12 +178,12 @@ inline Creature* Map::_GetScriptCreature(Object* obj, bool isSource, const Scrip
{
Creature* creature = nullptr;
if (!obj)
- LOG_ERROR("server", "%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
+ LOG_ERROR("maps.script", "%s %s object is nullptr.", scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
creature = obj->ToCreature();
if (!creature)
- LOG_ERROR("server", "%s %s object is not a creature (%s).", scriptInfo->GetDebugInfo().c_str(),
+ LOG_ERROR("maps.script", "%s %s object is not a creature (%s).", scriptInfo->GetDebugInfo().c_str(),
isSource ? "source" : "target", obj->GetGUID().ToString().c_str());
}
return creature;
@@ -193,13 +193,13 @@ inline WorldObject* Map::_GetScriptWorldObject(Object* obj, bool isSource, const
{
WorldObject* pWorldObject = nullptr;
if (!obj)
- LOG_ERROR("server", "%s %s object is nullptr.",
+ LOG_ERROR("maps.script", "%s %s object is nullptr.",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target");
else
{
pWorldObject = dynamic_cast<WorldObject*>(obj);
if (!pWorldObject)
- LOG_ERROR("server", "%s %s object is not a world object (%s).",
+ LOG_ERROR("maps.script", "%s %s object is not a world object (%s).",
scriptInfo->GetDebugInfo().c_str(), isSource ? "source" : "target", obj->GetGUID().ToString().c_str());
}
return pWorldObject;
@@ -218,27 +218,27 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, const Script
case SCRIPT_COMMAND_CLOSE_DOOR:
break;
default:
- LOG_ERROR("server", "%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s unknown command for _ScriptProcessDoor.", scriptInfo->GetDebugInfo().c_str());
return;
}
if (!guid)
- LOG_ERROR("server", "%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s door guid is not specified.", scriptInfo->GetDebugInfo().c_str());
else if (!source)
- LOG_ERROR("server", "%s source object is nullptr.", scriptInfo->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s source object is nullptr.", scriptInfo->GetDebugInfo().c_str());
else if (!source->isType(TYPEMASK_UNIT))
- LOG_ERROR("server", "%s source object is not unit (%s), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str());
+ LOG_ERROR("maps.script", "%s source object is not unit (%s), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str());
else
{
WorldObject* wSource = dynamic_cast <WorldObject*> (source);
if (!wSource)
- LOG_ERROR("server", "%s source object could not be casted to world object (%s), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str());
+ LOG_ERROR("maps.script", "%s source object could not be casted to world object (%s), skipping.", scriptInfo->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str());
else
{
GameObject* pDoor = _FindGameObject(wSource, guid);
if (!pDoor)
- LOG_ERROR("server", "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid);
+ LOG_ERROR("maps.script", "%s gameobject was not found (guid: %u).", scriptInfo->GetDebugInfo().c_str(), guid);
else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR)
- LOG_ERROR("server", "%s gameobject is not a door (%s).",
+ LOG_ERROR("maps.script", "%s gameobject is not a door (%s).",
scriptInfo->GetDebugInfo().c_str(), pDoor->GetGUID().ToString().c_str());
else if (bOpen == (pDoor->GetGoState() == GO_STATE_READY))
{
@@ -307,7 +307,7 @@ void Map::ScriptsProcess()
source = GetTransport(step.sourceGUID);
break;
default:
- LOG_ERROR("server", "%s source with unsupported high guid (%s).",
+ LOG_ERROR("maps.script", "%s source with unsupported high guid (%s).",
step.script->GetDebugInfo().c_str(), step.sourceGUID.ToString().c_str());
break;
}
@@ -339,7 +339,7 @@ void Map::ScriptsProcess()
target = GetTransport(step.targetGUID);
break;
default:
- LOG_ERROR("server", "%s target with unsupported high guid (%s).",
+ LOG_ERROR("maps.script", "%s target with unsupported high guid (%s).",
step.script->GetDebugInfo().c_str(), step.targetGUID.ToString().c_str());
break;
}
@@ -350,7 +350,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)
{
- LOG_ERROR("server", "%s invalid chat type (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->Talk.ChatType);
+ LOG_ERROR("maps.script", "%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)
@@ -378,7 +378,7 @@ void Map::ScriptsProcess()
{
ObjectGuid targetGUID = target ? target->GetGUID() : ObjectGuid::Empty;
if (!targetGUID || !targetGUID.IsPlayer())
- LOG_ERROR("server", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
player->Whisper(text, LANG_UNIVERSAL, targetGUID);
break;
@@ -410,13 +410,13 @@ void Map::ScriptsProcess()
break;
case CHAT_TYPE_WHISPER:
if (!targetGUID || !targetGUID.IsPlayer())
- LOG_ERROR("server", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s attempt to whisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
cSource->MonsterWhisper(step.script->Talk.TextID, target->ToPlayer());
break;
case CHAT_MSG_RAID_BOSS_WHISPER:
if (!targetGUID || !targetGUID.IsPlayer())
- LOG_ERROR("server", "%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s attempt to raidbosswhisper to non-player unit, skipping.", step.script->GetDebugInfo().c_str());
else
cSource->MonsterWhisper(step.script->Talk.TextID, target->ToPlayer(), true);
break;
@@ -444,7 +444,7 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FieldSet.FieldID <= OBJECT_FIELD_ENTRY || step.script->FieldSet.FieldID >= cSource->GetValuesCount())
- LOG_ERROR("server", "%s wrong field %u (max count: %u) in object (%s) specified, skipping.",
+ LOG_ERROR("maps.script", "%s wrong field %u (max count: %u) in object (%s) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FieldSet.FieldID, cSource->GetValuesCount(), cSource->GetGUID().ToString().c_str());
else
cSource->SetUInt32Value(step.script->FieldSet.FieldID, step.script->FieldSet.FieldValue);
@@ -472,7 +472,7 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount())
- LOG_ERROR("server", "%s wrong field %u (max count: %u) in object (%s) specified, skipping.",
+ LOG_ERROR("maps.script", "%s wrong field %u (max count: %u) in object (%s) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, cSource->GetValuesCount(), cSource->GetGUID().ToString().c_str());
else
cSource->SetFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue);
@@ -485,7 +485,7 @@ void Map::ScriptsProcess()
{
// Validate field number.
if (step.script->FlagToggle.FieldID <= OBJECT_FIELD_ENTRY || step.script->FlagToggle.FieldID >= cSource->GetValuesCount())
- LOG_ERROR("server", "%s wrong field %u (max count: %u) in object (%s) specified, skipping.",
+ LOG_ERROR("maps.script", "%s wrong field %u (max count: %u) in object (%s) specified, skipping.",
step.script->GetDebugInfo().c_str(), step.script->FlagToggle.FieldID, cSource->GetValuesCount(), cSource->GetGUID().ToString().c_str());
else
cSource->RemoveFlag(step.script->FlagToggle.FieldID, step.script->FlagToggle.FieldValue);
@@ -511,12 +511,12 @@ void Map::ScriptsProcess()
{
if (!source)
{
- LOG_ERROR("server", "%s source object is nullptr.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s source object is nullptr.", step.script->GetDebugInfo().c_str());
break;
}
if (!target)
{
- LOG_ERROR("server", "%s target object is nullptr.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s target object is nullptr.", step.script->GetDebugInfo().c_str());
break;
}
@@ -527,7 +527,7 @@ void Map::ScriptsProcess()
{
if (source->GetTypeId() != TYPEID_UNIT && source->GetTypeId() != TYPEID_GAMEOBJECT && source->GetTypeId() != TYPEID_PLAYER)
{
- LOG_ERROR("server", "%s source is not unit, gameobject or player (%s), skipping.", step.script->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str());
+ LOG_ERROR("maps.script", "%s source is not unit, gameobject or player (%s), skipping.", step.script->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str());
break;
}
worldObject = dynamic_cast<WorldObject*>(source);
@@ -539,14 +539,14 @@ void Map::ScriptsProcess()
{
if (target->GetTypeId() != TYPEID_UNIT && target->GetTypeId() != TYPEID_GAMEOBJECT && target->GetTypeId() != TYPEID_PLAYER)
{
- LOG_ERROR("server", "%s target is not unit, gameobject or player (%s), skipping.", step.script->GetDebugInfo().c_str(), target->GetGUID().ToString().c_str());
+ LOG_ERROR("maps.script", "%s target is not unit, gameobject or player (%s), skipping.", step.script->GetDebugInfo().c_str(), target->GetGUID().ToString().c_str());
break;
}
worldObject = dynamic_cast<WorldObject*>(target);
}
else
{
- LOG_ERROR("server", "%s neither source nor target is player (source: %s; target: %s), skipping.",
+ LOG_ERROR("maps.script", "%s neither source nor target is player (source: %s; target: %s), skipping.",
step.script->GetDebugInfo().c_str(), source->GetGUID().ToString().c_str(), target->GetGUID().ToString().c_str());
break;
}
@@ -576,7 +576,7 @@ void Map::ScriptsProcess()
case SCRIPT_COMMAND_RESPAWN_GAMEOBJECT:
if (!step.script->RespawnGameobject.GOGuid)
{
- LOG_ERROR("server", "%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s gameobject guid (datalong) is not specified.", step.script->GetDebugInfo().c_str());
break;
}
@@ -586,7 +586,7 @@ void Map::ScriptsProcess()
GameObject* pGO = _FindGameObject(pSummoner, step.script->RespawnGameobject.GOGuid);
if (!pGO)
{
- LOG_ERROR("server", "%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid);
+ LOG_ERROR("maps.script", "%s gameobject was not found (guid: %u).", step.script->GetDebugInfo().c_str(), step.script->RespawnGameobject.GOGuid);
break;
}
@@ -595,7 +595,7 @@ void Map::ScriptsProcess()
pGO->GetGoType() == GAMEOBJECT_TYPE_BUTTON ||
pGO->GetGoType() == GAMEOBJECT_TYPE_TRAP)
{
- LOG_ERROR("server", "%s can not be used with gameobject of type %u (guid: %u).",
+ LOG_ERROR("maps.script", "%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;
}
@@ -618,7 +618,7 @@ void Map::ScriptsProcess()
if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script))
{
if (!step.script->TempSummonCreature.CreatureEntry)
- LOG_ERROR("server", "%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s creature entry (datalong) is not specified.", step.script->GetDebugInfo().c_str());
else
{
uint32 entry = step.script->TempSummonCreature.CreatureEntry;
@@ -634,7 +634,7 @@ void Map::ScriptsProcess()
break;
if (!pSummoner->SummonCreature(entry, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->TempSummonCreature.DespawnDelay))
- LOG_ERROR("server", "%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry);
+ LOG_ERROR("maps.script", "%s creature was not spawned (entry: %u).", step.script->GetDebugInfo().c_str(), step.script->TempSummonCreature.CreatureEntry);
}
}
break;
@@ -652,13 +652,13 @@ void Map::ScriptsProcess()
// Target must be GameObject.
if (!target)
{
- LOG_ERROR("server", "%s target object is nullptr.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s target object is nullptr.", step.script->GetDebugInfo().c_str());
break;
}
if (target->GetTypeId() != TYPEID_GAMEOBJECT)
{
- LOG_ERROR("server", "%s target object is not gameobject (%s), skipping.", step.script->GetDebugInfo().c_str(), target->GetGUID().ToString().c_str());
+ LOG_ERROR("maps.script", "%s target object is not gameobject (%s), skipping.", step.script->GetDebugInfo().c_str(), target->GetGUID().ToString().c_str());
break;
}
@@ -681,7 +681,7 @@ void Map::ScriptsProcess()
// TODO: Allow gameobjects to be targets and casters
if (!source && !target)
{
- LOG_ERROR("server", "%s source and target objects are nullptr.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s source and target objects are nullptr.", step.script->GetDebugInfo().c_str());
break;
}
@@ -714,13 +714,13 @@ void Map::ScriptsProcess()
if (!uSource || !uSource->isType(TYPEMASK_UNIT))
{
- LOG_ERROR("server", "%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
+ LOG_ERROR("maps.script", "%s no source unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
break;
}
if (!uTarget || !uTarget->isType(TYPEMASK_UNIT))
{
- LOG_ERROR("server", "%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
+ LOG_ERROR("maps.script", "%s no target unit found for spell %u", step.script->GetDebugInfo().c_str(), step.script->CastSpell.SpellID);
break;
}
@@ -780,7 +780,7 @@ void Map::ScriptsProcess()
if (Unit* unit = _GetScriptUnit(source, true, step.script))
{
if (!sWaypointMgr->GetPath(step.script->LoadPath.PathID))
- LOG_ERROR("server", "%s source object has an invalid path (%u), skipping.", step.script->GetDebugInfo().c_str(), step.script->LoadPath.PathID);
+ LOG_ERROR("maps.script", "%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);
}
@@ -790,12 +790,12 @@ void Map::ScriptsProcess()
{
if (!step.script->CallScript.CreatureEntry)
{
- LOG_ERROR("server", "%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s creature entry is not specified, skipping.", step.script->GetDebugInfo().c_str());
break;
}
if (!step.script->CallScript.ScriptID)
{
- LOG_ERROR("server", "%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "%s script id is not specified, skipping.", step.script->GetDebugInfo().c_str());
break;
}
@@ -813,7 +813,7 @@ void Map::ScriptsProcess()
if (!cTarget)
{
- LOG_ERROR("server", "%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry);
+ LOG_ERROR("maps.script", "%s target was not found (entry: %u)", step.script->GetDebugInfo().c_str(), step.script->CallScript.CreatureEntry);
break;
}
@@ -822,7 +822,7 @@ void Map::ScriptsProcess()
//if no scriptmap present...
if (!datamap)
{
- LOG_ERROR("server", "%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType);
+ LOG_ERROR("maps.script", "%s unknown scriptmap (%u) specified, skipping.", step.script->GetDebugInfo().c_str(), step.script->CallScript.ScriptType);
break;
}
@@ -836,7 +836,7 @@ void Map::ScriptsProcess()
if (Creature* cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script))
{
if (cSource->isDead())
- LOG_ERROR("server", "%s creature is already dead (%s)", step.script->GetDebugInfo().c_str(), cSource->GetGUID().ToString().c_str());
+ LOG_ERROR("maps.script", "%s creature is already dead (%s)", step.script->GetDebugInfo().c_str(), cSource->GetGUID().ToString().c_str());
else
{
cSource->setDeathState(JUST_DIED);
@@ -911,7 +911,7 @@ void Map::ScriptsProcess()
break;
default:
- LOG_ERROR("server", "Unknown script command %s.", step.script->GetDebugInfo().c_str());
+ LOG_ERROR("maps.script", "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 8006742fbf..dac2942a18 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -90,7 +90,7 @@ ScriptMgr* ScriptMgr::instance()
void ScriptMgr::Initialize()
{
AddScripts();
- LOG_INFO("server", "Loading C++ scripts");
+ LOG_INFO("server.loading", "Loading C++ scripts");
}
void ScriptMgr::Unload()
@@ -168,8 +168,8 @@ void ScriptMgr::LoadDatabase()
CheckIfScriptsInDatabaseExist();
- LOG_INFO("server", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
struct TSpellSummary
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h
index 2d2307684b..87dfc36513 100644
--- a/src/server/game/Scripting/ScriptMgr.h
+++ b/src/server/game/Scripting/ScriptMgr.h
@@ -247,7 +247,7 @@ public:
_mapEntry = sMapStore.LookupEntry(_mapId);
if (!_mapEntry)
- LOG_ERROR("server", "Invalid MapScript for %u; no such map ID.", _mapId);
+ LOG_ERROR("maps.script", "Invalid MapScript for %u; no such map ID.", _mapId);
}
// Gets the MapEntry structure associated with this script. Can return nullptr.
@@ -288,7 +288,7 @@ public:
checkMap();
if (GetEntry() && !GetEntry()->IsWorldMap())
- LOG_ERROR("server", "WorldMapScript for map %u is invalid.", GetEntry()->MapID);
+ LOG_ERROR("maps.script", "WorldMapScript for map %u is invalid.", GetEntry()->MapID);
}
};
@@ -305,7 +305,7 @@ public:
checkMap();
if (GetEntry() && !GetEntry()->IsDungeon())
- LOG_ERROR("server", "InstanceMapScript for map %u is invalid.", GetEntry()->MapID);
+ LOG_ERROR("maps.script", "InstanceMapScript for map %u is invalid.", GetEntry()->MapID);
}
// Gets an InstanceScript object for this instance.
@@ -325,7 +325,7 @@ public:
checkMap();
if (GetEntry() && !GetEntry()->IsBattleground())
- LOG_ERROR("server", "BattlegroundMapScript for map %u is invalid.", GetEntry()->MapID);
+ LOG_ERROR("maps.script", "BattlegroundMapScript for map %u is invalid.", GetEntry()->MapID);
}
};
@@ -1956,7 +1956,7 @@ public:
else
{
// If the script is already assigned -> delete it!
- LOG_ERROR("server", "Script named '%s' is already assigned (two or more scripts have the same name), so the script can't work, aborting...",
+ LOG_ERROR("scripts", "Script named '%s' is already assigned (two or more scripts have the same name), so the script can't work, aborting...",
script->GetName().c_str());
ABORT(); // Error that should be fixed ASAP.
@@ -2000,7 +2000,7 @@ private:
{
if (it->second == script)
{
- LOG_ERROR("server", "Script '%s' has same memory pointer as '%s'.",
+ LOG_ERROR("scripts", "Script '%s' has same memory pointer as '%s'.",
script->GetName().c_str(), it->second->GetName().c_str());
return false;
diff --git a/src/server/game/Scripting/ScriptSystem.cpp b/src/server/game/Scripting/ScriptSystem.cpp
index b031cf44bb..1cc148bd63 100644
--- a/src/server/game/Scripting/ScriptSystem.cpp
+++ b/src/server/game/Scripting/ScriptSystem.cpp
@@ -31,15 +31,15 @@ void SystemMgr::LoadScriptWaypoints()
if (result)
uiCreatureCount = result->GetRowCount();
- LOG_INFO("server", "TSCR: Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount);
+ LOG_INFO("server.loading", "TSCR: 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)
{
- LOG_INFO("server", ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -73,5 +73,5 @@ void SystemMgr::LoadScriptWaypoints()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", ">> Loaded %u Script Waypoint nodes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index ba01c8ad9e..4fc9bf92d9 100644
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -214,7 +214,7 @@ void WorldSession::SendPacket(WorldPacket const* packet)
if (!m_Socket)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) && defined(ACORE_DEBUG)
+#if defined(ACORE_DEBUG)
// Code for network use statistic
static uint64 sendPacketCount = 0;
static uint64 sendPacketBytes = 0;
@@ -240,9 +240,9 @@ void WorldSession::SendPacket(WorldPacket const* packet)
uint64 minTime = uint64(cur_time - lastTime);
uint64 fullTime = uint64(lastTime - firstTime);
- LOG_DEBUG("server", "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));
+ LOG_DEBUG("network", "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));
- LOG_DEBUG("server", "Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount) / minTime, float(sendLastPacketBytes) / minTime);
+ LOG_DEBUG("network", "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;
@@ -393,7 +393,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
}
catch (ByteBufferException const&)
{
- LOG_ERROR("server", "WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.", packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId());
+ 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());
if (sLog->ShouldLog("network", LogLevel::LOG_LEVEL_DEBUG))
{
LOG_DEBUG("network", "Dumping error causing packet:");
@@ -665,9 +665,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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
-#endif
//! 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);
@@ -794,13 +792,13 @@ void WorldSession::LoadAccountData(PreparedQueryResult result, uint32 mask)
uint32 type = fields[0].GetUInt8();
if (type >= NUM_ACCOUNT_DATA_TYPES)
{
- LOG_ERROR("server", "Table `%s` have invalid account data type (%u), ignore.", mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type);
+ LOG_ERROR("network", "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)
{
- LOG_ERROR("server", "Table `%s` have non appropriate for table account data type (%u), ignore.", mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type);
+ LOG_ERROR("network", "Table `%s` have non appropriate for table account data type (%u), ignore.", mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type);
continue;
}
@@ -1056,7 +1054,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket& data)
if (size > 0xFFFFF)
{
- LOG_ERROR("server", "WorldSession::ReadAddonsInfo addon info too big, size %u", size);
+ LOG_ERROR("network", "WorldSession::ReadAddonsInfo addon info too big, size %u", size);
return;
}
@@ -1086,34 +1084,28 @@ void WorldSession::ReadAddonsInfo(WorldPacket& data)
addonInfo >> enabled >> crc >> unk1;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
-#endif
+ LOG_DEBUG("network", "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);
SavedAddon const* savedAddon = AddonMgr::GetAddonInfo(addonName);
if (savedAddon)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
bool match = true;
if (addon.CRC != savedAddon->CRC)
match = false;
if (!match)
- LOG_DEBUG("server", "ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
+ LOG_DEBUG("network", "ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
else
- LOG_DEBUG("server", "ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
-#endif
+ LOG_DEBUG("network", "ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
}
else
{
AddonMgr::SaveAddon(addon);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
-#endif
+ LOG_DEBUG("network", "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.
@@ -1122,17 +1114,13 @@ void WorldSession::ReadAddonsInfo(WorldPacket& data)
uint32 currentTime;
addonInfo >> currentTime;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "ADDON: CurrentTime: %u", currentTime);
-#endif
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (addonInfo.rpos() != addonInfo.size())
LOG_DEBUG("network", "packet under-read!");
-#endif
}
else
- LOG_ERROR("server", "Addon packet uncompress error!");
+ LOG_ERROR("network", "Addon packet uncompress error!");
}
void WorldSession::SendAddonsInfo()
@@ -1171,9 +1159,7 @@ void WorldSession::SendAddonsInfo()
data << uint8(usepk);
if (usepk) // if CRC is wrong, add public key (client need it)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "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);
-#endif
+ LOG_DEBUG("network", "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));
}
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 635b46843e..0dee40c2ba 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -240,7 +240,7 @@ int WorldSocket::SendPacket(WorldPacket const& pct)
if (msg_queue()->enqueue_tail(mb, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1)
{
- LOG_ERROR("server", "WorldSocket::SendPacket enqueue_tail failed");
+ LOG_ERROR("network", "WorldSocket::SendPacket enqueue_tail failed");
mb->release();
return -1;
}
@@ -283,7 +283,7 @@ int WorldSocket::open(void* a)
if (peer().get_remote_addr(remote_addr) == -1)
{
- LOG_ERROR("server", "WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
+ LOG_ERROR("network", "WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
return -1;
}
@@ -301,7 +301,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)
{
- LOG_ERROR("server", "WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
+ LOG_ERROR("network", "WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
return -1;
}
@@ -337,18 +337,14 @@ int WorldSocket::handle_input(ACE_HANDLE)
return Update(); // interesting line, isn't it ?
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
-#endif
+ LOG_DEBUG("network", "WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
errno = ECONNRESET;
return -1;
}
case 0:
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WorldSocket::handle_input: Peer has closed connection");
-#endif
+ LOG_DEBUG("network", "WorldSocket::handle_input: Peer has closed connection");
errno = ECONNRESET;
return -1;
@@ -417,7 +413,7 @@ int WorldSocket::handle_output_queue()
if (msg_queue()->dequeue_head(mblk, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1)
{
- LOG_ERROR("server", "WorldSocket::handle_output_queue dequeue_head");
+ LOG_ERROR("network", "WorldSocket::handle_output_queue dequeue_head");
return -1;
}
@@ -452,7 +448,7 @@ int WorldSocket::handle_output_queue()
if (msg_queue()->enqueue_head(mblk, (ACE_Time_Value*) &ACE_Time_Value::zero) == -1)
{
- LOG_ERROR("server", "WorldSocket::handle_output_queue enqueue_head");
+ LOG_ERROR("network", "WorldSocket::handle_output_queue enqueue_head");
mblk->release();
return -1;
}
@@ -530,7 +526,7 @@ int WorldSocket::handle_input_header(void)
if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240))
{
- LOG_ERROR("server", "WorldSocket::handle_input_header(): client (%s) sent malformed packet (size: %hd, cmd: %d)",
+ LOG_ERROR("network", "WorldSocket::handle_input_header(): client (%s) sent malformed packet (size: %hd, cmd: %d)",
GetRemoteAddress().c_str(), header.size, header.cmd);
errno = EINVAL;
@@ -633,7 +629,7 @@ int WorldSocket::handle_input_missing_data(void)
// hope this is not hack, as proper m_RecvWPct is asserted around
if (!m_RecvWPct)
{
- LOG_ERROR("server", "Forcing close on input m_RecvWPct = nullptr");
+ LOG_ERROR("network", "Forcing close on input m_RecvWPct = nullptr");
errno = EINVAL;
return -1;
}
@@ -677,7 +673,7 @@ int WorldSocket::cancel_wakeup_output()
(this, ACE_Event_Handler::WRITE_MASK) == -1)
{
// would be good to store errno from reactor with errno guard
- LOG_ERROR("server", "WorldSocket::cancel_wakeup_output");
+ LOG_ERROR("network", "WorldSocket::cancel_wakeup_output");
return -1;
}
@@ -694,7 +690,7 @@ int WorldSocket::schedule_wakeup_output()
if (reactor()->schedule_wakeup
(this, ACE_Event_Handler::WRITE_MASK) == -1)
{
- LOG_ERROR("server", "WorldSocket::schedule_wakeup_output");
+ LOG_ERROR("network", "WorldSocket::schedule_wakeup_output");
return -1;
}
@@ -727,12 +723,12 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
return HandlePing(*new_pct);
}
catch (ByteBufferPositionException const&) { }
- LOG_ERROR("server", "WorldSocket::ReadDataHandler(): client sent malformed CMSG_PING");
+ LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client sent malformed CMSG_PING");
return -1;
case CMSG_AUTH_SESSION:
if (m_Session)
{
- LOG_ERROR("server", "WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again");
+ LOG_ERROR("network", "WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again");
return -1;
}
return HandleAuthSession (*new_pct);
@@ -749,7 +745,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
}
catch (ByteBufferException const&)
{
- LOG_ERROR("server", "WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet (opcode: %u) from client %s, accountid=%u. Disconnected client.",
+ LOG_ERROR("network", "WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet (opcode: %u) from client %s, accountid=%u. Disconnected client.",
aptr->GetOpcode(), GetRemoteAddress().c_str(), m_Session ? m_Session->GetAccountId() : 0);
if (sLog->ShouldLog("network", LogLevel::LOG_LEVEL_DEBUG))
@@ -785,7 +781,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
return 0;
}
- LOG_ERROR("server", "WorldSocket::ProcessIncoming: Client not authed opcode = %u", aptr->GetOpcode());
+ LOG_ERROR("network", "WorldSocket::ProcessIncoming: Client not authed opcode = %u", aptr->GetOpcode());
return -1;
}
@@ -806,7 +802,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
packet << uint8(AUTH_REJECT);
SendPacket(packet);
- LOG_ERROR("server", "WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
+ LOG_ERROR("network", "WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
return -1;
}
@@ -822,10 +818,9 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
recvPacket >> DosResponse;
recvPacket.read(digest);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WorldSocket::HandleAuthSession: client %u, loginServerID %u, accountName %s, loginServerType %u",
+ LOG_DEBUG("network", "WorldSocket::HandleAuthSession: client %u, loginServerID %u, accountName %s, loginServerType %u",
BuiltNumberClient, loginServerID, accountName.c_str(), loginServerType);
-#endif
+
// Get the account information from the realmd database
// 0 1 2 3 4 5 6 7 8 9 10
// SELECT id, sessionkey, last_ip, locked, lock_country, expansion, mutetime, locale, recruiter, os, totaltime FROM account WHERE username = ?
@@ -844,7 +839,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
SendPacket(packet);
- LOG_ERROR("server", "WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
+ LOG_ERROR("network", "WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
return -1;
}
@@ -870,7 +865,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
packet << uint8(AUTH_REJECT);
SendPacket(packet);
- LOG_ERROR("server", "WorldSocket::HandleAuthSession: World closed, denying client (%s).", address.c_str());
+ LOG_ERROR("network", "WorldSocket::HandleAuthSession: World closed, denying client (%s).", address.c_str());
sScriptMgr->OnFailedAccountLogin(account.Id);
return -1;
}
@@ -914,10 +909,8 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
{
packet.Initialize(SMSG_AUTH_RESPONSE, 1);
packet << uint8(AUTH_FAILED);
-
SendPacket(packet);
-
- LOG_ERROR("server", "WorldSocket::HandleAuthSession: Authentication failed for account: %u ('%s') address: %s", account.Id, accountName.c_str(), address.c_str());
+ LOG_ERROR("network", "WorldSocket::HandleAuthSession: Authentication failed for account: %u ('%s') address: %s", account.Id, accountName.c_str(), address.c_str());
return -1;
}
@@ -1042,7 +1035,7 @@ int WorldSocket::HandlePing(WorldPacket& recvPacket)
if (m_Session && AccountMgr::IsPlayerAccount(m_Session->GetSecurity()))
{
Player* _player = m_Session->GetPlayer();
- LOG_ERROR("server", "WorldSocket::HandlePing: Player (account: %u, %s, name: %s) kicked for over-speed pings (address: %s)",
+ LOG_ERROR("network", "WorldSocket::HandlePing: Player (account: %u, %s, name: %s) kicked for over-speed pings (address: %s)",
m_Session->GetAccountId(),
_player ? _player->GetGUID().ToString().c_str() : "",
_player ? _player->GetName().c_str() : "<none>",
@@ -1066,7 +1059,7 @@ int WorldSocket::HandlePing(WorldPacket& recvPacket)
}
else
{
- LOG_ERROR("server", "WorldSocket::HandlePing: peer sent CMSG_PING, "
+ 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 e2ed70ff5f..1b058ca36b 100644
--- a/src/server/game/Server/WorldSocketAcceptor.h
+++ b/src/server/game/Server/WorldSocketAcceptor.h
@@ -30,7 +30,7 @@ public:
protected:
virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/)
{
- LOG_INFO("server", "Resuming acceptor");
+ LOG_INFO("network", "Resuming acceptor");
reactor()->cancel_timer(this, 1);
return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK);
}
@@ -40,7 +40,7 @@ protected:
#if defined(ENFILE) && defined(EMFILE)
if (errno == ENFILE || errno == EMFILE)
{
- LOG_ERROR("server", "Out of file descriptors, suspending incoming connections for 10 seconds");
+ LOG_ERROR("network", "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, nullptr, ACE_Time_Value(10));
}
diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp
index b53ab7cf61..138ffbf30a 100644
--- a/src/server/game/Server/WorldSocketMgr.cpp
+++ b/src/server/game/Server/WorldSocketMgr.cpp
@@ -135,9 +135,7 @@ protected:
int svc() override
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Network Thread Starting");
-#endif
+ LOG_DEBUG("network", "Network Thread Starting");
ASSERT(m_Reactor);
@@ -174,9 +172,7 @@ protected:
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Network Thread exits");
-#endif
+ LOG_DEBUG("network", "Network Thread exits");
return 0;
}
@@ -226,7 +222,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
if (num_threads <= 0)
{
- LOG_ERROR("server", "Network.Threads is wrong in your config file");
+ LOG_ERROR("network", "Network.Threads is wrong in your config file");
return -1;
}
@@ -234,7 +230,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
m_NetThreads = new ReactorRunnable[m_NetThreadsCount];
- LOG_INFO("server", "Max allowed socket connections %d", ACE::max_handles());
+ LOG_INFO("network", "Max allowed socket connections %d", ACE::max_handles());
// -1 means use default
m_SockOutKBuff = sConfigMgr->GetOption<int32> ("Network.OutKBuff", -1);
@@ -243,7 +239,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
if (m_SockOutUBuff <= 0)
{
- LOG_ERROR("server", "Network.OutUBuff is wrong in your config file");
+ LOG_ERROR("network", "Network.OutUBuff is wrong in your config file");
return -1;
}
@@ -253,7 +249,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
if (m_Acceptor->open(listen_addr, m_NetThreads[0].GetReactor(), ACE_NONBLOCK) == -1)
{
- LOG_ERROR("server", "Failed to open acceptor, check if the port is free");
+ LOG_ERROR("network", "Failed to open acceptor, check if the port is free");
return -1;
}
@@ -317,7 +313,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
(void*) & m_SockOutKBuff,
sizeof (int)) == -1 && errno != ENOTSUP)
{
- LOG_ERROR("server", "WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
+ LOG_ERROR("network", "WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
return -1;
}
}
@@ -332,7 +328,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
(void*)&ndoption,
sizeof (int)) == -1)
{
- LOG_ERROR("server", "WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
+ LOG_ERROR("network", "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 dc659d1c92..8103fa7f45 100644
--- a/src/server/game/Skills/SkillDiscovery.cpp
+++ b/src/server/game/Skills/SkillDiscovery.cpp
@@ -44,7 +44,7 @@ void LoadSkillDiscoveryTable()
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 skill discovery definitions. DB table `skill_discovery_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -140,8 +140,8 @@ void LoadSkillDiscoveryTable()
LOG_ERROR("sql.sql", "Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table", spell_id);
}
- LOG_INFO("server", ">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u skill discovery definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)
diff --git a/src/server/game/Skills/SkillExtraItems.cpp b/src/server/game/Skills/SkillExtraItems.cpp
index 9c074f0271..e08656cfb0 100644
--- a/src/server/game/Skills/SkillExtraItems.cpp
+++ b/src/server/game/Skills/SkillExtraItems.cpp
@@ -48,8 +48,8 @@ void LoadSkillPerfectItemTable()
if (!result)
{
- LOG_ERROR("sql.sql", ">> Loaded 0 spell perfection definitions. DB table `skill_perfect_item_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell perfection definitions. DB table `skill_perfect_item_template` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -63,28 +63,28 @@ void LoadSkillPerfectItemTable()
if (!sSpellMgr->GetSpellInfo(spellId))
{
- LOG_ERROR("server", "Skill perfection data for spell %u has non-existent spell id in `skill_perfect_item_template`!", spellId);
+ LOG_ERROR("sql.sql", "Skill perfection data for spell %u has non-existent spell id in `skill_perfect_item_template`!", spellId);
continue;
}
uint32 requiredSpecialization = fields[1].GetUInt32();
if (!sSpellMgr->GetSpellInfo(requiredSpecialization))
{
- LOG_ERROR("server", "Skill perfection data for spell %u has non-existent required specialization spell id %u in `skill_perfect_item_template`!", spellId, requiredSpecialization);
+ LOG_ERROR("sql.sql", "Skill perfection data for spell %u has non-existent required specialization spell id %u in `skill_perfect_item_template`!", spellId, requiredSpecialization);
continue;
}
float perfectCreateChance = fields[2].GetFloat();
if (perfectCreateChance <= 0.0f)
{
- LOG_ERROR("server", "Skill perfection data for spell %u has impossibly low proc chance in `skill_perfect_item_template`!", spellId);
+ LOG_ERROR("sql.sql", "Skill perfection data for spell %u has impossibly low proc chance in `skill_perfect_item_template`!", spellId);
continue;
}
uint32 perfectItemType = fields[3].GetUInt32();
if (!sObjectMgr->GetItemTemplate(perfectItemType))
{
- LOG_ERROR("server", "Skill perfection data for spell %u references non-existent perfect item id %u in `skill_perfect_item_template`!", spellId, perfectItemType);
+ LOG_ERROR("sql.sql", "Skill perfection data for spell %u references non-existent perfect item id %u in `skill_perfect_item_template`!", spellId, perfectItemType);
continue;
}
@@ -97,8 +97,8 @@ void LoadSkillPerfectItemTable()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell perfection definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell perfection definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
struct SkillExtraItemEntry
@@ -134,8 +134,8 @@ void LoadSkillExtraItemTable()
if (!result)
{
- LOG_ERROR("sql.sql", ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell specialization definitions. DB table `skill_extra_item_template` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -149,28 +149,28 @@ void LoadSkillExtraItemTable()
if (!sSpellMgr->GetSpellInfo(spellId))
{
- LOG_ERROR("server", "Skill specialization %u has non-existent spell id in `skill_extra_item_template`!", spellId);
+ 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))
{
- LOG_ERROR("server", "Skill specialization %u have not existed required specialization spell id %u in `skill_extra_item_template`!", spellId, requiredSpecialization);
+ 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)
{
- LOG_ERROR("server", "Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId);
+ LOG_ERROR("sql.sql", "Skill specialization %u has too low additional create chance in `skill_extra_item_template`!", spellId);
continue;
}
int32 newMaxOrEntry = fields[3].GetInt32();
if (!newMaxOrEntry)
{
- LOG_ERROR("server", "Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId);
+ LOG_ERROR("sql.sql", "Skill specialization %u has 0 max number of extra items in `skill_extra_item_template`!", spellId);
continue;
}
@@ -183,8 +183,8 @@ void LoadSkillExtraItemTable()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell specialization definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool CanCreatePerfectItem(Player* player, uint32 spellId, float& perfectCreateChance, uint32& perfectItemType)
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 32039ae6ea..acf014b874 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -944,7 +944,7 @@ void AuraEffect::UpdatePeriodic(Unit* caster)
if (aurEff->GetAuraType() != SPELL_AURA_MOD_POWER_REGEN)
{
m_isPeriodic = false;
- LOG_ERROR("server", "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
+ LOG_ERROR("spells.aura.effect", "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
}
else
{
@@ -1880,7 +1880,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
case FORM_SPIRITOFREDEMPTION: // 0x20
break;
default:
- LOG_ERROR("server", "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
+ LOG_ERROR("spells.aura.effect", "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
}
modelid = target->GetModelForForm(form);
@@ -2264,7 +2264,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode,
if (!ci)
{
target->SetDisplayId(16358); // pig pink ^_^
- LOG_ERROR("server", "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId());
+ LOG_ERROR("spells.aura.effect", "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId());
}
else
{
@@ -4004,7 +4004,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo
if (GetMiscValue() < -2 || GetMiscValue() > 4)
{
- LOG_ERROR("server", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
+ LOG_ERROR("spells.aura.effect", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
return;
}
@@ -4030,7 +4030,7 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode,
if (GetMiscValue() < -1 || GetMiscValue() > 4)
{
- LOG_ERROR("server", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
+ LOG_ERROR("spells.aura.effect", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
return;
}
@@ -4128,7 +4128,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8
if (GetMiscValue() < -1 || GetMiscValue() > 4)
{
- LOG_ERROR("server", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
+ LOG_ERROR("spells.aura.effect", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
return;
}
@@ -4191,7 +4191,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.
- LOG_ERROR("server", "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
+ LOG_ERROR("spells.aura.effect", "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
return;
}
@@ -6142,9 +6142,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
triggerFlags = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST);
triggerCaster->CastSpell(targets, triggeredSpellInfo, nullptr, triggerFlags, nullptr, this);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
-#endif
}
}
}
@@ -6168,9 +6166,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
values.AddSpellMod(SPELLVALUE_BASE_POINT0, GetAmount());
triggerCaster->CastSpell(targets, triggeredSpellInfo, &values, TRIGGERED_FULL_MASK, nullptr, this);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
-#endif
}
}
else
@@ -6180,9 +6176,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
if (c && caster)
sEluna->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), target->ToCreature());
#endif
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
-#endif
}
}
@@ -6300,10 +6294,8 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
Unit::CalcAbsorbResist(caster, target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, GetSpellInfo());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u",
+ LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u",
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId(), absorb);
-#endif
Unit::DealDamageMods(target, damage, &absorb);
// Auras reducing damage from AOE spells
@@ -6396,10 +6388,8 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
if (target->GetHealth() < damage)
damage = target->GetHealth();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u",
+ LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u",
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId(), absorb);
-#endif
if (caster)
caster->SendSpellNonMeleeDamageLog(target, GetId(), damage + absorb + resist, GetSpellInfo()->GetSchoolMask(), absorb, resist, false, 0, crit);
@@ -6440,9 +6430,7 @@ void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster)
return;
caster->ModifyHealth(-(int32)damage);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "PeriodicTick: donator %u target %u damage %u.", caster->GetEntry(), target->GetEntry(), damage);
-#endif
float gainMultiplier = GetSpellInfo()->Effects[GetEffIndex()].CalcValueMultiplier(caster);
@@ -6543,10 +6531,8 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
if ((crit = roll_chance_f(GetCritChance())))
damage = Unit::SpellCriticalHealingBonus(caster, GetSpellInfo(), damage, target);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PeriodicTick: %s heal of %s for %u health inflicted by %u",
+ LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s heal of %s for %u health inflicted by %u",
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId());
-#endif
uint32 absorb = 0;
uint32 heal = uint32(damage);
@@ -6625,10 +6611,8 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
drainAmount = maxmana;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PeriodicTick: %s power leech of %s for %u dmg inflicted by %u",
+ LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s power leech of %s for %u dmg inflicted by %u",
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), drainAmount, GetId());
-#endif
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
if (PowerType == POWER_MANA)
drainAmount -= target->GetSpellCritDamageReduction(drainAmount);
@@ -6692,10 +6676,8 @@ 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;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
+ LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), amount, GetId());
-#endif
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
target->SendPeriodicAuraLog(&pInfo);
@@ -6731,10 +6713,8 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
target->SendPeriodicAuraLog(&pInfo);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
+ LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), amount, GetId());
-#endif
int32 gain = target->ModifyPower(PowerType, amount);
if (caster)
@@ -6794,16 +6774,12 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
uint32 triggerSpellId = GetSpellInfo()->Effects[GetEffIndex()].TriggerSpell;
if (SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggerSpellId))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
-#endif
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, nullptr, this);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
-#endif
}
}
@@ -6819,16 +6795,12 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
(void)triggeredSpellInfo;
int32 basepoints0 = GetAmount();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());
-#endif
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, nullptr, nullptr, true, nullptr, this);
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
-#endif
}
}
@@ -6842,9 +6814,7 @@ void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEv
target->CalculateSpellDamageTaken(&damageInfo, damage, GetSpellInfo());
Unit::DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
target->SendSpellNonMeleeDamageLog(&damageInfo);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerDamageAuraProc: Triggering %u spell damage from aura %u proc", damage, GetId());
-#endif
target->DealSpellDamage(&damageInfo, true);
}
@@ -6866,9 +6836,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
triggerSpellId = 43594;
break;
default:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeAuraProc: received not handled spell: %u", GetId());
-#endif
return;
}
@@ -6894,9 +6862,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
-#endif
target->CastSpell(target, triggerSpellId, true, nullptr, this, GetCasterGUID());
}
@@ -6907,9 +6873,7 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
// Currently only Prayer of Mending
if (!(GetSpellInfo()->SpellFamilyName == SPELLFAMILY_PRIEST && GetSpellInfo()->SpellFamilyFlags[1] & 0x20))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: received not handled spell: %u", GetId());
-#endif
return;
}
uint32 triggerSpellId = 33110;
@@ -6938,8 +6902,6 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
}
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
-#endif
target->CastCustomSpell(target, triggerSpellId, &value, nullptr, nullptr, true, nullptr, this, GetCasterGUID());
}
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 8c3529668f..150d89ee3d 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -65,15 +65,11 @@ AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 e
_slot = slot;
GetTarget()->SetVisibleAura(slot, this);
SetNeedClientUpdate();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
-#endif
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_ERROR("server", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
-#endif
+ LOG_ERROR("spells.aura", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
}
}
_InitFlags(caster, effMask);
@@ -152,9 +148,7 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
ASSERT(aurEff);
ASSERT(HasEffect(effIndex) == (!apply));
ASSERT((1 << effIndex) & _effectsToApply);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
-#endif
if (apply)
{
@@ -504,7 +498,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication* auraAp
// TODO: Figure out why this happens
if (itr == m_applications.end())
{
- LOG_ERROR("server", "Aura::_UnapplyForTarget, target:%s, caster:%s, spell:%u was not found in owners application map!",
+ LOG_ERROR("spells.aura", "Aura::_UnapplyForTarget, target:%s, caster:%s, spell:%u was not found in owners application map!",
target->GetGUID().ToString().c_str(), caster ? caster->GetGUID().ToString().c_str() : "", auraApp->GetBase()->GetSpellInfo()->Id);
ABORT();
}
@@ -670,7 +664,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
if (!GetOwner()->IsSelfOrInSameMap(itr->first))
{
//TODO: There is a crash caused by shadowfiend load addon
- LOG_FATAL("server", "Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
+ LOG_FATAL("spells.aura", "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));
ABORT();
@@ -1352,7 +1346,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
spellId = 57531;
break;
default:
- LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
+ LOG_ERROR("spells.aura", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
}
if (spellId)
caster->CastSpell(caster, spellId, true);
@@ -1477,7 +1471,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
spellId = 50508;
break;
default:
- LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
+ LOG_ERROR("spells.aura", "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
}
caster->CastSpell(target, spellId, true, 0, GetEffect(0));
}
@@ -1593,7 +1587,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
spellId = 60946;
break;
default:
- LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
+ LOG_ERROR("spells.aura", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
}
if (spellId)
caster->CastSpell(target, spellId, true);
@@ -2228,9 +2222,7 @@ void Aura::LoadScripts()
m_loadedScripts.erase(bitr);
continue;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
-#endif
(*itr)->Register();
++itr;
}
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 47e5aecfba..0d2f4da884 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -509,25 +509,25 @@ void SpellCastTargets::Update(Unit* caster)
void SpellCastTargets::OutDebug() const
{
if (!m_targetMask)
- LOG_INFO("server", "No targets");
+ LOG_INFO("spells", "No targets");
- LOG_INFO("server", "target mask: %u", m_targetMask);
+ LOG_INFO("spells", "target mask: %u", m_targetMask);
if (m_targetMask & (TARGET_FLAG_UNIT_MASK | TARGET_FLAG_CORPSE_MASK | TARGET_FLAG_GAMEOBJECT_MASK))
- LOG_INFO("server", "Object target: %s", m_objectTargetGUID.ToString().c_str());
+ LOG_INFO("spells", "Object target: %s", m_objectTargetGUID.ToString().c_str());
if (m_targetMask & TARGET_FLAG_ITEM)
- LOG_INFO("server", "Item target: %s", m_itemTargetGUID.ToString().c_str());
+ LOG_INFO("spells", "Item target: %s", m_itemTargetGUID.ToString().c_str());
if (m_targetMask & TARGET_FLAG_TRADE_ITEM)
- LOG_INFO("server", "Trade item target: %s", m_itemTargetGUID.ToString().c_str());
+ LOG_INFO("spells", "Trade item target: %s", m_itemTargetGUID.ToString().c_str());
if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION)
- LOG_INFO("server", "Source location: transport guid: %s trans offset: %s position: %s",
+ LOG_INFO("spells", "Source location: transport guid: %s trans offset: %s position: %s",
m_src._transportGUID.ToString().c_str(), m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str());
if (m_targetMask & TARGET_FLAG_DEST_LOCATION)
- LOG_INFO("server", "Destination location: transport guid: %s trans offset: %s position: %s",
+ LOG_INFO("spells", "Destination location: transport guid: %s trans offset: %s position: %s",
m_dst._transportGUID.ToString().c_str(), m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str());
if (m_targetMask & TARGET_FLAG_STRING)
- LOG_INFO("server", "String: %s", m_strTarget.c_str());
- LOG_INFO("server", "speed: %f", m_speed);
- LOG_INFO("server", "elevation: %f", m_elevation);
+ LOG_INFO("spells", "String: %s", m_strTarget.c_str());
+ LOG_INFO("spells", "speed: %f", m_speed);
+ LOG_INFO("spells", "elevation: %f", m_elevation);
}
SpellValue::SpellValue(SpellInfo const* proto)
@@ -675,7 +675,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.
- LOG_ERROR("server", "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
+ LOG_ERROR("spells", "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
*m_selfContainer = nullptr;
}
@@ -979,9 +979,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
}
break;
case TARGET_SELECT_CATEGORY_NYI:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, effIndex, targetType.GetTarget());
-#endif
break;
default:
ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target category");
@@ -1012,9 +1010,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
-#endif
}
break;
}
@@ -1034,9 +1030,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
}
else //if (!m_targets.HasDst())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SPELL: cannot find channel spell destination for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
-#endif
}
break;
case TARGET_DEST_CHANNEL_CASTER:
@@ -1083,9 +1077,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()))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
-#endif
switch (targetType.GetObjectType())
{
case TARGET_OBJECT_TYPE_GOBJ:
@@ -1112,9 +1104,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
WorldObject* target = SearchNearbyTarget(range, targetType.GetObjectType(), targetType.GetCheckType(), condList);
if (!target)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
-#endif
return;
}
@@ -1317,9 +1307,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
-#endif
if (WorldObject* target = m_targets.GetObjectTarget())
dest = SpellDestination(*target);
}
@@ -1637,7 +1625,8 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d);
if (a > -0.0001f)
a = 0;
- DEBUG_TRAJ(LOG_ERROR("server", "Spell::SelectTrajTargets: a %f b %f", a, b);)
+
+ LOG_ERROR("spells", "Spell::SelectTrajTargets: a %f b %f", a, b);
// Xinef: hack for distance, many trajectory spells have RangeEntry 1 (self)
float bestDist = m_spellInfo->GetMaxRange(false) * 2;
@@ -1656,11 +1645,14 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
const float objDist2d = fabs(m_targets.GetSrcPos()->GetExactDist2d(*itr) * cos(m_targets.GetSrcPos()->GetRelativeAngle(*itr)));
const float dz = fabs((*itr)->GetPositionZ() - m_targets.GetSrcPos()->m_positionZ);
- DEBUG_TRAJ(LOG_ERROR("server", "Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);)
+ 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(LOG_ERROR("server", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)
+
+ 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;
@@ -1668,7 +1660,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
}
#define CHECK_DIST {\
- DEBUG_TRAJ(LOG_ERROR("server", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
+ LOG_ERROR("spells", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);\
if (dist > bestDist)\
continue;\
if (dist < objDist2d + size && dist > objDist2d - size)\
@@ -1744,7 +1736,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
float distSq = (*itr)->GetExactDistSq(x, y, z);
float sizeSq = (*itr)->GetObjectSize();
sizeSq *= sizeSq;
- DEBUG_TRAJ(LOG_ERROR("server", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
+ LOG_ERROR("spells", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);
if (distSq > sizeSq)
{
float factor = 1 - sqrt(sizeSq / distSq);
@@ -1753,7 +1745,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
z += factor * ((*itr)->GetPositionZ() - z);
distSq = (*itr)->GetExactDistSq(x, y, z);
- DEBUG_TRAJ(LOG_ERROR("server", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
+ LOG_ERROR("spells", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);
}
}
@@ -2987,9 +2979,7 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
if (CanExecuteTriggersOnHit(effMask, i->triggeredByAura) && roll_chance_i(i->chance))
{
m_caster->CastSpell(unit, i->triggeredSpell, true);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->triggeredSpell->Id);
-#endif
// SPELL_AURA_ADD_TARGET_TRIGGER auras shouldn't trigger auras without duration
// set duration of current aura to the triggered spell
@@ -3338,9 +3328,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
// set timer base at cast time
ReSetTimer();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "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());
-#endif
//Containers for channeled spells have to be set
//TODO:Apply this to all casted spells if needed
@@ -3942,9 +3930,7 @@ void Spell::update(uint32 difftime)
if (m_targets.GetUnitTargetGUID() && !m_targets.GetUnitTarget())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell %u is cancelled due to removal of target.", m_spellInfo->Id);
-#endif
cancel();
return;
}
@@ -4002,9 +3988,7 @@ void Spell::update(uint32 difftime)
// Xinef: so the aura can be removed in different updates for all units
else if ((m_timer < 0 || m_timer > 300) && !UpdateChanneledTargetList())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id);
-#endif
SendChannelUpdate(0);
finish();
}
@@ -4068,9 +4052,7 @@ void Spell::finish(bool ok)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell);
if (spellInfo && spellInfo->SpellIconID == 2056)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Statue %s is unsummoned in spell %d finish", m_caster->GetGUID().ToString().c_str(), m_spellInfo->Id);
-#endif
m_caster->setDeathState(JUST_DIED);
return;
}
@@ -4761,7 +4743,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
- LOG_ERROR("server", "Cast item has no item prototype %s", m_CastItem->GetGUID().ToString().c_str());
+ LOG_ERROR("spells", "Cast item has no item prototype %s", m_CastItem->GetGUID().ToString().c_str());
return;
}
@@ -4857,7 +4839,7 @@ void Spell::TakePower()
if (PowerType >= MAX_POWERS)
{
- LOG_ERROR("server", "Spell::TakePower: Unknown power type '%d'", PowerType);
+ LOG_ERROR("spells", "Spell::TakePower: Unknown power type '%d'", PowerType);
return;
}
@@ -5116,9 +5098,7 @@ void Spell::HandleThreatSpells()
else if (!m_spellInfo->_IsPositiveSpell() && !IsFriendly && target->CanHaveThreatList())
target->AddThreat(m_caster, threatToAdd, m_spellInfo->GetSchoolMask(), m_spellInfo);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "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()));
-#endif
}
void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOTarget, uint32 i, SpellEffectHandleMode mode)
@@ -5131,9 +5111,7 @@ void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOT
uint8 eff = m_spellInfo->Effects[i].Effect;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell: %u Effect : %u", m_spellInfo->Id, eff);
-#endif
// we do not need DamageMultiplier here.
damage = CalculateSpellDamage(i, nullptr);
@@ -6508,7 +6486,7 @@ SpellCastResult Spell::CheckPower()
// Check valid power type
if (m_spellInfo->PowerType >= MAX_POWERS)
{
- LOG_ERROR("server", "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType);
+ LOG_ERROR("spells", "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType);
return SPELL_FAILED_UNKNOWN;
}
@@ -7145,9 +7123,7 @@ void Spell::Delayed() // only called in DealDamage()
else
m_timer += delaytime;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
-#endif
+ LOG_DEBUG("spells", "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
WorldPacket data(SMSG_SPELL_DELAYED, 8 + 4);
data << m_caster->GetPackGUID();
@@ -7185,9 +7161,7 @@ void Spell::DelayedChannel()
else
m_timer -= delaytime;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
-#endif
for (std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
if ((*ihit).missCondition == SPELL_MISS_NONE)
@@ -7443,7 +7417,7 @@ SpellEvent::~SpellEvent()
}
else
{
- LOG_ERROR("server", "~SpellEvent: %s %s tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
+ LOG_ERROR("spells", "~SpellEvent: %s %s tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
(m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUID().ToString().c_str(), m_Spell->m_spellInfo->Id);
ABORT();
}
@@ -7841,9 +7815,7 @@ void Spell::LoadScripts()
m_loadedScripts.erase(bitr);
continue;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell::LoadScripts: Script `%s` for spell `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
-#endif
(*itr)->Register();
++itr;
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 3dac35548d..4b066bfc0d 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -225,9 +225,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS] =
void Spell::EffectNULL(SpellEffIndex /*effIndex*/)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "WORLD: Spell Effect DUMMY");
-#endif
}
void Spell::EffectUnused(SpellEffIndex /*effIndex*/)
@@ -769,9 +767,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
}
// normal DB scripted effect
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
-#endif
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
#ifdef ELUNA
if (gameObjTarget)
@@ -917,9 +913,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id);
if (!spellInfo)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell::EffectTriggerSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
-#endif
return;
}
@@ -975,9 +969,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id);
if (!spellInfo)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell::EffectTriggerMissileSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
-#endif
return;
}
@@ -1033,7 +1025,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
if (!spellInfo)
{
- LOG_ERROR("server", "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
+ LOG_ERROR("spells.effect", "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
return;
}
@@ -1082,7 +1074,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
if (!spellInfo)
{
- LOG_ERROR("server", "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
+ LOG_ERROR("spells.effect", "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
return;
}
@@ -1207,7 +1199,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
// If not exist data for dest location - return
if (!m_targets.HasDst())
{
- LOG_ERROR("server", "Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id);
+ LOG_ERROR("spells.effect", "Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id);
return;
}
@@ -1219,9 +1211,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
destTarget->GetPosition(x, y, z, orientation);
if (!orientation && m_targets.GetUnitTarget())
orientation = m_targets.GetUnitTarget()->GetOrientation();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
-#endif
if (mapid == unitTarget->GetMapId())
{
@@ -1239,7 +1229,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL : 0);
else
{
- LOG_ERROR("server", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
+ LOG_ERROR("spells.effect", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
return;
}
@@ -1374,10 +1364,8 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
uint32 spellToUnlearn = m_spellInfo->Effects[effIndex].TriggerSpell;
player->removeSpell(spellToUnlearn, SPEC_MASK_ALL, false);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell: Player %s has unlearned spell %u from Npc: %s",
player->GetGUID().ToString().c_str(), spellToUnlearn, m_caster->GetGUID().ToString().c_str());
-#endif
}
void Spell::EffectPowerDrain(SpellEffIndex effIndex)
@@ -1449,9 +1437,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
// TODO: there should be a possibility to pass dest target to event script
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->Effects[effIndex].MiscValue, m_spellInfo->Id);
-#endif
if (ZoneScript* zoneScript = m_caster->GetZoneScript())
zoneScript->ProcessEvent(target, m_spellInfo->Effects[effIndex].MiscValue);
@@ -1566,7 +1552,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
if (!targetAura)
{
- LOG_ERROR("server", "Target(%s) has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID().ToString().c_str());
+ LOG_ERROR("spells.effect", "Target(%s) has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID().ToString().c_str());
return;
}
@@ -1656,9 +1642,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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "HealthLeech :%i", damage);
-#endif
// xinef: handled in spell.cpp
//float healMultiplier = m_spellInfo->Effects[effIndex].CalcValueMultiplier(m_originalCaster, this);
@@ -2041,10 +2025,8 @@ void Spell::SendLoot(ObjectGuid guid, LootType loottype)
// Players shouldn't be able to loot gameobjects that are currently despawned
if (!gameObjTarget->isSpawned() && !player->IsGameMaster())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_ERROR("server", "Possible hacking attempt: Player %s [%s] tried to loot a gameobject [%s] which is on respawn time without being in GM mode!",
+ LOG_ERROR("spells.effect", "Possible hacking attempt: Player %s [%s] tried to loot a gameobject [%s] which is on respawn time without being in GM mode!",
player->GetName().c_str(), player->GetGUID().ToString().c_str(), gameObjTarget->GetGUID().ToString().c_str());
-#endif
return;
}
// special case, already has GossipHello inside so return and avoid calling twice
@@ -2105,9 +2087,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "WORLD: Open Lock - No Player Caster!");
-#endif
return;
}
@@ -2165,9 +2145,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "WORLD: Open Lock - No GameObject/Item Target!");
-#endif
return;
}
@@ -2353,7 +2331,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[effIndex].MiscValueB);
if (!properties)
{
- LOG_ERROR("server", "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
+ LOG_ERROR("spells.effect", "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
return;
}
@@ -2568,10 +2546,8 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex)
uint32 spellToLearn = (m_spellInfo->Id == 483 || m_spellInfo->Id == 55884) ? damage : m_spellInfo->Effects[effIndex].TriggerSpell;
player->learnSpell(spellToLearn);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell: Player %s has learned spell %u from Npc %s",
player->GetGUID().ToString().c_str(), spellToLearn, m_caster->GetGUID().ToString().c_str());
-#endif
}
typedef std::list<std::pair<uint32, ObjectGuid>> DispelList;
@@ -2814,10 +2790,8 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
if (m_CastItem)
{
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, damage / 10, false);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %s",
m_spellInfo->Id, damage / 10, m_CastItem->GetEntry(), unitTarget->ToPlayer()->GetGUID().ToString().c_str());
-#endif
return;
}
@@ -2826,19 +2800,15 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
{
uint32 honor_reward = Acore::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage));
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, honor_reward, false);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %s",
m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUID().ToString().c_str());
-#endif
}
else
{
//maybe we have correct honor_gain in damage already
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, damage, false);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %s",
m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUID().ToString().c_str());
-#endif
}
}
@@ -2941,7 +2911,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
}
if (!add_socket)
{
- LOG_ERROR("server", "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.",
+ LOG_ERROR("spells.effect", "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;
}
@@ -3015,14 +2985,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
spell_id = 36760;
break; // 20%
default:
- LOG_ERROR("server", "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
+ LOG_ERROR("spells.effect", "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
return;
}
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
if (!spellInfo)
{
- LOG_ERROR("server", "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
+ LOG_ERROR("spells.effect", "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
return;
}
@@ -3048,14 +3018,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
if (!enchant_id)
{
- LOG_ERROR("server", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex);
+ LOG_ERROR("spells.effect", "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)
{
- LOG_ERROR("server", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
+ LOG_ERROR("spells.effect", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
return;
}
@@ -4153,7 +4123,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
spell_heal = 48085;
break;
default:
- LOG_ERROR("server", "Unknown Lightwell spell caster %u", m_caster->GetEntry());
+ LOG_ERROR("spells.effect", "Unknown Lightwell spell caster %u", m_caster->GetEntry());
return;
}
@@ -4252,9 +4222,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
// normal DB scripted effect
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
-#endif
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
}
@@ -5615,9 +5583,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
ExecuteLogEffectSummonObject(effIndex, pGameObj);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "AddObject at SpellEfects.cpp EffectTransmitted");
-#endif
+ LOG_DEBUG("spells.effect", "AddObject at SpellEfects.cpp EffectTransmitted");
//m_caster->AddGameObject(pGameObj);
//m_ObjToDel.push_back(pGameObj);
@@ -5701,9 +5667,7 @@ void Spell::EffectSkill(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "WORLD: SkillEFFECT");
-#endif
}
/* There is currently no need for this effect. We handle it in Battleground.cpp
@@ -5734,9 +5698,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Effect: SkinPlayerCorpse");
-#endif
if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->IsAlive()))
return;
@@ -5748,9 +5710,7 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Effect: StealBeneficialBuff");
-#endif
if (!unitTarget || unitTarget == m_caster) // can't steal from self
return;
@@ -6227,7 +6187,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex)
if (!sSoundEntriesStore.LookupEntry(soundid))
{
- LOG_ERROR("server", "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
+ LOG_ERROR("spells.effect", "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
return;
}
@@ -6280,7 +6240,7 @@ void Spell::EffectPlaySound(SpellEffIndex effIndex)
if (!sSoundEntriesStore.LookupEntry(soundId))
{
- LOG_ERROR("server", "EffectPlayerSound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
+ LOG_ERROR("spells.effect", "EffectPlayerSound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
return;
}
@@ -6408,10 +6368,8 @@ void Spell::EffectBind(SpellEffIndex effIndex)
data << uint32(areaId);
player->SendDirectMessage(&data);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
homeLoc.GetPositionX(), homeLoc.GetPositionY(), homeLoc.GetPositionZ(), homeLoc.GetMapId(), areaId);
-#endif
// zone update
data.Initialize(SMSG_PLAYERBOUND, 8 + 4);
data << m_caster->GetGUID();
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 37f57bcd5c..251cb7330c 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1419,7 +1419,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
shapeInfo = sSpellShapeshiftStore.LookupEntry(form);
if (!shapeInfo)
{
- LOG_ERROR("server", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
+ LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
return SPELL_CAST_OK;
}
actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells
@@ -2347,7 +2347,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
// Else drain all power
if (PowerType < MAX_POWERS)
return caster->GetPower(Powers(PowerType));
- LOG_ERROR("server", "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
+ LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
return 0;
}
@@ -2373,12 +2373,10 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
break;
case POWER_RUNE:
case POWER_RUNIC_POWER:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "CalculateManaCost: Not implemented yet!");
-#endif
break;
default:
- LOG_ERROR("server", "CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id);
+ 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 1331890564..69b092d528 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -452,14 +452,14 @@ bool SpellMgr::CheckSpellValid(SpellInfo const* spellInfo, uint32 spellId, bool
if (!spellInfo)
{
DeleteSpellFromAllPlayers(spellId);
- LOG_ERROR("server", "Player::%s: Non-existed in SpellStore spell #%u request.", (isTalent ? "AddTalent" : "addSpell"), spellId);
+ LOG_ERROR("spells", "Player::%s: Non-existed in SpellStore spell #%u request.", (isTalent ? "AddTalent" : "addSpell"), spellId);
return false;
}
if (!IsSpellValid(spellInfo))
{
DeleteSpellFromAllPlayers(spellId);
- LOG_ERROR("server", "Player::%s: Broken spell #%u learning not allowed.", (isTalent ? "AddTalent" : "addSpell"), spellId);
+ LOG_ERROR("spells", "Player::%s: Broken spell #%u learning not allowed.", (isTalent ? "AddTalent" : "addSpell"), spellId);
return false;
}
@@ -488,7 +488,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
uint32 mode = uint32(caster->GetMap()->GetSpawnMode());
if (mode >= MAX_DIFFICULTY)
{
- LOG_ERROR("server", "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
+ LOG_ERROR("spells", "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
return spellId; //return source spell
}
@@ -499,17 +499,13 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
SpellDifficultyEntry const* difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId);
if (!difficultyEntry)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
-#endif
return spellId; //return source spell
}
if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is nullptr, using mode %u", spellId, mode, mode - 2);
-#endif
mode -= 2;
}
@@ -519,9 +515,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
return spellId;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]);
-#endif
return uint32(difficultyEntry->SpellID[mode]);
}
@@ -531,15 +525,11 @@ SpellInfo const* SpellMgr::GetSpellForDifficultyFromSpell(SpellInfo const* spell
SpellInfo const* newSpell = GetSpellInfo(newSpellId);
if (!newSpell)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellForDifficultyFromSpell: spell %u not found. Check spelldifficulty_dbc!", newSpellId);
-#endif
return spell;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellForDifficultyFromSpell: Spell id for instance mode is %u (original %u)", newSpell->Id, spell->Id);
-#endif
return newSpell;
}
@@ -1266,8 +1256,8 @@ void SpellMgr::LoadSpellRanks()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1361,8 +1351,8 @@ void SpellMgr::LoadSpellRanks()
} while (true);
} while (!finished);
- LOG_INFO("server", ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellRequired()
@@ -1377,8 +1367,8 @@ void SpellMgr::LoadSpellRequired()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1426,8 +1416,8 @@ void SpellMgr::LoadSpellRequired()
mTalentSpellAdditionalSet.insert(spellId);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellLearnSkills()
@@ -1464,8 +1454,8 @@ void SpellMgr::LoadSpellLearnSkills()
}
}
- LOG_INFO("server", ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellTargetPositions()
@@ -1479,8 +1469,8 @@ void SpellMgr::LoadSpellTargetPositions()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1565,14 +1555,12 @@ void SpellMgr::LoadSpellTargetPositions()
if (found)
{
if (!sSpellMgr->GetSpellTargetPosition(i))
- #if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("spells.aura", "Spell (ID: %u) does not have record in `spell_target_position`", i);
- #endif
}
}*/
- LOG_INFO("server", ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellGroups()
@@ -1585,8 +1573,8 @@ void SpellMgr::LoadSpellGroups()
QueryResult result = WorldDatabase.Query("SELECT id, spell_id, special_flag FROM spell_group");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1631,8 +1619,8 @@ void SpellMgr::LoadSpellGroups()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellGroupStackRules()
@@ -1645,8 +1633,8 @@ void SpellMgr::LoadSpellGroupStackRules()
QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1682,8 +1670,8 @@ void SpellMgr::LoadSpellGroupStackRules()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellProcEvents()
@@ -1696,7 +1684,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)
{
- LOG_INFO("server", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
return;
}
@@ -1769,8 +1757,8 @@ void SpellMgr::LoadSpellProcEvents()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellProcs()
@@ -1783,8 +1771,8 @@ 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)
{
- LOG_INFO("server", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1907,8 +1895,8 @@ void SpellMgr::LoadSpellProcs()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellBonusess()
@@ -1921,8 +1909,8 @@ void SpellMgr::LoadSpellBonusess()
QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1948,8 +1936,8 @@ void SpellMgr::LoadSpellBonusess()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellThreats()
@@ -1962,8 +1950,8 @@ void SpellMgr::LoadSpellThreats()
QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -1989,8 +1977,8 @@ void SpellMgr::LoadSpellThreats()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellMixology()
@@ -2003,8 +1991,8 @@ void SpellMgr::LoadSpellMixology()
QueryResult result = WorldDatabase.Query("SELECT entry, pctMod FROM spell_mixology");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2025,8 +2013,8 @@ void SpellMgr::LoadSpellMixology()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Mixology bonuses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Mixology bonuses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSkillLineAbilityMap()
@@ -2047,8 +2035,8 @@ void SpellMgr::LoadSkillLineAbilityMap()
++count;
}
- LOG_INFO("server", ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellPetAuras()
@@ -2061,8 +2049,8 @@ void SpellMgr::LoadSpellPetAuras()
QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2091,7 +2079,7 @@ void SpellMgr::LoadSpellPetAuras()
(spellInfo->Effects[eff].Effect != SPELL_EFFECT_APPLY_AURA ||
spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_DUMMY))
{
- LOG_ERROR("server", "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
+ LOG_ERROR("spells", "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
continue;
}
@@ -2109,8 +2097,8 @@ void SpellMgr::LoadSpellPetAuras()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
// Fill custom data about enchancments
@@ -2151,8 +2139,8 @@ void SpellMgr::LoadEnchantCustomAttr()
}
}
- LOG_INFO("server", ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellEnchantProcData()
@@ -2165,8 +2153,8 @@ void SpellMgr::LoadSpellEnchantProcData()
QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2195,8 +2183,8 @@ void SpellMgr::LoadSpellEnchantProcData()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellLinked()
@@ -2209,8 +2197,8 @@ void SpellMgr::LoadSpellLinked()
QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2248,8 +2236,8 @@ void SpellMgr::LoadSpellLinked()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadPetLevelupSpellMap()
@@ -2305,8 +2293,8 @@ void SpellMgr::LoadPetLevelupSpellMap()
}
}
- LOG_INFO("server", ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells)
@@ -2389,10 +2377,10 @@ void SpellMgr::LoadPetDefaultSpells()
}
}
- LOG_INFO("server", ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
- LOG_INFO("server", "Loading summonable creature templates...");
+ LOG_INFO("server.loading", "Loading summonable creature templates...");
oldMSTime = getMSTime();
// different summon spells
@@ -2433,8 +2421,8 @@ void SpellMgr::LoadPetDefaultSpells()
}
}
- LOG_INFO("server", ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellAreas()
@@ -2451,8 +2439,8 @@ void SpellMgr::LoadSpellAreas()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -2624,28 +2612,28 @@ void SpellMgr::LoadSpellAreas()
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE) > 0)
{
- LOG_INFO("server", ">> Using ICC buff Horde: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE));
+ LOG_INFO("server.loading", ">> Using ICC buff Horde: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE));
SpellArea spellAreaICCBuffHorde = { sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE), ICC_AREA, 0, 0, 0, ICC_RACEMASK_HORDE, Gender(2), 64, 11, 1 };
SpellArea const* saICCBuffHorde = &mSpellAreaMap.insert(SpellAreaMap::value_type(sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE), spellAreaICCBuffHorde))->second;
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(ICC_AREA, saICCBuffHorde));
++count;
}
else
- LOG_INFO("server", ">> ICC buff Horde: disabled");
+ LOG_INFO("server.loading", ">> ICC buff Horde: disabled");
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE) > 0)
{
- LOG_INFO("server", ">> Using ICC buff Alliance: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE));
+ LOG_INFO("server.loading", ">> Using ICC buff Alliance: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE));
SpellArea spellAreaICCBuffAlliance = { sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE), ICC_AREA, 0, 0, 0, ICC_RACEMASK_ALLIANCE, Gender(2), 64, 11, 1 };
SpellArea const* saICCBuffAlliance = &mSpellAreaMap.insert(SpellAreaMap::value_type(sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE), spellAreaICCBuffAlliance))->second;
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(ICC_AREA, saICCBuffAlliance));
++count;
}
else
- LOG_INFO("server", ">> ICC buff Alliance: disabled");
+ LOG_INFO("server.loading", ">> ICC buff Alliance: disabled");
- LOG_INFO("server", ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellInfoStore()
@@ -2661,8 +2649,8 @@ void SpellMgr::LoadSpellInfoStore()
mSpellInfoMap[i] = new SpellInfo(spellEntry);
}
- LOG_INFO("server", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::UnloadSpellInfoStore()
@@ -2698,8 +2686,8 @@ void SpellMgr::LoadSpellSpecificAndAuraState()
spellInfo->_auraState = spellInfo->LoadAuraState();
}
- LOG_INFO("server", ">> Loaded spell specific and aura state in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded spell specific and aura state in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SpellMgr::LoadSpellCustomAttr()
@@ -2711,7 +2699,7 @@ void SpellMgr::LoadSpellCustomAttr()
QueryResult result = WorldDatabase.Query("SELECT spell_id, attributes FROM spell_custom_attr");
if (!result)
- LOG_INFO("server", ">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
+ LOG_INFO("server.loading", ">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
else
{
for (count = 0; result->NextRow(); ++count)
@@ -2724,7 +2712,7 @@ void SpellMgr::LoadSpellCustomAttr()
SpellInfo* spellInfo = _GetSpellInfo(spellId);
if (!spellInfo)
{
- LOG_INFO("server", "Table `spell_custom_attr` has wrong spell (spell_id: %u), ignored.", spellId);
+ LOG_INFO("spells", "Table `spell_custom_attr` has wrong spell (spell_id: %u), ignored.", spellId);
continue;
}
@@ -2760,7 +2748,7 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->AttributesCu |= attributes;
}
- LOG_INFO("server", ">> Loaded %u spell custom attributes from DB in %u ms", count, GetMSTimeDiffToNow(customAttrTime));
+ LOG_INFO("server.loading", ">> Loaded %u spell custom attributes from DB in %u ms", count, GetMSTimeDiffToNow(customAttrTime));
}
// xinef: create talent spells set
@@ -3295,8 +3283,8 @@ void SpellMgr::LoadSpellCustomAttr()
CreatureAI::FillAISpellInfo();
- LOG_INFO("server", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
inline void ApplySpellFix(std::initializer_list<uint32> spellIds, void(*fix)(SpellEntry*))
@@ -7447,6 +7435,6 @@ void SpellMgr::LoadDbcDataCorrections()
LockEntry* key = const_cast<LockEntry*>(sLockStore.LookupEntry(36)); // 3366 Opening, allows to open without proper key
key->Type[2] = LOCK_KEY_NONE;
- LOG_INFO("server", ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 79f1701dfc..41fafe4d1a 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -296,31 +296,31 @@ bool SpellScript::_Validate(SpellInfo const* entry)
{
for (std::list<EffectHandler>::iterator itr = OnEffectLaunch.begin(); itr != OnEffectLaunch.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectHandler>::iterator itr = OnEffectLaunchTarget.begin(); itr != OnEffectLaunchTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectHandler>::iterator itr = OnEffectHit.begin(); itr != OnEffectHit.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectHandler>::iterator itr = OnEffectHitTarget.begin(); itr != OnEffectHitTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<ObjectAreaTargetSelectHandler>::iterator itr = OnObjectAreaTargetSelect.begin(); itr != OnObjectAreaTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<ObjectTargetSelectHandler>::iterator itr = OnObjectTargetSelect.begin(); itr != OnObjectTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<DestinationTargetSelectHandler>::iterator itr = OnDestinationTargetSelect.begin(); itr != OnDestinationTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnDestinationTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ LOG_ERROR("spells.scripts", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnDestinationTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
return _SpellScript::_Validate(entry);
}
@@ -428,7 +428,7 @@ Unit* SpellScript::GetHitUnit()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->unitTarget;
@@ -438,7 +438,7 @@ Creature* SpellScript::GetHitCreature()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
if (m_spell->unitTarget)
@@ -451,7 +451,7 @@ Player* SpellScript::GetHitPlayer()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
if (m_spell->unitTarget)
@@ -464,7 +464,7 @@ Item* SpellScript::GetHitItem()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->itemTarget;
@@ -474,7 +474,7 @@ GameObject* SpellScript::GetHitGObj()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->gameObjTarget;
@@ -484,7 +484,7 @@ WorldLocation* SpellScript::GetHitDest()
{
if (!IsInEffectHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->destTarget;
@@ -494,7 +494,7 @@ int32 SpellScript::GetHitDamage()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: 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;
@@ -504,7 +504,7 @@ void SpellScript::SetHitDamage(int32 damage)
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: 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;
@@ -514,7 +514,7 @@ int32 SpellScript::GetHitHeal()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: 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;
@@ -524,7 +524,7 @@ void SpellScript::SetHitHeal(int32 heal)
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: 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;
@@ -534,7 +534,7 @@ Aura* SpellScript::GetHitAura()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
if (!m_spell->m_spellAura)
@@ -548,7 +548,7 @@ void SpellScript::PreventHitAura()
{
if (!IsInTargetHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: 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)
@@ -559,7 +559,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: 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;
@@ -570,7 +570,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: 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;
@@ -580,7 +580,7 @@ int32 SpellScript::GetEffectValue() const
{
if (!IsInEffectHook())
{
- LOG_ERROR("server", "Script: `%s` Spell: `%u`: function SpellScript::GetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->damage;
@@ -590,7 +590,7 @@ void SpellScript::SetEffectValue(int32 value)
{
if (!IsInEffectHook())
{
- LOG_ERROR("server", "Script: `%s` Spell: `%u`: function SpellScript::SetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->damage = value;
@@ -626,7 +626,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result)
{
if (!IsInCheckCastHook())
{
- LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
+ LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
@@ -642,95 +642,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))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<AuraDispelHandler>::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<AuraDispelHandler>::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectRemove.begin(); itr != OnEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectApply.begin(); itr != AfterEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectRemove.begin(); itr != AfterEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectPeriodicHandler>::iterator itr = OnEffectPeriodic.begin(); itr != OnEffectPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectUpdatePeriodicHandler>::iterator itr = OnEffectUpdatePeriodic.begin(); itr != OnEffectUpdatePeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectCalcAmountHandler>::iterator itr = DoEffectCalcAmount.begin(); itr != DoEffectCalcAmount.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectCalcPeriodicHandler>::iterator itr = DoEffectCalcPeriodic.begin(); itr != DoEffectCalcPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectCalcSpellModHandler>::iterator itr = DoEffectCalcSpellMod.begin(); itr != DoEffectCalcSpellMod.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectAbsorbHandler>::iterator itr = OnEffectAbsorb.begin(); itr != OnEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectAbsorbHandler>::iterator itr = AfterEffectAbsorb.begin(); itr != AfterEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectManaShieldHandler>::iterator itr = OnEffectManaShield.begin(); itr != OnEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectManaShieldHandler>::iterator itr = AfterEffectManaShield.begin(); itr != AfterEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.scripts", "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());
for (std::list<EffectSplitHandler>::iterator itr = OnEffectSplit.begin(); itr != OnEffectSplit.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.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())
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.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())
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.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())
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.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())
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.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))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.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))
- LOG_ERROR("server", "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());
+ LOG_ERROR("spells.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);
}
@@ -962,7 +962,7 @@ void AuraScript::PreventDefaultAction()
m_defaultActionPrevented = true;
break;
default:
- LOG_ERROR("server", "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);
+ LOG_ERROR("spells.scripts", "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);
break;
}
}
@@ -1149,7 +1149,7 @@ Unit* AuraScript::GetTarget() const
case AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC:
return m_auraApplication->GetTarget();
default:
- LOG_ERROR("server", "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);
+ LOG_ERROR("spells.scripts", "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);
}
return nullptr;
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 7714dbeb20..d96fa61db4 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -81,8 +81,8 @@ void CreatureTextMgr::LoadCreatureTexts()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 ceature texts. DB table `creature_texts` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 ceature texts. DB table `creature_texts` is empty.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -152,8 +152,8 @@ void CreatureTextMgr::LoadCreatureTexts()
++textCount;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u creature texts for %lu creatures in %u ms", textCount, mTextMap.size(), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u creature texts for %lu creatures in %u ms", textCount, mTextMap.size(), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void CreatureTextMgr::LoadCreatureTextLocales()
@@ -183,8 +183,8 @@ void CreatureTextMgr::LoadCreatureTextLocales()
ObjectMgr::AddLocaleString(fields[4].GetString(), locale, data.Text);
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u Creature Text Locale in %u ms", uint32(mLocaleTextMap.size()), GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u Creature Text Locale in %u ms", uint32(mLocaleTextMap.size()), GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget /*= nullptr*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, TeamId teamId /*= TEAM_NEUTRAL*/, bool gmOnly /*= false*/, Player* srcPlr /*= nullptr*/)
@@ -439,9 +439,7 @@ bool CreatureTextMgr::TextExist(uint32 sourceEntry, uint8 textGroup)
CreatureTextMap::const_iterator sList = mTextMap.find(sourceEntry);
if (sList == mTextMap.end())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "CreatureTextMgr::TextExist: Could not find Text for Creature (entry %u) in 'creature_text' table.", sourceEntry);
-#endif
return false;
}
@@ -449,9 +447,7 @@ bool CreatureTextMgr::TextExist(uint32 sourceEntry, uint8 textGroup)
CreatureTextHolder::const_iterator itr = textHolder.find(textGroup);
if (itr == textHolder.end())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("entities.unit", "CreatureTextMgr::TextExist: Could not find TextGroup %u for Creature (entry %u).", uint32(textGroup), sourceEntry);
-#endif
return false;
}
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index 5cd27278d2..3b51940d95 100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
@@ -292,7 +292,7 @@ void TicketMgr::LoadTickets()
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 GM tickets. DB table `gm_ticket` is empty!");
+ LOG_INFO("server.loading", ">> Loaded 0 GM tickets. DB table `gm_ticket` is empty!");
return;
}
@@ -319,8 +319,8 @@ void TicketMgr::LoadTickets()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void TicketMgr::LoadSurveys()
@@ -332,8 +332,8 @@ void TicketMgr::LoadSurveys()
if (QueryResult result = CharacterDatabase.Query("SELECT MAX(surveyId) FROM gm_survey"))
_lastSurveyId = (*result)[0].GetUInt32();
- LOG_INFO("server", ">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void TicketMgr::AddTicket(GmTicket* ticket)
diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
index 641ccc5244..e99c0ee860 100644
--- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp
+++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp
@@ -17,7 +17,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
if (!sWorld->getBoolConfig(CONFIG_CLEAN_CHARACTER_DB))
return;
- LOG_INFO("server", "Cleaning character database...");
+ LOG_INFO("misc", "Cleaning character database...");
uint32 oldMSTime = getMSTime();
@@ -51,8 +51,8 @@ void CharacterDatabaseCleaner::CleanDatabase()
sWorld->SetCleaningFlags(flags);
- LOG_INFO("server", ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32))
@@ -60,7 +60,7 @@ void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table
QueryResult result = CharacterDatabase.PQuery("SELECT DISTINCT %s FROM %s", column, table);
if (!result)
{
- LOG_INFO("server", "Table %s is empty.", table);
+ LOG_INFO("sql.sql", "Table %s is empty.", table);
return;
}
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index 274934d605..a065dc7eb1 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -327,7 +327,7 @@ bool PlayerDumpWriter::DumpTable(std::string& dump, uint32 guid, char const* tab
case DTT_CHARACTER:
{
if (result->GetFieldCount() <= 74) // avoid crashes on next check
- LOG_FATAL("server", "PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table.");
+ LOG_FATAL("entities.player.dump", "PlayerDumpWriter::DumpTable - Trying to access non-existing or wrong positioned field (`deleteInfos_Account`) in `characters` table.");
if (result->Fetch()[74].GetUInt32()) // characters.deleteInfos_Account - if filled error
return false;
@@ -503,7 +503,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
std::string tn = gettablename(line);
if (tn.empty())
{
- LOG_ERROR("server", "LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str());
+ LOG_ERROR("entities.player.dump", "LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str());
ROLLBACK(DUMP_FILE_BROKEN);
}
@@ -520,7 +520,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
if (i == DUMP_TABLE_COUNT)
{
- LOG_ERROR("server", "LoadPlayerDump: Unknown table: '%s'!", tn.c_str());
+ LOG_ERROR("entities.player.dump", "LoadPlayerDump: Unknown table: '%s'!", tn.c_str());
ROLLBACK(DUMP_FILE_BROKEN);
}
@@ -670,7 +670,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
break;
}
default:
- LOG_ERROR("server", "Unknown dump table type: %u", type);
+ LOG_ERROR("entities.player.dump", "Unknown dump table type: %u", type);
break;
}
diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp
index 0f3ebfbd0e..ab3f315f9f 100644
--- a/src/server/game/Warden/Warden.cpp
+++ b/src/server/game/Warden/Warden.cpp
@@ -37,9 +37,7 @@ Warden::~Warden()
void Warden::SendModuleToClient()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Send module to client");
-#endif
// Create packet structure
WardenModuleTransfer packet;
@@ -65,9 +63,7 @@ void Warden::SendModuleToClient()
void Warden::RequestModule()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request module");
-#endif
// Create packet structure
WardenModuleUse request;
@@ -138,16 +134,12 @@ bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 le
if (checksum != newChecksum)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "CHECKSUM IS NOT VALID");
-#endif
return false;
}
else
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "CHECKSUM IS VALID");
-#endif
return true;
}
}
@@ -320,9 +312,7 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
_warden->DecryptData(recvData.contents(), recvData.size());
uint8 opcode;
recvData >> opcode;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Got packet, opcode %02X, size %u", opcode, uint32(recvData.size()));
-#endif
recvData.hexlike();
switch (opcode)
@@ -337,23 +327,17 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
_warden->HandleData(recvData);
break;
case WARDEN_CMSG_MEM_CHECKS_RESULT:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "NYI WARDEN_CMSG_MEM_CHECKS_RESULT received!");
-#endif
break;
case WARDEN_CMSG_HASH_RESULT:
_warden->HandleHashResult(recvData);
_warden->InitializeModule();
break;
case WARDEN_CMSG_MODULE_FAILED:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "NYI WARDEN_CMSG_MODULE_FAILED received!");
-#endif
break;
default:
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Got unknown warden opcode %02X of size %u.", opcode, uint32(recvData.size() - 1));
-#endif
break;
}
}
diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp
index ed58770e70..8d7e123d18 100644
--- a/src/server/game/Warden/WardenCheckMgr.cpp
+++ b/src/server/game/Warden/WardenCheckMgr.cpp
@@ -30,8 +30,8 @@ void WardenCheckMgr::LoadWardenChecks()
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
- LOG_INFO("server", ">> Warden disabled, loading checks skipped.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Warden disabled, loading checks skipped.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -39,8 +39,8 @@ void WardenCheckMgr::LoadWardenChecks()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -63,7 +63,7 @@ void WardenCheckMgr::LoadWardenChecks()
if (checkType == LUA_EVAL_CHECK && id > 9999)
{
- LOG_ERROR("server", "sql.sql: Warden Lua check with id %u found in `warden_checks`. Lua checks may have four-digit IDs at most. Skipped.", id);
+ LOG_ERROR("warden", "sql.sql: Warden Lua check with id %u found in `warden_checks`. Lua checks may have four-digit IDs at most. Skipped.", id);
continue;
}
@@ -122,7 +122,7 @@ void WardenCheckMgr::LoadWardenChecks()
{
if (wardenCheck.Length > WARDEN_MAX_LUA_CHECK_LENGTH)
{
- LOG_ERROR("server", "sql.sql: Found over-long Lua check for Warden check with id %u in `warden_checks`. Max length is %u. Skipped.", id, WARDEN_MAX_LUA_CHECK_LENGTH);
+ LOG_ERROR("warden", "sql.sql: Found over-long Lua check for Warden check with id %u in `warden_checks`. Max length is %u. Skipped.", id, WARDEN_MAX_LUA_CHECK_LENGTH);
continue;
}
@@ -146,8 +146,8 @@ void WardenCheckMgr::LoadWardenChecks()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u warden checks.", count);
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u warden checks.", count);
+ LOG_INFO("server.loading", " ");
}
void WardenCheckMgr::LoadWardenOverrides()
@@ -155,8 +155,8 @@ void WardenCheckMgr::LoadWardenOverrides()
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
- LOG_INFO("server", ">> Warden disabled, loading check overrides skipped.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Warden disabled, loading check overrides skipped.");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -165,8 +165,8 @@ void WardenCheckMgr::LoadWardenOverrides()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -181,10 +181,10 @@ void WardenCheckMgr::LoadWardenOverrides()
// Check if action value is in range (0-2, see WardenActions enum)
if (action > WARDEN_ACTION_BAN)
- LOG_ERROR("server", "Warden check override action out of range (ID: %u, action: %u)", checkId, action);
+ 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())
- LOG_ERROR("server", "Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action);
+ LOG_ERROR("warden", "Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action);
else
{
CheckStore.at(checkId).Action = WardenActions(action);
@@ -192,8 +192,8 @@ void WardenCheckMgr::LoadWardenOverrides()
}
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u warden action overrides.", count);
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u warden action overrides.", count);
+ LOG_INFO("server.loading", " ");
}
WardenCheck const* WardenCheckMgr::GetWardenDataById(uint16 Id)
diff --git a/src/server/game/Warden/WardenMac.cpp b/src/server/game/Warden/WardenMac.cpp
index 7bbd134558..1df6d7ac9c 100644
--- a/src/server/game/Warden/WardenMac.cpp
+++ b/src/server/game/Warden/WardenMac.cpp
@@ -44,20 +44,16 @@ void WardenMac::Init(WorldSession* pClient, SessionKey const& K)
_inputCrypto.Init(_inputKey);
_outputCrypto.Init(_outputKey);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Server side warden for client %u initializing...", pClient->GetAccountId());
LOG_DEBUG("warden", "C->S Key: %s", Acore::Impl::ByteArrayToHexStr(_inputKey, 16).c_str());
LOG_DEBUG("warden", "S->C Key: %s", Acore::Impl::ByteArrayToHexStr(_outputKey, 16 ).c_str());
LOG_DEBUG("warden", " Seed: %s", Acore::Impl::ByteArrayToHexStr(_seed, 16).c_str());
LOG_DEBUG("warden", "Loading Module...");
-#endif
_module = GetModuleForClient();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Module Key: %s", Acore::Impl::ByteArrayToHexStr(_module->Key, 16).c_str());
LOG_DEBUG("warden", "Module ID: %s", Acore::Impl::ByteArrayToHexStr(_module->Id, 16).c_str());
-#endif
RequestModule();
}
@@ -84,16 +80,12 @@ ClientWardenModule* WardenMac::GetModuleForClient()
void WardenMac::InitializeModule()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Initialize module");
-#endif
}
void WardenMac::RequestHash()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request hash");
-#endif
// Create packet structure
WardenHashRequest Request;
@@ -161,16 +153,12 @@ void WardenMac::HandleHashResult(ByteBuffer& buff)
// Verify key
if (memcmp(buff.contents() + 1, sha1.GetDigest().data(), 20) != 0)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request hash reply: failed");
-#endif
ApplyPenalty(0, "Request hash reply: failed");
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request hash reply: succeed");
-#endif
// client 7F96EEFDA5B63D20A4DF8E00CBF48304
//const uint8 client_key[16] = { 0x7F, 0x96, 0xEE, 0xFD, 0xA5, 0xB6, 0x3D, 0x20, 0xA4, 0xDF, 0x8E, 0x00, 0xCB, 0xF4, 0x83, 0x04 };
@@ -190,9 +178,7 @@ void WardenMac::HandleHashResult(ByteBuffer& buff)
void WardenMac::RequestChecks()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request data");
-#endif
ByteBuffer buff;
buff << uint8(WARDEN_SMSG_CHEAT_CHECKS_REQUEST);
@@ -216,9 +202,7 @@ void WardenMac::RequestChecks()
void WardenMac::HandleData(ByteBuffer& buff)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Handle data");
-#endif
_dataSent = false;
_clientResponseTimer = 0;
@@ -251,9 +235,7 @@ void WardenMac::HandleData(ByteBuffer& buff)
if (sha1Hash != sha1.GetDigest())
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Handle data failed: SHA1 hash is wrong!");
-#endif
//found = true;
}
@@ -268,9 +250,7 @@ void WardenMac::HandleData(ByteBuffer& buff)
if (memcmp(ourMD5Hash, theirsMD5Hash, 16))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Handle data failed: MD5 hash is wrong!");
-#endif
//found = true;
}
diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp
index a94ecfa9a4..b47817e7e5 100644
--- a/src/server/game/Warden/WardenWin.cpp
+++ b/src/server/game/Warden/WardenWin.cpp
@@ -100,20 +100,16 @@ void WardenWin::Init(WorldSession* session, SessionKey const& k)
_inputCrypto.Init(_inputKey);
_outputCrypto.Init(_outputKey);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Server side warden for client %u initializing...", session->GetAccountId());
LOG_DEBUG("warden", "C->S Key: %s", Acore::Impl::ByteArrayToHexStr(_inputKey, 16).c_str());
LOG_DEBUG("warden", "S->C Key: %s", Acore::Impl::ByteArrayToHexStr(_outputKey,16).c_str());
LOG_DEBUG("warden", " Seed: %s", Acore::Impl::ByteArrayToHexStr(_seed, 16).c_str());
LOG_DEBUG("warden", "Loading Module...");
-#endif
_module = GetModuleForClient();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Module Key: %s", Acore::Impl::ByteArrayToHexStr(_module->Key, 16).c_str());
LOG_DEBUG("warden", "Module ID: %s", Acore::Impl::ByteArrayToHexStr(_module->Id, 16).c_str());
-#endif
RequestModule();
}
@@ -140,9 +136,7 @@ ClientWardenModule* WardenWin::GetModuleForClient()
void WardenWin::InitializeModule()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Initialize module");
-#endif
// Create packet structure
WardenInitModuleRequest Request;
@@ -199,9 +193,7 @@ void WardenWin::InitializeModule()
void WardenWin::RequestHash()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request hash");
-#endif
// Create packet structure
WardenHashRequest Request;
@@ -223,16 +215,12 @@ void WardenWin::HandleHashResult(ByteBuffer& buff)
// Verify key
if (memcmp(buff.contents() + 1, Module.ClientKeySeedHash, Acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES) != 0)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request hash reply: failed");
-#endif
ApplyPenalty(0, "Request hash reply: failed");
return;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request hash reply: succeed");
-#endif
// Change keys here
memcpy(_inputKey, Module.ClientKeySeed, 16);
@@ -246,9 +234,7 @@ void WardenWin::HandleHashResult(ByteBuffer& buff)
void WardenWin::RequestChecks()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Request data");
-#endif
// If all checks were done, fill the todo list again
for (uint8 i = 0; i < MAX_WARDEN_CHECK_TYPES; ++i)
@@ -443,7 +429,6 @@ void WardenWin::RequestChecks()
_dataSent = true;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
std::stringstream stream;
stream << "Sent check id's: ";
for (uint16 checkId : _CurrentChecks)
@@ -452,14 +437,11 @@ void WardenWin::RequestChecks()
}
LOG_DEBUG("warden", "%s", stream.str().c_str());
-#endif
}
void WardenWin::HandleData(ByteBuffer& buff)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "Handle data");
-#endif
_dataSent = false;
_clientResponseTimer = 0;
@@ -479,9 +461,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (!IsValidCheckSum(Checksum, buff.contents() + buff.rpos(), Length))
{
buff.rpos(buff.wpos());
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "CHECKSUM FAIL");
-#endif
ApplyPenalty(0, "Failed checksum in HandleData");
return;
}
@@ -493,9 +473,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
// TODO: test it.
if (result == 0x00)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "TIMING CHECK FAIL result 0x00");
-#endif
ApplyPenalty(0, "TIMING CHECK FAIL result");
return;
}
@@ -503,7 +481,6 @@ void WardenWin::HandleData(ByteBuffer& buff)
uint32 newClientTicks;
buff >> newClientTicks;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
uint32 ticksNow = World::GetGameTimeMS();
uint32 ourTicks = newClientTicks + (ticksNow - _serverTicks);
@@ -511,7 +488,6 @@ void WardenWin::HandleData(ByteBuffer& buff)
LOG_DEBUG("warden", "RequestTicks %u", _serverTicks); // At request
LOG_DEBUG("warden", "Ticks %u", newClientTicks); // At response
LOG_DEBUG("warden", "Ticks diff %u", ourTicks - newClientTicks);
-#endif
}
uint16 checkFailed = 0;
@@ -529,9 +505,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (Mem_Result != 0)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "RESULT MEM_CHECK not 0x00, CheckId %u account Id %u", checkId, _session->GetAccountId());
-#endif
checkFailed = checkId;
continue;
}
@@ -541,18 +515,14 @@ void WardenWin::HandleData(ByteBuffer& buff)
std::vector<uint8> result = rs->Result.ToByteVector(0, false);
if (memcmp(buff.contents() + buff.rpos(), result.data(), rd->Length) != 0)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "RESULT MEM_CHECK fail CheckId %u account Id %u", checkId, _session->GetAccountId());
-#endif
checkFailed = checkId;
buff.rpos(buff.rpos() + rd->Length);
continue;
}
buff.rpos(buff.rpos() + rd->Length);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "RESULT MEM_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
-#endif
break;
}
case PAGE_CHECK_A:
@@ -563,7 +533,6 @@ void WardenWin::HandleData(ByteBuffer& buff)
const uint8 byte = 0xE9;
if (memcmp(buff.contents() + buff.rpos(), &byte, sizeof(uint8)) != 0)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
LOG_DEBUG("warden", "RESULT PAGE_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
@@ -572,7 +541,6 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (type == DRIVER_CHECK)
LOG_DEBUG("warden", "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
-#endif
checkFailed = checkId;
buff.rpos(buff.rpos() + 1);
continue;
@@ -580,14 +548,12 @@ void WardenWin::HandleData(ByteBuffer& buff)
buff.rpos(buff.rpos() + 1);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
LOG_DEBUG("warden", "RESULT PAGE_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
else if (type == MODULE_CHECK)
LOG_DEBUG("warden", "RESULT MODULE_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
else if (type == DRIVER_CHECK)
LOG_DEBUG("warden", "RESULT DRIVER_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
-#endif
break;
}
case LUA_EVAL_CHECK:
@@ -598,9 +564,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
buff.read_skip(buff.read<uint8>()); // discard attached string
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "LUA_EVAL_CHECK CheckId %u account Id %u got in-warden dummy response", checkId, _session->GetAccountId()/* , result */);
-#endif
break;
}
case MPQ_CHECK:
@@ -610,9 +574,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (Mpq_Result != 0)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "RESULT MPQ_CHECK not 0x00 account id %u", _session->GetAccountId());
-#endif
checkFailed = checkId;
continue;
}
@@ -620,18 +582,14 @@ void WardenWin::HandleData(ByteBuffer& buff)
WardenCheckResult const* rs = sWardenCheckMgr->GetWardenResultById(checkId);
if (memcmp(buff.contents() + buff.rpos(), rs->Result.ToByteArray<20>(false).data(), Acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES) != 0) // SHA1
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "RESULT MPQ_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
-#endif
checkFailed = checkId;
buff.rpos(buff.rpos() + Acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES); // 20 bytes SHA1
continue;
}
buff.rpos(buff.rpos() + Acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES); // 20 bytes SHA1
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("warden", "RESULT MPQ_CHECK passed, CheckId %u account Id %u", checkId, _session->GetAccountId());
-#endif
break;
}
}
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp
index ad0df6282e..b972810b44 100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
@@ -23,9 +23,7 @@ Weather::Weather(uint32 zone, WeatherData const* weatherChances)
m_type = WEATHER_TYPE_FINE;
m_grade = 0;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE * IN_MILLISECONDS)));
-#endif
+ LOG_DEBUG("weather", "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE * IN_MILLISECONDS)));
}
/// Launch a weather update
@@ -84,10 +82,8 @@ bool Weather::ReGenerate()
localtime_r(&gtime, &ltime);
uint32 season = ((ltime.tm_yday - 78 + 365) / 91) % 4;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" };
- LOG_DEBUG("server", "Generating a change in %s weather for zone %u.", seasonName[season], m_zone);
-#endif
+ LOG_DEBUG("weather", "Generating a change in %s weather for zone %u.", seasonName[season], m_zone);
if ((u < 60) && (m_grade < 0.33333334f)) // Get fair
{
@@ -207,7 +203,6 @@ bool Weather::UpdateWeather()
if (!sWorld->SendZoneMessage(m_zone, &data))
return false;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
///- Log the event
char const* wthstr;
switch (state)
@@ -254,8 +249,7 @@ bool Weather::UpdateWeather()
break;
}
- LOG_DEBUG("server", "Change the weather of zone %u to %s.", m_zone, wthstr);
-#endif
+ LOG_DEBUG("weather", "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 361072d6e7..304cb26601 100644
--- a/src/server/game/Weather/WeatherMgr.cpp
+++ b/src/server/game/Weather/WeatherMgr.cpp
@@ -85,7 +85,7 @@ namespace WeatherMgr
if (!result)
{
LOG_ERROR("sql.sql", ">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -127,8 +127,8 @@ namespace WeatherMgr
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void SendFineWeatherUpdateToPlayer(Player* player)
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index cd87d9574b..46855ff04c 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -422,7 +422,7 @@ void World::LoadConfigSettings(bool reload)
{
if (!sConfigMgr->Reload())
{
- LOG_ERROR("server", "World settings reload fail: can't read settings.");
+ LOG_ERROR("server.loading", "World settings reload fail: can't read settings.");
return;
}
@@ -436,7 +436,7 @@ void World::LoadConfigSettings(bool reload)
///- Initialize Lua Engine
if (!reload)
{
- LOG_INFO("server", "Initialize Eluna Lua Engine...");
+ LOG_INFO("eluna", "Initialize Eluna Lua Engine...");
Eluna::Initialize();
}
#endif
@@ -465,27 +465,27 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_HEALTH] = sConfigMgr->GetOption<float>("Rate.Health", 1);
if (rate_values[RATE_HEALTH] < 0)
{
- LOG_ERROR("server", "Rate.Health (%f) must be > 0. Using 1 instead.", rate_values[RATE_HEALTH]);
+ 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->GetOption<float>("Rate.Mana", 1);
if (rate_values[RATE_POWER_MANA] < 0)
{
- LOG_ERROR("server", "Rate.Mana (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_MANA]);
+ 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->GetOption<float>("Rate.Rage.Income", 1);
rate_values[RATE_POWER_RAGE_LOSS] = sConfigMgr->GetOption<float>("Rate.Rage.Loss", 1);
if (rate_values[RATE_POWER_RAGE_LOSS] < 0)
{
- LOG_ERROR("server", "Rate.Rage.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RAGE_LOSS]);
+ 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->GetOption<float>("Rate.RunicPower.Income", 1);
rate_values[RATE_POWER_RUNICPOWER_LOSS] = sConfigMgr->GetOption<float>("Rate.RunicPower.Loss", 1);
if (rate_values[RATE_POWER_RUNICPOWER_LOSS] < 0)
{
- LOG_ERROR("server", "Rate.RunicPower.Loss (%f) must be > 0. Using 1 instead.", rate_values[RATE_POWER_RUNICPOWER_LOSS]);
+ 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->GetOption<float>("Rate.Focus", 1.0f);
@@ -532,7 +532,7 @@ void World::LoadConfigSettings(bool reload)
if (rate_values[RATE_REPAIRCOST] < 0.0f)
{
- LOG_ERROR("server", "Rate.RepairCost (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_REPAIRCOST]);
+ 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->GetOption<float>("Rate.Reputation.Gain", 1.0f);
@@ -568,13 +568,13 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_TALENT] = sConfigMgr->GetOption<float>("Rate.Talent", 1.0f);
if (rate_values[RATE_TALENT] < 0.0f)
{
- LOG_ERROR("server", "Rate.Talent (%f) must be > 0. Using 1 instead.", rate_values[RATE_TALENT]);
+ 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->GetOption<float>("Rate.MoveSpeed", 1.0f);
if (rate_values[RATE_MOVESPEED] < 0)
{
- LOG_ERROR("server", "Rate.MoveSpeed (%f) must be > 0. Using 1 instead.", rate_values[RATE_MOVESPEED]);
+ 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];
@@ -583,12 +583,12 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] = sConfigMgr->GetOption<float>("TargetPosRecalculateRange", 1.5f);
if (rate_values[RATE_TARGET_POS_RECALCULATION_RANGE] < CONTACT_DISTANCE)
{
- LOG_ERROR("server", "TargetPosRecalculateRange (%f) must be >= %f. Using %f instead.", rate_values[RATE_TARGET_POS_RECALCULATION_RANGE], CONTACT_DISTANCE, CONTACT_DISTANCE);
+ 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)
{
- LOG_ERROR("server", "TargetPosRecalculateRange (%f) must be <= %f. Using %f instead.",
+ 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;
}
@@ -596,12 +596,12 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = sConfigMgr->GetOption<float>("DurabilityLoss.OnDeath", 10.0f);
if (rate_values[RATE_DURABILITY_LOSS_ON_DEATH] < 0.0f)
{
- LOG_ERROR("server", "DurabilityLoss.OnDeath (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
+ 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)
{
- LOG_ERROR("server", "DurabilityLoss.OnDeath (%f) must be <= 100. Using 100.0 instead.", rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
+ 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;
@@ -609,25 +609,25 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_DURABILITY_LOSS_DAMAGE] = sConfigMgr->GetOption<float>("DurabilityLossChance.Damage", 0.5f);
if (rate_values[RATE_DURABILITY_LOSS_DAMAGE] < 0.0f)
{
- LOG_ERROR("server", "DurabilityLossChance.Damage (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_DAMAGE]);
+ 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->GetOption<float>("DurabilityLossChance.Absorb", 0.5f);
if (rate_values[RATE_DURABILITY_LOSS_ABSORB] < 0.0f)
{
- LOG_ERROR("server", "DurabilityLossChance.Absorb (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_ABSORB]);
+ 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->GetOption<float>("DurabilityLossChance.Parry", 0.05f);
if (rate_values[RATE_DURABILITY_LOSS_PARRY] < 0.0f)
{
- LOG_ERROR("server", "DurabilityLossChance.Parry (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_PARRY]);
+ 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->GetOption<float>("DurabilityLossChance.Block", 0.05f);
if (rate_values[RATE_DURABILITY_LOSS_BLOCK] < 0.0f)
{
- LOG_ERROR("server", "DurabilityLossChance.Block (%f) must be >=0. Using 0.0 instead.", rate_values[RATE_DURABILITY_LOSS_BLOCK]);
+ 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;
}
@@ -638,7 +638,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_COMPRESSION] = sConfigMgr->GetOption<int32>("Compression", 1);
if (m_int_configs[CONFIG_COMPRESSION] < 1 || m_int_configs[CONFIG_COMPRESSION] > 9)
{
- LOG_ERROR("server", "Compression level (%u) must be in range 1..9. Using default compression level (1).", m_int_configs[CONFIG_COMPRESSION]);
+ LOG_ERROR("server.loading", "Compression level (%u) 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->GetOption<bool>("AddonChannel", true);
@@ -662,14 +662,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = sConfigMgr->GetOption<int32>("PlayerSave.Stats.MinLevel", 0);
if (m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] > MAX_LEVEL || int32(m_int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]) < 0)
{
- LOG_ERROR("server", "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]);
+ 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_MAPUPDATE] = sConfigMgr->GetOption<int32>("MapUpdateInterval", 100);
if (m_int_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY)
{
- LOG_ERROR("server", "MapUpdateInterval (%i) must be greater %u. Use this minimal value.", m_int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY);
+ 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)
@@ -681,7 +681,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetOption<int32>("WorldServerPort", 8085);
if (val != m_int_configs[CONFIG_PORT_WORLD])
- LOG_ERROR("server", "WorldServerPort option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_PORT_WORLD]);
+ 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->GetOption<int32>("WorldServerPort", 8085);
@@ -701,7 +701,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetOption<int32>("GameType", 0);
if (val != m_int_configs[CONFIG_GAME_TYPE])
- LOG_ERROR("server", "GameType option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_GAME_TYPE]);
+ 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->GetOption<int32>("GameType", 0);
@@ -710,7 +710,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetOption<int32>("RealmZone", REALM_ZONE_DEVELOPMENT);
if (val != m_int_configs[CONFIG_REALM_ZONE])
- LOG_ERROR("server", "RealmZone option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_REALM_ZONE]);
+ 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->GetOption<int32>("RealmZone", REALM_ZONE_DEVELOPMENT);
@@ -736,21 +736,21 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MIN_PLAYER_NAME] = sConfigMgr->GetOption<int32> ("MinPlayerName", 2);
if (m_int_configs[CONFIG_MIN_PLAYER_NAME] < 1 || m_int_configs[CONFIG_MIN_PLAYER_NAME] > MAX_PLAYER_NAME)
{
- LOG_ERROR("server", "MinPlayerName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PLAYER_NAME], MAX_PLAYER_NAME);
+ 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->GetOption<int32> ("MinCharterName", 2);
if (m_int_configs[CONFIG_MIN_CHARTER_NAME] < 1 || m_int_configs[CONFIG_MIN_CHARTER_NAME] > MAX_CHARTER_NAME)
{
- LOG_ERROR("server", "MinCharterName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_CHARTER_NAME], MAX_CHARTER_NAME);
+ 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->GetOption<int32> ("MinPetName", 2);
if (m_int_configs[CONFIG_MIN_PET_NAME] < 1 || m_int_configs[CONFIG_MIN_PET_NAME] > MAX_PET_NAME)
{
- LOG_ERROR("server", "MinPetName (%i) must be in range 1..%u. Set to 2.", m_int_configs[CONFIG_MIN_PET_NAME], MAX_PET_NAME);
+ 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;
}
@@ -769,7 +769,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CHARACTERS_PER_REALM] = sConfigMgr->GetOption<int32>("CharactersPerRealm", 10);
if (m_int_configs[CONFIG_CHARACTERS_PER_REALM] < 1 || m_int_configs[CONFIG_CHARACTERS_PER_REALM] > 10)
{
- LOG_ERROR("server", "CharactersPerRealm (%i) must be in range 1..10. Set to 10.", m_int_configs[CONFIG_CHARACTERS_PER_REALM]);
+ 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;
}
@@ -777,14 +777,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = sConfigMgr->GetOption<int32>("CharactersPerAccount", 50);
if (m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] < m_int_configs[CONFIG_CHARACTERS_PER_REALM])
{
- LOG_ERROR("server", "CharactersPerAccount (%i) can't be less than CharactersPerRealm (%i).", m_int_configs[CONFIG_CHARACTERS_PER_ACCOUNT], m_int_configs[CONFIG_CHARACTERS_PER_REALM]);
+ 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->GetOption<int32>("HeroicCharactersPerRealm", 1);
if (int32(m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]) < 0 || m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10)
{
- LOG_ERROR("server", "HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.", m_int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
+ 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;
}
@@ -793,7 +793,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_SKIP_CINEMATICS] = sConfigMgr->GetOption<int32>("SkipCinematics", 0);
if (int32(m_int_configs[CONFIG_SKIP_CINEMATICS]) < 0 || m_int_configs[CONFIG_SKIP_CINEMATICS] > 2)
{
- LOG_ERROR("server", "SkipCinematics (%i) must be in range 0..2. Set to 0.", m_int_configs[CONFIG_SKIP_CINEMATICS]);
+ 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;
}
@@ -801,14 +801,14 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetOption<int32>("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
if (val != m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
- LOG_ERROR("server", "MaxPlayerLevel option can't be changed at config reload, using current value (%u).", m_int_configs[CONFIG_MAX_PLAYER_LEVEL]);
+ 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->GetOption<int32>("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
if (m_int_configs[CONFIG_MAX_PLAYER_LEVEL] > MAX_LEVEL || m_int_configs[CONFIG_MAX_PLAYER_LEVEL] < 1)
{
- LOG_ERROR("server", "MaxPlayerLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_MAX_PLAYER_LEVEL], MAX_LEVEL, MAX_LEVEL);
+ 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;
}
@@ -817,14 +817,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_PLAYER_LEVEL] = sConfigMgr->GetOption<int32>("StartPlayerLevel", 1);
if (m_int_configs[CONFIG_START_PLAYER_LEVEL] < 1 || m_int_configs[CONFIG_START_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
{
- LOG_ERROR("server", "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]);
+ 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;
}
m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = sConfigMgr->GetOption<int32>("StartHeroicPlayerLevel", 55);
if (m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] < 1 || m_int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL])
{
- LOG_ERROR("server", "StartHeroicPlayerLevel (%i) must be in range 1..MaxPlayerLevel(%u). Set to 55.",
+ 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;
}
@@ -832,21 +832,21 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_PLAYER_MONEY] = sConfigMgr->GetOption<int32>("StartPlayerMoney", 0);
if (int32(m_int_configs[CONFIG_START_PLAYER_MONEY]) < 0 || int32(m_int_configs[CONFIG_START_PLAYER_MONEY]) > MAX_MONEY_AMOUNT)
{
- LOG_ERROR("server", "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0);
+ LOG_ERROR("server.loading", "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0);
m_int_configs[CONFIG_START_PLAYER_MONEY] = 0;
}
m_int_configs[CONFIG_MAX_HONOR_POINTS] = sConfigMgr->GetOption<int32>("MaxHonorPoints", 75000);
if (int32(m_int_configs[CONFIG_MAX_HONOR_POINTS]) < 0)
{
- LOG_ERROR("server", "MaxHonorPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_HONOR_POINTS]);
+ LOG_ERROR("server.loading", "MaxHonorPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_HONOR_POINTS]);
m_int_configs[CONFIG_MAX_HONOR_POINTS] = 0;
}
m_int_configs[CONFIG_START_HONOR_POINTS] = sConfigMgr->GetOption<int32>("StartHonorPoints", 0);
if (int32(m_int_configs[CONFIG_START_HONOR_POINTS]) < 0 || int32(m_int_configs[CONFIG_START_HONOR_POINTS]) > int32(m_int_configs[CONFIG_MAX_HONOR_POINTS]))
{
- LOG_ERROR("server", "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.",
+ LOG_ERROR("server.loading", "StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.",
m_int_configs[CONFIG_START_HONOR_POINTS], m_int_configs[CONFIG_MAX_HONOR_POINTS], 0);
m_int_configs[CONFIG_START_HONOR_POINTS] = 0;
}
@@ -854,14 +854,14 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MAX_ARENA_POINTS] = sConfigMgr->GetOption<int32>("MaxArenaPoints", 10000);
if (int32(m_int_configs[CONFIG_MAX_ARENA_POINTS]) < 0)
{
- LOG_ERROR("server", "MaxArenaPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_ARENA_POINTS]);
+ LOG_ERROR("server.loading", "MaxArenaPoints (%i) can't be negative. Set to 0.", m_int_configs[CONFIG_MAX_ARENA_POINTS]);
m_int_configs[CONFIG_MAX_ARENA_POINTS] = 0;
}
m_int_configs[CONFIG_START_ARENA_POINTS] = sConfigMgr->GetOption<int32>("StartArenaPoints", 0);
if (int32(m_int_configs[CONFIG_START_ARENA_POINTS]) < 0 || int32(m_int_configs[CONFIG_START_ARENA_POINTS]) > int32(m_int_configs[CONFIG_MAX_ARENA_POINTS]))
{
- LOG_ERROR("server", "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.",
+ LOG_ERROR("server.loading", "StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.",
m_int_configs[CONFIG_START_ARENA_POINTS], m_int_configs[CONFIG_MAX_ARENA_POINTS], 0);
m_int_configs[CONFIG_START_ARENA_POINTS] = 0;
}
@@ -870,7 +870,7 @@ void World::LoadConfigSettings(bool reload)
if (m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] > m_int_configs[CONFIG_MAX_PLAYER_LEVEL]
|| int32(m_int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL]) < 0)
{
- LOG_ERROR("server", "RecruitAFriend.MaxLevel (%i) must be in the range 0..MaxLevel(%u). Set to %u.",
+ 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;
}
@@ -892,7 +892,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MIN_PETITION_SIGNS] = sConfigMgr->GetOption<int32>("MinPetitionSigns", 9);
if (m_int_configs[CONFIG_MIN_PETITION_SIGNS] > 9 || int32(m_int_configs[CONFIG_MIN_PETITION_SIGNS]) < 0)
{
- LOG_ERROR("server", "MinPetitionSigns (%i) must be in range 0..9. Set to 9.", m_int_configs[CONFIG_MIN_PETITION_SIGNS]);
+ 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;
}
@@ -906,13 +906,13 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_START_GM_LEVEL] = sConfigMgr->GetOption<int32>("GM.StartLevel", 1);
if (m_int_configs[CONFIG_START_GM_LEVEL] < m_int_configs[CONFIG_START_PLAYER_LEVEL])
{
- LOG_ERROR("server", "GM.StartLevel (%i) must be in range StartPlayerLevel(%u)..%u. Set to %u.",
+ 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)
{
- LOG_ERROR("server", "GM.StartLevel (%i) must be in range 1..%u. Set to %u.", m_int_configs[CONFIG_START_GM_LEVEL], MAX_LEVEL, MAX_LEVEL);
+ 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->GetOption<bool>("GM.AllowInvite", false);
@@ -927,7 +927,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_UPTIME_UPDATE] = sConfigMgr->GetOption<int32>("UpdateUptimeInterval", 10);
if (int32(m_int_configs[CONFIG_UPTIME_UPDATE]) <= 0)
{
- LOG_ERROR("server", "UpdateUptimeInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_UPTIME_UPDATE]);
+ 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] = 1;
}
@@ -941,7 +941,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_LOGDB_CLEARINTERVAL] = sConfigMgr->GetOption<int32>("LogDB.Opt.ClearInterval", 10);
if (int32(m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]) <= 0)
{
- LOG_ERROR("server", "LogDB.Opt.ClearInterval (%i) must be > 0, set to default 10.", m_int_configs[CONFIG_LOGDB_CLEARINTERVAL]);
+ 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)
@@ -950,7 +950,7 @@ void World::LoadConfigSettings(bool reload)
m_timers[WUPDATE_CLEANDB].Reset();
}
m_int_configs[CONFIG_LOGDB_CLEARTIME] = sConfigMgr->GetOption<int32>("LogDB.Opt.ClearTime", 1209600); // 14 days default
- LOG_INFO("server", "Will clear `logs` table of entries older than %i seconds every %u minutes.",
+ 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_TELEPORT_TIMEOUT_NEAR] = sConfigMgr->GetOption<int32>("TeleportTimeoutNear", 25); // pussywizard
@@ -981,7 +981,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] = sConfigMgr->GetOption<int32>("MaxOverspeedPings", 2);
if (m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] != 0 && m_int_configs[CONFIG_MAX_OVERSPEED_PINGS] < 2)
{
- LOG_ERROR("server", "MaxOverspeedPings (%i) must be in range 2..infinity (or 0 to disable check). Set to 2.", m_int_configs[CONFIG_MAX_OVERSPEED_PINGS]);
+ 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;
}
@@ -996,7 +996,7 @@ void World::LoadConfigSettings(bool reload)
{
uint32 val = sConfigMgr->GetOption<int32>("Expansion", 2);
if (val != m_int_configs[CONFIG_EXPANSION])
- LOG_ERROR("server", "Expansion option can't be changed at worldserver.conf reload, using current value (%u).", m_int_configs[CONFIG_EXPANSION]);
+ 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->GetOption<int32>("Expansion", 2);
@@ -1033,21 +1033,21 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = sConfigMgr->GetOption<int32>("Battleground.Random.ResetHour", 6);
if (m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] > 23)
{
- LOG_ERROR("server", "Battleground.Random.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR]);
+ 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_CALENDAR_DELETE_OLD_EVENTS_HOUR] = sConfigMgr->GetOption<int32>("Calendar.DeleteOldEventsHour", 6);
if (m_int_configs[CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR] > 23 || int32(m_int_configs[CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR]) < 0)
{
- LOG_ERROR("server", "Calendar.DeleteOldEventsHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR]);
+ LOG_ERROR("server.loading", "Calendar.DeleteOldEventsHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR]);
m_int_configs[CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR] = 6;
}
m_int_configs[CONFIG_GUILD_RESET_HOUR] = sConfigMgr->GetOption<int32>("Guild.ResetHour", 6);
if (m_int_configs[CONFIG_GUILD_RESET_HOUR] > 23)
{
- LOG_ERROR("server", "Guild.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_GUILD_RESET_HOUR]);
+ LOG_ERROR("server.loading", "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;
}
@@ -1109,24 +1109,24 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = sConfigMgr->GetOption<int32>("Battleground.ReportAFK", 3);
if (m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] < 1)
{
- LOG_ERROR("server", "Battleground.ReportAFK (%d) must be >0. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
+ LOG_ERROR("server.loading", "Battleground.ReportAFK (%d) must be >0. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = 3;
}
else if (m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] > 9)
{
- LOG_ERROR("server", "Battleground.ReportAFK (%d) must be <10. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
+ LOG_ERROR("server.loading", "Battleground.ReportAFK (%d) must be <10. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = 3;
}
m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN] = sConfigMgr->GetOption<int32>("Battleground.PlayerRespawn", 30);
if (m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN] < 3)
{
- LOG_ERROR("server", "Battleground.PlayerRespawn (%i) must be >2. Using 30 instead.", m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN]);
+ LOG_ERROR("server.loading", "Battleground.PlayerRespawn (%i) must be >2. Using 30 instead.", m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN]);
m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN] = 30;
}
m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN] = sConfigMgr->GetOption<int32>("Battleground.BuffRespawn", 180);
if (m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN] < 1)
{
- LOG_ERROR("server", "Battleground.BuffRespawn (%i) must be >0. Using 180 instead.", m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN]);
+ LOG_ERROR("server.loading", "Battleground.BuffRespawn (%i) must be >0. Using 180 instead.", m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN]);
m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN] = 180;
}
@@ -1155,10 +1155,10 @@ void World::LoadConfigSettings(bool reload)
if (clientCacheId > 0)
{
m_int_configs[CONFIG_CLIENTCACHE_VERSION] = clientCacheId;
- LOG_INFO("server", "Client cache version set to: %u", clientCacheId);
+ LOG_INFO("server.loading", "Client cache version set to: %u", clientCacheId);
}
else
- LOG_ERROR("server", "ClientCacheVersion can't be negative %d, ignored.", clientCacheId);
+ LOG_ERROR("server.loading", "ClientCacheVersion can't be negative %d, ignored.", clientCacheId);
}
m_int_configs[CONFIG_INSTANT_LOGOUT] = sConfigMgr->GetOption<int32>("InstantLogout", SEC_MODERATOR);
@@ -1174,12 +1174,12 @@ void World::LoadConfigSettings(bool reload)
m_MaxVisibleDistanceOnContinents = sConfigMgr->GetOption<float>("Visibility.Distance.Continents", DEFAULT_VISIBILITY_DISTANCE);
if (m_MaxVisibleDistanceOnContinents < 45 * sWorld->getRate(RATE_CREATURE_AGGRO))
{
- LOG_ERROR("server", "Visibility.Distance.Continents can't be less max aggro radius %f", 45 * sWorld->getRate(RATE_CREATURE_AGGRO));
+ 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)
{
- LOG_ERROR("server", "Visibility.Distance.Continents can't be greater %f", MAX_VISIBILITY_DISTANCE);
+ LOG_ERROR("server.loading", "Visibility.Distance.Continents can't be greater %f", MAX_VISIBILITY_DISTANCE);
m_MaxVisibleDistanceOnContinents = MAX_VISIBILITY_DISTANCE;
}
@@ -1187,12 +1187,12 @@ void World::LoadConfigSettings(bool reload)
m_MaxVisibleDistanceInInstances = sConfigMgr->GetOption<float>("Visibility.Distance.Instances", DEFAULT_VISIBILITY_INSTANCE);
if (m_MaxVisibleDistanceInInstances < 45 * sWorld->getRate(RATE_CREATURE_AGGRO))
{
- LOG_ERROR("server", "Visibility.Distance.Instances can't be less max aggro radius %f", 45 * sWorld->getRate(RATE_CREATURE_AGGRO));
+ 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)
{
- LOG_ERROR("server", "Visibility.Distance.Instances can't be greater %f", MAX_VISIBILITY_DISTANCE);
+ LOG_ERROR("server.loading", "Visibility.Distance.Instances can't be greater %f", MAX_VISIBILITY_DISTANCE);
m_MaxVisibleDistanceInInstances = MAX_VISIBILITY_DISTANCE;
}
@@ -1200,12 +1200,12 @@ void World::LoadConfigSettings(bool reload)
m_MaxVisibleDistanceInBGArenas = sConfigMgr->GetOption<float>("Visibility.Distance.BGArenas", DEFAULT_VISIBILITY_BGARENAS);
if (m_MaxVisibleDistanceInBGArenas < 45 * sWorld->getRate(RATE_CREATURE_AGGRO))
{
- LOG_ERROR("server", "Visibility.Distance.BGArenas can't be less max aggro radius %f", 45 * sWorld->getRate(RATE_CREATURE_AGGRO));
+ 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)
{
- LOG_ERROR("server", "Visibility.Distance.BGArenas can't be greater %f", MAX_VISIBILITY_DISTANCE);
+ LOG_ERROR("server.loading", "Visibility.Distance.BGArenas can't be greater %f", MAX_VISIBILITY_DISTANCE);
m_MaxVisibleDistanceInBGArenas = MAX_VISIBILITY_DISTANCE;
}
@@ -1239,12 +1239,12 @@ void World::LoadConfigSettings(bool reload)
if (reload)
{
if (dataPath != m_dataPath)
- LOG_ERROR("server", "DataDir option can't be changed at worldserver.conf reload, using current value (%s).", m_dataPath.c_str());
+ 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;
- LOG_INFO("server", "Using DataDir %s", m_dataPath.c_str());
+ LOG_INFO("server.loading", "Using DataDir %s", m_dataPath.c_str());
}
m_bool_configs[CONFIG_VMAP_INDOOR_CHECK] = sConfigMgr->GetOption<bool>("vmap.enableIndoorCheck", 0);
@@ -1254,11 +1254,11 @@ void World::LoadConfigSettings(bool reload)
bool enablePetLOS = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
if (!enableHeight)
- LOG_ERROR("server", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
+ 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);
- LOG_INFO("server", "WORLD: VMap support included. LineOfSight:%i, getHeight:%i, indoorCheck:%i PetLOS:%i", enableLOS, enableHeight, enableIndoor, enablePetLOS);
+ LOG_INFO("server.loading", "WORLD: VMap support included. LineOfSight:%i, getHeight:%i, indoorCheck:%i PetLOS:%i", enableLOS, enableHeight, enableIndoor, enablePetLOS);
m_bool_configs[CONFIG_PET_LOS] = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
m_bool_configs[CONFIG_START_ALL_SPELLS] = sConfigMgr->GetOption<bool>("PlayerStart.CustomSpells", false);
@@ -1406,7 +1406,7 @@ void World::SetInitialWorldSettings()
///- Initialize detour memory management
dtAllocSetCustom(dtCustomAlloc, dtCustomFree);
- LOG_INFO("server", "Initializing Scripts...");
+ LOG_INFO("server.loading", "Initializing Scripts...");
sScriptMgr->Initialize();
///- Initialize VMapManager function pointers (to untangle game/collision circular deps)
@@ -1447,8 +1447,8 @@ void World::SetInitialWorldSettings()
sGameEventMgr->Initialize();
///- Loading strings. Getting no records means core load has to be canceled because no error message can be output.
- LOG_INFO("server", " ");
- LOG_INFO("server", "Loading acore strings...");
+ LOG_INFO("server.loading", " ");
+ LOG_INFO("server.loading", "Loading acore strings...");
if (!sObjectMgr->LoadAcoreStrings())
exit(1); // Error message displayed in function already
@@ -1470,7 +1470,7 @@ void World::SetInitialWorldSettings()
sScriptMgr->OnLoadCustomDatabaseTable();
///- Load the DBC files
- LOG_INFO("server", "Initialize data stores...");
+ LOG_INFO("server.loading", "Initialize data stores...");
LoadDBCStores(m_dataPath);
DetectDBCLang();
@@ -1486,49 +1486,49 @@ void World::SetInitialWorldSettings()
MMAP::MMapManager* mmmgr = MMAP::MMapFactory::createOrGetMMapManager();
mmmgr->InitializeThreadUnsafe(mapIds);
- LOG_INFO("server", "Loading Game Graveyard...");
+ LOG_INFO("server.loading", "Loading Game Graveyard...");
sGraveyard->LoadGraveyardFromDB();
- LOG_INFO("server", "Loading spell dbc data corrections...");
+ LOG_INFO("server.loading", "Loading spell dbc data corrections...");
sSpellMgr->LoadDbcDataCorrections();
- LOG_INFO("server", "Loading SpellInfo store...");
+ LOG_INFO("server.loading", "Loading SpellInfo store...");
sSpellMgr->LoadSpellInfoStore();
- LOG_INFO("server", "Loading Spell Rank Data...");
+ LOG_INFO("server.loading", "Loading Spell Rank Data...");
sSpellMgr->LoadSpellRanks();
- LOG_INFO("server", "Loading Spell Specific And Aura State...");
+ LOG_INFO("server.loading", "Loading Spell Specific And Aura State...");
sSpellMgr->LoadSpellSpecificAndAuraState();
- LOG_INFO("server", "Loading SkillLineAbilityMultiMap Data...");
+ LOG_INFO("server.loading", "Loading SkillLineAbilityMultiMap Data...");
sSpellMgr->LoadSkillLineAbilityMap();
- LOG_INFO("server", "Loading spell custom attributes...");
+ LOG_INFO("server.loading", "Loading spell custom attributes...");
sSpellMgr->LoadSpellCustomAttr();
- LOG_INFO("server", "Loading GameObject models...");
+ LOG_INFO("server.loading", "Loading GameObject models...");
LoadGameObjectModelList(m_dataPath);
- LOG_INFO("server", "Loading Script Names...");
+ LOG_INFO("server.loading", "Loading Script Names...");
sObjectMgr->LoadScriptNames();
- LOG_INFO("server", "Loading Instance Template...");
+ LOG_INFO("server.loading", "Loading Instance Template...");
sObjectMgr->LoadInstanceTemplate();
// xinef: Global Storage, should be loaded asap
- LOG_INFO("server", "Load Global Player Data...");
+ LOG_INFO("server.loading", "Load Global Player Data...");
sWorld->LoadGlobalPlayerDataStore();
// Must be called before `creature_respawn`/`gameobject_respawn` tables
- LOG_INFO("server", "Loading instances...");
+ LOG_INFO("server.loading", "Loading instances...");
sInstanceSaveMgr->LoadInstances();
- LOG_INFO("server", "Loading Broadcast texts...");
+ LOG_INFO("server.loading", "Loading Broadcast texts...");
sObjectMgr->LoadBroadcastTexts();
sObjectMgr->LoadBroadcastTextLocales();
- LOG_INFO("server", "Loading Localization strings...");
+ LOG_INFO("server.loading", "Loading Localization strings...");
uint32 oldMSTime = getMSTime();
sObjectMgr->LoadCreatureLocales();
sObjectMgr->LoadGameObjectLocales();
@@ -1543,341 +1543,341 @@ void World::SetInitialWorldSettings()
sObjectMgr->LoadPointOfInterestLocales();
sObjectMgr->SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
- LOG_INFO("server", ">> Localization strings loaded in %u ms", GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Localization strings loaded in %u ms", GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
- LOG_INFO("server", "Loading Page Texts...");
+ LOG_INFO("server.loading", "Loading Page Texts...");
sObjectMgr->LoadPageTexts();
- LOG_INFO("server", "Loading Game Object Templates..."); // must be after LoadPageTexts
+ LOG_INFO("server.loading", "Loading Game Object Templates..."); // must be after LoadPageTexts
sObjectMgr->LoadGameObjectTemplate();
- LOG_INFO("server", "Loading Game Object template addons...");
+ LOG_INFO("server.loading", "Loading Game Object template addons...");
sObjectMgr->LoadGameObjectTemplateAddons();
- LOG_INFO("server", "Loading Transport templates...");
+ LOG_INFO("server.loading", "Loading Transport templates...");
sTransportMgr->LoadTransportTemplates();
- LOG_INFO("server", "Loading Spell Required Data...");
+ LOG_INFO("server.loading", "Loading Spell Required Data...");
sSpellMgr->LoadSpellRequired();
- LOG_INFO("server", "Loading Spell Group types...");
+ LOG_INFO("server.loading", "Loading Spell Group types...");
sSpellMgr->LoadSpellGroups();
- LOG_INFO("server", "Loading Spell Learn Skills...");
+ LOG_INFO("server.loading", "Loading Spell Learn Skills...");
sSpellMgr->LoadSpellLearnSkills(); // must be after LoadSpellRanks
- LOG_INFO("server", "Loading Spell Proc Event conditions...");
+ LOG_INFO("server.loading", "Loading Spell Proc Event conditions...");
sSpellMgr->LoadSpellProcEvents();
- LOG_INFO("server", "Loading Spell Proc conditions and data...");
+ LOG_INFO("server.loading", "Loading Spell Proc conditions and data...");
sSpellMgr->LoadSpellProcs();
- LOG_INFO("server", "Loading Spell Bonus Data...");
+ LOG_INFO("server.loading", "Loading Spell Bonus Data...");
sSpellMgr->LoadSpellBonusess();
- LOG_INFO("server", "Loading Aggro Spells Definitions...");
+ LOG_INFO("server.loading", "Loading Aggro Spells Definitions...");
sSpellMgr->LoadSpellThreats();
- LOG_INFO("server", "Loading Mixology bonuses...");
+ LOG_INFO("server.loading", "Loading Mixology bonuses...");
sSpellMgr->LoadSpellMixology();
- LOG_INFO("server", "Loading Spell Group Stack Rules...");
+ LOG_INFO("server.loading", "Loading Spell Group Stack Rules...");
sSpellMgr->LoadSpellGroupStackRules();
- LOG_INFO("server", "Loading NPC Texts...");
+ LOG_INFO("server.loading", "Loading NPC Texts...");
sObjectMgr->LoadGossipText();
- LOG_INFO("server", "Loading Enchant Spells Proc datas...");
+ LOG_INFO("server.loading", "Loading Enchant Spells Proc datas...");
sSpellMgr->LoadSpellEnchantProcData();
- LOG_INFO("server", "Loading Item Random Enchantments Table...");
+ LOG_INFO("server.loading", "Loading Item Random Enchantments Table...");
LoadRandomEnchantmentsTable();
- LOG_INFO("server", "Loading Disables");
+ LOG_INFO("server.loading", "Loading Disables");
DisableMgr::LoadDisables(); // must be before loading quests and items
- LOG_INFO("server", "Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
+ LOG_INFO("server.loading", "Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
sObjectMgr->LoadItemTemplates();
- LOG_INFO("server", "Loading Item set names..."); // must be after LoadItemPrototypes
+ LOG_INFO("server.loading", "Loading Item set names..."); // must be after LoadItemPrototypes
sObjectMgr->LoadItemSetNames();
- LOG_INFO("server", "Loading Creature Model Based Info Data...");
+ LOG_INFO("server.loading", "Loading Creature Model Based Info Data...");
sObjectMgr->LoadCreatureModelInfo();
- LOG_INFO("server", "Loading Creature templates...");
+ LOG_INFO("server.loading", "Loading Creature templates...");
sObjectMgr->LoadCreatureTemplates();
- LOG_INFO("server", "Loading Equipment templates..."); // must be after LoadCreatureTemplates
+ LOG_INFO("server.loading", "Loading Equipment templates..."); // must be after LoadCreatureTemplates
sObjectMgr->LoadEquipmentTemplates();
- LOG_INFO("server", "Loading Creature template addons...");
+ LOG_INFO("server.loading", "Loading Creature template addons...");
sObjectMgr->LoadCreatureTemplateAddons();
- LOG_INFO("server", "Loading Reputation Reward Rates...");
+ LOG_INFO("server.loading", "Loading Reputation Reward Rates...");
sObjectMgr->LoadReputationRewardRate();
- LOG_INFO("server", "Loading Creature Reputation OnKill Data...");
+ LOG_INFO("server.loading", "Loading Creature Reputation OnKill Data...");
sObjectMgr->LoadReputationOnKill();
- LOG_INFO("server", "Loading Reputation Spillover Data..." );
+ LOG_INFO("server.loading", "Loading Reputation Spillover Data..." );
sObjectMgr->LoadReputationSpilloverTemplate();
- LOG_INFO("server", "Loading Points Of Interest Data...");
+ LOG_INFO("server.loading", "Loading Points Of Interest Data...");
sObjectMgr->LoadPointsOfInterest();
- LOG_INFO("server", "Loading Creature Base Stats...");
+ LOG_INFO("server.loading", "Loading Creature Base Stats...");
sObjectMgr->LoadCreatureClassLevelStats();
- LOG_INFO("server", "Loading Creature Data...");
+ LOG_INFO("server.loading", "Loading Creature Data...");
sObjectMgr->LoadCreatures();
- LOG_INFO("server", "Loading Temporary Summon Data...");
+ LOG_INFO("server.loading", "Loading Temporary Summon Data...");
sObjectMgr->LoadTempSummons(); // must be after LoadCreatureTemplates() and LoadGameObjectTemplates()
- LOG_INFO("server", "Loading pet levelup spells...");
+ LOG_INFO("server.loading", "Loading pet levelup spells...");
sSpellMgr->LoadPetLevelupSpellMap();
- LOG_INFO("server", "Loading pet default spells additional to levelup spells...");
+ LOG_INFO("server.loading", "Loading pet default spells additional to levelup spells...");
sSpellMgr->LoadPetDefaultSpells();
- LOG_INFO("server", "Loading Creature Addon Data...");
+ LOG_INFO("server.loading", "Loading Creature Addon Data...");
sObjectMgr->LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
- LOG_INFO("server", "Loading Gameobject Data...");
+ LOG_INFO("server.loading", "Loading Gameobject Data...");
sObjectMgr->LoadGameobjects();
- LOG_INFO("server", "Loading GameObject Addon Data...");
+ LOG_INFO("server.loading", "Loading GameObject Addon Data...");
sObjectMgr->LoadGameObjectAddons(); // must be after LoadGameObjectTemplate() and LoadGameobjects()
- LOG_INFO("server", "Loading GameObject Quest Items...");
+ LOG_INFO("server.loading", "Loading GameObject Quest Items...");
sObjectMgr->LoadGameObjectQuestItems();
- LOG_INFO("server", "Loading Creature Quest Items...");
+ LOG_INFO("server.loading", "Loading Creature Quest Items...");
sObjectMgr->LoadCreatureQuestItems();
- LOG_INFO("server", "Loading Creature Linked Respawn...");
+ LOG_INFO("server.loading", "Loading Creature Linked Respawn...");
sObjectMgr->LoadLinkedRespawn(); // must be after LoadCreatures(), LoadGameObjects()
- LOG_INFO("server", "Loading Weather Data...");
+ LOG_INFO("server.loading", "Loading Weather Data...");
WeatherMgr::LoadWeatherData();
- LOG_INFO("server", "Loading Quests...");
+ LOG_INFO("server.loading", "Loading Quests...");
sObjectMgr->LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables
- LOG_INFO("server", "Checking Quest Disables");
+ LOG_INFO("server.loading", "Checking Quest Disables");
DisableMgr::CheckQuestDisables(); // must be after loading quests
- LOG_INFO("server", "Loading Quest POI");
+ LOG_INFO("server.loading", "Loading Quest POI");
sObjectMgr->LoadQuestPOI();
- LOG_INFO("server", "Loading Quests Starters and Enders...");
+ LOG_INFO("server.loading", "Loading Quests Starters and Enders...");
sObjectMgr->LoadQuestStartersAndEnders(); // must be after quest load
- LOG_INFO("server", "Loading Objects Pooling Data...");
+ LOG_INFO("server.loading", "Loading Objects Pooling Data...");
sPoolMgr->LoadFromDB();
- LOG_INFO("server", "Loading Game Event Data..."); // must be after loading pools fully
+ LOG_INFO("server.loading", "Loading Game Event Data..."); // must be after loading pools fully
sGameEventMgr->LoadHolidayDates(); // Must be after loading DBC
sGameEventMgr->LoadFromDB(); // Must be after loading holiday dates
- LOG_INFO("server", "Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); // must be after LoadQuests
+ LOG_INFO("server.loading", "Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); // must be after LoadQuests
sObjectMgr->LoadNPCSpellClickSpells();
- LOG_INFO("server", "Loading Vehicle Template Accessories...");
+ LOG_INFO("server.loading", "Loading Vehicle Template Accessories...");
sObjectMgr->LoadVehicleTemplateAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells()
- LOG_INFO("server", "Loading Vehicle Accessories...");
+ LOG_INFO("server.loading", "Loading Vehicle Accessories...");
sObjectMgr->LoadVehicleAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells()
- LOG_INFO("server", "Loading SpellArea Data..."); // must be after quest load
+ LOG_INFO("server.loading", "Loading SpellArea Data..."); // must be after quest load
sSpellMgr->LoadSpellAreas();
- LOG_INFO("server", "Loading Area Trigger definitions");
+ LOG_INFO("server.loading", "Loading Area Trigger definitions");
sObjectMgr->LoadAreaTriggers();
- LOG_INFO("server", "Loading Area Trigger Teleport definitions...");
+ LOG_INFO("server.loading", "Loading Area Trigger Teleport definitions...");
sObjectMgr->LoadAreaTriggerTeleports();
- LOG_INFO("server", "Loading Access Requirements...");
+ LOG_INFO("server.loading", "Loading Access Requirements...");
sObjectMgr->LoadAccessRequirements(); // must be after item template load
- LOG_INFO("server", "Loading Quest Area Triggers...");
+ LOG_INFO("server.loading", "Loading Quest Area Triggers...");
sObjectMgr->LoadQuestAreaTriggers(); // must be after LoadQuests
- LOG_INFO("server", "Loading Tavern Area Triggers...");
+ LOG_INFO("server.loading", "Loading Tavern Area Triggers...");
sObjectMgr->LoadTavernAreaTriggers();
- LOG_INFO("server", "Loading AreaTrigger script names...");
+ LOG_INFO("server.loading", "Loading AreaTrigger script names...");
sObjectMgr->LoadAreaTriggerScripts();
- LOG_INFO("server", "Loading LFG entrance positions..."); // Must be after areatriggers
+ LOG_INFO("server.loading", "Loading LFG entrance positions..."); // Must be after areatriggers
sLFGMgr->LoadLFGDungeons();
- LOG_INFO("server", "Loading Dungeon boss data...");
+ LOG_INFO("server.loading", "Loading Dungeon boss data...");
sObjectMgr->LoadInstanceEncounters();
- LOG_INFO("server", "Loading LFG rewards...");
+ LOG_INFO("server.loading", "Loading LFG rewards...");
sLFGMgr->LoadRewards();
- LOG_INFO("server", "Loading Graveyard-zone links...");
+ LOG_INFO("server.loading", "Loading Graveyard-zone links...");
sGraveyard->LoadGraveyardZones();
- LOG_INFO("server", "Loading spell pet auras...");
+ LOG_INFO("server.loading", "Loading spell pet auras...");
sSpellMgr->LoadSpellPetAuras();
- LOG_INFO("server", "Loading Spell target coordinates...");
+ LOG_INFO("server.loading", "Loading Spell target coordinates...");
sSpellMgr->LoadSpellTargetPositions();
- LOG_INFO("server", "Loading enchant custom attributes...");
+ LOG_INFO("server.loading", "Loading enchant custom attributes...");
sSpellMgr->LoadEnchantCustomAttr();
- LOG_INFO("server", "Loading linked spells...");
+ LOG_INFO("server.loading", "Loading linked spells...");
sSpellMgr->LoadSpellLinked();
- LOG_INFO("server", "Loading Player Create Data...");
+ LOG_INFO("server.loading", "Loading Player Create Data...");
sObjectMgr->LoadPlayerInfo();
- LOG_INFO("server", "Loading Exploration BaseXP Data...");
+ LOG_INFO("server.loading", "Loading Exploration BaseXP Data...");
sObjectMgr->LoadExplorationBaseXP();
- LOG_INFO("server", "Loading Pet Name Parts...");
+ LOG_INFO("server.loading", "Loading Pet Name Parts...");
sObjectMgr->LoadPetNames();
CharacterDatabaseCleaner::CleanDatabase();
- LOG_INFO("server", "Loading the max pet number...");
+ LOG_INFO("server.loading", "Loading the max pet number...");
sObjectMgr->LoadPetNumber();
- LOG_INFO("server", "Loading pet level stats...");
+ LOG_INFO("server.loading", "Loading pet level stats...");
sObjectMgr->LoadPetLevelInfo();
- LOG_INFO("server", "Loading Player level dependent mail rewards...");
+ LOG_INFO("server.loading", "Loading Player level dependent mail rewards...");
sObjectMgr->LoadMailLevelRewards();
// Loot tables
LoadLootTables();
- LOG_INFO("server", "Loading Skill Discovery Table...");
+ LOG_INFO("server.loading", "Loading Skill Discovery Table...");
LoadSkillDiscoveryTable();
- LOG_INFO("server", "Loading Skill Extra Item Table...");
+ LOG_INFO("server.loading", "Loading Skill Extra Item Table...");
LoadSkillExtraItemTable();
- LOG_INFO("server", "Loading Skill Perfection Data Table...");
+ LOG_INFO("server.loading", "Loading Skill Perfection Data Table...");
LoadSkillPerfectItemTable();
- LOG_INFO("server", "Loading Skill Fishing base level requirements...");
+ LOG_INFO("server.loading", "Loading Skill Fishing base level requirements...");
sObjectMgr->LoadFishingBaseSkillLevel();
- LOG_INFO("server", "Loading Achievements...");
+ LOG_INFO("server.loading", "Loading Achievements...");
sAchievementMgr->LoadAchievementReferenceList();
- LOG_INFO("server", "Loading Achievement Criteria Lists...");
+ LOG_INFO("server.loading", "Loading Achievement Criteria Lists...");
sAchievementMgr->LoadAchievementCriteriaList();
- LOG_INFO("server", "Loading Achievement Criteria Data...");
+ LOG_INFO("server.loading", "Loading Achievement Criteria Data...");
sAchievementMgr->LoadAchievementCriteriaData();
- LOG_INFO("server", "Loading Achievement Rewards...");
+ LOG_INFO("server.loading", "Loading Achievement Rewards...");
sAchievementMgr->LoadRewards();
- LOG_INFO("server", "Loading Achievement Reward Locales...");
+ LOG_INFO("server.loading", "Loading Achievement Reward Locales...");
sAchievementMgr->LoadRewardLocales();
- LOG_INFO("server", "Loading Completed Achievements...");
+ LOG_INFO("server.loading", "Loading Completed Achievements...");
sAchievementMgr->LoadCompletedAchievements();
///- Load dynamic data tables from the database
- LOG_INFO("server", "Loading Item Auctions...");
+ LOG_INFO("server.loading", "Loading Item Auctions...");
sAuctionMgr->LoadAuctionItems();
- LOG_INFO("server", "Loading Auctions...");
+ LOG_INFO("server.loading", "Loading Auctions...");
sAuctionMgr->LoadAuctions();
sGuildMgr->LoadGuilds();
- LOG_INFO("server", "Loading ArenaTeams...");
+ LOG_INFO("server.loading", "Loading ArenaTeams...");
sArenaTeamMgr->LoadArenaTeams();
- LOG_INFO("server", "Loading Groups...");
+ LOG_INFO("server.loading", "Loading Groups...");
sGroupMgr->LoadGroups();
- LOG_INFO("server", "Loading ReservedNames...");
+ LOG_INFO("server.loading", "Loading ReservedNames...");
sObjectMgr->LoadReservedPlayersNames();
- LOG_INFO("server", "Loading GameObjects for quests...");
+ LOG_INFO("server.loading", "Loading GameObjects for quests...");
sObjectMgr->LoadGameObjectForQuests();
- LOG_INFO("server", "Loading BattleMasters...");
+ LOG_INFO("server.loading", "Loading BattleMasters...");
sBattlegroundMgr->LoadBattleMastersEntry();
- LOG_INFO("server", "Loading GameTeleports...");
+ LOG_INFO("server.loading", "Loading GameTeleports...");
sObjectMgr->LoadGameTele();
- LOG_INFO("server", "Loading Gossip menu...");
+ LOG_INFO("server.loading", "Loading Gossip menu...");
sObjectMgr->LoadGossipMenu();
- LOG_INFO("server", "Loading Gossip menu options...");
+ LOG_INFO("server.loading", "Loading Gossip menu options...");
sObjectMgr->LoadGossipMenuItems();
- LOG_INFO("server", "Loading Vendors...");
+ LOG_INFO("server.loading", "Loading Vendors...");
sObjectMgr->LoadVendors(); // must be after load CreatureTemplate and ItemTemplate
- LOG_INFO("server", "Loading Trainers...");
+ LOG_INFO("server.loading", "Loading Trainers...");
sObjectMgr->LoadTrainerSpell(); // must be after load CreatureTemplate
- LOG_INFO("server", "Loading Waypoints...");
+ LOG_INFO("server.loading", "Loading Waypoints...");
sWaypointMgr->Load();
- LOG_INFO("server", "Loading SmartAI Waypoints...");
+ LOG_INFO("server.loading", "Loading SmartAI Waypoints...");
sSmartWaypointMgr->LoadFromDB();
- LOG_INFO("server", "Loading Creature Formations...");
+ LOG_INFO("server.loading", "Loading Creature Formations...");
sFormationMgr->LoadCreatureFormations();
- LOG_INFO("server", "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
+ LOG_INFO("server.loading", "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
LoadWorldStates();
- LOG_INFO("server", "Loading Conditions...");
+ LOG_INFO("server.loading", "Loading Conditions...");
sConditionMgr->LoadConditions();
- LOG_INFO("server", "Loading faction change achievement pairs...");
+ LOG_INFO("server.loading", "Loading faction change achievement pairs...");
sObjectMgr->LoadFactionChangeAchievements();
- LOG_INFO("server", "Loading faction change spell pairs...");
+ LOG_INFO("server.loading", "Loading faction change spell pairs...");
sObjectMgr->LoadFactionChangeSpells();
- LOG_INFO("server", "Loading faction change item pairs...");
+ LOG_INFO("server.loading", "Loading faction change item pairs...");
sObjectMgr->LoadFactionChangeItems();
- LOG_INFO("server", "Loading faction change reputation pairs...");
+ LOG_INFO("server.loading", "Loading faction change reputation pairs...");
sObjectMgr->LoadFactionChangeReputations();
- LOG_INFO("server", "Loading faction change title pairs...");
+ LOG_INFO("server.loading", "Loading faction change title pairs...");
sObjectMgr->LoadFactionChangeTitles();
- LOG_INFO("server", "Loading faction change quest pairs...");
+ LOG_INFO("server.loading", "Loading faction change quest pairs...");
sObjectMgr->LoadFactionChangeQuests();
- LOG_INFO("server", "Loading GM tickets...");
+ LOG_INFO("server.loading", "Loading GM tickets...");
sTicketMgr->LoadTickets();
- LOG_INFO("server", "Loading GM surveys...");
+ LOG_INFO("server.loading", "Loading GM surveys...");
sTicketMgr->LoadSurveys();
- LOG_INFO("server", "Loading client addons...");
+ LOG_INFO("server.loading", "Loading client addons...");
AddonMgr::LoadFromDB();
// pussywizard:
- LOG_INFO("server", "Deleting invalid mail items...");
- LOG_INFO("server", " ");
- CharacterDatabase.Query("DELETE mi FROM mail_items mi LEFT JOIN item_instance ii ON mi.item_guid = ii.guid WHERE ii.guid IS NULL");
- CharacterDatabase.Query("DELETE mi FROM mail_items mi LEFT JOIN mail m ON mi.mail_id = m.id WHERE m.id IS NULL");
- CharacterDatabase.Query("UPDATE mail m LEFT JOIN mail_items mi ON m.id = mi.mail_id SET m.has_items=0 WHERE m.has_items<>0 AND mi.mail_id IS NULL");
+ LOG_INFO("server.loading", "Deleting invalid mail items...");
+ LOG_INFO("server.loading", " ");
+ CharacterDatabase.Execute("DELETE mi FROM mail_items mi LEFT JOIN item_instance ii ON mi.item_guid = ii.guid WHERE ii.guid IS NULL");
+ CharacterDatabase.Execute("DELETE mi FROM mail_items mi LEFT JOIN mail m ON mi.mail_id = m.id WHERE m.id IS NULL");
+ CharacterDatabase.Execute("UPDATE mail m LEFT JOIN mail_items mi ON m.id = mi.mail_id SET m.has_items=0 WHERE m.has_items<>0 AND mi.mail_id IS NULL");
///- Handle outdated emails (delete/return)
- LOG_INFO("server", "Returning old mails...");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Returning old mails...");
+ LOG_INFO("server.loading", " ");
sObjectMgr->ReturnOrDeleteOldMails(false);
///- Load AutoBroadCast
- LOG_INFO("server", "Loading Autobroadcasts...");
+ LOG_INFO("server.loading", "Loading Autobroadcasts...");
LoadAutobroadcasts();
///- Load and initialize scripts
@@ -1885,34 +1885,34 @@ void World::SetInitialWorldSettings()
sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr->LoadWaypointScripts();
- LOG_INFO("server", "Loading spell script names...");
+ LOG_INFO("server.loading", "Loading spell script names...");
sObjectMgr->LoadSpellScriptNames();
- LOG_INFO("server", "Loading Creature Texts...");
+ LOG_INFO("server.loading", "Loading Creature Texts...");
sCreatureTextMgr->LoadCreatureTexts();
- LOG_INFO("server", "Loading Creature Text Locales...");
+ LOG_INFO("server.loading", "Loading Creature Text Locales...");
sCreatureTextMgr->LoadCreatureTextLocales();
- LOG_INFO("server", "Loading Scripts...");
+ LOG_INFO("server.loading", "Loading Scripts...");
sScriptMgr->LoadDatabase();
- LOG_INFO("server", "Validating spell scripts...");
+ LOG_INFO("server.loading", "Validating spell scripts...");
sObjectMgr->ValidateSpellScripts();
- LOG_INFO("server", "Loading SmartAI scripts...");
+ LOG_INFO("server.loading", "Loading SmartAI scripts...");
sSmartScriptMgr->LoadSmartAIFromDB();
- LOG_INFO("server", "Loading Calendar data...");
+ LOG_INFO("server.loading", "Loading Calendar data...");
sCalendarMgr->LoadFromDB();
- LOG_INFO("server", "Initializing SpellInfo precomputed data..."); // must be called after loading items, professions, spells and pretty much anything
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Initializing SpellInfo precomputed data..."); // must be called after loading items, professions, spells and pretty much anything
+ LOG_INFO("server.loading", " ");
sObjectMgr->InitializeSpellInfoPrecomputedData();
///- Initialize game time and timers
- LOG_INFO("server", "Initialize game time and timers");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Initialize game time and timers");
+ LOG_INFO("server.loading", " ");
m_gameTime = time(nullptr);
m_startTime = m_gameTime;
@@ -1942,12 +1942,12 @@ void World::SetInitialWorldSettings()
AIRegistry::Initialize();
///- Initialize MapManager
- LOG_INFO("server", "Starting Map System");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Starting Map System");
+ LOG_INFO("server.loading", " ");
sMapMgr->Initialize();
- LOG_INFO("server", "Starting Game Event system...");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Starting Game Event system...");
+ LOG_INFO("server.loading", " ");
uint32 nextGameEvent = sGameEventMgr->StartSystem();
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event
@@ -1960,70 +1960,70 @@ void World::SetInitialWorldSettings()
LOG_INFO("server.loading", "Initializing Opcodes...");
opcodeTable.Initialize();
- LOG_INFO("server", "Starting Arena Season...");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Starting Arena Season...");
+ LOG_INFO("server.loading", " ");
sGameEventMgr->StartArenaSeason();
sTicketMgr->Initialize();
///- Initialize Battlegrounds
- LOG_INFO("server", "Starting Battleground System");
+ LOG_INFO("server.loading", "Starting Battleground System");
sBattlegroundMgr->CreateInitialBattlegrounds();
sBattlegroundMgr->InitAutomaticArenaPointDistribution();
///- Initialize outdoor pvp
- LOG_INFO("server", "Starting Outdoor PvP System");
+ LOG_INFO("server.loading", "Starting Outdoor PvP System");
sOutdoorPvPMgr->InitOutdoorPvP();
///- Initialize Battlefield
- LOG_INFO("server", "Starting Battlefield System");
+ LOG_INFO("server.loading", "Starting Battlefield System");
sBattlefieldMgr->InitBattlefield();
- LOG_INFO("server", "Loading Transports...");
+ LOG_INFO("server.loading", "Loading Transports...");
sTransportMgr->SpawnContinentTransports();
///- Initialize Warden
- LOG_INFO("server", "Loading Warden Checks..." );
+ LOG_INFO("server.loading", "Loading Warden Checks..." );
sWardenCheckMgr->LoadWardenChecks();
- LOG_INFO("server", "Loading Warden Action Overrides..." );
+ LOG_INFO("server.loading", "Loading Warden Action Overrides..." );
sWardenCheckMgr->LoadWardenOverrides();
- LOG_INFO("server", "Deleting expired bans...");
+ LOG_INFO("server.loading", "Deleting expired bans...");
LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); // One-time query
- LOG_INFO("server", "Calculate next daily quest reset time...");
+ LOG_INFO("server.loading", "Calculate next daily quest reset time...");
InitDailyQuestResetTime();
- LOG_INFO("server", "Calculate next weekly quest reset time..." );
+ LOG_INFO("server.loading", "Calculate next weekly quest reset time..." );
InitWeeklyQuestResetTime();
- LOG_INFO("server", "Calculate next monthly quest reset time...");
+ LOG_INFO("server.loading", "Calculate next monthly quest reset time...");
InitMonthlyQuestResetTime();
- LOG_INFO("server", "Calculate random battleground reset time..." );
+ LOG_INFO("server.loading", "Calculate random battleground reset time..." );
InitRandomBGResetTime();
- LOG_INFO("server", "Calculate deletion of old calendar events time...");
+ LOG_INFO("server.loading", "Calculate deletion of old calendar events time...");
InitCalendarOldEventsDeletionTime();
- LOG_INFO("server", "Calculate Guild cap reset time...");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Calculate Guild cap reset time...");
+ LOG_INFO("server.loading", " ");
InitGuildResetTime();
- LOG_INFO("server", "Load Petitions...");
+ LOG_INFO("server.loading", "Load Petitions...");
sPetitionMgr->LoadPetitions();
- LOG_INFO("server", "Load Petition Signs...");
+ LOG_INFO("server.loading", "Load Petition Signs...");
sPetitionMgr->LoadSignatures();
- LOG_INFO("server", "Load Stored Loot Items...");
+ LOG_INFO("server.loading", "Load Stored Loot Items...");
sLootItemStorage->LoadStorageFromDB();
- LOG_INFO("server", "Load Channel Rights...");
+ LOG_INFO("server.loading", "Load Channel Rights...");
ChannelMgr::LoadChannelRights();
- LOG_INFO("server", "Load Channels...");
+ LOG_INFO("server.loading", "Load Channels...");
ChannelMgr::LoadChannels();
#ifdef ELUNA
@@ -2035,7 +2035,7 @@ void World::SetInitialWorldSettings()
if (sWorld->getBoolConfig(CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS))
{
- LOG_INFO("server", "Loading all grids for all non-instanced maps...");
+ LOG_INFO("server.loading", "Loading all grids for all non-instanced maps...");
for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i)
{
@@ -2047,7 +2047,7 @@ void World::SetInitialWorldSettings()
if (map)
{
- LOG_INFO("server", ">> Loading all grids for map %u", map->GetId());
+ LOG_INFO("server.loading", ">> Loading all grids for map %u", map->GetId());
map->LoadAllCells();
}
}
@@ -2055,13 +2055,13 @@ void World::SetInitialWorldSettings()
}
uint32 startupDuration = GetMSTimeDiffToNow(startupBegin);
- LOG_INFO("server", " ");
- LOG_INFO("server", "WORLD: World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000)); // outError for red color in console
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", " ");
+ LOG_INFO("server.loading", "WORLD: World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000)); // outError for red color in console
+ LOG_INFO("server.loading", " ");
if (sConfigMgr->isDryRun())
{
- LOG_INFO("server", "AzerothCore dry run completed, terminating.");
+ LOG_INFO("server.loading", "AzerothCore dry run completed, terminating.");
exit(0);
}
}
@@ -2072,7 +2072,7 @@ void World::DetectDBCLang()
if (m_lang_confid != 255 && m_lang_confid >= TOTAL_LOCALES)
{
- LOG_ERROR("server", "Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)", TOTAL_LOCALES);
+ LOG_ERROR("server.loading", "Incorrect DBC.Locale! Must be >= 0 and < %d (set to 0)", TOTAL_LOCALES);
m_lang_confid = LOCALE_enUS;
}
@@ -2099,14 +2099,14 @@ void World::DetectDBCLang()
if (default_locale >= TOTAL_LOCALES)
{
- LOG_ERROR("server", "Unable to determine your DBC Locale! (corrupt DBC?)");
+ LOG_ERROR("server.loading", "Unable to determine your DBC Locale! (corrupt DBC?)");
exit(1);
}
m_defaultDbcLocale = LocaleConstant(default_locale);
- LOG_INFO("server", "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[GetDefaultDbcLocale()], availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[GetDefaultDbcLocale()], availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());
+ LOG_INFO("server.loading", " ");
}
void World::LoadAutobroadcasts()
@@ -2123,7 +2123,7 @@ void World::LoadAutobroadcasts()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty for this realm!");
+ LOG_INFO("server.loading", ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty for this realm!");
return;
}
@@ -2140,8 +2140,8 @@ void World::LoadAutobroadcasts()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u autobroadcast definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u autobroadcast definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
/// Update the World !
@@ -2154,7 +2154,7 @@ void World::Update(uint32 diff)
m_updateTimeSum += diff;
if (m_updateTimeSum > m_int_configs[CONFIG_INTERVAL_LOG_UPDATE])
{
- LOG_INFO("server", "Average update time diff: %u. Players online: %u.", avgDiffTracker.getAverage(), (uint32)GetActiveSessionCount());
+ LOG_INFO("diff", "Average update time diff: %u. Players online: %u.", avgDiffTracker.getAverage(), (uint32)GetActiveSessionCount());
m_updateTimeSum = 0;
}
}
@@ -2324,9 +2324,7 @@ void World::Update(uint32 diff)
if (m_timers[WUPDATE_PINGDB].Passed())
{
m_timers[WUPDATE_PINGDB].Reset();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Ping MySQL to keep connection alive");
-#endif
+ LOG_DEBUG("sql.driver", "Ping MySQL to keep connection alive");
CharacterDatabase.KeepAlive();
LoginDatabase.KeepAlive();
WorldDatabase.KeepAlive();
@@ -2621,9 +2619,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);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Server is %s in %s", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"), str.c_str());
-#endif
+ LOG_DEBUG("server.worldserver", "Server is %s in %s", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"), str.c_str());
}
}
@@ -2641,9 +2637,7 @@ void World::ShutdownCancel()
m_ExitCode = SHUTDOWN_EXIT_CODE; // to default value
SendServerMessage(msgid);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Server %s cancelled.", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"));
-#endif
+ LOG_DEBUG("server.worldserver", "Server %s cancelled.", (m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"));
sScriptMgr->OnShutdownCancel();
}
@@ -2737,9 +2731,7 @@ void World::ProcessCliCommands()
CliCommandHolder* command = nullptr;
while (cliCmdQueue.next(command))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "CLI command under processing...");
-#endif
+ LOG_DEBUG("server.worldserver", "CLI command under processing...");
zprint = command->m_print;
callbackArg = command->m_callbackArg;
CliHandler handler(callbackArg, zprint);
@@ -2807,9 +2799,7 @@ void World::SendAutoBroadcast()
sWorld->SendGlobalMessage(&data);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "AutoBroadcast: '%s'", msg.c_str());
-#endif
+ LOG_DEBUG("server.worldserver", "AutoBroadcast: '%s'", msg.c_str());
}
void World::UpdateRealmCharCount(uint32 accountId)
@@ -3001,7 +2991,7 @@ void World::ResetWeeklyQuests()
void World::ResetMonthlyQuests()
{
- LOG_INFO("server", "Monthly quests reset for all characters.");
+ LOG_INFO("server.worldserver", "Monthly quests reset for all characters.");
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_QUEST_STATUS_MONTHLY);
CharacterDatabase.Execute(stmt);
@@ -3027,9 +3017,7 @@ void World::ResetEventSeasonalQuests(uint16 event_id)
void World::ResetRandomBG()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", "Random BG status reset for all characters.");
-#endif
+ LOG_DEBUG("server.worldserver", "Random BG status reset for all characters.");
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_BATTLEGROUND_RANDOM);
CharacterDatabase.Execute(stmt);
@@ -3044,7 +3032,7 @@ void World::ResetRandomBG()
void World::CalendarDeleteOldEvents()
{
- LOG_INFO("server", "Calendar deletion of old events.");
+ LOG_INFO("server.worldserver", "Calendar deletion of old events.");
m_NextCalendarOldEventsDeletionTime = time_t(m_NextCalendarOldEventsDeletionTime + DAY);
sWorld->setWorldState(WS_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME, uint64(m_NextCalendarOldEventsDeletionTime));
@@ -3053,7 +3041,7 @@ void World::CalendarDeleteOldEvents()
void World::ResetGuildCap()
{
- LOG_INFO("server", "Guild Daily Cap reset.");
+ LOG_INFO("server.worldserver", "Guild Daily Cap reset.");
m_NextGuildReset = GetNextTimeWithDayAndHour(-1, 6);
sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint64(m_NextGuildReset));
@@ -3142,8 +3130,8 @@ void World::LoadWorldStates()
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 world states. DB table `worldstates` is empty!");
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded 0 world states. DB table `worldstates` is empty!");
+ LOG_INFO("server.loading", " ");
return;
}
@@ -3156,8 +3144,8 @@ void World::LoadWorldStates()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %u world states in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %u world states in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
// Setting a worldstate will save it to DB
@@ -3219,7 +3207,7 @@ void World::LoadGlobalPlayerDataStore()
QueryResult result = CharacterDatabase.Query("SELECT guid, account, name, gender, race, class, level FROM characters WHERE deleteDate IS NULL");
if (!result)
{
- LOG_INFO("server", ">> Loaded 0 Players data.");
+ LOG_INFO("server.loading", ">> Loaded 0 Players data.");
return;
}
@@ -3262,8 +3250,8 @@ void World::LoadGlobalPlayerDataStore()
++count;
} while (result->NextRow());
- LOG_INFO("server", ">> Loaded %d Players data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
- LOG_INFO("server", " ");
+ LOG_INFO("server.loading", ">> Loaded %d Players data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
+ LOG_INFO("server.loading", " ");
}
void World::AddGlobalPlayerData(ObjectGuid::LowType guid, uint32 accountId, std::string const& name, uint8 gender, uint8 race, uint8 playerClass, uint8 level, uint16 mailCount, uint32 guildId)
@@ -3390,7 +3378,7 @@ GlobalPlayerData const* World::GetGlobalPlayerData(ObjectGuid::LowType guid) con
std::string name = fields[2].GetString();
- LOG_INFO("server", "Player %s [GUID: %u] was not found in the global storage, but it was found in the database.", name.c_str(), guid);
+ LOG_INFO("server.worldserver", "Player %s [GUID: %u] was not found in the global storage, but it was found in the database.", name.c_str(), guid);
sWorld->AddGlobalPlayerData(
fields[0].GetUInt32(), /*guid*/
@@ -3407,7 +3395,7 @@ GlobalPlayerData const* World::GetGlobalPlayerData(ObjectGuid::LowType guid) con
itr = _globalPlayerDataStore.find(guid);
if (itr != _globalPlayerDataStore.end())
{
- LOG_INFO("server", "Player %s [GUID: %u] added to the global storage.", name.c_str(), guid);
+ LOG_INFO("server.worldserver", "Player %s [GUID: %u] added to the global storage.", name.c_str(), guid);
return &itr->second;
}
}
@@ -3438,7 +3426,7 @@ ObjectGuid World::GetGlobalPlayerGUID(std::string const& name) const
ObjectGuid::LowType guidLow = fields[0].GetUInt32();
- LOG_INFO("server", "Player %s [GUID: %u] was not found in the global storage, but it was found in the database.", name.c_str(), guidLow);
+ LOG_INFO("server.worldserver", "Player %s [GUID: %u] was not found in the global storage, but it was found in the database.", name.c_str(), guidLow);
sWorld->AddGlobalPlayerData(
guidLow, /*guid*/
@@ -3455,7 +3443,7 @@ ObjectGuid World::GetGlobalPlayerGUID(std::string const& name) const
itr = _globalPlayerNameStore.find(name);
if (itr != _globalPlayerNameStore.end())
{
- LOG_INFO("server", "Player %s [GUID: %u] added to the global storage.", name.c_str(), guidLow);
+ LOG_INFO("server.worldserver", "Player %s [GUID: %u] added to the global storage.", name.c_str(), guidLow);
return ObjectGuid::Create<HighGuid::Player>(guidLow);
}
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index d69aa33426..a448f4d2a7 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -417,7 +417,7 @@ public:
}
else
{
- LOG_ERROR("server", "Sending opcode that has unknown type '%s'", type.c_str());
+ LOG_ERROR("network.opcode", "Sending opcode that has unknown type '%s'", type.c_str());
break;
}
}
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 58566d71e5..bb4d3bfe8c 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1529,9 +1529,7 @@ public:
if (!playerTarget)
playerTarget = player;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", handler->GetAcoreString(LANG_ADDITEM), itemId, count);
-#endif
+ LOG_DEBUG("misc", handler->GetAcoreString(LANG_ADDITEM), itemId, count);
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId);
if (!itemTemplate)
@@ -1629,9 +1627,7 @@ public:
if (!playerTarget)
playerTarget = player;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", handler->GetAcoreString(LANG_ADDITEMSET), itemSetId);
-#endif
+ LOG_DEBUG("misc", handler->GetAcoreString(LANG_ADDITEMSET), itemSetId);
bool found = false;
ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore();
@@ -2917,7 +2913,7 @@ public:
if (!pet->InitStatsForLevel(creatureTarget->getLevel()))
{
- LOG_ERROR("server", "InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
+ 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_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index b1e09d2bbf..e213c7193d 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -196,9 +196,7 @@ public:
target->SetMaxPower(POWER_ENERGY, energym);
target->SetPower(POWER_ENERGY, energy);
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("server", handler->GetAcoreString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
-#endif
+ LOG_DEBUG("misc", handler->GetAcoreString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
return true;
}
@@ -1014,9 +1012,7 @@ public:
{
int32 newmoney = int32(targetMoney) + moneyToAdd;
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", handler->GetAcoreString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
-#endif
if (newmoney <= 0)
{
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
@@ -1051,9 +1047,7 @@ public:
target->ModifyMoney(moneyToAdd);
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("chat.system", handler->GetAcoreString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
-#endif
return true;
}
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 1f8feaa95d..dea3417b99 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -976,15 +976,12 @@ public:
if (dontdel_str)
{
- //LOG_ERROR("server", "DEBUG: All 3 params are set");
-
// All 3 params are set
// GUID
// type
// doNotDEL
if (stricmp(dontdel_str, "NODEL") == 0)
{
- //LOG_ERROR("server", "DEBUG: doNotDelete = true;");
doNotDelete = true;
}
}
@@ -993,10 +990,8 @@ public:
// Only 2 params - but maybe NODEL is set
if (type_str)
{
- LOG_ERROR("server", "DEBUG: Only 2 params ");
if (stricmp(type_str, "NODEL") == 0)
{
- //LOG_ERROR("server", "DEBUG: type_str, NODEL ");
doNotDelete = true;
type_str = nullptr;
}
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 57a64d1ef8..17c0070b86 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -194,7 +194,7 @@ public:
static bool HandleReloadBattlegroundTemplate(ChatHandler* handler, char const* /*args*/)
{
- LOG_INFO("server", "Re-Loading Battleground Templates...");
+ LOG_INFO("server.loading", "Re-Loading Battleground Templates...");
sBattlegroundMgr->CreateInitialBattlegrounds();
handler->SendGlobalGMSysMessage("DB table `battleground_template` reloaded.");
return true;
@@ -218,7 +218,7 @@ public:
static bool HandleReloadAllLootCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables...");
+ LOG_INFO("server.loading", "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");
- LOG_INFO("server", "Re-Loading Quests Relations...");
+ LOG_INFO("server.loading", "Re-Loading Quests Relations...");
sObjectMgr->LoadQuestStartersAndEnders();
handler->SendGlobalGMSysMessage("DB tables `*_queststarter` and `*_questender` reloaded.");
return true;
@@ -256,7 +256,7 @@ public:
return false;
}
- LOG_INFO("server", "Re-Loading Scripts...");
+ LOG_INFO("server.loading", "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*/)
{
- LOG_INFO("server", "Re-Loading config settings...");
+ LOG_INFO("server.loading", "Re-Loading config settings...");
sWorld->LoadConfigSettings(true);
sMapMgr->InitializeVisibilityDistanceInfo();
handler->SendGlobalGMSysMessage("World config settings reloaded.");
@@ -327,7 +327,7 @@ public:
static bool HandleReloadDungeonAccessCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Dungeon Access Requirement definitions...");
+ LOG_INFO("server.loading", "Re-Loading Dungeon Access Requirement definitions...");
sObjectMgr->LoadAccessRequirements();
handler->SendGlobalGMSysMessage("DB tables `dungeon_access_template` AND `dungeon_access_requirements` reloaded.");
return true;
@@ -335,7 +335,7 @@ public:
static bool HandleReloadAchievementCriteriaDataCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Additional Achievement Criteria Data...");
+ LOG_INFO("server.loading", "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*/)
{
- LOG_INFO("server", "Re-Loading Achievement Reward Data...");
+ LOG_INFO("server.loading", "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*/)
{
- LOG_INFO("server", "Re-Loading Tavern Area Triggers...");
+ LOG_INFO("server.loading", "Re-Loading Tavern Area Triggers...");
sObjectMgr->LoadTavernAreaTriggers();
handler->SendGlobalGMSysMessage("DB table `areatrigger_tavern` reloaded.");
return true;
@@ -359,7 +359,7 @@ public:
static bool HandleReloadAreaTriggerCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Area Trigger definitions...");
+ LOG_INFO("server.loading", "Re-Loading Area Trigger definitions...");
sObjectMgr->LoadAreaTriggers();
handler->SendGlobalGMSysMessage("DB table `areatrigger` reloaded.");
return true;
@@ -367,7 +367,7 @@ public:
static bool HandleReloadAreaTriggerTeleportCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Area Trigger teleport definitions...");
+ LOG_INFO("server.loading", "Re-Loading Area Trigger teleport definitions...");
sObjectMgr->LoadAreaTriggerTeleports();
handler->SendGlobalGMSysMessage("DB table `areatrigger_teleport` reloaded.");
return true;
@@ -375,7 +375,7 @@ public:
static bool HandleReloadAutobroadcastCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Autobroadcasts...");
+ LOG_INFO("server.loading", "Re-Loading Autobroadcasts...");
sWorld->LoadAutobroadcasts();
handler->SendGlobalGMSysMessage("DB table `autobroadcast` reloaded.");
return true;
@@ -383,7 +383,7 @@ public:
static bool HandleReloadBroadcastTextCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Broadcast texts...");
+ LOG_INFO("server.loading", "Re-Loading Broadcast texts...");
sObjectMgr->LoadBroadcastTexts();
sObjectMgr->LoadBroadcastTextLocales();
handler->SendGlobalGMSysMessage("DB table `broadcast_text` reloaded.");
@@ -399,7 +399,7 @@ public:
static bool HandleReloadOnKillReputationCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading creature award reputation definitions...");
+ LOG_INFO("server.loading", "Re-Loading creature award reputation definitions...");
sObjectMgr->LoadReputationOnKill();
handler->SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded.");
return true;
@@ -433,7 +433,7 @@ public:
continue;
}
- LOG_INFO("server", "Reloading creature template entry %u", entry);
+ LOG_INFO("server.loading", "Reloading creature template entry %u", entry);
Field* fields = result->Fetch();
@@ -447,7 +447,7 @@ public:
static bool HandleReloadCreatureQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Loading Quests Relations... (`creature_queststarter`)");
+ LOG_INFO("server.loading", "Loading Quests Relations... (`creature_queststarter`)");
sObjectMgr->LoadCreatureQuestStarters();
handler->SendGlobalGMSysMessage("DB table `creature_queststarter` reloaded.");
return true;
@@ -455,7 +455,7 @@ public:
static bool HandleReloadLinkedRespawnCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Loading Linked Respawns... (`creature_linked_respawn`)");
+ LOG_INFO("server.loading", "Loading Linked Respawns... (`creature_linked_respawn`)");
sObjectMgr->LoadLinkedRespawn();
handler->SendGlobalGMSysMessage("DB table `creature_linked_respawn` (creature linked respawns) reloaded.");
return true;
@@ -463,7 +463,7 @@ public:
static bool HandleReloadCreatureQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Loading Quests Relations... (`creature_questender`)");
+ LOG_INFO("server.loading", "Loading Quests Relations... (`creature_questender`)");
sObjectMgr->LoadCreatureQuestEnders();
handler->SendGlobalGMSysMessage("DB table `creature_questender` reloaded.");
return true;
@@ -471,7 +471,7 @@ public:
static bool HandleReloadGossipMenuCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `gossip_menu` Table!");
+ LOG_INFO("server.loading", "Re-Loading `gossip_menu` Table!");
sObjectMgr->LoadGossipMenu();
handler->SendGlobalGMSysMessage("DB table `gossip_menu` reloaded.");
sConditionMgr->LoadConditions(true);
@@ -480,7 +480,7 @@ public:
static bool HandleReloadGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `gossip_menu_option` Table!");
+ LOG_INFO("server.loading", "Re-Loading `gossip_menu_option` Table!");
sObjectMgr->LoadGossipMenuItems();
handler->SendGlobalGMSysMessage("DB table `gossip_menu_option` reloaded.");
sConditionMgr->LoadConditions(true);
@@ -489,7 +489,7 @@ public:
static bool HandleReloadGOQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Loading Quests Relations... (`gameobject_queststarter`)");
+ LOG_INFO("server.loading", "Loading Quests Relations... (`gameobject_queststarter`)");
sObjectMgr->LoadGameobjectQuestStarters();
handler->SendGlobalGMSysMessage("DB table `gameobject_queststarter` reloaded.");
return true;
@@ -497,7 +497,7 @@ public:
static bool HandleReloadGOQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Loading Quests Relations... (`gameobject_questender`)");
+ LOG_INFO("server.loading", "Loading Quests Relations... (`gameobject_questender`)");
sObjectMgr->LoadGameobjectQuestEnders();
handler->SendGlobalGMSysMessage("DB table `gameobject_questender` reloaded.");
return true;
@@ -505,7 +505,7 @@ public:
static bool HandleReloadQuestAreaTriggersCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Quest Area Triggers...");
+ LOG_INFO("server.loading", "Re-Loading Quest Area Triggers...");
sObjectMgr->LoadQuestAreaTriggers();
handler->SendGlobalGMSysMessage("DB table `areatrigger_involvedrelation` (quest area triggers) reloaded.");
return true;
@@ -513,12 +513,12 @@ public:
static bool HandleReloadQuestTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Quest Templates...");
+ LOG_INFO("server.loading", "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
- LOG_INFO("server", "Re-Loading GameObjects for quests...");
+ LOG_INFO("server.loading", "Re-Loading GameObjects for quests...");
sObjectMgr->LoadGameObjectForQuests();
handler->SendGlobalGMSysMessage("Data GameObjects for quests reloaded.");
return true;
@@ -526,7 +526,7 @@ public:
static bool HandleReloadLootTemplatesCreatureCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`creature_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`creature_loot_template`)");
LoadLootTemplates_Creature();
LootTemplates_Creature.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `creature_loot_template` reloaded.");
@@ -536,7 +536,7 @@ public:
static bool HandleReloadLootTemplatesDisenchantCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`disenchant_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`disenchant_loot_template`)");
LoadLootTemplates_Disenchant();
LootTemplates_Disenchant.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `disenchant_loot_template` reloaded.");
@@ -546,7 +546,7 @@ public:
static bool HandleReloadLootTemplatesFishingCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`fishing_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`fishing_loot_template`)");
LoadLootTemplates_Fishing();
LootTemplates_Fishing.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `fishing_loot_template` reloaded.");
@@ -556,7 +556,7 @@ public:
static bool HandleReloadLootTemplatesGameobjectCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`gameobject_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`gameobject_loot_template`)");
LoadLootTemplates_Gameobject();
LootTemplates_Gameobject.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `gameobject_loot_template` reloaded.");
@@ -566,7 +566,7 @@ public:
static bool HandleReloadLootTemplatesItemCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`item_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`item_loot_template`)");
LoadLootTemplates_Item();
LootTemplates_Item.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `item_loot_template` reloaded.");
@@ -576,7 +576,7 @@ public:
static bool HandleReloadLootTemplatesMillingCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`milling_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`milling_loot_template`)");
LoadLootTemplates_Milling();
LootTemplates_Milling.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `milling_loot_template` reloaded.");
@@ -586,7 +586,7 @@ public:
static bool HandleReloadLootTemplatesPickpocketingCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`pickpocketing_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`pickpocketing_loot_template`)");
LoadLootTemplates_Pickpocketing();
LootTemplates_Pickpocketing.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `pickpocketing_loot_template` reloaded.");
@@ -596,7 +596,7 @@ public:
static bool HandleReloadLootTemplatesProspectingCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`prospecting_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`prospecting_loot_template`)");
LoadLootTemplates_Prospecting();
LootTemplates_Prospecting.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `prospecting_loot_template` reloaded.");
@@ -606,7 +606,7 @@ public:
static bool HandleReloadLootTemplatesMailCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`mail_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`mail_loot_template`)");
LoadLootTemplates_Mail();
LootTemplates_Mail.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `mail_loot_template` reloaded.");
@@ -616,7 +616,7 @@ public:
static bool HandleReloadLootTemplatesReferenceCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`reference_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`reference_loot_template`)");
LoadLootTemplates_Reference();
handler->SendGlobalGMSysMessage("DB table `reference_loot_template` reloaded.");
sConditionMgr->LoadConditions(true);
@@ -625,7 +625,7 @@ public:
static bool HandleReloadLootTemplatesSkinningCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`skinning_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`skinning_loot_template`)");
LoadLootTemplates_Skinning();
LootTemplates_Skinning.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `skinning_loot_template` reloaded.");
@@ -635,7 +635,7 @@ public:
static bool HandleReloadLootTemplatesSpellCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Loot Tables... (`spell_loot_template`)");
+ LOG_INFO("server.loading", "Re-Loading Loot Tables... (`spell_loot_template`)");
LoadLootTemplates_Spell();
LootTemplates_Spell.CheckLootRefs();
handler->SendGlobalGMSysMessage("DB table `spell_loot_template` reloaded.");
@@ -645,7 +645,7 @@ public:
static bool HandleReloadAcoreStringCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading acore_string Table!");
+ LOG_INFO("server.loading", "Re-Loading acore_string Table!");
sObjectMgr->LoadAcoreStrings();
handler->SendGlobalGMSysMessage("DB table `acore_string` reloaded.");
return true;
@@ -660,7 +660,7 @@ public:
return false;
}
- LOG_INFO("server", "Re-Loading warden_action Table!");
+ LOG_INFO("server.loading", "Re-Loading warden_action Table!");
sWardenCheckMgr->LoadWardenOverrides();
handler->SendGlobalGMSysMessage("DB table `warden_action` reloaded.");
return true;
@@ -668,7 +668,7 @@ public:
static bool HandleReloadNpcTrainerCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `npc_trainer` Table!");
+ LOG_INFO("server.loading", "Re-Loading `npc_trainer` Table!");
sObjectMgr->LoadTrainerSpell();
handler->SendGlobalGMSysMessage("DB table `npc_trainer` reloaded.");
return true;
@@ -676,7 +676,7 @@ public:
static bool HandleReloadNpcVendorCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `npc_vendor` Table!");
+ LOG_INFO("server.loading", "Re-Loading `npc_vendor` Table!");
sObjectMgr->LoadVendors();
handler->SendGlobalGMSysMessage("DB table `npc_vendor` reloaded.");
return true;
@@ -684,7 +684,7 @@ public:
static bool HandleReloadPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `points_of_interest` Table!");
+ LOG_INFO("server.loading", "Re-Loading `points_of_interest` Table!");
sObjectMgr->LoadPointsOfInterest();
handler->SendGlobalGMSysMessage("DB table `points_of_interest` reloaded.");
return true;
@@ -692,7 +692,7 @@ public:
static bool HandleReloadQuestPOICommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Quest POI ..." );
+ LOG_INFO("server.loading", "Re-Loading Quest POI ..." );
sObjectMgr->LoadQuestPOI();
handler->SendGlobalGMSysMessage("DB Table `quest_poi` and `quest_poi_points` reloaded.");
return true;
@@ -700,7 +700,7 @@ public:
static bool HandleReloadSpellClickSpellsCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `npc_spellclick_spells` Table!");
+ LOG_INFO("server.loading", "Re-Loading `npc_spellclick_spells` Table!");
sObjectMgr->LoadNPCSpellClickSpells();
handler->SendGlobalGMSysMessage("DB table `npc_spellclick_spells` reloaded.");
return true;
@@ -708,7 +708,7 @@ public:
static bool HandleReloadReservedNameCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Loading ReservedNames... (`reserved_name`)");
+ LOG_INFO("server.loading", "Loading ReservedNames... (`reserved_name`)");
sObjectMgr->LoadReservedPlayersNames();
handler->SendGlobalGMSysMessage("DB table `reserved_name` (player reserved names) reloaded.");
return true;
@@ -716,7 +716,7 @@ public:
static bool HandleReloadReputationRewardRateCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `reputation_reward_rate` Table!" );
+ LOG_INFO("server.loading", "Re-Loading `reputation_reward_rate` Table!" );
sObjectMgr->LoadReputationRewardRate();
handler->SendGlobalSysMessage("DB table `reputation_reward_rate` reloaded.");
return true;
@@ -724,7 +724,7 @@ public:
static bool HandleReloadReputationSpilloverTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading `reputation_spillover_template` Table!" );
+ LOG_INFO("server.loading", "Re-Loading `reputation_spillover_template` Table!" );
sObjectMgr->LoadReputationSpilloverTemplate();
handler->SendGlobalSysMessage("DB table `reputation_spillover_template` reloaded.");
return true;
@@ -732,7 +732,7 @@ public:
static bool HandleReloadSkillDiscoveryTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Skill Discovery Table...");
+ LOG_INFO("server.loading", "Re-Loading Skill Discovery Table...");
LoadSkillDiscoveryTable();
handler->SendGlobalGMSysMessage("DB table `skill_discovery_template` (recipes discovered at crafting) reloaded.");
return true;
@@ -741,7 +741,7 @@ public:
static bool HandleReloadSkillPerfectItemTemplateCommand(ChatHandler* handler, const char* /*args*/)
{
// latched onto HandleReloadSkillExtraItemTemplateCommand as it's part of that table group (and i don't want to chance all the command IDs)
- LOG_INFO("server", "Re-Loading Skill Perfection Data Table...");
+ LOG_INFO("server.loading", "Re-Loading Skill Perfection Data Table...");
LoadSkillPerfectItemTable();
handler->SendGlobalGMSysMessage("DB table `skill_perfect_item_template` (perfect item procs when crafting) reloaded.");
return true;
@@ -749,7 +749,7 @@ public:
static bool HandleReloadSkillExtraItemTemplateCommand(ChatHandler* handler, const char* args)
{
- LOG_INFO("server", "Re-Loading Skill Extra Item Table...");
+ LOG_INFO("server.loading", "Re-Loading Skill Extra Item Table...");
LoadSkillExtraItemTable();
handler->SendGlobalGMSysMessage("DB table `skill_extra_item_template` (extra item creation when crafting) reloaded.");
return HandleReloadSkillPerfectItemTemplateCommand(handler, args);
@@ -757,7 +757,7 @@ public:
static bool HandleReloadSkillFishingBaseLevelCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Skill Fishing base level requirements...");
+ LOG_INFO("server.loading", "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;
@@ -765,7 +765,7 @@ public:
static bool HandleReloadSpellAreaCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading SpellArea Data...");
+ LOG_INFO("server.loading", "Re-Loading SpellArea Data...");
sSpellMgr->LoadSpellAreas();
handler->SendGlobalGMSysMessage("DB table `spell_area` (spell dependences from area/quest/auras state) reloaded.");
return true;
@@ -773,7 +773,7 @@ public:
static bool HandleReloadSpellRequiredCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell Required Data... ");
+ LOG_INFO("server.loading", "Re-Loading Spell Required Data... ");
sSpellMgr->LoadSpellRequired();
handler->SendGlobalGMSysMessage("DB table `spell_required` reloaded.");
return true;
@@ -781,7 +781,7 @@ public:
static bool HandleReloadSpellGroupsCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell Groups...");
+ LOG_INFO("server.loading", "Re-Loading Spell Groups...");
sSpellMgr->LoadSpellGroups();
handler->SendGlobalGMSysMessage("DB table `spell_group` (spell groups) reloaded.");
return true;
@@ -789,7 +789,7 @@ public:
static bool HandleReloadSpellLinkedSpellCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell Linked Spells...");
+ LOG_INFO("server.loading", "Re-Loading Spell Linked Spells...");
sSpellMgr->LoadSpellLinked();
handler->SendGlobalGMSysMessage("DB table `spell_linked_spell` reloaded.");
return true;
@@ -797,7 +797,7 @@ public:
static bool HandleReloadSpellProcEventCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell Proc Event conditions...");
+ LOG_INFO("server.loading", "Re-Loading Spell Proc Event conditions...");
sSpellMgr->LoadSpellProcEvents();
handler->SendGlobalGMSysMessage("DB table `spell_proc_event` (spell proc trigger requirements) reloaded.");
return true;
@@ -805,7 +805,7 @@ public:
static bool HandleReloadSpellProcsCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell Proc conditions and data...");
+ LOG_INFO("server.loading", "Re-Loading Spell Proc conditions and data...");
sSpellMgr->LoadSpellProcs();
handler->SendGlobalGMSysMessage("DB table `spell_proc` (spell proc conditions and data) reloaded.");
return true;
@@ -813,7 +813,7 @@ public:
static bool HandleReloadSpellBonusesCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell Bonus Data...");
+ LOG_INFO("server.loading", "Re-Loading Spell Bonus Data...");
sSpellMgr->LoadSpellBonusess();
handler->SendGlobalGMSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded.");
return true;
@@ -821,7 +821,7 @@ public:
static bool HandleReloadSpellTargetPositionCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell target coordinates...");
+ LOG_INFO("server.loading", "Re-Loading Spell target coordinates...");
sSpellMgr->LoadSpellTargetPositions();
handler->SendGlobalGMSysMessage("DB table `spell_target_position` (destination coordinates for spell targets) reloaded.");
return true;
@@ -829,7 +829,7 @@ public:
static bool HandleReloadSpellThreatsCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Aggro Spells Definitions...");
+ LOG_INFO("server.loading", "Re-Loading Aggro Spells Definitions...");
sSpellMgr->LoadSpellThreats();
handler->SendGlobalGMSysMessage("DB table `spell_threat` (spell aggro definitions) reloaded.");
return true;
@@ -837,7 +837,7 @@ public:
static bool HandleReloadSpellGroupStackRulesCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell Group Stack Rules...");
+ LOG_INFO("server.loading", "Re-Loading Spell Group Stack Rules...");
sSpellMgr->LoadSpellGroupStackRules();
handler->SendGlobalGMSysMessage("DB table `spell_group_stack_rules` (spell stacking definitions) reloaded.");
return true;
@@ -845,7 +845,7 @@ public:
static bool HandleReloadSpellPetAurasCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Spell pet auras...");
+ LOG_INFO("server.loading", "Re-Loading Spell pet auras...");
sSpellMgr->LoadSpellPetAuras();
handler->SendGlobalGMSysMessage("DB table `spell_pet_auras` reloaded.");
return true;
@@ -853,7 +853,7 @@ public:
static bool HandleReloadPageTextsCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Page Texts...");
+ LOG_INFO("server.loading", "Re-Loading Page Texts...");
sObjectMgr->LoadPageTexts();
handler->SendGlobalGMSysMessage("DB table `page_texts` reloaded.");
handler->GetSession()->SendNotification("You need to delete your client cache or change the cache number in config in order for your players see the changes.");
@@ -862,7 +862,7 @@ public:
static bool HandleReloadItemEnchantementsCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Item Random Enchantments Table...");
+ LOG_INFO("server.loading", "Re-Loading Item Random Enchantments Table...");
LoadRandomEnchantmentsTable();
handler->SendGlobalGMSysMessage("DB table `item_enchantment_template` reloaded.");
return true;
@@ -870,7 +870,7 @@ public:
static bool HandleReloadItemSetNamesCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Item set names...");
+ LOG_INFO("server.loading", "Re-Loading Item set names...");
sObjectMgr->LoadItemSetNames();
handler->SendGlobalGMSysMessage("DB table `item_set_names` reloaded.");
return true;
@@ -886,7 +886,7 @@ public:
}
if (*args != 'a')
- LOG_INFO("server", "Re-Loading Scripts from `event_scripts`...");
+ LOG_INFO("server.loading", "Re-Loading Scripts from `event_scripts`...");
sObjectMgr->LoadEventScripts();
@@ -906,7 +906,7 @@ public:
}
if (*args != 'a')
- LOG_INFO("server", "Re-Loading Scripts from `waypoint_scripts`...");
+ LOG_INFO("server.loading", "Re-Loading Scripts from `waypoint_scripts`...");
sObjectMgr->LoadWaypointScripts();
@@ -919,7 +919,7 @@ public:
static bool HandleReloadWpCommand(ChatHandler* handler, const char* args)
{
if (*args != 'a')
- LOG_INFO("server", "Re-Loading Waypoints data from 'waypoints_data'");
+ LOG_INFO("server.loading", "Re-Loading Waypoints data from 'waypoints_data'");
sWaypointMgr->Load();
@@ -939,7 +939,7 @@ public:
}
if (*args != 'a')
- LOG_INFO("server", "Re-Loading Scripts from `spell_scripts`...");
+ LOG_INFO("server.loading", "Re-Loading Scripts from `spell_scripts`...");
sObjectMgr->LoadSpellScripts();
@@ -951,7 +951,7 @@ public:
static bool HandleReloadGameGraveyardZoneCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Graveyard-zone links...");
+ LOG_INFO("server.loading", "Re-Loading Graveyard-zone links...");
sGraveyard->LoadGraveyardZones();
@@ -962,7 +962,7 @@ public:
static bool HandleReloadGameTeleCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Game Tele coordinates...");
+ LOG_INFO("server.loading", "Re-Loading Game Tele coordinates...");
sObjectMgr->LoadGameTele();
@@ -973,9 +973,9 @@ public:
static bool HandleReloadDisablesCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading disables table...");
+ LOG_INFO("server.loading", "Re-Loading disables table...");
DisableMgr::LoadDisables();
- LOG_INFO("server", "Checking quest disables...");
+ LOG_INFO("server.loading", "Checking quest disables...");
DisableMgr::CheckQuestDisables();
handler->SendGlobalGMSysMessage("DB table `disables` reloaded.");
return true;
@@ -983,7 +983,7 @@ public:
static bool HandleReloadLocalesAchievementRewardCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Achievement Reward Data Locale...");
+ LOG_INFO("server.loading", "Re-Loading Achievement Reward Data Locale...");
sAchievementMgr->LoadRewardLocales();
handler->SendGlobalGMSysMessage("DB table `achievement_reward_locale` reloaded.");
return true;
@@ -991,7 +991,7 @@ public:
static bool HandleReloadLfgRewardsCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading lfg dungeon rewards...");
+ LOG_INFO("server.loading", "Re-Loading lfg dungeon rewards...");
sLFGMgr->LoadRewards();
handler->SendGlobalGMSysMessage("DB table `lfg_dungeon_rewards` reloaded.");
return true;
@@ -999,7 +999,7 @@ public:
static bool HandleReloadLocalesCreatureCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Creature Template Locale...");
+ LOG_INFO("server.loading", "Re-Loading Creature Template Locale...");
sObjectMgr->LoadCreatureLocales();
handler->SendGlobalGMSysMessage("DB table `creature_template_locale` reloaded.");
return true;
@@ -1007,7 +1007,7 @@ public:
static bool HandleReloadLocalesCreatureTextCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Creature Texts Locale...");
+ LOG_INFO("server.loading", "Re-Loading Creature Texts Locale...");
sCreatureTextMgr->LoadCreatureTextLocales();
handler->SendGlobalGMSysMessage("DB table `creature_text_locale` reloaded.");
return true;
@@ -1015,7 +1015,7 @@ public:
static bool HandleReloadLocalesGameobjectCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Gameobject Template Locale ... ");
+ LOG_INFO("server.loading", "Re-Loading Gameobject Template Locale ... ");
sObjectMgr->LoadGameObjectLocales();
handler->SendGlobalGMSysMessage("DB table `gameobject_template_locale` reloaded.");
return true;
@@ -1023,7 +1023,7 @@ public:
static bool HandleReloadLocalesGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Gossip Menu Option Locale ... ");
+ LOG_INFO("server.loading", "Re-Loading Gossip Menu Option Locale ... ");
sObjectMgr->LoadGossipMenuItemsLocales();
handler->SendGlobalGMSysMessage("DB table `gossip_menu_option_locale` reloaded.");
return true;
@@ -1031,7 +1031,7 @@ public:
static bool HandleReloadLocalesItemCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Item Template Locale ... ");
+ LOG_INFO("server.loading", "Re-Loading Item Template Locale ... ");
sObjectMgr->LoadItemLocales();
handler->SendGlobalGMSysMessage("DB table `item_template_locale` reloaded.");
return true;
@@ -1039,7 +1039,7 @@ public:
static bool HandleReloadLocalesItemSetNameCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Item set name Locale... ");
+ LOG_INFO("server.loading", "Re-Loading Item set name Locale... ");
sObjectMgr->LoadItemSetNameLocales();
handler->SendGlobalGMSysMessage("DB table `item_set_name_locale` reloaded.");
return true;
@@ -1047,7 +1047,7 @@ public:
static bool HandleReloadLocalesNpcTextCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading NPC Text Locale ... ");
+ LOG_INFO("server.loading", "Re-Loading NPC Text Locale ... ");
sObjectMgr->LoadNpcTextLocales();
handler->SendGlobalGMSysMessage("DB table `npc_text_locale` reloaded.");
return true;
@@ -1055,7 +1055,7 @@ public:
static bool HandleReloadLocalesPageTextCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Page Text Locale ... ");
+ LOG_INFO("server.loading", "Re-Loading Page Text Locale ... ");
sObjectMgr->LoadPageTextLocales();
handler->SendGlobalGMSysMessage("DB table `page_text_locale` reloaded.");
handler->GetSession()->SendNotification("You need to delete your client cache or change the cache number in config in order for your players see the changes.");
@@ -1064,7 +1064,7 @@ public:
static bool HandleReloadLocalesPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Points Of Interest Locale ... ");
+ LOG_INFO("server.loading", "Re-Loading Points Of Interest Locale ... ");
sObjectMgr->LoadPointOfInterestLocales();
handler->SendGlobalGMSysMessage("DB table `points_of_interest_locale` reloaded.");
return true;
@@ -1072,7 +1072,7 @@ public:
static bool HandleReloadLocalesQuestCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Locales Quest ... ");
+ LOG_INFO("server.loading", "Re-Loading Locales Quest ... ");
sObjectMgr->LoadQuestLocales();
handler->SendGlobalGMSysMessage("DB table `quest_template_locale` reloaded.");
return true;
@@ -1080,7 +1080,7 @@ public:
static bool HandleReloadLocalesQuestOfferRewardCommand(ChatHandler* handler, char const* /*args*/)
{
- LOG_INFO("server", "Re-Loading Quest Offer Reward Locale... ");
+ LOG_INFO("server.loading", "Re-Loading Quest Offer Reward Locale... ");
sObjectMgr->LoadQuestOfferRewardLocale();
handler->SendGlobalGMSysMessage("DB table `quest_offer_reward_locale` reloaded.");
return true;
@@ -1088,7 +1088,7 @@ public:
static bool HandleReloadLocalesQuestRequestItemsCommand(ChatHandler* handler, char const* /*args*/)
{
- LOG_INFO("server", "Re-Loading Quest Request Item Locale... ");
+ LOG_INFO("server.loading", "Re-Loading Quest Request Item Locale... ");
sObjectMgr->LoadQuestRequestItemsLocale();
handler->SendGlobalGMSysMessage("DB table `quest_request_item_locale` reloaded.");
return true;
@@ -1096,7 +1096,7 @@ public:
static bool HandleReloadMailLevelRewardCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Player level dependent mail rewards...");
+ LOG_INFO("server.loading", "Re-Loading Player level dependent mail rewards...");
sObjectMgr->LoadMailLevelRewards();
handler->SendGlobalGMSysMessage("DB table `mail_level_reward` reloaded.");
return true;
@@ -1105,7 +1105,7 @@ public:
static bool HandleReloadAuctionsCommand(ChatHandler* handler, const char* /*args*/)
{
///- Reload dynamic data tables from the database
- LOG_INFO("server", "Re-Loading Auctions...");
+ LOG_INFO("server.loading", "Re-Loading Auctions...");
sAuctionMgr->LoadAuctionItems();
sAuctionMgr->LoadAuctions();
handler->SendGlobalGMSysMessage("Auctions reloaded.");
@@ -1114,7 +1114,7 @@ public:
static bool HandleReloadConditions(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Conditions...");
+ LOG_INFO("server.loading", "Re-Loading Conditions...");
sConditionMgr->LoadConditions(true);
handler->SendGlobalGMSysMessage("Conditions reloaded.");
return true;
@@ -1122,7 +1122,7 @@ public:
static bool HandleReloadCreatureText(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Creature Texts...");
+ LOG_INFO("server.loading", "Re-Loading Creature Texts...");
sCreatureTextMgr->LoadCreatureTexts();
handler->SendGlobalGMSysMessage("Creature Texts reloaded.");
return true;
@@ -1130,7 +1130,7 @@ public:
static bool HandleReloadSmartScripts(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Re-Loading Smart Scripts...");
+ LOG_INFO("server.loading", "Re-Loading Smart Scripts...");
sSmartScriptMgr->LoadSmartAIFromDB();
handler->SendGlobalGMSysMessage("Smart Scripts reloaded.");
return true;
@@ -1138,7 +1138,7 @@ public:
static bool HandleReloadVehicleAccessoryCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Reloading vehicle_accessory table...");
+ LOG_INFO("server.loading", "Reloading vehicle_accessory table...");
sObjectMgr->LoadVehicleAccessories();
handler->SendGlobalGMSysMessage("Vehicle accessories reloaded.");
return true;
@@ -1146,7 +1146,7 @@ public:
static bool HandleReloadVehicleTemplateAccessoryCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Reloading vehicle_template_accessory table...");
+ LOG_INFO("server.loading", "Reloading vehicle_template_accessory table...");
sObjectMgr->LoadVehicleTemplateAccessories();
handler->SendGlobalGMSysMessage("Vehicle template accessories reloaded.");
return true;
@@ -1154,7 +1154,7 @@ public:
static bool HandleReloadGameGraveyardCommand(ChatHandler* handler, const char* /*args*/)
{
- LOG_INFO("server", "Reloading game_graveyard table...");
+ LOG_INFO("server.loading", "Reloading game_graveyard table...");
sGraveyard->LoadGraveyardFromDB();
handler->SendGlobalGMSysMessage("DB table `game_graveyard` reloaded.");
return true;
diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp
index 09309e3c6c..d098053647 100644
--- a/src/server/scripts/Commands/cs_reset.cpp
+++ b/src/server/scripts/Commands/cs_reset.cpp
@@ -79,7 +79,7 @@ public:
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(player->getClass());
if (!classEntry)
{
- LOG_ERROR("server", "Class %u not found in DBC (Wrong DBC files?)", player->getClass());
+ LOG_ERROR("dbc", "Class %u not found in DBC (Wrong DBC files?)", player->getClass());
return false;
}
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
index 5fb389875a..411ef5df5a 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp
@@ -129,4 +129,4 @@ public:
void AddSC_boss_drekthar()
{
new boss_drekthar;
-} \ No newline at end of file
+}
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
index 1350bdc15e..3d9e7c8aef 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp
@@ -111,4 +111,4 @@ public:
void AddSC_boss_vanndar()
{
new boss_vanndar;
-} \ No newline at end of file
+}
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 4c8f5e2dbb..4dc8c6dd76 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
@@ -249,9 +249,7 @@ public:
void SetData(uint32 type, uint32 data) override
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
-#endif
switch (type)
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 31f45662d2..bf9cfe9869 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -228,9 +228,7 @@ public:
void PrepareEncounter()
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
-#endif
uint8 index = 0;
uint8 count = 0;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index fabd56f088..a7c1df9c26 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -239,9 +239,7 @@ public:
{
AddEscortState(STATE_ESCORT_RETURNING);
ReturnToLastPoint();
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: EscortAI has left combat and is now returning to last point");
-#endif
}
else
{
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
index 23ac2bbdc2..141b49a5ae 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
@@ -215,18 +215,20 @@ public:
return;
std::istringstream ss(load);
- //LOG_ERROR("server", "Zul'aman loaded, %s.", ss.str().c_str());
char dataHead; // S
uint16 data1, data2, data3;
ss >> dataHead >> data1 >> data2 >> data3;
- //LOG_ERROR("server", "Zul'aman loaded, %d %d %d.", data1, data2, data3);
+
if (dataHead == 'S')
{
BossKilled = data1;
ChestLooted = data2;
QuestMinute = data3;
}
- else LOG_ERROR("server", "Zul'aman: corrupted save data.");
+ else
+ {
+ LOG_ERROR("misc", "Zul'aman: corrupted save data.");
+ }
}
void SetData(uint32 type, uint32 data) override
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index 140cf88b03..213a04d7c1 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -1444,9 +1444,7 @@ public:
return true;
}
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: npc_commander_dawnforge event already in progress, need to wait.");
-#endif
return false;
}
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 049145c2a7..22ffdd0225 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -282,7 +282,7 @@ public:
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]);
if (!spellInfo)
{
- LOG_ERROR("server", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, %s) cast unknown spell %i",
+ LOG_ERROR("misc", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, %s) cast unknown spell %i",
enchant->ID, player->GetName().c_str(), player->GetGUID().ToString().c_str(), enchant->spellid[s]);
continue;
}
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index e7aa0282e4..b925261805 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -708,7 +708,7 @@ public:
rank = 2;
break;
default:
- LOG_ERROR("server", "Unknown rank of Improved Healthstone id: %d", aurEff->GetId());
+ LOG_ERROR("spells", "Unknown rank of Improved Healthstone id: %d", aurEff->GetId());
break;
}
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 53a82486c4..6a67080656 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -273,9 +273,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
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("scripts.ai", "TSCR: player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
-#endif
return false;
}
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 3657d052f5..afb9f815bf 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -1168,7 +1168,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 diff)
patientEntry = HordeSoldierId[rand() % 3];
break;
default:
- LOG_ERROR("server", "TSCR: Invalid entry for Triage doctor. Please check your database");
+ LOG_ERROR("scripts", "TSCR: Invalid entry for Triage doctor. Please check your database");
return;
}
diff --git a/src/server/shared/Network/RealmSocket.cpp b/src/server/shared/Network/RealmSocket.cpp
index 03b3a1b9f8..ec44dbbf6f 100644
--- a/src/server/shared/Network/RealmSocket.cpp
+++ b/src/server/shared/Network/RealmSocket.cpp
@@ -42,7 +42,7 @@ int RealmSocket::open(void* arg)
if (peer().get_remote_addr(addr) == -1)
{
- LOG_ERROR("server", "Error %s while opening realm socket!", ACE_OS::strerror(errno));
+ LOG_ERROR("network", "Error %s while opening realm socket!", ACE_OS::strerror(errno));
return -1;
}
diff --git a/src/server/worldserver/ACSoap/ACSoap.cpp b/src/server/worldserver/ACSoap/ACSoap.cpp
index e77ad4c85b..bc85a0dd92 100644
--- a/src/server/worldserver/ACSoap/ACSoap.cpp
+++ b/src/server/worldserver/ACSoap/ACSoap.cpp
@@ -25,20 +25,18 @@ void ACSoapThread(const std::string& host, uint16 port)
if (!soap_valid_socket(soap_bind(&soap, host.c_str(), port, 100)))
{
- LOG_ERROR("server", "ACSoap: couldn't bind to %s:%d", host.c_str(), port);
+ LOG_ERROR("network.soap", "ACSoap: couldn't bind to %s:%d", host.c_str(), port);
exit(-1);
}
- LOG_INFO("server", "ACSoap: bound to http://%s:%d", host.c_str(), port);
+ LOG_INFO("network.soap", "ACSoap: 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
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "ACSoap: 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);
-#endif
+ LOG_DEBUG("network.soap", "ACSoap: 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
process_message(thread_soap);
@@ -49,7 +47,7 @@ void ACSoapThread(const std::string& host, uint16 port)
void process_message(struct soap* soap_message)
{
- //LOG_TRACE("network.soap", "SOAPWorkingThread::process_message");
+ LOG_TRACE("network.soap", "SOAPWorkingThread::process_message");
soap_serve(soap_message);
soap_destroy(soap_message); // dealloc C++ data
@@ -67,43 +65,33 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
// security check
if (!soap->userid || !soap->passwd)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "ACSoap: Client didn't provide login information");
-#endif
+ LOG_DEBUG("network.soap", "ACSoap: Client didn't provide login information");
return 401;
}
uint32 accountId = AccountMgr::GetId(soap->userid);
if (!accountId)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "ACSoap: Client used invalid username '%s'", soap->userid);
-#endif
return 401;
}
if (!AccountMgr::CheckPassword(accountId, soap->passwd))
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "ACSoap: invalid password for account '%s'", soap->userid);
-#endif
+ LOG_DEBUG("network.soap", "ACSoap: invalid password for account '%s'", soap->userid);
return 401;
}
if (AccountMgr::GetSecurity(accountId) < SEC_ADMINISTRATOR)
{
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "ACSoap: %s's gmlevel is too low", soap->userid);
-#endif
+ LOG_DEBUG("network.soap", "ACSoap: %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");
-#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
- LOG_DEBUG("network", "ACSoap: got command '%s'", command);
-#endif
+ LOG_DEBUG("network.soap", "ACSoap: got command '%s'", command);
SOAPCommand connection;
// commands are executed in the world thread. We have to wait for them to be completed
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index eb0747e349..f09284a788 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -76,7 +76,7 @@ public:
if (!_delayTime)
return;
- LOG_INFO("server", "Starting up anti-freeze thread (%u seconds max stuck time)...", _delayTime / 1000);
+ LOG_INFO("server.worldserver", "Starting up anti-freeze thread (%u seconds max stuck time)...", _delayTime / 1000);
while (!World::IsStopped())
{
uint32 curtime = getMSTime();
@@ -87,13 +87,13 @@ public:
}
else if (getMSTimeDiff(_lastChange, curtime) > _delayTime)
{
- LOG_INFO("server", "World Thread hangs, kicking out server!");
+ LOG_INFO("server.worldserver", "World Thread hangs, kicking out server!");
ABORT();
}
Acore::Thread::Sleep(1000);
}
- LOG_INFO("server", "Anti-freeze thread exiting without problems.");
+ LOG_INFO("server.worldserver", "Anti-freeze thread exiting without problems.");
}
};
@@ -120,10 +120,10 @@ int Master::Run()
if (!pidFile.empty())
{
if (uint32 pid = CreatePIDFile(pidFile))
- LOG_ERROR("server", "Daemon PID: %u\n", pid); // outError for red color in console
+ LOG_ERROR("server.worldserver", "Daemon PID: %u\n", pid); // outError for red color in console
else
{
- LOG_ERROR("server", "Cannot create PID file %s (possible error: permission)\n", pidFile.c_str());
+ LOG_ERROR("server.worldserver", "Cannot create PID file %s (possible error: permission)\n", pidFile.c_str());
return 1;
}
}
@@ -210,7 +210,7 @@ int Master::Run()
std::string bindIp = sConfigMgr->GetOption<std::string>("BindIP", "0.0.0.0");
if (sWorldSocketMgr->StartNetwork(worldPort, bindIp.c_str()) == -1)
{
- LOG_ERROR("server", "Failed to start network");
+ LOG_ERROR("server.worldserver", "Failed to start network");
World::StopNow(ERROR_EXIT_CODE);
// go down and shutdown the server
}
@@ -218,7 +218,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_VERSION_MISMATCH, realm.Id.Realm);
- LOG_INFO("server", "%s (worldserver-daemon) ready...", GitRevision::GetFullVersion());
+ LOG_INFO("server.worldserver", "%s (worldserver-daemon) ready...", GitRevision::GetFullVersion());
// when the main thread closes the singletons get unloaded
// since worldrunnable uses them, it will crash if unloaded after master
@@ -239,7 +239,7 @@ int Master::Run()
_StopDB();
- LOG_INFO("server", "Halting process...");
+ LOG_INFO("server.worldserver", "Halting process...");
if (cliThread)
{
@@ -319,7 +319,7 @@ bool Master::_StartDB()
realm.Id.Realm = sConfigMgr->GetOption<int32>("RealmID", 0);
if (!realm.Id.Realm)
{
- LOG_ERROR("server", "Realm ID not defined in configuration file");
+ LOG_ERROR("server.worldserver", "Realm ID not defined in configuration file");
return false;
}
else if (realm.Id.Realm > 255)
@@ -329,11 +329,11 @@ bool Master::_StartDB()
* with a size of uint8 we can "only" store up to 255 realms
* anything further the client will behave anormaly
*/
- LOG_ERROR("server", "Realm ID must range from 1 to 255");
+ LOG_ERROR("server.worldserver", "Realm ID must range from 1 to 255");
return false;
}
- LOG_INFO("server", "Realm running as realm ID %d", realm.Id.Realm);
+ LOG_INFO("server.worldserver", "Realm running as realm ID %d", realm.Id.Realm);
///- Clean the database before starting
ClearOnlineAccounts();
@@ -344,7 +344,7 @@ bool Master::_StartDB()
sWorld->LoadDBVersion();
sWorld->LoadDBRevision();
- LOG_INFO("server", "Using World DB: %s", sWorld->GetDBVersion());
+ LOG_INFO("server.worldserver", "Using World DB: %s", sWorld->GetDBVersion());
return true;
}
diff --git a/src/server/worldserver/WorldThread/WorldRunnable.cpp b/src/server/worldserver/WorldThread/WorldRunnable.cpp
index 24ca2a28d9..9c99a7a7fa 100644
--- a/src/server/worldserver/WorldThread/WorldRunnable.cpp
+++ b/src/server/worldserver/WorldThread/WorldRunnable.cpp
@@ -84,7 +84,7 @@ void WorldRunnable::run()
void AuctionListingRunnable::run()
{
- LOG_INFO("server", "Starting up Auction House Listing thread...");
+ LOG_INFO("auctionHouse", "Starting up Auction House Listing thread...");
while (!World::IsStopped())
{
if (AsyncAuctionListingMgr::IsAuctionListingAllowed())
@@ -122,5 +122,5 @@ void AuctionListingRunnable::run()
}
Acore::Thread::Sleep(1);
}
- LOG_INFO("server", "Auction House Listing thread exiting without problems.");
+ LOG_INFO("auctionHouse", "Auction House Listing thread exiting without problems.");
}
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 00f8ef3baa..e34efb851d 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -3482,9 +3482,11 @@ Appender.DBErrors=2,5,0,DBErrors.log
#
Logger.root=2,Console Server
-Logger.server=4,Console Server
Logger.commands.gm=4,Console GM
+Logger.diff=3,Console Server
+Logger.mmaps=4,Server
Logger.scripts.hotswap=4,Console Server
+Logger.server=4,Console Server
Logger.sql.sql=2,Console DBErrors
Logger.sql=4,Console Server
Logger.mmaps=4,Server
@@ -3497,29 +3499,37 @@ Logger.mmaps=4,Server
#Logger.bg.battlefield=4,Console Server
#Logger.bg.battleground=4,Console Server
#Logger.bg.reportpvpafk=4,Console Server
-#Logger.chat.log=4,Console Server
#Logger.calendar=4,Console Server
+#Logger.chat.log=4,Console Server
#Logger.chat.system=4,Console Server
#Logger.cheat=4,Console Server
#Logger.commands.ra=4,Console Server
#Logger.condition=4,Console Server
+#Logger.dbc=4,Console Server
+#Logger.disable=4,Console Server
+#Logger.entities.dyobject=4,Console Server
#Logger.entities.faction=4,Console Server
#Logger.entities.gameobject=4,Console Server
+#Logger.entities.object=4,Console Server
#Logger.entities.pet=4,Console Server
-#Logger.entities.player=4,Console Server
#Logger.entities.player.character=4,Console Server
#Logger.entities.player.dump=4,Console Server
#Logger.entities.player.items=4,Console Server
#Logger.entities.player.loading=4,Console Server
#Logger.entities.player.skills=4,Console Server
+#Logger.entities.player=4,Console Server
#Logger.entities.transport=4,Console Server
-#Logger.entities.unit=4,Console Server
#Logger.entities.unit.ai=4,Console Server
+#Logger.entities.unit=4,Console Server
#Logger.entities.vehicle=4,Console Server
#Logger.gameevent=4,Console Server
+#Logger.group=4,Console Server
#Logger.guild=4,Console Server
+#Logger.instance.save=4,Console Server
+#Logger.instance.script=4,Console Server
#Logger.lfg=4,Console Server
#Logger.loot=4,Console Server
+#Logger.mail=4,Console Server
#Logger.maps.script=4,Console Server
#Logger.maps=4,Console Server
#Logger.misc=4,Console Server
@@ -3527,30 +3537,34 @@ Logger.mmaps=4,Server
#Logger.movement.flightpath=4,Console Server
#Logger.movement.motionmaster=4,Console Server
#Logger.movement.splinechain=4,Console Server
-#Logger.network=4,Console Server
+#Logger.movement=4,Console Server
#Logger.network.kick=4,Console Server
#Logger.network.opcode=4,Console Server
#Logger.network.soap=4,Console Server
+#Logger.network=4,Console Server
#Logger.outdoorpvp=4,Console Server
#Logger.pool=4,Console Server
#Logger.rbac=4,Console Server
-#Logger.scripts=4,Console Server
-#Logger.scripts.ai=4,Console Server
+#Logger.reputation=4,Console Server
#Logger.scripts.ai.escortai=4,Console Server
#Logger.scripts.ai.followerai=4,Console Server
#Logger.scripts.ai.petai=4,Console Server
#Logger.scripts.ai.sai=4,Console Server
+#Logger.scripts.ai=4,Console Server
#Logger.scripts.cos=4,Console Server
+#Logger.scripts=4,Console Server
#Logger.server.authserver=4,Console Server
-#Logger.spells=4,Console Server
-#Logger.spells.aura.effect=4,Console Server
#Logger.spells.aura.effect.nospell=4,Console Server
-#Logger.spells.effect=4,Console Server
+#Logger.spells.aura.effect=4,Console Server
#Logger.spells.effect.nospell=4,Console Server
+#Logger.spells.effect=4,Console Server
+#Logger.spells.scripts=4,Console Server
+#Logger.spells=4,Console Server
#Logger.sql.dev=4,Console Server
#Logger.sql.driver=4,Console Server
-#Logger.warden=4,Console Server
#Logger.vehicles=4,Console Server
+#Logger.warden=4,Console Server
+#Logger.weather=4,Console Server
###################################################################################################
###################################################################################################
diff --git a/src/tools/map_extractor/wdt.h b/src/tools/map_extractor/wdt.h
index 301e245471..7a0b55fca2 100644
--- a/src/tools/map_extractor/wdt.h
+++ b/src/tools/map_extractor/wdt.h
@@ -79,4 +79,4 @@ public:
wdt_MWMO* wmo;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/ADT.h b/src/tools/mesh_extractor/ADT.h
index c603ee96eb..dc7459531f 100644
--- a/src/tools/mesh_extractor/ADT.h
+++ b/src/tools/mesh_extractor/ADT.h
@@ -35,4 +35,4 @@ public:
int X;
int Y;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/Chunk.h b/src/tools/mesh_extractor/Chunk.h
index 2a63f54620..f5b2865aee 100644
--- a/src/tools/mesh_extractor/Chunk.h
+++ b/src/tools/mesh_extractor/Chunk.h
@@ -23,4 +23,4 @@ public:
FILE* Stream;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/ChunkedData.h b/src/tools/mesh_extractor/ChunkedData.h
index f5f08c34be..af2bd8e899 100644
--- a/src/tools/mesh_extractor/ChunkedData.h
+++ b/src/tools/mesh_extractor/ChunkedData.h
@@ -24,4 +24,4 @@ public:
std::vector<Chunk*> Chunks;
FILE* Stream;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/Constants.h b/src/tools/mesh_extractor/Constants.h
index 45ed5a0957..7eb88837d9 100644
--- a/src/tools/mesh_extractor/Constants.h
+++ b/src/tools/mesh_extractor/Constants.h
@@ -61,4 +61,4 @@ public:
static const int TilesPerMap;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/DBC.h b/src/tools/mesh_extractor/DBC.h
index d7b28e094e..9d1758b690 100644
--- a/src/tools/mesh_extractor/DBC.h
+++ b/src/tools/mesh_extractor/DBC.h
@@ -56,4 +56,4 @@ public:
}
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/Geometry.h b/src/tools/mesh_extractor/Geometry.h
index e0cb1264ad..52e7e1be72 100644
--- a/src/tools/mesh_extractor/Geometry.h
+++ b/src/tools/mesh_extractor/Geometry.h
@@ -26,4 +26,4 @@ public:
std::vector<Triangle<uint32>> Triangles;
bool Transform;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/LiquidHandler.h b/src/tools/mesh_extractor/LiquidHandler.h
index 0cb959cbb4..8971f5048f 100644
--- a/src/tools/mesh_extractor/LiquidHandler.h
+++ b/src/tools/mesh_extractor/LiquidHandler.h
@@ -24,4 +24,4 @@ public:
private:
void HandleNewLiquid();
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/MPQManager.h b/src/tools/mesh_extractor/MPQManager.h
index 2d5353b1f9..777ff4fb4f 100644
--- a/src/tools/mesh_extractor/MPQManager.h
+++ b/src/tools/mesh_extractor/MPQManager.h
@@ -40,4 +40,4 @@ private:
};
extern MPQManager* MPQHandler;
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/MapChunk.h b/src/tools/mesh_extractor/MapChunk.h
index 2484362d71..827cdf49e9 100644
--- a/src/tools/mesh_extractor/MapChunk.h
+++ b/src/tools/mesh_extractor/MapChunk.h
@@ -27,4 +27,4 @@ public:
std::vector<Triangle<uint8>> Triangles;
int32 Index;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/Model.h b/src/tools/mesh_extractor/Model.h
index d69972c3d9..0cf5bb7635 100644
--- a/src/tools/mesh_extractor/Model.h
+++ b/src/tools/mesh_extractor/Model.h
@@ -26,4 +26,4 @@ public:
FILE* Stream;
bool IsBad;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/ObjectDataHandler.h b/src/tools/mesh_extractor/ObjectDataHandler.h
index 8285620c67..2a7afb1ffc 100644
--- a/src/tools/mesh_extractor/ObjectDataHandler.h
+++ b/src/tools/mesh_extractor/ObjectDataHandler.h
@@ -18,4 +18,4 @@ public:
virtual void ProcessInternal(MapChunk* data) = 0;
ADT* Source;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/TileBuilder.h b/src/tools/mesh_extractor/TileBuilder.h
index 14dd3dd4ff..1d2a32c191 100644
--- a/src/tools/mesh_extractor/TileBuilder.h
+++ b/src/tools/mesh_extractor/TileBuilder.h
@@ -37,4 +37,4 @@ public:
uint32 DataSize;
ContinentBuilder* cBuilder;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/WDT.h b/src/tools/mesh_extractor/WDT.h
index 671a022023..67d0baebc7 100644
--- a/src/tools/mesh_extractor/WDT.h
+++ b/src/tools/mesh_extractor/WDT.h
@@ -32,4 +32,4 @@ private:
void ReadTileTable();
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/WorldModelGroup.h b/src/tools/mesh_extractor/WorldModelGroup.h
index 93b055fc5d..1bcd81b1d4 100644
--- a/src/tools/mesh_extractor/WorldModelGroup.h
+++ b/src/tools/mesh_extractor/WorldModelGroup.h
@@ -41,4 +41,4 @@ private:
void ReadHeader();
void ReadBatches();
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/WorldModelHandler.h b/src/tools/mesh_extractor/WorldModelHandler.h
index 5ccef553a3..3396cc6049 100644
--- a/src/tools/mesh_extractor/WorldModelHandler.h
+++ b/src/tools/mesh_extractor/WorldModelHandler.h
@@ -50,4 +50,4 @@ private:
std::vector<WorldModelDefinition>* _definitions;
std::vector<std::string>* _paths;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/tools/mesh_extractor/WorldModelRoot.h b/src/tools/mesh_extractor/WorldModelRoot.h
index e94375dc0c..3a7c09d1b9 100644
--- a/src/tools/mesh_extractor/WorldModelRoot.h
+++ b/src/tools/mesh_extractor/WorldModelRoot.h
@@ -30,4 +30,4 @@ private:
void ReadDoodadInstances();
void ReadHeader();
};
-#endif \ No newline at end of file
+#endif