mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-26 00:13:52 +00:00
Move GMSayHookCallBackProcess out of client logs and into Zone Class
This commit is contained in:
parent
a1df2b8f64
commit
78e08e5327
@ -105,19 +105,7 @@ void ClientLogs::msg(EQEmuLog::LogIDs id, const char *buf) {
|
||||
}
|
||||
}
|
||||
|
||||
static uint32 gmsay_log_message_colors[EQEmuLogSys::MaxLogID] = {
|
||||
15, // "Status", - Yellow
|
||||
15, // "Normal", - Yellow
|
||||
3, // "Error", - Red
|
||||
14, // "Debug", - Light Green
|
||||
4, // "Quest",
|
||||
5, // "Command",
|
||||
3 // "Crash"
|
||||
};
|
||||
|
||||
void ClientLogs::ClientMessage(uint16 log_type, std::string& message){
|
||||
entity_list.MessageStatus(0, 80, gmsay_log_message_colors[log_type], "%s", message.c_str());
|
||||
}
|
||||
|
||||
#endif //CLIENT_LOGS
|
||||
|
||||
|
||||
@ -43,7 +43,6 @@ public:
|
||||
void clear(); //unsubscribes everybody
|
||||
|
||||
void msg(EQEmuLog::LogIDs id, const char *buf);
|
||||
static void ClientMessage(uint16 log_type, std::string& message);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@ -175,7 +175,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
/* Register Log System and Settings */
|
||||
logger.LoadLogSettingsDefaults();
|
||||
logger.OnLogHookCallBackZone(&ClientLogs::ClientMessage);
|
||||
logger.OnLogHookCallBackZone(&Zone::GMSayHookCallBackProcess);
|
||||
database.LoadLogSysSettings(logger.log_settings);
|
||||
|
||||
guild_mgr.SetDatabase(&database);
|
||||
|
||||
12
zone/zone.h
12
zone/zone.h
@ -67,6 +67,16 @@ struct item_tick_struct {
|
||||
std::string qglobal;
|
||||
};
|
||||
|
||||
static uint32 gmsay_log_message_colors[EQEmuLogSys::MaxLogID] = {
|
||||
15, // "Status", - Yellow
|
||||
15, // "Normal", - Yellow
|
||||
3, // "Error", - Red
|
||||
14, // "Debug", - Light Green
|
||||
4, // "Quest",
|
||||
5, // "Command",
|
||||
3 // "Crash"
|
||||
};
|
||||
|
||||
class Client;
|
||||
class Map;
|
||||
class Mob;
|
||||
@ -261,6 +271,8 @@ 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()); }
|
||||
|
||||
//MODDING HOOKS
|
||||
void mod_init();
|
||||
void mod_repop();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user