Merge branch 'master' into feat/postgresql-database

This commit is contained in:
P0nk
2024-02-04 15:12:14 +01:00
9 changed files with 53 additions and 11 deletions

View File

@@ -59,7 +59,7 @@ public final class NPCMoreTalkHandler extends AbstractPacketHandler {
if (p.available() >= 4) {
selection = p.readInt();
} else if (p.available() > 0) {
selection = p.readByte();
selection = p.readUnsignedByte();
}
if (c.getQM() != null) {
if (c.getQM().isStart()) {

View File

@@ -232,10 +232,10 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
return;
}
short flag = eq.getFlag();
flag |= ItemConstants.LOCK;
if (eq.getExpiration() > -1) {
if (eq.getExpiration() > -1 && (eq.getFlag() & ItemConstants.LOCK) != ItemConstants.LOCK) {
return; //No perma items pls
}
flag |= ItemConstants.LOCK;
eq.setFlag(flag);
long period = 0;
@@ -250,7 +250,8 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
}
if (period > 0) {
eq.setExpiration(currentServerTime() + DAYS.toMillis(period));
long expiration = eq.getExpiration() > -1 ? eq.getExpiration() : currentServerTime();
eq.setExpiration(expiration + DAYS.toMillis(period));
}
// double-remove found thanks to BHB