From c3aace1ccea0a80fb93f94513abeea147d03a407 Mon Sep 17 00:00:00 2001 From: kokekanon <114332266+kokekanon@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:18:54 -0300 Subject: [PATCH] fix: trade between players in canary 13.40 (#965) --- src/client/protocolcodes.h | 1 + src/client/protocolgame.h | 1 + src/client/protocolgameparse.cpp | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/src/client/protocolcodes.h b/src/client/protocolcodes.h index 957a07ffc..46e0c0e88 100644 --- a/src/client/protocolcodes.h +++ b/src/client/protocolcodes.h @@ -117,6 +117,7 @@ namespace Proto GameServerMissleEffect = 133, // Anthem on 13.x GameServerItemClasses = 134, GameServerTrappers = 135, + GameServerCloseForgeWindow = 137, GameServerCreatureData = 139, GameServerCreatureHealth = 140, GameServerCreatureLight = 141, diff --git a/src/client/protocolgame.h b/src/client/protocolgame.h index 3549e9bc2..2444df226 100644 --- a/src/client/protocolgame.h +++ b/src/client/protocolgame.h @@ -231,6 +231,7 @@ class ProtocolGame : public Protocol void parseCreatureMark(const InputMessagePtr& msg); void parseTrappers(const InputMessagePtr& msg); void addCreatureIcon(const InputMessagePtr& msg); + void parseCloseForgeWindow(const InputMessagePtr& msg); void parseCreatureData(const InputMessagePtr& msg); void parseCreatureHealth(const InputMessagePtr& msg); void parseCreatureLight(const InputMessagePtr& msg); diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 27ebb7c5d..caf257752 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -267,6 +267,9 @@ void ProtocolGame::parseMessage(const InputMessagePtr& msg) case Proto::GameServerTrappers: parseTrappers(msg); break; + case Proto::GameServerCloseForgeWindow: + parseCloseForgeWindow(msg); + break; case Proto::GameServerCreatureData: parseCreatureData(msg); break; @@ -1844,6 +1847,11 @@ void ProtocolGame::addCreatureIcon(const InputMessagePtr& msg) // TODO: implement creature icons usage } +void ProtocolGame::parseCloseForgeWindow(const InputMessagePtr& /*msg*/) +{ + g_lua.callGlobalField("g_game", "onCloseForgeCloseWindows"); +} + void ProtocolGame::parseCreatureData(const InputMessagePtr& msg) { const uint32_t creatureId = msg->getU32();