mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Fix Opcode dispatch, trusts every queued packet to have a handler
This commit is contained in:
parent
5a0c27637e
commit
d0ac9452f4
@ -227,6 +227,12 @@ void PlayerbotHolder::HandleBotPackets(WorldSession* session)
|
||||
{
|
||||
OpcodeClient opcode = static_cast<OpcodeClient>(packet->GetOpcode());
|
||||
ClientOpcodeHandler const* opHandle = opcodeTable[opcode];
|
||||
if (!opHandle)
|
||||
{
|
||||
LOG_ERROR("playerbots", "Unhandled opcode {} queued for bot session {}. Packet dropped.", static_cast<uint32>(opcode), session->GetAccountId());
|
||||
delete packet;
|
||||
continue;
|
||||
}
|
||||
opHandle->Call(session, *packet);
|
||||
delete packet;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user