diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-01-08 21:16:53 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-01-08 21:16:53 +0100 |
commit | d791afae1dfcfaf592326f787755ca32d629e4d3 (patch) | |
tree | 54dc9916ede5800e110a2f0edff91530811fbdb8 /src/server/game/Handlers/SpellHandler.cpp | |
parent | b6820a706f46f18b9652fcd9806e4bec8805d29d (diff) |
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 2be6d4612c9..020709d3864 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -143,7 +143,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPackets::Spells::OpenItem& packet) // ignore for remote control state if (player->GetUnitBeingMoved() != player) return; - TC_LOG_INFO("network", "bagIndex: %u, slot: %u", packet.Slot, packet.PackSlot); + TC_LOG_INFO("network", "bagIndex: {}, slot: {}", packet.Slot, packet.PackSlot); // additional check, client outputs message on its own if (!player->IsAlive()) @@ -170,8 +170,8 @@ void WorldSession::HandleOpenItemOpcode(WorldPackets::Spells::OpenItem& packet) if (!proto->HasFlag(ITEM_FLAG_HAS_LOOT) && !item->IsWrapped()) { player->SendEquipError(EQUIP_ERR_CLIENT_LOCKED_OUT, item, nullptr); - TC_LOG_ERROR("entities.player.cheat", "Possible hacking attempt: Player %s %s tried to open item [%s, entry: %u] which is not openable!", - player->GetName().c_str(), player->GetGUID().ToString().c_str(), item->GetGUID().ToString().c_str(), proto->GetId()); + TC_LOG_ERROR("entities.player.cheat", "Possible hacking attempt: Player {} {} tried to open item [{}, entry: {}] which is not openable!", + player->GetName(), player->GetGUID().ToString(), item->GetGUID().ToString(), proto->GetId()); return; } @@ -184,7 +184,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPackets::Spells::OpenItem& packet) if (!lockInfo) { player->SendEquipError(EQUIP_ERR_ITEM_LOCKED, item, nullptr); - TC_LOG_ERROR("network", "WORLD::OpenItem: item %s has an unknown lockId: %u!", item->GetGUID().ToString().c_str(), lockId); + TC_LOG_ERROR("network", "WORLD::OpenItem: item {} has an unknown lockId: {}!", item->GetGUID().ToString(), lockId); return; } @@ -243,7 +243,7 @@ void WorldSession::HandleOpenWrappedItemCallback(uint16 pos, ObjectGuid itemGuid if (!result) { - TC_LOG_ERROR("network", "Wrapped item %s does't have record in character_gifts table and will deleted", item->GetGUID().ToString().c_str()); + TC_LOG_ERROR("network", "Wrapped item {} does't have record in character_gifts table and will deleted", item->GetGUID().ToString()); GetPlayer()->DestroyItem(item->GetBagSlot(), item->GetSlot(), true); return; } @@ -307,7 +307,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast) SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cast.Cast.SpellID, mover->GetMap()->GetDifficultyID()); if (!spellInfo) { - TC_LOG_ERROR("network", "WORLD: unknown spell id %u", cast.Cast.SpellID); + TC_LOG_ERROR("network", "WORLD: unknown spell id {}", cast.Cast.SpellID); return; } @@ -430,7 +430,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPackets::Spells::PetCancelAura { if (sSpellMgr->GetSpellInfo(packet.SpellID, DIFFICULTY_NONE)) { - TC_LOG_ERROR("network", "WORLD: unknown PET spell id %u", packet.SpellID); + TC_LOG_ERROR("network", "WORLD: unknown PET spell id {}", packet.SpellID); return; } @@ -438,13 +438,13 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPackets::Spells::PetCancelAura if (!pet) { - TC_LOG_ERROR("network", "HandlePetCancelAura: Attempt to cancel an aura for non-existant %s by player '%s'", packet.PetGUID.ToString().c_str(), GetPlayer()->GetName().c_str()); + TC_LOG_ERROR("network", "HandlePetCancelAura: Attempt to cancel an aura for non-existant {} by player '{}'", packet.PetGUID.ToString(), GetPlayer()->GetName()); return; } if (pet != GetPlayer()->GetGuardianPet() && pet != GetPlayer()->GetCharmed()) { - TC_LOG_ERROR("network", "HandlePetCancelAura: %s is not a pet of player '%s'", packet.PetGUID.ToString().c_str(), GetPlayer()->GetName().c_str()); + TC_LOG_ERROR("network", "HandlePetCancelAura: {} is not a pet of player '{}'", packet.PetGUID.ToString(), GetPlayer()->GetName()); return; } |