Moved mmocore in loginserver.
This commit is contained in:
@@ -32,11 +32,11 @@ import java.util.logging.Logger;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.Server;
|
import com.l2jmobius.Server;
|
||||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||||
import com.l2jmobius.commons.mmocore.SelectorConfig;
|
|
||||||
import com.l2jmobius.commons.mmocore.SelectorThread;
|
|
||||||
import com.l2jmobius.loginserver.mail.MailSystem;
|
import com.l2jmobius.loginserver.mail.MailSystem;
|
||||||
import com.l2jmobius.loginserver.network.L2LoginClient;
|
import com.l2jmobius.loginserver.network.L2LoginClient;
|
||||||
import com.l2jmobius.loginserver.network.L2LoginPacketHandler;
|
import com.l2jmobius.loginserver.network.L2LoginPacketHandler;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.SelectorConfig;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.SelectorThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
||||||
|
@@ -21,14 +21,14 @@ import java.util.concurrent.LinkedBlockingQueue;
|
|||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import com.l2jmobius.commons.mmocore.IAcceptFilter;
|
|
||||||
import com.l2jmobius.commons.mmocore.IClientFactory;
|
|
||||||
import com.l2jmobius.commons.mmocore.IMMOExecutor;
|
|
||||||
import com.l2jmobius.commons.mmocore.MMOConnection;
|
|
||||||
import com.l2jmobius.commons.mmocore.ReceivablePacket;
|
|
||||||
import com.l2jmobius.commons.util.IPv4Filter;
|
|
||||||
import com.l2jmobius.loginserver.network.L2LoginClient;
|
import com.l2jmobius.loginserver.network.L2LoginClient;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.IAcceptFilter;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.IClientFactory;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.IMMOExecutor;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.MMOConnection;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.ReceivablePacket;
|
||||||
import com.l2jmobius.loginserver.network.serverpackets.Init;
|
import com.l2jmobius.loginserver.network.serverpackets.Init;
|
||||||
|
import com.l2jmobius.loginserver.network.util.IPv4Filter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
||||||
|
@@ -25,14 +25,14 @@ import java.util.Map;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.mmocore.MMOClient;
|
|
||||||
import com.l2jmobius.commons.mmocore.MMOConnection;
|
|
||||||
import com.l2jmobius.commons.mmocore.SendablePacket;
|
|
||||||
import com.l2jmobius.commons.util.Rnd;
|
import com.l2jmobius.commons.util.Rnd;
|
||||||
import com.l2jmobius.commons.util.crypt.LoginCrypt;
|
import com.l2jmobius.commons.util.crypt.LoginCrypt;
|
||||||
import com.l2jmobius.commons.util.crypt.ScrambledKeyPair;
|
import com.l2jmobius.commons.util.crypt.ScrambledKeyPair;
|
||||||
import com.l2jmobius.loginserver.LoginController;
|
import com.l2jmobius.loginserver.LoginController;
|
||||||
import com.l2jmobius.loginserver.SessionKey;
|
import com.l2jmobius.loginserver.SessionKey;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.MMOClient;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.MMOConnection;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.SendablePacket;
|
||||||
import com.l2jmobius.loginserver.network.serverpackets.L2LoginServerPacket;
|
import com.l2jmobius.loginserver.network.serverpackets.L2LoginServerPacket;
|
||||||
import com.l2jmobius.loginserver.network.serverpackets.LoginFail;
|
import com.l2jmobius.loginserver.network.serverpackets.LoginFail;
|
||||||
import com.l2jmobius.loginserver.network.serverpackets.LoginFail.LoginFailReason;
|
import com.l2jmobius.loginserver.network.serverpackets.LoginFail.LoginFailReason;
|
||||||
|
@@ -19,8 +19,6 @@ package com.l2jmobius.loginserver.network;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import com.l2jmobius.commons.mmocore.IPacketHandler;
|
|
||||||
import com.l2jmobius.commons.mmocore.ReceivablePacket;
|
|
||||||
import com.l2jmobius.loginserver.network.L2LoginClient.LoginClientState;
|
import com.l2jmobius.loginserver.network.L2LoginClient.LoginClientState;
|
||||||
import com.l2jmobius.loginserver.network.clientpackets.AuthGameGuard;
|
import com.l2jmobius.loginserver.network.clientpackets.AuthGameGuard;
|
||||||
import com.l2jmobius.loginserver.network.clientpackets.RequestAuthLogin;
|
import com.l2jmobius.loginserver.network.clientpackets.RequestAuthLogin;
|
||||||
@@ -28,6 +26,8 @@ import com.l2jmobius.loginserver.network.clientpackets.RequestPIAgreement;
|
|||||||
import com.l2jmobius.loginserver.network.clientpackets.RequestPIAgreementCheck;
|
import com.l2jmobius.loginserver.network.clientpackets.RequestPIAgreementCheck;
|
||||||
import com.l2jmobius.loginserver.network.clientpackets.RequestServerList;
|
import com.l2jmobius.loginserver.network.clientpackets.RequestServerList;
|
||||||
import com.l2jmobius.loginserver.network.clientpackets.RequestServerLogin;
|
import com.l2jmobius.loginserver.network.clientpackets.RequestServerLogin;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.IPacketHandler;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.ReceivablePacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for packets received by Login Server
|
* Handler for packets received by Login Server
|
||||||
@@ -48,6 +48,7 @@ public final class L2LoginPacketHandler implements IPacketHandler<L2LoginClient>
|
|||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case CONNECTED:
|
case CONNECTED:
|
||||||
|
{
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
{
|
{
|
||||||
case 0x07:
|
case 0x07:
|
||||||
@@ -58,7 +59,9 @@ public final class L2LoginPacketHandler implements IPacketHandler<L2LoginClient>
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case AUTHED_GG:
|
case AUTHED_GG:
|
||||||
|
{
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
@@ -69,26 +72,39 @@ public final class L2LoginPacketHandler implements IPacketHandler<L2LoginClient>
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case AUTHED_LOGIN:
|
case AUTHED_LOGIN:
|
||||||
|
{
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
{
|
{
|
||||||
case 0x02:
|
case 0x02:
|
||||||
|
{
|
||||||
packet = new RequestServerLogin();
|
packet = new RequestServerLogin();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 0x05:
|
case 0x05:
|
||||||
|
{
|
||||||
packet = new RequestServerList();
|
packet = new RequestServerList();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 0x0E:
|
case 0x0E:
|
||||||
|
{
|
||||||
packet = new RequestPIAgreementCheck(); // TODO: Verify names
|
packet = new RequestPIAgreementCheck(); // TODO: Verify names
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 0x0F:
|
case 0x0F:
|
||||||
|
{
|
||||||
packet = new RequestPIAgreement();
|
packet = new RequestPIAgreement();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
debugOpcode(opcode, state);
|
debugOpcode(opcode, state);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
@@ -19,8 +19,8 @@ package com.l2jmobius.loginserver.network.clientpackets;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import com.l2jmobius.commons.mmocore.ReceivablePacket;
|
|
||||||
import com.l2jmobius.loginserver.network.L2LoginClient;
|
import com.l2jmobius.loginserver.network.L2LoginClient;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.ReceivablePacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.nio.channels.SocketChannel;
|
import java.nio.channels.SocketChannel;
|
||||||
|
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Forsaiken
|
* @author Forsaiken
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.nio.BufferOverflowException;
|
import java.nio.BufferOverflowException;
|
||||||
|
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.mmocore;
|
package com.l2jmobius.loginserver.network.mmocore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
@@ -16,8 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jmobius.loginserver.network.serverpackets;
|
package com.l2jmobius.loginserver.network.serverpackets;
|
||||||
|
|
||||||
import com.l2jmobius.commons.mmocore.SendablePacket;
|
|
||||||
import com.l2jmobius.loginserver.network.L2LoginClient;
|
import com.l2jmobius.loginserver.network.L2LoginClient;
|
||||||
|
import com.l2jmobius.loginserver.network.mmocore.SendablePacket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author KenM
|
* @author KenM
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package com.l2jmobius.commons.util;
|
package com.l2jmobius.loginserver.network.util;
|
||||||
|
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@@ -24,7 +24,7 @@ import java.util.Iterator;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import com.l2jmobius.commons.mmocore.IAcceptFilter;
|
import com.l2jmobius.loginserver.network.mmocore.IAcceptFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IPv4 filter.
|
* IPv4 filter.
|
Reference in New Issue
Block a user