summaryrefslogtreecommitdiff
path: root/src/char_sql/int_auction.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-07 21:41:53 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-07 21:41:53 +0000
commit90f8f6d479f7e18ad1db774dcab46224823a7d3e (patch)
treeead37936300558353ead0131ca3b5077c44b4b47 /src/char_sql/int_auction.c
parent5f8b46c05a7d4970d9fcb30a29ddc3a5489b11a1 (diff)
downloadhercules-90f8f6d479f7e18ad1db774dcab46224823a7d3e.tar.gz
hercules-90f8f6d479f7e18ad1db774dcab46224823a7d3e.tar.bz2
hercules-90f8f6d479f7e18ad1db774dcab46224823a7d3e.tar.xz
hercules-90f8f6d479f7e18ad1db774dcab46224823a7d3e.zip
- Moved the auction time controls only on Char Servers.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12321 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_auction.c')
-rw-r--r--src/char_sql/int_auction.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c
index dc915e8c1..cf50d94c8 100644
--- a/src/char_sql/int_auction.c
+++ b/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;