Merge branch 'master' into MainWinAdjust
# Conflicts:
# System/Equip/EquipSlotBehaviour.cs
| | |
| | | { |
| | | 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); |
| | | |
| | | |
| | |
| | | PlayerAuctionItemInfo.BidderPrice = (int)RefreshAuctionItem.BidderPrice;
|
| | | PlayerAuctionItemInfoDic[RefreshAuctionItem.ItemGUID] = PlayerAuctionItemInfo;
|
| | | }
|
| | | if (BiddingItemInfoDic.ContainsKey(RefreshAuctionItem.ItemGUID))//玩家竞价中的物品
|
| | | {
|
| | | var biddingItemInfo = BiddingItemInfoDic[RefreshAuctionItem.ItemGUID];
|
| | | biddingItemInfo.TimeStr = RefreshAuctionItem.AddTime;
|
| | | biddingItemInfo.Time = DateTime.Parse(RefreshAuctionItem.AddTime);
|
| | | biddingItemInfo.BidderID = (int)RefreshAuctionItem.BidderID;
|
| | | biddingItemInfo.BidderPrice = (int)RefreshAuctionItem.BidderPrice;
|
| | | BiddingItemInfoDic[RefreshAuctionItem.ItemGUID] = biddingItemInfo;
|
| | | }
|
| | | if (RefreshAuctionItemUpdate != null)
|
| | | {
|
| | | RefreshAuctionItemUpdate();
|
| | |
| | | } |
| | | private void BiddingItemInfoUpdate()
|
| | | {
|
| | |
|
| | | OnCreateGridLineCellItem(m_ScrollerControllerItem);
|
| | | } |
| | | private void OnClickJobTipBtn()
|
| | | {
|
| | |
| | | var indexList = model.FullServiceAuctionList.FindIndex((x) => { return x.ItemGUID == GUID; });
|
| | | if (indexList == -1)
|
| | | {
|
| | | DebugEx.LogError("未查找到相应的列表数据");
|
| | | DebugEx.Log("未查找到相应的列表数据");
|
| | | return;
|
| | | }
|
| | | var fullServiceAuction = model.FullServiceAuctionList[indexList];
|
| | |
| | | |
| | | var starLevel = starModel.GetEquipStarLevel(slot.equipPosition); |
| | | m_Star.gameObject.SetActive(true); |
| | | m_Star.text = starLevel > 1 ? string.Format("{0}星", starLevel) : ""; |
| | | m_Star.text = starLevel >= 1 ? string.Format("{0}星", starLevel) : ""; |
| | | } |
| | | } |
| | | } |
| | |
| | | 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)));
|
| | | m_EquipStar.text = Language.Get("EquipStarLevel", starLevel);
|
| | | 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));
|
| | | m_EquipStar.text = Language.Get("EquipStarLevel", starLevel);
|
| | | var starLevel = Mathf.Min(maxStar, equipStarModel.GetStarLevel(equipPosition));
|
| | | m_EquipStar.text = starLevel == 0 ? string.Empty : Language.Get("EquipStarLevel", starLevel);
|
| | | }
|
| | |
|
| | | for (int i = 0; i < m_GemHoles.Length; i++)
|
| | |
| | | [SerializeField] Text m_EquipPlaceName;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] ItemCell m_Item;
|
| | | [SerializeField] Text m_EquipStar;
|
| | | [SerializeField] Text m_ItemName;
|
| | | [SerializeField] Button m_Select;
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
|
| | |
|
| | | int equipLevel = 0;
|
| | | int equipPlace = 0;
|
| | |
| | | m_Item.Init(item);
|
| | | m_ItemName.text = Language.Get("ZBQH_01", item.config.ItemName, strengthLv);
|
| | | 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.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); |
| | | } |
| | | |
| | |
| | | public readonly LogicString equipGuid = new LogicString(); |
| | | public readonly LogicInt trainLevel = new LogicInt(); |
| | | public readonly LogicBool selected = new LogicBool(); |
| | | public readonly LogicInt starLevel = new LogicInt(); |
| | | |
| | | public EquipTrainCandidate(Int2 equipPosition) |
| | | { |
| | |
| | | [SerializeField] Image m_BackGround; |
| | | [SerializeField] Image m_EmptyItem; |
| | | [SerializeField] ItemCell m_ItemCell; |
| | | [SerializeField] Text m_Star; |
| | | [SerializeField] Text m_Description1; |
| | | [SerializeField] Text m_Description2; |
| | | [SerializeField] Button m_Select; |
| | |
| | | { |
| | | m_ItemCell.gameObject.SetActive(false); |
| | | m_EmptyItem.gameObject.SetActive(true); |
| | | m_Star.gameObject.SetActive(false); |
| | | var place = this.candidate.equipPosition.y; |
| | | m_Description1.text = string.Format("部位:{0}", UIHelper.GetEquipPlaceName(place)); |
| | | m_Description1.color = UIHelper.GetUIColor(TextColType.Black, true); |
| | |
| | | m_Description1.color = UIHelper.GetUIColor(item.config.ItemColor, true); |
| | | m_Description2.text = string.Format("洗练等级:{0}级", this.candidate.trainLevel.Fetch()); |
| | | m_Description2.color = UIHelper.GetUIColor(TextColType.Black, true); |
| | | |
| | | var starLevel = this.candidate.starLevel.Fetch(); |
| | | m_Star.gameObject.SetActive(true); |
| | | m_Star.text = starLevel >= 1 ? string.Format("{0}星", starLevel) : ""; |
| | | } |
| | | } |
| | | |
| | |
| | | if (force || this.candidate.trainLevel.dirty) |
| | | { |
| | | m_Description2.text = string.Format("洗练等级:{0}级", this.candidate.trainLevel.Fetch()); |
| | | m_Description2.color = UIHelper.GetUIColor(TextColType.Black, true); |
| | | } |
| | | } |
| | | |
| | |
| | | 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); |
| | |
| | | |
| | | [SerializeField] Text m_MaxTrainLevel; |
| | | [SerializeField] ItemCell m_TargetEquip; |
| | | [SerializeField] Text m_EquipStar; |
| | | [SerializeField] RectTransform m_EquipEmpty; |
| | | |
| | | [SerializeField] MaterialCell m_MaterialCell; |
| | |
| | | m_EquipEmpty.gameObject.SetActive(false); |
| | | m_TargetEquip.gameObject.SetActive(true); |
| | | m_TargetEquip.Init(equip); |
| | | |
| | | var starLevel = starModel.GetEquipStarLevel(equipPosition); |
| | | m_EquipStar.gameObject.SetActive(true); |
| | | m_EquipStar.text = starLevel >= 1 ? string.Format("{0}星", starLevel) : ""; |
| | | } |
| | | else |
| | | { |
| | | m_EquipEmpty.gameObject.SetActive(true); |
| | | m_TargetEquip.gameObject.SetActive(false); |
| | | m_EquipStar.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | { |
| | | m_Label.gameObject.SetActive(true); |
| | | m_Label.SetSprite("Equiped_a"); |
| | | m_Star.text = string.Format("{0}星", baseInfo.star); |
| | | m_Star.text = baseInfo.star >= 1 ? string.Format("{0}星", baseInfo.star) : ""; |
| | | } |
| | | else if (baseInfo.isAuction) |
| | | { |