Browse Source

Dropped ragsrvinfo functionality (#4301)

Jittapan Pluemsumran 5 years ago
parent
commit
bc15f5ce14

+ 0 - 1
conf/inter_athena.conf

@@ -116,7 +116,6 @@ skill_homunculus_db: skill_homunculus
 mercenary_db: mercenary
 mercenary_owner_db: mercenary_owner
 elemental_db: elemental
-ragsrvinfo_db: ragsrvinfo
 skillcooldown_db: skillcooldown
 bonus_script_db: bonus_script
 acc_reg_num_table: acc_reg_num

+ 0 - 12
sql-files/main.sql

@@ -986,18 +986,6 @@ CREATE TABLE IF NOT EXISTS `quest` (
   PRIMARY KEY  (`char_id`,`quest_id`)
 ) ENGINE=MyISAM;
 
---
--- Table structure for table `ragsrvinfo`
---
-
-CREATE TABLE IF NOT EXISTS `ragsrvinfo` (
-  `index` int(11) NOT NULL default '0',
-  `name` varchar(255) NOT NULL default '',
-  `exp` int(11) unsigned NOT NULL default '0',
-  `jexp` int(11) unsigned NOT NULL default '0',
-  `drop` int(11) unsigned NOT NULL default '0'
-) ENGINE=MyISAM;
-
 --
 -- Table structure for table `skill`
 --

+ 1 - 0
sql-files/upgrades/upgrade_20190815.sql

@@ -0,0 +1 @@
+DROP TABLE `ragsrvinfo`;

+ 1 - 10
src/char/char.cpp

@@ -2299,7 +2299,7 @@ bool char_checkdb(void){
 		schema_config.party_db, schema_config.pet_db, schema_config.friend_db, schema_config.mail_db, 
                 schema_config.auction_db, schema_config.quest_db, schema_config.homunculus_db, schema_config.skill_homunculus_db,
                 schema_config.mercenary_db, schema_config.mercenary_owner_db,
-		schema_config.elemental_db, schema_config.ragsrvinfo_db, schema_config.skillcooldown_db, schema_config.bonus_script_db,
+		schema_config.elemental_db, schema_config.skillcooldown_db, schema_config.bonus_script_db,
 		schema_config.clan_table, schema_config.clan_alliance_table, schema_config.mail_attachment_db, schema_config.achievement_table
 	};
 	ShowInfo("Start checking DB integrity\n");
@@ -2494,11 +2494,6 @@ bool char_checkdb(void){
 		Sql_ShowDebug(sql_handle);
 		return false;
 	}
-	//checking ragsrvinfo_db
-	if( SQL_ERROR == Sql_Query(sql_handle, "SELECT  `index`,`name`,`exp`,`jexp`,`drop` FROM `%s` LIMIT 1;", schema_config.ragsrvinfo_db) ){
-		Sql_ShowDebug(sql_handle);
-		return false;
-	}
 	//checking skillcooldown_db
 	if( SQL_ERROR == Sql_Query(sql_handle, "SELECT  `account_id`,`char_id`,`skill`,`tick` FROM `%s` LIMIT 1;", schema_config.skillcooldown_db) ){
 		Sql_ShowDebug(sql_handle);
@@ -2686,7 +2681,6 @@ void char_set_default_sql(){
 	safestrncpy(schema_config.skill_homunculus_db,"skill_homunculus",sizeof(schema_config.skill_homunculus_db));
 	safestrncpy(schema_config.mercenary_db,"mercenary",sizeof(schema_config.mercenary_db));
 	safestrncpy(schema_config.mercenary_owner_db,"mercenary_owner",sizeof(schema_config.mercenary_owner_db));
-	safestrncpy(schema_config.ragsrvinfo_db,"ragsrvinfo",sizeof(schema_config.ragsrvinfo_db));
 	safestrncpy(schema_config.skillcooldown_db,"skillcooldown",sizeof(schema_config.skillcooldown_db));
 	safestrncpy(schema_config.bonus_script_db,"bonus_script",sizeof(schema_config.bonus_script_db));
 	safestrncpy(schema_config.char_reg_num_table,"char_reg_num",sizeof(schema_config.char_reg_num_table));
@@ -3129,9 +3123,6 @@ void do_final(void)
 	do_final_chmapif();
 	do_final_chlogif();
 
-	if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s`", schema_config.ragsrvinfo_db) )
-		Sql_ShowDebug(sql_handle);
-
 	char_db_->destroy(char_db_, NULL);
 	online_char_db->destroy(online_char_db, NULL);
 	auth_db->destroy(auth_db, NULL);

+ 0 - 1
src/char/char.hpp

@@ -79,7 +79,6 @@ struct Schema_Config {
 	char skill_homunculus_db[DB_NAME_LEN];
 	char mercenary_db[DB_NAME_LEN];
 	char mercenary_owner_db[DB_NAME_LEN];
-	char ragsrvinfo_db[DB_NAME_LEN];
 	char elemental_db[DB_NAME_LEN];
 	char bonus_script_db[DB_NAME_LEN];
 	char acc_reg_num_table[DB_NAME_LEN];

+ 0 - 23
src/char/char_mapif.cpp

@@ -855,26 +855,6 @@ int chmapif_parse_reqdivorce(int fd){
 	return 1;
 }
 
-/**
- * Receive rates of this map index
- * @author [Wizputer]
- * @param fd: wich fd to parse from
- * @return : 0 not enough data received, 1 success
- */
-int chmapif_parse_updmapinfo(int fd){
-	if( RFIFOREST(fd) < 14 )
-		return 0;
-	else {
-		char esc_server_name[sizeof(charserv_config.server_name)*2+1];
-		Sql_EscapeString(sql_handle, esc_server_name, charserv_config.server_name);
-		if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d'",
-			schema_config.ragsrvinfo_db, fd, esc_server_name, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)) )
-			Sql_ShowDebug(sql_handle);
-		RFIFOSKIP(fd,14);
-	}
-	return 1;
-}
-
 /**
  *  Character disconnected set online 0
  * @author [Wizputer]
@@ -1442,7 +1422,6 @@ int chmapif_parse(int fd){
 			case 0x2b11: next=chmapif_parse_reqdivorce(fd); break;
 			case 0x2b13: next=chmapif_parse_updmapip(fd,id); break;
 			case 0x2b15: next=chmapif_parse_req_saveskillcooldown(fd); break;
-			case 0x2b16: next=chmapif_parse_updmapinfo(fd); break;
 			case 0x2b17: next=chmapif_parse_setcharoffline(fd); break;
 			case 0x2b18: next=chmapif_parse_setalloffline(fd,id); break;
 			case 0x2b19: next=chmapif_parse_setcharonline(fd,id); break;
@@ -1530,8 +1509,6 @@ void chmapif_server_reset(int id){
 		WBUFW(buf,2) = j * 4 + 10;
 		chmapif_sendallwos(fd, buf, WBUFW(buf,2));
 	}
-	if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `index`='%d'", schema_config.ragsrvinfo_db, map_server[id].fd) )
-		Sql_ShowDebug(sql_handle);
 	online_char_db->foreach(online_char_db,char_db_setoffline,id); //Tag relevant chars as 'in disconnected' server.
 	chmapif_server_destroy(id);
 	chmapif_server_init(id);

+ 0 - 1
src/char/char_mapif.hpp

@@ -28,7 +28,6 @@ int chmapif_parse_fwlog_changestatus(int fd);
 int chmapif_parse_updfamelist(int fd);
 void chmapif_send_ackdivorce(int partner_id1, int partner_id2);
 int chmapif_parse_reqdivorce(int fd);
-int chmapif_parse_updmapinfo(int fd);
 int chmapif_parse_setcharoffline(int fd);
 int chmapif_parse_setalloffline(int fd, int id);
 int chmapif_parse_setcharonline(int fd, int id);

+ 0 - 1
src/map/atcommand.cpp

@@ -3900,7 +3900,6 @@ ACMD_FUNC(reload) {
 		)
 		{	// Exp or Drop rates changed.
 			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(sd,255)); // Battle configuration has been reloaded.
 	} else if (strstr(command, "statusdb") || strncmp(message, "statusdb", 3) == 0) {

+ 1 - 27
src/map/chrif.cpp

@@ -43,7 +43,7 @@ static const int packet_len_table[0x3d] = { // U - used, F - free
 	60, 3,-1,-1,10,-1, 6,-1,	// 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff
 	 6,-1,18, 7,-1,39,30, 10,	// 2b00-2b07: U->2b00, U->2b01, U->2b02, U->2b03, U->2b04, U->2b05, U->2b06, U->2b07
 	 6,30, 10, -1,86, 7,44,34,	// 2b08-2b0f: U->2b08, U->2b09, U->2b0a, U->2b0b, U->2b0c, U->2b0d, U->2b0e, U->2b0f
-	11,10,10, 0,11, -1,266,10,	// 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, U->2b15, U->2b16, U->2b17
+	11,10,10, 0,11, -1, 0,10,	// 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, U->2b15, F->2b16, U->2b17
 	 2,10, 2,-1,-1,-1, 2, 7,	// 2b18-2b1f: U->2b18, U->2b19, U->2b1a, U->2b1b, U->2b1c, U->2b1d, U->2b1e, U->2b1f
 	-1,10, 8, 2, 2,14,19,19,	// 2b20-2b27: U->2b20, U->2b21, U->2b22, U->2b23, U->2b24, U->2b25, U->2b26, U->2b27
 	-1, 0, 6,15, 0, 6,-1,-1,	// 2b28-2b2f: U->2b28, F->2b29, U->2b2a, U->2b2b, F->2b2c, U->2b2d, U->2b2e, U->2b2f
@@ -80,7 +80,6 @@ static const int packet_len_table[0x3d] = { // U - used, F - free
 //2b13: Outgoing, chrif_update_ip -> 'tell the change of map-server IP'
 //2b14: Incoming, chrif_accountban -> 'not sure: kick the player with message XY'
 //2b15: Outgoing, chrif_skillcooldown_save -> request to save skillcooldown
-//2b16: Outgoing, chrif_ragsrvinfo -> 'sends base / job / drop rates ....'
 //2b17: Outgoing, chrif_char_offline -> 'tell the charserver that the char is now offline'
 //2b18: Outgoing, chrif_char_reset_offline -> 'set all players OFF!'
 //2b19: Outgoing, chrif_char_online -> 'tell the charserver that the char .. is online'
@@ -109,7 +108,6 @@ static const int packet_len_table[0x3d] = { // U - used, F - free
 
 int chrif_connected = 0;
 int char_fd = -1;
-int srvinfo;
 static char char_ip_str[128];
 static uint32 char_ip = 0;
 static uint16 char_port = 6121;
@@ -1449,24 +1447,6 @@ int chrif_skillcooldown_load(int fd) {
 	return 0;
 }
 
-/*==========================================
- * Send rates and motd to char server [Wizputer]
- * S 2b16 <base rate>.L <job rate>.L <drop rate>.L
- *------------------------------------------*/
-int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) {
-	chrif_check(-1);
-
-	WFIFOHEAD(char_fd,14);
-	WFIFOW(char_fd,0) = 0x2b16;
-	WFIFOL(char_fd,2) = base_rate;
-	WFIFOL(char_fd,6) = job_rate;
-	WFIFOL(char_fd,10) = drop_rate;
-	WFIFOSET(char_fd,14);
-
-	return 0;
-}
-
-
 /*=========================================
  * Tell char-server charcter disconnected [Wizputer]
  *-----------------------------------------*/
@@ -1915,12 +1895,6 @@ static TIMER_FUNC(check_connect_char_server){
 
 		chrif_connect(char_fd);
 		chrif_connected = (chrif_state == 2);
-		srvinfo = 0;
-	} else {
-		if (srvinfo == 0) {
-			chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);
-			srvinfo = 1;
-		}
 	}
 	if ( chrif_isconnected() )
 		displayed = 0;

+ 0 - 1
src/map/chrif.hpp

@@ -69,7 +69,6 @@ int chrif_req_login_operation(int aid, const char* character_name, enum chrif_re
 int chrif_updatefamelist(struct map_session_data *sd);
 int chrif_buildfamelist(void);
 int chrif_save_scdata(struct map_session_data *sd);
-int chrif_ragsrvinfo(int base_rate,int job_rate, int drop_rate);
 int chrif_char_offline(struct map_session_data *sd);
 int chrif_char_offline_nsd(uint32 account_id, uint32 char_id);
 int chrif_char_reset_offline(void);