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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user