Cash Shop patch + new features

Cash shop fix, new item sorting features, minor patches.
This commit is contained in:
ronancpl
2016-01-03 11:13:07 -02:00
parent 7b4fcf7861
commit 7e32e5a762
21 changed files with 312 additions and 67 deletions

View File

@@ -38,21 +38,25 @@ public class EnterCashShopHandler extends AbstractMaplePacketHandler {
try {
MapleCharacter mc = c.getPlayer();
if (mc.getCashShop().isOpened()) return;
if (mc.getCashShop().isOpened()) {
return;
}
Server.getInstance().getPlayerBuffStorage().addBuffsToStorage(mc.getId(), mc.getAllBuffs());
Server.getInstance().getPlayerBuffStorage().addBuffsToStorage(mc.getId(), mc.getAllBuffs());
mc.cancelBuffEffects();
mc.cancelExpirationTask();
c.announce(MaplePacketCreator.openCashShop(c, false));
mc.saveToDB();
mc.getCashShop().open(true);
mc.getMap().removePlayer(mc);
c.getChannelServer().removePlayer(mc);
c.announce(MaplePacketCreator.showCashInventory(c));
c.announce(MaplePacketCreator.showGifts(mc.getCashShop().loadGifts()));
c.announce(MaplePacketCreator.showWishList(mc, false));
c.announce(MaplePacketCreator.showCash(mc));
c.announce(MaplePacketCreator.openCashShop(c, false));
c.announce(MaplePacketCreator.showCashInventory(c));
c.announce(MaplePacketCreator.showGifts(mc.getCashShop().loadGifts()));
c.announce(MaplePacketCreator.showWishList(mc, false));
c.announce(MaplePacketCreator.showCash(mc));
c.getChannelServer().removePlayer(mc);
mc.getMap().removePlayer(mc);
mc.getCashShop().open(true);
mc.saveToDB();
} catch (Exception e) {
e.printStackTrace();
}