}
}
for (Iterator<Integer> iter = _etcItems.keySet().iterator(); iter.hasNext();)
{
Integer id = iter.next();
L2EtcItem item = _etcItems.get(id);
if (item.getItemId() > highestId)
{
highestId = item.getItemId();
}
}
// Create a FastLookUp Table called _allTemplates of size : value of the highest item ID
if (Config.DEBUG) _log.fine("highest item id used:" + highestId);
_allTemplates = new L2Item[highestId +1];
// Insert armor item in Fast Look Up Table
for (Iterator<Integer> iter = _armors.keySet().iterator(); iter.hasNext();)
{
Integer id = iter.next();
L2Armor item = _armors.get(id);
assert _allTemplates[id.intValue()] == null;
_allTemplates[id.intValue()] = item;
}
// Insert weapon item in Fast Look Up Table
for (Iterator<Integer> iter = _weapons.keySet().iterator(); iter.hasNext();)
{
Integer id = iter.next();
L2Weapon item = _weapons.get(id);
assert _allTemplates[id.intValue()] == null;
_allTemplates[id.intValue()] = item;
}
// Insert etcItem item in Fast Look Up Table
for (Iterator<Integer> iter = _etcItems.keySet().iterator(); iter.hasNext();)
{
Integer id = iter.next();
L2EtcItem item = _etcItems.get(id);
assert _allTemplates[id.intValue()] == null;
_allTemplates[id.intValue()] = item;
}
}