}
public static void storeKillsCount()
{
ThreadConnection con = null;
FiltredStatement fs = null;
try
{
con = L2DatabaseFactory.getInstance().getConnection();
TextBuilder sb = TextBuilder.newInstance();
fs = con.createStatement();
for(L2NpcTemplate t : NpcTable.getAll())
{
if(t != null && t.killscount > 0)
{
fs.addBatch(sb.append("REPLACE INTO `killcount` SET `npc_id`=").append(t.npcId).append(", `count`=").append(t.killscount).append(", `char_id`=-1").toString());
sb.clear();
}
}
TextBuilder.recycle(sb);
fs.executeBatch();
}
catch(Exception e)
{
e.printStackTrace();
}