Ejemplo n.º 1
0
 private void HandleClientLoginserverPacket(IRunablePacket packet)
 {
     if (clientToLs.ContainsKey(packet.OpCode))
     {
         clientToLs[packet.OpCode].RunPacket();
     }
 }
Ejemplo n.º 2
0
 private void HandleClientLoginserverPacket(IRunablePacket packet)
 {
     if (clientToLs.ContainsKey(packet.OpCode))
     {
         clientToLs[packet.OpCode].RunPacket();
     }
 }
Ejemplo n.º 3
0
 private void HandleLoginserverPacket(IRunablePacket packet)
 {
     if (lsToClient.ContainsKey(packet.OpCode))
     {
         lsToClient[packet.OpCode].RunPacket();
     }
 }
Ejemplo n.º 4
0
 public void HandlePacket(IRunablePacket packet)
 {
     switch (packet.Type)
     {
         case PacketType.ClientToGameserver:
             HandleClientGameserverPacket(packet);
             break;
         case PacketType.ClientToLoginserver:
             HandleClientLoginserverPacket(packet);
             break;
         case PacketType.GameserverToClient:
             HandleGameserverPacket(packet);
             break;
         case PacketType.LoginserverToClient:
             HandleLoginserverPacket(packet);
             break;
     }
 }
Ejemplo n.º 5
0
 public void AddPacketHandler(IRunablePacket packet)
 {
     switch (packet.Type)
     {
         case PacketType.ClientToGameserver:
             clientToGs.Add(packet.OpCode, packet);
             break;
         case PacketType.ClientToLoginserver:
             clientToLs.Add(packet.OpCode, packet);
             break;
         case PacketType.GameserverToClient:
             gsToClient.Add(packet.OpCode, packet);
             break;
         case PacketType.LoginserverToClient:
             lsToClient.Add(packet.OpCode, packet);
             break;
     }
 }
Ejemplo n.º 6
0
        public void HandlePacket(IRunablePacket packet)
        {
            switch (packet.Type)
            {
            case PacketType.ClientToGameserver:
                HandleClientGameserverPacket(packet);
                break;

            case PacketType.ClientToLoginserver:
                HandleClientLoginserverPacket(packet);
                break;

            case PacketType.GameserverToClient:
                HandleGameserverPacket(packet);
                break;

            case PacketType.LoginserverToClient:
                HandleLoginserverPacket(packet);
                break;
            }
        }
Ejemplo n.º 7
0
        public void AddPacketHandler(IRunablePacket packet)
        {
            switch (packet.Type)
            {
            case PacketType.ClientToGameserver:
                clientToGs.Add(packet.OpCode, packet);
                break;

            case PacketType.ClientToLoginserver:
                clientToLs.Add(packet.OpCode, packet);
                break;

            case PacketType.GameserverToClient:
                gsToClient.Add(packet.OpCode, packet);
                break;

            case PacketType.LoginserverToClient:
                lsToClient.Add(packet.OpCode, packet);
                break;
            }
        }
Ejemplo n.º 8
0
 private void HandleGameserverPacket(IRunablePacket packet)
 {
     if (gsToClient.ContainsKey(packet.OpCode))
     {
         gsToClient[packet.OpCode].RunPacket();
     }
 }