mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +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 @@ 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user