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:
Shauren
2015-04-08 23:35:27 +02:00
parent f0f027a79e
commit e651dbec0e

View File

@@ -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);