public L2ItemInstance createItem(String process, int itemId, int count, L2PcInstance actor, L2Object reference) { // Serial int serial = 0; if( process.startsWith("exchange:")) if( process.split(":").size == 2) serial = Integer.parseInt(process.split(":")[1]); // Create and Init the L2ItemInstance corresponding to the Item Identifier L2ItemInstance item = new L2ItemInstance(IdFactory.getInstance().getNextId(), itemId); if (process.equalsIgnoreCase("loot") && !Config.AUTO_LOOT) { item.setOwnerId(actor.getObjectId()); ScheduledFuture itemLootShedule = ThreadPoolManager.getInstance().scheduleGeneral(new resetOwner(item), 15000); item.setItemLootShedule(itemLootShedule); } if (Config.DEBUG) _log.fine("ItemTable: Item created oid:" + item.getObjectId()+ " itemid:" + itemId); // Add the L2ItemInstance object to _allObjects of L2world L2World.getInstance().storeObject(item); // Set Item parameters if (item.isStackable() && count > 1) item.setCount(count); if (Config.LOG_ITEMS) { LogRecord record = new LogRecord(Level.INFO, "CREATE:" + process); record.setLoggerName("item"); record.setParameters(new Object[]{item, actor, reference}); _logItems.log(record); } return item; }