Minor Cash Shop + cash items fixes

Fixed minor issues regarding the Cash Shop not selling items and usable
cash items.
This commit is contained in:
ronancpl
2017-05-17 22:56:07 -03:00
parent d736d00964
commit 39a53e88fd
6 changed files with 37 additions and 22 deletions

View File

@@ -58,6 +58,8 @@ public final class UseCashItemHandler extends AbstractMaplePacketHandler {
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
MapleCharacter player = c.getPlayer();
if (System.currentTimeMillis() - player.getLastUsedCashItem() < 3000) {
player.dropMessage(1, "You have used a cash item recently. Wait a moment and try again.");
c.announce(MaplePacketCreator.enableActions());
return;
}
player.setLastUsedCashItem(System.currentTimeMillis());