using System; using System.Collections.Generic; namespace ET { public class StoreHelper { public static async ETTask GetStoreInfo(Unit unit,System.Collections.Generic.List list) { try { Store store = await StoreComponent.Instance.Query(unit.Id); foreach (Item item in store.StoreDic.Values) { if (item.IsEmpty) continue; BagMap bagMap = new BagMap { Index = item.index, NetItem = new NetItem(item) }; if (item.ItemType == ItemType.EquipItem) { bagMap.EquipTransMessage = new EquipTransMessage(item.data.As()); } list.Add(bagMap); } } catch (Exception e) { Log.Error(e); } } } }