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, 1334, 1336, 1337, 1340}
end

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

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

const uint8_t size = msg->getU8();
uint16_t size = 0;
if (g_game.getClientVersion() >= 1334) {
size = msg->getU16();
} else {
size = msg->getU8();
}

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

Expand Down Expand Up @@ -1797,7 +1807,7 @@
}
}

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

Check warning on line 1810 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 1810 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
8 changes: 7 additions & 1 deletion src/client/thingtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ enum ITEM_CATEGORY : uint8_t
ITEM_CATEGORY_WANDS_RODS = 21,
ITEM_CATEGORY_PREMIUM_SCROLLS = 22,
ITEM_CATEGORY_TIBIA_COINS = 23,
ITEM_CATEGORY_CREATURE_PRODUCTS = 24
ITEM_CATEGORY_CREATURE_PRODUCTS = 24,
ITEM_CATEGORY_QUIVER = 25,
ITEM_CATEGORY_TWOHANDWEAPON = 26,
ITEM_CATEGORY_HELMETS = 27,
ITEM_CATEGORY_BACKPACK = 28,
ITEM_CATEGORY_ONEHANDWEAPON = 29,
ITEM_CATEGORY_ARROW = 30
};

enum SpriteMask :uint8_t
Expand Down
8 changes: 7 additions & 1 deletion src/protobuf/appearances.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading