From 5a76cb3b441a56b3e9cd43bc448b13a3cef48f8d Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Fri, 8 Apr 2022 19:36:43 -0700 Subject: [PATCH] fixed erronous log --- dGame/dGameMessages/GameMessages.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dGame/dGameMessages/GameMessages.cpp b/dGame/dGameMessages/GameMessages.cpp index d2dcc54b..1fd6de64 100644 --- a/dGame/dGameMessages/GameMessages.cpp +++ b/dGame/dGameMessages/GameMessages.cpp @@ -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()); }