Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ceb2866aa1 | ||
|
|
08b089d9be | ||
|
|
8b254a294e |
@@ -228,10 +228,10 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
short flag = eq.getFlag();
|
short flag = eq.getFlag();
|
||||||
flag |= ItemConstants.LOCK;
|
if (eq.getExpiration() > -1 && (eq.getFlag() & ItemConstants.LOCK) != ItemConstants.LOCK) {
|
||||||
if (eq.getExpiration() > -1) {
|
|
||||||
return; //No perma items pls
|
return; //No perma items pls
|
||||||
}
|
}
|
||||||
|
flag |= ItemConstants.LOCK;
|
||||||
eq.setFlag(flag);
|
eq.setFlag(flag);
|
||||||
|
|
||||||
long period = 0;
|
long period = 0;
|
||||||
@@ -246,7 +246,8 @@ public final class UseCashItemHandler extends AbstractPacketHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (period > 0) {
|
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
|
// double-remove found thanks to BHB
|
||||||
|
|||||||
Reference in New Issue
Block a user