EnterWorld exploit fix.
Author: Tryskell Source: https://acis.i-live.eu/index.php?topic=10070
This commit is contained in:
@@ -75,6 +75,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
|
||||
{
|
||||
CONNECTED,
|
||||
AUTHED,
|
||||
ENTERING,
|
||||
IN_GAME
|
||||
}
|
||||
|
||||
|
@@ -138,6 +138,23 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ENTERING:
|
||||
{
|
||||
switch (opcode)
|
||||
{
|
||||
case 0x03:
|
||||
{
|
||||
msg = new EnterWorld();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
printDebug(opcode, buf, state, client);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IN_GAME:
|
||||
{
|
||||
switch (opcode)
|
||||
@@ -150,11 +167,6 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
// case 0x02:
|
||||
// Say ... not used any more ??
|
||||
// break;
|
||||
case 0x03:
|
||||
{
|
||||
msg = new EnterWorld();
|
||||
break;
|
||||
}
|
||||
case 0x04:
|
||||
{
|
||||
msg = new Action();
|
||||
|
@@ -84,7 +84,7 @@ public class CharacterSelected extends L2GameClientPacket
|
||||
cha.setClient(getClient());
|
||||
getClient().setActiveChar(cha);
|
||||
nProtect.getInstance().sendRequest(getClient());
|
||||
getClient().setState(GameClientState.IN_GAME);
|
||||
getClient().setState(GameClientState.ENTERING);
|
||||
sendPacket(new CharSelected(cha, getClient().getSessionId().playOkID1));
|
||||
}
|
||||
}
|
||||
|
@@ -71,6 +71,7 @@ import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import com.l2jmobius.gameserver.network.Disconnection;
|
||||
import com.l2jmobius.gameserver.network.L2GameClient.GameClientState;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ClientSetTime;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
@@ -125,7 +126,6 @@ public class EnterWorld extends L2GameClientPacket
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance activeChar = getClient().getActiveChar();
|
||||
|
||||
if (activeChar == null)
|
||||
{
|
||||
LOGGER.warning("EnterWorld failed! activeChar is null...");
|
||||
@@ -133,6 +133,8 @@ public class EnterWorld extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
getClient().setState(GameClientState.IN_GAME);
|
||||
|
||||
// Set lock at login
|
||||
activeChar.setLocked(true);
|
||||
|
||||
|
Reference in New Issue
Block a user