]> git.pond.sub.org Git - empserver/commit
Fix extension of market bidding time when high bidder changes
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 14 Jan 2013 19:59:04 +0000 (20:59 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 8 May 2013 04:57:55 +0000 (06:57 +0200)
commitc5f76e58534bd0760730863b729ce2bc3f054b76
tree1488cf6b25132be7b649cc8796af0940a48a4c52
parent9c78e724abec8a162bc71c92cb44c9eebf0fc010
Fix extension of market bidding time when high bidder changes

Lots stay on the market until there's a bid and bidding time expires.

When the highest bidder changes, and less than five minutes of bidding
time are left, it gets extended by five minutes (since 4.0.7, actually
works since 4.0.9).

Normally, this ensures that the competition has at least five minutes
to react.  Except when this is the first bid, bidding time may have
expired already.  If it expired less than five minutes ago, the
competition still gets time to react, just less than it should.  If it
expired earlier, the sale is executed immediately for units.  For
commodities, the bidding time is set to expire in five minutes (since
4.2.0).

Instead of extending bidding time by five minutes, set it to expire in
five minutes, both for commodities and for units.
src/lib/commands/buy.c
src/lib/commands/trad.c