Jump to content

Recommended Posts

Posted

There are mistakes :D

 

The prepare() method should be called before the waitSecs(45) method(in handle() method).

 

In register(L2PcInstance p) method, this line MUST be removed:

state = State.REGISTERING;

 

The inLHE boolean in L2PcInstance isn't needed, since there are not checks in L2PcInstance, but in my opinion there should have been some.

 

There should have been checks in Logout and RequestRestart packets.

 

This:

+              if (!(state == State.INACTIVE))

+              {

+              {

+                      while (state == State.REWARDING)

+                      {

+                              endAndReward();

+                              teleport(true);

+                      }

+              }

should have been coded in another way. First of all, in while loop there should have been a waitSecs(x)(where x put between 5-15), to avoid possible lags because of multiple checks.

 

In endAndReward() method there should have been a check if both players are killed and if both are disconnected or 1 of them, to immediately stop the game.

 

In clear() method, before you set player1 and player2 objects to null, you should set to false the inLHE boolean, since it exists.

 

Also winner and loser objects are not needed.

Posted

There are mistakes :D

 

The prepare() method should be called before the waitSecs(45) method(in handle() method).

 

In register(L2PcInstance p) method, this line MUST be removed:

state = State.REGISTERING;

 

The inLHE boolean in L2PcInstance isn't needed, since there are not checks in L2PcInstance, but in my opinion there should have been some.

 

There should have been checks in Logout and RequestRestart packets.

 

This:

+              if (!(state == State.INACTIVE))

+              {

+              {

+                      while (state == State.REWARDING)

+                      {

+                              endAndReward();

+                              teleport(true);

+                      }

+              }

should have been coded in another way. First of all, in while loop there should have been a waitSecs(x)(where x put between 5-15), to avoid possible lags because of multiple checks.

 

In endAndReward() method there should have been a check if both players are killed and if both are disconnected or 1 of them, to immediately stop the game.

 

In clear() method, before you set player1 and player2 objects to null, you should set to false the inLHE boolean, since it exists.

 

Also winner and loser object are not needed.

thx my friend ;)

Posted

Anarchy can you post a patch with your corrections?

 

Sorry, can't do it since there is no time. But it's easy since i fully explain where are the problems.

  • 1 month later...

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
Reply to this topic...

×   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...