- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
millers
Hi guys i have a little problem here and really dont know what's wrong with it . So today i tried to add some custom items but in the end i get some strange error what says : Cannot create item 0 , ItemTable: Highest used itemID : 9852 .
Here is all from error.log file
package what i'm using is trace editon Based on aCis revision: 315 if that help...
Item what i tried to add was
Tried With id=9853 the same stoory .. <item id='23569' name="Dynasty Leather Armor"> <set name="default_action" val="equip" /> <set name="armor_type" val="light" /> <set name="bodypart" val="fullarmor" /> <set name="crystal_type" val="s" /> <set name="crystal_count" val="870" /> <set name="material" val="leather" /> <set name="weight" val="5400" /> <set name="price" val="0" /> <set name="item_skill" val="11961-1" /> <for> <add val='170' order='0x10' stat='pDef'/> <enchant val='0' order='0x0C' stat='pDef'/> </for> </item>I really hope someone can help me with it didn't find anything near about this error in google.
and how about this code i found it in itemtable.java it looks a bit wierd for me :
/** * Returns instance of ItemTable * @return ItemTable */ public static ItemTable getInstance() { return SingletonHolder._instance; } /** * Returns a new object Item * @return */ public Item newItem() { return new Item(); } /** * Constructor. */ protected ItemTable() { _armors = new HashMap<>(); _etcItems = new HashMap<>(); _weapons = new HashMap<>(); load(); } private void load() { int highest = 0; for (L2Item item : SkillsEngine.getInstance().loadItems()) { if (highest < item.getItemId()) highest = item.getItemId(); if (item instanceof L2EtcItem) _etcItems.put(item.getItemId(), (L2EtcItem) item); else if (item instanceof L2Armor) _armors.put(item.getItemId(), (L2Armor) item); else _weapons.put(item.getItemId(), (L2Weapon) item); } buildFastLookupTable(highest); } /** * Builds a variable in which all items are putting in in function of their ID. * @param size */ private void buildFastLookupTable(int size) { // Create a FastLookUp Table called _allTemplates of size : value of the highest item ID _log.info("ItemTable: Highest used itemID : " + size); _allTemplates = new L2Item[size + 1]; // Insert armor item in Fast Look Up Table for (L2Armor item : _armors.values()) _allTemplates[item.getItemId()] = item; // Insert weapon item in Fast Look Up Table for (L2Weapon item : _weapons.values()) _allTemplates[item.getItemId()] = item; // Insert etcItem item in Fast Look Up Table for (L2EtcItem item : _etcItems.values()) _allTemplates[item.getItemId()] = item; } /** * Returns the item corresponding to the item ID * @param id : int designating the item * @return L2Item */ public L2Item getTemplate(int id) { if (id >= _allTemplates.length) return null; return _allTemplates[id]; }Edited by millers5 answers to this question
Recommended Posts