EnterWorld exploit fix.

Author: Tryskell
Source: https://acis.i-live.eu/index.php?topic=10070
This commit is contained in:
MobiusDev
2019-02-25 17:36:19 +00:00
parent aacfb7b6e9
commit b4d261eb20
48 changed files with 88 additions and 29 deletions

View File

@ -27,5 +27,6 @@ public enum ConnectionState implements IConnectionState
DISCONNECTED,
CLOSING,
AUTHENTICATED,
ENTERING,
IN_GAME
}

View File

@ -45,7 +45,7 @@ public enum IncomingPackets implements IIncomingPackets<L2GameClient>
CHARACTER_DELETE(0x0D, CharacterDelete::new, ConnectionState.AUTHENTICATED),
PROTOCOL_VERSION(0x0E, ProtocolVersion::new, ConnectionState.CONNECTED),
MOVE_BACKWARD_TO_LOCATION(0x0F, MoveBackwardToLocation::new, ConnectionState.IN_GAME),
ENTER_WORLD(0x11, EnterWorld::new, ConnectionState.IN_GAME),
ENTER_WORLD(0x11, EnterWorld::new, ConnectionState.ENTERING),
CHARACTER_SELECT(0x12, CharacterSelect::new, ConnectionState.AUTHENTICATED),
NEW_CHARACTER(0x13, NewCharacter::new, ConnectionState.AUTHENTICATED),
REQUEST_ITEM_LIST(0x14, RequestItemList::new, ConnectionState.IN_GAME),

View File

@ -169,7 +169,7 @@ public class CharacterSelect implements IClientIncomingPacket
client.sendPacket(new SSQInfo());
client.setConnectionState(ConnectionState.IN_GAME);
client.setConnectionState(ConnectionState.ENTERING);
client.sendPacket(new CharSelected(cha, client.getSessionId().playOkID1));
}
}

View File

@ -60,6 +60,7 @@ import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.skills.CommonSkill;
import com.l2jmobius.gameserver.model.zone.ZoneId;
import com.l2jmobius.gameserver.network.ConnectionState;
import com.l2jmobius.gameserver.network.Disconnection;
import com.l2jmobius.gameserver.network.L2GameClient;
import com.l2jmobius.gameserver.network.SystemMessageId;
@ -135,6 +136,8 @@ public class EnterWorld implements IClientIncomingPacket
return;
}
client.setConnectionState(ConnectionState.IN_GAME);
final String[] adress = new String[5];
for (int i = 0; i < 5; i++)
{