Jump to content
  • 0

TORNAMENT EVENT ERROR


nortim

Question

7 answers to this question

Recommended Posts

  • 0
40 minutes ago, tazerman2 said:

net.sf.l2j.gameserver.events.tournaments.unrealtournaments linha 112 o que tem aqui?


    @Override
    public synchronized void run()
    {
        // while server is running
        while(true)
        {
            // if no have participants or arenas are busy wait 1 minute 
            if (registered.size() < 2 || free == 0)
            {

 112 -->  try 
                {
                    Thread.sleep(Config.ARENA_CALL_INTERVAL); 
                } 
                catch (InterruptedException e)
                {
                    e.printStackTrace();
                }
                continue;
            }
            List<Pair> opponents = selectOpponents();
            if (opponents != null && opponents.size() == 2)
            {
                Thread T = new Thread(new EvtArenaTask(opponents));
                T.setDaemon(true);
                T.start();
            }
            //wait 1 minute for not stress server
            try
            {
                Thread.sleep(Config.ARENA_CALL_INTERVAL); 
            } 
            catch (InterruptedException e)
            {
                e.printStackTrace();
            }
        }
    }
 

Link to comment
Share on other sites

  • 0

fail. that is wait if player is < 2 in register just can here use a threadpool with check if players is < 2 just check again after (x) time. my option is chage that line.

Link to comment
Share on other sites

  • 0
7 minutes ago, tazerman2 said:

fail. that is wait if player is < 2 in register just can here use a threadpool with check if players is < 2 just check again after (x) time. my option is chage that line.

 

nothing....

 

the sleep as interrupted.

Change the try method and check  "Config.ARENA_CALL_INTERVAL"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock