Jelajahi Sumber

Merge remote-tracking branch 'upstream/master'

Conflicts:
	src/char/char.c
	src/char/int_storage.c
lighta 11 tahun lalu
induk
melakukan
3585e700f2
2 mengubah file dengan 10 tambahan dan 4 penghapusan
  1. 2 2
      src/char/char.c
  2. 8 2
      src/char/int_storage.c

+ 2 - 2
src/char/char.c

@@ -347,7 +347,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p){
 			"`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d', `rename`='%d',"
 			"`delete_date`='%lu',`robe`='%d',`moves`='%d',`font`='%u'"
 			" WHERE `account_id`='%d' AND `char_id` = '%d'",
-			char_db, p->base_level, p->job_level,
+			schema_config.char_db, p->base_level, p->job_level,
 			p->base_exp, p->job_exp, p->zeny,
 			p->max_hp, p->hp, p->max_sp, p->sp, p->status_point, p->skill_point,
 			p->str, p->agi, p->vit, p->int_, p->dex, p->luk,
@@ -990,7 +990,7 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
 		"`hair_color`,`clothes_color`,`weapon`,`shield`,`head_top`,`head_mid`,`head_bottom`,`last_map`,`last_x`,`last_y`,"
 		"`save_map`,`save_x`,`save_y`,`partner_id`,`father`,`mother`,`child`,`fame`,`rename`,`delete_date`,`robe`, `moves`,"
 		"`unban_time`,`font`"
-		" FROM `%s` WHERE `char_id`=? LIMIT 1", char_db)
+		" FROM `%s` WHERE `char_id`=? LIMIT 1", schema_config.char_db)
 	||	SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0)
 	||	SQL_ERROR == SqlStmt_Execute(stmt)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 0,  SQLDT_INT,    &p->char_id, 0, NULL, NULL)

+ 8 - 2
src/char/int_storage.c

@@ -422,8 +422,14 @@ int mapif_parse_itembound_retrieve(int fd)
 	//Finally reload storage and tell map we're done
 	mapif_load_guild_storage(fd,aid,guild_id,0);
 
-	//If character is logged in char, disconnect
-	disconnect_player(aid);
+	//If character is logged in char, disconnect, 
+	/* @CHECKME [lighta]
+	 * I suppose this was an attempt to avoid item duplication if the expelled user reconnect during the operation.
+	 * well it's kinda ugly to expel someone like this, so I consider this as a hack.
+	 * we better flag them so that they not allowed to reconnect during operation or flag it so we will flush those item on ram with the map ack.
+	 * both way seem nicer for player.
+	 */
+	char_disconnect_player(aid);
 
 	//Tell map-server the operation is over and it can unlock the storage
 	mapif_itembound_ack(fd,aid,guild_id);