Quick fix-up + Happyville
Fixed bug introduced on last update regarding events without event_schedule defined. Added path to Happyville maps, and raid boss event.
This commit is contained in:
@@ -54,29 +54,29 @@ public final class ItemPickupHandler extends AbstractMaplePacketHandler {
|
||||
|
||||
if (ob instanceof MapleMapItem) {
|
||||
MapleMapItem mapitem = (MapleMapItem) ob;
|
||||
if(System.currentTimeMillis() - mapitem.getDropTime() < 900) {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
if(System.currentTimeMillis() - mapitem.getDropTime() < 900) {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (mapitem.getItemId() == 4031865 || mapitem.getItemId() == 4031866 || mapitem.getMeso() > 0 || MapleItemInformationProvider.getInstance().isConsumeOnPickup(mapitem.getItemId()) || MapleInventoryManipulator.checkSpace(c, mapitem.getItemId(), mapitem.getItem().getQuantity(), mapitem.getItem().getOwner())) {
|
||||
if ((chr.getMapId() > 209000000 && chr.getMapId() < 209000016) || (chr.getMapId() >= 990000500 && chr.getMapId() <= 990000502)) {//happyville trees and guild PQ
|
||||
if (!mapitem.isPlayerDrop() || mapitem.getDropper().getObjectId() == c.getPlayer().getObjectId()) {
|
||||
if(mapitem.getMeso() > 0) {
|
||||
chr.gainMeso(mapitem.getMeso(), true, true, false);
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.removeItemFromMap(mapitem.getObjectId(), 2, chr.getId()), mapitem.getPosition());
|
||||
chr.getMap().removeMapObject(ob);
|
||||
mapitem.setPickedUp(true);
|
||||
} else if (MapleInventoryManipulator.addFromDrop(c, mapitem.getItem(), false)) {
|
||||
chr.gainMeso(mapitem.getMeso(), true, true, false);
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.removeItemFromMap(mapitem.getObjectId(), 2, chr.getId()), mapitem.getPosition());
|
||||
chr.getMap().removeMapObject(ob);
|
||||
mapitem.setPickedUp(true);
|
||||
mapitem.setPickedUp(true);
|
||||
} else if (MapleInventoryManipulator.addFromDrop(c, mapitem.getItem(), false)) {
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.removeItemFromMap(mapitem.getObjectId(), 2, chr.getId()), mapitem.getPosition());
|
||||
chr.getMap().removeMapObject(ob);
|
||||
mapitem.setPickedUp(true);
|
||||
} else {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
c.announce(MaplePacketCreator.getInventoryFull());
|
||||
c.announce(MaplePacketCreator.getShowInventoryFull());
|
||||
c.announce(MaplePacketCreator.showItemUnavailable());
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
@@ -133,7 +133,7 @@ public final class ItemPickupHandler extends AbstractMaplePacketHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if(mapitem.getItemId() == 4031865 || mapitem.getItemId() == 4031866) {
|
||||
} else if(mapitem.getItemId() == 4031865 || mapitem.getItemId() == 4031866) {
|
||||
// Add NX to account, show effect and make item disapear
|
||||
chr.getCashShop().gainCash(1, mapitem.getItemId() == 4031865 ? 100 : 250);
|
||||
} else if (useItem(c, mapitem.getItem().getItemId())) {
|
||||
@@ -143,14 +143,14 @@ public final class ItemPickupHandler extends AbstractMaplePacketHandler {
|
||||
} else if (MapleInventoryManipulator.addFromDrop(c, mapitem.getItem(), true)) {
|
||||
} else if (mapitem.getItem().getItemId() == 4031868) {
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.updateAriantPQRanking(chr.getName(), chr.getItemQuantity(4031868, false), false));
|
||||
} else {
|
||||
} else {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
mapitem.setPickedUp(true);
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.removeItemFromMap(mapitem.getObjectId(), 2, chr.getId()), mapitem.getPosition());
|
||||
chr.getMap().removeMapObject(ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
|
||||
Reference in New Issue
Block a user