]> git.pond.sub.org Git - empserver/commit
buy: Don't continue when lot changes while asking for bid
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 12 Jan 2021 20:42:42 +0000 (21:42 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jan 2021 07:39:14 +0000 (08:39 +0100)
commit1b677a4578ab5c5b8a40ff5101bee76ecef6f89e
treefc7ee5b4da357b06e93987ebd491a0aebc48a976
parente23e4cd73890ff764b68e4062cc589b7a6a1e2d5
buy: Don't continue when lot changes while asking for bid

When the lot being bid for changes while the player is at the "How
much" prompt, we report "Commodity #%d has changed!", and continue
with the changed lot.

If continuing is okay, we should keep quiet.  We did that until commit
40b11c098 "Fix buy not to wipe out concurrent updates", v4.3.27.  Okay
when only the lot's price changed.

However, the lot could have gone away, or even be reused for something
else.  Failing the command seems safest for the player, so do that.
It's how we use the check_FOO_ok() elsewhere.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/buy.c