Core/Misc: fixed GCC build

This commit is contained in:
Ovahlord committed 2025-03-10 10:41:45 +01:00
1 parent 2953efb7a3
commit 5cc9d58f0c
3 files changed
+8 -7

No files matched your search

@@ -19,6 +19,7 @@
#define TRINITY_CHATCOMMANDHELPERS_H
#include "advstd.h"
#include <cstddef>
#include <type_traits>
namespace Trinity {
+5 -5
View File
@@ -488,11 +488,11 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
_worldSession->ResetTimeOutTime(true);
return ReadDataHandlerResult::Ok;
}
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler: client {} sent CMSG_KEEP_ALIVE without being authenticated", GetRemoteIpAddress().to_string());
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler: client %s sent CMSG_KEEP_ALIVE without being authenticated", GetRemoteIpAddress().to_string().c_str());
return ReadDataHandlerResult::Error;
case CMSG_LOG_DISCONNECT:
LogOpcodeText(opcode, sessionGuard);
TC_LOG_DEBUG("network", "WorldSocket::ReadDataHandler: client {} sent CMSG_LOG_DISCONNECT reason {}", GetRemoteIpAddress().to_string(), packet.read<uint32>());
TC_LOG_DEBUG("network", "WorldSocket::ReadDataHandler: client %s sent CMSG_LOG_DISCONNECT reason %u", GetRemoteIpAddress().to_string().c_str(), packet.read<uint32>());
break;
case CMSG_ENABLE_NAGLE:
LogOpcodeText(opcode, sessionGuard);
@@ -506,7 +506,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
WorldPackets::Auth::ConnectToFailed connectToFailed(std::move(packet));
if (!connectToFailed.ReadNoThrow())
{
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client {} sent malformed CMSG_CONNECT_TO_FAILED", GetRemoteIpAddress().to_string());
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client %s sent malformed CMSG_CONNECT_TO_FAILED", GetRemoteIpAddress().to_string().c_str());
return ReadDataHandlerResult::Error;
}
HandleConnectToFailed(connectToFailed);
@@ -530,7 +530,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
ClientOpcodeHandler const* handler = opcodeTable[opcode];
if (!handler)
{
TC_LOG_ERROR("network.opcode", "No defined handler for opcode %s sent by %s", GetOpcodeNameForLogging(static_cast<OpcodeClient>(packet.GetOpcode())).c_str(), _worldSession->GetPlayerInfo());
TC_LOG_ERROR("network.opcode", "No defined handler for opcode %s sent by %s", GetOpcodeNameForLogging(static_cast<OpcodeClient>(packet.GetOpcode())).c_str(), _worldSession->GetPlayerInfo().c_str());
break;
}
@@ -554,7 +554,7 @@ void WorldSocket::LogOpcodeText(OpcodeClient opcode, std::unique_lock<std::mutex
}
else
{
TC_LOG_TRACE("network.opcode", "C->S: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(),
TC_LOG_TRACE("network.opcode", "C->S: %s %s", (_worldSession ? _worldSession->GetPlayerInfo().c_str() : GetRemoteIpAddress().to_string()).c_str(),
GetOpcodeNameForLogging(opcode).c_str());
}
}
@@ -741,14 +741,14 @@ void AuraEffect::CalculateSpellMod()
{
isValid = false;
if (logErrors())
TC_LOG_ERROR("spells.aura.effect", "Aura script for spell id {} created invalid spell modifier op {}", GetId(), AsUnderlyingType(m_spellmod->op));
TC_LOG_ERROR("spells.aura.effect", "Aura script for spell id %u created invalid spell modifier op %u", GetId(), AsUnderlyingType(m_spellmod->op));
}
if (m_spellmod->type >= SPELLMOD_END)
{
isValid = false;
if (logErrors())
TC_LOG_ERROR("spells.aura.effect", "Aura script for spell id {} created invalid spell modifier type {}", GetId(), AsUnderlyingType(m_spellmod->type));
TC_LOG_ERROR("spells.aura.effect", "Aura script for spell id %u created invalid spell modifier type %u", GetId(), AsUnderlyingType(m_spellmod->type));
}
if (!isValid)