From f0fef787616b240f4d4dece0973ec20b3464a0e7 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 7 Nov 2006 20:56:28 +0000 Subject: - Applied FlavioJs's patch which enables colored console output for Windows systems. It also includes a config setting called "stdout_with_ansisequence" with which you can turn off the color codes (in case you are logging all output) - Added error reporting when the max number of ground unit cells has been reached (this may be the reason why sometimes it fails to recognize when you step out of a song/dance/encore) - Added passing the Endure effect to other devoted people. Note that the "hit count" is individual for each character, and only when it ends on the Crusader himself will that force it to end on everyone else. It also will not transfer on gvg grounds, but it does transfer in pvp. - Fixed Reflect-Shield triggering Auto-Guard instead on devoted chars. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9168 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index 52035d3bd..f55a85170 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -3292,6 +3292,18 @@ int parse_console(char *buf) { return 0; } +//------------------------------------------------- +// Return numerical value of a switch configuration +// on/off, english, franais, deutsch, espaol +//------------------------------------------------- +int config_switch(const char *str) { + if (strcmpi(str, "on") == 0 || strcmpi(str, "yes") == 0 || strcmpi(str, "oui") == 0 || strcmpi(str, "ja") == 0 || strcmpi(str, "si") == 0) + return 1; + if (strcmpi(str, "off") == 0 || strcmpi(str, "no") == 0 || strcmpi(str, "non") == 0 || strcmpi(str, "nein") == 0) + return 0; + return atoi(str); +} + /*========================================== * ݒt@C?? *------------------------------------------ @@ -3321,6 +3333,8 @@ int map_config_read(char *cfgName) { if(strcmpi(w1,"timestamp_format")==0){ strncpy(timestamp_format, w2, 20); + } else if(strcmpi(w1,"stdout_with_ansisequence")==0){ + stdout_with_ansisequence = config_switch(w2); } else if(strcmpi(w1,"console_silent")==0){ msg_silent = 0; //To always allow the next line to show up. ShowInfo("Console Silent Setting: %d\n", atoi(w2)); -- cgit v1.2.3-70-g09d2