DiscoveryGC / FLHook

FLHook for Discovery Freelancer
Other
28 stars 33 forks source link

base: fix for shop bug with minstock (fixed 12.10.20) #129

Closed dd84ai closed 3 years ago

dd84ai commented 4 years ago

We discussed it before, this is what you suggested Alex.

Better description: there is bug that anyone can buy goods more than minstock allows. By taking into account how much 'customer' requested, the amount of goods will be never lower than minstock amount.

dd84ai commented 4 years ago

Added description and brackets

dsyalex commented 4 years ago

base->market_items[gbi.iGoodID].min_stock > base->market_items[gbi.iGoodID].quantity - count there is still ambiguity here, both > and - in use without brackets

dd84ai commented 4 years ago

I get it. in case if the result of > operation can be casted into int and becoming 0 - 1 value used for subtracting operation.

dd84ai commented 4 years ago

fixed

dd84ai commented 3 years ago

Looks good but we now need to also take care of the check on line 1671

fixed