/// <summary> /// ��Ҫ���� /// </summary> /// <param name="?"></param> public void SetCostText(bool isEnough = true) { if (isEnough) { m_lblCost.text = LanguageData.GetContent(175); m_lblCost.effectStyle = UILabel.Effect.None; } else { m_lblCost.text = MogoUtils.GetRedString(LanguageData.GetContent(175)); m_lblCost.effectStyle = UILabel.Effect.Outline; m_lblCost.effectColor = new Color32(50, 39, 9, 255); } }
/// <summary> /// 需要消耗 /// </summary> /// <param name="isEnough"></param> private void SetSkillDialogInfoLearnCostText(bool isEnough) { if (isEnough) { m_lblSkillDialogInfoLearnCostText.text = LanguageData.GetContent(46007); m_lblSkillDialogInfoLearnCostText.effectStyle = UILabel.Effect.None; } else { m_lblSkillDialogInfoLearnCostText.text = MogoUtils.GetRedString(LanguageData.GetContent(46007)); m_lblSkillDialogInfoLearnCostText.effectStyle = UILabel.Effect.Outline; m_lblSkillDialogInfoLearnCostText.effectColor = new Color32(50, 39, 9, 255); } }
private List <List <EquipExchangeViewData> > GetViewData(int level) { List <List <EquipExchangeViewData> > dataList = new List <List <EquipExchangeViewData> >(); dataList.Add(new List <EquipExchangeViewData>()); dataList.Add(new List <EquipExchangeViewData>()); Debug.Log("item.level:" + level); HashSet <int> dataSet = ItemExchangeData.DataDic[level]; foreach (int i in dataSet) { ItemExchangeData exchangeData = ItemExchangeData.dataMap.Get(i); Debug.Log("exchangeData.GetRewardByVocation(MogoWorld.thePlayer.vocation):" + exchangeData.GetRewardByVocation(MogoWorld.thePlayer.vocation)); ItemParentData itemReward = ItemParentData.GetItem(exchangeData.GetRewardByVocation(MogoWorld.thePlayer.vocation)); EquipExchangeViewData viewData = new EquipExchangeViewData() { goldNum = "x" + exchangeData.GoldNum, title = itemReward.Name, itemId = itemReward.id, materialNum = "x" + exchangeData.MeterailNum, materialId = exchangeData.MeterialId, onExchange = () => { OnExchange(exchangeData.id); } }; if (exchangeData.GoldNum <= 0) { viewData.goldNum = string.Empty; } if (exchangeData.GoldNum > MogoWorld.thePlayer.gold) { viewData.goldNum = MogoUtils.GetRedString(viewData.goldNum); } if (exchangeData.MeterailNum > InventoryManager.Instance.GetItemNumById(exchangeData.MeterialId)) { viewData.materialNum = MogoUtils.GetRedString(viewData.materialNum); } if (exchangeData.subtype < 3) { dataList[exchangeData.subtype - 1].Add(viewData); m_materilaIdDic[exchangeData.subtype - 1] = exchangeData.MeterialId; } else { dataList[0].Add(viewData); m_materilaIdDic[0] = exchangeData.MeterialId; } } return(dataList); }
public void SetNeedLevel(int needLevel) { string needLeveStr = LanguageData.GetContent(911, needLevel); if (needLevel > MogoWorld.thePlayer.level) { needLeveStr = MogoUtils.GetRedString(needLeveStr); m_lblNeedLevel.effectStyle = UILabel.Effect.Outline; m_lblNeedLevel.effectColor = new Color32(50, 39, 9, 255); } else { m_lblNeedLevel.effectStyle = UILabel.Effect.None; } m_lblNeedLevel.text = needLeveStr; }
private EquipUpgradeViewManager.EquipUpgradeViewData GetViewdata(ItemEquipment m_equip) { EquipUpgradeViewManager.EquipUpgradeViewData viewData = new EquipUpgradeViewManager.EquipUpgradeViewData(); viewData.oldEquipId = m_equip.templateId; ItemEffectData itemEffect = ItemEffectData.dataMap.Get(m_equip.effectId); ItemEquipmentData newEquip = null; foreach (int id in itemEffect.reward1.Keys) { newEquip = ItemEquipmentData.dataMap.Get(id); viewData.newEquipId = newEquip.id; break; } viewData.materialIdList = new List <int>(); viewData.materilNumStrList = new List <string>(); foreach (KeyValuePair <int, int> pair in itemEffect.costId) { Mogo.Util.LoggerHelper.Debug(pair.Key); ItemParentData item = ItemParentData.GetItem(pair.Key); if (item.itemType > 0) { viewData.materialIdList.Add(item.id); string numStr = string.Empty; int num = InventoryManager.Instance.GetItemNumByIdAndType(item.id, item.itemType); int needNum = pair.Value; numStr = string.Concat(num, "/", needNum); if (needNum > num) { numStr = MogoUtils.GetRedString(numStr); } viewData.materilNumStrList.Add(numStr); } else { viewData.needGold = "X" + pair.Value; } } int level = MogoWorld.thePlayer.level; viewData.power = LanguageData.GetContent(190000, newEquip.GetScore(level) - m_equip.GetScore(level)); return(viewData); }
/// <summary> /// 设置需要的玩家等级 /// </summary> /// <param name="level"></param> public void SetSkillNeedLevel(int level) { if (MogoWorld.thePlayer.level >= level) { SetSkillDialogInfoNeedLevelText(true); m_lblSkillNeedLevel.text = level.ToString(); m_lblSkillNeedLevel.effectStyle = UILabel.Effect.None; } else { SetSkillDialogInfoNeedLevelText(false); m_lblSkillNeedLevel.text = MogoUtils.GetRedString(level.ToString()); m_lblSkillNeedLevel.effectStyle = UILabel.Effect.Outline; m_lblSkillNeedLevel.effectColor = new Color32(50, 39, 9, 255); } }
static private void OnChallengeShow() { //Debug.Log("RemainConvoyTimesReq"); DragonBaseData data = DragonBaseData.dataMap.Get(1); if (data.levelNeed > MogoWorld.thePlayer.level) { ChallengeUIViewManager.Instance.SetChallengeText((int)ChallengeGridID.DragonMatch, MogoUtils.GetRedString(LanguageData.dataMap[26346].Format(data.levelNeed))); ChallengeUIViewManager.Instance.SetGray((int)ChallengeGridID.DragonMatch, true); ChallengeUIViewManager.Instance.ShowEnterTipFX((int)ChallengeGridID.DragonMatch, false); SendDataChangeMsg(ChallengeUIGridMessage.ChallengeState.Lock); } else { ChallengeUIViewManager.Instance.SetGray((int)ChallengeGridID.DragonMatch, false); DragonMatchManager.Instance.CheckDragonStatus(); //RpcCall("RemainConvoyTimesReq"); } }
/// <summary> /// 设置需要消耗的金币 /// </summary> /// <param name="gold"></param> public void SetSkillLearnCostGold(int gold) { if (MogoWorld.thePlayer.gold >= gold) { SetSkillDialogInfoLearnCostText(true); m_lblSkillLearnCostGold.text = gold.ToString(); m_lblSkillLearnCostGold.effectStyle = UILabel.Effect.Outline; m_lblSkillLearnCostGold.effectColor = new Color32(13, 52, 0, 255); m_lblSkillLearnCostGold.color = new Color32(96, 254, 0, 255); } else { SetSkillDialogInfoLearnCostText(false); m_lblSkillLearnCostGold.text = MogoUtils.GetRedString(gold.ToString()); m_lblSkillLearnCostGold.effectStyle = UILabel.Effect.Outline; m_lblSkillLearnCostGold.effectColor = new Color32(50, 39, 9, 255); } }
private void SetupChooseDragonView() { //Debug.Log("SetupChooseDragonView"); List <ChooseDragonGridData> chooseDragonGridDataList = new List <ChooseDragonGridData>(); List <DragonQualityData> dragonDataList = DragonQualityData.GetDataList(); for (int i = 0; i < dragonDataList.Count; i++) { ChooseDragonGridData gridData = new ChooseDragonGridData(); gridData.dragonID = dragonDataList[i].id; gridData.dragonQuality = dragonDataList[i].quality; if (dragonDataList[i].quality != m_currentData.dragonQuality) { gridData.enable = false; } else { gridData.enable = true; } gridData.finishTime = LanguageData.dataMap.Get(26300).Format((dragonDataList[i].convoyCompleteTime[m_currentData.currentRound + 1] / 60)); gridData.additionReward = LanguageData.GetContent(26301, (dragonDataList[i].rewardAddition / 100)); if (i == 4 && m_currentData.dragonQuality != 6) { gridData.showBuy = true; } else { gridData.showBuy = false; } chooseDragonGridDataList.Add(gridData); } ChooseDragonUILogicManager.Instance.SetChooseDragonGridDataList(chooseDragonGridDataList); DragonQualityData currentDragon = DragonQualityData.GetDragonQualityData(m_currentData.dragonQuality); string nextDragonName = string.Empty; if (m_currentData.dragonQuality < 6) { nextDragonName = DragonQualityData.GetDragonQualityData(m_currentData.dragonQuality + 1).GetName(true); } ChooseDragonUIViewManager.Instance.SetCurrentChooseDragon(currentDragon.GetName(true), nextDragonName); ChooseDragonUIViewManager.Instance.SetRewardCurrentTime(m_currentData.currentRound + 1); ChooseDragonUIViewManager.Instance.SetRewardExp(Rewards[1]); ChooseDragonUIViewManager.Instance.SetRewardGold(Rewards[2]); int[] cost = DragonBaseData.GetCostItem(); int costNum = cost[1]; int costID = cost[0]; int materialNum = InventoryManager.Instance.GetItemNumById(costID); string costStr = string.Empty; if (costNum <= materialNum) { ChooseDragonUIViewManager.Instance.SetUpgradeNeedIcon(ItemParentData.GetItem(costID).Icon); costStr = string.Concat(costNum, "/", materialNum); ChooseDragonUIViewManager.Instance.SetUpgradeNeedNum(costStr); } else { int priceId = DragonBaseData.dataMap[1].upgradeQualityCost; int price = PriceListData.GetPrice(priceId, 0); costStr = string.Concat(price, "/", MogoWorld.thePlayer.diamond); if (price > MogoWorld.thePlayer.diamond) { costStr = MogoUtils.GetRedString(costStr); } ChooseDragonUIViewManager.Instance.SetUpgradeNeedIcon(ItemParentData.GetItem(3).Icon); ChooseDragonUIViewManager.Instance.SetUpgradeNeedNum(costStr); } }