Przeglądaj źródła

- Moved the auction time controls only on Char Servers.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12321 54d463be-8e91-2dee-dedb-b68131a5f0ec
zephyrus 17 lat temu
rodzic
commit
e8548adb44
2 zmienionych plików z 4 dodań i 3 usunięć
  1. 3 2
      src/char_sql/int_auction.c
  2. 1 1
      src/map/clif.c

+ 3 - 2
src/char_sql/int_auction.c

@@ -84,13 +84,14 @@ void auction_save(struct auction_data *auction)
 unsigned int auction_create(struct auction_data *auction)
 {
 	int j;
-
 	StringBuf buf;
 	SqlStmt* stmt;
 
 	if( !auction )
 		return false;
 
+	auction->timestamp = (int)calc_times + (auction->hours * 3600);
+
 	StringBuf_Init(&buf);
 	StringBuf_Printf(&buf, "INSERT INTO `%s` (`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,`price`,`buynow`,`hours`,`timestamp`,`nameid`,`item_name`,`type`,`refine`,`attribute`", auction_db);
 	for( j = 0; j < MAX_SLOTS; j++ )
@@ -114,7 +115,7 @@ unsigned int auction_create(struct auction_data *auction)
 	else
 	{
 		struct auction_data *auction_;
-		int tick = (auction->timestamp - (unsigned int)calc_times) * 1000;
+		int tick = auction->hours * 3600000;
 
 		auction->item.amount = 1;
 		auction->item.identify = 1;

+ 1 - 1
src/map/clif.c

@@ -11898,8 +11898,8 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)
 	auction.type = item->type;
 	memcpy(&auction.item, &sd->status.inventory[sd->auction.index], sizeof(struct item));
 	auction.item.amount = 1;
+	auction.timestamp = 0;
 
-	auction.timestamp = (int)mail_calctimes() + (auction.hours * 3600);
 	if( !intif_Auction_register(&auction) )
 		clif_Auction_message(fd, 4); // No Char Server? lets say something to the client
 	else