Skip to content

Commit

Permalink
Fix the issue where cash medals can't display correctly to other play…
Browse files Browse the repository at this point in the history
…ers.

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.
  • Loading branch information
v3921358 committed Oct 22, 2024
1 parent a5b5720 commit ff45898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/tools/PacketCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ private static void addCharEquips(final OutPacket p, Character chr) {
Map<Short, Integer> myEquip = new LinkedHashMap<>();
Map<Short, Integer> 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
Expand Down

0 comments on commit ff45898

Please sign in to comment.