| | |
| | | { |
| | | if (config.CostItemDict.x > 0) |
| | | { |
| | | specialMaterial.value = Mathf.RoundToInt(packModel.GetItemCountByID(PackType.Item, config.CostItemDict.x) >= config.CostItemDict.y ? 1f : 0f * 100); |
| | | var own = packModel.GetItemCountByID(PackType.Item, config.CostItemDict.x); |
| | | probability = own >= config.CostItemDict.y ? 1f : 0f; |
| | | } |
| | | else |
| | | { |
| | | specialMaterial.value = 0; |
| | | probability = 0f; |
| | | } |
| | | } |
| | | else |
| | |
| | | var itemGuid = GetMaterialLogicStringByIndex(i).value; |
| | | probability += GetMaterialSuccessRate(equipPosition, itemGuid); |
| | | } |
| | | |
| | | starUpgradeProbability.value = Mathf.RoundToInt(probability * 100); |
| | | } |
| | | |
| | | starUpgradeProbability.value = Mathf.RoundToInt(probability * 100); |
| | | } |
| | | else |
| | | { |