private void SendInternal(byte[] packet) { short opcode = BitConverter.ToInt16(packet, 0); SendOp sendOp = (SendOp)opcode; switch (sendOp) { case SendOp.USER_SYNC: case SendOp.KEY_TABLE: case SendOp.STAT: case SendOp.EMOTION: case SendOp.CHARACTER_LIST: case SendOp.ITEM_INVENTORY: case SendOp.FIELD_ADD_NPC: case SendOp.FIELD_PORTAL: case SendOp.NPC_CONTROL: case SendOp.PROXY_GAME_OBJ: case SendOp.FIELD_ADD_USER: case SendOp.FIELD_ENTRANCE: case SendOp.SERVER_ENTER: break; default: string packetString = packet.ToHexString(' '); logger.Debug($"SEND ({sendOp.ToString()}): {packetString.Substring(Math.Min(packetString.Length, 6))}".Pastel("#E05561")); break; } Packet encryptedPacket = sendCipher.Transform(packet); SendRaw(encryptedPacket); }
private void SendInternal(byte[] packet) { short opcode = BitConverter.ToInt16(packet, 0); SendOp sendOp = (SendOp)opcode; switch (sendOp) { case SendOp.USER_SYNC: break; default: string packetString = packet.ToHexString(' '); logger.Debug($"SEND ({sendOp.ToString()}): {packetString.Substring(Math.Min(packetString.Length, 6))}".Pastel("#E05561")); break; } Packet encryptedPacket = sendCipher.Transform(packet); SendRaw(encryptedPacket); }