jopeek / fvtt-loot-sheet-npc-5e

FVTT - Loot Sheet NPC 5E
MIT License
44 stars 85 forks source link

Error calculating the balance of money #354

Closed 6elkir closed 2 years ago

6elkir commented 2 years ago

Describe the bug If a character with 0 money tries to make a purchase - everything is OK, an error "not enough money" is issued. However, if a character buys an item that costs 1 gold coin, and there are only 5 silver coins in his wallet, then a strange bug occurs - the price of the item is added to the player and the item is sold to him.

To Reproduce Steps to reproduce the behavior:

  1. Create default merchant
  2. Create default player token
  3. Open merchant and add item cost 1 Gold
  4. Set player money to 5 Silver
  5. Go to shop and try buy 1 item cost 1 gold from player who have 5 silver
  6. Bug

Screenshots Video demo here: https://share.dvor-net.ptz.ru/bgi7Hj3oPh.mp4

Desktop (please complete the following information):