mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/NetworkIO: Added latency info for opcodes overflow log
This commit is contained in:
@@ -761,7 +761,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (PlayerLoading() || GetPlayer() != NULL)
|
||||
{
|
||||
TC_LOG_ERROR("network", "Player tryes to login again, AccountId = %d", GetAccountId());
|
||||
TC_LOG_ERROR("network", "Player tries to login again, AccountId = %d", GetAccountId());
|
||||
KickPlayer();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -869,7 +869,7 @@ void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket& recvData)
|
||||
uint32 talentId, talentRank;
|
||||
|
||||
// Client has max 24 talents, rounded up : 30
|
||||
const int MaxTalentsCount = 30;
|
||||
uint32 const MaxTalentsCount = 30;
|
||||
|
||||
for (uint32 i = 0; i < talentsCount && i < MaxTalentsCount; ++i)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
|
||||
uint32 talentId, talentRank;
|
||||
|
||||
// Client has max 44 talents for tree for 3 trees, rounded up : 150
|
||||
const int MaxTalentsCount = 150;
|
||||
uint32 const MaxTalentsCount = 150;
|
||||
|
||||
for (uint32 i = 0; i < talentsCount && i < MaxTalentsCount; ++i)
|
||||
{
|
||||
|
||||
@@ -1259,8 +1259,8 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p, time_t time) co
|
||||
if (++packetCounter.amountCounter > maxPacketCounterAllowed)
|
||||
{
|
||||
dosTriggered = true;
|
||||
TC_LOG_WARN("network", "AntiDOS: Account %u, IP: %s, Character: %s, flooding packet (opc: %s (0x%X), count: %u)",
|
||||
Session->GetAccountId(), Session->GetRemoteAddress().c_str(), Session->GetPlayerName().c_str(),
|
||||
TC_LOG_WARN("network", "AntiDOS: Account %u, IP: %s, Ping: %u, Character: %s, flooding packet (opc: %s (0x%X), count: %u)",
|
||||
Session->GetAccountId(), Session->GetRemoteAddress().c_str(), Session->GetLatency(), Session->GetPlayerName().c_str(),
|
||||
opcodeTable[p.GetOpcode()].name, p.GetOpcode(), packetCounter.amountCounter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user