From e320bafa8b792480a2bbba9043982cb55facf60f Mon Sep 17 00:00:00 2001 From: leevccc <94272011+leevccc@users.noreply.github.com> Date: Fri, 8 Sep 2023 04:59:56 +0800 Subject: [PATCH] fix: error flag after use karma setFalg() function is designed to take arguments of type short. Forcing the short type flag to be converted to the byte type causes some errors here. For example, the equipment merge system will make the UNTRADEABLE flag become 520, combined with the Scissors of Karma 16, and finally become 536, this value is beyond the byte range, and the mandatory variable type will cause the flag error, the specific problem I encountered is that the MERGE_UNTRADEABLE flag is lost after using the Scissors of Karma. --- .../java/client/inventory/manipulator/KarmaManipulator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/client/inventory/manipulator/KarmaManipulator.java b/src/main/java/client/inventory/manipulator/KarmaManipulator.java index 68cc77b5c5..660738ae25 100644 --- a/src/main/java/client/inventory/manipulator/KarmaManipulator.java +++ b/src/main/java/client/inventory/manipulator/KarmaManipulator.java @@ -43,7 +43,7 @@ public class KarmaManipulator { flag ^= karmaFlag; flag |= ItemConstants.UNTRADEABLE; - item.setFlag((byte) flag); + item.setFlag(flag); } } @@ -53,6 +53,6 @@ public class KarmaManipulator { flag |= karmaFlag; flag &= (0xFFFFFFFF ^ ItemConstants.UNTRADEABLE); - item.setFlag((byte) flag); + item.setFlag(flag); } }