This commit is contained in:
Akkadius 2015-01-20 00:53:52 -06:00
parent 4c18b96aa5
commit 951f98a63e
4 changed files with 26 additions and 1 deletions

View File

@ -142,6 +142,28 @@ uint16 EQEmuLogSys::GetConsoleColorFromCategory(uint16 log_category){
}
}
uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category){
switch (log_category) {
case Logs::Status:
case Logs::Normal:
return 15; /* Yellow */
case Logs::MySQLError:
case Logs::Error:
return 13; /* Red */
case Logs::MySQLQuery:
case Logs::Debug:
return 14; /* Light Green */
case Logs::Quests:
return 258; /* Light Cyan */
case Logs::Commands:
return 5; /* Light Purple */
case Logs::Crash:
return 13; /* Red */
default:
return 15; /* Yellow */
}
}
void EQEmuLogSys::ProcessConsoleMessage(uint16 log_category, const std::string message)
{
/* Check if category enabled for process */

View File

@ -143,6 +143,8 @@ public:
bool log_settings_loaded = false;
int log_platform = 0;
uint16 GetGMSayColorFromCategory(uint16 log_category);
void OnLogHookCallBackZone(std::function<void(uint16 log_type, std::string&)> f) { on_log_gmsay_hook = f; }
private:

View File

@ -2299,3 +2299,4 @@ void Zone::UpdateHotzone()
is_hotzone = atoi(row[0]) == 0 ? false: true;
}

View File

@ -271,7 +271,7 @@ public:
// random object that provides random values for the zone
EQEmu::Random random;
static void GMSayHookCallBackProcess(uint16 log_category, std::string& message){ entity_list.MessageStatus(0, 80, 15, "%s", message.c_str()); }
static void GMSayHookCallBackProcess(uint16 log_category, std::string& message){ entity_list.MessageStatus(0, 80, Log.GetGMSayColorFromCategory(log_category), "%s", message.c_str()); }
//MODDING HOOKS
void mod_init();