Core/PacketIO: Continue processing packets even if player is not in world

(cherry picked from commit aee4f0350e)
This commit is contained in:
jackpoz
2022-04-18 12:17:14 +02:00
committed by Shauren
parent ce4916ec79
commit 3bedbf6596

View File

@@ -370,13 +370,16 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
"Player is currently not in world yet.", GetOpcodeNameForLogging(static_cast<OpcodeClient>(packet->GetOpcode())).c_str());
}
}
else if (_player->IsInWorld() && AntiDOS.EvaluateOpcode(*packet, currentTime))
else if (_player->IsInWorld())
{
sScriptMgr->OnPacketReceive(this, *packet);
opHandle->Call(this, *packet);
if(AntiDOS.EvaluateOpcode(*packet, currentTime))
{
sScriptMgr->OnPacketReceive(this, *packet);
opHandle->Call(this, *packet);
}
else
processedPackets = MAX_PROCESSED_PACKETS_IN_SAME_WORLDSESSION_UPDATE; // break out of packet processing loop
}
else
processedPackets = MAX_PROCESSED_PACKETS_IN_SAME_WORLDSESSION_UPDATE; // break out of packet processing loop
// lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer
break;
case STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT: