Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: compatibility with 13.40 #840

Merged
merged 14 commits into from
Aug 13, 2024
2 changes: 1 addition & 1 deletion data/setup.otml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion modules/gamelib/game.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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}
kokekanon marked this conversation as resolved.
Show resolved Hide resolved
end

-- The client version and protocol version where
Expand Down
17 changes: 16 additions & 1 deletion src/client/protocolgameparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,15 @@
msg->getU8();
}
}
if (g_game.getClientVersion() >= 1340) {
if (containerItem->isMoveable()) {
msg->getU8();
}else{
msg->getU8();
}

msg->getU8(); // // if (container->getHoldingPlayer()) { // Player holding the item (?)
}
kokekanon marked this conversation as resolved.
Show resolved Hide resolved

g_game.processOpenContainer(containerId, containerItem, name, capacity, hasParent, items, isUnlocked, hasPages, containerSize, firstIndex);
}
Expand Down Expand Up @@ -1274,7 +1283,13 @@
}
}

const uint8_t size = msg->getU8();
uint16_t size = 0;
if (g_game.getClientVersion() >= 1340) {
kokekanon marked this conversation as resolved.
Show resolved Hide resolved
size = msg->getU16();
} else {
size = msg->getU8();
}

for (auto i = -1; ++i < size;) {
const uint16_t itemId = msg->getU16();

Expand Down Expand Up @@ -1576,7 +1591,7 @@
}
}

void ProtocolGame::addCreatureIcon(const InputMessagePtr& msg, const CreaturePtr& creature) {

Check warning on line 1594 in src/client/protocolgameparse.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-debug

unused parameter ‘creature’ [-Wunused-parameter]

Check warning on line 1594 in src/client/protocolgameparse.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-24.04-linux-debug

unused parameter ‘creature’ [-Wunused-parameter]
const uint8_t sizeIcons = msg->getU8();
for (auto i = 0; i < sizeIcons; ++i) {
msg->getU8(); // icon.serialize()
Expand Down
Loading