fixed erronous log

This commit is contained in:
EmosewaMC 2022-04-08 19:36:43 -07:00
parent 92d36496df
commit 5a76cb3b44

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());
}