Item pickup patch + Rescaled buyback fee + Tameness gain on Quests
Fixed a concurrency issue with registering picked items into the inventory, that would render some of the collected items to not be registered. Adjusted buyback fee, now using a value sensitive to the player level (starts scaling from level 30, caps at 120). Edited MaxHP of the boss Shade, now properly scaled to it's level. Fixed return scroll and summon bags being usable inside BRPQ rest points. Added missing etc drop data for the Extras/Leaders mobs from Zipangu. Implemented pet tameness gain on quests. Fixed a concurrency issue with the pet spawn handler, allowing possible PE exploits. Adjusted drop rates of omok pieces and match cards, now somewhat GMS-like. Shadow Meso now properly dispels mobs wdef/mdef up, as the skill description suggests. Fixed Shadow Meso using up projectiles (it should use only mesos).
This commit is contained in:
@@ -214,20 +214,19 @@ public class MapleInventory implements Iterable<Item> {
|
||||
}
|
||||
|
||||
public short addItem(Item item) {
|
||||
short slotId = getNextFreeSlot();
|
||||
if (slotId < 0 || item == null) {
|
||||
short slotId = addSlot(item);
|
||||
if (slotId == -1) {
|
||||
return -1;
|
||||
}
|
||||
addSlot(slotId, item);
|
||||
item.setPosition(slotId);
|
||||
return slotId;
|
||||
}
|
||||
|
||||
public void addFromDB(Item item) {
|
||||
public void addItemFromDB(Item item) {
|
||||
if (item.getPosition() < 0 && !type.equals(MapleInventoryType.EQUIPPED)) {
|
||||
return;
|
||||
}
|
||||
addSlot(item.getPosition(), item);
|
||||
addSlotFromDB(item.getPosition(), item);
|
||||
}
|
||||
|
||||
private static boolean isSameOwner(Item source, Item target) {
|
||||
@@ -302,16 +301,39 @@ public class MapleInventory implements Iterable<Item> {
|
||||
}
|
||||
}
|
||||
|
||||
public void addSlot(short slot, Item item) {
|
||||
private short addSlot(Item item) {
|
||||
if(item == null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
lock.lock();
|
||||
try {
|
||||
inventory.put(slot, item);
|
||||
short slotId = getNextFreeSlot();
|
||||
if (slotId < 0) {
|
||||
return -1;
|
||||
}
|
||||
inventory.put(slotId, item);
|
||||
|
||||
if(ItemConstants.isRateCoupon(item.getItemId())) {
|
||||
owner.updateCouponRates();
|
||||
}
|
||||
|
||||
return slotId;
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
if(ItemConstants.isRateCoupon(item.getItemId())) {
|
||||
owner.updateCouponRates();
|
||||
}
|
||||
|
||||
private void addSlotFromDB(short slot, Item item) {
|
||||
lock.lock();
|
||||
try {
|
||||
inventory.put(slot, item);
|
||||
|
||||
if(ItemConstants.isRateCoupon(item.getItemId())) {
|
||||
owner.updateCouponRates();
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user