implement ByteBufInPacket.readUnsignedByte

This commit is contained in:
yuzumika
2024-01-04 10:55:07 -08:00
parent cb0320a471
commit 5a4200cc8e
3 changed files with 4 additions and 6 deletions

View File

@@ -59,12 +59,7 @@ public final class NPCMoreTalkHandler extends AbstractPacketHandler {
if (p.available() >= 4) {
selection = p.readInt();
} else if (p.available() > 0) {
selection = p.readByte();
// If there are more than 127 choices, don't underflow to -128.
// This is useful if you want to have more than 127 hairs/faces at a stylist NPC.
if (selection < 0) {
selection += 256;
}
selection = p.readUnsignedByte();
}
if (c.getQM() != null) {
if (c.getQM().isStart()) {