Index: conf/char_athena.conf
===================================================================
--- conf/char_athena.conf (revision 17206)
+++ conf/char_athena.conf (working copy)
@@ -197,4 +197,10 @@
// Allow users to move characters as often as they like?
char_moves_unlimited: no
+// Translations
+// Format:
+// read_msg: language ID,path
+// read_msg: 1,conf/msg_conf/char_msg_sp.conf // Spanish
+// read_msg: 2,conf/msg_conf/char_msg_ru.conf // Russian
+
import: conf/import/char_conf.txt
Index: conf/login_athena.conf
===================================================================
--- conf/login_athena.conf (revision 17206)
+++ conf/login_athena.conf (working copy)
@@ -157,5 +157,11 @@
client_hash: 0, 113e195e6c051bb1cfb12a644bb084c5
client_hash: 99, cb1ea78023d337c38e8ba5124e2338ae
+// Translations
+// Format:
+// read_msg: language ID,path
+// read_msg: 1,conf/msg_conf/login_msg_sp.conf // Spanish
+// read_msg: 2,conf/msg_conf/login_msg_ru.conf // Russian
+
import: conf/inter_athena.conf
import: conf/import/login_conf.txt
Index: conf/map_athena.conf
===================================================================
--- conf/map_athena.conf (revision 17206)
+++ conf/map_athena.conf (working copy)
@@ -115,6 +115,13 @@
help2_txt: conf/help2.txt
charhelp_txt: conf/charhelp.txt
+
+// Translations
+// Format:
+// read_msg: language ID,path
+// read_msg: 1,conf/msg_conf/map_msg_sp.conf // Spanish
+// read_msg: 2,conf/msg_conf/map_msg_ru.conf // Russian
+
// Maps:
import: conf/maps_athena.conf
Index: src/char/char.c
===================================================================
--- src/char/char.c (revision 17206)
+++ src/char/char.c (working copy)
@@ -31,7 +31,7 @@
#include <stdlib.h>
#define CHAR_MAX_MSG 200
-static char* msg_table[CHAR_MAX_MSG]; // Login Server messages_conf
+static char* msg_table[MAX_LANG][CHAR_MAX_MSG]; // Char Server messages_conf
char char_db[256] = "char";
char scdata_db[256] = "sc_data";
@@ -138,6 +138,7 @@
uint16 pincode_try;
// Addon system
unsigned int char_moves[MAX_CHARS]; // character moves left
+ int lang;
};
int max_connect_user = -1;
@@ -214,6 +215,7 @@
time_t expiration_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
int group_id;
unsigned changing_mapservers : 1;
+ int lang;
};
static DBMap* auth_db; // int account_id -> struct auth_node*
@@ -2204,7 +2206,7 @@
break;
case 0x2717: // account data
- if (RFIFOREST(fd) < 72)
+ if (RFIFOREST(fd) < 73)
return 0;
// find the authenticated session with this account id
@@ -2221,9 +2223,14 @@
sd->char_slots = MAX_CHARS;/* cap to maximum */
} else if ( !sd->char_slots )/* no value aka 0 in sql */
sd->char_slots = MAX_CHARS;/* cap to maximum */
- safestrncpy(sd->birthdate, (const char*)RFIFOP(fd,52), sizeof(sd->birthdate));
- safestrncpy(sd->pincode, (const char*)RFIFOP(fd,63), sizeof(sd->pincode));
- sd->pincode_change = (time_t)RFIFOL(fd,68);
+ sd->lang = RFIFOB(fd,52);
+ if( sd->lang > MAX_LANG ) {
+ ShowError("Account '%d' `lang` column is higher than supported MAX_LANG (%d), update MAX_LANG in mmo.h! capping to 0...\n",sd->account_id,sd->lang);
+ sd->lang = 0;/* cap to 0 */
+ }
+ safestrncpy(sd->birthdate, (const char*)RFIFOP(fd,53), sizeof(sd->birthdate));
+ safestrncpy(sd->pincode, (const char*)RFIFOP(fd,64), sizeof(sd->pincode));
+ sd->pincode_change = (time_t)RFIFOL(fd,69);
ARR_FIND( 0, ARRAYLENGTH(server), server_id, server[server_id].fd > 0 && server[server_id].map[0] );
// continued from char_auth_ok...
if( server_id == ARRAYLENGTH(server) || //server not online, bugreport:2359
@@ -2270,7 +2277,7 @@
#endif
}
}
- RFIFOSKIP(fd,72);
+ RFIFOSKIP(fd,73);
break;
// login-server alive packet
@@ -2970,7 +2977,7 @@
break;
case 0x2b05: // request "change map server"
- if (RFIFOREST(fd) < 39)
+ if (RFIFOREST(fd) < 40)
return 0;
{
int map_id, map_fd = -1;
@@ -3010,6 +3017,7 @@
node->expiration_time = 0; // FIXME (this thing isn't really supported we could as well purge it instead of fixing)
node->ip = ntohl(RFIFOL(fd,31));
node->group_id = RFIFOL(fd,35);
+ node->lang = RFIFOL(fd,39);
node->changing_mapservers = 1;
idb_put(auth_db, RFIFOL(fd,2), node);
@@ -3363,16 +3371,17 @@
{// auth ok
cd->sex = sex;
- WFIFOHEAD(fd,25 + sizeof(struct mmo_charstatus));
+ WFIFOHEAD(fd,29 + sizeof(struct mmo_charstatus));
WFIFOW(fd,0) = 0x2afd;
- WFIFOW(fd,2) = 25 + sizeof(struct mmo_charstatus);
+ WFIFOW(fd,2) = 29 + sizeof(struct mmo_charstatus);
WFIFOL(fd,4) = account_id;
WFIFOL(fd,8) = node->login_id1;
WFIFOL(fd,12) = node->login_id2;
WFIFOL(fd,16) = (uint32)node->expiration_time; // FIXME: will wrap to negative after "19-Jan-2038, 03:14:07 AM GMT"
WFIFOL(fd,20) = node->group_id;
- WFIFOB(fd,24) = node->changing_mapservers;
- memcpy(WFIFOP(fd,25), cd, sizeof(struct mmo_charstatus));
+ WFIFOL(fd,24) = node->lang;
+ WFIFOB(fd,28) = node->changing_mapservers;
+ memcpy(WFIFOP(fd,29), cd, sizeof(struct mmo_charstatus));
WFIFOSET(fd, WFIFOW(fd,2));
// only use the auth once and mark user online
@@ -3969,6 +3978,7 @@
node->sex = sd->sex;
node->expiration_time = sd->expiration_time;
node->group_id = sd->group_id;
+ node->lang = sd->lang;
node->ip = ipl;
idb_put(auth_db, sd->account_id, node);
@@ -5032,6 +5042,15 @@
char_movetoused = config_switch(w2);
} else if (strcmpi(w1, "char_moves_unlimited") == 0) {
char_moves_unlimited = config_switch(w2);
+ } else if (strcmpi(w1, "read_msg") == 0){
+ int lang;
+ char path[256];
+ if( sscanf(w2, "%d, %s", &lang, path) == 2){
+ if( lang < 1 || lang > MAX_LANG )
+ ShowWarning("read_msg: Invalid Lnaguage ID '%s' in file %s. Must be 1~%s\n", w1, cfgName, MAX_LANG);
+ else
+ msg_config_read(path,lang);
+ }
} else if (strcmpi(w1, "import") == 0) {
char_config_read(w2);
}
@@ -5121,7 +5140,7 @@
cli_get_options(argc,argv);
- msg_config_read(MSG_CONF_NAME);
+ msg_config_read(MSG_CONF_NAME,0);
char_config_read(CHAR_CONF_NAME);
char_lan_config_read(LAN_CONF_NAME);
sql_config_read(SQL_CONF_NAME);
@@ -5208,14 +5227,16 @@
return 0;
}
-int char_msg_config_read(char *cfgName){
- return _msg_config_read(cfgName,CHAR_MAX_MSG,msg_table);
+int char_msg_config_read(char *cfgName, int lang){
+ return _msg_config_read(cfgName,CHAR_MAX_MSG,msg_table[lang]);
}
-const char* char_msg_txt(int msg_number){
- return _msg_txt(msg_number,CHAR_MAX_MSG,msg_table);
+const char* char_msg_txt(int lang, int msg_number){
+ return _msg_txt(msg_number,CHAR_MAX_MSG,msg_table[lang]);
}
void char_do_final_msg(void){
- _do_final_msg(CHAR_MAX_MSG,msg_table);
+ int i;
+ for( i = 0; i < MAX_LANG; i++)
+ _do_final_msg(CHAR_MAX_MSG,msg_table[i]);
}
/*======================================================
Index: src/char/char.h
===================================================================
--- src/char/char.h (revision 17206)
+++ src/char/char.h (working copy)
@@ -21,11 +21,11 @@
#define DEFAULT_AUTOSAVE_INTERVAL 300*1000
-#define msg_config_read(cfgName) char_msg_config_read(cfgName)
-#define msg_txt(msg_number) char_msg_txt(msg_number)
+#define msg_config_read(cfgName, lang) char_msg_config_read(cfgName, lang)
+#define msg_txt(lang, msg_number) char_msg_txt(lang, msg_number)
#define do_final_msg() char_do_final_msg()
-int char_msg_config_read(char *cfgName);
-const char* char_msg_txt(int msg_number);
+int char_msg_config_read(char *cfgName, int lang);
+const char* char_msg_txt(int lang, int msg_number);
void char_do_final_msg(void);
enum {
Index: src/char/int_auction.c
===================================================================
--- src/char/int_auction.c (revision 17206)
+++ src/char/int_auction.c (working copy)
@@ -145,12 +145,12 @@
{
if( auction->buyer_id )
{
- mail_sendmail(0, msg_txt(200), auction->buyer_id, auction->buyer_name, msg_txt(201), msg_txt(202), 0, &auction->item);
+ mail_sendmail(0, msg_txt(0,200), auction->buyer_id, auction->buyer_name, msg_txt(0,201), msg_txt(0,202), 0, &auction->item);
mapif_Auction_message(auction->buyer_id, 6); // You have won the auction
- mail_sendmail(0, msg_txt(200), auction->seller_id, auction->seller_name, msg_txt(201), msg_txt(203), auction->price, NULL);
+ mail_sendmail(0, msg_txt(0,200), auction->seller_id, auction->seller_name, msg_txt(0,201), msg_txt(0,203), auction->price, NULL);
}
else
- mail_sendmail(0, msg_txt(200), auction->seller_id, auction->seller_name, msg_txt(201), msg_txt(204), 0, &auction->item);
+ mail_sendmail(0, msg_txt(0,200), auction->seller_id, auction->seller_name, msg_txt(0,201), msg_txt(0,204), 0, &auction->item);
ShowInfo("Auction End: id %u.\n", auction->auction_id);
@@ -353,7 +353,7 @@
return;
}
- mail_sendmail(0, msg_txt(200), auction->seller_id, auction->seller_name, msg_txt(201), msg_txt(205), 0, &auction->item);
+ mail_sendmail(0, msg_txt(0,200), auction->seller_id, auction->seller_name, msg_txt(0,201), msg_txt(0,205), 0, &auction->item);
auction_delete(auction);
mapif_Auction_cancel(fd, char_id, 0); // The auction has been canceled
@@ -392,9 +392,9 @@
}
// Send Money to Seller
- mail_sendmail(0, msg_txt(200), auction->seller_id, auction->seller_name, msg_txt(201), msg_txt(206), auction->price, NULL);
+ mail_sendmail(0, msg_txt(0,200), auction->seller_id, auction->seller_name, msg_txt(0,201), msg_txt(0,206), auction->price, NULL);
// Send Item to Buyer
- mail_sendmail(0, msg_txt(200), auction->buyer_id, auction->buyer_name, msg_txt(201), msg_txt(207), 0, &auction->item);
+ mail_sendmail(0, msg_txt(0,200), auction->buyer_id, auction->buyer_name, msg_txt(0,201), msg_txt(0,207), 0, &auction->item);
mapif_Auction_message(auction->buyer_id, 6); // You have won the auction
auction_delete(auction);
@@ -433,11 +433,11 @@
{ // Send Money back to the previous Buyer
if( auction->buyer_id != char_id )
{
- mail_sendmail(0, msg_txt(200), auction->buyer_id, auction->buyer_name, msg_txt(201), msg_txt(208), auction->price, NULL);
+ mail_sendmail(0, msg_txt(0,200), auction->buyer_id, auction->buyer_name, msg_txt(0,201), msg_txt(0,208), auction->price, NULL);
mapif_Auction_message(auction->buyer_id, 7); // You have failed to win the auction
}
else
- mail_sendmail(0, msg_txt(200), auction->buyer_id, auction->buyer_name, msg_txt(201), msg_txt(209), auction->price, NULL);
+ mail_sendmail(0, msg_txt(0,200), auction->buyer_id, auction->buyer_name, msg_txt(0,201), msg_txt(0,209), auction->price, NULL);
}
auction->buyer_id = char_id;
@@ -448,9 +448,9 @@
{ // Automatic won the auction
mapif_Auction_bid(fd, char_id, bid - auction->buynow, 1); // You have successfully bid in the auction
- mail_sendmail(0, msg_txt(200), auction->buyer_id, auction->buyer_name, msg_txt(201), msg_txt(210), 0, &auction->item);
+ mail_sendmail(0, msg_txt(0,200), auction->buyer_id, auction->buyer_name, msg_txt(0,201), msg_txt(0,210), 0, &auction->item);
mapif_Auction_message(char_id, 6); // You have won the auction
- mail_sendmail(0, msg_txt(200), auction->seller_id, auction->seller_name, msg_txt(201), msg_txt(211), auction->buynow, NULL);
+ mail_sendmail(0, msg_txt(0,200), auction->seller_id, auction->seller_name, msg_txt(0,201), msg_txt(0,211), auction->buynow, NULL);
auction_delete(auction);
return;
Index: src/char/inter.c
===================================================================
--- src/char/inter.c (revision 17206)
+++ src/char/inter.c (working copy)
@@ -77,7 +77,7 @@
case JOB_ACOLYTE:
case JOB_MERCHANT:
case JOB_THIEF:
- return msg_txt(JOB_NOVICE+class_);
+ return msg_txt(0,JOB_NOVICE+class_);
case JOB_KNIGHT:
case JOB_PRIEST:
@@ -85,10 +85,10 @@
case JOB_BLACKSMITH:
case JOB_HUNTER:
case JOB_ASSASSIN:
- return msg_txt(7 - JOB_KNIGHT+class_);
+ return msg_txt(0,7 - JOB_KNIGHT+class_);
case JOB_KNIGHT2:
- return msg_txt(7);
+ return msg_txt(0,7);
case JOB_CRUSADER:
case JOB_MONK:
@@ -97,20 +97,20 @@
case JOB_ALCHEMIST:
case JOB_BARD:
case JOB_DANCER:
- return msg_txt(13 - JOB_CRUSADER+class_);
+ return msg_txt(0,13 - JOB_CRUSADER+class_);
case JOB_CRUSADER2:
- return msg_txt(13);
+ return msg_txt(0,13);
case JOB_WEDDING:
case JOB_SUPER_NOVICE:
case JOB_GUNSLINGER:
case JOB_NINJA:
case JOB_XMAS:
- return msg_txt(20 - JOB_WEDDING+class_);
+ return msg_txt(0,20 - JOB_WEDDING+class_);
case JOB_SUMMER:
- return msg_txt(71);
+ return msg_txt(0,71);
case JOB_NOVICE_HIGH:
case JOB_SWORDMAN_HIGH:
@@ -119,7 +119,7 @@
case JOB_ACOLYTE_HIGH:
case JOB_MERCHANT_HIGH:
case JOB_THIEF_HIGH:
- return msg_txt(25 - JOB_NOVICE_HIGH+class_);
+ return msg_txt(0,25 - JOB_NOVICE_HIGH+class_);
case JOB_LORD_KNIGHT:
case JOB_HIGH_PRIEST:
@@ -127,10 +127,10 @@
case JOB_WHITESMITH:
case JOB_SNIPER:
case JOB_ASSASSIN_CROSS:
- return msg_txt(32 - JOB_LORD_KNIGHT+class_);
+ return msg_txt(0,32 - JOB_LORD_KNIGHT+class_);
case JOB_LORD_KNIGHT2:
- return msg_txt(32);
+ return msg_txt(0,32);
case JOB_PALADIN:
case JOB_CHAMPION:
@@ -139,10 +139,10 @@
case JOB_CREATOR:
case JOB_CLOWN:
case JOB_GYPSY:
- return msg_txt(38 - JOB_PALADIN + class_);
+ return msg_txt(0,38 - JOB_PALADIN + class_);
case JOB_PALADIN2:
- return msg_txt(38);
+ return msg_txt(0,38);
case JOB_BABY:
case JOB_BABY_SWORDMAN:
@@ -151,7 +151,7 @@
case JOB_BABY_ACOLYTE:
case JOB_BABY_MERCHANT:
case JOB_BABY_THIEF:
- return msg_txt(45 - JOB_BABY + class_);
+ return msg_txt(0,45 - JOB_BABY + class_);
case JOB_BABY_KNIGHT:
case JOB_BABY_PRIEST:
@@ -159,10 +159,10 @@
case JOB_BABY_BLACKSMITH:
case JOB_BABY_HUNTER:
case JOB_BABY_ASSASSIN:
- return msg_txt(52 - JOB_BABY_KNIGHT + class_);
+ return msg_txt(0,52 - JOB_BABY_KNIGHT + class_);
case JOB_BABY_KNIGHT2:
- return msg_txt(52);
+ return msg_txt(0,52);
case JOB_BABY_CRUSADER:
case JOB_BABY_MONK:
@@ -171,26 +171,26 @@
case JOB_BABY_ALCHEMIST:
case JOB_BABY_BARD:
case JOB_BABY_DANCER:
- return msg_txt(58 - JOB_BABY_CRUSADER + class_);
+ return msg_txt(0,58 - JOB_BABY_CRUSADER + class_);
case JOB_BABY_CRUSADER2:
- return msg_txt(58);
+ return msg_txt(0,58);
case JOB_SUPER_BABY:
- return msg_txt(65);
+ return msg_txt(0,65);
case JOB_TAEKWON:
- return msg_txt(66);
+ return msg_txt(0,66);
case JOB_STAR_GLADIATOR:
case JOB_STAR_GLADIATOR2:
- return msg_txt(67);
+ return msg_txt(0,67);
case JOB_SOUL_LINKER:
- return msg_txt(68);
+ return msg_txt(0,68);
case JOB_GANGSI:
case JOB_DEATH_KNIGHT:
case JOB_DARK_COLLECTOR:
- return msg_txt(72 - JOB_GANGSI+class_);
+ return msg_txt(0,72 - JOB_GANGSI+class_);
case JOB_RUNE_KNIGHT:
case JOB_WARLOCK:
@@ -198,7 +198,7 @@
case JOB_ARCH_BISHOP:
case JOB_MECHANIC:
case JOB_GUILLOTINE_CROSS:
- return msg_txt(75 - JOB_RUNE_KNIGHT+class_);
+ return msg_txt(0,75 - JOB_RUNE_KNIGHT+class_);
case JOB_RUNE_KNIGHT_T:
case JOB_WARLOCK_T:
@@ -206,7 +206,7 @@
case JOB_ARCH_BISHOP_T:
case JOB_MECHANIC_T:
case JOB_GUILLOTINE_CROSS_T:
- return msg_txt(75 - JOB_RUNE_KNIGHT_T+class_);
+ return msg_txt(0,75 - JOB_RUNE_KNIGHT_T+class_);
case JOB_ROYAL_GUARD:
case JOB_SORCERER:
@@ -215,7 +215,7 @@
case JOB_SURA:
case JOB_GENETIC:
case JOB_SHADOW_CHASER:
- return msg_txt(81 - JOB_ROYAL_GUARD+class_);
+ return msg_txt(0,81 - JOB_ROYAL_GUARD+class_);
case JOB_ROYAL_GUARD_T:
case JOB_SORCERER_T:
@@ -224,23 +224,23 @@
case JOB_SURA_T:
case JOB_GENETIC_T:
case JOB_SHADOW_CHASER_T:
- return msg_txt(81 - JOB_ROYAL_GUARD_T+class_);
+ return msg_txt(0,81 - JOB_ROYAL_GUARD_T+class_);
case JOB_RUNE_KNIGHT2:
case JOB_RUNE_KNIGHT_T2:
- return msg_txt(75);
+ return msg_txt(0,75);
case JOB_ROYAL_GUARD2:
case JOB_ROYAL_GUARD_T2:
- return msg_txt(81);
+ return msg_txt(0,81);
case JOB_RANGER2:
case JOB_RANGER_T2:
- return msg_txt(77);
+ return msg_txt(0,77);
case JOB_MECHANIC2:
case JOB_MECHANIC_T2:
- return msg_txt(79);
+ return msg_txt(0,79);
case JOB_BABY_RUNE:
case JOB_BABY_WARLOCK:
@@ -255,30 +255,30 @@
case JOB_BABY_SURA:
case JOB_BABY_GENETIC:
case JOB_BABY_CHASER:
- return msg_txt(88 - JOB_BABY_RUNE+class_);
+ return msg_txt(0,88 - JOB_BABY_RUNE+class_);
case JOB_BABY_RUNE2:
- return msg_txt(88);
+ return msg_txt(0,88);
case JOB_BABY_GUARD2:
- return msg_txt(94);
+ return msg_txt(0,94);
case JOB_BABY_RANGER2:
- return msg_txt(90);
+ return msg_txt(0,90);
case JOB_BABY_MECHANIC2:
- return msg_txt(92);
+ return msg_txt(0,92);
case JOB_SUPER_NOVICE_E:
case JOB_SUPER_BABY_E:
- return msg_txt(101 - JOB_SUPER_NOVICE_E+class_);
+ return msg_txt(0,101 - JOB_SUPER_NOVICE_E+class_);
case JOB_KAGEROU:
case JOB_OBORO:
- return msg_txt(103 - JOB_KAGEROU+class_);
+ return msg_txt(0,103 - JOB_KAGEROU+class_);
default:
- return msg_txt(105);
+ return msg_txt(0,105);
}
}
Index: src/common/mmo.h
===================================================================
--- src/common/mmo.h (revision 17206)
+++ src/common/mmo.h (working copy)
@@ -162,6 +162,7 @@
#define EL_CLASS_BASE 2114
#define EL_CLASS_MAX (EL_CLASS_BASE+MAX_ELEMENTAL_CLASS-1)
+#define MAX_LANG 10
enum item_types {
IT_HEALING = 0,
IT_UNKNOWN, //1
Index: src/common/msg_conf.c
===================================================================
--- src/common/msg_conf.c (revision 17206)
+++ src/common/msg_conf.c (working copy)
@@ -1,3 +1,4 @@
+#include "../common/mmo.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Index: src/login/account.h
===================================================================
--- src/login/account.h (revision 17206)
+++ src/login/account.h (working copy)
@@ -54,6 +54,7 @@
time_t pincode_change; // (timestamp): last time of pincode change
int account_reg2_num;
struct global_reg account_reg2[ACCOUNT_REG2_NUM]; // account script variables (stored on login server)
+ int lang;
};
Index: src/login/account_sql.c
===================================================================
--- src/login/account_sql.c (revision 17206)
+++ src/login/account_sql.c (working copy)
@@ -522,7 +522,7 @@
// retrieve login entry for the specified account
if( SQL_ERROR == Sql_Query(sql_handle,
- "SELECT `account_id`,`userid`,`user_pass`,`sex`,`email`,`group_id`,`state`,`unban_time`,`expiration_time`,`logincount`,`lastlogin`,`last_ip`,`birthdate`,`character_slots`,`pincode`, `pincode_change` FROM `%s` WHERE `account_id` = %d",
+ "SELECT `account_id`,`userid`,`user_pass`,`sex`,`email`,`group_id`,`state`,`unban_time`,`expiration_time`,`logincount`,`lastlogin`,`last_ip`,`birthdate`,`character_slots`,`pincode`, `pincode_change`, `lang` FROM `%s` WHERE `account_id` = %d",
db->account_db, account_id )
) {
Sql_ShowDebug(sql_handle);
@@ -551,6 +551,7 @@
Sql_GetData(sql_handle, 13, &data, NULL); acc->char_slots = atoi(data);
Sql_GetData(sql_handle, 14, &data, NULL); safestrncpy(acc->pincode, data, sizeof(acc->pincode));
Sql_GetData(sql_handle, 15, &data, NULL); acc->pincode_change = atol(data);
+ Sql_GetData(sql_handle, 16, &data, NULL); acc->lang = atoi(data);
Sql_FreeResult(sql_handle);
@@ -599,7 +600,7 @@
if( is_new )
{// insert into account table
if( SQL_SUCCESS != SqlStmt_Prepare(stmt,
- "INSERT INTO `%s` (`account_id`, `userid`, `user_pass`, `sex`, `email`, `group_id`, `state`, `unban_time`, `expiration_time`, `logincount`, `lastlogin`, `last_ip`, `birthdate`, `character_slots`, `pincode`, `pincode_change`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
+ "INSERT INTO `%s` (`account_id`, `userid`, `user_pass`, `sex`, `email`, `group_id`, `state`, `unban_time`, `expiration_time`, `logincount`, `lastlogin`, `last_ip`, `birthdate`, `character_slots`, `pincode`, `pincode_change`, `lang`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
db->account_db)
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_INT, (void*)&acc->account_id, sizeof(acc->account_id))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (void*)acc->userid, strlen(acc->userid))
@@ -617,6 +618,7 @@
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 13, SQLDT_UCHAR, (void*)&acc->char_slots, sizeof(acc->char_slots))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 14, SQLDT_STRING, (void*)&acc->pincode, strlen(acc->pincode))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 15, SQLDT_LONG, (void*)&acc->pincode_change, sizeof(acc->pincode_change))
+ || SQL_SUCCESS != SqlStmt_BindParam(stmt, 16, SQLDT_LONG, (void*)&acc->lang, sizeof(acc->lang))
|| SQL_SUCCESS != SqlStmt_Execute(stmt)
) {
SqlStmt_ShowDebug(stmt);
@@ -625,7 +627,7 @@
}
else
{// update account table
- if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "UPDATE `%s` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`group_id`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=?,`birthdate`=?,`character_slots`=?,`pincode`=?, `pincode_change`=? WHERE `account_id` = '%d'", db->account_db, acc->account_id)
+ if( SQL_SUCCESS != SqlStmt_Prepare(stmt, "UPDATE `%s` SET `userid`=?,`user_pass`=?,`sex`=?,`email`=?,`group_id`=?,`state`=?,`unban_time`=?,`expiration_time`=?,`logincount`=?,`lastlogin`=?,`last_ip`=?,`birthdate`=?,`character_slots`=?,`pincode`=?, `pincode_change`=?, `lang`=? WHERE `account_id` = '%d'", db->account_db, acc->account_id)
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, (void*)acc->userid, strlen(acc->userid))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, (void*)acc->pass, strlen(acc->pass))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 2, SQLDT_ENUM, (void*)&acc->sex, sizeof(acc->sex))
@@ -641,6 +643,7 @@
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 12, SQLDT_UCHAR, (void*)&acc->char_slots, sizeof(acc->char_slots))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 13, SQLDT_STRING, (void*)&acc->pincode, strlen(acc->pincode))
|| SQL_SUCCESS != SqlStmt_BindParam(stmt, 14, SQLDT_LONG, (void*)&acc->pincode_change, sizeof(acc->pincode_change))
+ || SQL_SUCCESS != SqlStmt_BindParam(stmt, 15, SQLDT_UCHAR, (void*)&acc->lang, sizeof(acc->lang))
|| SQL_SUCCESS != SqlStmt_Execute(stmt)
) {
SqlStmt_ShowDebug(stmt);
Index: src/login/login.c
===================================================================
--- src/login/login.c (revision 17206)
+++ src/login/login.c (working copy)
@@ -22,7 +22,7 @@
#include <string.h>
#define LOGIN_MAX_MSG 30
-static char* msg_table[LOGIN_MAX_MSG]; // Login Server messages_conf
+static char* msg_table[MAX_LANG][LOGIN_MAX_MSG]; // Login Server messages_conf
struct Login_Config login_config;
int login_fd; // login server socket
@@ -553,7 +553,7 @@
int group_id = 0;
char birthdate[10+1] = "";
char pincode[4+1] = "";
-
+ int lang = 0;
int account_id = RFIFOL(fd,2);
RFIFOSKIP(fd,6);
@@ -564,21 +564,23 @@
expiration_time = acc.expiration_time;
group_id = acc.group_id;
char_slots = acc.char_slots;
+ lang = acc.lang;
safestrncpy(birthdate, acc.birthdate, sizeof(birthdate));
safestrncpy(pincode, acc.pincode, sizeof(pincode));
}
- WFIFOHEAD(fd,72);
+ WFIFOHEAD(fd,73);
WFIFOW(fd,0) = 0x2717;
WFIFOL(fd,2) = account_id;
safestrncpy((char*)WFIFOP(fd,6), email, 40);
WFIFOL(fd,46) = (uint32)expiration_time;
WFIFOB(fd,50) = (unsigned char)group_id;
WFIFOB(fd,51) = char_slots;
- safestrncpy((char*)WFIFOP(fd,52), birthdate, 10+1);
- safestrncpy((char*)WFIFOP(fd,63), pincode, 4+1 );
- WFIFOL(fd,68) = (uint32)acc.pincode_change;
- WFIFOSET(fd,72);
+ WFIFOB(fd,52) = (unsigned char)lang;
+ safestrncpy((char*)WFIFOP(fd,53), birthdate, 10+1);
+ safestrncpy((char*)WFIFOP(fd,64), pincode, 4+1 );
+ WFIFOL(fd,69) = (uint32)acc.pincode_change;
+ WFIFOSET(fd,73);
}
break;
@@ -979,7 +981,7 @@
safestrncpy(acc.birthdate, "0000-00-00", sizeof(acc.birthdate));
safestrncpy(acc.pincode, "", sizeof(acc.pincode));
acc.pincode_change = 0;
-
+ acc.lang = 0;
acc.char_slots = 0;
if( !accounts->create(accounts, &acc) )
@@ -1298,11 +1300,11 @@
if (login_config.log_login)
{
if(result >= 0 && result <= 15)
- login_log(ip, sd->userid, result, msg_txt(result));
+ login_log(ip, sd->userid, result, msg_txt(sd->lang,result));
else if(result >= 99 && result <= 104)
- login_log(ip, sd->userid, result, msg_txt(result-83)); //-83 offset
+ login_log(ip, sd->userid, result, msg_txt(sd->lang,result-83)); //-83 offset
else
- login_log(ip, sd->userid, result, msg_txt(22)); //unknow error
+ login_log(ip, sd->userid, result, msg_txt(sd->lang,22)); //unknow error
}
if( result == 1 && login_config.dynamic_pass_failure_ban )
@@ -1707,6 +1709,16 @@
login_config.client_hash_nodes = nnode;
}
}
+ else if (strcmpi(w1, "read_msg") == 0){
+ int lang;
+ char path[256];
+ if( sscanf(w2, "%d, %s", &lang, path) == 2){
+ if( lang < 1 || lang > MAX_LANG )
+ ShowWarning("read_msg: Invalid Lnaguage ID '%s' in file %s. Must be 1~%s\n", w1, cfgName, MAX_LANG);
+ else
+ msg_config_read(path,lang);
+ }
+ }
else if(!strcmpi(w1, "import"))
login_config_read(w2);
else
@@ -1853,7 +1865,7 @@
cli_get_options(argc,argv);
- msg_config_read(MSG_CONF_NAME);
+ msg_config_read(MSG_CONF_NAME,0);
login_config_read(LOGIN_CONF_NAME);
login_lan_config_read(LAN_CONF_NAME);
@@ -1923,14 +1935,16 @@
return 0;
}
-int login_msg_config_read(char *cfgName){
- return _msg_config_read(cfgName,LOGIN_MAX_MSG,msg_table);
+int login_msg_config_read(char *cfgName, int lang){
+ return _msg_config_read(cfgName,LOGIN_MAX_MSG,msg_table[lang]);
}
-const char* login_msg_txt(int msg_number){
- return _msg_txt(msg_number,LOGIN_MAX_MSG,msg_table);
+const char* login_msg_txt(int lang, int msg_number){
+ return _msg_txt(msg_number,LOGIN_MAX_MSG,msg_table[lang]);
}
void login_do_final_msg(void){
- _do_final_msg(LOGIN_MAX_MSG,msg_table);
+ int i;
+ for( i = 0; i < MAX_LANG; i++)
+ _do_final_msg(LOGIN_MAX_MSG,msg_table[i]);
}
/*======================================================
Index: src/login/login.h
===================================================================
--- src/login/login.h (revision 17206)
+++ src/login/login.h (working copy)
@@ -22,7 +22,7 @@
long login_id1;
long login_id2;
char sex;// 'F','M','S'
-
+ int lang;
char userid[NAME_LENGTH];
char passwd[32+1]; // 23+1 for plaintext, 32+1 for md5-ed passwords
int passwdenc;
@@ -91,12 +91,12 @@
#define sex_num2str(num) ( (num == SEX_FEMALE ) ? 'F' : (num == SEX_MALE ) ? 'M' : 'S' )
#define sex_str2num(str) ( (str == 'F' ) ? SEX_FEMALE : (str == 'M' ) ? SEX_MALE : SEX_SERVER )
-#define msg_config_read(cfgName) login_msg_config_read(cfgName)
-#define msg_txt(msg_number) login_msg_txt(msg_number)
+#define msg_config_read(cfgName, lang) login_msg_config_read(cfgName, lang)
+#define msg_txt(lang, msg_number) login_msg_txt(lang, msg_number)
#define do_final_msg() login_do_final_msg()
-int login_msg_config_read(char *cfgName);
-const char* login_msg_txt(int msg_number);
+int login_msg_config_read(char *cfgName, int lang);
+const char* login_msg_txt(int lang, int msg_number);
void login_do_final_msg(void);
Index: src/map/atcommand.c
===================================================================
--- src/map/atcommand.c (revision 17206)
+++ src/map/atcommand.c (working copy)
@@ -149,7 +149,7 @@
{
int i;
for (i = 900; i <= 903; ++i)
- clif_displaymessage(fd, msg_txt(i));
+ clif_displaymessage(fd, msg_txt(sd->lang,i));
return -1;
}
@@ -188,7 +188,7 @@
if(len)
{// show packet length
- sprintf(atcmd_output, msg_txt(904), type, packet_db[sd->packet_ver][type].len); // Packet 0x%x length: %d
+ sprintf(atcmd_output, msg_txt(sd->lang,904), type, packet_db[sd->packet_ver][type].len); // Packet 0x%x length: %d
clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -197,7 +197,7 @@
off=2;
if(len == 0)
{// unknown packet - ERROR
- sprintf(atcmd_output, msg_txt(905), type); // Unknown packet: 0x%x
+ sprintf(atcmd_output, msg_txt(sd->lang,905), type); // Unknown packet: 0x%x
clif_displaymessage(fd, atcmd_output);
return -1;
} else if(len == -1)
@@ -245,7 +245,7 @@
while(*message != '"')
{// find start of string
if(*message == 0 || ISSPACE(*message)){
- PARSE_ERROR(msg_txt(906),message); // Not a string:
+ PARSE_ERROR(msg_txt(sd->lang,906),message); // Not a string:
return -1;
}
++message;
@@ -275,7 +275,7 @@
++message;
CHECK_EOS(message);
if(!ISXDIGIT(*message)){
- PARSE_ERROR(msg_txt(907),message); // Not a hexadecimal digit:
+ PARSE_ERROR(msg_txt(sd->lang,907),message); // Not a hexadecimal digit:
return -1;
}
num=(ISDIGIT(*message)?*message-'0':TOLOWER(*message)-'a'+10);
@@ -338,7 +338,7 @@
}
} else
{// unknown
- PARSE_ERROR(msg_txt(908),message); // Unknown type of value in:
+ PARSE_ERROR(msg_txt(sd->lang,908),message); // Unknown type of value in:
return -1;
}
SKIP_VALUE(message);
@@ -355,10 +355,10 @@
WFIFOSET(fd,len);
}
} else {
- clif_displaymessage(fd, msg_txt(259)); // Invalid packet
+ clif_displaymessage(fd, msg_txt(sd->lang,259)); // Invalid packet
return -1;
}
- sprintf (atcmd_output, msg_txt(258), type, type); // Sent packet 0x%x (%d)
+ sprintf (atcmd_output, msg_txt(sd->lang,258), type, type); // Sent packet 0x%x (%d)
clif_displaymessage(fd, atcmd_output);
return 0;
#undef PARSE_ERROR
@@ -385,7 +385,7 @@
(sscanf(message, "%15s %hd %hd", map_name, &x, &y) < 3 &&
sscanf(message, "%15[^,],%hd,%hd", map_name, &x, &y) < 1)) {
- clif_displaymessage(fd, msg_txt(909)); // Please enter a map (usage: @warp/@rura/@mapmove <mapname> <x> <y>).
+ clif_displaymessage(fd, msg_txt(sd->lang,909)); // Please enter a map (usage: @warp/@rura/@mapmove <mapname> <x> <y>).
return -1;
}
@@ -394,30 +394,30 @@
m = map_mapindex2mapid(mapindex);
if (!mapindex) { // m < 0 means on different server! [Kevin]
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,1)); // Map not found.
return -1;
}
if ((x || y) && map_getcell(m, x, y, CELL_CHKNOPASS))
{ //This is to prevent the pc_setpos call from printing an error.
- clif_displaymessage(fd, msg_txt(2));
+ clif_displaymessage(fd, msg_txt(sd->lang,2));
if (!map_search_freecell(NULL, m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
if (map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(247));
+ clif_displaymessage(fd, msg_txt(sd->lang,247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248));
+ clif_displaymessage(fd, msg_txt(sd->lang,248));
return -1;
}
if (pc_setpos(sd, mapindex, x, y, CLR_TELEPORT) != 0) {
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,1)); // Map not found.
return -1;
}
- clif_displaymessage(fd, msg_txt(0)); // Warped.
+ clif_displaymessage(fd, msg_txt(sd->lang,0)); // Warped.
return 0;
}
@@ -432,7 +432,7 @@
memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(910)); // Please enter a player name (usage: @where <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,910)); // Please enter a player name (usage: @where <char name>).
return -1;
}
@@ -441,7 +441,7 @@
strncmp(pl_sd->status.name, atcmd_player_name, NAME_LENGTH) != 0 ||
(pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > pc_get_group_level(sd) && !pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID))
) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
@@ -461,36 +461,36 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
return -1;
}
if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
{
- clif_displaymessage(fd, msg_txt(247)); // You are not authorized to warp to this map.
+ clif_displaymessage(fd, msg_txt(sd->lang,247)); // You are not authorized to warp to this map.
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
{
- clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ clif_displaymessage(fd, msg_txt(sd->lang,248)); // You are not authorized to warp from your current map.
return -1;
}
if( pc_isdead(sd) )
{
- clif_displaymessage(fd, msg_txt(664));
+ clif_displaymessage(fd, msg_txt(sd->lang,664));
return -1;
}
pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
- sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s
+ sprintf(atcmd_output, msg_txt(sd->lang,4), pl_sd->status.name); // Jumped to %s
clif_displaymessage(fd, atcmd_output);
return 0;
@@ -510,25 +510,25 @@
sscanf(message, "%hd %hd", &x, &y);
if (map[sd->bl.m].flag.noteleport && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ clif_displaymessage(fd, msg_txt(sd->lang,248)); // You are not authorized to warp from your current map.
return -1;
}
if( pc_isdead(sd) )
{
- clif_displaymessage(fd, msg_txt(664));
+ clif_displaymessage(fd, msg_txt(sd->lang,664));
return -1;
}
if ((x || y) && map_getcell(sd->bl.m, x, y, CELL_CHKNOPASS))
{ //This is to prevent the pc_setpos call from printing an error.
- clif_displaymessage(fd, msg_txt(2));
+ clif_displaymessage(fd, msg_txt(sd->lang,2));
if (!map_search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
pc_setpos(sd, sd->mapindex, x, y, CLR_TELEPORT);
- sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); // Jumped to %d %d
+ sprintf(atcmd_output, msg_txt(sd->lang,5), sd->bl.x, sd->bl.y); // Jumped to %d %d
clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -579,33 +579,33 @@
continue;
switch (display_type) {
case 2: {
- StringBuf_Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s "
+ StringBuf_Printf(&buf, msg_txt(sd->lang,343), pl_sd->status.name); // "Name: %s "
if (pc_get_group_id(pl_sd) > 0) // Player title, if exists
- StringBuf_Printf(&buf, msg_txt(344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) "
- StringBuf_Printf(&buf, msg_txt(347), pl_sd->status.base_level, pl_sd->status.job_level,
+ StringBuf_Printf(&buf, msg_txt(sd->lang,344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) "
+ StringBuf_Printf(&buf, msg_txt(sd->lang,347), pl_sd->status.base_level, pl_sd->status.job_level,
job_name(pl_sd->status.class_)); // "| Lv:%d/%d | Job: %s"
break;
}
case 3: {
if (pc_has_permission(sd, PC_PERM_WHO_DISPLAY_AID))
- StringBuf_Printf(&buf, msg_txt(912), pl_sd->status.char_id, pl_sd->status.account_id); // "(CID:%d/AID:%d) "
- StringBuf_Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s "
+ StringBuf_Printf(&buf, msg_txt(sd->lang,912), pl_sd->status.char_id, pl_sd->status.account_id); // "(CID:%d/AID:%d) "
+ StringBuf_Printf(&buf, msg_txt(sd->lang,343), pl_sd->status.name); // "Name: %s "
if (pc_get_group_id(pl_sd) > 0) // Player title, if exists
- StringBuf_Printf(&buf, msg_txt(344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) "
- StringBuf_Printf(&buf, msg_txt(348), mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); // "| Location: %s %d %d"
+ StringBuf_Printf(&buf, msg_txt(sd->lang,344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) "
+ StringBuf_Printf(&buf, msg_txt(sd->lang,348), mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y); // "| Location: %s %d %d"
break;
}
default: {
struct party_data *p = party_search(pl_sd->status.party_id);
struct guild *g = guild_search(pl_sd->status.guild_id);
- StringBuf_Printf(&buf, msg_txt(343), pl_sd->status.name); // "Name: %s "
+ StringBuf_Printf(&buf, msg_txt(sd->lang,343), pl_sd->status.name); // "Name: %s "
if (pc_get_group_id(pl_sd) > 0) // Player title, if exists
- StringBuf_Printf(&buf, msg_txt(344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) "
+ StringBuf_Printf(&buf, msg_txt(sd->lang,344), pc_group_id2name(pc_get_group_id(pl_sd))); // "(%s) "
if (p != NULL)
- StringBuf_Printf(&buf, msg_txt(345), p->party.name); // " | Party: '%s'"
+ StringBuf_Printf(&buf, msg_txt(sd->lang,345), p->party.name); // " | Party: '%s'"
if (g != NULL)
- StringBuf_Printf(&buf, msg_txt(346), g->name); // " | Guild: '%s'"
+ StringBuf_Printf(&buf, msg_txt(sd->lang,346), g->name); // " | Guild: '%s'"
break;
}
}
@@ -618,18 +618,18 @@
if (map_id < 0) {
if (count == 0)
- StringBuf_Printf(&buf, msg_txt(28)); // No player found.
+ StringBuf_Printf(&buf, msg_txt(sd->lang,28)); // No player found.
else if (count == 1)
- StringBuf_Printf(&buf, msg_txt(29)); // 1 player found.
+ StringBuf_Printf(&buf, msg_txt(sd->lang,29)); // 1 player found.
else
- StringBuf_Printf(&buf, msg_txt(30), count); // %d players found.
+ StringBuf_Printf(&buf, msg_txt(sd->lang,30), count); // %d players found.
} else {
if (count == 0)
- StringBuf_Printf(&buf, msg_txt(54), map[map_id].name); // No player found in map '%s'.
+ StringBuf_Printf(&buf, msg_txt(sd->lang,54), map[map_id].name); // No player found in map '%s'.
else if (count == 1)
- StringBuf_Printf(&buf, msg_txt(55), map[map_id].name); // 1 player found in map '%s'.
+ StringBuf_Printf(&buf, msg_txt(sd->lang,55), map[map_id].name); // 1 player found in map '%s'.
else
- StringBuf_Printf(&buf, msg_txt(56), count, map[map_id].name); // %d players found in map '%s'.
+ StringBuf_Printf(&buf, msg_txt(sd->lang,56), count, map[map_id].name); // %d players found in map '%s'.
}
clif_displaymessage(fd, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
@@ -683,18 +683,18 @@
if (pl_level > level) {
if (pl_sd->sc.option & OPTION_INVISIBLE)
continue;
- sprintf(atcmd_output, msg_txt(913), pl_sd->status.name); // Name: %s (GM)
+ sprintf(atcmd_output, msg_txt(sd->lang,913), pl_sd->status.name); // Name: %s (GM)
clif_displaymessage(fd, atcmd_output);
count++;
continue;
}
- sprintf(atcmd_output, msg_txt(914), // Name: %s (GM:%d) | Location: %s %d %d
+ sprintf(atcmd_output, msg_txt(sd->lang,914), // Name: %s (GM:%d) | Location: %s %d %d
pl_sd->status.name, pl_level,
mapindex_id2name(pl_sd->mapindex), pl_sd->bl.x, pl_sd->bl.y);
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(915), // BLvl: %d | Job: %s (Lvl: %d)
+ sprintf(atcmd_output, msg_txt(sd->lang,915), // BLvl: %d | Job: %s (Lvl: %d)
pl_sd->status.base_level,
job_name(pl_sd->status.class_), pl_sd->status.job_level);
clif_displaymessage(fd, atcmd_output);
@@ -702,8 +702,8 @@
p = party_search(pl_sd->status.party_id);
g = guild_search(pl_sd->status.guild_id);
- sprintf(atcmd_output,msg_txt(916), // Party: '%s' | Guild: '%s'
- p?p->party.name:msg_txt(917), g?g->name:msg_txt(917)); // None.
+ sprintf(atcmd_output,msg_txt(sd->lang,916), // Party: '%s' | Guild: '%s'
+ p?p->party.name:msg_txt(sd->lang,917), g?g->name:msg_txt(sd->lang,917)); // None.
clif_displaymessage(fd, atcmd_output);
count++;
@@ -711,11 +711,11 @@
mapit_free(iter);
if (count == 0)
- clif_displaymessage(fd, msg_txt(150)); // No GM found.
+ clif_displaymessage(fd, msg_txt(sd->lang,150)); // No GM found.
else if (count == 1)
- clif_displaymessage(fd, msg_txt(151)); // 1 GM found.
+ clif_displaymessage(fd, msg_txt(sd->lang,151)); // 1 GM found.
else {
- sprintf(atcmd_output, msg_txt(152), count); // %d GMs found.
+ sprintf(atcmd_output, msg_txt(sd->lang,152), count); // %d GMs found.
clif_displaymessage(fd, atcmd_output);
}
@@ -735,7 +735,7 @@
chrif_save(sd,0);
- clif_displaymessage(fd, msg_txt(6)); // Your save point has been changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,6)); // Your save point has been changed.
return 0;
}
@@ -751,16 +751,16 @@
m = map_mapindex2mapid(sd->status.save_point.map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(249)); // You are not authorized to warp to your save map.
+ clif_displaymessage(fd, msg_txt(sd->lang,249)); // You are not authorized to warp to your save map.
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ clif_displaymessage(fd, msg_txt(sd->lang,248)); // You are not authorized to warp from your current map.
return -1;
}
pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_OUTSIGHT);
- clif_displaymessage(fd, msg_txt(7)); // Warping to save point..
+ clif_displaymessage(fd, msg_txt(sd->lang,7)); // Warping to save point..
return 0;
}
@@ -777,14 +777,14 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &speed) < 1) {
- sprintf(atcmd_output, msg_txt(918), MIN_WALK_SPEED, MAX_WALK_SPEED); // Please enter a speed value (usage: @speed <%d-%d>).
+ sprintf(atcmd_output, msg_txt(sd->lang,918), MIN_WALK_SPEED, MAX_WALK_SPEED); // Please enter a speed value (usage: @speed <%d-%d>).
clif_displaymessage(fd, atcmd_output);
return -1;
}
sd->base_status.speed = cap_value(speed, MIN_WALK_SPEED, MAX_WALK_SPEED);
status_calc_bl(&sd->bl, SCB_SPEED);
- clif_displaymessage(fd, msg_txt(8)); // Speed changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,8)); // Speed changed.
return 0;
}
@@ -800,11 +800,11 @@
if (storage_storageopen(sd) == 1)
{ //Already open.
- clif_displaymessage(fd, msg_txt(250));
+ clif_displaymessage(fd, msg_txt(sd->lang,250));
return -1;
}
- clif_displaymessage(fd, msg_txt(919)); // Storage opened.
+ clif_displaymessage(fd, msg_txt(sd->lang,919)); // Storage opened.
return 0;
}
@@ -818,7 +818,7 @@
nullpo_retr(-1, sd);
if (!sd->status.guild_id) {
- clif_displaymessage(fd, msg_txt(252));
+ clif_displaymessage(fd, msg_txt(sd->lang,252));
return -1;
}
@@ -826,17 +826,17 @@
return -1;
if (sd->state.storage_flag == 1) {
- clif_displaymessage(fd, msg_txt(250));
+ clif_displaymessage(fd, msg_txt(sd->lang,250));
return -1;
}
if (sd->state.storage_flag == 2) {
- clif_displaymessage(fd, msg_txt(251));
+ clif_displaymessage(fd, msg_txt(sd->lang,251));
return -1;
}
storage_guild_storageopen(sd);
- clif_displaymessage(fd, msg_txt(920)); // Guild storage opened.
+ clif_displaymessage(fd, msg_txt(sd->lang,920)); // Guild storage opened.
return 0;
}
@@ -856,7 +856,7 @@
text = atcommand_help_string( command );
// notify the user of the requirement to enter an option
- clif_displaymessage(fd, msg_txt(921)); // Please enter at least one option.
+ clif_displaymessage(fd, msg_txt(sd->lang,921)); // Please enter at least one option.
if( text )
{// send the help text associated with this command
@@ -870,7 +870,7 @@
sd->sc.opt2 = param2;
pc_setoption(sd, param3);
- clif_displaymessage(fd, msg_txt(9)); // Options changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,9)); // Options changed.
return 0;
}
@@ -887,7 +887,7 @@
status_set_viewdata(&sd->bl, sd->disguise);
else
status_set_viewdata(&sd->bl, sd->status.class_);
- clif_displaymessage(fd, msg_txt(10)); // Invisible: Off
+ clif_displaymessage(fd, msg_txt(sd->lang,10)); // Invisible: Off
// increment the number of pvp players on the map
map[sd->bl.m].users_pvp++;
@@ -901,7 +901,7 @@
} else {
sd->sc.option |= OPTION_INVISIBLE;
sd->vd.class_ = INVISIBLE_CLASS;
- clif_displaymessage(fd, msg_txt(11)); // Invisible: On
+ clif_displaymessage(fd, msg_txt(sd->lang,11)); // Invisible: On
// decrement the number of pvp players on the map
map[sd->bl.m].users_pvp--;
@@ -950,15 +950,15 @@
|| job == JOB_LORD_KNIGHT2 || job == JOB_PALADIN2 || job == JOB_BABY_KNIGHT2 || job == JOB_BABY_CRUSADER2 || job == JOB_STAR_GLADIATOR2
|| (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2)
) // Deny direct transformation into dummy jobs
- {clif_displaymessage(fd, msg_txt(923)); //"You can not change to this job by command."
+ {clif_displaymessage(fd, msg_txt(sd->lang,923)); //"You can not change to this job by command."
return 0;}
if (pcdb_checkid(job))
{
if (pc_jobchange(sd, job, upper) == 0)
- clif_displaymessage(fd, msg_txt(12)); // Your job has been changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,12)); // Your job has been changed.
else {
- clif_displaymessage(fd, msg_txt(155)); // You are unable to change your job.
+ clif_displaymessage(fd, msg_txt(sd->lang,155)); // You are unable to change your job.
return -1;
}
} else {
@@ -978,9 +978,9 @@
{
nullpo_retr(-1, sd);
status_kill(&sd->bl);
- clif_displaymessage(sd->fd, msg_txt(13)); // A pity! You've died.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,13)); // A pity! You've died.
if (fd != sd->fd)
- clif_displaymessage(fd, msg_txt(14)); // Character killed.
+ clif_displaymessage(fd, msg_txt(sd->lang,14)); // Character killed.
return 0;
}
@@ -992,11 +992,11 @@
nullpo_retr(-1, sd);
if (!status_revive(&sd->bl, 100, 100))
{
- clif_displaymessage(fd, msg_txt(667));
+ clif_displaymessage(fd, msg_txt(sd->lang,667));
return -1;
}
clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
- clif_displaymessage(fd, msg_txt(16)); // You've been revived! It's a miracle!
+ clif_displaymessage(fd, msg_txt(sd->lang,16)); // You've been revived! It's a miracle!
return 0;
}
@@ -1012,7 +1012,7 @@
if(*(command + 5) != 'c' && *(command + 5) != 'C') {
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(980)); // Please enter a message (usage: @kami <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,980)); // Please enter a message (usage: @kami <message>).
return -1;
}
@@ -1023,12 +1023,12 @@
intif_broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(command + 5) == 'b' || *(command + 5) == 'B') ? 0x10 : 0);
} else {
if(!message || !*message || (sscanf(message, "%lx %199[^\n]", &color, atcmd_output) < 2)) {
- clif_displaymessage(fd, msg_txt(981)); // Please enter color and message (usage: @kamic <color> <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,981)); // Please enter color and message (usage: @kamic <color> <message>).
return -1;
}
if(color > 0xFFFFFF) {
- clif_displaymessage(fd, msg_txt(982)); // Invalid color.
+ clif_displaymessage(fd, msg_txt(sd->lang,982)); // Invalid color.
return -1;
}
intif_broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0);
@@ -1052,24 +1052,24 @@
if ( hp == 0 && sp == 0 ) {
if (!status_percent_heal(&sd->bl, 100, 100))
- clif_displaymessage(fd, msg_txt(157)); // HP and SP have already been recovered.
+ clif_displaymessage(fd, msg_txt(sd->lang,157)); // HP and SP have already been recovered.
else
- clif_displaymessage(fd, msg_txt(17)); // HP, SP recovered.
+ clif_displaymessage(fd, msg_txt(sd->lang,17)); // HP, SP recovered.
return 0;
}
if ( hp > 0 && sp >= 0 ) {
if(!status_heal(&sd->bl, hp, sp, 0))
- clif_displaymessage(fd, msg_txt(157)); // HP and SP are already with the good value.
+ clif_displaymessage(fd, msg_txt(sd->lang,157)); // HP and SP are already with the good value.
else
- clif_displaymessage(fd, msg_txt(17)); // HP, SP recovered.
+ clif_displaymessage(fd, msg_txt(sd->lang,17)); // HP, SP recovered.
return 0;
}
if ( hp < 0 && sp <= 0 ) {
status_damage(NULL, &sd->bl, -hp, -sp, 0, 0);
clif_damage(&sd->bl,&sd->bl, gettick(), 0, 0, -hp, 0, 4, 0);
- clif_displaymessage(fd, msg_txt(156)); // HP or/and SP modified.
+ clif_displaymessage(fd, msg_txt(sd->lang,156)); // HP or/and SP modified.
return 0;
}
@@ -1090,7 +1090,7 @@
status_damage(NULL, &sd->bl, 0, -sp, 0, 0);
}
- clif_displaymessage(fd, msg_txt(156)); // HP or/and SP modified.
+ clif_displaymessage(fd, msg_txt(sd->lang,156)); // HP or/and SP modified.
return 0;
}
@@ -1112,7 +1112,7 @@
sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 &&
sscanf(message, "%99s %d", item_name, &number) < 1
)) {
- clif_displaymessage(fd, msg_txt(983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>).
+ clif_displaymessage(fd, msg_txt(sd->lang,983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>).
return -1;
}
@@ -1122,7 +1122,7 @@
if ((item_data = itemdb_searchname(item_name)) == NULL &&
(item_data = itemdb_exists(atoi(item_name))) == NULL)
{
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,19)); // Invalid item ID or name.
return -1;
}
@@ -1145,7 +1145,7 @@
}
if (flag == 0)
- clif_displaymessage(fd, msg_txt(18)); // Item created.
+ clif_displaymessage(fd, msg_txt(sd->lang,18)); // Item created.
return 0;
}
@@ -1168,8 +1168,8 @@
sscanf(message, "\"%99[^\"]\" %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9 &&
sscanf(message, "%99s %d %d %d %d %d %d %d %d", item_name, &number, &identify, &refine, &attr, &c1, &c2, &c3, &c4) < 9
)) {
- clif_displaymessage(fd, msg_txt(984)); // Please enter all parameters (usage: @item2 <item name/ID> <quantity>
- clif_displaymessage(fd, msg_txt(985)); // <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4>).
+ clif_displaymessage(fd, msg_txt(sd->lang,984)); // Please enter all parameters (usage: @item2 <item name/ID> <quantity>
+ clif_displaymessage(fd, msg_txt(sd->lang,985)); // <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4>).
return -1;
}
@@ -1217,9 +1217,9 @@
}
if (flag == 0)
- clif_displaymessage(fd, msg_txt(18)); // Item created.
+ clif_displaymessage(fd, msg_txt(sd->lang,18)); // Item created.
} else {
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,19)); // Invalid item ID or name.
return -1;
}
@@ -1239,7 +1239,7 @@
pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_COMMAND);
}
}
- clif_displaymessage(fd, msg_txt(20)); // All of your items have been removed.
+ clif_displaymessage(fd, msg_txt(sd->lang,20)); // All of your items have been removed.
return 0;
}
@@ -1254,13 +1254,13 @@
level = atoi(message);
if (!message || !*message || !level) {
- clif_displaymessage(fd, msg_txt(986)); // Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup <number of levels>).
+ clif_displaymessage(fd, msg_txt(sd->lang,986)); // Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup <number of levels>).
return -1;
}
if (level > 0) {
if (sd->status.base_level >= pc_maxbaselv(sd)) { // check for max level by Valaris
- clif_displaymessage(fd, msg_txt(47)); // Base level can't go any higher.
+ clif_displaymessage(fd, msg_txt(sd->lang,47)); // Base level can't go any higher.
return -1;
} // End Addition
if ((unsigned int)level > pc_maxbaselv(sd) || (unsigned int)level > pc_maxbaselv(sd) - sd->status.base_level) // fix positiv overflow
@@ -1272,10 +1272,10 @@
sd->status.base_level += (unsigned int)level;
status_percent_heal(&sd->bl, 100, 100);
clif_misceffect(&sd->bl, 0);
- clif_displaymessage(fd, msg_txt(21)); // Base level raised.
+ clif_displaymessage(fd, msg_txt(sd->lang,21)); // Base level raised.
} else {
if (sd->status.base_level == 1) {
- clif_displaymessage(fd, msg_txt(158)); // Base level can't go any lower.
+ clif_displaymessage(fd, msg_txt(sd->lang,158)); // Base level can't go any lower.
return -1;
}
level*=-1;
@@ -1290,7 +1290,7 @@
else
sd->status.status_point -= status_point;
sd->status.base_level -= (unsigned int)level;
- clif_displaymessage(fd, msg_txt(22)); // Base level lowered.
+ clif_displaymessage(fd, msg_txt(sd->lang,22)); // Base level lowered.
}
sd->status.base_exp = 0;
clif_updatestatus(sd, SP_STATUSPOINT);
@@ -1315,12 +1315,12 @@
level = atoi(message);
if (!message || !*message || !level) {
- clif_displaymessage(fd, msg_txt(987)); // Please enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup <number of levels>).
+ clif_displaymessage(fd, msg_txt(sd->lang,987)); // Please enter a level adjustment (usage: @joblvup/@jlevel/@joblvlup <number of levels>).
return -1;
}
if (level > 0) {
if (sd->status.job_level >= pc_maxjoblv(sd)) {
- clif_displaymessage(fd, msg_txt(23)); // Job level can't go any higher.
+ clif_displaymessage(fd, msg_txt(sd->lang,23)); // Job level can't go any higher.
return -1;
}
if ((unsigned int)level > pc_maxjoblv(sd) || (unsigned int)level > pc_maxjoblv(sd) - sd->status.job_level) // fix positiv overflow
@@ -1328,10 +1328,10 @@
sd->status.job_level += (unsigned int)level;
sd->status.skill_point += level;
clif_misceffect(&sd->bl, 1);
- clif_displaymessage(fd, msg_txt(24)); // Job level raised.
+ clif_displaymessage(fd, msg_txt(sd->lang,24)); // Job level raised.
} else {
if (sd->status.job_level == 1) {
- clif_displaymessage(fd, msg_txt(159)); // Job level can't go any lower.
+ clif_displaymessage(fd, msg_txt(sd->lang,159)); // Job level can't go any lower.
return -1;
}
level *=-1;
@@ -1344,7 +1344,7 @@
sd->status.skill_point = 0;
else
sd->status.skill_point -= level;
- clif_displaymessage(fd, msg_txt(25)); // Job level lowered.
+ clif_displaymessage(fd, msg_txt(sd->lang,25)); // Job level lowered.
}
sd->status.job_exp = 0;
clif_updatestatus(sd, SP_JOBLEVEL);
@@ -1370,7 +1370,7 @@
help = config_lookup(&atcommand_config, "help");
if (help == NULL) {
- clif_displaymessage(fd, msg_txt(27)); // "Commands help is not available."
+ clif_displaymessage(fd, msg_txt(sd->lang,27)); // "Commands help is not available."
return -1;
}
@@ -1383,20 +1383,20 @@
}
if (!pc_can_use_command(sd, command_name, COMMAND_ATCOMMAND)) {
- sprintf(atcmd_output, msg_txt(153), message); // "%s is Unknown Command"
+ sprintf(atcmd_output, msg_txt(sd->lang,153), message); // "%s is Unknown Command"
clif_displaymessage(fd, atcmd_output);
atcommand_get_suggestions(sd, command_name, true);
return -1;
}
if (!config_setting_lookup_string(help, command_name, &text)) {
- sprintf(atcmd_output, msg_txt(988), atcommand_symbol, command_name); // There is no help for %c%s.
+ sprintf(atcmd_output, msg_txt(sd->lang,988), atcommand_symbol, command_name); // There is no help for %c%s.
clif_displaymessage(fd, atcmd_output);
atcommand_get_suggestions(sd, command_name, true);
return -1;
}
- sprintf(atcmd_output, msg_txt(989), atcommand_symbol, command_name); // Help for command %c%s:
+ sprintf(atcmd_output, msg_txt(sd->lang,989), atcommand_symbol, command_name); // Help for command %c%s:
clif_displaymessage(fd, atcmd_output);
{ // Display aliases
@@ -1407,7 +1407,7 @@
bool has_aliases = false;
StringBuf_Init(&buf);
- StringBuf_AppendStr(&buf, msg_txt(990)); // Available aliases:
+ StringBuf_AppendStr(&buf, msg_txt(sd->lang,990)); // Available aliases:
command_info = get_atcommandinfo_byname(command_name);
iter = db_iterator(atcommand_alias_db);
for (alias_info = dbi_first(iter); dbi_exists(iter); alias_info = dbi_next(iter)) {
@@ -1459,7 +1459,7 @@
nullpo_retr(-1, sd);
if (!map[sd->bl.m].flag.pvp) {
- clif_displaymessage(fd, msg_txt(160)); // PvP is already Off.
+ clif_displaymessage(fd, msg_txt(sd->lang,160)); // PvP is already Off.
return -1;
}
@@ -1469,7 +1469,7 @@
clif_map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
map_foreachinmap(atcommand_pvpoff_sub,sd->bl.m, BL_PC);
map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0);
- clif_displaymessage(fd, msg_txt(31)); // PvP: Off.
+ clif_displaymessage(fd, msg_txt(sd->lang,31)); // PvP: Off.
return 0;
}
@@ -1495,7 +1495,7 @@
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.pvp) {
- clif_displaymessage(fd, msg_txt(161)); // PvP is already On.
+ clif_displaymessage(fd, msg_txt(sd->lang,161)); // PvP is already On.
return -1;
}
@@ -1507,7 +1507,7 @@
map_foreachinmap(atcommand_pvpon_sub,sd->bl.m, BL_PC);
}
- clif_displaymessage(fd, msg_txt(32)); // PvP: On.
+ clif_displaymessage(fd, msg_txt(sd->lang,32)); // PvP: On.
return 0;
}
@@ -1520,14 +1520,14 @@
nullpo_retr(-1, sd);
if (!map[sd->bl.m].flag.gvg) {
- clif_displaymessage(fd, msg_txt(162)); // GvG is already Off.
+ clif_displaymessage(fd, msg_txt(sd->lang,162)); // GvG is already Off.
return -1;
}
map[sd->bl.m].flag.gvg = 0;
clif_map_property_mapall(sd->bl.m, MAPPROPERTY_NOTHING);
map_foreachinmap(atcommand_stopattack,sd->bl.m, BL_CHAR, 0);
- clif_displaymessage(fd, msg_txt(33)); // GvG: Off.
+ clif_displaymessage(fd, msg_txt(sd->lang,33)); // GvG: Off.
return 0;
}
@@ -1540,13 +1540,13 @@
nullpo_retr(-1, sd);
if (map[sd->bl.m].flag.gvg) {
- clif_displaymessage(fd, msg_txt(163)); // GvG is already On.
+ clif_displaymessage(fd, msg_txt(sd->lang,163)); // GvG is already On.
return -1;
}
map[sd->bl.m].flag.gvg = 1;
clif_map_property_mapall(sd->bl.m, MAPPROPERTY_AGITZONE);
- clif_displaymessage(fd, msg_txt(34)); // GvG: On.
+ clif_displaymessage(fd, msg_txt(sd->lang,34)); // GvG: On.
return 0;
}
@@ -1562,7 +1562,7 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d %d %d", &hair_style, &hair_color, &cloth_color) < 1) {
- sprintf(atcmd_output, msg_txt(991), // Please enter at least one value (usage: @model <hair ID: %d-%d> <hair color: %d-%d> <clothes color: %d-%d>).
+ sprintf(atcmd_output, msg_txt(sd->lang,991), // Please enter at least one value (usage: @model <hair ID: %d-%d> <hair color: %d-%d> <clothes color: %d-%d>).
MIN_HAIR_STYLE, MAX_HAIR_STYLE, MIN_HAIR_COLOR, MAX_HAIR_COLOR, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR);
clif_displaymessage(fd, atcmd_output);
return -1;
@@ -1574,9 +1574,9 @@
pc_changelook(sd, LOOK_HAIR, hair_style);
pc_changelook(sd, LOOK_HAIR_COLOR, hair_color);
pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif_displaymessage(fd, msg_txt(sd->lang,37)); // An invalid number was specified.
return -1;
}
@@ -1594,16 +1594,16 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &cloth_color) < 1) {
- sprintf(atcmd_output, msg_txt(992), MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); // Please enter a clothes color (usage: @dye/@ccolor <clothes color: %d-%d>).
+ sprintf(atcmd_output, msg_txt(sd->lang,992), MIN_CLOTH_COLOR, MAX_CLOTH_COLOR); // Please enter a clothes color (usage: @dye/@ccolor <clothes color: %d-%d>).
clif_displaymessage(fd, atcmd_output);
return -1;
}
if (cloth_color >= MIN_CLOTH_COLOR && cloth_color <= MAX_CLOTH_COLOR) {
pc_changelook(sd, LOOK_CLOTHES_COLOR, cloth_color);
- clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif_displaymessage(fd, msg_txt(sd->lang,37)); // An invalid number was specified.
return -1;
}
@@ -1621,16 +1621,16 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &hair_style) < 1) {
- sprintf(atcmd_output, msg_txt(993), MIN_HAIR_STYLE, MAX_HAIR_STYLE); // Please enter a hair style (usage: @hairstyle/@hstyle <hair ID: %d-%d>).
+ sprintf(atcmd_output, msg_txt(sd->lang,993), MIN_HAIR_STYLE, MAX_HAIR_STYLE); // Please enter a hair style (usage: @hairstyle/@hstyle <hair ID: %d-%d>).
clif_displaymessage(fd, atcmd_output);
return -1;
}
if (hair_style >= MIN_HAIR_STYLE && hair_style <= MAX_HAIR_STYLE) {
pc_changelook(sd, LOOK_HAIR, hair_style);
- clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif_displaymessage(fd, msg_txt(sd->lang,37)); // An invalid number was specified.
return -1;
}
@@ -1648,16 +1648,16 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &hair_color) < 1) {
- sprintf(atcmd_output, msg_txt(994), MIN_HAIR_COLOR, MAX_HAIR_COLOR); // Please enter a hair color (usage: @haircolor/@hcolor <hair color: %d-%d>).
+ sprintf(atcmd_output, msg_txt(sd->lang,994), MIN_HAIR_COLOR, MAX_HAIR_COLOR); // Please enter a hair color (usage: @haircolor/@hcolor <hair color: %d-%d>).
clif_displaymessage(fd, atcmd_output);
return -1;
}
if (hair_color >= MIN_HAIR_COLOR && hair_color <= MAX_HAIR_COLOR) {
pc_changelook(sd, LOOK_HAIR_COLOR, hair_color);
- clif_displaymessage(fd, msg_txt(36)); // Appearence changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,36)); // Appearence changed.
} else {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif_displaymessage(fd, msg_txt(sd->lang,37)); // An invalid number was specified.
return -1;
}
@@ -1723,7 +1723,7 @@
nullpo_retr(-1, sd);
if( map[sd->bl.m].flag.nogo && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) {
- clif_displaymessage(sd->fd,msg_txt(995)); // You cannot use @go on this map.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,995)); // You cannot use @go on this map.
return 0;
}
@@ -1740,7 +1740,7 @@
// attempt to find the text help string
text = atcommand_help_string( command );
- clif_displaymessage(fd, msg_txt(38)); // Invalid location number, or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,38)); // Invalid location number, or name.
if( text )
{// send the text to the client
@@ -1843,21 +1843,21 @@
{
m = map_mapname2mapid(data[town].map);
if (m >= 0 && map[m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(247));
+ clif_displaymessage(fd, msg_txt(sd->lang,247));
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(248));
+ clif_displaymessage(fd, msg_txt(sd->lang,248));
return -1;
}
if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
- clif_displaymessage(fd, msg_txt(0)); // Warped.
+ clif_displaymessage(fd, msg_txt(sd->lang,0)); // Warped.
} else {
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,1)); // Map not found.
return -1;
}
} else { // if you arrive here, you have an error in town variable when reading of names
- clif_displaymessage(fd, msg_txt(38)); // Invalid location number or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,38)); // Invalid location number or name.
return -1;
}
@@ -1885,7 +1885,7 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(80)); // Give the display name or monster name/id please.
+ clif_displaymessage(fd, msg_txt(sd->lang,80)); // Give the display name or monster name/id please.
return -1;
}
if (sscanf(message, "\"%23[^\"]\" %23s %d", name, monster, &number) > 1 ||
@@ -1901,7 +1901,7 @@
//As before, name may be already filled.
name[0] = '\0';
} else {
- clif_displaymessage(fd, msg_txt(80)); // Give a display name and monster name/id please.
+ clif_displaymessage(fd, msg_txt(sd->lang,80)); // Give a display name and monster name/id please.
return -1;
}
@@ -1909,12 +1909,12 @@
mob_id = mobdb_checkid(atoi(monster));
if (mob_id == 0) {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,40)); // Invalid monster ID or name.
return -1;
}
if (mob_id == MOBID_EMPERIUM) {
- clif_displaymessage(fd, msg_txt(83)); // Monster 'Emperium' cannot be spawned.
+ clif_displaymessage(fd, msg_txt(sd->lang,83)); // Monster 'Emperium' cannot be spawned.
return -1;
}
@@ -1948,13 +1948,13 @@
if (count != 0)
if (number == count)
- clif_displaymessage(fd, msg_txt(39)); // All monster summoned!
+ clif_displaymessage(fd, msg_txt(sd->lang,39)); // All monster summoned!
else {
- sprintf(atcmd_output, msg_txt(240), count); // %d monster(s) summoned!
+ sprintf(atcmd_output, msg_txt(sd->lang,240), count); // %d monster(s) summoned!
clif_displaymessage(fd, atcmd_output);
}
else {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,40)); // Invalid monster ID or name.
return -1;
}
@@ -2001,7 +2001,7 @@
map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, -drop_flag);
- clif_displaymessage(fd, msg_txt(165)); // All monsters killed!
+ clif_displaymessage(fd, msg_txt(sd->lang,165)); // All monsters killed!
return 0;
}
@@ -2018,26 +2018,26 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d %d", &position, &refine) < 2) {
- clif_displaymessage(fd, msg_txt(996)); // Please enter a position and an amount (usage: @refine <equip position> <+/- amount>).
- sprintf(atcmd_output, msg_txt(997), EQP_HEAD_LOW); // %d: Lower Headgear
+ clif_displaymessage(fd, msg_txt(sd->lang,996)); // Please enter a position and an amount (usage: @refine <equip position> <+/- amount>).
+ sprintf(atcmd_output, msg_txt(sd->lang,997), EQP_HEAD_LOW); // %d: Lower Headgear
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(998), EQP_HAND_R); // %d: Right Hand
+ sprintf(atcmd_output, msg_txt(sd->lang,998), EQP_HAND_R); // %d: Right Hand
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(999), EQP_GARMENT); // %d: Garment
+ sprintf(atcmd_output, msg_txt(sd->lang,999), EQP_GARMENT); // %d: Garment
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1000), EQP_ACC_L); // %d: Left Accessory
+ sprintf(atcmd_output, msg_txt(sd->lang,1000), EQP_ACC_L); // %d: Left Accessory
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1001), EQP_ARMOR); // %d: Body Armor
+ sprintf(atcmd_output, msg_txt(sd->lang,1001), EQP_ARMOR); // %d: Body Armor
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1002), EQP_HAND_L); // %d: Left Hand
+ sprintf(atcmd_output, msg_txt(sd->lang,1002), EQP_HAND_L); // %d: Left Hand
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1003), EQP_SHOES); // %d: Shoes
+ sprintf(atcmd_output, msg_txt(sd->lang,1003), EQP_SHOES); // %d: Shoes
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1004), EQP_ACC_R); // %d: Right Accessory
+ sprintf(atcmd_output, msg_txt(sd->lang,1004), EQP_ACC_R); // %d: Right Accessory
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1005), EQP_HEAD_TOP); // %d: Top Headgear
+ sprintf(atcmd_output, msg_txt(sd->lang,1005), EQP_HEAD_TOP); // %d: Top Headgear
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1006), EQP_HEAD_MID); // %d: Mid Headgear
+ sprintf(atcmd_output, msg_txt(sd->lang,1006), EQP_HEAD_MID); // %d: Mid Headgear
clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -2073,11 +2073,11 @@
}
if (count == 0)
- clif_displaymessage(fd, msg_txt(166)); // No item has been refined.
+ clif_displaymessage(fd, msg_txt(sd->lang,166)); // No item has been refined.
else if (count == 1)
- clif_displaymessage(fd, msg_txt(167)); // 1 item has been refined.
+ clif_displaymessage(fd, msg_txt(sd->lang,167)); // 1 item has been refined.
else {
- sprintf(atcmd_output, msg_txt(168), count); // %d items have been refined.
+ sprintf(atcmd_output, msg_txt(sd->lang,168), count); // %d items have been refined.
clif_displaymessage(fd, atcmd_output);
}
@@ -2102,13 +2102,13 @@
sscanf(message, "\"%99[^\"]\" %d %d", item_name, &attribute, &star) < 1 &&
sscanf(message, "%99s %d %d", item_name, &attribute, &star) < 1
)) {
- clif_displaymessage(fd, msg_txt(1007)); // Please enter at least one item name/ID (usage: @produce <equip name/ID> <element> <# of very's>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1007)); // Please enter at least one item name/ID (usage: @produce <equip name/ID> <element> <# of very's>).
return -1;
}
if ( (item_data = itemdb_searchname(item_name)) == NULL &&
(item_data = itemdb_exists(atoi(item_name))) == NULL ) {
- clif_displaymessage(fd, msg_txt(170)); //This item is not an equipment.
+ clif_displaymessage(fd, msg_txt(sd->lang,170)); //This item is not an equipment.
return -1;
}
@@ -2135,7 +2135,7 @@
if ((flag = pc_additem(sd, &tmp_item, 1, LOG_TYPE_COMMAND)))
clif_additem(sd, 0, 0, flag);
} else {
- sprintf(atcmd_output, msg_txt(169), item_id, item_data->name); // The item (%d: '%s') is not equipable.
+ sprintf(atcmd_output, msg_txt(sd->lang,169), item_id, item_data->name); // The item (%d: '%s') is not equipable.
clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -2156,13 +2156,13 @@
if( !message || !*message || sscanf(message, "%d", &position) < 1 )
{
int i;
- clif_displaymessage(sd->fd, msg_txt(668));
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,668));
for( i = 0; i < MAX_MEMOPOINTS; i++ )
{
if( sd->status.memo_point[i].map )
sprintf(atcmd_output, "%d - %s (%d,%d)", i, mapindex_id2name(sd->status.memo_point[i].map), sd->status.memo_point[i].x, sd->status.memo_point[i].y);
else
- sprintf(atcmd_output, msg_txt(171), i); // %d - void
+ sprintf(atcmd_output, msg_txt(sd->lang,171), i); // %d - void
clif_displaymessage(sd->fd, atcmd_output);
}
return 0;
@@ -2170,7 +2170,7 @@
if( position < 0 || position >= MAX_MEMOPOINTS )
{
- sprintf(atcmd_output, msg_txt(1008), 0, MAX_MEMOPOINTS-1); // Please enter a valid position (usage: @memo <memo_position:%d-%d>).
+ sprintf(atcmd_output, msg_txt(sd->lang,1008), 0, MAX_MEMOPOINTS-1); // Please enter a valid position (usage: @memo <memo_position:%d-%d>).
clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -2213,7 +2213,7 @@
nullpo_retr(-1, sd);
if (!message || !*message || (i = sscanf(message, "%d %d %d %d %d %d", &type, &flag, &tick, &val1, &val2, &val3)) < 1) {
- clif_displaymessage(fd, msg_txt(1009)); // Please enter a status type/flag (usage: @displaystatus <status type> <flag> <tick> {<val1> {<val2> {<val3>}}}).
+ clif_displaymessage(fd, msg_txt(sd->lang,1009)); // Please enter a status type/flag (usage: @displaystatus <status type> <flag> <tick> {<val1> {<val2> {<val3>}}}).
return -1;
}
if (i < 2) flag = 1;
@@ -2233,7 +2233,7 @@
unsigned int new_status_point;
if (!message || !*message || (point = atoi(message)) == 0) {
- clif_displaymessage(fd, msg_txt(1010)); // Please enter a number (usage: @stpoint <number of points>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1010)); // Please enter a number (usage: @stpoint <number of points>).
return -1;
}
@@ -2260,12 +2260,12 @@
if (new_status_point != sd->status.status_point) {
sd->status.status_point = new_status_point;
clif_updatestatus(sd, SP_STATUSPOINT);
- clif_displaymessage(fd, msg_txt(174)); // Number of status points changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,174)); // Number of status points changed.
} else {
if (point < 0)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,41)); // Unable to decrease the number/value.
else
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,149)); // Unable to increase the number/value.
return -1;
}
@@ -2282,7 +2282,7 @@
nullpo_retr(-1, sd);
if (!message || !*message || (point = atoi(message)) == 0) {
- clif_displaymessage(fd, msg_txt(1011)); // Please enter a number (usage: @skpoint <number of points>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1011)); // Please enter a number (usage: @skpoint <number of points>).
return -1;
}
@@ -2309,12 +2309,12 @@
if (new_skill_point != sd->status.skill_point) {
sd->status.skill_point = new_skill_point;
clif_updatestatus(sd, SP_SKILLPOINT);
- clif_displaymessage(fd, msg_txt(175)); // Number of skill points changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,175)); // Number of skill points changed.
} else {
if (point < 0)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,41)); // Unable to decrease the number/value.
else
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,149)); // Unable to increase the number/value.
return -1;
}
@@ -2330,20 +2330,20 @@
nullpo_retr(-1, sd);
if (!message || !*message || (zeny = atoi(message)) == 0) {
- clif_displaymessage(fd, msg_txt(1012)); // Please enter an amount (usage: @zeny <amount>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1012)); // Please enter an amount (usage: @zeny <amount>).
return -1;
}
if(zeny > 0){
if((ret=pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL)) == 1)
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,149)); // Unable to increase the number/value.
}
else {
if( sd->status.zeny < -zeny ) zeny = -sd->status.zeny;
if((ret=pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,41)); // Unable to decrease the number/value.
}
- if(!ret) clif_displaymessage(fd, msg_txt(176)); //ret=0 mean cmd success
+ if(!ret) clif_displaymessage(fd, msg_txt(sd->lang,176)); //ret=0 mean cmd success
return 0;
}
@@ -2361,14 +2361,14 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) {
- clif_displaymessage(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
return -1;
}
ARR_FIND( 0, ARRAYLENGTH(param), i, strcmpi(command+1, param[i]) == 0 );
if( i == ARRAYLENGTH(param) || i > MAX_STATUS_TYPE) { // normally impossible...
- clif_displaymessage(fd, msg_txt(1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>).
return -1;
}
@@ -2397,12 +2397,12 @@
clif_updatestatus(sd, SP_STR + i);
clif_updatestatus(sd, SP_USTR + i);
status_calc_pc(sd, 0);
- clif_displaymessage(fd, msg_txt(42)); // Stat changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,42)); // Stat changed.
} else {
if (value < 0)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,41)); // Unable to decrease the number/value.
else
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
+ clif_displaymessage(fd, msg_txt(sd->lang,149)); // Unable to increase the number/value.
return -1;
}
@@ -2456,12 +2456,12 @@
if (count > 0) { // if at least 1 stat modified
status_calc_pc(sd, 0);
- clif_displaymessage(fd, msg_txt(84)); // All stats changed!
+ clif_displaymessage(fd, msg_txt(sd->lang,84)); // All stats changed!
} else {
if (value < 0)
- clif_displaymessage(fd, msg_txt(177)); // You cannot decrease that stat anymore.
+ clif_displaymessage(fd, msg_txt(sd->lang,177)); // You cannot decrease that stat anymore.
else
- clif_displaymessage(fd, msg_txt(178)); // You cannot increase that stat anymore.
+ clif_displaymessage(fd, msg_txt(sd->lang,178)); // You cannot increase that stat anymore.
return -1;
}
@@ -2479,16 +2479,16 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &level) < 1 || level == 0) {
- clif_displaymessage(fd, msg_txt(1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>).
return -1;
}
if (sd->status.guild_id <= 0 || (guild_info = guild_search(sd->status.guild_id)) == NULL) {
- clif_displaymessage(fd, msg_txt(43)); // You're not in a guild.
+ clif_displaymessage(fd, msg_txt(sd->lang,43)); // You're not in a guild.
return -1;
}
//if (strcmp(sd->status.name, guild_info->master) != 0) {
- // clif_displaymessage(fd, msg_txt(44)); // You're not the master of your guild.
+ // clif_displaymessage(fd, msg_txt(sd->lang,44)); // You're not the master of your guild.
// return -1;
//}
@@ -2500,9 +2500,9 @@
if (added_level != 0) {
intif_guild_change_basicinfo(guild_info->guild_id, GBI_GUILDLV, &added_level, sizeof(added_level));
- clif_displaymessage(fd, msg_txt(179)); // Guild level changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,179)); // Guild level changed.
} else {
- clif_displaymessage(fd, msg_txt(45)); // Guild level change failed.
+ clif_displaymessage(fd, msg_txt(sd->lang,45)); // Guild level change failed.
return -1;
}
@@ -2519,7 +2519,7 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1015)); // Please enter a monster/egg name/ID (usage: @makeegg <pet>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1015)); // Please enter a monster/egg name/ID (usage: @makeegg <pet>).
return -1;
}
@@ -2542,7 +2542,7 @@
(short)pet_db[pet_id].EggID, 0, (short)pet_db[pet_id].intimate,
100, 0, 1, pet_db[pet_id].jname);
} else {
- clif_displaymessage(fd, msg_txt(180)); // The monster/egg name/id doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,180)); // The monster/egg name/id doesn't exist.
return -1;
}
@@ -2558,7 +2558,7 @@
if (sd->status.pet_id <= 0)
clif_sendegg(sd);
else {
- clif_displaymessage(fd, msg_txt(181)); // You already have a pet.
+ clif_displaymessage(fd, msg_txt(sd->lang,181)); // You already have a pet.
return -1;
}
@@ -2575,30 +2575,30 @@
nullpo_retr(-1, sd);
if (!message || !*message || (friendly = atoi(message)) < 0) {
- clif_displaymessage(fd, msg_txt(1016)); // Please enter a valid value (usage: @petfriendly <0-1000>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1016)); // Please enter a valid value (usage: @petfriendly <0-1000>).
return -1;
}
pd = sd->pd;
if (!pd) {
- clif_displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
+ clif_displaymessage(fd, msg_txt(sd->lang,184)); // Sorry, but you have no pet.
return -1;
}
if (friendly < 0 || friendly > 1000)
{
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif_displaymessage(fd, msg_txt(sd->lang,37)); // An invalid number was specified.
return -1;
}
if (friendly == pd->pet.intimate) {
- clif_displaymessage(fd, msg_txt(183)); // Pet intimacy is already at maximum.
+ clif_displaymessage(fd, msg_txt(sd->lang,183)); // Pet intimacy is already at maximum.
return -1;
}
pet_set_intimate(pd, friendly);
clif_send_petstatus(sd);
- clif_displaymessage(fd, msg_txt(182)); // Pet intimacy changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,182)); // Pet intimacy changed.
return 0;
}
@@ -2612,27 +2612,27 @@
nullpo_retr(-1, sd);
if (!message || !*message || (hungry = atoi(message)) < 0) {
- clif_displaymessage(fd, msg_txt(1017)); // Please enter a valid number (usage: @pethungry <0-100>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1017)); // Please enter a valid number (usage: @pethungry <0-100>).
return -1;
}
pd = sd->pd;
if (!sd->status.pet_id || !pd) {
- clif_displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
+ clif_displaymessage(fd, msg_txt(sd->lang,184)); // Sorry, but you have no pet.
return -1;
}
if (hungry < 0 || hungry > 100) {
- clif_displaymessage(fd, msg_txt(37)); // An invalid number was specified.
+ clif_displaymessage(fd, msg_txt(sd->lang,37)); // An invalid number was specified.
return -1;
}
if (hungry == pd->pet.hungry) {
- clif_displaymessage(fd, msg_txt(186)); // Pet hunger is already at maximum.
+ clif_displaymessage(fd, msg_txt(sd->lang,186)); // Pet hunger is already at maximum.
return -1;
}
pd->pet.hungry = hungry;
clif_send_petstatus(sd);
- clif_displaymessage(fd, msg_txt(185)); // Pet hunger changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,185)); // Pet hunger changed.
return 0;
}
@@ -2645,19 +2645,19 @@
struct pet_data *pd;
nullpo_retr(-1, sd);
if (!sd->status.pet_id || !sd->pd) {
- clif_displaymessage(fd, msg_txt(184)); // Sorry, but you have no pet.
+ clif_displaymessage(fd, msg_txt(sd->lang,184)); // Sorry, but you have no pet.
return -1;
}
pd = sd->pd;
if (!pd->pet.rename_flag) {
- clif_displaymessage(fd, msg_txt(188)); // You can already rename your pet.
+ clif_displaymessage(fd, msg_txt(sd->lang,188)); // You can already rename your pet.
return -1;
}
pd->pet.rename_flag = 0;
intif_save_petdata(sd->status.account_id, &pd->pet);
clif_send_petstatus(sd);
- clif_displaymessage(fd, msg_txt(187)); // You can now rename your pet.
+ clif_displaymessage(fd, msg_txt(sd->lang,187)); // You can now rename your pet.
return 0;
}
@@ -2671,35 +2671,35 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1018)); // Please enter a player name (usage: @recall <char name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1018)); // Please enter a player name (usage: @recall <char name/ID>).
return -1;
}
if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level doesn't authorize you to preform this action on the specified player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level doesn't authorize you to preform this action on the specified player.
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1019)); // You are not authorized to warp someone to this map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1019)); // You are not authorized to warp someone to this map.
return -1;
}
if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1020)); // You are not authorized to warp this player from their map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1020)); // You are not authorized to warp this player from their map.
return -1;
}
if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) {
return -1;
}
pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
- sprintf(atcmd_output, msg_txt(46), pl_sd->status.name); // %s recalled!
+ sprintf(atcmd_output, msg_txt(sd->lang,46), pl_sd->status.name); // %s recalled!
clif_displaymessage(fd, atcmd_output);
return 0;
@@ -2716,12 +2716,12 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1021)); // Please enter a player name (usage: @charblock/@block <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1021)); // Please enter a player name (usage: @charblock/@block <char name>).
return -1;
}
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 1, 0, 0, 0, 0, 0, 0); // type: 1 - block
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif_displaymessage(fd, msg_txt(sd->lang,88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2753,7 +2753,7 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%255s %23[^\n]", atcmd_output, atcmd_player_name) < 2) {
- clif_displaymessage(fd, msg_txt(1022)); // Please enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish <time> <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1022)); // Please enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish <time> <char name>).
return -1;
}
@@ -2797,7 +2797,7 @@
}
}
if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0 && second == 0) {
- clif_displaymessage(fd, msg_txt(85)); // Invalid time for ban command.
+ clif_displaymessage(fd, msg_txt(sd->lang,85)); // Invalid time for ban command.
return -1;
}
/**
@@ -2813,12 +2813,12 @@
tmtime->tm_sec = tmtime->tm_sec + second;
timestamp = mktime(tmtime);
if( timestamp <= time(NULL) && !pc_can_use_command(sd, "unban", COMMAND_ATCOMMAND) ) {
- clif_displaymessage(fd,msg_txt(1023)); // You are not allowed to reduce the length of a ban.
+ clif_displaymessage(fd,msg_txt(sd->lang,1023)); // You are not allowed to reduce the length of a ban.
return -1;
}
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 2, year, month, day, hour, minute, second); // type: 2 - ban
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif_displaymessage(fd, msg_txt(sd->lang,88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2833,13 +2833,13 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1024)); // Please enter a player name (usage: @charunblock <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1024)); // Please enter a player name (usage: @charunblock <char name>).
return -1;
}
// send answer to login server via char-server
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 3, 0, 0, 0, 0, 0, 0); // type: 3 - unblock
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif_displaymessage(fd, msg_txt(sd->lang,88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2854,13 +2854,13 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1025)); // Please enter a player name (usage: @charunban <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1025)); // Please enter a player name (usage: @charunban <char name>).
return -1;
}
// send answer to login server via char-server
chrif_char_ask_name(sd->status.account_id, atcmd_player_name, 4, 0, 0, 0, 0, 0, 0); // type: 4 - unban
- clif_displaymessage(fd, msg_txt(88)); // Character name sent to char-server to ask it.
+ clif_displaymessage(fd, msg_txt(sd->lang,88)); // Character name sent to char-server to ask it.
return 0;
}
@@ -2875,7 +2875,7 @@
if (night_flag != 1) {
map_night_timer(night_timer_tid, 0, 0, 1);
} else {
- clif_displaymessage(fd, msg_txt(89)); // Night mode is already enabled.
+ clif_displaymessage(fd, msg_txt(sd->lang,89)); // Night mode is already enabled.
return -1;
}
@@ -2892,7 +2892,7 @@
if (night_flag != 0) {
map_day_timer(day_timer_tid, 0, 0, 1);
} else {
- clif_displaymessage(fd, msg_txt(90)); // Day mode is already enabled.
+ clif_displaymessage(fd, msg_txt(sd->lang,90)); // Day mode is already enabled.
return -1;
}
@@ -2916,12 +2916,12 @@
{
status_kill(&pl_sd->bl);
clif_specialeffect(&pl_sd->bl,450,AREA);
- clif_displaymessage(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
+ clif_displaymessage(pl_sd->fd, msg_txt(sd->lang,61)); // The holy messenger has given judgement.
}
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(62)); // Judgement was made.
+ clif_displaymessage(fd, msg_txt(sd->lang,62)); // Judgement was made.
return 0;
}
@@ -2943,12 +2943,12 @@
{
status_kill(&pl_sd->bl);
clif_specialeffect(&pl_sd->bl,450,AREA);
- clif_displaymessage(pl_sd->fd, msg_txt(61)); // The holy messenger has given judgement.
+ clif_displaymessage(pl_sd->fd, msg_txt(sd->lang,61)); // The holy messenger has given judgement.
}
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(62)); // Judgement was made.
+ clif_displaymessage(fd, msg_txt(sd->lang,62)); // Judgement was made.
return 0;
}
@@ -2961,7 +2961,7 @@
status_revive(&sd->bl, 100, 100);
clif_skill_nodamage(&sd->bl,&sd->bl,ALL_RESURRECTION,4,1);
- clif_displaymessage(sd->fd, msg_txt(63)); // Mercy has been shown.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,63)); // Mercy has been shown.
}
/*==========================================
@@ -2980,7 +2980,7 @@
atcommand_raise_sub(pl_sd);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(64)); // Mercy has been granted.
+ clif_displaymessage(fd, msg_txt(sd->lang,64)); // Mercy has been granted.
return 0;
}
@@ -3001,7 +3001,7 @@
atcommand_raise_sub(pl_sd);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(64)); // Mercy has been granted.
+ clif_displaymessage(fd, msg_txt(sd->lang,64)); // Mercy has been granted.
return 0;
}
@@ -3017,19 +3017,19 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1026)); // Please enter a player name (usage: @kick <char name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1026)); // Please enter a player name (usage: @kick <char name/ID>).
return -1;
}
if((pl_sd=map_nick2sd((char *)message)) == NULL && (pl_sd=map_charid2sd(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
@@ -3057,7 +3057,7 @@
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(195)); // All players have been kicked!
+ clif_displaymessage(fd, msg_txt(sd->lang,195)); // All players have been kicked!
return 0;
}
@@ -3071,7 +3071,7 @@
pc_allskillup(sd); // all skills
sd->status.skill_point = 0; // 0 skill points
clif_updatestatus(sd, SP_SKILLPOINT); // update
- clif_displaymessage(fd, msg_txt(76)); // All skills have been added to your skill tree.
+ clif_displaymessage(fd, msg_txt(sd->lang,76)); // All skills have been added to your skill tree.
return 0;
}
@@ -3092,7 +3092,7 @@
text = atcommand_help_string( command );
// send the error message as always
- clif_displaymessage(fd, msg_txt(1027)); // Please enter a quest skill number.
+ clif_displaymessage(fd, msg_txt(sd->lang,1027)); // Please enter a quest skill number.
if( text )
{// send the skill ID list associated with this command
@@ -3102,20 +3102,20 @@
return -1;
}
if (skill_id >= MAX_SKILL_DB) {
- clif_displaymessage(fd, msg_txt(198)); // This skill number doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,198)); // This skill number doesn't exist.
return -1;
}
if (!(skill_get_inf2(skill_id) & INF2_QUEST_SKILL)) {
- clif_displaymessage(fd, msg_txt(197)); // This skill number doesn't exist or isn't a quest skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,197)); // This skill number doesn't exist or isn't a quest skill.
return -1;
}
if (pc_checkskill(sd, skill_id) > 0) {
- clif_displaymessage(fd, msg_txt(196)); // You already have this quest skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,196)); // You already have this quest skill.
return -1;
}
pc_skill(sd, skill_id, 1, 0);
- clif_displaymessage(fd, msg_txt(70)); // You have learned the skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,70)); // You have learned the skill.
return 0;
}
@@ -3136,7 +3136,7 @@
text = atcommand_help_string( command );
// send the error message as always
- clif_displaymessage(fd, msg_txt(1027)); // Please enter a quest skill number.
+ clif_displaymessage(fd, msg_txt(sd->lang,1027)); // Please enter a quest skill number.
if( text )
{// send the skill ID list associated with this command
@@ -3146,22 +3146,22 @@
return -1;
}
if (skill_id >= MAX_SKILL) {
- clif_displaymessage(fd, msg_txt(198)); // This skill number doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,198)); // This skill number doesn't exist.
return -1;
}
if (!(skill_get_inf2(skill_id) & INF2_QUEST_SKILL)) {
- clif_displaymessage(fd, msg_txt(197)); // This skill number doesn't exist or isn't a quest skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,197)); // This skill number doesn't exist or isn't a quest skill.
return -1;
}
if (pc_checkskill(sd, skill_id) == 0) {
- clif_displaymessage(fd, msg_txt(201)); // You don't have this quest skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,201)); // You don't have this quest skill.
return -1;
}
sd->status.skill[skill_id].lv = 0;
sd->status.skill[skill_id].flag = 0;
clif_deleteskill(sd,skill_id);
- clif_displaymessage(fd, msg_txt(71)); // You have forgotten the skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,71)); // You have forgotten the skill.
return 0;
}
@@ -3180,7 +3180,7 @@
if( !message || !*message || (number = atoi(message)) < 0 || number > max_spiritballs )
{
char msg[CHAT_SIZE_MAX];
- safesnprintf(msg, sizeof(msg), msg_txt(1028), max_spiritballs); // Please enter a party name (usage: @party <party_name>).
+ safesnprintf(msg, sizeof(msg), msg_txt(sd->lang,1028), max_spiritballs); // Please enter a party name (usage: @party <party_name>).
clif_displaymessage(fd, msg);
return -1;
}
@@ -3205,7 +3205,7 @@
memset(party, '\0', sizeof(party));
if (!message || !*message || sscanf(message, "%23[^\n]", party) < 1) {
- clif_displaymessage(fd, msg_txt(1029)); // Please enter a party name (usage: @party <party_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1029)); // Please enter a party name (usage: @party <party_name>).
return -1;
}
@@ -3226,7 +3226,7 @@
memset(guild, '\0', sizeof(guild));
if (!message || !*message || sscanf(message, "%23[^\n]", guild) < 1) {
- clif_displaymessage(fd, msg_txt(1030)); // Please enter a guild name (usage: @guild <guild_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1030)); // Please enter a guild name (usage: @guild <guild_name>).
return -1;
}
@@ -3255,15 +3255,15 @@
return -1; // Something went wrong
}
} else { // Not guild master
- clif_displaymessage(fd, msg_txt(1181)); // You need to be a Guild Master to use this command.
+ clif_displaymessage(fd, msg_txt(sd->lang,1181)); // You need to be a Guild Master to use this command.
return -1;
}
} else { // Guild was not found. HOW?
- clif_displaymessage(fd, msg_txt(252)); // You are not in a guild.
+ clif_displaymessage(fd, msg_txt(sd->lang,252)); // You are not in a guild.
return -1;
}
} else { // Player does not have a guild
- clif_displaymessage(fd, msg_txt(252)); // You are not in a guild.
+ clif_displaymessage(fd, msg_txt(sd->lang,252)); // You are not in a guild.
return -1;
}
return 0;
@@ -3276,13 +3276,13 @@
{
nullpo_retr(-1, sd);
if (agit_flag == 1) {
- clif_displaymessage(fd, msg_txt(73)); // War of Emperium is currently in progress.
+ clif_displaymessage(fd, msg_txt(sd->lang,73)); // War of Emperium is currently in progress.
return -1;
}
agit_flag = 1;
guild_agit_start();
- clif_displaymessage(fd, msg_txt(72)); // War of Emperium has been initiated.
+ clif_displaymessage(fd, msg_txt(sd->lang,72)); // War of Emperium has been initiated.
return 0;
}
@@ -3294,13 +3294,13 @@
{
nullpo_retr(-1, sd);
if (agit2_flag == 1) {
- clif_displaymessage(fd, msg_txt(404)); // "War of Emperium SE is currently in progress."
+ clif_displaymessage(fd, msg_txt(sd->lang,404)); // "War of Emperium SE is currently in progress."
return -1;
}
agit2_flag = 1;
guild_agit2_start();
- clif_displaymessage(fd, msg_txt(403)); // "War of Emperium SE has been initiated."
+ clif_displaymessage(fd, msg_txt(sd->lang,403)); // "War of Emperium SE has been initiated."
return 0;
}
@@ -3312,13 +3312,13 @@
{
nullpo_retr(-1, sd);
if (agit_flag == 0) {
- clif_displaymessage(fd, msg_txt(75)); // War of Emperium is currently not in progress.
+ clif_displaymessage(fd, msg_txt(sd->lang,75)); // War of Emperium is currently not in progress.
return -1;
}
agit_flag = 0;
guild_agit_end();
- clif_displaymessage(fd, msg_txt(74)); // War of Emperium has been ended.
+ clif_displaymessage(fd, msg_txt(sd->lang,74)); // War of Emperium has been ended.
return 0;
}
@@ -3330,13 +3330,13 @@
{
nullpo_retr(-1, sd);
if (agit2_flag == 0) {
- clif_displaymessage(fd, msg_txt(406)); // "War of Emperium SE is currently not in progress."
+ clif_displaymessage(fd, msg_txt(sd->lang,406)); // "War of Emperium SE is currently not in progress."
return -1;
}
agit2_flag = 0;
guild_agit2_end();
- clif_displaymessage(fd, msg_txt(405)); // "War of Emperium SE has been ended."
+ clif_displaymessage(fd, msg_txt(sd->lang,405)); // "War of Emperium SE has been ended."
return 0;
}
@@ -3366,23 +3366,23 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%99s", item_name) < 0) {
- clif_displaymessage(fd, msg_txt(1031)); // Please enter part of an item name (usage: @idsearch <part_of_item_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1031)); // Please enter part of an item name (usage: @idsearch <part_of_item_name>).
return -1;
}
- sprintf(atcmd_output, msg_txt(77), item_name); // The reference result of '%s' (name: id):
+ sprintf(atcmd_output, msg_txt(sd->lang,77), item_name); // The reference result of '%s' (name: id):
clif_displaymessage(fd, atcmd_output);
match = itemdb_searchname_array(item_array, MAX_SEARCH, item_name);
if (match > MAX_SEARCH) {
- sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, match);
+ sprintf(atcmd_output, msg_txt(sd->lang,269), MAX_SEARCH, match);
clif_displaymessage(fd, atcmd_output);
match = MAX_SEARCH;
}
for(i = 0; i < match; i++) {
- sprintf(atcmd_output, msg_txt(78), item_array[i]->jname, item_array[i]->nameid); // %s: %d
+ sprintf(atcmd_output, msg_txt(sd->lang,78), item_array[i]->jname, item_array[i]->nameid); // %s: %d
clif_displaymessage(fd, atcmd_output);
}
- sprintf(atcmd_output, msg_txt(79), match); // It is %d affair above.
+ sprintf(atcmd_output, msg_txt(sd->lang,79), match); // It is %d affair above.
clif_displaymessage(fd, atcmd_output);
return 0;
@@ -3401,7 +3401,7 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1032)); // You are not authorized to warp somenone to your current map.
return -1;
}
@@ -3426,9 +3426,9 @@
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(92)); // All characters recalled!
+ clif_displaymessage(fd, msg_txt(sd->lang,92)); // All characters recalled!
if (count) {
- sprintf(atcmd_output, msg_txt(1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
+ sprintf(atcmd_output, msg_txt(sd->lang,1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
clif_displaymessage(fd, atcmd_output);
}
@@ -3451,19 +3451,19 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
- clif_displaymessage(fd, msg_txt(1034)); // Please enter a guild name/ID (usage: @guildrecall <guild_name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1034)); // Please enter a guild name/ID (usage: @guildrecall <guild_name/ID>).
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1032)); // You are not authorized to warp somenone to your current map.
return -1;
}
if ((g = guild_searchname(guild_name)) == NULL && // name first to avoid error when name begin with a number
(g = guild_search(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif_displaymessage(fd, msg_txt(sd->lang,94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -3484,10 +3484,10 @@
}
mapit_free(iter);
- sprintf(atcmd_output, msg_txt(93), g->name); // All online characters of the %s guild have been recalled to your position.
+ sprintf(atcmd_output, msg_txt(sd->lang,93), g->name); // All online characters of the %s guild have been recalled to your position.
clif_displaymessage(fd, atcmd_output);
if (count) {
- sprintf(atcmd_output, msg_txt(1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
+ sprintf(atcmd_output, msg_txt(sd->lang,1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
clif_displaymessage(fd, atcmd_output);
}
@@ -3510,19 +3510,19 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%23[^\n]", party_name) < 1) {
- clif_displaymessage(fd, msg_txt(1035)); // Please enter a party name/ID (usage: @partyrecall <party_name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1035)); // Please enter a party name/ID (usage: @partyrecall <party_name/ID>).
return -1;
}
if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif_displaymessage(fd, msg_txt(1032)); // You are not authorized to warp somenone to your current map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1032)); // You are not authorized to warp somenone to your current map.
return -1;
}
if ((p = party_searchname(party_name)) == NULL && // name first to avoid error when name begin with a number
(p = party_search(atoi(message))) == NULL)
{
- clif_displaymessage(fd, msg_txt(96)); // Incorrect name or ID, or no one from the party is online.
+ clif_displaymessage(fd, msg_txt(sd->lang,96)); // Incorrect name or ID, or no one from the party is online.
return -1;
}
@@ -3543,10 +3543,10 @@
}
mapit_free(iter);
- sprintf(atcmd_output, msg_txt(95), p->party.name); // All online characters of the %s party have been recalled to your position.
+ sprintf(atcmd_output, msg_txt(sd->lang,95), p->party.name); // All online characters of the %s party have been recalled to your position.
clif_displaymessage(fd, atcmd_output);
if (count) {
- sprintf(atcmd_output, msg_txt(1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
+ sprintf(atcmd_output, msg_txt(sd->lang,1033), count); // Because you are not authorized to warp from some maps, %d player(s) have not been recalled.
clif_displaymessage(fd, atcmd_output);
}
@@ -3560,7 +3560,7 @@
{
nullpo_retr(-1, sd);
itemdb_reload();
- clif_displaymessage(fd, msg_txt(97)); // Item database has been reloaded.
+ clif_displaymessage(fd, msg_txt(sd->lang,97)); // Item database has been reloaded.
return 0;
}
@@ -3577,7 +3577,7 @@
read_mercenarydb();
read_mercenary_skilldb();
reload_elementaldb();
- clif_displaymessage(fd, msg_txt(98)); // Monster database has been reloaded.
+ clif_displaymessage(fd, msg_txt(sd->lang,98)); // Monster database has been reloaded.
return 0;
}
@@ -3592,7 +3592,7 @@
merc_skill_reload();
reload_elemental_skilldb();
read_mercenary_skilldb();
- clif_displaymessage(fd, msg_txt(99)); // Skill database has been reloaded.
+ clif_displaymessage(fd, msg_txt(sd->lang,99)); // Skill database has been reloaded.
return 0;
}
@@ -3605,14 +3605,14 @@
config_t run_test;
if (conf_read_file(&run_test, "conf/groups.conf")) {
- clif_displaymessage(fd, msg_txt(1036)); // Error reading groups.conf, reload failed.
+ clif_displaymessage(fd, msg_txt(sd->lang,1036)); // Error reading groups.conf, reload failed.
return -1;
}
config_destroy(&run_test);
if (conf_read_file(&run_test, ATCOMMAND_CONF_FILENAME)) {
- clif_displaymessage(fd, msg_txt(1037)); // Error reading atcommand_athena.conf, reload failed.
+ clif_displaymessage(fd, msg_txt(sd->lang,1037)); // Error reading atcommand_athena.conf, reload failed.
return -1;
}
@@ -3620,7 +3620,7 @@
atcommand_doload();
pc_groups_reload();
- clif_displaymessage(fd, msg_txt(254));
+ clif_displaymessage(fd, msg_txt(sd->lang,254));
return 0;
}
/*==========================================
@@ -3668,7 +3668,7 @@
mob_reload(); //Needed as well so rate changes take effect.
chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);
}
- clif_displaymessage(fd, msg_txt(255));
+ clif_displaymessage(fd, msg_txt(sd->lang,255));
return 0;
}
/*==========================================
@@ -3677,7 +3677,7 @@
ACMD_FUNC(reloadstatusdb)
{
status_readdb();
- clif_displaymessage(fd, msg_txt(256));
+ clif_displaymessage(fd, msg_txt(sd->lang,256));
return 0;
}
/*==========================================
@@ -3686,7 +3686,7 @@
ACMD_FUNC(reloadpcdb)
{
pc_readdb();
- clif_displaymessage(fd, msg_txt(257));
+ clif_displaymessage(fd, msg_txt(sd->lang,257));
return 0;
}
@@ -3696,7 +3696,7 @@
ACMD_FUNC(reloadmotd)
{
pc_read_motd();
- clif_displaymessage(fd, msg_txt(268));
+ clif_displaymessage(fd, msg_txt(sd->lang,268));
return 0;
}
@@ -3714,7 +3714,7 @@
script_reload();
npc_reload();
- clif_displaymessage(fd, msg_txt(100)); // Scripts have been reloaded.
+ clif_displaymessage(fd, msg_txt(sd->lang,100)); // Scripts have been reloaded.
return 0;
}
@@ -3747,7 +3747,7 @@
sscanf(message, "%d %23[^\n]", &list, mapname);
if (list < 0 || list > 3) {
- clif_displaymessage(fd, msg_txt(1038)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1038)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
return -1;
}
@@ -3759,12 +3759,12 @@
}
if (m_id < 0) {
- clif_displaymessage(fd, msg_txt(1)); // Map not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,1)); // Map not found.
return -1;
}
m_index = mapindex_name2id(mapname); //This one shouldn't fail since the previous seek did not.
- clif_displaymessage(fd, msg_txt(1039)); // ------ Map Info ------
+ clif_displaymessage(fd, msg_txt(sd->lang,1039)); // ------ Map Info ------
// count chats (for initial message)
chat_num = 0;
@@ -3774,137 +3774,137 @@
chat_num++;
mapit_free(iter);
- sprintf(atcmd_output, msg_txt(1040), mapname, map[m_id].users, map[m_id].npc_num, chat_num); // Map Name: %s | Players In Map: %d | NPCs In Map: %d | Chats In Map: %d
+ sprintf(atcmd_output, msg_txt(sd->lang,1040), mapname, map[m_id].users, map[m_id].npc_num, chat_num); // Map Name: %s | Players In Map: %d | NPCs In Map: %d | Chats In Map: %d
clif_displaymessage(fd, atcmd_output);
- clif_displaymessage(fd, msg_txt(1041)); // ------ Map Flags ------
+ clif_displaymessage(fd, msg_txt(sd->lang,1041)); // ------ Map Flags ------
if (map[m_id].flag.town)
- clif_displaymessage(fd, msg_txt(1042)); // Town Map
+ clif_displaymessage(fd, msg_txt(sd->lang,1042)); // Town Map
if (battle_config.autotrade_mapflag == map[m_id].flag.autotrade)
- clif_displaymessage(fd, msg_txt(1043)); // Autotrade Enabled
+ clif_displaymessage(fd, msg_txt(sd->lang,1043)); // Autotrade Enabled
else
- clif_displaymessage(fd, msg_txt(1044)); // Autotrade Disabled
+ clif_displaymessage(fd, msg_txt(sd->lang,1044)); // Autotrade Disabled
if (map[m_id].flag.battleground)
- clif_displaymessage(fd, msg_txt(1045)); // Battlegrounds ON
+ clif_displaymessage(fd, msg_txt(sd->lang,1045)); // Battlegrounds ON
- strcpy(atcmd_output,msg_txt(1046)); // PvP Flags:
+ strcpy(atcmd_output,msg_txt(sd->lang,1046)); // PvP Flags:
if (map[m_id].flag.pvp)
- strcat(atcmd_output, msg_txt(1047)); // Pvp ON |
+ strcat(atcmd_output, msg_txt(sd->lang,1047)); // Pvp ON |
if (map[m_id].flag.pvp_noguild)
- strcat(atcmd_output, msg_txt(1048)); // NoGuild |
+ strcat(atcmd_output, msg_txt(sd->lang,1048)); // NoGuild |
if (map[m_id].flag.pvp_noparty)
- strcat(atcmd_output, msg_txt(1049)); // NoParty |
+ strcat(atcmd_output, msg_txt(sd->lang,1049)); // NoParty |
if (map[m_id].flag.pvp_nightmaredrop)
- strcat(atcmd_output, msg_txt(1050)); // NightmareDrop |
+ strcat(atcmd_output, msg_txt(sd->lang,1050)); // NightmareDrop |
if (map[m_id].flag.pvp_nocalcrank)
- strcat(atcmd_output, msg_txt(1051)); // NoCalcRank |
+ strcat(atcmd_output, msg_txt(sd->lang,1051)); // NoCalcRank |
clif_displaymessage(fd, atcmd_output);
- strcpy(atcmd_output,msg_txt(1052)); // GvG Flags:
+ strcpy(atcmd_output,msg_txt(sd->lang,1052)); // GvG Flags:
if (map[m_id].flag.gvg)
- strcat(atcmd_output, msg_txt(1053)); // GvG ON |
+ strcat(atcmd_output, msg_txt(sd->lang,1053)); // GvG ON |
if (map[m_id].flag.gvg_dungeon)
- strcat(atcmd_output, msg_txt(1054)); // GvG Dungeon |
+ strcat(atcmd_output, msg_txt(sd->lang,1054)); // GvG Dungeon |
if (map[m_id].flag.gvg_castle)
- strcat(atcmd_output, msg_txt(1055)); // GvG Castle |
+ strcat(atcmd_output, msg_txt(sd->lang,1055)); // GvG Castle |
if (map[m_id].flag.gvg_noparty)
- strcat(atcmd_output, msg_txt(1056)); // NoParty |
+ strcat(atcmd_output, msg_txt(sd->lang,1056)); // NoParty |
clif_displaymessage(fd, atcmd_output);
- strcpy(atcmd_output,msg_txt(1057)); // Teleport Flags:
+ strcpy(atcmd_output,msg_txt(sd->lang,1057)); // Teleport Flags:
if (map[m_id].flag.noteleport)
- strcat(atcmd_output, msg_txt(1058)); // NoTeleport |
+ strcat(atcmd_output, msg_txt(sd->lang,1058)); // NoTeleport |
if (map[m_id].flag.monster_noteleport)
- strcat(atcmd_output, msg_txt(1059)); // Monster NoTeleport |
+ strcat(atcmd_output, msg_txt(sd->lang,1059)); // Monster NoTeleport |
if (map[m_id].flag.nowarp)
- strcat(atcmd_output, msg_txt(1060)); // NoWarp |
+ strcat(atcmd_output, msg_txt(sd->lang,1060)); // NoWarp |
if (map[m_id].flag.nowarpto)
- strcat(atcmd_output, msg_txt(1061)); // NoWarpTo |
+ strcat(atcmd_output, msg_txt(sd->lang,1061)); // NoWarpTo |
if (map[m_id].flag.noreturn)
- strcat(atcmd_output, msg_txt(1062)); // NoReturn |
+ strcat(atcmd_output, msg_txt(sd->lang,1062)); // NoReturn |
if (map[m_id].flag.nogo)
- strcat(atcmd_output, msg_txt(1063)); // NoGo |
+ strcat(atcmd_output, msg_txt(sd->lang,1063)); // NoGo |
if (map[m_id].flag.nomemo)
- strcat(atcmd_output, msg_txt(1064)); // NoMemo |
+ strcat(atcmd_output, msg_txt(sd->lang,1064)); // NoMemo |
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1065), // No Exp Penalty: %s | No Zeny Penalty: %s
- (map[m_id].flag.noexppenalty) ? msg_txt(1066) : msg_txt(1067), (map[m_id].flag.nozenypenalty) ? msg_txt(1066) : msg_txt(1067)); // On / Off
+ sprintf(atcmd_output, msg_txt(sd->lang,1065), // No Exp Penalty: %s | No Zeny Penalty: %s
+ (map[m_id].flag.noexppenalty) ? msg_txt(sd->lang,1066) : msg_txt(sd->lang,1067), (map[m_id].flag.nozenypenalty) ? msg_txt(sd->lang,1066) : msg_txt(sd->lang,1067)); // On / Off
clif_displaymessage(fd, atcmd_output);
if (map[m_id].flag.nosave) {
if (!map[m_id].save.map)
- clif_displaymessage(fd, msg_txt(1068)); // No Save (Return to last Save Point)
+ clif_displaymessage(fd, msg_txt(sd->lang,1068)); // No Save (Return to last Save Point)
else if (map[m_id].save.x == -1 || map[m_id].save.y == -1 ) {
- sprintf(atcmd_output, msg_txt(1069), mapindex_id2name(map[m_id].save.map)); // No Save, Save Point: %s,Random
+ sprintf(atcmd_output, msg_txt(sd->lang,1069), mapindex_id2name(map[m_id].save.map)); // No Save, Save Point: %s,Random
clif_displaymessage(fd, atcmd_output);
}
else {
- sprintf(atcmd_output, msg_txt(1070), // No Save, Save Point: %s,%d,%d
+ sprintf(atcmd_output, msg_txt(sd->lang,1070), // No Save, Save Point: %s,%d,%d
mapindex_id2name(map[m_id].save.map),map[m_id].save.x,map[m_id].save.y);
clif_displaymessage(fd, atcmd_output);
}
}
- strcpy(atcmd_output,msg_txt(1071)); // Weather Flags:
+ strcpy(atcmd_output,msg_txt(sd->lang,1071)); // Weather Flags:
if (map[m_id].flag.snow)
- strcat(atcmd_output, msg_txt(1072)); // Snow |
+ strcat(atcmd_output, msg_txt(sd->lang,1072)); // Snow |
if (map[m_id].flag.fog)
- strcat(atcmd_output, msg_txt(1073)); // Fog |
+ strcat(atcmd_output, msg_txt(sd->lang,1073)); // Fog |
if (map[m_id].flag.sakura)
- strcat(atcmd_output, msg_txt(1074)); // Sakura |
+ strcat(atcmd_output, msg_txt(sd->lang,1074)); // Sakura |
if (map[m_id].flag.clouds)
- strcat(atcmd_output, msg_txt(1075)); // Clouds |
+ strcat(atcmd_output, msg_txt(sd->lang,1075)); // Clouds |
if (map[m_id].flag.clouds2)
- strcat(atcmd_output, msg_txt(1076)); // Clouds2 |
+ strcat(atcmd_output, msg_txt(sd->lang,1076)); // Clouds2 |
if (map[m_id].flag.fireworks)
- strcat(atcmd_output, msg_txt(1077)); // Fireworks |
+ strcat(atcmd_output, msg_txt(sd->lang,1077)); // Fireworks |
if (map[m_id].flag.leaves)
- strcat(atcmd_output, msg_txt(1078)); // Leaves |
+ strcat(atcmd_output, msg_txt(sd->lang,1078)); // Leaves |
/**
* No longer available, keeping here just in case it's back someday. [Ind]
**/
//if (map[m_id].flag.rain)
- // strcat(atcmd_output, msg_txt(1079)); // Rain |
+ // strcat(atcmd_output, msg_txt(sd->lang,1079)); // Rain |
if (map[m_id].flag.nightenabled)
- strcat(atcmd_output, msg_txt(1080)); // Displays Night |
+ strcat(atcmd_output, msg_txt(sd->lang,1080)); // Displays Night |
clif_displaymessage(fd, atcmd_output);
- strcpy(atcmd_output,msg_txt(1081)); // Other Flags:
+ strcpy(atcmd_output,msg_txt(sd->lang,1081)); // Other Flags:
if (map[m_id].flag.nobranch)
- strcat(atcmd_output, msg_txt(1082)); // NoBranch |
+ strcat(atcmd_output, msg_txt(sd->lang,1082)); // NoBranch |
if (map[m_id].flag.notrade)
- strcat(atcmd_output, msg_txt(1083)); // NoTrade |
+ strcat(atcmd_output, msg_txt(sd->lang,1083)); // NoTrade |
if (map[m_id].flag.novending)
- strcat(atcmd_output, msg_txt(1084)); // NoVending |
+ strcat(atcmd_output, msg_txt(sd->lang,1084)); // NoVending |
if (map[m_id].flag.nodrop)
- strcat(atcmd_output, msg_txt(1085)); // NoDrop |
+ strcat(atcmd_output, msg_txt(sd->lang,1085)); // NoDrop |
if (map[m_id].flag.noskill)
- strcat(atcmd_output, msg_txt(1086)); // NoSkill |
+ strcat(atcmd_output, msg_txt(sd->lang,1086)); // NoSkill |
if (map[m_id].flag.noicewall)
- strcat(atcmd_output, msg_txt(1087)); // NoIcewall |
+ strcat(atcmd_output, msg_txt(sd->lang,1087)); // NoIcewall |
if (map[m_id].flag.allowks)
- strcat(atcmd_output, msg_txt(1088)); // AllowKS |
+ strcat(atcmd_output, msg_txt(sd->lang,1088)); // AllowKS |
if (map[m_id].flag.reset)
- strcat(atcmd_output, msg_txt(1089)); // Reset |
+ strcat(atcmd_output, msg_txt(sd->lang,1089)); // Reset |
clif_displaymessage(fd, atcmd_output);
- strcpy(atcmd_output,msg_txt(1090)); // Other Flags:
+ strcpy(atcmd_output,msg_txt(sd->lang,1090)); // Other Flags:
if (map[m_id].nocommand)
- strcat(atcmd_output, msg_txt(1091)); // NoCommand |
+ strcat(atcmd_output, msg_txt(sd->lang,1091)); // NoCommand |
if (map[m_id].flag.nobaseexp)
- strcat(atcmd_output, msg_txt(1092)); // NoBaseEXP |
+ strcat(atcmd_output, msg_txt(sd->lang,1092)); // NoBaseEXP |
if (map[m_id].flag.nojobexp)
- strcat(atcmd_output, msg_txt(1093)); // NoJobEXP |
+ strcat(atcmd_output, msg_txt(sd->lang,1093)); // NoJobEXP |
if (map[m_id].flag.nomobloot)
- strcat(atcmd_output, msg_txt(1094)); // NoMobLoot |
+ strcat(atcmd_output, msg_txt(sd->lang,1094)); // NoMobLoot |
if (map[m_id].flag.nomvploot)
- strcat(atcmd_output, msg_txt(1095)); // NoMVPLoot |
+ strcat(atcmd_output, msg_txt(sd->lang,1095)); // NoMVPLoot |
if (map[m_id].flag.partylock)
- strcat(atcmd_output, msg_txt(1096)); // PartyLock |
+ strcat(atcmd_output, msg_txt(sd->lang,1096)); // PartyLock |
if (map[m_id].flag.guildlock)
- strcat(atcmd_output, msg_txt(1097)); // GuildLock |
+ strcat(atcmd_output, msg_txt(sd->lang,1097)); // GuildLock |
clif_displaymessage(fd, atcmd_output);
switch (list) {
@@ -3912,12 +3912,12 @@
// Do nothing. It's list 0, no additional display.
break;
case 1:
- clif_displaymessage(fd, msg_txt(1098)); // ----- Players in Map -----
+ clif_displaymessage(fd, msg_txt(sd->lang,1098)); // ----- Players in Map -----
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
if (pl_sd->mapindex == m_index) {
- sprintf(atcmd_output, msg_txt(1099), // Player '%s' (session #%d) | Location: %d,%d
+ sprintf(atcmd_output, msg_txt(sd->lang,1099), // Player '%s' (session #%d) | Location: %d,%d
pl_sd->status.name, pl_sd->fd, pl_sd->bl.x, pl_sd->bl.y);
clif_displaymessage(fd, atcmd_output);
}
@@ -3925,33 +3925,33 @@
mapit_free(iter);
break;
case 2:
- clif_displaymessage(fd, msg_txt(1100)); // ----- NPCs in Map -----
+ clif_displaymessage(fd, msg_txt(sd->lang,1100)); // ----- NPCs in Map -----
for (i = 0; i < map[m_id].npc_num;)
{
nd = map[m_id].npc[i];
switch(nd->ud.dir) {
- case 0: strcpy(direction, msg_txt(1101)); break; // North
- case 1: strcpy(direction, msg_txt(1102)); break; // North West
- case 2: strcpy(direction, msg_txt(1103)); break; // West
- case 3: strcpy(direction, msg_txt(1104)); break; // South West
- case 4: strcpy(direction, msg_txt(1105)); break; // South
- case 5: strcpy(direction, msg_txt(1106)); break; // South East
- case 6: strcpy(direction, msg_txt(1107)); break; // East
- case 7: strcpy(direction, msg_txt(1108)); break; // North East
- case 9: strcpy(direction, msg_txt(1109)); break; // North
- default: strcpy(direction, msg_txt(1110)); break; // Unknown
+ case 0: strcpy(direction, msg_txt(sd->lang,1101)); break; // North
+ case 1: strcpy(direction, msg_txt(sd->lang,1102)); break; // North West
+ case 2: strcpy(direction, msg_txt(sd->lang,1103)); break; // West
+ case 3: strcpy(direction, msg_txt(sd->lang,1104)); break; // South West
+ case 4: strcpy(direction, msg_txt(sd->lang,1105)); break; // South
+ case 5: strcpy(direction, msg_txt(sd->lang,1106)); break; // South East
+ case 6: strcpy(direction, msg_txt(sd->lang,1107)); break; // East
+ case 7: strcpy(direction, msg_txt(sd->lang,1108)); break; // North East
+ case 9: strcpy(direction, msg_txt(sd->lang,1109)); break; // North
+ default: strcpy(direction, msg_txt(sd->lang,1110)); break; // Unknown
}
if(strcmp(nd->name,nd->exname) == 0)
- sprintf(atcmd_output, msg_txt(1111), // NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d
+ sprintf(atcmd_output, msg_txt(sd->lang,1111), // NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d
++i, nd->name, direction, nd->class_, nd->bl.x, nd->bl.y);
else
- sprintf(atcmd_output, msg_txt(1112), // NPC %d: %s::%s | Direction: %s | Sprite: %d | Location: %d %d
+ sprintf(atcmd_output, msg_txt(sd->lang,1112), // NPC %d: %s::%s | Direction: %s | Sprite: %d | Location: %d %d
++i, nd->name, nd->exname, direction, nd->class_, nd->bl.x, nd->bl.y);
clif_displaymessage(fd, atcmd_output);
}
break;
case 3:
- clif_displaymessage(fd, msg_txt(1113)); // ----- Chats in Map -----
+ clif_displaymessage(fd, msg_txt(sd->lang,1113)); // ----- Chats in Map -----
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
@@ -3959,18 +3959,18 @@
pl_sd->mapindex == m_index &&
cd->usersd[0] == pl_sd)
{
- sprintf(atcmd_output, msg_txt(1114), // Chat: %s | Player: %s | Location: %d %d
+ sprintf(atcmd_output, msg_txt(sd->lang,1114), // Chat: %s | Player: %s | Location: %d %d
cd->title, pl_sd->status.name, cd->bl.x, cd->bl.y);
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1115), // Users: %d/%d | Password: %s | Public: %s
- cd->users, cd->limit, cd->pass, (cd->pub) ? msg_txt(1116) : msg_txt(1117)); // Yes / No
+ sprintf(atcmd_output, msg_txt(sd->lang,1115), // Users: %d/%d | Password: %s | Public: %s
+ cd->users, cd->limit, cd->pass, (cd->pub) ? msg_txt(sd->lang,1116) : msg_txt(sd->lang,1117)); // Yes / No
clif_displaymessage(fd, atcmd_output);
}
}
mapit_free(iter);
break;
default: // normally impossible to arrive here
- clif_displaymessage(fd, msg_txt(1118)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1118)); // Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
return -1;
break;
}
@@ -3986,36 +3986,36 @@
nullpo_retr(-1, sd);
if (sd->disguise) {
- clif_displaymessage(fd, msg_txt(212)); // Cannot mount while in disguise.
+ clif_displaymessage(fd, msg_txt(sd->lang,212)); // Cannot mount while in disguise.
return -1;
}
if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT && pc_checkskill(sd,RK_DRAGONTRAINING) > 0 ) {
if( !(sd->sc.option&OPTION_DRAGON1) ) {
- clif_displaymessage(sd->fd,msg_txt(1119)); // You have mounted your Dragon.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1119)); // You have mounted your Dragon.
pc_setoption(sd, sd->sc.option|OPTION_DRAGON1);
} else {
- clif_displaymessage(sd->fd,msg_txt(1120)); // You have released your Dragon.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1120)); // You have released your Dragon.
pc_setoption(sd, sd->sc.option&~OPTION_DRAGON1);
}
return 0;
}
if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER && pc_checkskill(sd,RA_WUGRIDER) > 0 ) {
if( !pc_isridingwug(sd) ) {
- clif_displaymessage(sd->fd,msg_txt(1121)); // You have mounted your Warg.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1121)); // You have mounted your Warg.
pc_setoption(sd, sd->sc.option|OPTION_WUGRIDER);
} else {
- clif_displaymessage(sd->fd,msg_txt(1122)); // You have released your Warg.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1122)); // You have released your Warg.
pc_setoption(sd, sd->sc.option&~OPTION_WUGRIDER);
}
return 0;
}
if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) {
if( !pc_ismadogear(sd) ) {
- clif_displaymessage(sd->fd,msg_txt(1123)); // You have mounted your Mado Gear.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1123)); // You have mounted your Mado Gear.
pc_setoption(sd, sd->sc.option|OPTION_MADOGEAR);
} else {
- clif_displaymessage(sd->fd,msg_txt(1124)); // You have released your Mado Gear.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1124)); // You have released your Mado Gear.
pc_setoption(sd, sd->sc.option&~OPTION_MADOGEAR);
}
return 0;
@@ -4023,15 +4023,15 @@
if (!pc_isriding(sd)) { // if actually no peco
if (!pc_checkskill(sd, KN_RIDING)) {
- clif_displaymessage(fd, msg_txt(213)); // You can not mount a Peco Peco with your current job.
+ clif_displaymessage(fd, msg_txt(sd->lang,213)); // You can not mount a Peco Peco with your current job.
return -1;
}
pc_setoption(sd, sd->sc.option | OPTION_RIDING);
- clif_displaymessage(fd, msg_txt(102)); // You have mounted a Peco Peco.
+ clif_displaymessage(fd, msg_txt(sd->lang,102)); // You have mounted a Peco Peco.
} else {//Dismount
pc_setoption(sd, sd->sc.option & ~OPTION_RIDING);
- clif_displaymessage(fd, msg_txt(214)); // You have released your Peco Peco.
+ clif_displaymessage(fd, msg_txt(sd->lang,214)); // You have released your Peco Peco.
}
return 0;
@@ -4051,11 +4051,11 @@
if (!enable_spy)
{
- clif_displaymessage(fd, msg_txt(1125)); // The mapserver has spy command support disabled.
+ clif_displaymessage(fd, msg_txt(sd->lang,1125)); // The mapserver has spy command support disabled.
return -1;
}
if (!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
- clif_displaymessage(fd, msg_txt(1126)); // Please enter a guild name/ID (usage: @guildspy <guild_name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1126)); // Please enter a guild name/ID (usage: @guildspy <guild_name/ID>).
return -1;
}
@@ -4063,15 +4063,15 @@
(g = guild_search(atoi(message))) != NULL) {
if (sd->guildspy == g->guild_id) {
sd->guildspy = 0;
- sprintf(atcmd_output, msg_txt(103), g->name); // No longer spying on the %s guild.
+ sprintf(atcmd_output, msg_txt(sd->lang,103), g->name); // No longer spying on the %s guild.
clif_displaymessage(fd, atcmd_output);
} else {
sd->guildspy = g->guild_id;
- sprintf(atcmd_output, msg_txt(104), g->name); // Spying on the %s guild.
+ sprintf(atcmd_output, msg_txt(sd->lang,104), g->name); // Spying on the %s guild.
clif_displaymessage(fd, atcmd_output);
}
} else {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the specified guild is online.
+ clif_displaymessage(fd, msg_txt(sd->lang,94)); // Incorrect name/ID, or no one from the specified guild is online.
return -1;
}
@@ -4092,12 +4092,12 @@
if (!enable_spy)
{
- clif_displaymessage(fd, msg_txt(1125)); // The mapserver has spy command support disabled.
+ clif_displaymessage(fd, msg_txt(sd->lang,1125)); // The mapserver has spy command support disabled.
return -1;
}
if (!message || !*message || sscanf(message, "%23[^\n]", party_name) < 1) {
- clif_displaymessage(fd, msg_txt(1127)); // Please enter a party name/ID (usage: @partyspy <party_name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1127)); // Please enter a party name/ID (usage: @partyspy <party_name/ID>).
return -1;
}
@@ -4105,15 +4105,15 @@
(p = party_search(atoi(message))) != NULL) {
if (sd->partyspy == p->party.party_id) {
sd->partyspy = 0;
- sprintf(atcmd_output, msg_txt(105), p->party.name); // No longer spying on the %s party.
+ sprintf(atcmd_output, msg_txt(sd->lang,105), p->party.name); // No longer spying on the %s party.
clif_displaymessage(fd, atcmd_output);
} else {
sd->partyspy = p->party.party_id;
- sprintf(atcmd_output, msg_txt(106), p->party.name); // Spying on the %s party.
+ sprintf(atcmd_output, msg_txt(sd->lang,106), p->party.name); // Spying on the %s party.
clif_displaymessage(fd, atcmd_output);
}
} else {
- clif_displaymessage(fd, msg_txt(96)); // Incorrect name/ID, or no one from the specified party is online.
+ clif_displaymessage(fd, msg_txt(sd->lang,96)); // Incorrect name/ID, or no one from the specified party is online.
return -1;
}
@@ -4140,9 +4140,9 @@
if (count > 0) {
clif_misceffect(&sd->bl, 3);
clif_equiplist(sd);
- clif_displaymessage(fd, msg_txt(107)); // All items have been repaired.
+ clif_displaymessage(fd, msg_txt(sd->lang,107)); // All items have been repaired.
} else {
- clif_displaymessage(fd, msg_txt(108)); // No item need to be repaired.
+ clif_displaymessage(fd, msg_txt(sd->lang,108)); // No item need to be repaired.
return -1;
}
@@ -4160,20 +4160,20 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1128)); // Please enter a player name (usage: @nuke <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1128)); // Please enter a player name (usage: @nuke <char name>).
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) != NULL) {
if (pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { // you can kill only lower or same GM level
skill_castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, gettick(), 0);
- clif_displaymessage(fd, msg_txt(109)); // Player has been nuked!
+ clif_displaymessage(fd, msg_txt(sd->lang,109)); // Player has been nuked!
} else {
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
} else {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
@@ -4193,17 +4193,17 @@
memset(npcname, 0, sizeof(npcname));
if (!message || !*message || sscanf(message, "%23[^\n]", npcname) < 1) {
- clif_displaymessage(fd, msg_txt(1129)); // Please enter a NPC name (usage: @tonpc <NPC_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1129)); // Please enter a NPC name (usage: @tonpc <NPC_name>).
return -1;
}
if ((nd = npc_name2id(npcname)) != NULL) {
if (pc_setpos(sd, map_id2index(nd->bl.m), nd->bl.x, nd->bl.y, CLR_TELEPORT) == 0)
- clif_displaymessage(fd, msg_txt(0)); // Warped.
+ clif_displaymessage(fd, msg_txt(sd->lang,0)); // Warped.
else
return -1;
} else {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,111)); // This NPC doesn't exist.
return -1;
}
@@ -4221,15 +4221,15 @@
memset(NPCname, '\0', sizeof(NPCname));
if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) {
- clif_displaymessage(fd, msg_txt(1130)); // Please enter a NPC name (usage: @enablenpc <NPC_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1130)); // Please enter a NPC name (usage: @enablenpc <NPC_name>).
return -1;
}
if (npc_name2id(NPCname) != NULL) {
npc_enable(NPCname, 1);
- clif_displaymessage(fd, msg_txt(110)); // Npc Enabled.
+ clif_displaymessage(fd, msg_txt(sd->lang,110)); // Npc Enabled.
} else {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,111)); // This NPC doesn't exist.
return -1;
}
@@ -4247,17 +4247,17 @@
memset(NPCname, '\0', sizeof(NPCname));
if (!message || !*message || sscanf(message, "%23[^\n]", NPCname) < 1) {
- clif_displaymessage(fd, msg_txt(1131)); // Please enter a NPC name (usage: @hidenpc <NPC_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1131)); // Please enter a NPC name (usage: @hidenpc <NPC_name>).
return -1;
}
if (npc_name2id(NPCname) == NULL) {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,111)); // This NPC doesn't exist.
return -1;
}
npc_enable(NPCname, 0);
- clif_displaymessage(fd, msg_txt(112)); // Npc Disabled.
+ clif_displaymessage(fd, msg_txt(sd->lang,112)); // Npc Disabled.
return 0;
}
@@ -4266,13 +4266,13 @@
FILE *fp;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1132)); // Please enter a script file name (usage: @loadnpc <file name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1132)); // Please enter a script file name (usage: @loadnpc <file name>).
return -1;
}
// check if script file exists
if ((fp = fopen(message, "r")) == NULL) {
- clif_displaymessage(fd, msg_txt(261));
+ clif_displaymessage(fd, msg_txt(sd->lang,261));
return -1;
}
fclose(fp);
@@ -4282,7 +4282,7 @@
npc_parsesrcfile(message,true);
npc_read_event_script();
- clif_displaymessage(fd, msg_txt(262));
+ clif_displaymessage(fd, msg_txt(sd->lang,262));
return 0;
}
@@ -4296,26 +4296,26 @@
memset(NPCname, '\0', sizeof(NPCname));
if (!message || !*message || sscanf(message, "%24[^\n]", NPCname) < 1) {
- clif_displaymessage(fd, msg_txt(1133)); // Please enter a NPC name (usage: @npcoff <NPC_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1133)); // Please enter a NPC name (usage: @npcoff <NPC_name>).
return -1;
}
if ((nd = npc_name2id(NPCname)) == NULL) {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,111)); // This NPC doesn't exist.
return -1;
}
npc_unload_duplicates(nd);
npc_unload(nd,true);
npc_read_event_script();
- clif_displaymessage(fd, msg_txt(112)); // Npc Disabled.
+ clif_displaymessage(fd, msg_txt(sd->lang,112)); // Npc Disabled.
return 0;
}
/*==========================================
* time in txt for time command (by [Yor])
*------------------------------------------*/
-char* txt_time(unsigned int duration)
+char* txt_time(uint16 lang, unsigned int duration)
{
int days, hours, minutes, seconds;
char temp[CHAT_SIZE_MAX];
@@ -4332,21 +4332,21 @@
seconds = duration - (60 * minutes);
if (days == 1)
- sprintf(temp, msg_txt(219), days); // %d day
+ sprintf(temp, msg_txt(lang,219), days); // %d day
else if (days > 1)
- sprintf(temp, msg_txt(220), days); // %d days
+ sprintf(temp, msg_txt(lang,220), days); // %d days
if (hours == 1)
- sprintf(temp1, msg_txt(221), temp, hours); // %s %d hour
+ sprintf(temp1, msg_txt(lang,221), temp, hours); // %s %d hour
else if (hours > 1)
- sprintf(temp1, msg_txt(222), temp, hours); // %s %d hours
+ sprintf(temp1, msg_txt(lang,222), temp, hours); // %s %d hours
if (minutes < 2)
- sprintf(temp, msg_txt(223), temp1, minutes); // %s %d minute
+ sprintf(temp, msg_txt(lang,223), temp1, minutes); // %s %d minute
else
- sprintf(temp, msg_txt(224), temp1, minutes); // %s %d minutes
+ sprintf(temp, msg_txt(lang,224), temp1, minutes); // %s %d minutes
if (seconds == 1)
- sprintf(temp1, msg_txt(225), temp, seconds); // %s and %d second
+ sprintf(temp1, msg_txt(lang,225), temp, seconds); // %s and %d second
else if (seconds > 1)
- sprintf(temp1, msg_txt(226), temp, seconds); // %s and %d seconds
+ sprintf(temp1, msg_txt(lang,226), temp, seconds); // %s and %d seconds
return temp1;
}
@@ -4369,54 +4369,54 @@
time(&time_server); // get time in seconds since 1/1/1970
datetime = localtime(&time_server); // convert seconds in structure
// like sprintf, but only for date/time (Sunday, November 02 2003 15:12:52)
- strftime(temp, sizeof(temp)-1, msg_txt(230), datetime); // Server time (normal time): %A, %B %d %Y %X.
+ strftime(temp, sizeof(temp)-1, msg_txt(sd->lang,230), datetime); // Server time (normal time): %A, %B %d %Y %X.
clif_displaymessage(fd, temp);
if (battle_config.night_duration == 0 && battle_config.day_duration == 0) {
if (night_flag == 0)
- clif_displaymessage(fd, msg_txt(231)); // Game time: The game is in permanent daylight.
+ clif_displaymessage(fd, msg_txt(sd->lang,231)); // Game time: The game is in permanent daylight.
else
- clif_displaymessage(fd, msg_txt(232)); // Game time: The game is in permanent night.
+ clif_displaymessage(fd, msg_txt(sd->lang,232)); // Game time: The game is in permanent night.
} else if (battle_config.night_duration == 0)
if (night_flag == 1) { // we start with night
timer_data = get_timer(day_timer_tid);
- sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in night for %s.
+ sprintf(temp, msg_txt(sd->lang,233), txt_time(sd->lang,DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in night for %s.
clif_displaymessage(fd, temp);
- clif_displaymessage(fd, msg_txt(234)); // Game time: After, the game will be in permanent daylight.
+ clif_displaymessage(fd, msg_txt(sd->lang,234)); // Game time: After, the game will be in permanent daylight.
} else
- clif_displaymessage(fd, msg_txt(231)); // Game time: The game is in permanent daylight.
+ clif_displaymessage(fd, msg_txt(sd->lang,231)); // Game time: The game is in permanent daylight.
else if (battle_config.day_duration == 0)
if (night_flag == 0) { // we start with day
timer_data = get_timer(night_timer_tid);
- sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
+ sprintf(temp, msg_txt(sd->lang,235), txt_time(sd->lang,DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
clif_displaymessage(fd, temp);
- clif_displaymessage(fd, msg_txt(236)); // Game time: After, the game will be in permanent night.
+ clif_displaymessage(fd, msg_txt(sd->lang,236)); // Game time: After, the game will be in permanent night.
} else
- clif_displaymessage(fd, msg_txt(232)); // Game time: The game is in permanent night.
+ clif_displaymessage(fd, msg_txt(sd->lang,232)); // Game time: The game is in permanent night.
else {
if (night_flag == 0) {
timer_data = get_timer(night_timer_tid);
timer_data2 = get_timer(day_timer_tid);
- sprintf(temp, msg_txt(235), txt_time(DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
+ sprintf(temp, msg_txt(sd->lang,235), txt_time(sd->lang,DIFF_TICK(timer_data->tick,gettick())/1000)); // Game time: The game is actualy in daylight for %s.
clif_displaymessage(fd, temp);
if (DIFF_TICK(timer_data->tick, timer_data2->tick) > 0)
- sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s.
+ sprintf(temp, msg_txt(sd->lang,237), txt_time(sd->lang,DIFF_TICK(timer_data->interval,DIFF_TICK(timer_data->tick,timer_data2->tick)) / 1000)); // Game time: After, the game will be in night for %s.
else
- sprintf(temp, msg_txt(237), txt_time(DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s.
+ sprintf(temp, msg_txt(sd->lang,237), txt_time(sd->lang,DIFF_TICK(timer_data2->tick,timer_data->tick)/1000)); // Game time: After, the game will be in night for %s.
clif_displaymessage(fd, temp);
- sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
+ sprintf(temp, msg_txt(sd->lang,238), txt_time(sd->lang,timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
clif_displaymessage(fd, temp);
} else {
timer_data = get_timer(day_timer_tid);
timer_data2 = get_timer(night_timer_tid);
- sprintf(temp, msg_txt(233), txt_time(DIFF_TICK(timer_data->tick,gettick()) / 1000)); // Game time: The game is actualy in night for %s.
+ sprintf(temp, msg_txt(sd->lang,233), txt_time(sd->lang,DIFF_TICK(timer_data->tick,gettick()) / 1000)); // Game time: The game is actualy in night for %s.
clif_displaymessage(fd, temp);
if (DIFF_TICK(timer_data->tick,timer_data2->tick) > 0)
- sprintf(temp, msg_txt(239), txt_time((timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s.
+ sprintf(temp, msg_txt(sd->lang,239), txt_time(sd->lang,(timer_data->interval - DIFF_TICK(timer_data->tick, timer_data2->tick)) / 1000)); // Game time: After, the game will be in daylight for %s.
else
- sprintf(temp, msg_txt(239), txt_time(DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s.
+ sprintf(temp, msg_txt(sd->lang,239), txt_time(sd->lang,DIFF_TICK(timer_data2->tick, timer_data->tick) / 1000)); // Game time: After, the game will be in daylight for %s.
clif_displaymessage(fd, temp);
- sprintf(temp, msg_txt(238), txt_time(timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
+ sprintf(temp, msg_txt(sd->lang,238), txt_time(sd->lang,timer_data->interval / 1000)); // Game time: A day cycle has a normal duration of %s.
clif_displaymessage(fd, temp);
}
}
@@ -4466,24 +4466,24 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1134)); // Please enter a player name (usage: @jail <char_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1134)); // Please enter a player name (usage: @jail <char_name>).
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if (pc_get_group_level(sd) < pc_get_group_level(pl_sd))
{ // you can jail only lower or same GM
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
if (pl_sd->sc.data[SC_JAILED])
{
- clif_displaymessage(fd, msg_txt(118)); // Player warped in jails.
+ clif_displaymessage(fd, msg_txt(sd->lang,118)); // Player warped in jails.
return -1;
}
@@ -4502,8 +4502,8 @@
//Duration of INT_MAX to specify infinity.
sc_start4(&pl_sd->bl,SC_JAILED,100,INT_MAX,m_index,x,y,1000);
- clif_displaymessage(pl_sd->fd, msg_txt(117)); // GM has send you in jails.
- clif_displaymessage(fd, msg_txt(118)); // Player warped in jails.
+ clif_displaymessage(pl_sd->fd, msg_txt(sd->lang,117)); // GM has send you in jails.
+ clif_displaymessage(fd, msg_txt(sd->lang,118)); // Player warped in jails.
return 0;
}
@@ -4518,31 +4518,31 @@
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1135)); // Please enter a player name (usage: @unjail/@discharge <char_name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1135)); // Please enter a player name (usage: @unjail/@discharge <char_name>).
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { // you can jail only lower or same GM
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
if (!pl_sd->sc.data[SC_JAILED])
{
- clif_displaymessage(fd, msg_txt(119)); // This player is not in jails.
+ clif_displaymessage(fd, msg_txt(sd->lang,119)); // This player is not in jails.
return -1;
}
//Reset jail time to 1 sec.
sc_start(&pl_sd->bl,SC_JAILED,100,1,1000);
- clif_displaymessage(pl_sd->fd, msg_txt(120)); // A GM has discharged you from jail.
- clif_displaymessage(fd, msg_txt(121)); // Player unjailed.
+ clif_displaymessage(pl_sd->fd, msg_txt(sd->lang,120)); // A GM has discharged you from jail.
+ clif_displaymessage(fd, msg_txt(sd->lang,121)); // Player unjailed.
return 0;
}
@@ -4556,7 +4556,7 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%255s %23[^\n]",atcmd_output,atcmd_player_name) < 2) {
- clif_displaymessage(fd, msg_txt(400)); //Usage: @jailfor <time> <character name>
+ clif_displaymessage(fd, msg_txt(sd->lang,400)); //Usage: @jailfor <time> <character name>
return -1;
}
@@ -4598,24 +4598,24 @@
}
if (year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0) {
- clif_displaymessage(fd, msg_txt(1136)); // Invalid time for jail command.
+ clif_displaymessage(fd, msg_txt(sd->lang,1136)); // Invalid time for jail command.
return -1;
}
if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
jailtime = year*12*30*24*60 + month*30*24*60 + day*24*60 + hour*60 + minute; //In minutes
if(jailtime==0) {
- clif_displaymessage(fd, msg_txt(1136)); // Invalid time for jail command.
+ clif_displaymessage(fd, msg_txt(sd->lang,1136)); // Invalid time for jail command.
return -1;
}
@@ -4626,17 +4626,17 @@
jailtime += pl_sd->sc.data[SC_JAILED]->val1;
if (jailtime <= 0) {
jailtime = 0;
- clif_displaymessage(pl_sd->fd, msg_txt(120)); // GM has discharge you.
- clif_displaymessage(fd, msg_txt(121)); // Player unjailed
+ clif_displaymessage(pl_sd->fd, msg_txt(sd->lang,120)); // GM has discharge you.
+ clif_displaymessage(fd, msg_txt(sd->lang,121)); // Player unjailed
} else {
get_jail_time(jailtime,&year,&month,&day,&hour,&minute);
- sprintf(atcmd_output,msg_txt(402),msg_txt(1137),year,month,day,hour,minute); //%s in jail for %d years, %d months, %d days, %d hours and %d minutes
+ sprintf(atcmd_output,msg_txt(sd->lang,402),msg_txt(sd->lang,1137),year,month,day,hour,minute); //%s in jail for %d years, %d months, %d days, %d hours and %d minutes
clif_displaymessage(pl_sd->fd, atcmd_output);
- sprintf(atcmd_output,msg_txt(402),msg_txt(1138),year,month,day,hour,minute); //This player is now in jail for %d years, %d months, %d days, %d hours and %d minutes
+ sprintf(atcmd_output,msg_txt(sd->lang,402),msg_txt(sd->lang,1138),year,month,day,hour,minute); //This player is now in jail for %d years, %d months, %d days, %d hours and %d minutes
clif_displaymessage(fd, atcmd_output);
}
} else if (jailtime < 0) {
- clif_displaymessage(fd, msg_txt(1136));
+ clif_displaymessage(fd, msg_txt(sd->lang,1136));
return -1;
}
@@ -4666,23 +4666,23 @@
nullpo_retr(-1, sd);
if (!sd->sc.data[SC_JAILED]) {
- clif_displaymessage(fd, msg_txt(1139)); // You are not in jail.
+ clif_displaymessage(fd, msg_txt(sd->lang,1139)); // You are not in jail.
return -1;
}
if (sd->sc.data[SC_JAILED]->val1 == INT_MAX) {
- clif_displaymessage(fd, msg_txt(1140)); // You have been jailed indefinitely.
+ clif_displaymessage(fd, msg_txt(sd->lang,1140)); // You have been jailed indefinitely.
return 0;
}
if (sd->sc.data[SC_JAILED]->val1 <= 0) { // Was not jailed with @jailfor (maybe @jail? or warped there? or got recalled?)
- clif_displaymessage(fd, msg_txt(1141)); // You have been jailed for an unknown amount of time.
+ clif_displaymessage(fd, msg_txt(sd->lang,1141)); // You have been jailed for an unknown amount of time.
return -1;
}
//Get remaining jail time
get_jail_time(sd->sc.data[SC_JAILED]->val1,&year,&month,&day,&hour,&minute);
- sprintf(atcmd_output,msg_txt(402),msg_txt(1142),year,month,day,hour,minute); // You will remain in jail for %d years, %d months, %d days, %d hours and %d minutes
+ sprintf(atcmd_output,msg_txt(sd->lang,402),msg_txt(sd->lang,1142),year,month,day,hour,minute); // You will remain in jail for %d years, %d months, %d days, %d hours and %d minutes
clif_displaymessage(fd, atcmd_output);
@@ -4698,7 +4698,7 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1143)); // Please enter a Monster/NPC name/ID (usage: @disguise <name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1143)); // Please enter a Monster/NPC name/ID (usage: @disguise <name/ID>).
return -1;
}
@@ -4717,18 +4717,18 @@
if (id == 0)
{
- clif_displaymessage(fd, msg_txt(123)); // Invalid Monster/NPC name/ID specified.
+ clif_displaymessage(fd, msg_txt(sd->lang,123)); // Invalid Monster/NPC name/ID specified.
return -1;
}
if(pc_isriding(sd))
{
- clif_displaymessage(fd, msg_txt(1144)); // Character cannot be disguised while mounted.
+ clif_displaymessage(fd, msg_txt(sd->lang,1144)); // Character cannot be disguised while mounted.
return -1;
}
pc_disguise(sd, id);
- clif_displaymessage(fd, msg_txt(122)); // Disguise applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,122)); // Disguise applied.
return 0;
}
@@ -4744,7 +4744,7 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1145)); // Please enter a Monster/NPC name/ID (usage: @disguiseall <name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1145)); // Please enter a Monster/NPC name/ID (usage: @disguiseall <name/ID>).
return -1;
}
@@ -4752,7 +4752,7 @@
mob_id = atoi(message);
if (!mobdb_checkid(mob_id) && !npcdb_checkid(mob_id)) { //if mob or npc...
- clif_displaymessage(fd, msg_txt(123)); // Monster/NPC name/id not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,123)); // Monster/NPC name/id not found.
return -1;
}
@@ -4761,7 +4761,7 @@
pc_disguise(pl_sd, mob_id);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(122)); // Disguise applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,122)); // Disguise applied.
return 0;
}
@@ -4779,7 +4779,7 @@
memset(guild, '\0', sizeof(guild));
if( !message || !*message || sscanf(message, "%23[^,], %23[^\r\n]", monster, guild) < 2 ) {
- clif_displaymessage(fd, msg_txt(1146)); // Please enter a mob name/ID and guild name/ID (usage: @disguiseguild <mob name/ID>, <guild name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1146)); // Please enter a mob name/ID and guild name/ID (usage: @disguiseguild <mob name/ID>, <guild name/ID>).
return -1;
}
@@ -4795,12 +4795,12 @@
}
if( id == 0 ) {
- clif_displaymessage(fd, msg_txt(123)); // Monster/NPC name/id hasn't been found.
+ clif_displaymessage(fd, msg_txt(sd->lang,123)); // Monster/NPC name/id hasn't been found.
return -1;
}
if( (g = guild_searchname(guild)) == NULL && (g = guild_search(atoi(guild))) == NULL ) {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif_displaymessage(fd, msg_txt(sd->lang,94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -4808,7 +4808,7 @@
if( (pl_sd = g->member[i].sd) && !pc_isriding(pl_sd) )
pc_disguise(pl_sd, id);
- clif_displaymessage(fd, msg_txt(122)); // Disguise applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,122)); // Disguise applied.
return 0;
}
@@ -4821,9 +4821,9 @@
nullpo_retr(-1, sd);
if (sd->disguise) {
pc_disguise(sd, 0);
- clif_displaymessage(fd, msg_txt(124)); // Undisguise applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,124)); // Undisguise applied.
} else {
- clif_displaymessage(fd, msg_txt(125)); // You're not disguised.
+ clif_displaymessage(fd, msg_txt(sd->lang,125)); // You're not disguised.
return -1;
}
@@ -4845,7 +4845,7 @@
pc_disguise(pl_sd, 0);
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(124)); // Undisguise applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,124)); // Undisguise applied.
return 0;
}
@@ -4864,12 +4864,12 @@
memset(guild_name, '\0', sizeof(guild_name));
if(!message || !*message || sscanf(message, "%23[^\n]", guild_name) < 1) {
- clif_displaymessage(fd, msg_txt(1147)); // Please enter guild name/ID (usage: @undisguiseguild <guild name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1147)); // Please enter guild name/ID (usage: @undisguiseguild <guild name/ID>).
return -1;
}
if( (g = guild_searchname(guild_name)) == NULL && (g = guild_search(atoi(message))) == NULL ) {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif_displaymessage(fd, msg_txt(sd->lang,94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -4877,7 +4877,7 @@
if( (pl_sd = g->member[i].sd) && pl_sd->disguise )
pc_disguise(pl_sd, 0);
- clif_displaymessage(fd, msg_txt(124)); // Undisguise applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,124)); // Undisguise applied.
return 0;
}
@@ -4900,7 +4900,7 @@
if (nextj)
nextj = sd->status.job_exp*100.0/nextj;
- sprintf(output, msg_txt(1148), sd->status.base_level, nextb, sd->status.job_level, nextj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%)
+ sprintf(output, msg_txt(sd->lang,1148), sd->status.base_level, nextb, sd->status.job_level, nextj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%)
clif_displaymessage(fd, output);
return 0;
}
@@ -4916,7 +4916,7 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1149)); // Please enter a message (usage: @broadcast <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1149)); // Please enter a message (usage: @broadcast <message>).
return -1;
}
@@ -4936,7 +4936,7 @@
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1150)); // Please enter a message (usage: @localbroadcast <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1150)); // Please enter a message (usage: @localbroadcast <message>).
return -1;
}
@@ -4960,26 +4960,26 @@
memset(new_email, '\0', sizeof(new_email));
if (!message || !*message || sscanf(message, "%99s %99s", actual_email, new_email) < 2) {
- clif_displaymessage(fd, msg_txt(1151)); // Please enter 2 emails (usage: @email <actual@email> <new@email>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1151)); // Please enter 2 emails (usage: @email <actual@email> <new@email>).
return -1;
}
if (e_mail_check(actual_email) == 0) {
- clif_displaymessage(fd, msg_txt(144)); // Invalid actual email. If you have default e-mail, give [email protected].
+ clif_displaymessage(fd, msg_txt(sd->lang,144)); // Invalid actual email. If you have default e-mail, give [email protected].
return -1;
} else if (e_mail_check(new_email) == 0) {
- clif_displaymessage(fd, msg_txt(145)); // Invalid new email. Please enter a real e-mail.
+ clif_displaymessage(fd, msg_txt(sd->lang,145)); // Invalid new email. Please enter a real e-mail.
return -1;
} else if (strcmpi(new_email, "[email protected]") == 0) {
- clif_displaymessage(fd, msg_txt(146)); // New email must be a real e-mail.
+ clif_displaymessage(fd, msg_txt(sd->lang,146)); // New email must be a real e-mail.
return -1;
} else if (strcmpi(actual_email, new_email) == 0) {
- clif_displaymessage(fd, msg_txt(147)); // New email must be different of the actual e-mail.
+ clif_displaymessage(fd, msg_txt(sd->lang,147)); // New email must be different of the actual e-mail.
return -1;
}
chrif_changeemail(sd->status.account_id, actual_email, new_email);
- clif_displaymessage(fd, msg_txt(148)); // Information sended to login-server via char-server.
+ clif_displaymessage(fd, msg_txt(sd->lang,148)); // Information sended to login-server via char-server.
return 0;
}
@@ -4992,12 +4992,12 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &type) < 1) {
- clif_displaymessage(fd, msg_txt(1152)); // Please enter an effect number (usage: @effect <effect number>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1152)); // Please enter an effect number (usage: @effect <effect number>).
return -1;
}
clif_specialeffect(&sd->bl, type, (send_target)flag);
- clif_displaymessage(fd, msg_txt(229)); // Your effect has changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,229)); // Your effect has changed.
return 0;
}
@@ -5011,9 +5011,9 @@
sd->state.killer = !sd->state.killer;
if(sd->state.killer)
- clif_displaymessage(fd, msg_txt(241));
+ clif_displaymessage(fd, msg_txt(sd->lang,241));
else {
- clif_displaymessage(fd, msg_txt(292));
+ clif_displaymessage(fd, msg_txt(sd->lang,292));
pc_stop_attack(sd);
}
return 0;
@@ -5029,9 +5029,9 @@
sd->state.killable = !sd->state.killable;
if(sd->state.killable)
- clif_displaymessage(fd, msg_txt(242));
+ clif_displaymessage(fd, msg_txt(sd->lang,242));
else {
- clif_displaymessage(fd, msg_txt(288));
+ clif_displaymessage(fd, msg_txt(sd->lang,288));
map_foreachinrange(atcommand_stopattack,&sd->bl, AREA_SIZE, BL_CHAR, sd->bl.id);
}
return 0;
@@ -5045,7 +5045,7 @@
{
nullpo_retr(-1, sd);
map[sd->bl.m].flag.noskill = 0;
- clif_displaymessage(fd, msg_txt(244));
+ clif_displaymessage(fd, msg_txt(sd->lang,244));
return 0;
}
@@ -5057,7 +5057,7 @@
{
nullpo_retr(-1, sd);
map[sd->bl.m].flag.noskill = 1;
- clif_displaymessage(fd, msg_txt(243));
+ clif_displaymessage(fd, msg_txt(sd->lang,243));
return 0;
}
@@ -5073,19 +5073,19 @@
memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
if (!message || !*message || sscanf(message, "%d %d %23[^\n]", &x, &y, atcmd_player_name) < 3) {
- clif_displaymessage(fd, msg_txt(1153)); // Usage: @npcmove <X> <Y> <npc_name>
+ clif_displaymessage(fd, msg_txt(sd->lang,1153)); // Usage: @npcmove <X> <Y> <npc_name>
return -1;
}
if ((nd = npc_name2id(atcmd_player_name)) == NULL)
{
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,111)); // This NPC doesn't exist.
return -1;
}
if ((m=nd->bl.m) < 0 || nd->bl.prev == NULL)
{
- clif_displaymessage(fd, msg_txt(1154)); // NPC is not on this map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1154)); // NPC is not on this map.
return -1; //Not on a map.
}
@@ -5094,7 +5094,7 @@
map_foreachinrange(clif_outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
map_moveblock(&nd->bl, x, y, gettick());
map_foreachinrange(clif_insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
- clif_displaymessage(fd, msg_txt(1155)); // NPC moved.
+ clif_displaymessage(fd, msg_txt(sd->lang,1155)); // NPC moved.
return 0;
}
@@ -5114,14 +5114,14 @@
memset(warpname, '\0', sizeof(warpname));
if (!message || !*message || sscanf(message, "%31s %d %d %23[^\n]", mapname, &x, &y, warpname) < 4) {
- clif_displaymessage(fd, msg_txt(1156)); // Usage: @addwarp <mapname> <X> <Y> <npc name>
+ clif_displaymessage(fd, msg_txt(sd->lang,1156)); // Usage: @addwarp <mapname> <X> <Y> <npc name>
return -1;
}
m = mapindex_name2id(mapname);
if( m == 0 )
{
- sprintf(atcmd_output, msg_txt(1157), mapname); // Unknown map '%s'.
+ sprintf(atcmd_output, msg_txt(sd->lang,1157), mapname); // Unknown map '%s'.
clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -5130,7 +5130,7 @@
if( nd == NULL )
return -1;
- sprintf(atcmd_output, msg_txt(1158), nd->exname); // New warp NPC '%s' created.
+ sprintf(atcmd_output, msg_txt(sd->lang,1158), nd->exname); // New warp NPC '%s' created.
clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -5149,22 +5149,22 @@
return -1;
pc_stop_following (sd);
- clif_displaymessage(fd, msg_txt(1159)); // Follow mode OFF.
+ clif_displaymessage(fd, msg_txt(sd->lang,1159)); // Follow mode OFF.
return 0;
}
if ( (pl_sd = map_nick2sd((char *)message)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if (sd->followtarget == pl_sd->bl.id) {
pc_stop_following (sd);
- clif_displaymessage(fd, msg_txt(1159)); // Follow mode OFF.
+ clif_displaymessage(fd, msg_txt(sd->lang,1159)); // Follow mode OFF.
} else {
pc_follow(sd, pl_sd->bl.id);
- clif_displaymessage(fd, msg_txt(1160)); // Follow mode ON.
+ clif_displaymessage(fd, msg_txt(sd->lang,1160)); // Follow mode ON.
}
return 0;
@@ -5201,7 +5201,7 @@
if (sd->state.storage_flag != 1)
{ //Open storage.
if( storage_storageopen(sd) == 1 ) {
- clif_displaymessage(fd, msg_txt(1161)); // You currently cannot open your storage.
+ clif_displaymessage(fd, msg_txt(sd->lang,1161)); // You currently cannot open your storage.
return -1;
}
}
@@ -5215,7 +5215,7 @@
}
storage_storageclose(sd);
- clif_displaymessage(fd, msg_txt(1162)); // All items stored.
+ clif_displaymessage(fd, msg_txt(sd->lang,1162)); // All items stored.
return 0;
}
@@ -5225,7 +5225,7 @@
nullpo_retr(-1, sd);
if (sd->state.storage_flag == 1) {
- clif_displaymessage(fd, msg_txt(250));
+ clif_displaymessage(fd, msg_txt(sd->lang,250));
return -1;
}
@@ -5235,7 +5235,7 @@
}
storage_storageclose(sd);
- clif_displaymessage(fd, msg_txt(1394)); // Your storage was cleaned.
+ clif_displaymessage(fd, msg_txt(sd->lang,1394)); // Your storage was cleaned.
return 0;
}
@@ -5249,17 +5249,17 @@
g = guild_search(sd->status.guild_id);
if (g == NULL) {
- clif_displaymessage(fd, msg_txt(43));
+ clif_displaymessage(fd, msg_txt(sd->lang,43));
return -1;
}
if (sd->state.storage_flag == 1) {
- clif_displaymessage(fd, msg_txt(250));
+ clif_displaymessage(fd, msg_txt(sd->lang,250));
return -1;
}
if (sd->state.storage_flag == 2) {
- clif_displaymessage(fd, msg_txt(251));
+ clif_displaymessage(fd, msg_txt(sd->lang,251));
return -1;
}
@@ -5276,7 +5276,7 @@
storage_guild_storageclose(sd);
gstorage->lock = 0; // Cleaning done, release lock
- clif_displaymessage(fd, msg_txt(1395)); // Your guild storage was cleaned.
+ clif_displaymessage(fd, msg_txt(sd->lang,1395)); // Your guild storage was cleaned.
return 0;
}
@@ -5286,7 +5286,7 @@
nullpo_retr(-1, sd);
if (pc_iscarton(sd) == 0) {
- clif_displaymessage(fd, msg_txt(1396)); // You do not have a cart to be cleaned.
+ clif_displaymessage(fd, msg_txt(sd->lang,1396)); // You do not have a cart to be cleaned.
return -1;
}
@@ -5301,7 +5301,7 @@
clif_clearcart(fd);
clif_updatestatus(sd,SP_CARTINFO);
- clif_displaymessage(fd, msg_txt(1397)); // Your cart was cleaned.
+ clif_displaymessage(fd, msg_txt(sd->lang,1397)); // Your cart was cleaned.
return 0;
}
@@ -5322,7 +5322,7 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1163)); // Please enter a skill name to look up (usage: @skillid <skill name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1163)); // Please enter a skill name to look up (usage: @skillid <skill name>).
return -1;
}
@@ -5333,17 +5333,17 @@
for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) ) {
idx = skill_get_index(db_data2i(data));
if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill_db[idx].desc, message, skillen) == 0) {
- sprintf(atcmd_output, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str); // skill %d: %s (%s)
+ sprintf(atcmd_output, msg_txt(sd->lang,1164), db_data2i(data), skill_db[idx].desc, key.str); // skill %d: %s (%s)
clif_displaymessage(fd, atcmd_output);
} else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill_db[idx].desc,message) ) ) {
- snprintf(partials[found++], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str);
+ snprintf(partials[found++], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_txt(sd->lang,1164), db_data2i(data), skill_db[idx].desc, key.str);
}
}
dbi_destroy(iter);
if( found ) {
- sprintf(atcmd_output, msg_txt(1398), found); // -- Displaying first %d partial matches
+ sprintf(atcmd_output, msg_txt(sd->lang,1398), found); // -- Displaying first %d partial matches
clif_displaymessage(fd, atcmd_output);
}
@@ -5368,19 +5368,19 @@
nullpo_retr(-1, sd);
if(!message || !*message || sscanf(message, "%hu %hu %23[^\n]", &skill_id, &skill_lv, target) != 3) {
- clif_displaymessage(fd, msg_txt(1165)); // Usage: @useskill <skill ID> <skill level> <target>
+ clif_displaymessage(fd, msg_txt(sd->lang,1165)); // Usage: @useskill <skill ID> <skill level> <target>
return -1;
}
if(!strcmp(target,"self")) pl_sd = sd; //quick keyword
else if ( (pl_sd = map_nick2sd(target)) == NULL ){
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
@@ -5413,7 +5413,7 @@
if (!message || !*message || sscanf(message, "%hu %hu", &skill_id, &skill_lv) < 1)
{
- clif_displaymessage(fd, msg_txt(1166)); // Usage: @displayskill <skill ID> {<skill level>}
+ clif_displaymessage(fd, msg_txt(sd->lang,1166)); // Usage: @displayskill <skill ID> {<skill level>}
return -1;
}
status = status_get_status_data(&sd->bl);
@@ -5438,26 +5438,26 @@
nullpo_retr(-1, sd);
if(!message || !*message || sscanf(message, "%hu %23[^\r\n]", &skill_id, target) != 2) {
- clif_displaymessage(fd, msg_txt(1167)); // Usage: @skilltree <skill ID> <target>
+ clif_displaymessage(fd, msg_txt(sd->lang,1167)); // Usage: @skilltree <skill ID> <target>
return -1;
}
if ( (pl_sd = map_nick2sd(target)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
c = pc_calc_skilltree_normalize_job(pl_sd);
c = pc_mapid2jobid(c, pl_sd->status.sex);
- sprintf(atcmd_output, msg_txt(1168), job_name(c), pc_checkskill(pl_sd, NV_BASIC)); // Player is using %s skill tree (%d basic points).
+ sprintf(atcmd_output, msg_txt(sd->lang,1168), job_name(c), pc_checkskill(pl_sd, NV_BASIC)); // Player is using %s skill tree (%d basic points).
clif_displaymessage(fd, atcmd_output);
ARR_FIND( 0, MAX_SKILL_TREE, j, skill_tree[c][j].id == 0 || skill_tree[c][j].id == skill_id );
if( j == MAX_SKILL_TREE || skill_tree[c][j].id == 0 )
{
- clif_displaymessage(fd, msg_txt(1169)); // The player cannot use that skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,1169)); // The player cannot use that skill.
return 0;
}
@@ -5468,13 +5468,13 @@
{
if( ent->need[j].id && pc_checkskill(sd,ent->need[j].id) < ent->need[j].lv)
{
- sprintf(atcmd_output, msg_txt(1170), ent->need[j].lv, skill_db[ent->need[j].id].desc); // Player requires level %d of skill %s.
+ sprintf(atcmd_output, msg_txt(sd->lang,1170), ent->need[j].lv, skill_db[ent->need[j].id].desc); // Player requires level %d of skill %s.
clif_displaymessage(fd, atcmd_output);
meets = 0;
}
}
if (meets == 1) {
- clif_displaymessage(fd, msg_txt(1171)); // The player meets all the requirements for that skill.
+ clif_displaymessage(fd, msg_txt(sd->lang,1171)); // The player meets all the requirements for that skill.
}
return 0;
@@ -5512,24 +5512,24 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%23s", player_name) != 1) {
- clif_displaymessage(fd, msg_txt(1172)); // Usage: @marry <char name>
+ clif_displaymessage(fd, msg_txt(sd->lang,1172)); // Usage: @marry <char name>
return -1;
}
if ((pl_sd = map_nick2sd(player_name)) == NULL) {
- clif_displaymessage(fd, msg_txt(3));
+ clif_displaymessage(fd, msg_txt(sd->lang,3));
return -1;
}
if (pc_marriage(sd, pl_sd) == 0) {
- clif_displaymessage(fd, msg_txt(1173)); // They are married... wish them well.
+ clif_displaymessage(fd, msg_txt(sd->lang,1173)); // They are married... wish them well.
clif_wedding_effect(&pl_sd->bl); //wedding effect and music [Lupus]
getring(sd); // Auto-give named rings (Aru)
getring(pl_sd);
return 0;
}
- clif_displaymessage(fd, msg_txt(1174)); // The two cannot wed because one is either a baby or already married.
+ clif_displaymessage(fd, msg_txt(sd->lang,1174)); // The two cannot wed because one is either a baby or already married.
return -1;
}
@@ -5542,12 +5542,12 @@
nullpo_retr(-1, sd);
if (pc_divorce(sd) != 0) {
- sprintf(atcmd_output, msg_txt(1175), sd->status.name); // '%s' is not married.
+ sprintf(atcmd_output, msg_txt(sd->lang,1175), sd->status.name); // '%s' is not married.
clif_displaymessage(fd, atcmd_output);
return -1;
}
- sprintf(atcmd_output, msg_txt(1176), sd->status.name); // '%s' and his/her partner are now divorced.
+ sprintf(atcmd_output, msg_txt(sd->lang,1176), sd->status.name); // '%s' and his/her partner are now divorced.
clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -5561,8 +5561,8 @@
int pos[7] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES,LOOK_ROBE };
if((i = sscanf(message, "%d %d", &j, &k)) < 1) {
- clif_displaymessage(fd, msg_txt(1177)); // Usage: @changelook {<position>} <view id>
- clif_displaymessage(fd, msg_txt(1178)); // Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield 6-Shoes 7-Robe
+ clif_displaymessage(fd, msg_txt(sd->lang,1177)); // Usage: @changelook {<position>} <view id>
+ clif_displaymessage(fd, msg_txt(sd->lang,1178)); // Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield 6-Shoes 7-Robe
return -1;
} else if ( i == 2 ) {
if (j < 1 || j > 7)
@@ -5587,17 +5587,17 @@
nullpo_retr(-1, sd);
if( map[sd->bl.m].flag.autotrade != battle_config.autotrade_mapflag ) {
- clif_displaymessage(fd, msg_txt(1179)); // Autotrade is not allowed on this map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1179)); // Autotrade is not allowed on this map.
return -1;
}
if( pc_isdead(sd) ) {
- clif_displaymessage(fd, msg_txt(1180)); // You cannot autotrade when dead.
+ clif_displaymessage(fd, msg_txt(sd->lang,1180)); // You cannot autotrade when dead.
return -1;
}
if( !sd->state.vending && !sd->state.buyingstore ) { //check if player is vending or buying
- clif_displaymessage(fd, msg_txt(549)); // "You should have a shop open to use @autotrade."
+ clif_displaymessage(fd, msg_txt(sd->lang,549)); // "You should have a shop open to use @autotrade."
return -1;
}
@@ -5622,22 +5622,22 @@
nullpo_retr(-1, sd);
if (sd->status.guild_id == 0 || (g = guild_search(sd->status.guild_id)) == NULL || strcmp(g->master,sd->status.name)) {
- clif_displaymessage(fd, msg_txt(1181)); // You need to be a Guild Master to use this command.
+ clif_displaymessage(fd, msg_txt(sd->lang,1181)); // You need to be a Guild Master to use this command.
return -1;
}
if( map[sd->bl.m].flag.guildlock || map[sd->bl.m].flag.gvg_castle ) {
- clif_displaymessage(fd, msg_txt(1182)); // You cannot change guild leaders on this map.
+ clif_displaymessage(fd, msg_txt(sd->lang,1182)); // You cannot change guild leaders on this map.
return -1;
}
if( !message[0] ) {
- clif_displaymessage(fd, msg_txt(1183)); // Usage: @changegm <guild_member_name>
+ clif_displaymessage(fd, msg_txt(sd->lang,1183)); // Usage: @changegm <guild_member_name>
return -1;
}
if((pl_sd=map_nick2sd((char *) message)) == NULL || pl_sd->status.guild_id != sd->status.guild_id) {
- clif_displaymessage(fd, msg_txt(1184)); // Target character must be online and be a guild member.
+ clif_displaymessage(fd, msg_txt(sd->lang,1184)); // Target character must be online and be a guild member.
return -1;
}
@@ -5655,7 +5655,7 @@
if( !message[0] )
{
- clif_displaymessage(fd, msg_txt(1185)); // Usage: @changeleader <party_member_name>
+ clif_displaymessage(fd, msg_txt(sd->lang,1185)); // Usage: @changeleader <party_member_name>
return -1;
}
@@ -5677,7 +5677,7 @@
if (sd->status.party_id == 0 || (p = party_search(sd->status.party_id)) == NULL)
{
- clif_displaymessage(fd, msg_txt(282));
+ clif_displaymessage(fd, msg_txt(sd->lang,282));
return -1;
}
@@ -5687,13 +5687,13 @@
if (!p->party.member[mi].leader)
{
- clif_displaymessage(fd, msg_txt(282));
+ clif_displaymessage(fd, msg_txt(sd->lang,282));
return -1;
}
if(!message || !*message || sscanf(message, "%15s %15s", w1, w2) < 2)
{
- clif_displaymessage(fd, msg_txt(1186)); // Usage: @partyoption <pickup share: yes/no> <item distribution: yes/no>
+ clif_displaymessage(fd, msg_txt(sd->lang,1186)); // Usage: @partyoption <pickup share: yes/no> <item distribution: yes/no>
return -1;
}
@@ -5703,7 +5703,7 @@
if (option != p->party.item)
party_changeoption(sd, p->party.exp, option);
else
- clif_displaymessage(fd, msg_txt(286));
+ clif_displaymessage(fd, msg_txt(sd->lang,286));
return 0;
}
@@ -5733,10 +5733,10 @@
sd->state.autoloot = rate;
if (sd->state.autoloot) {
- snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1187),((double)sd->state.autoloot)/100.); // Autolooting items with drop rates of %0.02f%% and below.
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd->lang,1187),((double)sd->state.autoloot)/100.); // Autolooting items with drop rates of %0.02f%% and below.
clif_displaymessage(fd, atcmd_output);
}else
- clif_displaymessage(fd, msg_txt(1188)); // Autoloot is now off.
+ clif_displaymessage(fd, msg_txt(sd->lang,1188)); // Autoloot is now off.
return 0;
}
@@ -5769,7 +5769,7 @@
item_data = itemdb_searchname(message);
if (!item_data) {
// No items founds in the DB with Id or Name
- clif_displaymessage(fd, msg_txt(1189)); // Item not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,1189)); // Item not found.
return -1;
}
}
@@ -5778,27 +5778,27 @@
case 1:
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);
if (i != AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1190)); // You're already autolooting this item.
+ clif_displaymessage(fd, msg_txt(sd->lang,1190)); // You're already autolooting this item.
return -1;
}
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == 0);
if (i == AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1191)); // Your autolootitem list is full. Remove some items first with @autolootid -<item name or ID>.
+ clif_displaymessage(fd, msg_txt(sd->lang,1191)); // Your autolootitem list is full. Remove some items first with @autolootid -<item name or ID>.
return -1;
}
sd->state.autolootid[i] = item_data->nameid; // Autoloot Activated
- sprintf(atcmd_output, msg_txt(1192), item_data->name, item_data->jname, item_data->nameid); // Autolooting item: '%s'/'%s' {%d}
+ sprintf(atcmd_output, msg_txt(sd->lang,1192), item_data->name, item_data->jname, item_data->nameid); // Autolooting item: '%s'/'%s' {%d}
clif_displaymessage(fd, atcmd_output);
sd->state.autolooting = 1;
break;
case 2:
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);
if (i == AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1193)); // You're currently not autolooting this item.
+ clif_displaymessage(fd, msg_txt(sd->lang,1193)); // You're currently not autolooting this item.
return -1;
}
sd->state.autolootid[i] = 0;
- sprintf(atcmd_output, msg_txt(1194), item_data->name, item_data->jname, item_data->nameid); // Removed item: '%s'/'%s' {%d} from your autolootitem list.
+ sprintf(atcmd_output, msg_txt(sd->lang,1194), item_data->name, item_data->jname, item_data->nameid); // Removed item: '%s'/'%s' {%d} from your autolootitem list.
clif_displaymessage(fd, atcmd_output);
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);
if (i == AUTOLOOTITEM_SIZE) {
@@ -5806,15 +5806,15 @@
}
break;
case 3:
- sprintf(atcmd_output, msg_txt(1195), AUTOLOOTITEM_SIZE); // You can have %d items on your autolootitem list.
+ sprintf(atcmd_output, msg_txt(sd->lang,1195), AUTOLOOTITEM_SIZE); // You can have %d items on your autolootitem list.
clif_displaymessage(fd, atcmd_output);
- clif_displaymessage(fd, msg_txt(1196)); // To add an item to the list, use "@alootid +<item name or ID>". To remove an item, use "@alootid -<item name or ID>".
- clif_displaymessage(fd, msg_txt(1197)); // "@alootid reset" will clear your autolootitem list.
+ clif_displaymessage(fd, msg_txt(sd->lang,1196)); // To add an item to the list, use "@alootid +<item name or ID>". To remove an item, use "@alootid -<item name or ID>".
+ clif_displaymessage(fd, msg_txt(sd->lang,1197)); // "@alootid reset" will clear your autolootitem list.
ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);
if (i == AUTOLOOTITEM_SIZE) {
- clif_displaymessage(fd, msg_txt(1198)); // Your autolootitem list is empty.
+ clif_displaymessage(fd, msg_txt(sd->lang,1198)); // Your autolootitem list is empty.
} else {
- clif_displaymessage(fd, msg_txt(1199)); // Items on your autolootitem list:
+ clif_displaymessage(fd, msg_txt(sd->lang,1199)); // Items on your autolootitem list:
for(i = 0; i < AUTOLOOTITEM_SIZE; i++)
{
if (sd->state.autolootid[i] == 0)
@@ -5830,7 +5830,7 @@
break;
case 4:
memset(sd->state.autolootid, 0, sizeof(sd->state.autolootid));
- clif_displaymessage(fd, msg_txt(1200)); // Your autolootitem list has been reset.
+ clif_displaymessage(fd, msg_txt(sd->lang,1200)); // Your autolootitem list has been reset.
sd->state.autolooting = 0;
break;
}
@@ -5848,11 +5848,11 @@
// if (map[sd->bl.m].flag.rain) {
// map[sd->bl.m].flag.rain=0;
// clif_weather(sd->bl.m);
-// clif_displaymessage(fd, msg_txt(1201)); // The rain has stopped.
+// clif_displaymessage(fd, msg_txt(sd->lang,1201)); // The rain has stopped.
// } else {
// map[sd->bl.m].flag.rain=1;
// clif_weather(sd->bl.m);
-// clif_displaymessage(fd, msg_txt(1202)); // It has started to rain.
+// clif_displaymessage(fd, msg_txt(sd->lang,1202)); // It has started to rain.
// }
// return 0;
//}
@@ -5866,11 +5866,11 @@
if (map[sd->bl.m].flag.snow) {
map[sd->bl.m].flag.snow=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1203)); // Snow has stopped falling.
+ clif_displaymessage(fd, msg_txt(sd->lang,1203)); // Snow has stopped falling.
} else {
map[sd->bl.m].flag.snow=1;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1204)); // It has started to snow.
+ clif_displaymessage(fd, msg_txt(sd->lang,1204)); // It has started to snow.
}
return 0;
@@ -5885,11 +5885,11 @@
if (map[sd->bl.m].flag.sakura) {
map[sd->bl.m].flag.sakura=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1205)); // Cherry tree leaves no longer fall.
+ clif_displaymessage(fd, msg_txt(sd->lang,1205)); // Cherry tree leaves no longer fall.
} else {
map[sd->bl.m].flag.sakura=1;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1206)); // Cherry tree leaves have begun to fall.
+ clif_displaymessage(fd, msg_txt(sd->lang,1206)); // Cherry tree leaves have begun to fall.
}
return 0;
}
@@ -5903,11 +5903,11 @@
if (map[sd->bl.m].flag.clouds) {
map[sd->bl.m].flag.clouds=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1207)); // The clouds has disappear.
+ clif_displaymessage(fd, msg_txt(sd->lang,1207)); // The clouds has disappear.
} else {
map[sd->bl.m].flag.clouds=1;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1208)); // Clouds appear.
+ clif_displaymessage(fd, msg_txt(sd->lang,1208)); // Clouds appear.
}
return 0;
@@ -5922,11 +5922,11 @@
if (map[sd->bl.m].flag.clouds2) {
map[sd->bl.m].flag.clouds2=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1209)); // The alternative clouds disappear.
+ clif_displaymessage(fd, msg_txt(sd->lang,1209)); // The alternative clouds disappear.
} else {
map[sd->bl.m].flag.clouds2=1;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1210)); // Alternative clouds appear.
+ clif_displaymessage(fd, msg_txt(sd->lang,1210)); // Alternative clouds appear.
}
return 0;
@@ -5941,11 +5941,11 @@
if (map[sd->bl.m].flag.fog) {
map[sd->bl.m].flag.fog=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1211)); // The fog has gone.
+ clif_displaymessage(fd, msg_txt(sd->lang,1211)); // The fog has gone.
} else {
map[sd->bl.m].flag.fog=1;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1212)); // Fog hangs over.
+ clif_displaymessage(fd, msg_txt(sd->lang,1212)); // Fog hangs over.
}
return 0;
}
@@ -5959,11 +5959,11 @@
if (map[sd->bl.m].flag.leaves) {
map[sd->bl.m].flag.leaves=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1213)); // Leaves no longer fall.
+ clif_displaymessage(fd, msg_txt(sd->lang,1213)); // Leaves no longer fall.
} else {
map[sd->bl.m].flag.leaves=1;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1214)); // Fallen leaves fall.
+ clif_displaymessage(fd, msg_txt(sd->lang,1214)); // Fallen leaves fall.
}
return 0;
@@ -5978,11 +5978,11 @@
if (map[sd->bl.m].flag.fireworks) {
map[sd->bl.m].flag.fireworks=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1215)); // Fireworks have ended.
+ clif_displaymessage(fd, msg_txt(sd->lang,1215)); // Fireworks have ended.
} else {
map[sd->bl.m].flag.fireworks=1;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(1216)); // Fireworks have launched.
+ clif_displaymessage(fd, msg_txt(sd->lang,1216)); // Fireworks have launched.
}
return 0;
@@ -6006,7 +6006,7 @@
map[sd->bl.m].flag.fireworks=0;
map[sd->bl.m].flag.leaves=0;
clif_weather(sd->bl.m);
- clif_displaymessage(fd, msg_txt(291));
+ clif_displaymessage(fd, msg_txt(sd->lang,291));
return 0;
}
@@ -6021,7 +6021,7 @@
memset(sound_file, '\0', sizeof(sound_file));
if(!message || !*message || sscanf(message, "%99[^\n]", sound_file) < 1) {
- clif_displaymessage(fd, msg_txt(1217)); // Please enter a sound filename (usage: @sound <filename>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1217)); // Please enter a sound filename (usage: @sound <filename>).
return -1;
}
@@ -6046,14 +6046,14 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%99[^\n]", mob_name) < 1) {
- clif_displaymessage(fd, msg_txt(1218)); // Please enter a monster name (usage: @mobsearch <monster name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1218)); // Please enter a monster name (usage: @mobsearch <monster name>).
return -1;
}
if ((mob_id = atoi(mob_name)) == 0)
mob_id = mobdb_searchname(mob_name);
if(mob_id > 0 && mobdb_checkid(mob_id) == 0){
- snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1219),mob_name); // Invalid mob ID %s!
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd->lang,1219),mob_name); // Invalid mob ID %s!
clif_displaymessage(fd, atcmd_output);
return -1;
}
@@ -6061,7 +6061,7 @@
strcpy(mob_name,mob_db(mob_id)->jname); // --ja--
// strcpy(mob_name,mob_db(mob_id)->name); // --en--
- snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1220), mob_name, mapindex_id2name(sd->mapindex)); // Mob Search... %s %s
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd->lang,1220), mob_name, mapindex_id2name(sd->mapindex)); // Mob Search... %s %s
clif_displaymessage(fd, atcmd_output);
it = mapit_geteachmob();
@@ -6103,7 +6103,7 @@
ACMD_FUNC(cleanmap)
{
map_foreachinmap(atcommand_cleanfloor_sub, sd->bl.m, BL_ITEM);
- clif_displaymessage(fd, msg_txt(1221)); // All dropped items have been cleaned up.
+ clif_displaymessage(fd, msg_txt(sd->lang,1221)); // All dropped items have been cleaned up.
return 0;
}
@@ -6121,7 +6121,7 @@
map_foreachinarea(atcommand_cleanfloor_sub, sd->bl.m, x0, y0, x1, y1, BL_ITEM);
}
- clif_displaymessage(fd, msg_txt(1221)); // All dropped items have been cleaned up.
+ clif_displaymessage(fd, msg_txt(sd->lang,1221)); // All dropped items have been cleaned up.
return 0;
}
@@ -6143,19 +6143,19 @@
if(!ifcolor) {
if (!message || !*message || sscanf(message, "%23[^,], %99[^\n]", name, mes) < 2) {
- clif_displaymessage(fd, msg_txt(1222)); // Please enter the correct parameters (usage: @npctalk <npc name>, <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1222)); // Please enter the correct parameters (usage: @npctalk <npc name>, <message>).
return -1;
}
}
else {
if (!message || !*message || sscanf(message, "%lx %23[^,], %99[^\n]", &color, name, mes) < 3) {
- clif_displaymessage(fd, msg_txt(1223)); // Please enter the correct parameters (usage: @npctalkc <color> <npc name>, <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1223)); // Please enter the correct parameters (usage: @npctalkc <color> <npc name>, <message>).
return -1;
}
}
if (!(nd = npc_name2id(name))) {
- clif_displaymessage(fd, msg_txt(111)); // This NPC doesn't exist
+ clif_displaymessage(fd, msg_txt(sd->lang,111)); // This NPC doesn't exist
return -1;
}
@@ -6183,7 +6183,7 @@
if(!sd->status.pet_id || !(pd=sd->pd))
{
- clif_displaymessage(fd, msg_txt(184));
+ clif_displaymessage(fd, msg_txt(sd->lang,184));
return -1;
}
@@ -6193,7 +6193,7 @@
return -1;
if (!message || !*message || sscanf(message, "%99[^\n]", mes) < 1) {
- clif_displaymessage(fd, msg_txt(1224)); // Please enter a message (usage: @pettalk <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1224)); // Please enter a message (usage: @pettalk <message>).
return -1;
}
@@ -6285,7 +6285,7 @@
{
pc_resetstate(sd);
pc_resetskill(sd,1);
- sprintf(atcmd_output, msg_txt(208), sd->status.name); // '%s' skill and stats points reseted!
+ sprintf(atcmd_output, msg_txt(sd->lang,208), sd->status.name); // '%s' skill and stats points reseted!
clif_displaymessage(fd, atcmd_output);
return 0;
}
@@ -6305,7 +6305,7 @@
if (!message || !*message || sscanf(message, "%23s %d", name, &duration) < 1)
{
- clif_displaymessage(fd, msg_txt(1225)); // Please enter a monster name (usage: @summon <monster name> {duration}).
+ clif_displaymessage(fd, msg_txt(sd->lang,1225)); // Please enter a monster name (usage: @summon <monster name> {duration}).
return -1;
}
@@ -6318,7 +6318,7 @@
mob_id = mobdb_searchname(name);
if(mob_id == 0 || mobdb_checkid(mob_id) == 0)
{
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,40)); // Invalid monster ID or name.
return -1;
}
@@ -6334,7 +6334,7 @@
mob_spawn(md);
sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000);
clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,md->bl.x,md->bl.y,tick);
- clif_displaymessage(fd, msg_txt(39)); // All monster summoned!
+ clif_displaymessage(fd, msg_txt(sd->lang,39)); // All monster summoned!
return 0;
}
@@ -6350,19 +6350,19 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &new_group) != 1) {
- clif_displaymessage(fd, msg_txt(1226)); // Usage: @adjgroup <group_id>
+ clif_displaymessage(fd, msg_txt(sd->lang,1226)); // Usage: @adjgroup <group_id>
return -1;
}
if (!pc_group_exists(new_group)) {
- clif_displaymessage(fd, msg_txt(1227)); // Specified group does not exist.
+ clif_displaymessage(fd, msg_txt(sd->lang,1227)); // Specified group does not exist.
return -1;
}
sd->group_id = new_group;
pc_group_pc_load(sd);/* update cache */
- clif_displaymessage(fd, msg_txt(1228)); // Group changed successfully.
- clif_displaymessage(sd->fd, msg_txt(1229)); // Your group has changed.
+ clif_displaymessage(fd, msg_txt(sd->lang,1228)); // Group changed successfully.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1229)); // Your group has changed.
return 0;
}
@@ -6376,13 +6376,13 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1230)); // Please enter a player name (usage: @trade <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1230)); // Please enter a player name (usage: @trade <char name>).
return -1;
}
if ( (pl_sd = map_nick2sd((char *)message)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
@@ -6400,17 +6400,17 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%127s %127s", flag, value) != 2) {
- clif_displaymessage(fd, msg_txt(1231)); // Usage: @setbattleflag <flag> <value>
+ clif_displaymessage(fd, msg_txt(sd->lang,1231)); // Usage: @setbattleflag <flag> <value>
return -1;
}
if (battle_set_value(flag, value) == 0)
{
- clif_displaymessage(fd, msg_txt(1232)); // Unknown battle_config flag.
+ clif_displaymessage(fd, msg_txt(sd->lang,1232)); // Unknown battle_config flag.
return -1;
}
- clif_displaymessage(fd, msg_txt(1233)); // Set battle_config as requested.
+ clif_displaymessage(fd, msg_txt(sd->lang,1233)); // Set battle_config as requested.
return 0;
}
@@ -6424,24 +6424,24 @@
nullpo_retr(-1, sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1234)); // Please enter a player name (usage: @unmute <char name>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1234)); // Please enter a player name (usage: @unmute <char name>).
return -1;
}
if ( (pl_sd = map_nick2sd((char *)message)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if(!pl_sd->sc.data[SC_NOCHAT]) {
- clif_displaymessage(sd->fd,msg_txt(1235)); // Player is not muted.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1235)); // Player is not muted.
return -1;
}
pl_sd->status.manner = 0;
status_change_end(&pl_sd->bl, SC_NOCHAT, INVALID_TIMER);
- clif_displaymessage(sd->fd,msg_txt(1236)); // Player unmuted.
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1236)); // Player unmuted.
return 0;
}
@@ -6463,7 +6463,7 @@
minutes = seconds/minute;
seconds -= (seconds/minute>0)?(seconds/minute)*minute:0;
- snprintf(atcmd_output, sizeof(atcmd_output), msg_txt(245), days, hours, minutes, seconds);
+ snprintf(atcmd_output, sizeof(atcmd_output), msg_txt(sd->lang,245), days, hours, minutes, seconds);
clif_displaymessage(fd, atcmd_output);
return 0;
@@ -6495,19 +6495,19 @@
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %23[^\n]", &manner, atcmd_player_name) < 1) {
- clif_displaymessage(fd, msg_txt(1237)); // Usage: @mute <time> <char name>
+ clif_displaymessage(fd, msg_txt(sd->lang,1237)); // Usage: @mute <time> <char name>
return -1;
}
if ( (pl_sd = map_nick2sd(atcmd_player_name)) == NULL )
{
- clif_displaymessage(fd, msg_txt(3)); // Character not found.
+ clif_displaymessage(fd, msg_txt(sd->lang,3)); // Character not found.
return -1;
}
if ( pc_get_group_level(sd) < pc_get_group_level(pl_sd) )
{
- clif_displaymessage(fd, msg_txt(81)); // Your GM level don't authorise you to do this action on this player.
+ clif_displaymessage(fd, msg_txt(sd->lang,81)); // Your GM level don't authorise you to do this action on this player.
return -1;
}
@@ -6568,7 +6568,7 @@
if (num > 0) {
clif_item_identify_list(sd);
} else {
- clif_displaymessage(fd,msg_txt(1238)); // There are no items to appraise.
+ clif_displaymessage(fd,msg_txt(sd->lang,1238)); // There are no items to appraise.
}
return 0;
}
@@ -6655,7 +6655,7 @@
memset(atcmd_output2, '\0', sizeof(atcmd_output2));
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1239)); // Please enter a monster name/ID (usage: @mobinfo <monster_name_or_monster_ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1239)); // Please enter a monster name/ID (usage: @mobinfo <monster_name_or_monster_ID>).
return -1;
}
@@ -6668,12 +6668,12 @@
count = mobdb_searchname_array(mob_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,40)); // Invalid monster ID or name.
return -1;
}
if (count > MAX_SEARCH) {
- sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count);
+ sprintf(atcmd_output, msg_txt(sd->lang,269), MAX_SEARCH, count);
clif_displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
@@ -6690,24 +6690,24 @@
#endif
// stats
if (mob->mexp)
- sprintf(atcmd_output, msg_txt(1240), mob->name, mob->jname, mob->sprite, mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
+ sprintf(atcmd_output, msg_txt(sd->lang,1240), mob->name, mob->jname, mob->sprite, mob->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d)
else
- sprintf(atcmd_output, msg_txt(1241), mob->name, mob->jname, mob->sprite, mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
+ sprintf(atcmd_output, msg_txt(sd->lang,1241), mob->name, mob->jname, mob->sprite, mob->vd.class_); // Monster: '%s'/'%s'/'%s' (%d)
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1242), mob->lv, mob->status.max_hp, base_exp, job_exp, MOB_HIT(mob), MOB_FLEE(mob)); // Lv:%d HP:%d Base EXP:%u Job EXP:%u HIT:%d FLEE:%d
+ sprintf(atcmd_output, msg_txt(sd->lang,1242), mob->lv, mob->status.max_hp, base_exp, job_exp, MOB_HIT(mob), MOB_FLEE(mob)); // Lv:%d HP:%d Base EXP:%u Job EXP:%u HIT:%d FLEE:%d
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1243), // DEF:%d MDEF:%d STR:%d AGI:%d VIT:%d INT:%d DEX:%d LUK:%d
+ sprintf(atcmd_output, msg_txt(sd->lang,1243), // DEF:%d MDEF:%d STR:%d AGI:%d VIT:%d INT:%d DEX:%d LUK:%d
mob->status.def, mob->status.mdef,mob->status.str, mob->status.agi,
mob->status.vit, mob->status.int_, mob->status.dex, mob->status.luk);
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1244), // ATK:%d~%d Range:%d~%d~%d Size:%s Race: %s Element: %s (Lv:%d)
+ sprintf(atcmd_output, msg_txt(sd->lang,1244), // ATK:%d~%d Range:%d~%d~%d Size:%s Race: %s Element: %s (Lv:%d)
mob->status.rhw.atk, mob->status.rhw.atk2, mob->status.rhw.range,
mob->range2 , mob->range3, msize[mob->status.size],
mrace[mob->status.race], melement[mob->status.def_ele], mob->status.ele_lv);
clif_displaymessage(fd, atcmd_output);
// drops
- clif_displaymessage(fd, msg_txt(1245)); // Drops:
+ clif_displaymessage(fd, msg_txt(sd->lang,1245)); // Drops:
strcpy(atcmd_output, " ");
j = 0;
for (i = 0; i < MAX_MOB_DROP; i++) {
@@ -6731,14 +6731,14 @@
}
}
if (j == 0)
- clif_displaymessage(fd, msg_txt(1246)); // This monster has no drops.
+ clif_displaymessage(fd, msg_txt(sd->lang,1246)); // This monster has no drops.
else if (j % 3 != 0)
clif_displaymessage(fd, atcmd_output);
// mvp
if (mob->mexp) {
- sprintf(atcmd_output, msg_txt(1247), mob->mexp); // MVP Bonus EXP:%u
+ sprintf(atcmd_output, msg_txt(sd->lang,1247), mob->mexp); // MVP Bonus EXP:%u
clif_displaymessage(fd, atcmd_output);
- strcpy(atcmd_output, msg_txt(1248)); // MVP Items:
+ strcpy(atcmd_output, msg_txt(sd->lang,1248)); // MVP Items:
j = 0;
for (i = 0; i < MAX_MVP_DROP; i++) {
if (mob->mvpitem[i].nameid <= 0 || (item_data = itemdb_exists(mob->mvpitem[i].nameid)) == NULL)
@@ -6753,7 +6753,7 @@
}
}
if (j == 0)
- clif_displaymessage(fd, msg_txt(1249)); // This monster has no MVP prizes.
+ clif_displaymessage(fd, msg_txt(sd->lang,1249)); // This monster has no MVP prizes.
else
clif_displaymessage(fd, atcmd_output);
}
@@ -6780,13 +6780,13 @@
if((mob_id = atoi(mob_name)) == 0)
mob_id = mobdb_searchname(mob_name);
if(mob_id > 0 && mobdb_checkid(mob_id) == 0){
- snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1250),mob_name); // Invalid mob id %s!
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd->lang,1250),mob_name); // Invalid mob id %s!
clif_displaymessage(fd, atcmd_output);
return 0;
}
if(mob_db(mob_id)->status.mode&MD_BOSS && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs.
- clif_displaymessage(fd, msg_txt(1251)); // Can't show boss mobs!
+ clif_displaymessage(fd, msg_txt(sd->lang,1251)); // Can't show boss mobs!
return 0;
}
@@ -6794,7 +6794,7 @@
strcpy(mob_name,mob_db(mob_id)->jname); // --ja--
//strcpy(mob_name,mob_db(mob_id)->name); // --en--
- snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1252), // Mob Search... %s %s
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd->lang,1252), // Mob Search... %s %s
mob_name, mapindex_id2name(sd->mapindex));
clif_displaymessage(fd, atcmd_output);
@@ -6833,12 +6833,12 @@
nullpo_retr(-1, sd);
if ( !message || !*message || ( level = atoi(message) ) < 1 ) {
- clif_displaymessage(fd, msg_txt(1253)); // Please enter a level adjustment (usage: @homlevel <number of levels>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1253)); // Please enter a level adjustment (usage: @homlevel <number of levels>).
return -1;
}
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
@@ -6864,12 +6864,12 @@
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
if ( !merc_hom_evolution(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1255)); // Your homunculus doesn't evolve.
+ clif_displaymessage(fd, msg_txt(sd->lang,1255)); // Your homunculus doesn't evolve.
return -1;
}
clif_homskillinfoblock(sd);
@@ -6882,7 +6882,7 @@
nullpo_retr(-1, sd);
if (!merc_is_hom_active(sd->hd)) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
@@ -6912,19 +6912,19 @@
nullpo_retr(-1, sd);
if ( sd->status.hom_id ) {
- clif_displaymessage(fd, msg_txt(450));
+ clif_displaymessage(fd, msg_txt(sd->lang,450));
return -1;
}
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1256)); // Please enter a homunculus ID (usage: @makehomun <homunculus id>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1256)); // Please enter a homunculus ID (usage: @makehomun <homunculus id>).
return -1;
}
homunid = atoi(message);
if( homunid < HM_CLASS_BASE || homunid > HM_CLASS_BASE + MAX_HOMUNCULUS_CLASS - 1 )
{
- clif_displaymessage(fd, msg_txt(1257)); // Invalid Homunculus ID.
+ clif_displaymessage(fd, msg_txt(sd->lang,1257)); // Invalid Homunculus ID.
return -1;
}
@@ -6942,12 +6942,12 @@
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1258)); // Please enter a friendly value (usage: @homfriendly <friendly value [0-1000]>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1258)); // Please enter a friendly value (usage: @homfriendly <friendly value [0-1000]>).
return -1;
}
@@ -6969,12 +6969,12 @@
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1259)); // Please enter a hunger value (usage: @homhungry <hunger value [0-100]>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1259)); // Please enter a hunger value (usage: @homhungry <hunger value [0-100]>).
return -1;
}
@@ -7007,12 +7007,12 @@
return -1;
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
if (!message || !*message || sscanf(message, "%99[^\n]", mes) < 1) {
- clif_displaymessage(fd, msg_txt(1260)); // Please enter a message (usage: @homtalk <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1260)); // Please enter a message (usage: @homtalk <message>).
return -1;
}
@@ -7032,28 +7032,28 @@
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
hd = sd->hd;
status = status_get_status_data(&hd->bl);
- clif_displaymessage(fd, msg_txt(1261)); // Homunculus stats:
+ clif_displaymessage(fd, msg_txt(sd->lang,1261)); // Homunculus stats:
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1262), // HP: %d/%d - SP: %d/%d
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1262), // HP: %d/%d - SP: %d/%d
status->hp, status->max_hp, status->sp, status->max_sp);
clif_displaymessage(fd, atcmd_output);
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1263), // ATK: %d - MATK: %d~%d
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1263), // ATK: %d - MATK: %d~%d
status->rhw.atk2 +status->batk, status->matk_min, status->matk_max);
clif_displaymessage(fd, atcmd_output);
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1264), // Hungry: %d - Intimacy: %u
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1264), // Hungry: %d - Intimacy: %u
hd->homunculus.hunger, hd->homunculus.intimacy/100);
clif_displaymessage(fd, atcmd_output);
snprintf(atcmd_output, sizeof(atcmd_output) ,
- msg_txt(1265), // Stats: Str %d / Agi %d / Vit %d / Int %d / Dex %d / Luk %d
+ msg_txt(sd->lang,1265), // Stats: Str %d / Agi %d / Vit %d / Int %d / Dex %d / Luk %d
status->str, status->agi, status->vit,
status->int_, status->dex, status->luk);
clif_displaymessage(fd, atcmd_output);
@@ -7071,7 +7071,7 @@
nullpo_retr(-1, sd);
if ( !merc_is_hom_active(sd->hd) ) {
- clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus.
+ clif_displaymessage(fd, msg_txt(sd->lang,1254)); // You do not have a homunculus.
return -1;
}
@@ -7082,49 +7082,49 @@
lv = hom->level;
snprintf(atcmd_output, sizeof(atcmd_output) ,
- msg_txt(1266), lv, db->name); // Homunculus growth stats (Lv %d %s):
+ msg_txt(sd->lang,1266), lv, db->name); // Homunculus growth stats (Lv %d %s):
clif_displaymessage(fd, atcmd_output);
lv--; //Since the first increase is at level 2.
evo = (hom->class_ == db->evo_class);
min = db->base.HP +lv*db->gmin.HP +(evo?db->emin.HP:0);
max = db->base.HP +lv*db->gmax.HP +(evo?db->emax.HP:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1267), hom->max_hp, min, max); // Max HP: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1267), hom->max_hp, min, max); // Max HP: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
min = db->base.SP +lv*db->gmin.SP +(evo?db->emin.SP:0);
max = db->base.SP +lv*db->gmax.SP +(evo?db->emax.SP:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1268), hom->max_sp, min, max); // Max SP: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1268), hom->max_sp, min, max); // Max SP: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
min = db->base.str +lv*(db->gmin.str/10) +(evo?db->emin.str:0);
max = db->base.str +lv*(db->gmax.str/10) +(evo?db->emax.str:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1269), hom->str/10, min, max); // Str: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1269), hom->str/10, min, max); // Str: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
min = db->base.agi +lv*(db->gmin.agi/10) +(evo?db->emin.agi:0);
max = db->base.agi +lv*(db->gmax.agi/10) +(evo?db->emax.agi:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1270), hom->agi/10, min, max); // Agi: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1270), hom->agi/10, min, max); // Agi: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
min = db->base.vit +lv*(db->gmin.vit/10) +(evo?db->emin.vit:0);
max = db->base.vit +lv*(db->gmax.vit/10) +(evo?db->emax.vit:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1271), hom->vit/10, min, max); // Vit: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1271), hom->vit/10, min, max); // Vit: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
min = db->base.int_ +lv*(db->gmin.int_/10) +(evo?db->emin.int_:0);
max = db->base.int_ +lv*(db->gmax.int_/10) +(evo?db->emax.int_:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1272), hom->int_/10, min, max); // Int: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1272), hom->int_/10, min, max); // Int: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
min = db->base.dex +lv*(db->gmin.dex/10) +(evo?db->emin.dex:0);
max = db->base.dex +lv*(db->gmax.dex/10) +(evo?db->emax.dex:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1273), hom->dex/10, min, max); // Dex: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1273), hom->dex/10, min, max); // Dex: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
min = db->base.luk +lv*(db->gmin.luk/10) +(evo?db->emin.luk:0);
max = db->base.luk +lv*(db->gmax.luk/10) +(evo?db->emax.luk:0);;
- snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(1274), hom->luk/10, min, max); // Luk: %d (%d~%d)
+ snprintf(atcmd_output, sizeof(atcmd_output) ,msg_txt(sd->lang,1274), hom->luk/10, min, max); // Luk: %d (%d~%d)
clif_displaymessage(fd, atcmd_output);
return 0;
@@ -7140,7 +7140,7 @@
if(!merc_hom_shuffle(sd->hd))
return -1;
- clif_displaymessage(sd->fd, msg_txt(1275)); // Homunculus stats altered.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1275)); // Homunculus stats altered.
atcommand_homstats(fd, sd, command, message); //Print out the new stats
return 0;
}
@@ -7155,40 +7155,40 @@
int i, count = 1;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1276)); // Please enter an item name/ID (usage: @ii/@iteminfo <item name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1276)); // Please enter an item name/ID (usage: @ii/@iteminfo <item name/ID>).
return -1;
}
if ((item_array[0] = itemdb_exists(atoi(message))) == NULL)
count = itemdb_searchname_array(item_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,19)); // Invalid item ID or name.
return -1;
}
if (count > MAX_SEARCH) {
- sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count); // Displaying first %d out of %d matches
+ sprintf(atcmd_output, msg_txt(sd->lang,269), MAX_SEARCH, count); // Displaying first %d out of %d matches
clif_displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
for (i = 0; i < count; i++) {
item_data = item_array[i];
- sprintf(atcmd_output, msg_txt(1277), // Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s
+ sprintf(atcmd_output, msg_txt(sd->lang,1277), // Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s
item_data->name,item_data->jname,item_data->slot,item_data->nameid,
itemdb_typename(item_data->type),
- (item_data->script==NULL)? msg_txt(1278) : msg_txt(1279) // None / With script
+ (item_data->script==NULL)? msg_txt(sd->lang,1278) : msg_txt(sd->lang,1279) // None / With script
);
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, msg_txt(1280), item_data->value_buy, item_data->value_sell, item_data->weight/10. ); // NPC Buy:%dz, Sell:%dz | Weight: %.1f
+ sprintf(atcmd_output, msg_txt(sd->lang,1280), item_data->value_buy, item_data->value_sell, item_data->weight/10. ); // NPC Buy:%dz, Sell:%dz | Weight: %.1f
clif_displaymessage(fd, atcmd_output);
if (item_data->maxchance == -1)
- strcpy(atcmd_output, msg_txt(1281)); // - Available in the shops only.
+ strcpy(atcmd_output, msg_txt(sd->lang,1281)); // - Available in the shops only.
else if (!battle_config.atcommand_mobinfo_type && item_data->maxchance)
- sprintf(atcmd_output, msg_txt(1282), (float)item_data->maxchance / 100 ); // - Maximal monsters drop chance: %02.02f%%
+ sprintf(atcmd_output, msg_txt(sd->lang,1282), (float)item_data->maxchance / 100 ); // - Maximal monsters drop chance: %02.02f%%
else
- strcpy(atcmd_output, msg_txt(1283)); // - Monsters don't drop this item.
+ strcpy(atcmd_output, msg_txt(sd->lang,1283)); // - Monsters don't drop this item.
clif_displaymessage(fd, atcmd_output);
}
@@ -7204,32 +7204,32 @@
int i,j, count = 1;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1284)); // Please enter item name/ID (usage: @whodrops <item name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1284)); // Please enter item name/ID (usage: @whodrops <item name/ID>).
return -1;
}
if ((item_array[0] = itemdb_exists(atoi(message))) == NULL)
count = itemdb_searchname_array(item_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,19)); // Invalid item ID or name.
return -1;
}
if (count > MAX_SEARCH) {
- sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count); // Displaying first %d out of %d matches
+ sprintf(atcmd_output, msg_txt(sd->lang,269), MAX_SEARCH, count); // Displaying first %d out of %d matches
clif_displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
for (i = 0; i < count; i++) {
item_data = item_array[i];
- sprintf(atcmd_output, msg_txt(1285), item_data->jname,item_data->slot); // Item: '%s'[%d]
+ sprintf(atcmd_output, msg_txt(sd->lang,1285), item_data->jname,item_data->slot); // Item: '%s'[%d]
clif_displaymessage(fd, atcmd_output);
if (item_data->mob[0].chance == 0) {
- strcpy(atcmd_output, msg_txt(1286)); // - Item is not dropped by mobs.
+ strcpy(atcmd_output, msg_txt(sd->lang,1286)); // - Item is not dropped by mobs.
clif_displaymessage(fd, atcmd_output);
} else {
- sprintf(atcmd_output, msg_txt(1287), MAX_SEARCH); // - Common mobs with highest drop chance (only max %d are listed):
+ sprintf(atcmd_output, msg_txt(sd->lang,1287), MAX_SEARCH); // - Common mobs with highest drop chance (only max %d are listed):
clif_displaymessage(fd, atcmd_output);
for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++)
@@ -7255,7 +7255,7 @@
int i, j, k;
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1288)); // Please enter a monster name/ID (usage: @whereis <monster_name_or_monster_ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1288)); // Please enter a monster name/ID (usage: @whereis <monster_name_or_monster_ID>).
return -1;
}
@@ -7268,18 +7268,18 @@
count = mobdb_searchname_array(mob_array, MAX_SEARCH, message);
if (!count) {
- clif_displaymessage(fd, msg_txt(40)); // Invalid monster ID or name.
+ clif_displaymessage(fd, msg_txt(sd->lang,40)); // Invalid monster ID or name.
return -1;
}
if (count > MAX_SEARCH) {
- sprintf(atcmd_output, msg_txt(269), MAX_SEARCH, count);
+ sprintf(atcmd_output, msg_txt(sd->lang,269), MAX_SEARCH, count);
clif_displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
for (k = 0; k < count; k++) {
mob = mob_array[k];
- snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1289), mob->jname); // %s spawns in:
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd->lang,1289), mob->jname); // %s spawns in:
clif_displaymessage(fd, atcmd_output);
for (i = 0; i < ARRAYLENGTH(mob->spawn) && mob->spawn[i].qty; i++)
@@ -7290,7 +7290,7 @@
clif_displaymessage(fd, atcmd_output);
}
if (i == 0)
- clif_displaymessage(fd, msg_txt(1290)); // This monster does not spawn normally.
+ clif_displaymessage(fd, msg_txt(sd->lang,1290)); // This monster does not spawn normally.
}
return 0;
@@ -7301,10 +7301,10 @@
const char * revision;
if ((revision = get_svn_revision()) != 0) {
- sprintf(atcmd_output,msg_txt(1295),revision); // rAthena Version SVN r%s
+ sprintf(atcmd_output,msg_txt(sd->lang,1295),revision); // rAthena Version SVN r%s
clif_displaymessage(fd,atcmd_output);
} else
- clif_displaymessage(fd,msg_txt(1296)); // Cannot determine SVN revision.
+ clif_displaymessage(fd,msg_txt(sd->lang,1296)); // Cannot determine SVN revision.
return 0;
}
@@ -7339,7 +7339,7 @@
nullpo_ret(sd);
if (!message || !*message) {
- clif_displaymessage(fd, msg_txt(1297)); // Please enter a time in minutes (usage: @mutearea/@stfu <time in minutes>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1297)); // Please enter a time in minutes (usage: @mutearea/@stfu <time in minutes>).
return -1;
}
@@ -7360,16 +7360,16 @@
nullpo_ret(sd);
memset(buf, '\0', sizeof(buf));
- snprintf(buf, CHAT_SIZE_MAX, msg_txt(1298), // Experience rates: Base %.2fx / Job %.2fx
+ snprintf(buf, CHAT_SIZE_MAX, msg_txt(sd->lang,1298), // Experience rates: Base %.2fx / Job %.2fx
battle_config.base_exp_rate/100., battle_config.job_exp_rate/100.);
clif_displaymessage(fd, buf);
- snprintf(buf, CHAT_SIZE_MAX, msg_txt(1299), // Normal Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
+ snprintf(buf, CHAT_SIZE_MAX, msg_txt(sd->lang,1299), // Normal Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
battle_config.item_rate_common/100., battle_config.item_rate_heal/100., battle_config.item_rate_use/100., battle_config.item_rate_equip/100., battle_config.item_rate_card/100.);
clif_displaymessage(fd, buf);
- snprintf(buf, CHAT_SIZE_MAX, msg_txt(1300), // Boss Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
+ snprintf(buf, CHAT_SIZE_MAX, msg_txt(sd->lang,1300), // Boss Drop Rates: Common %.2fx / Healing %.2fx / Usable %.2fx / Equipment %.2fx / Card %.2fx
battle_config.item_rate_common_boss/100., battle_config.item_rate_heal_boss/100., battle_config.item_rate_use_boss/100., battle_config.item_rate_equip_boss/100., battle_config.item_rate_card_boss/100.);
clif_displaymessage(fd, buf);
- snprintf(buf, CHAT_SIZE_MAX, msg_txt(1301), // Other Drop Rates: MvP %.2fx / Card-Based %.2fx / Treasure %.2fx
+ snprintf(buf, CHAT_SIZE_MAX, msg_txt(sd->lang,1301), // Other Drop Rates: MvP %.2fx / Card-Based %.2fx / Treasure %.2fx
battle_config.item_rate_mvp/100., battle_config.item_rate_adddrop/100., battle_config.item_rate_treasure/100.);
clif_displaymessage(fd, buf);
@@ -7394,11 +7394,11 @@
return -1;
if (!message || !*message || sscanf(message, "%199[^\n]", tempmes) < 0) {
- clif_displaymessage(fd, msg_txt(1302)); // Please enter a message (usage: @me <message>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1302)); // Please enter a message (usage: @me <message>).
return -1;
}
- sprintf(atcmd_output, msg_txt(270), sd->status.name, tempmes); // *%s %s*
+ sprintf(atcmd_output, msg_txt(sd->lang,270), sd->status.name, tempmes); // *%s %s*
clif_disp_overhead(sd, atcmd_output);
return 0;
@@ -7427,7 +7427,7 @@
else if( size == SZ_BIG )
clif_specialeffect(&sd->bl,422,AREA);
- clif_displaymessage(fd, msg_txt(1303)); // Size change applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,1303)); // Size change applied.
return 0;
}
@@ -7457,7 +7457,7 @@
}
mapit_free(iter);
- clif_displaymessage(fd, msg_txt(1303)); // Size change applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,1303)); // Size change applied.
return 0;
}
@@ -7472,12 +7472,12 @@
memset(guild, '\0', sizeof(guild));
if( !message || !*message || sscanf(message, "%d %23[^\n]", &size, guild) < 2 ) {
- clif_displaymessage(fd, msg_txt(1304)); // Please enter guild name/ID (usage: @sizeguild <size> <guild name/ID>).
+ clif_displaymessage(fd, msg_txt(sd->lang,1304)); // Please enter guild name/ID (usage: @sizeguild <size> <guild name/ID>).
return -1;
}
if( (g = guild_searchname(guild)) == NULL && (g = guild_search(atoi(guild))) == NULL ) {
- clif_displaymessage(fd, msg_txt(94)); // Incorrect name/ID, or no one from the guild is online.
+ clif_displaymessage(fd, msg_txt(sd->lang,94)); // Incorrect name/ID, or no one from the guild is online.
return -1;
}
@@ -7498,7 +7498,7 @@
}
}
- clif_displaymessage(fd, msg_txt(1303)); // Size change applied.
+ clif_displaymessage(fd, msg_txt(sd->lang,1303)); // Size change applied.
return 0;
}
@@ -7512,10 +7512,10 @@
if (!sd->state.monster_ignore) {
sd->state.monster_ignore = 1;
- clif_displaymessage(sd->fd, msg_txt(1305)); // You are now immune to attacks.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1305)); // You are now immune to attacks.
} else {
sd->state.monster_ignore = 0;
- clif_displaymessage(sd->fd, msg_txt(1306)); // Returned to normal state.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1306)); // Returned to normal state.
}
return 0;
@@ -7534,23 +7534,23 @@
{
sd->fakename[0] = '\0';
clif_charnameack(0, &sd->bl);
- clif_displaymessage(sd->fd, msg_txt(1307)); // Returned to real name.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1307)); // Returned to real name.
return 0;
}
- clif_displaymessage(sd->fd, msg_txt(1308)); // You must enter a name.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1308)); // You must enter a name.
return -1;
}
if( strlen(message) < 2 )
{
- clif_displaymessage(sd->fd, msg_txt(1309)); // Fake name must be at least two characters.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1309)); // Fake name must be at least two characters.
return -1;
}
safestrncpy(sd->fakename, message, sizeof(sd->fakename));
clif_charnameack(0, &sd->bl);
- clif_displaymessage(sd->fd, msg_txt(1310)); // Fake name enabled.
+ clif_displaymessage(sd->fd, msg_txt(sd->lang,1310)); // Fake name enabled.
return 0;
}
@@ -7573,7 +7573,7 @@
memset(flag_name, '\0', sizeof(flag_name));
if (!message || !*message || (sscanf(message, "%99s %hd", flag_name, &flag) < 1)) {
- clif_displaymessage(sd->fd,msg_txt(1311)); // Enabled Mapflags in this map:
+ clif_displaymessage(sd->fd,msg_txt(sd->lang,1311)); // Enabled Mapflags in this map:
clif_displaymessage(sd->fd,"----------------------------------");
checkflag(autotrade); checkflag(allowks); checkflag(nomemo); checkflag(noteleport);
checkflag(noreturn); checkflag(monster_noteleport); checkflag(nosave); checkflag(nobranch);
@@ -7588,8 +7588,8 @@
checkflag(restricted); checkflag(nodrop); checkflag(novending); checkflag(loadevent);
checkflag(nochat); checkflag(partylock); checkflag(guildlock<