summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt3
-rw-r--r--src/common/showmsg.c7
-rw-r--r--src/map/map.c3
-rw-r--r--src/map/npc.c4
4 files changed, 12 insertions, 5 deletions
diff --git a/Changelog.txt b/Changelog.txt
index ce7808a67..f8bd22ca4 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,7 @@
Date Added
12/22
+ * Added conditional SHOW_DEBUG_MSG for displaying ShowDebug()'s output, it was missing before [MC Cameri]
+ * Added #zeny, removed @charzeny [MC Cameri]
* Fixed reading itemslottable.txt causing cards to become unuseable [celest]
* Added error message if file renaming in lock_fclose fails [celest]
* Fixed frost diver not working ... my bad =p [celest]
@@ -13,7 +15,6 @@ Date Added
* Added ignore the new skill delays when chaining monk combos [celest]
12/21
- * Added #zeny, removed @charzeny [MC Cameri]
* Since conf/maps_list.txt was removed, added conf/maps_athena.conf [Ajarn]
* Fixed a few NPCs that were giving curly errors. It seems to be caused by a bug that the NPCs' last line isn't read or something [Codemaster]
* Fixed a tiny compile warning in npc.c [Codemaster]
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 8c7fc9a13..3488926bf 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -35,8 +35,9 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
case MSG_WARNING: //Bright Yellow
strcpy(prefix,CL_YELLOW"[Warning]"CL_RESET":");
break;
- case MSG_DEBUG:
+ case MSG_DEBUG: //Bright Cyan, important stuff!
strcpy(prefix,CL_CYAN"[Debug]"CL_RESET":");
+ break;
case MSG_ERROR: //Bright Red (Regular errors)
strcpy(prefix,CL_RED"[Error]"CL_RESET":");
break;
@@ -47,16 +48,20 @@ int _ShowMessage(const char *string, enum msg_type flag){ // by MC Cameri
ShowError("In function _ShowMessage() -> Invalid flag passed.\n");
return 1;
}
+ if (!(flag == MSG_DEBUG && !SHOW_DEBUG_MSG)) {
output = (char*)malloc(sizeof(char)*(strlen(prefix)+strlen(string)+2)); // +2: space and a \0
if (output == NULL) {
return 1;
// exit(1); // Kill server? Deadly
}
+
strcpy(output,prefix);
strcat(output," ");
strcat(output,string);
printf(output);
fflush(stdout);
+ free(output);
+ }
/*
if ((core_config.debug_output_level > -1) && (flag >= core_config.debug_output_level)) {
FILE *fp;
diff --git a/src/map/map.c b/src/map/map.c
index 509504773..0a9191e27 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2378,7 +2378,7 @@ int do_init(int argc, char *argv[]) {
if (ptr[0] == 192 && ptr[1] == 168)
printf("\nFirewall detected.. \n edit lan_support.conf and map_athena.conf\n\n");
}
-
+ if (SHOW_DEBUG_MSG) ShowNotice("Server running in '"CL_WHITE"Debug Mode"CL_RESET"'.\n");
battle_config_read(BATTLE_CONF_FILENAME);
msg_config_read(MSG_CONF_NAME);
atcommand_config_read(ATCOMMAND_CONF_FILENAME);
@@ -2471,6 +2471,5 @@ int do_init(int argc, char *argv[]) {
ticks = gettick();
-
return 0;
}
diff --git a/src/map/npc.c b/src/map/npc.c
index 4a7704740..88f6fc6e9 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1702,7 +1702,9 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
char srcname[128];
struct npc_data *nd2;
if( sscanf(w2,"duplicate(%[^)])",srcname)!=1 ){
- printf("bad duplicate name! : %s",w2);
+ printf("\n");
+ snprintf(tmp_output,sizeof(tmp_output),"Bad duplicate name! : %s",w2);
+ ShowWarning(tmp_output);
return 0;
}
if( (nd2=npc_name2id(srcname))==NULL ){