Skip to content

Commit

Permalink
* Fix market offer creation fee
Browse files Browse the repository at this point in the history
  • Loading branch information
jprzimba committed Jan 16, 2025
1 parent 1e89cd9 commit 4d9b7c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9064,8 +9064,7 @@ void Game::playerCreateMarketOffer(uint32_t playerId, uint8_t type, uint16_t ite
uint64_t fee = std::clamp(totalFee, uint64_t(20), maxFee); // Limit between 20 and maxFee

if (type == MARKETACTION_SELL) {
uint64_t totalPriceWithFee = totalPrice + fee;
if (totalPriceWithFee > (player->getMoney() + player->getBankBalance())) {
if (fee > (player->getMoney() + player->getBankBalance())) {
offerStatus << "Fee is greater than player money";
return;
}
Expand Down

0 comments on commit 4d9b7c0

Please sign in to comment.