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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



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