From 322bbe35455b4c423ca8a1ff695a2c68808f5be9 Mon Sep 17 00:00:00 2001 From: toms Date: Thu, 7 Dec 2006 12:55:00 +0000 Subject: Fixed npc commands atcommand & charcommand not working with a custom command_symbol git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9431 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 36094bfb9..eb9abb8a3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10131,9 +10131,9 @@ int buildin_atcommand(struct script_state *st) sd = script_rid2sd(st); if (sd){ - if(cmd[0] != '@'){ + if(cmd[0] != atcommand_symbol){ cmd += strlen(sd->status.name); - while(*cmd != '@' && *cmd != 0) + while(*cmd != atcommand_symbol && *cmd != 0) cmd++; } atcommand_sub(sd->fd, sd, cmd, 99); @@ -10147,9 +10147,9 @@ int buildin_atcommand(struct script_state *st) if (bl->type == BL_NPC) strncpy(dummy_sd.status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH); } - if(cmd[0] != '@'){ + if(cmd[0] != atcommand_symbol){ cmd += strlen(dummy_sd.status.name); - while(*cmd != '@' && *cmd != 0) + while(*cmd != atcommand_symbol && *cmd != 0) cmd++; } atcommand_sub(0, &dummy_sd, cmd, 99); @@ -10169,9 +10169,9 @@ int buildin_charcommand(struct script_state *st) sd = script_rid2sd(st); if (sd){ - if(cmd[0] != '#'){ + if(cmd[0] != charcommand_symbol){ cmd += strlen(sd->status.name); - while(*cmd != '#' && *cmd != 0) + while(*cmd != charcommand_symbol && *cmd != 0) cmd++; } charcommand_sub(sd->fd, sd, cmd,99); @@ -10185,9 +10185,9 @@ int buildin_charcommand(struct script_state *st) if (bl->type == BL_NPC) strncpy(dummy_sd.status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH); } - if(cmd[0] != '#'){ + if(cmd[0] != charcommand_symbol){ cmd += strlen(dummy_sd.status.name); - while(*cmd != '#' && *cmd != 0) + while(*cmd != charcommand_symbol && *cmd != 0) cmd++; } charcommand_sub(0, &dummy_sd, cmd, 99); -- cgit v1.2.3-60-g2f50