1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-09 17:02:53 +00:00

Change-Id: Ia7c6094789fa7b0d3cc6c136992b8081efd3c5e5

This commit is contained in:
rogiel
2011-04-28 23:12:09 -03:00
parent 54ef3c7fa2
commit 2749539f87
28 changed files with 124 additions and 27 deletions

View File

@@ -1,12 +1,23 @@
package com.l2jserver.game.net.handler;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelHandler;
import com.l2jserver.game.net.Lineage2Connection;
import com.l2jserver.game.net.packet.ClientPacket;
public class Lineage2PacketHandler extends SimpleChannelHandler {
private Lineage2Connection connection;
@Override
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e)
throws Exception {
connection = new Lineage2Connection(e.getChannel());
super.channelOpen(ctx, e);
}
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
throws Exception {
@@ -14,7 +25,7 @@ public class Lineage2PacketHandler extends SimpleChannelHandler {
if (!(msg instanceof ClientPacket))
return;
final ClientPacket packet = (ClientPacket) msg;
packet.process(null);
packet.process(connection, null);
super.messageReceived(ctx, e);
}