From 330e31cc71ece055908acb1eb967b4009ebc9c46 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 23 Feb 2015 14:24:36 -0300 Subject: Hercules Ultimate Localization Design Servers can now run on any number of languages, without editing npc files. Designed by Haruna and Ind http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/ Signed-off-by: shennetsind --- src/map/atcommand.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/map/atcommand.h') diff --git a/src/map/atcommand.h b/src/map/atcommand.h index 8d0399f25..c1f451ad3 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -22,6 +22,9 @@ struct block_list; #define ATCOMMAND_LENGTH 50 #define MAX_MSG 1500 #define msg_txt(idx) atcommand->msg(idx) +#define msg_sd(sd,msg_number) atcommand->msgsd((sd),(msg_number)) +#define msg_fd(fd,msg_number) atcommand->msgfd((fd),(msg_number)) + /** * Enumerations **/ @@ -74,8 +77,12 @@ struct atcommand_interface { /* other vars */ DBMap* db; //name -> AtCommandInfo DBMap* alias_db; //alias -> AtCommandInfo - /* */ - char* msg_table[MAX_MSG]; // Server messages (0-499 reserved for GM commands, 500-999 reserved for others) + /** + * msg_table[lang_id][msg_id] + * Server messages (0-499 reserved for GM commands, 500-999 reserved for others) + **/ + char*** msg_table; + uint8 max_message_table; /* */ void (*init) (bool minimal); void (*final) (void); @@ -112,6 +119,9 @@ struct atcommand_interface { void (*base_commands) (void); bool (*add) (char *name, AtCommandFunc func, bool replace); const char* (*msg) (int msg_number); + void (*expand_message_table) (void); + const char* (*msgfd) (int fd, int msg_number); + const char* (*msgsd) (struct map_session_data *sd, int msg_number); }; struct atcommand_interface *atcommand; -- cgit v1.2.3-60-g2f50