Merge pull request #495 from EmosewaMC/hello-there-obiwan

fixed out of context log for launching to properties
This commit is contained in:
David Markowitz 2022-04-08 19:37:36 -07:00 committed by GitHub
commit 39089284ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3238,12 +3238,12 @@ void GameMessages::HandleClientTradeRequest(RakNet::BitStream* inStream, Entity*
void GameMessages::HandleClientTradeCancel(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr)
{
Game::logger->Log("GameMessages", "Trade canceled from (%llu)\n", entity->GetObjectID());
auto* trade = TradingManager::Instance()->GetPlayerTrade(entity->GetObjectID());
if (trade == nullptr) return;
Game::logger->Log("GameMessages", "Trade canceled from (%llu)\n", entity->GetObjectID());
TradingManager::Instance()->CancelTrade(trade->GetTradeId());
}