diff options
| author | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2023-08-15 20:10:04 +0200 |
| commit | aaa6e73c8ca6d60e943cb964605536eb78219db2 (patch) | |
| tree | f5a0187925e646ef071d647efa7a5dac20501813 /src/server/game/Entities/Pet | |
| parent | 825c697a764017349ca94ecfca8f30a8365666c0 (diff) | |
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
(cherry picked from commit d791afae1dfcfaf592326f787755ca32d629e4d3)
Diffstat (limited to 'src/server/game/Entities/Pet')
| -rw-r--r-- | src/server/game/Entities/Pet/Pet.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 8e57375e2e8..d4b8d373fc8 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -238,8 +238,8 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c if (!IsPositionValid()) { - TC_LOG_ERROR("entities.pet", "Pet%s not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", - GetGUID().ToString().c_str(), GetPositionX(), GetPositionY()); + TC_LOG_ERROR("entities.pet", "Pet{} not loaded. Suggested coordinates isn't valid (X: {} Y: {})", + GetGUID().ToString(), GetPositionX(), GetPositionY()); return false; } @@ -273,7 +273,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c break; default: if (!IsPetGhoul()) - TC_LOG_ERROR("entities.pet", "Pet have incorrect type (%u) for pet loading.", getPetType()); + TC_LOG_ERROR("entities.pet", "Pet have incorrect type ({}) for pet loading.", getPetType()); break; } @@ -291,8 +291,8 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c Relocate(px, py, pz, owner->GetOrientation()); if (!IsPositionValid()) { - TC_LOG_ERROR("entities.pet", "Pet %s not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", - GetGUID().ToString().c_str(), GetPositionX(), GetPositionY()); + TC_LOG_ERROR("entities.pet", "Pet {} not loaded. Suggested coordinates isn't valid (X: {} Y: {})", + GetGUID().ToString(), GetPositionX(), GetPositionY()); return false; } @@ -407,7 +407,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c CleanupActionBar(); // remove unknown spells from action bar after load - TC_LOG_DEBUG("entities.pet", "New Pet has %s", GetGUID().ToString().c_str()); + TC_LOG_DEBUG("entities.pet", "New Pet has {}", GetGUID().ToString()); owner->PetSpellInitialize(); @@ -639,7 +639,7 @@ void Pet::Update(uint32 diff) { if (owner->GetPetGUID() != GetGUID()) { - TC_LOG_ERROR("entities.pet", "Pet %u is not pet of owner %s, removed", GetEntry(), GetOwner()->GetName().c_str()); + TC_LOG_ERROR("entities.pet", "Pet {} is not pet of owner {}, removed", GetEntry(), GetOwner()->GetName()); ASSERT(getPetType() != HUNTER_PET, "Unexpected unlinked pet found for owner %s", owner->GetSession()->GetPlayerInfo().c_str()); Remove(PET_SAVE_NOT_IN_SLOT); return; @@ -799,8 +799,8 @@ bool Pet::CreateBaseAtCreature(Creature* creature) if (!IsPositionValid()) { - TC_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()); + TC_LOG_ERROR("entities.pet", "Pet {} not created base at creature. Suggested coordinates isn't valid (X: {} Y: {})", + GetGUID().ToString(), GetPositionX(), GetPositionY()); return false; } @@ -885,7 +885,7 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) } else { - TC_LOG_ERROR("entities.pet", "Unknown type pet %u is summoned by player class %u", + TC_LOG_ERROR("entities.pet", "Unknown type pet {} is summoned by player class {}", GetEntry(), GetOwner()->GetClass()); } } @@ -1231,7 +1231,7 @@ void Pet::_SaveSpells(CharacterDatabaseTransaction trans) void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff) { - TC_LOG_DEBUG("entities.pet", "Loading auras for pet %s", GetGUID().ToString().c_str()); + TC_LOG_DEBUG("entities.pet", "Loading auras for pet {}", GetGUID().ToString()); if (result) { @@ -1263,7 +1263,7 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo) { - TC_LOG_ERROR("entities.pet", "Unknown aura (spellid %u), ignore.", spellid); + TC_LOG_ERROR("entities.pet", "Unknown aura (spellid {}), ignore.", spellid); continue; } @@ -1299,7 +1299,7 @@ void Pet::_LoadAuras(PreparedQueryResult result, uint32 timediff) } aura->SetLoadedState(maxduration, remaintime, remaincharges, stackcount, recalculatemask, critChance, applyResilience, &damage[0]); aura->ApplyForTargets(); - TC_LOG_DEBUG("entities.pet", "Added aura spellid %u, effectmask %u", spellInfo->Id, effmask); + TC_LOG_DEBUG("entities.pet", "Added aura spellid {}, effectmask {}", spellInfo->Id, effmask); } } while (result->NextRow()); @@ -1377,7 +1377,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel // do pet spell book cleanup if (state == PETSPELL_UNCHANGED) // spell load case { - TC_LOG_ERROR("entities.pet", "Pet::addSpell: Non-existed in SpellStore spell #%u request, deleting for all pets in `pet_spell`.", spellId); + TC_LOG_ERROR("entities.pet", "Pet::addSpell: Non-existed in SpellStore spell #{} request, deleting for all pets in `pet_spell`.", spellId); CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_PET_SPELL); @@ -1386,7 +1386,7 @@ bool Pet::addSpell(uint32 spellId, ActiveStates active /*= ACT_DECIDE*/, PetSpel CharacterDatabase.Execute(stmt); } else - TC_LOG_ERROR("entities.pet", "Pet::addSpell: Non-existed in SpellStore spell #%u request.", spellId); + TC_LOG_ERROR("entities.pet", "Pet::addSpell: Non-existed in SpellStore spell #{} request.", spellId); return false; } |
