From 94fbe6914592affed9a77c54299457c0bf6afd84 Mon Sep 17 00:00:00 2001 From: kokekanon <114332266+kokekanon@users.noreply.github.com> Date: Thu, 8 Aug 2024 23:48:31 -0400 Subject: [PATCH 1/2] undo 1340 --- data/setup.otml | 2 +- modules/gamelib/game.lua | 2 +- src/client/protocolgameparse.cpp | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/data/setup.otml b/data/setup.otml index 40aee2de22..c165a1f9e1 100644 --- a/data/setup.otml +++ b/data/setup.otml @@ -1,6 +1,6 @@ game sprite-size: 32 - last-supported-version: 1332 + last-supported-version: 1340 draw-typing: false typing-icon: /images/game/console/typing diff --git a/modules/gamelib/game.lua b/modules/gamelib/game.lua index 03a173ece9..c7624fa2dd 100644 --- a/modules/gamelib/game.lua +++ b/modules/gamelib/game.lua @@ -58,7 +58,7 @@ function g_game.getSupportedClients() 1012, 1013, 1020, 1021, 1022, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1080, 1081, 1082, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1281, 1285, - 1286, 1287, 1291, 1300, 1310, 1311, 1314, 1316, 1320, 1321, 1322, 1332 } + 1286, 1287, 1291, 1300, 1310, 1311, 1314, 1316, 1320, 1321, 1322, 1332 , 1340} end -- The client version and protocol version where diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 33b26aaf4a..17258c2799 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -1156,6 +1156,16 @@ void ProtocolGame::parseOpenContainer(const InputMessagePtr& msg) msg->getU8(); } } + if (g_game.getClientVersion() >= 1340) { + if (containerItem->isMoveable()) { + msg->getU8(); + }else{ + msg->getU8(); + } + + + msg->getU8(); + } g_game.processOpenContainer(containerId, containerItem, name, capacity, hasParent, items, isUnlocked, hasPages, containerSize, firstIndex); } From 1ddc3426dad317edcc380edd262828a3a5f45495 Mon Sep 17 00:00:00 2001 From: kokekanon <114332266+kokekanon@users.noreply.github.com> Date: Thu, 8 Aug 2024 23:51:09 -0400 Subject: [PATCH 2/2] test --- src/client/protocolgameparse.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 17258c2799..6cc3366a91 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -1162,9 +1162,8 @@ void ProtocolGame::parseOpenContainer(const InputMessagePtr& msg) }else{ msg->getU8(); } - - - msg->getU8(); + + msg->getU8(); // // if (container->getHoldingPlayer()) { // Player holding the item (?) } g_game.processOpenContainer(containerId, containerItem, name, capacity, hasParent, items, isUnlocked, hasPages, containerSize, firstIndex);