Jump to content

Recommended Posts

Posted (edited)

Replace this part of the code :

    private void ReloadData()
        {
        try (Connection con = L2DatabaseFactory.getInstance().getConnection())
            {
            PreparedStatement statement = con.prepareStatement("SELECT char_name, pvpkills, accesslevel, online FROM characters WHERE accesslevel = '0' ORDER BY pvpkills DESC, char_name ASC LIMIT 10");
            ResultSet result = statement.executeQuery();
            
            //refreshing top pvp list
            int i = 0; //index of array
            
            while (result.next())
                {
                topPvPList[i] = new PlayerInfo(i+1,result.getString("char_name"),result.getInt("pvpkills"),0,0,result.getBoolean("online"));
                i++;
                }
                    
            //refreshing top pk list
            statement = con.prepareStatement("SELECT char_name, pkkills, accesslevel, online FROM characters WHERE accesslevel = '0' ORDER BY pkkills DESC, char_name ASC LIMIT 10");
            result = statement.executeQuery();
            
            i = 0; //index of array
            while (result.next())
                {
                topPkList[i] = new PlayerInfo(i+1,result.getString("char_name"),0,result.getInt("pkkills"),0,result.getBoolean("online"));
                i++;
                }
            
            //refreshing top online list
            statement = con.prepareStatement("SELECT char_name, onlinetime, accesslevel, online FROM characters WHERE accesslevel = '0' ORDER BY onlinetime DESC, char_name ASC LIMIT 10");
            result = statement.executeQuery();
            
            i = 0; //index of array

and it will exclude entries with accesslevel >0

Edited by StaticX
  • 5 weeks later...
  • 1 year later...
Posted (edited)

anyone help me to fix on frozen?

wtf.png

i add one password changer and work perfect.

LOGGER.warn( i add this to ranking and not fixed. how can i fix?

edit* fixed

Edited by PaRaNoiC*
  • 2 weeks later...
Posted (edited)
2 minutes ago, PaRaNoiC* said:

anyone know how to fix this error in ThreadPoolManager?

ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new RefreshAllLists(), 10000, delayForCheck * 60000);

http://prntscr.com/hlpod9

 

ThreadPool.scheduleAtFixedRate

 

 

Edited by Zacapa
Posted (edited)
8 minutes ago, Zacapa said:

ThreadPool.scheduleAtFixedRate

http://prntscr.com/hlpqpc

 

http://prntscr.com/hlpqt9 what import press here?

 

 

edit 

fixed. thanks you and melron for help me i add import net.sf.l2j.commons.concurrent.ThreadPool; and fixed

Edited by PaRaNoiC*
Posted
6 minutes ago, PaRaNoiC* said:


 

import net.sf.l2j.commons.concurrent.ThreadPool;
ThreadPool.scheduleAtFixedRate(new RefreshAllLists(), 10000, delayForCheck * 60000);

 

 

  • 4 weeks later...
  • Vision locked this topic
Guest
This topic is now closed to further replies.



×
×
  • Create New...