diff options
author | shennetsind <ind@henn.et> | 2015-02-23 14:24:36 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-02-23 14:24:36 -0300 |
commit | 330e31cc71ece055908acb1eb967b4009ebc9c46 (patch) | |
tree | 17636c66a28d452c01f77df2728f37287abbbeea /src/map/atcommand.h | |
parent | 47ff8ed7fa7603974a6f5e41b5290e5e24916317 (diff) | |
download | hercules-330e31cc71ece055908acb1eb967b4009ebc9c46.tar.gz hercules-330e31cc71ece055908acb1eb967b4009ebc9c46.tar.bz2 hercules-330e31cc71ece055908acb1eb967b4009ebc9c46.tar.xz hercules-330e31cc71ece055908acb1eb967b4009ebc9c46.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/map/atcommand.h')
-rw-r--r-- | src/map/atcommand.h | 14 |
1 files changed, 12 insertions, 2 deletions
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; |