An4rchy Posted April 26, 2012 Posted April 26, 2012 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.
Fiou Posted April 26, 2012 Posted April 26, 2012 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 ;)
An4rchy Posted April 26, 2012 Posted April 26, 2012 thx my friend ;) No problem :). But this was for Ventic too....
disorder25 Posted April 27, 2012 Posted April 27, 2012 Anarchy can you post a patch with your corrections?
An4rchy Posted April 27, 2012 Posted April 27, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now