NPCMoreTalkHandler: don't underflow selection
This commit is contained in:
1 parent
f63f7e13d4
commit
cb0320a471
1 file changed
+5
@@ -60,6 +60,11 @@ public final class NPCMoreTalkHandler extends AbstractPacketHandler {
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (c.getQM() != null) {
|
||||
if (c.getQM().isStart()) {
|
||||
|
||||
Reference in new issue
Block a user