mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Fix Callback in zone, some stragglers in the renaming of function
This commit is contained in:
parent
132fbbb0c6
commit
f410b270ad
@ -81,6 +81,7 @@ public:
|
||||
void LoadLogSettingsDefaults();
|
||||
void Log(uint16 log_type, const std::string message, ...);
|
||||
void LogDebug(DebugLevel debug_level, std::string message, ...);
|
||||
//void DebugCategory(DebugLevel debug_level, uint16 log_category, std::string message, ...);
|
||||
void DebugCategory(DebugLevel debug_level, uint16 log_category, std::string message, ...);
|
||||
void MakeDirectory(std::string directory_name);
|
||||
void SetCurrentTimeStamp(char* time_stamp);
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
#define VERIFY_PACKET_LENGTH(OPCode, Packet, StructName) \
|
||||
if(Packet->size != sizeof(StructName)) \
|
||||
{ \
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Size mismatch in " #OPCode " expected %i got %i", sizeof(StructName), Packet->size); \
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Size mismatch in " #OPCode " expected %i got %i", sizeof(StructName), Packet->size); \
|
||||
DumpPacket(Packet); \
|
||||
return; \
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
//check length of packet before decoding. Call before setup.
|
||||
#define ENCODE_LENGTH_EXACT(struct_) \
|
||||
if((*p)->size != sizeof(struct_)) { \
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on outbound %s (" #struct_ "): Got %d, expected %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on outbound %s (" #struct_ "): Got %d, expected %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
|
||||
_hex(NET__STRUCT_HEX, (*p)->pBuffer, (*p)->size); \
|
||||
delete *p; \
|
||||
*p = nullptr; \
|
||||
@ -72,7 +72,7 @@
|
||||
}
|
||||
#define ENCODE_LENGTH_ATLEAST(struct_) \
|
||||
if((*p)->size < sizeof(struct_)) { \
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on outbound %s (" #struct_ "): Got %d, expected at least %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on outbound %s (" #struct_ "): Got %d, expected at least %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
|
||||
_hex(NET__STRUCT_HEX, (*p)->pBuffer, (*p)->size); \
|
||||
delete *p; \
|
||||
*p = nullptr; \
|
||||
@ -127,14 +127,14 @@
|
||||
#define DECODE_LENGTH_EXACT(struct_) \
|
||||
if(__packet->size != sizeof(struct_)) { \
|
||||
__packet->SetOpcode(OP_Unknown); /* invalidate the packet */ \
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on incoming %s (" #struct_ "): Got %d, expected %d", opcodes->EmuToName(__packet->GetOpcode()), __packet->size, sizeof(struct_)); \
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on incoming %s (" #struct_ "): Got %d, expected %d", opcodes->EmuToName(__packet->GetOpcode()), __packet->size, sizeof(struct_)); \
|
||||
_hex(NET__STRUCT_HEX, __packet->pBuffer, __packet->size); \
|
||||
return; \
|
||||
}
|
||||
#define DECODE_LENGTH_ATLEAST(struct_) \
|
||||
if(__packet->size < sizeof(struct_)) { \
|
||||
__packet->SetOpcode(OP_Unknown); /* invalidate the packet */ \
|
||||
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on incoming %s (" #struct_ "): Got %d, expected at least %d", opcodes->EmuToName(__packet->GetOpcode()), __packet->size, sizeof(struct_)); \
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Netcode, "Wrong size on incoming %s (" #struct_ "): Got %d, expected at least %d", opcodes->EmuToName(__packet->GetOpcode()), __packet->size, sizeof(struct_)); \
|
||||
_hex(NET__STRUCT_HEX, __packet->pBuffer, __packet->size); \
|
||||
return; \
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ public:
|
||||
// random object that provides random values for the zone
|
||||
EQEmu::Random random;
|
||||
|
||||
void GMSayHookCallBackProcess(uint16 log_type, std::string& message){ entity_list.MessageStatus(0, 80, gmsay_log_message_colors[log_type], "%s", message.c_str()); }
|
||||
static void GMSayHookCallBackProcess(uint16 log_type, std::string& message){ entity_list.MessageStatus(0, 80, gmsay_log_message_colors[log_type], "%s", message.c_str()); }
|
||||
|
||||
//MODDING HOOKS
|
||||
void mod_init();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user