| | |
| | | private static BaseProperty GetBaseProperty(string guid) |
| | | { |
| | | var item = packModel.GetItemByGuid(guid); |
| | | var equipPosition = new Int2(item.config.LV, item.config.EquipPlace); |
| | | var equiped = equipModel.GetEquip(equipPosition) == guid; |
| | | |
| | | var baseProperty = GetBaseProperty(item.itemId); |
| | | |
| | | var starProperties = new List<Int2>(); |
| | | var currentStar = starModel.GetEquipStarLevel(new Int2(item.config.LV, item.config.EquipPlace)); |
| | | var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV); |
| | | var star = Mathf.Min(currentStar, maxStar); |
| | | if (star > 0) |
| | | if (equiped) |
| | | { |
| | | baseProperty.star = star; |
| | | var starConfig = EquipStarConfig.Get(item.config.LV, item.config.EquipPlace, star); |
| | | starProperties.AddRange(starConfig.BaseAttrInfo); |
| | | var starProperties = new List<Int2>(); |
| | | var currentStar = starModel.GetEquipStarLevel(equipPosition); |
| | | var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV); |
| | | var star = Mathf.Min(currentStar, maxStar); |
| | | if (star > 0) |
| | | { |
| | | baseProperty.star = star; |
| | | var starConfig = EquipStarConfig.Get(item.config.LV, item.config.EquipPlace, star); |
| | | starProperties.AddRange(starConfig.BaseAttrInfo); |
| | | } |
| | | |
| | | baseProperty.starProperties = starProperties; |
| | | } |
| | | |
| | | baseProperty.starProperties = starProperties; |
| | | return baseProperty; |
| | | } |
| | | |