Added Storage's "Arrange Items" + Fixed equipped pet on CS issue

Implemented the "Arrange Items" Storage feature (merge & sort items on the Storage). Fixed items from different ownerships being merged together when trying to swap their positions. Fixed a bug where putting equipped pets onto Cash Shop inventory would cause a crash the returning to the game.
This commit is contained in:
ronancpl
2017-10-22 16:39:46 -02:00
parent d91c893400
commit 08658f406b
24 changed files with 436 additions and 13 deletions

View File

@@ -208,6 +208,9 @@ public final class CashOperationHandler extends AbstractMaplePacketHandler {
Item item = mi.findByCashId(cashId);
if (item == null) {
return;
} else if(c.getPlayer().getPetIndex(item.getPetId()) > -1) {
chr.getClient().announce(MaplePacketCreator.serverNotice(1, "You cannot put the pet you currently equip into the Cash Shop inventory."));
return;
}
cs.addToInventory(item);
mi.removeSlot(item.getPosition());