{
_log.warning("NPCTable: CUSTOM DROPLIST No npc correlating with id: {}"+" "+ mobId);
continue;
}
L2DropData dropDat = new L2DropData();
dropDat.setItemId(dropData.getInt("itemId"));
dropDat.setMinDrop(dropData.getInt("min"));
dropDat.setMaxDrop(dropData.getInt("max"));
dropDat.setChance(dropData.getInt("chance"));
int category = dropData.getInt("category");
npcDat.addDropData(dropDat, category);
cCount++;
//dropDat = null;
}
dropData.close();
statement.close();
_log.finest("CustomDropList : Added {} custom droplist"+" "+ cCount);
if(Config.ENABLE_CACHE_INFO)
{
FillDropList();
}
}
catch(Exception e)
{
_log.severe("NPCTable: Error reading NPC CUSTOM drop data"+" "+ e);
}
try
{
if (con == null)
{
con = L2DatabaseFactory.getInstance().getConnection(false);
}
statement = con.prepareStatement("SELECT " + L2DatabaseFactory.getInstance().safetyString(new String[]
{
"mobId", "itemId", "min", "max", "category", "chance"
}) + " FROM droplist ORDER BY mobId, chance DESC");
ResultSet dropData = statement.executeQuery();
L2DropData dropDat = null;
L2NpcTemplate npcDat = null;
while(dropData.next())
{
int mobId = dropData.getInt("mobId");
npcDat = _npcs.get(mobId);
if(npcDat == null)
{
_log.warning("NPCTable: No npc correlating with id: {}"+" "+ mobId);
continue;
}
dropDat = new L2DropData();
dropDat.setItemId(dropData.getInt("itemId"));
dropDat.setMinDrop(dropData.getInt("min"));
dropDat.setMaxDrop(dropData.getInt("max"));
dropDat.setChance(dropData.getInt("chance"));
int category = dropData.getInt("category");
npcDat.addDropData(dropDat, category);
//dropDat = null;