mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user