Explorar o código

* Added @showrate to disable/enable the message of rate information when VIP is enabled. (Someone mention about this, I think the message has posibility will be annoying).
* Added 'vip_disp_rate' at player.conf to set the message of rate information is displayed or not by default.
* Added 'disp_serverbank_msg' at misc.conf to hide "login-serv has been asked to %s the player '%.*s'." message.
* Updated map_msg.conf and map_msg_idn.conf

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>

Cydh Ramdh %!s(int64=11) %!d(string=hai) anos
pai
achega
31d97129f8

+ 3 - 0
conf/battle/misc.conf

@@ -135,3 +135,6 @@ mon_trans_disable_in_gvg: no
 // 2 = Point shops
 // 3 = Item & point shops
 discount_item_point_shop: 0
+
+// Don't display message "login-serv has been asked to %s the player '%.*s'." (Note 1)
+disp_serverbank_msg: no

+ 3 - 0
conf/battle/player.conf

@@ -196,3 +196,6 @@ vip_drop_increase: 50
 // Can the VIP Group ignore Gemstone requirement for skills?
 // Default: yes
 vip_gemstone: yes
+
+// Will display rate information (EXP, Drop, and Death penalty message)? (Note 1)
+vip_disp_rate: yes

+ 13 - 4
conf/msg_conf/map_msg.conf

@@ -408,7 +408,7 @@
 387: The chosen emblem was detected invalid as it contain too much transparency (limit=%d)
 //etc
 388: You cannot use this item while storage is open.
-//389-389 free
+//389 free
 //NoAsk
 390: Autorejecting is activated.
 391: Autorejecting is deactivated.
@@ -504,34 +504,38 @@
 410: Removed %d cash points. Total %d points.
 411: Removed %d kafra points. Total %d points.
 
-// Trade Spoof Messages
+// Char ban
 507: This player has been banned for %d minute(s).
 508: This player hasn't been banned (Ban option is disabled).
 
 509: Script-bound commands:
 
 // mail system
-//----------------------
 510: You have %d new emails (%d unread)
 
 // Instancing
 515: Your instance has been reloaded.
 516: Instance database has been reloaded.
 
+//517~534: free
+
 // Bot detect messages (currently unused)
 535: Possible use of BOT (99%% of chance) or modified client by '%s' (account: %d, char_id: %d). This player ask your name when you are hidden.
 536: Character '%s' (account: %d) is trying to use a bot (it tries to detect a fake player).
 537: Character '%s' (account: %d) is trying to use a bot (it tries to detect a fake mob).
+
 // Trade Spoof Messages
 538: Hack on trade: character '%s' (account: %d) try to trade more items that he has.
 539: This player has %d of a kind of item (id: %d), and tried to trade %d of them.
 540: This player has been definitivly blocked.
+
 // Rare Items Drop/Steal announce
 541: '%s' got %s's %s (chance: %0.02f%%)
 //541: %.0s%.0sSomeone got %s
 542: '%s' stole %s's %s (chance: %0.02f%%)
 //542: %.0s%.0sSomeone stole %s
 // 543~548 are not used (previously @away messages)
+
 // @Autotrade
 549: You should have a shop open to use @autotrade.
 
@@ -720,7 +724,12 @@
 
 //Item Group
 717: [%s] has won [%s] from '%s'
-//718-899 free
+
+//@showrate
+718: Personal rate information is not displayed now.
+719: Personal rate information will be shown.
+
+//720-899 free
 
 //------------------------------------
 // More atcommands message

+ 15 - 3
conf/msg_conf/map_msg_idn.conf

@@ -406,7 +406,9 @@
 385: Kamu tidak diizinkan untuk mengubah emblem ketika WOE.
 386: Emblem yang dipilih tidak bisa digunakan
 387: Emblem yang dipilih tidak bisa digunakan karena terlalu banyak transparency (batas=%d)
-//388-389 kosong
+//lainnya
+388: Kamu tidak bis menggunakan item ini ketika storage sedang dibuka.
+//389 kosong
 //NoAsk
 390: Penolakan otomatis diaktifkan.
 391: Penolakan otomatis ditidakaktifkan.
@@ -502,9 +504,11 @@
 410: %d cash poin sudah dipakai. Total %d poin.
 411: %d kafra poin sudah dipakai. Total %d poin.
 
+// Char ban
 507: Pemain ini sudah dihukum selama %d menit.
 508: Pemain ini tidak dapat dihukum (Hukuman dinonaktifkan).
-//509 kosong
+
+509: Script-bound commands:
 
 // Sistem surat (e-mail)
 510: Kamu memiliki %d pesan baru (ada %d pesan yang belum dibaca)
@@ -513,6 +517,8 @@
 515: Intance kamu sudha dimuat ulang.
 516: Database Instance sudah dimuat ulang.
 
+//517~534: kosong
+
 // Pesan yang berhubungan dengan deteksi Bot (Saat ini belum diimplementasikan)
 535: Kemungkinan BOT (99%%) atau client yang digunakan sudah dimodifikasi '%s' (akun: %d, char_id: %d). Pemain ini bisa melihat nama kamu saat kamu sedang tidak terlihat.
 536: Karakter '%s' (akun: %d) sedang mencoba menggunakan bot (Pemain ini sedang mencoba mendeteksi pemain umpan).
@@ -529,6 +535,7 @@
 542: '%s' mencuri %s's %s (Kemungkinan: %0.02f%%)
 //542: %.0s%.0sSeseorang mencuri %s
 // 543~548 tidak dipakai (sebelumnya merupakan pesan @away)
+
 // @Autotrade
 549: Kamu harus membuka sebuah toko dulu sebelum menggunakan @autotrade.
 
@@ -691,6 +698,7 @@
 693: Shadow Chaser T
 694: Hanbok
 695: Rebellion
+696: Oktoberfest
 
 // @vip
 700: Penggunaan: @vip <waktu> <nama pemain>
@@ -716,8 +724,12 @@
 
 //Item Group
 717: [%s] mendapatkan [%s] dari '%s'
-//718-899 kosong
 
+//@showrate
+718: Informasi mengenai rate pribadi tidak akan ditampilkan lagi.
+719: Informasi mengenai rate pribadi akan ditampilkan kembali.
+
+//720-899 kosong
 
 //------------------------------------
 // Pesan dalam perintah atcommand

+ 7 - 0
doc/atcommands.txt

@@ -298,6 +298,13 @@ prontera (x= 165, y= 198) 01 00 00 00 00
 
 ---------------------------------------
 
+@showrate
+
+When VIP is enabled, the rate information always be shown when every player load map.
+Use this command to disable or enable that rate information.
+
+---------------------------------------
+
 ========================
 | 2. Database Commands |
 ========================

+ 1 - 1
src/login/login.c

@@ -506,7 +506,7 @@ int chrif_sendvipdata(int fd, struct mmo_account acc, char isvip, int mapfd) {
 	WFIFOHEAD(fd,19);
 	WFIFOW(fd,0) = 0x2743;
 	WFIFOL(fd,2) = acc.account_id;
-	WFIFOL(fd,6) = acc.vip_time;
+	WFIFOL(fd,6) = (int)acc.vip_time;
 	WFIFOB(fd,10) = isvip;
 	WFIFOL(fd,11) = acc.group_id; //new group id
 	WFIFOL(fd,15) = mapfd; //link to mapserv

+ 17 - 1
src/map/atcommand.c

@@ -9233,7 +9233,7 @@ ACMD_FUNC(vip) {
 		int year,month,day,hour,minute,second;
 		char timestr[21];
 		
-		split_time(pl_sd->vip.time-now,&year,&month,&day,&hour,&minute,&second);
+		split_time((int)(pl_sd->vip.time-now),&year,&month,&day,&hour,&minute,&second);
 		sprintf(atcmd_output,msg_txt(pl_sd,705),year,month,day,hour,minute); // Your VIP status is valid for %d years, %d months, %d days, %d hours and %d minutes.
 		clif_displaymessage(pl_sd->fd,atcmd_output);
 		timestamp2string(timestr,20,pl_sd->vip.time,"%Y-%m-%d %H:%M");
@@ -9250,6 +9250,21 @@ ACMD_FUNC(vip) {
 	chrif_req_login_operation(pl_sd->status.account_id, pl_sd->status.name, 6, vipdifftime, 7, 0); 
 	return 0;
 }
+
+/** Enable/disable rate info */
+ACMD_FUNC(showrate) {
+	nullpo_retr(-1,sd);
+	if (!sd->disableshowrate) {
+		sprintf(atcmd_output,msg_txt(sd,718)); //Personal rate information is not displayed now.
+		sd->disableshowrate = 1;
+	}
+	else {
+		sprintf(atcmd_output,msg_txt(sd,719)); //Personal rate information will be shown.
+		sd->disableshowrate = 0;
+	}
+	clif_displaymessage(fd,atcmd_output);
+	return 0;
+}
 #endif
 
 ACMD_FUNC(fullstrip) {
@@ -9559,6 +9574,7 @@ void atcommand_basecommands(void) {
 		ACMD_DEF(langtype),
 #ifdef VIP_ENABLE
 		ACMD_DEF(vip),
+		ACMD_DEF(showrate),
 #endif
 		ACMD_DEF(fullstrip),
 	};

+ 2 - 0
src/map/battle.c

@@ -7333,6 +7333,7 @@ static const struct _battle_data {
 	{ "vip_bm_increase",                    &battle_config.vip_bm_increase,                 0,      0,      INT_MAX,        },
 	{ "vip_drop_increase",                  &battle_config.vip_drop_increase,               0,      0,      INT_MAX,        },
 	{ "vip_gemstone",                       &battle_config.vip_gemstone,                    0,      0,      1,              },
+	{ "vip_disp_rate",                      &battle_config.vip_disp_rate,                   1,      0,      1,              },
 	{ "mon_trans_disable_in_gvg",           &battle_config.mon_trans_disable_in_gvg,        0,      0,      1,              },
 	{ "homunculus_S_growth_level",          &battle_config.hom_S_growth_level,             99,      0,      MAX_LEVEL,      },
 	{ "emblem_woe_change",                  &battle_config.emblem_woe_change,               0,      0,      1,              },
@@ -7343,6 +7344,7 @@ static const struct _battle_data {
 	{ "feature.autotrade",					&battle_config.feature_autotrade,				1,		0,		1,				},
 	{ "feature.autotrade_direction",		&battle_config.feature_autotrade_direction,		4,		0,		7,				},
 	{ "feature.autotrade_sit",				&battle_config.feature_autotrade_sit,			1,		0,		1,				},
+	{ "disp_serverbank_msg",				&battle_config.disp_serverbank_msg,				0,		0,		1,				},
 };
 #ifndef STATS_OPT_OUT
 /**

+ 2 - 0
src/map/battle.h

@@ -514,12 +514,14 @@ extern struct Battle_Config
 	int vip_exp_penalty_base;
 	int vip_exp_penalty_job_normal;
 	int vip_exp_penalty_job;
+	int vip_disp_rate;
 	int mon_trans_disable_in_gvg;
 	int emblem_woe_change;
 	int emblem_transparency_limit;
 	int discount_item_point_shop;
 	int update_enemy_position;
 	int devotion_rdamage;
+	int disp_serverbank_msg;
 
 	// autotrade persistency
 	int feature_autotrade;

+ 9 - 5
src/map/chrif.c

@@ -879,7 +879,7 @@ int chrif_changesex(struct map_session_data *sd) {
  * @param aid : player account id the request was concerning
  * @param player_name : name the request was concerning
  * @param type : code of operation done:
- *   1: block, 2: ban, 3: unblock, 4: unban, 5: changesex, 6:vip
+ *   1: block, 2: ban, 3: unblock, 4: unban, 5: changesex, 6: vip, 7: bank
  * @param awnser : type of anwser \n
  *   0: login-server request done \n
  *   1: player not found \n
@@ -897,16 +897,20 @@ static void chrif_ack_login_req(int aid, const char* player_name, uint16 type, u
 		ShowError("chrif_ack_login_req failed - player not online.\n");
 		return;
 	}
-
+	
 	if( type > 0 && type <= 5 )
 		snprintf(action,25,"%s",msg_txt(sd,427+type)); //block|ban|unblock|unban|change the sex of
-	else if( type==6) snprintf(action,25,"%s","vip"); //TODO make some place for those type in msg_conf
-	else if( type==7) snprintf(action,25,"%s","bank");
+	else if(type==6) snprintf(action,25,"%s","vip"); //TODO make some place for those type in msg_conf
+	else if(type==7){
+		if (!battle_config.disp_serverbank_msg)
+			return;
+		snprintf(action,25,"%s","bank");
+	}
 	else
 		snprintf(action,25,"???");
 
 	switch( answer ) {
-		case 0 : sprintf(output, msg_txt(sd,424), action, NAME_LENGTH, player_name); break; //%s has been asked to %s the player '%.*s'.
+		case 0 : sprintf(output, msg_txt(sd,424), action, NAME_LENGTH, player_name); break; //login-serv has been asked to %s the player '%.*s'.
 		case 1 : sprintf(output, msg_txt(sd,425), NAME_LENGTH, player_name); break;
 		case 2 : sprintf(output, msg_txt(sd,426), action, NAME_LENGTH, player_name); break;
 		case 3 : sprintf(output, msg_txt(sd,427), action, NAME_LENGTH, player_name); break;

+ 4 - 2
src/map/clif.c

@@ -9672,8 +9672,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
 		clif_equipcheckbox(sd);
 #endif
 #ifdef VIP_ENABLE
-		clif_display_pinfo(sd,ZC_PERSONAL_INFOMATION);
-		//clif_vip_display_info(sd,ZC_PERSONAL_INFOMATION_CHN);
+		if (!sd->disableshowrate) {
+			clif_display_pinfo(sd,ZC_PERSONAL_INFOMATION);
+			//clif_vip_display_info(sd,ZC_PERSONAL_INFOMATION_CHN);
+		}
 #endif
 		if( (battle_config.bg_flee_penalty != 100 || battle_config.gvg_flee_penalty != 100) &&
 			(map_flag_gvg(sd->state.pmap) || map_flag_gvg(sd->bl.m) || map[sd->state.pmap].flag.battleground || map[sd->bl.m].flag.battleground) )

+ 4 - 0
src/map/pc.c

@@ -1056,6 +1056,10 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
 		sd->state.showexp = 1;
 	if (battle_config.disp_zeny)
 		sd->state.showzeny = 1;
+#ifdef VIP_ENABLE
+	if (!battle_config.vip_disp_rate)
+		sd->disableshowrate = 1;
+#endif
 
 	if (!(battle_config.display_skill_fail&2))
 		sd->state.showdelay = 1;

+ 2 - 1
src/map/pc.h

@@ -571,7 +571,8 @@ struct map_session_data {
 
 	int storage_size; /// Holds player storage size (VIP system).
 #ifdef VIP_ENABLE
-	struct vip_info  vip;
+	struct vip_info vip;
+	bool disableshowrate; //State to disable clif_display_pinfo(). [Cydh]
 #endif
 	///Timed bonus 'bonus_script' struct [Cydh]
 	struct s_script {

+ 1 - 1
src/map/script.c

@@ -18131,7 +18131,7 @@ BUILDIN_FUNC(vip_status) {
 			if (pc_isvip(sd)) {
 				time_t viptime_remain = sd->vip.time - now;
 				int year=0,month=0,day=0,hour=0,min=0,sec=0;
-				split_time(viptime_remain,&year,&month,&day,&hour,&min,&sec);
+				split_time((int)viptime_remain,&year,&month,&day,&hour,&min,&sec);
 				safesnprintf(vip_str,sizeof(vip_str),"%d-%d-%d %d:%d",year,month,day,hour,min);
 				script_pushstrcopy(st, vip_str);
 			} else