Rename and clean up MapleInventory
This commit is contained in:
@@ -1581,7 +1581,7 @@ public class MapleItemInformationProvider {
|
||||
}
|
||||
|
||||
public Collection<Item> canWearEquipment(MapleCharacter chr, Collection<Item> items) {
|
||||
MapleInventory inv = chr.getInventory(MapleInventoryType.EQUIPPED);
|
||||
Inventory inv = chr.getInventory(MapleInventoryType.EQUIPPED);
|
||||
if (inv.checked()) {
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ package server;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.ItemFactory;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import client.inventory.manipulator.MapleInventoryManipulator;
|
||||
import scripting.event.EventInstanceManager;
|
||||
@@ -118,7 +118,7 @@ public class MapleMarriage extends EventInstanceManager {
|
||||
|
||||
public static boolean claimGiftItems(MapleClient c, MapleCharacter chr) {
|
||||
List<Item> gifts = loadGiftItemsFromDb(c, chr.getId());
|
||||
if (MapleInventory.checkSpot(chr, gifts)) {
|
||||
if (Inventory.checkSpot(chr, gifts)) {
|
||||
try (Connection con = DatabaseConnection.getConnection()) {
|
||||
ItemFactory.MARRIAGE_GIFTS.saveItems(new LinkedList<>(), chr.getId(), con);
|
||||
} catch (SQLException sqle) {
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
package server;
|
||||
|
||||
import client.*;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import client.inventory.manipulator.MapleInventoryManipulator;
|
||||
import client.status.MonsterStatus;
|
||||
@@ -940,7 +940,7 @@ public class MapleStatEffect {
|
||||
if (isShadowClaw()) {
|
||||
short projectileConsume = this.getBulletConsume(); // noticed by shavit
|
||||
|
||||
MapleInventory use = applyto.getInventory(MapleInventoryType.USE);
|
||||
Inventory use = applyto.getInventory(MapleInventoryType.USE);
|
||||
use.lockInventory();
|
||||
try {
|
||||
Item projectile = null;
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
package server;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import client.inventory.manipulator.MapleInventoryManipulator;
|
||||
import client.inventory.manipulator.MapleKarmaManipulator;
|
||||
@@ -251,7 +251,7 @@ public class MapleTrade {
|
||||
tradeItems.add(new Pair<>(item, item.getInventoryType()));
|
||||
}
|
||||
|
||||
return MapleInventory.checkSpotsAndOwnership(chr, tradeItems);
|
||||
return Inventory.checkSpotsAndOwnership(chr, tradeItems);
|
||||
}
|
||||
|
||||
private boolean fitsUniquesInInventory() {
|
||||
|
||||
@@ -23,9 +23,9 @@ package server.maps;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.ItemFactory;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import client.inventory.manipulator.MapleInventoryManipulator;
|
||||
import client.inventory.manipulator.MapleKarmaManipulator;
|
||||
@@ -220,7 +220,7 @@ public class MapleHiredMerchant extends AbstractMapleMapObject {
|
||||
Item iitem = shopItem.getItem().copy();
|
||||
iitem.setQuantity((short) (shopItem.getItem().getQuantity() * shopItem.getBundles()));
|
||||
|
||||
if (!MapleInventory.checkSpot(chr, iitem)) {
|
||||
if (!Inventory.checkSpot(chr, iitem)) {
|
||||
chr.sendPacket(PacketCreator.serverNotice(1, "Have a slot available on your inventory to claim back the item."));
|
||||
chr.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
@@ -656,7 +656,7 @@ public class MapleHiredMerchant extends AbstractMapleMapObject {
|
||||
li.add(new Pair<>(it, it.getInventoryType()));
|
||||
}
|
||||
|
||||
return MapleInventory.checkSpotsAndOwnership(chr, li);
|
||||
return Inventory.checkSpotsAndOwnership(chr, li);
|
||||
}
|
||||
|
||||
public int getChannel() {
|
||||
|
||||
@@ -23,8 +23,8 @@ package server.maps;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.inventory.Inventory;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import client.inventory.manipulator.MapleInventoryManipulator;
|
||||
import client.inventory.manipulator.MapleKarmaManipulator;
|
||||
@@ -224,7 +224,7 @@ public class MaplePlayerShop extends AbstractMapleMapObject {
|
||||
Item iitem = shopItem.getItem().copy();
|
||||
iitem.setQuantity((short) (shopItem.getItem().getQuantity() * shopItem.getBundles()));
|
||||
|
||||
if (!MapleInventory.checkSpot(chr, iitem)) {
|
||||
if (!Inventory.checkSpot(chr, iitem)) {
|
||||
chr.sendPacket(PacketCreator.serverNotice(1, "Have a slot available on your inventory to claim back the item."));
|
||||
chr.sendPacket(PacketCreator.enableActions());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user