The-Fireplace-Minecraft-Mods / Grand-Exchange

A new take on Minecraft Multiplayer Marketplaces
GNU General Public License v2.0
3 stars 3 forks source link

Buying at a price above the price of a matching sell order destroys money #30

Closed Tophattingson closed 4 years ago

Tophattingson commented 4 years ago

Describe the bug X is a number greater than Y. Player 1 sells an item at price Y. Player 2 buys that item at price X. Player 2 loses X money, but Player 1 gains Y money. This destroys (X-Y) money. Player 1 recieves a notification claiming they sold it for X money, but they actually only gained Y money.

Example: I listed 1 cobblestone block at 50 each. Someone buys it with a buy order for 1 cobblestone block at 100 each. Player 1 recieves a notice claiming that they sold 1 cobblestone block at 100 each, but they only gain 50 to their balance. Player 2 has lost 100 of their balance.

To Reproduce

  1. Player 1 lists an item for sale.
  2. Player 2 tries to buy that same item but at a higher price.

Versions (please complete the following information, do NOT say "latest"):