summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-07 16:26:39 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-07 16:26:39 +0000
commit6b93f724139c3ab1e74c68ce79a79ecb525848f8 (patch)
treed83e963380e920209137d3b0447e70da1c32aee3 /src
parentb2a3f263ac9af5b212682f6e540cad1ec604487b (diff)
downloadhercules-6b93f724139c3ab1e74c68ce79a79ecb525848f8.tar.gz
hercules-6b93f724139c3ab1e74c68ce79a79ecb525848f8.tar.bz2
hercules-6b93f724139c3ab1e74c68ce79a79ecb525848f8.tar.xz
hercules-6b93f724139c3ab1e74c68ce79a79ecb525848f8.zip
- Added some debug messages to test Auctions.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12317 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char_sql/int_auction.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c
index a04aacaf3..f8adfddd2 100644
--- a/src/char_sql/int_auction.c
+++ b/src/char_sql/int_auction.c
@@ -114,12 +114,14 @@ static bool auction_create(struct auction_data *auction)
else
{
struct auction_data *auction_;
+ int tick = (auction->timestamp - (unsigned int)calc_times) * 1000;
auction->item.amount = 1;
auction->item.identify = 1;
auction->auction_id = (unsigned int)SqlStmt_LastInsertId(stmt);
- auction->auction_end_timer = add_timer( gettick() + ((auction->timestamp - (unsigned int)calc_times) * 1000) , auction_end_timer, auction->auction_id, 0);
+ auction->auction_end_timer = add_timer( gettick() + tick , auction_end_timer, auction->auction_id, 0);
+ ShowInfo("New Auction Created: id %u | time left %d ms | Created by %s.\n", auction->auction_id, tick, auction->seller_name);
CREATE(auction_, struct auction_data, 1);
memcpy(auction_, auction, sizeof(struct auction_data));
@@ -182,6 +184,8 @@ static int auction_end_timer(int tid, unsigned int tick, int id, int data)
mapif_Mail_new(&msg);
}
+ ShowInfo("Auction End: id %u.\n", auction->auction_id);
+
auction->auction_end_timer = -1;
auction_delete(auction);
}