Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OpcodeTable::ValidateAndSetOpcode(OpcodeServer opcode, char const* name, SessionStatus status)
- {
- if (uint32(opcode) == 0xBADD)
- {
- TC_LOG_ERROR("network", "Opcode %s does not have a value", name);
- return;
- }
- if (uint32(opcode) >= NUM_OPCODE_HANDLERS)
- {
- TC_LOG_ERROR("network", "Tried to set handler for an invalid opcode %d", opcode);
- return;
- }
- if (_internalTableServer[opcode] != NULL)
- {
- TC_LOG_ERROR("network", "Tried to override server handler of %s with %s (opcode %u)", opcodeTable[opcode]->Name, name, opcode);
- return;
- }
- _internalTableServer[opcode] = new PacketHandler<WorldPacket, &WorldSession::Handle_ServerSide>(name, status, PROCESS_INPLACE);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement