From ff494a568c892a627a06a7a0be844187ff9176f0 Mon Sep 17 00:00:00 2001 From: kmyuhkyuk <2451614940@qq.com> Date: Wed, 1 Feb 2023 19:33:52 +0800 Subject: [PATCH] Update --- SkinHide/SkinHidePlugin.cs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/SkinHide/SkinHidePlugin.cs b/SkinHide/SkinHidePlugin.cs index 2495b99..0d871b7 100644 --- a/SkinHide/SkinHidePlugin.cs +++ b/SkinHide/SkinHidePlugin.cs @@ -9,6 +9,7 @@ using EFT; using EFT.Visual; using SkinHide.Patches; using SkinHide.Utils; +using EFT.InventoryLogic; namespace SkinHide { @@ -143,20 +144,7 @@ namespace SkinHide IEnumerable slotList = ReflectionDatas.RefSlotList.GetValue(slotViews); - List dresses = new List(); - - foreach (object slot in slotList) - { - Dress[] dres = ReflectionDatas.RefDresses.GetValue(slot); - - if (dres != null) - { - foreach (Dress dr in dres) - { - dresses.Add(dr); - } - } - } + IEnumerable dresses = slotList.SelectMany(x => ReflectionDatas.RefDresses.GetValue(x)).Where(x => x != null); IEnumerable dress = dresses.Where(x => x.GetType() == typeof(Dress));