public void gainItem(int id, int quantity) {
        if (quantity >= 0) {
            MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
            IItem item = ii.getEquipById(id);
            MapleInventoryType type = InventoryConstants.getInventoryType(id);
            if (!MapleInventoryManipulator.checkSpace(client, id, quantity, "")) {
                client.getSession().write(MaplePacketCreator.serverNotice(1, "Your inventory is full."));
                return;
            }
            if (type.equals(MapleInventoryType.EQUIP) && !InventoryConstants.isThrowingStar(item.getItemId()) && !InventoryConstants.isBullet(item.getItemId())) {
                MapleInventoryManipulator.addFromDrop(client, item, true);
            } else {
                MapleInventoryManipulator.addById(client, id, (short) quantity, "");
            }
        } else {
            MapleInventoryManipulator.removeById(client, InventoryConstants.getInventoryType(id), id, -quantity, true, false);
        }
        client.getSession().write(MaplePacketCreator.getShowItemGain(id, (short) quantity, true));
    }