From ff458981088fcd91a142dbf2cc76bc0ab55cbcbe Mon Sep 17 00:00:00 2001 From: Windyboy Date: Tue, 22 Oct 2024 17:12:31 +0800 Subject: [PATCH] Fix the issue where cash medals can't display correctly to other players. In GMSv83, the medal slot is -49, so the cash medal slot should be -149. Since the byte type in Java can't handle this value, simply adjusting it to a short type will resolve the problem. --- src/main/java/tools/PacketCreator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tools/PacketCreator.java b/src/main/java/tools/PacketCreator.java index e7ff75486e..20fe9ede87 100644 --- a/src/main/java/tools/PacketCreator.java +++ b/src/main/java/tools/PacketCreator.java @@ -303,7 +303,7 @@ private static void addCharEquips(final OutPacket p, Character chr) { Map myEquip = new LinkedHashMap<>(); Map maskedEquip = new LinkedHashMap<>(); for (Item item : ii) { - short pos = (byte) (item.getPosition() * -1); + short pos = (short) (item.getPosition() * -1); if (pos < 100 && myEquip.get(pos) == null) { myEquip.put(pos, item.getItemId()); } else if (pos > 100 && pos != 111) { // don't ask. o.o