Skip to content

Commit

Permalink
fix: message store error
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Sep 14, 2024
1 parent 88c7fab commit aea8b5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9073,7 +9073,7 @@ void Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16
return;
}

if (player == buyerPlayer || player->getAccount() == buyerPlayer->getAccount()) {
if (player == buyerPlayer || player->getAccountId() == buyerPlayer->getAccountId()) {
player->sendTextMessage(MESSAGE_MARKET, "You cannot accept your own offer.");
return;
}
Expand Down Expand Up @@ -9170,7 +9170,7 @@ void Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16
return;
}

if (player == sellerPlayer || player->getAccount() == sellerPlayer->getAccount()) {
if (player == sellerPlayer || player->getAccountId() == sellerPlayer->getAccountId()) {
player->sendTextMessage(MESSAGE_MARKET, "You cannot accept your own offer.");
return;
}
Expand Down Expand Up @@ -10571,6 +10571,7 @@ void Game::playerCoinTransfer(uint32_t playerId, std::string receptorName, uint3
}

if (playerDonator == playerReceptor || playerDonator->getAccountId() == playerReceptor->getAccountId()) {
playerDonator->sendStoreError(StoreErrors_t::TRANSFER, "You cannot gift Tibia Coins to characters of your own account.");
return;
}

Expand Down

0 comments on commit aea8b5c

Please sign in to comment.