public void Handle(Packet packet, LoginClient client) { Log.Info($"Received packet with Opcode:{packet.FirstOpcode:X2} for State:{client.State}"); if (!ClientPackets.ContainsKey(packet.FirstOpcode)) { return; } PacketBase incPacket = (PacketBase)Activator.CreateInstance(ClientPackets[packet.FirstOpcode], _serviceProvider, packet, client); incPacket?.RunImpl(); }
public static void Handle(Packet packet, ServerThread client) { Log.Info($"Received packet with Opcode:{packet.FirstOpcode.ToString("X2")}"); if (!ClientPacketsServ.ContainsKey(packet.FirstOpcode)) { return; } PacketBase incPacket = (PacketBase)Activator.CreateInstance(ClientPacketsServ[packet.FirstOpcode], packet, client); incPacket?.RunImpl(); }
public void Handle(Packet packet, ServerThread client) { Log.Debug($"Received packet with Opcode:{packet.FirstOpcode:X2}"); if (!ServerPackets.ContainsKey(packet.FirstOpcode)) { Log.Debug("Unknown packet opcode!"); return; } PacketBase incPacket = (PacketBase)Activator.CreateInstance(ServerPackets[packet.FirstOpcode], _serviceProvider, packet, client); incPacket?.RunImpl(); }