Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | { |
| | | Int2 _equipPosition;translator.Get(L, 2, out _equipPosition); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetEquipStarLevel( _equipPosition ); |
| | | int gen_ret = gen_to_be_invoked.GetStarLevel( _equipPosition ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | |
| | | starLimit = itemLevelStars[equip.config.LV];
|
| | | }
|
| | | }
|
| | | var star = Mathf.Min(starLimit, equipStarModel.GetEquipStarLevel(equipPosition));
|
| | | var star = Mathf.Min(starLimit, equipStarModel.GetStarLevel(equipPosition));
|
| | | if (star < condition.equipStar)
|
| | | {
|
| | | return false;
|
| | |
| | | m_ItemName.color = UIHelper.GetUIColor(item.config.ItemColor, true);
|
| | |
|
| | | var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
|
| | | var starLevel = Mathf.Min(maxStar, equipStarModel.GetEquipStarLevel(new Int2(equipLevel, equipPlace)));
|
| | | var starLevel = Mathf.Min(maxStar, equipStarModel.GetStarLevel(new Int2(equipLevel, equipPlace)));
|
| | | m_EquipStar.text = starLevel == 0 ? string.Empty : Language.Get("EquipStarLevel", starLevel);
|
| | | }
|
| | | }
|
| | |
| | | });
|
| | |
|
| | | var maxStar = EquipStarModel.GetMaxStarLevel(equip.config.ItemColor, equip.config.LV);
|
| | | var starLevel = Mathf.Min(maxStar, equipStarModel.GetEquipStarLevel(equipPosition));
|
| | | var starLevel = Mathf.Min(maxStar, equipStarModel.GetStarLevel(equipPosition));
|
| | | m_EquipStar.text = starLevel == 0 ? string.Empty : Language.Get("EquipStarLevel", starLevel);
|
| | | }
|
| | |
|
| | |
| | | m_ItemName.color = UIHelper.GetUIColor(item.config.ItemColor, true);
|
| | |
|
| | | var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
|
| | | var starLevel = Mathf.Min(maxStar, equipStarModel.GetEquipStarLevel(new Int2(equipLevel, equipPlace)));
|
| | | var starLevel = Mathf.Min(maxStar, equipStarModel.GetStarLevel(new Int2(equipLevel, equipPlace)));
|
| | | m_EquipStar.text = Language.Get("EquipStarLevel", starLevel);
|
| | | m_EquipStar.gameObject.SetActive(starLevel>0);
|
| | | }
|
| | |
| | | if (equiped)
|
| | | {
|
| | | int equipIndex = EquipPlaceMapConfig.GetServerPlace(equipLevel, equipPlace);
|
| | | int star = equipStarModel.GetEquipStarLevel( new Int2(equipLevel, equipPlace));
|
| | | int star = equipStarModel.GetStarLevel( new Int2(equipLevel, equipPlace));
|
| | | int equipLv = 0;
|
| | | int advancedLv = 0;
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | |
| | | bool isBool = false;
|
| | | var equipPosition = new Int2(strengthModel.SelectLevel, strengthModel.SelectEquipPlace);
|
| | | int equipIndex = EquipSet.ClientPlaceToServerPlace(equipPosition);
|
| | | int star = equipStarModel.GetEquipStarLevel(equipPosition);
|
| | | int star = equipStarModel.GetStarLevel(equipPosition);
|
| | | int equipLv = 0;
|
| | | if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
|
| | | {
|
| | |
| | | |
| | | equipStarLevel.value = GetEquipStarLevel(new Int2(selectedLevel.value, selectedPlace.value)); |
| | | selectedPlace.dirty = true; |
| | | |
| | | foreach (var candidate in candidatePlaces.Values) |
| | | { |
| | | candidate.starLevel.value = GetEquipStarLevel(candidate.equipPosition); |
| | | } |
| | | } |
| | | |
| | | void OnGetUpgradeStarResult(H0721_tagMakeItemAnswer info) |
| | |
| | | { |
| | | var place = places[i]; |
| | | var equipPosition = new Int2(level, place); |
| | | candidatePlaces[place] = new EquipStarUpgradeCandidate(equipPosition); |
| | | var candidate = new EquipStarUpgradeCandidate(equipPosition); |
| | | candidate.starLevel.value = GetEquipStarLevel(equipPosition); |
| | | candidatePlaces[place] = candidate; |
| | | if (i == 0) |
| | | { |
| | | SelectPlace(equipPosition); |
| | |
| | | return max; |
| | | } |
| | | |
| | | public int GetEquipPositionMaxStarLevel(Int2 equipPosition) |
| | | { |
| | | var equipGuid = equipModel.GetEquip(equipPosition); |
| | | if (equipGuid == null) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | var equip = packModel.GetItemByGuid(equipGuid); |
| | | if (equip == null) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | return GetMaxStarLevel(equip.config.ItemColor, equip.config.LV); |
| | | } |
| | | |
| | | public int GetTotalStarLevel(int level) |
| | | { |
| | | if (!equipStars.ContainsKey(level)) |
| | |
| | | return equipStars[level].GetTotalStarLevel(); |
| | | } |
| | | |
| | | public int GetEquipStarLevel(Int2 equipPosition) |
| | | public int GetStarLevel(Int2 equipPosition) |
| | | { |
| | | if (!equipStars.ContainsKey(equipPosition.x)) |
| | | { |
| | |
| | | return equipStars[equipPosition.x].GetEquipStarLevel(equipPosition.y); |
| | | } |
| | | |
| | | public int GetEquipStarLevel(Int2 equipPosition) |
| | | { |
| | | var starLevel = GetStarLevel(equipPosition); |
| | | var maxLevel = GetEquipPositionMaxStarLevel(equipPosition); |
| | | |
| | | return Mathf.Min(starLevel, maxLevel); |
| | | } |
| | | |
| | | public List<int> GetMaterialGetWays(Int2 equipPosition, int starLevel) |
| | | { |
| | | var config = EquipStarConfig.Get(equipPosition.x, equipPosition.y, starLevel); |
| | |
| | | { |
| | | public readonly Int2 equipPosition; |
| | | public readonly LogicBool selected = new LogicBool(); |
| | | public readonly LogicInt starLevel = new LogicInt(); |
| | | |
| | | public EquipStarUpgradeCandidate(Int2 equipPosition) |
| | | { |
| | |
| | | [SerializeField] Image m_BackGround; |
| | | [SerializeField] Image m_EmptyItem; |
| | | [SerializeField] ItemCell m_ItemCell; |
| | | [SerializeField] Text m_EquipStar; |
| | | [SerializeField] Text m_Description1; |
| | | [SerializeField] Text m_Description2; |
| | | [SerializeField] Button m_Select; |
| | |
| | | var selected = this.candidate.selected.Fetch(); |
| | | m_BackGround.SetSprite(selected ? "Title_RightWindow" : "Title_PopupWindow"); |
| | | } |
| | | |
| | | if (force || this.candidate.starLevel.dirty) |
| | | { |
| | | var starLevel = this.candidate.starLevel.Fetch(); |
| | | m_EquipStar.text = starLevel >= 1 ? string.Format("{0}星", starLevel) : ""; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | [SerializeField] RectTransform m_LevelContainer; |
| | | [SerializeField] ImageCouple[] m_Stars; |
| | | [SerializeField] ItemCell m_TargetEquip; |
| | | [SerializeField] Text m_EquipStar; |
| | | [SerializeField] Materials m_Materials; |
| | | [SerializeField] Text m_SuccessRate; |
| | | [SerializeField] RectTransform m_EmptyHint; |
| | |
| | | m_TargetEquip.gameObject.SetActive(true); |
| | | m_TargetEquip.Init(equip); |
| | | currentStarLevel = model.GetEquipStarLevel(equipPosition); |
| | | |
| | | m_EquipStar.gameObject.SetActive(true); |
| | | m_EquipStar.text = currentStarLevel >= 1 ? string.Format("{0}星", currentStarLevel) : ""; |
| | | } |
| | | else |
| | | { |
| | | m_EquipStar.gameObject.SetActive(false); |
| | | m_TargetEquip.gameObject.SetActive(false); |
| | | } |
| | | |
| | |
| | | var trainCandidate = new EquipTrainCandidate(equipPosition); |
| | | trainCandidate.trainLevel.value = GetTrainLevel(equipPosition); |
| | | trainCandidate.equipGuid.value = equipModel.GetEquip(equipPosition); |
| | | trainCandidate.starLevel.value = starModel.GetEquipStarLevel(equipPosition); |
| | | candidatePlaces.Add(trainCandidate); |
| | | } |
| | | |
| | |
| | | var trainState = GetEquipPlaceTrainState(equipPosition); |
| | | equipTrainLevel.value = GetTrainLevel(equipPosition); |
| | | equipTrainMaxLevel.value = trainState == TrainState.Empty ? -1 : GetMaxTrainLevel(equipPosition); |
| | | equipTrainMaxLevel.dirty = true; |
| | | material.value = GetTrainMaterial(equipPosition); |
| | | |
| | | operateType.value = CalculateTrainOperateType(equipPosition); |
| | |
| | | var starInfo = new StarInfo(); |
| | | starInfo.equipPosition = new Int2(config.LV, config.EquipPlace); |
| | | starInfo.maxLevel = EquipStarModel.GetMaxStarLevel(config.ItemColor, config.LV); |
| | | starInfo.starLevel = starModel.GetEquipStarLevel(new Int2(config.LV, config.EquipPlace)); |
| | | starInfo.starLevel = starModel.GetStarLevel(new Int2(config.LV, config.EquipPlace)); |
| | | |
| | | return starInfo; |
| | | } |
| | |
| | | GemHoleCondition condition; |
| | | if (gemModel.TryGetGemHoleCondition(hole, out condition)) |
| | | { |
| | | var star = starModel.GetEquipStarLevel(equipPosition); |
| | | var star = starModel.GetStarLevel(equipPosition); |
| | | if (Mathf.Min(star, maxStar) < condition.equipStar) |
| | | { |
| | | return false; |