Skip to content

Commit

Permalink
πŸš‘ changeOrderPrice+deal edge case
Browse files Browse the repository at this point in the history
DEV-940
  • Loading branch information
o4kapuk committed May 31, 2022
1 parent 9aa2e11 commit 78d980e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/processor/global-intents/market.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ module.exports = function({orders, userIntents, usersById, gameTime, roomObjects
return;
}

if (intent.newPrice > order.price) {
if(intent.newPrice != order.price) {
order._skip = true;
}

if (intent.newPrice > order.price) {
var fee = Math.ceil((intent.newPrice - order.price) * order.remainingAmount * C.MARKET_FEE);

if (user.money < fee) {
Expand Down

0 comments on commit 78d980e

Please sign in to comment.