From f8babb1e01dddcbe4ad055ec70ad972c9bc61c65 Mon Sep 17 00:00:00 2001 From: eathenabot Date: Tue, 17 Jan 2012 07:35:05 +0000 Subject: * Merged changes up to eAthena 15067. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15481 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 8 ++++---- src/map/script.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index 241914528..52bd467ec 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9794,7 +9794,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) struct npc_data* npc; if ((npc = npc_name2id(str))) { - char split_data[10][50]; + char split_data[NUM_WHISPER_VAR][CHAT_SIZE_MAX]; char *split; char output[256]; @@ -9802,13 +9802,13 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) // skip codepage indicator, if detected if( str[0] == '|' && strlen(str) >= 4 ) str += 3; - for( i = 0; i < 10; ++i ) + for( i = 0; i < NUM_WHISPER_VAR; ++i ) {// Splits the message using '#' as separators split = strchr(str,'#'); if( split == NULL ) { // use the remaining string safestrncpy(split_data[i], str, ARRAYLENGTH(split_data[i])); - for( ++i; i < 10; ++i ) + for( ++i; i < NUM_WHISPER_VAR; ++i ) split_data[i][0] = '\0'; break; } @@ -9817,7 +9817,7 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) str = split+1; } - for( i = 0; i < 10; ++i ) + for( i = 0; i < NUM_WHISPER_VAR; ++i ) { sprintf(output, "@whispervar%d$", i); set_var(sd,output,(char *) split_data[i]); diff --git a/src/map/script.h b/src/map/script.h index 9de1285b8..4815a438d 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -4,6 +4,8 @@ #ifndef _SCRIPT_H_ #define _SCRIPT_H_ +#define NUM_WHISPER_VAR 10 + struct map_session_data; extern int potion_flag; //For use on Alchemist improved potions/Potion Pitcher. [Skotlex] -- cgit v1.2.3-70-g09d2