/// <summary> /// 通关获得的物品奖励 /// </summary> /// <param name="userID"></param> /// <param name="npcInfo"></param> /// <returns></returns> private List <UniversalInfo> GetUniversalList() { List <UniversalInfo> universalList = new List <UniversalInfo>(); foreach (PrizeItemInfo info in prizeItems) { if (info.Type == 0) { ItemBaseInfo itemInfo = new ConfigCacheSet <ItemBaseInfo>().FindKey(info.ItemID); if (itemInfo != null) { universalList.Add(new UniversalInfo() { Name = itemInfo.ItemName, HeadID = itemInfo.HeadID, Num = info.Num }); } } else if (info.Type == 1) { SparePartInfo sparePart = new ConfigCacheSet <SparePartInfo>().FindKey(info.ItemID); if (sparePart != null) { universalList.Add(new UniversalInfo() { Name = sparePart.Name, HeadID = sparePart.HeadID, Num = info.Num }); } } else if (info.Type == 2) { EnchantInfo enchantInfo = new ConfigCacheSet <EnchantInfo>().FindKey(info.ItemID); if (enchantInfo != null) { universalList.Add(new UniversalInfo() { Name = enchantInfo.EnchantName, HeadID = enchantInfo.HeadID, Num = info.Num }); PlotHelper.EnchantAddUser(ContextUser, enchantInfo.EnchantID); } } } return(universalList); }