mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-14 22:19:25 +01:00
Core/Misc: Added a nice static_assert to prevent adding server opcode "handlers" with status other than UNHANDLED or NEVER
This commit is contained in:
@@ -829,6 +829,7 @@ void OpcodeTable::Initialize()
|
||||
#undef DEFINE_HANDLER
|
||||
|
||||
#define DEFINE_SERVER_OPCODE_HANDLER(opcode, status, con) \
|
||||
static_assert(status == STATUS_NEVER || status == STATUS_UNHANDLED, "Invalid status for server opcode"); \
|
||||
ValidateAndSetServerOpcode(opcode, #opcode, status, con)
|
||||
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_ABORT_NEW_WORLD, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
|
||||
Reference in New Issue
Block a user