public static void SetStarLevelPanel(uint starLevel, Transform panelTransform, CUIFormScript form) { if (panelTransform == null) { return; } int num = (int)(starLevel / 216u); int num2 = (int)(starLevel % 216u / 36u); int num3 = (int)(starLevel % 216u % 36u / 6u); int num4 = (int)(starLevel % 216u % 36u % 6u); int childCount = panelTransform.childCount; for (int i = 0; i < childCount; i++) { Transform child = panelTransform.GetChild(i); if (child == null) { return; } Image component = child.GetComponent <Image>(); if (component == null) { return; } child.gameObject.CustomSetActive(true); if (i < num) { component.SetSprite(CGuildHelper.DynamicPrefabPathCrown, form, true, false, false, false); } else if (i < num + num2) { component.SetSprite(CGuildHelper.DynamicPrefabPathSun, form, true, false, false, false); } else if (i < num + num2 + num3) { component.SetSprite(CGuildHelper.DynamicPrefabPathMoon, form, true, false, false, false); } else if (i < num + num2 + num3 + num4) { component.SetSprite(CGuildHelper.DynamicPrefabPathStar, form, true, false, false, false); } else { child.gameObject.CustomSetActive(false); } } CUICommonSystem.SetCommonTipsEvent(form, panelTransform.gameObject, CGuildHelper.GetStarLevelTipString(starLevel), enUseableTipsPos.enTop); }
private static void SetExpInfo(GameObject root, CUIFormScript formScript) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "can't find roleinfo"); if (masterRoleInfo != null) { ResAcntPvpExpInfo dataByKey = GameDataMgr.acntPvpExpDatabin.GetDataByKey((uint)((byte)masterRoleInfo.PvpLevel)); DebugHelper.Assert(dataByKey != null, "can't find resexp id={0}", new object[] { masterRoleInfo.PvpLevel }); if (dataByKey != null) { Text component = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpLevelTxt").GetComponent <Text>(); component.set_text(string.Format("Lv.{0}", dataByKey.bLevel.ToString())); Text component2 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpExpTxt").GetComponent <Text>(); Text component3 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/ExpMax").GetComponent <Text>(); Text component4 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PlayerName").GetComponent <Text>(); CUIHttpImageScript component5 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/HeadImage").GetComponent <CUIHttpImageScript>(); Image component6 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/NobeIcon").GetComponent <Image>(); Image component7 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/HeadFrame").GetComponent <Image>(); if (!CSysDynamicBlock.bSocialBlocked) { string headUrl = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().HeadUrl; component5.SetImageUrl(headUrl); MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component6, (int)Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwCurLevel, false, true, 0uL); MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component7, (int)Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwHeadIconId); } else { MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component6, 0, false, true, 0uL); } SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); DebugHelper.Assert(curLvelContext != null, "Battle Level Context is NULL!!"); GameObject gameObject = root.transform.Find("PanelA/Award/RankCon").gameObject; gameObject.CustomSetActive(false); if (curLvelContext.IsGameTypeLadder()) { COMDT_RANK_SETTLE_INFO rankInfo = Singleton <BattleStatistic> .GetInstance().rankInfo; if (rankInfo != null) { gameObject.CustomSetActive(true); Text component8 = gameObject.transform.FindChild(string.Format("txtRankName", new object[0])).gameObject.GetComponent <Text>(); Text component9 = gameObject.transform.FindChild(string.Format("WangZheXingTxt", new object[0])).gameObject.GetComponent <Text>(); component8.set_text(StringHelper.UTF8BytesToString(ref CLadderSystem.GetGradeDataByShowGrade((int)rankInfo.bNowShowGrade).szGradeDesc)); if ((int)CLadderSystem.GetGradeDataByShowGrade((int)rankInfo.bNowShowGrade).bLogicGrade == CLadderSystem.MAX_RANK_LEVEL) { Transform transform = gameObject.transform.FindChild(string.Format("XingGrid/ImgScore{0}", 1)); if (transform != null) { transform.gameObject.CustomSetActive(true); } component9.gameObject.CustomSetActive(true); component9.set_text(string.Format("X{0}", rankInfo.dwNowScore)); } else { component9.gameObject.CustomSetActive(false); int num = 1; while ((long)num <= (long)((ulong)rankInfo.dwNowScore)) { Transform transform2 = gameObject.transform.FindChild(string.Format("XingGrid/ImgScore{0}", num)); if (transform2 != null) { transform2.gameObject.CustomSetActive(true); } num++; } } root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpLevelNode").gameObject.CustomSetActive(false); } } Image component10 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/QQVIPIcon").GetComponent <Image>(); MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(component10); COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo; COMDT_REWARD_MULTIPLE_DETAIL multiDetail = Singleton <BattleStatistic> .GetInstance().multiDetail; if (multiDetail != null) { StringBuilder stringBuilder = new StringBuilder(); int multiple = CUseable.GetMultiple(acntInfo.dwPvpSettleBaseExp, ref multiDetail, 15, -1); if (multiple > 0) { COMDT_MULTIPLE_DATA[] array = null; uint multipleInfo = CUseable.GetMultipleInfo(out array, ref multiDetail, 15, -1); string[] array2 = new string[multipleInfo + 2u]; string text = multiple.ToString(); array2[0] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_1", new string[] { text }); if (array != null) { int num2 = 0; while ((long)num2 < (long)((ulong)multipleInfo)) { string text2 = string.Empty; if ((ulong)acntInfo.dwPvpSettleBaseExp * (ulong)((long)array[num2].iValue) > 0uL) { text2 = "+"; } byte bOperator = array[num2].bOperator; if (bOperator != 0) { if (bOperator != 1) { text2 += "0"; } else { text2 += (long)((ulong)acntInfo.dwPvpSettleBaseExp * (ulong)((long)array[num2].iValue) / 10000uL); } } else { text2 += array[num2].iValue; } switch (array[num2].iType) { case 1: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_6", new string[] { text2 }); break; case 2: if (masterRoleInfo.HasVip(16)) { array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_9", new string[] { text2 }); } else { array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_3", new string[] { text2 }); } break; case 3: array2[num2 + 1] = string.Format(Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_4"), text2, masterRoleInfo.GetExpWinCount(), Math.Ceiling((double)((float)masterRoleInfo.GetExpExpireHours() / 24f))); break; case 4: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_2", new string[] { masterRoleInfo.dailyPvpCnt.ToString(), text2 }); break; case 5: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_13", new string[] { text2 }); break; case 6: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_15", new string[] { text2 }); break; case 7: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Daily_Quest_FirstVictoryName", new string[] { text2 }); break; case 8: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_16", new string[] { text2 }); break; case 9: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_14", new string[] { text2 }); break; case 10: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_21", new string[] { text2 }); break; case 11: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_17", new string[] { text2 }); break; case 12: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_18", new string[] { text2 }); break; case 13: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_20", new string[] { text2 }); break; case 14: array2[num2 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_19", new string[] { text2 }); break; } num2++; } } stringBuilder.Append(array2[0]); for (int i = 1; i < array2.Length; i++) { if (!string.IsNullOrEmpty(array2[i])) { stringBuilder.Append("\n"); stringBuilder.Append(array2[i]); } } GameObject gameObject2 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/DoubleExp").gameObject; gameObject2.CustomSetActive(true); gameObject2.GetComponentInChildren <Text>().set_text(string.Format("+{0}", text)); CUICommonSystem.SetCommonTipsEvent(formScript, gameObject2, stringBuilder.ToString(), enUseableTipsPos.enLeft); } else { GameObject gameObject3 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/DoubleExp").gameObject; gameObject3.CustomSetActive(false); } GameObject gameObject4 = root.transform.Find("PanelA/Award/ItemAndCoin/Panel_Gold/GoldMax").gameObject; if (Singleton <BattleStatistic> .GetInstance().acntInfo.bReachDailyLimit > 0) { gameObject4.CustomSetActive(true); } else { gameObject4.CustomSetActive(false); } int multiple2 = CUseable.GetMultiple(acntInfo.dwPvpSettleBaseCoin, ref multiDetail, 11, -1); if (multiple2 > 0) { COMDT_MULTIPLE_DATA[] array3 = null; uint multipleInfo2 = CUseable.GetMultipleInfo(out array3, ref multiDetail, 11, -1); string[] array4 = new string[multipleInfo2 + 2u]; string text3 = multiple2.ToString(); array4[0] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_7", new string[] { text3 }); if (array3 != null) { int num3 = 0; while ((long)num3 < (long)((ulong)multipleInfo2)) { string text4 = string.Empty; if ((ulong)acntInfo.dwPvpSettleBaseCoin * (ulong)((long)array3[num3].iValue) > 0uL) { text4 = "+"; } byte bOperator2 = array3[num3].bOperator; if (bOperator2 != 0) { if (bOperator2 != 1) { text4 += "0"; } else { text4 += (long)((ulong)acntInfo.dwPvpSettleBaseCoin * (ulong)((long)array3[num3].iValue) / 10000uL); } } else { text4 += array3[num3].iValue; } switch (array3[num3].iType) { case 1: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_6", new string[] { text4 }); break; case 2: if (masterRoleInfo.HasVip(16)) { array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_9", new string[] { text4 }); } else { array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_3", new string[] { text4 }); } break; case 3: array4[num3 + 1] = string.Format(Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_10"), text4, masterRoleInfo.GetCoinWinCount(), Math.Ceiling((double)((float)masterRoleInfo.GetCoinExpireHours() / 24f))); break; case 4: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_2", new string[] { masterRoleInfo.dailyPvpCnt.ToString(), text4 }); break; case 5: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_13", new string[] { text4 }); break; case 6: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_15", new string[] { text4 }); break; case 7: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Daily_Quest_FirstVictoryName", new string[] { text4 }); break; case 8: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_16", new string[] { text4 }); break; case 9: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_14", new string[] { text4 }); break; case 10: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_21", new string[] { text4 }); break; case 11: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_17", new string[] { text4 }); break; case 12: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_18", new string[] { text4 }); break; case 13: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_20", new string[] { text4 }); break; case 14: array4[num3 + 1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_19", new string[] { text4 }); break; } num3++; } } stringBuilder.Append(array4[0]); for (int j = 1; j < array4.Length; j++) { if (!string.IsNullOrEmpty(array4[j])) { stringBuilder.Append("\n"); stringBuilder.Append(array4[j]); } } stringBuilder.Remove(0, stringBuilder.get_Length()); stringBuilder.Append(array4[0]); for (int k = 1; k < array4.Length; k++) { if (!string.IsNullOrEmpty(array4[k])) { stringBuilder.Append("\n"); stringBuilder.Append(array4[k]); } } GameObject gameObject5 = root.transform.Find("PanelA/Award/ItemAndCoin/Panel_Gold/DoubleCoin").gameObject; gameObject5.CustomSetActive(true); gameObject5.GetComponentInChildren <Text>().set_text(string.Format("+{0}", text3)); CUICommonSystem.SetCommonTipsEvent(formScript, gameObject5, stringBuilder.ToString(), enUseableTipsPos.enLeft); } else { GameObject gameObject6 = root.transform.Find("PanelA/Award/ItemAndCoin/Panel_Gold/DoubleCoin").gameObject; gameObject6.CustomSetActive(false); } } component4.set_text(masterRoleInfo.Name); RectTransform component11 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpExpSliderBg/BasePvpExpSlider").gameObject.GetComponent <RectTransform>(); RectTransform component12 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpExpSliderBg/AddPvpExpSlider").gameObject.GetComponent <RectTransform>(); if (acntInfo != null) { if (acntInfo.dwPvpSettleExp > 0u) { Singleton <CSoundManager> .GetInstance().PostEvent("UI_count_jingyan", null); } int num4 = (int)(acntInfo.dwPvpExp - acntInfo.dwPvpSettleExp); if (num4 < 0) { CSettlementView._lvUpGrade = acntInfo.dwPvpLv; } else { CSettlementView._lvUpGrade = 0u; } float num5 = Mathf.Max(0f, (float)num4 / dataByKey.dwNeedExp); float num6 = Mathf.Max(0f, ((num4 < 0) ? acntInfo.dwPvpExp : acntInfo.dwPvpSettleExp) / dataByKey.dwNeedExp); root.transform.FindChild("PanelA/Award/Panel_PlayerExp/PvpExpNode/AddPvpExpTxt").GetComponent <Text>().set_text((acntInfo.dwPvpSettleExp > 0u) ? string.Format("+{0}", acntInfo.dwPvpSettleExp).ToString() : string.Empty); if (acntInfo.dwPvpSettleExp == 0u) { root.transform.FindChild("PanelA/Award/Panel_PlayerExp/PvpExpNode/Bar2").gameObject.CustomSetActive(false); } component11.sizeDelta = new Vector2(num5 * 327.6f, component11.sizeDelta.y); component12.sizeDelta = new Vector2(num5 * 327.6f, component12.sizeDelta.y); CSettlementView._expFrom = num5; CSettlementView._expTo = num5 + num6; CSettlementView._expTweenRect = component12; component11.gameObject.CustomSetActive(num4 >= 0); component3.set_text((acntInfo.bExpDailyLimit > 0) ? Singleton <CTextManager> .GetInstance().GetText("GetExp_Limit") : string.Empty); component2.set_text(string.Format("{0}/{1}", acntInfo.dwPvpExp.ToString(), dataByKey.dwNeedExp.ToString())); } } } }
private static void SetExpInfo(GameObject root, CUIFormScript formScript) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "can't find roleinfo"); if (masterRoleInfo != null) { ResAcntPvpExpInfo dataByKey = GameDataMgr.acntPvpExpDatabin.GetDataByKey((uint)((byte)masterRoleInfo.PvpLevel)); object[] inParameters = new object[] { masterRoleInfo.PvpLevel }; DebugHelper.Assert(dataByKey != null, "can't find resexp id={0}", inParameters); if (dataByKey != null) { root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpLevelTxt").GetComponent <Text>().text = string.Format("Lv.{0}", dataByKey.bLevel.ToString()); Text component = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpExpTxt").GetComponent <Text>(); Text text3 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/ExpMax").GetComponent <Text>(); Text text4 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PlayerName").GetComponent <Text>(); CUIHttpImageScript script = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/HeadImage").GetComponent <CUIHttpImageScript>(); Image image = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/NobeIcon").GetComponent <Image>(); Image image2 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/HeadFrame").GetComponent <Image>(); if (!CSysDynamicBlock.bSocialBlocked) { string headUrl = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().HeadUrl; script.SetImageUrl(headUrl); MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(image, (int)Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwCurLevel, false); MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(image2, (int)Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwHeadIconId); } else { MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(image, 0, false); } SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); DebugHelper.Assert(curLvelContext != null, "Battle Level Context is NULL!!"); GameObject gameObject = root.transform.Find("PanelA/Award/RankCon").gameObject; gameObject.CustomSetActive(false); if (curLvelContext.IsGameTypeLadder()) { COMDT_RANK_SETTLE_INFO rankInfo = Singleton <BattleStatistic> .GetInstance().rankInfo; if (rankInfo != null) { gameObject.CustomSetActive(true); Text text5 = gameObject.transform.FindChild(string.Format("txtRankName", new object[0])).gameObject.GetComponent <Text>(); Text text6 = gameObject.transform.FindChild(string.Format("WangZheXingTxt", new object[0])).gameObject.GetComponent <Text>(); text5.text = StringHelper.UTF8BytesToString(ref GameDataMgr.rankGradeDatabin.GetDataByKey((uint)rankInfo.bNowGrade).szGradeDesc); if (rankInfo.bNowGrade == GameDataMgr.rankGradeDatabin.count) { Transform transform = gameObject.transform.FindChild(string.Format("XingGrid/ImgScore{0}", 1)); if (transform != null) { transform.gameObject.CustomSetActive(true); } text6.gameObject.CustomSetActive(true); text6.text = string.Format("X{0}", rankInfo.dwNowScore); } else { text6.gameObject.CustomSetActive(false); for (int i = 1; i <= rankInfo.dwNowScore; i++) { Transform transform2 = gameObject.transform.FindChild(string.Format("XingGrid/ImgScore{0}", i)); if (transform2 != null) { transform2.gameObject.CustomSetActive(true); } } } root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpLevelNode").gameObject.CustomSetActive(false); } } Image image3 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/QQVIPIcon").GetComponent <Image>(); MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(image3); COMDT_REWARD_MULTIPLE_DETAIL multiDetail = Singleton <BattleStatistic> .GetInstance().multiDetail; if (multiDetail != null) { string[] strArray = new string[8]; StringBuilder builder = new StringBuilder(); int num2 = CUseable.GetMultiple(ref multiDetail, 15, -1); if (num2 > 0) { COMDT_MULTIPLE_INFO comdt_multiple_info = CUseable.GetMultipleInfo(ref multiDetail, 15, -1); string[] args = new string[] { num2.ToString() }; strArray[0] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_1", args); if (comdt_multiple_info.dwPvpDailyRatio > 0) { string[] textArray2 = new string[] { masterRoleInfo.dailyPvpCnt.ToString(), (comdt_multiple_info.dwPvpDailyRatio / 100).ToString() }; strArray[1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_2", textArray2); } if (comdt_multiple_info.dwQQVIPRatio > 0) { if (masterRoleInfo.HasVip(0x10)) { string[] textArray3 = new string[] { (comdt_multiple_info.dwQQVIPRatio / 100).ToString() }; strArray[2] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_9", textArray3); } else { string[] textArray4 = new string[] { (comdt_multiple_info.dwQQVIPRatio / 100).ToString() }; strArray[2] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_3", textArray4); } } if (comdt_multiple_info.dwPropRatio > 0) { strArray[3] = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pvp_settle_Common_Tips_4"), comdt_multiple_info.dwPropRatio / 100, masterRoleInfo.GetExpWinCount(), Math.Ceiling((double)(((float)masterRoleInfo.GetExpExpireHours()) / 24f))); } if (comdt_multiple_info.dwWealRatio > 0) { string[] textArray5 = new string[] { (comdt_multiple_info.dwWealRatio / 100).ToString() }; strArray[4] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_6", textArray5); } if (comdt_multiple_info.dwWXGameCenterLoginRatio > 0) { string[] textArray6 = new string[] { (comdt_multiple_info.dwWXGameCenterLoginRatio / 100).ToString() }; strArray[5] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_13", textArray6); } if (comdt_multiple_info.dwQQGameCenterLoginRatio > 0) { string[] textArray7 = new string[] { (comdt_multiple_info.dwQQGameCenterLoginRatio / 100).ToString() }; strArray[6] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_14", textArray7); } if (comdt_multiple_info.dwIOSVisitorLoginRatio > 0) { string[] textArray8 = new string[] { (comdt_multiple_info.dwIOSVisitorLoginRatio / 100).ToString() }; strArray[7] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_14", textArray8); } builder.Append(strArray[0]); for (int j = 1; j < strArray.Length; j++) { if (!string.IsNullOrEmpty(strArray[j])) { builder.Append("\n"); builder.Append(strArray[j]); } } GameObject obj3 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/DoubleExp").gameObject; obj3.CustomSetActive(true); obj3.GetComponentInChildren <Text>().text = string.Format("+{0}%", num2); CUICommonSystem.SetCommonTipsEvent(formScript, obj3, builder.ToString(), enUseableTipsPos.enLeft); } else { root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/DoubleExp").gameObject.CustomSetActive(false); } GameObject obj5 = root.transform.Find("PanelA/Award/ItemAndCoin/Panel_Gold/GoldMax").gameObject; if (Singleton <BattleStatistic> .GetInstance().acntInfo.bReachDailyLimit > 0) { obj5.CustomSetActive(true); } else { obj5.CustomSetActive(false); } int num4 = CUseable.GetMultiple(ref multiDetail, 11, -1); if (num4 > 0) { COMDT_MULTIPLE_INFO comdt_multiple_info2 = CUseable.GetMultipleInfo(ref multiDetail, 11, -1); strArray = new string[8]; string[] textArray9 = new string[] { num4.ToString() }; strArray[0] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_7", textArray9); if (comdt_multiple_info2.dwPvpDailyRatio > 0) { string[] textArray10 = new string[] { masterRoleInfo.dailyPvpCnt.ToString(), (comdt_multiple_info2.dwPvpDailyRatio / 100).ToString() }; strArray[1] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_8", textArray10); } if (comdt_multiple_info2.dwQQVIPRatio > 0) { if (masterRoleInfo.HasVip(0x10)) { string[] textArray11 = new string[] { (comdt_multiple_info2.dwQQVIPRatio / 100).ToString() }; strArray[2] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_9", textArray11); } else { string[] textArray12 = new string[] { (comdt_multiple_info2.dwQQVIPRatio / 100).ToString() }; strArray[2] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_3", textArray12); } } if (comdt_multiple_info2.dwPropRatio > 0) { strArray[3] = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pvp_settle_Common_Tips_10"), comdt_multiple_info2.dwPropRatio / 100, masterRoleInfo.GetCoinWinCount(), Math.Ceiling((double)(((float)masterRoleInfo.GetCoinExpireHours()) / 24f))); } if (comdt_multiple_info2.dwWealRatio > 0) { string[] textArray13 = new string[] { (comdt_multiple_info2.dwWealRatio / 100).ToString() }; strArray[4] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_12", textArray13); } if (comdt_multiple_info2.dwWXGameCenterLoginRatio > 0) { string[] textArray14 = new string[] { (comdt_multiple_info2.dwWXGameCenterLoginRatio / 100).ToString() }; strArray[5] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_13", textArray14); } if (comdt_multiple_info2.dwQQGameCenterLoginRatio > 0) { string[] textArray15 = new string[] { (comdt_multiple_info2.dwQQGameCenterLoginRatio / 100).ToString() }; strArray[6] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_14", textArray15); } if (comdt_multiple_info2.dwIOSVisitorLoginRatio > 0) { string[] textArray16 = new string[] { (comdt_multiple_info2.dwIOSVisitorLoginRatio / 100).ToString() }; strArray[7] = Singleton <CTextManager> .instance.GetText("Pvp_settle_Common_Tips_14", textArray16); } builder.Remove(0, builder.Length); builder.Append(strArray[0]); for (int k = 1; k < strArray.Length; k++) { if (!string.IsNullOrEmpty(strArray[k])) { builder.Append("\n"); builder.Append(strArray[k]); } } GameObject obj6 = root.transform.Find("PanelA/Award/ItemAndCoin/Panel_Gold/DoubleCoin").gameObject; obj6.CustomSetActive(true); obj6.GetComponentInChildren <Text>().text = string.Format("+{0}%", num4); CUICommonSystem.SetCommonTipsEvent(formScript, obj6, builder.ToString(), enUseableTipsPos.enLeft); } else { root.transform.Find("PanelA/Award/ItemAndCoin/Panel_Gold/DoubleCoin").gameObject.CustomSetActive(false); } } text4.text = masterRoleInfo.Name; RectTransform transform3 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpExpSliderBg/BasePvpExpSlider").gameObject.GetComponent <RectTransform>(); RectTransform transform4 = root.transform.Find("PanelA/Award/Panel_PlayerExp/PvpExpNode/PvpExpSliderBg/AddPvpExpSlider").gameObject.GetComponent <RectTransform>(); COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo; if (acntInfo != null) { if (acntInfo.dwPvpSettleExp > 0) { Singleton <CSoundManager> .GetInstance().PostEvent("UI_count_jingyan", null); } int num6 = (int)(acntInfo.dwPvpExp - acntInfo.dwPvpSettleExp); if (num6 < 0) { _lvUpGrade = acntInfo.dwPvpLv; } else { _lvUpGrade = 0; } float num7 = Mathf.Max((float)0f, (float)(((float)num6) / ((float)dataByKey.dwNeedExp))); float num8 = Mathf.Max((float)0f, (float)(((num6 >= 0) ? ((float)acntInfo.dwPvpSettleExp) : ((float)acntInfo.dwPvpExp)) / ((float)dataByKey.dwNeedExp))); root.transform.FindChild("PanelA/Award/Panel_PlayerExp/PvpExpNode/AddPvpExpTxt").GetComponent <Text>().text = (acntInfo.dwPvpSettleExp <= 0) ? string.Empty : string.Format("+{0}", acntInfo.dwPvpSettleExp).ToString(); if (acntInfo.dwPvpSettleExp == 0) { root.transform.FindChild("PanelA/Award/Panel_PlayerExp/PvpExpNode/Bar2").gameObject.CustomSetActive(false); } transform3.sizeDelta = new Vector2(num7 * 327.6f, transform3.sizeDelta.y); transform4.sizeDelta = new Vector2(num7 * 327.6f, transform4.sizeDelta.y); _expFrom = num7; _expTo = num7 + num8; _expTweenRect = transform4; transform3.gameObject.CustomSetActive(num6 >= 0); text3.text = (acntInfo.bExpDailyLimit <= 0) ? string.Empty : Singleton <CTextManager> .GetInstance().GetText("GetExp_Limit"); component.text = string.Format("{0}/{1}", acntInfo.dwPvpExp.ToString(), dataByKey.dwNeedExp.ToString()); } } } }
public static void InitMatchingEntry(CUIFormScript form) { if (form == null) { return; } Transform transform = form.transform; uint[] array = new uint[23]; uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_1V1"), ref array[0]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_3V3"), ref array[1]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_1V1_1"), ref array[2]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_1V1_1"), ref array[3]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_1V1_1"), ref array[4]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_3V3Team_1"), ref array[5]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_3V3Team_1"), ref array[6]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_3V3Team_1"), ref array[7]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5Team_1"), ref array[8]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5Team_1"), ref array[9]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5Team_1"), ref array[10]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_Melee_Team_1"), ref array[11]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_Melee_Team_1"), ref array[12]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_Melee_Team_1"), ref array[13]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_5V5"), ref array[14]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_MELEE"), ref array[15]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_Fire"), ref array[16]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_5V5Clone"), ref array[17]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_5V5CD"), ref array[18]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_5V5Miwu"), ref array[19]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5TeamMiwu_1"), ref array[20]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5TeamMiwu_1"), ref array[21]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5TeamMiwu_1"), ref array[22]); CUIMiniEventScript[] array2 = new CUIMiniEventScript[] { transform.Find("panelGroup2/btnGroup/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup2/btnGroup/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button1/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button1/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button1/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button2/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button2/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button2/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button4/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button4/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button4/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button3/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button3/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button3/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup2/btnGroup/Button4").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup2/btnGroup/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup5/btnGroup/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup5/btnGroup/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup5/btnGroup/Button4").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup2/btnGroup/Button5").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button5/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button5/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button5/btnGrp/Button3").GetComponent <CUIMiniEventScript>() }; for (int i = 0; i < array.Length; i++) { array2[i].m_onClickEventParams.tagUInt = array[i]; array2[i].m_onClickEventParams.tag = (int)CMatchingView.mapDifficultyList[i]; } transform.Find("panelGroup1/btnGroup/Button1").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 1; transform.Find("panelGroup1/btnGroup/Button2").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 2; transform.Find("panelGroup1/btnGroup/ButtonEntertain").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 3; transform.Find("panelGroup3/btnGroup/Button1").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 0; transform.Find("panelGroup3/btnGroup/Button2").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 1; transform.Find("panelGroup3/btnGroup/Button4").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 2; transform.Find("panelGroup3/btnGroup/Button3").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 3; transform.Find("panelGroup3/btnGroup/Button5").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 4; transform.FindChild("panelGroup5/btnGroup/Button1").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 0; transform.FindChild("panelGroup5/btnGroup/Button3").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 1; transform.FindChild("panelGroup5/btnGroup/Button4").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 2; CMatchingView.ShowDefaultHeadImgStartLogicLadderLevel = (int)CLadderSystem.GetGradeDataByShowGrade((int)GameDataMgr.GetGlobeValue(RES_GLOBAL_CONF_TYPE.RES_GLOBAL_CONF_TYPE_SHOW_DEFAULT_HEADIMG_START_LADDERLEVEL)).bLogicGrade; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return; } GameObject gameObject = transform.FindChild("CoinAndExp/DoubleCoin").gameObject; GameObject gameObject2 = transform.FindChild("CoinAndExp/DoubleExp").gameObject; gameObject2.CustomSetActive(false); gameObject.CustomSetActive(false); masterRoleInfo.UpdateCoinAndExpValidTime(); if (masterRoleInfo.HaveExtraCoin()) { gameObject.CustomSetActive(true); string text = string.Empty; string text2 = string.Empty; if (masterRoleInfo.GetCoinExpireHours() > 0) { string text3 = Singleton <CTextManager> .GetInstance().GetText("DoubleCoinExpireTimeTips"); text = string.Format(text3, masterRoleInfo.GetCoinExpireHours() / 24, masterRoleInfo.GetCoinExpireHours() % 24); } if (masterRoleInfo.GetCoinWinCount() > 0u) { string text4 = Singleton <CTextManager> .GetInstance().GetText("DoubleCoinCountWinTips"); text2 = string.Format(text4, masterRoleInfo.GetCoinWinCount()); } if (string.IsNullOrEmpty(text)) { CUICommonSystem.SetCommonTipsEvent(form, gameObject, string.Format("{0}", text2), enUseableTipsPos.enBottom); } else if (string.IsNullOrEmpty(text2)) { CUICommonSystem.SetCommonTipsEvent(form, gameObject, string.Format("{0}", text), enUseableTipsPos.enBottom); } else { CUICommonSystem.SetCommonTipsEvent(form, gameObject, string.Format("{0}\n{1}", text, text2), enUseableTipsPos.enBottom); } } if (masterRoleInfo.HaveExtraExp()) { gameObject2.CustomSetActive(true); string text5 = string.Empty; string text6 = string.Empty; if (masterRoleInfo.GetExpExpireHours() > 0) { text5 = string.Format(Singleton <CTextManager> .GetInstance().GetText("DoubleExpExpireTimeTips"), masterRoleInfo.GetExpExpireHours() / 24, masterRoleInfo.GetExpExpireHours() % 24); } if (masterRoleInfo.GetExpWinCount() > 0u) { text6 = string.Format(Singleton <CTextManager> .GetInstance().GetText("DoubleExpCountWinTips"), masterRoleInfo.GetExpWinCount()); } if (string.IsNullOrEmpty(text5)) { CUICommonSystem.SetCommonTipsEvent(form, gameObject2, string.Format("{0}", text6), enUseableTipsPos.enBottom); } else if (string.IsNullOrEmpty(text6)) { CUICommonSystem.SetCommonTipsEvent(form, gameObject2, string.Format("{0}", text5), enUseableTipsPos.enBottom); } else { CUICommonSystem.SetCommonTipsEvent(form, gameObject2, string.Format("{0}\n{1}", text5, text6), enUseableTipsPos.enBottom); } } if (CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform2 = form.transform.Find("panelBottom/btnShop"); if (transform2) { transform2.gameObject.CustomSetActive(false); } Transform transform3 = form.transform.Find("CoinAndExp"); if (transform3) { transform3.gameObject.CustomSetActive(false); } } GameObject gameObject3 = form.gameObject.transform.Find("Panel").gameObject; gameObject3.transform.Find("Name").gameObject.GetComponent <Text>().set_text(masterRoleInfo.Name); ResAcntPvpExpInfo dataByKey = GameDataMgr.acntPvpExpDatabin.GetDataByKey((uint)((byte)masterRoleInfo.PvpLevel)); DebugHelper.Assert(dataByKey != null); DebugHelper.Assert(dataByKey.dwNeedExp > 0u); GameObject gameObject4 = gameObject3.transform.Find("DegreeBarBg/bar").gameObject; gameObject4.GetComponent <RectTransform>().sizeDelta = new Vector2(204f * Math.Min(1f, masterRoleInfo.PvpExp * 1f / dataByKey.dwNeedExp), 19f); gameObject3.transform.Find("DegreeTitle").gameObject.CustomSetActive(false); if ((ulong)masterRoleInfo.PvpLevel >= (ulong)((long)GameDataMgr.acntPvpExpDatabin.Count())) { gameObject3.transform.Find("DegreeNum").gameObject.GetComponent <Text>().set_text(Singleton <CTextManager> .GetInstance().GetText("PVP_Level_Max")); } else { gameObject3.transform.Find("DegreeNum").gameObject.GetComponent <Text>().set_text(string.Format("{0}/{1}", masterRoleInfo.PvpExp, dataByKey.dwNeedExp)); } gameObject3.transform.Find("DegreeIcon").gameObject.CustomSetActive(false); MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime(NewbieGuideTriggerTimeType.enterPvpEntry, new uint[0]); }
public static void InitMatchingEntry(CUIFormScript form) { if (form != null) { Transform transform = form.transform; uint[] numArray = new uint[0x13]; uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_1V1"), out numArray[0]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_3V3"), out numArray[1]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_1V1_1"), out numArray[2]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_1V1_1"), out numArray[3]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_1V1_1"), out numArray[4]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_3V3Team_1"), out numArray[5]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_3V3Team_1"), out numArray[6]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_3V3Team_1"), out numArray[7]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5Team_1"), out numArray[8]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5Team_1"), out numArray[9]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_5V5Team_1"), out numArray[10]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_Melee_Team_1"), out numArray[11]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_Melee_Team_1"), out numArray[12]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_Robot_Melee_Team_1"), out numArray[13]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_5V5"), out numArray[14]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_MELEE"), out numArray[15]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_Fire"), out numArray[0x10]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_5V5Clone"), out numArray[0x11]); uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_5V5CD"), out numArray[0x12]); CUIMiniEventScript[] scriptArray = new CUIMiniEventScript[] { transform.Find("panelGroup2/btnGroup/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup2/btnGroup/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button1/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button1/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button1/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button2/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button2/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button2/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button4/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button4/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button4/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button3/btnGrp/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button3/btnGrp/Button2").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup3/btnGroup/Button3/btnGrp/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup2/btnGroup/Button4").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup2/btnGroup/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup5/btnGroup/Button1").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup5/btnGroup/Button3").GetComponent <CUIMiniEventScript>(), transform.Find("panelGroup5/btnGroup/Button4").GetComponent <CUIMiniEventScript>() }; for (int i = 0; i < numArray.Length; i++) { scriptArray[i].m_onClickEventParams.tagUInt = numArray[i]; scriptArray[i].m_onClickEventParams.tag = (int)mapDifficultyList[i]; } transform.Find("panelGroup1/btnGroup/Button1").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 1; transform.Find("panelGroup1/btnGroup/Button2").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 2; transform.Find("panelGroup1/btnGroup/ButtonEntertain").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 3; transform.Find("panelGroup3/btnGroup/Button1").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 0; transform.Find("panelGroup3/btnGroup/Button2").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 1; transform.Find("panelGroup3/btnGroup/Button4").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 2; transform.Find("panelGroup3/btnGroup/Button3").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 3; transform.FindChild("panelGroup5/btnGroup/Button1").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 0; transform.FindChild("panelGroup5/btnGroup/Button3").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 1; transform.FindChild("panelGroup5/btnGroup/Button4").GetComponent <CUIMiniEventScript>().m_onClickEventParams.tag = 2; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { GameObject gameObject = transform.FindChild("CoinAndExp/DoubleCoin").gameObject; GameObject obj3 = transform.FindChild("CoinAndExp/DoubleExp").gameObject; obj3.CustomSetActive(false); gameObject.CustomSetActive(false); masterRoleInfo.UpdateCoinAndExpValidTime(); if (masterRoleInfo.HaveExtraCoin()) { gameObject.CustomSetActive(true); string str = string.Empty; string str2 = string.Empty; if (masterRoleInfo.GetCoinExpireHours() > 0) { str = string.Format(Singleton <CTextManager> .GetInstance().GetText("DoubleCoinExpireTimeTips"), masterRoleInfo.GetCoinExpireHours() / 0x18, masterRoleInfo.GetCoinExpireHours() % 0x18); } if (masterRoleInfo.GetCoinWinCount() > 0) { str2 = string.Format(Singleton <CTextManager> .GetInstance().GetText("DoubleCoinCountWinTips"), masterRoleInfo.GetCoinWinCount()); } if (string.IsNullOrEmpty(str)) { CUICommonSystem.SetCommonTipsEvent(form, gameObject, string.Format("{0}", str2), enUseableTipsPos.enBottom); } else if (string.IsNullOrEmpty(str2)) { CUICommonSystem.SetCommonTipsEvent(form, gameObject, string.Format("{0}", str), enUseableTipsPos.enBottom); } else { CUICommonSystem.SetCommonTipsEvent(form, gameObject, string.Format("{0}\n{1}", str, str2), enUseableTipsPos.enBottom); } } if (masterRoleInfo.HaveExtraExp()) { obj3.CustomSetActive(true); string str5 = string.Empty; string str6 = string.Empty; if (masterRoleInfo.GetExpExpireHours() > 0) { str5 = string.Format(Singleton <CTextManager> .GetInstance().GetText("DoubleExpExpireTimeTips"), masterRoleInfo.GetExpExpireHours() / 0x18, masterRoleInfo.GetExpExpireHours() % 0x18); } if (masterRoleInfo.GetExpWinCount() > 0) { str6 = string.Format(Singleton <CTextManager> .GetInstance().GetText("DoubleExpCountWinTips"), masterRoleInfo.GetExpWinCount()); } if (string.IsNullOrEmpty(str5)) { CUICommonSystem.SetCommonTipsEvent(form, obj3, string.Format("{0}", str6), enUseableTipsPos.enBottom); } else if (string.IsNullOrEmpty(str6)) { CUICommonSystem.SetCommonTipsEvent(form, obj3, string.Format("{0}", str5), enUseableTipsPos.enBottom); } else { CUICommonSystem.SetCommonTipsEvent(form, obj3, string.Format("{0}\n{1}", str5, str6), enUseableTipsPos.enBottom); } } if (CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform2 = form.transform.Find("panelBottom/btnShop"); if (transform2 != null) { transform2.gameObject.CustomSetActive(false); } Transform transform3 = form.transform.Find("CoinAndExp"); if (transform3 != null) { transform3.gameObject.CustomSetActive(false); } } GameObject obj4 = form.gameObject.transform.Find("Panel").gameObject; obj4.transform.Find("Name").gameObject.GetComponent <Text>().text = masterRoleInfo.Name; ResAcntPvpExpInfo dataByKey = GameDataMgr.acntPvpExpDatabin.GetDataByKey((uint)((byte)masterRoleInfo.PvpLevel)); DebugHelper.Assert(dataByKey != null); DebugHelper.Assert(dataByKey.dwNeedExp > 0); obj4.transform.Find("DegreeBarBg/bar").gameObject.GetComponent <RectTransform>().sizeDelta = new Vector2(204f * Math.Min((float)1f, (float)((masterRoleInfo.PvpExp * 1f) / ((float)dataByKey.dwNeedExp))), 19f); obj4.transform.Find("DegreeTitle").gameObject.CustomSetActive(false); if (masterRoleInfo.PvpLevel >= GameDataMgr.acntPvpExpDatabin.Count()) { obj4.transform.Find("DegreeNum").gameObject.GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("PVP_Level_Max"); } else { obj4.transform.Find("DegreeNum").gameObject.GetComponent <Text>().text = string.Format("{0}/{1}", masterRoleInfo.PvpExp, dataByKey.dwNeedExp); } obj4.transform.Find("DegreeIcon").gameObject.CustomSetActive(false); MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime(NewbieGuideTriggerTimeType.enterPvpEntry, new uint[0]); } } }
public static void InitLadderEntry(CUIFormScript form, ref COMDT_RANKDETAIL data, bool isQualified) { Transform transform = form.transform.Find("MainPanel/SingleStart"); Transform transform2 = form.transform.Find("MainPanel/DoubleStart"); Button btn = null; Button component = null; if (transform != null) { btn = transform.GetComponent <Button>(); } if (transform2 != null) { component = transform2.GetComponent <Button>(); } Transform transform3 = form.transform.Find("StatPanel/lblLeagueTime"); if (isQualified) { form.transform.Find("StatPanel").gameObject.CustomSetActive(true); form.transform.Find("ReqPanel").gameObject.CustomSetActive(false); form.transform.Find("MainPanel/ImgLock").gameObject.CustomSetActive(false); form.transform.Find("MainPanel/RankCon").gameObject.CustomSetActive(true); GameObject gameObject = form.transform.Find("StatPanel/SeasonCon").gameObject; GameObject obj3 = form.transform.Find("StatPanel/lblNoRecord").gameObject; GameObject go = form.transform.Find("MainPanel/RankCon").gameObject; Text text = form.transform.Find("StatPanel/SeasonCon/txtGameNum").GetComponent <Text>(); Text text2 = form.transform.Find("StatPanel/SeasonCon/txtWinNum").GetComponent <Text>(); Text text3 = form.transform.Find("StatPanel/SeasonCon/txtContiWinNum").GetComponent <Text>(); Text text4 = form.transform.Find("StatPanel/txtLeagueTime").GetComponent <Text>(); Text text5 = form.transform.Find("MainPanel/txtContiWin").GetComponent <Text>(); if (data != null) { if (gameObject != null) { gameObject.CustomSetActive(data.dwTotalFightCnt != 0); } if (obj3 != null) { obj3.CustomSetActive(data.dwTotalFightCnt == 0); } if (btn != null) { CUICommonSystem.SetButtonEnableWithShader(btn, data.bState == 1, true); } if (component != null) { CUICommonSystem.SetButtonEnableWithShader(component, data.bState == 1, true); } if (text != null) { text.text = data.dwTotalFightCnt.ToString(); } if (text2 != null) { text2.text = data.dwTotalWinCnt.ToString(); } if (text3 != null) { text3.text = data.dwMaxContinuousWinCnt.ToString(); } if (text4 != null) { text4.text = GetSeasonText(ref data); } if (transform3 != null) { transform3.gameObject.CustomSetActive(true); } if (text5 != null) { if (data.dwContinuousWin >= 3) { text5.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("In_Continueos_Win"), data.dwContinuousWin); text5.gameObject.CustomSetActive(true); } else { text5.gameObject.CustomSetActive(false); } } ShowRankDetail(go, ref data, false); int num = (data.bMaxSeasonGrade - 1) / 3; string strContent = Singleton <CTextManager> .instance.GetText("Ladder_Award_Tips_" + num); Image image = form.transform.Find("AwardGroup/award1").GetComponent <Image>(); image.SetSprite(CUIUtility.s_Sprite_System_Ladder_Dir + "award" + num, form, true, false, false); CUICommonSystem.SetCommonTipsEvent(form, image.gameObject, strContent, enUseableTipsPos.enLeft); form.transform.Find("AwardGroup").gameObject.CustomSetActive(true); } else { if (btn != null) { CUICommonSystem.SetButtonEnableWithShader(btn, false, true); } if (component != null) { CUICommonSystem.SetButtonEnableWithShader(component, false, true); } form.transform.Find("AwardGroup").gameObject.CustomSetActive(false); } } else { if (btn != null) { CUICommonSystem.SetButtonEnableWithShader(btn, false, true); } if (component != null) { CUICommonSystem.SetButtonEnableWithShader(component, false, true); } form.transform.Find("AwardGroup").gameObject.CustomSetActive(false); form.transform.Find("StatPanel").gameObject.CustomSetActive(false); form.transform.Find("ReqPanel").gameObject.CustomSetActive(true); form.transform.Find("MainPanel/ImgLock").gameObject.CustomSetActive(true); form.transform.Find("MainPanel/RankCon").gameObject.CustomSetActive(false); Text text6 = form.transform.Find("ReqPanel/txtHeroNum").GetComponent <Text>(); Text text7 = form.transform.Find("ReqPanel/txtReqHeroNum").GetComponent <Text>(); int haveHeroCount = 0; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { haveHeroCount = masterRoleInfo.GetHaveHeroCount(false); } text6.text = string.Format("{0}/{1}", haveHeroCount, CLadderSystem.REQ_HERO_NUM); text7.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Ladder_Req_Hero_Num"), CLadderSystem.REQ_HERO_NUM.ToString()); if (transform3 != null) { transform3.gameObject.CustomSetActive(false); } } }
public void RefreshForm(int effectIndex = -1) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_talentBuyFormPath); if (form != null) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { CHeroInfo heroInfo = masterRoleInfo.GetHeroInfo(this.m_heroID, false); HeroTalentViewInfo heroTalentViewInfo = TalentView.GetHeroTalentViewInfo(this.m_heroID); if (heroTalentViewInfo != null) { CUIListScript[] scriptArray = new CUIListScript[] { form.gameObject.transform.Find("Panel/PanelLeft/List1").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List2").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List3").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List4").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List5").GetComponent <CUIListScript>() }; for (int i = 0; i < 5; i++) { CUIListScript script2 = scriptArray[i]; HeroTalentLevelInfo info4 = heroTalentViewInfo.m_heroTalentLevelInfoList[i]; ResTalentLib lib = info4.m_tarlentLibList[info4.m_tarlentLibList.Count - 1]; Button component = script2.transform.Find("BtnBuyCoin").GetComponent <Button>(); Text text = script2.transform.Find("lblTips").GetComponent <Text>(); Text text2 = text.transform.Find("Text").GetComponent <Text>(); Image image = text.transform.Find("Image").GetComponent <Image>(); component.gameObject.CustomSetActive(false); text2.gameObject.CustomSetActive(false); image.gameObject.CustomSetActive(false); if (!TalentView.IsHaveTalentBuyFunc(this.m_heroID)) { text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_3"); } else if ((heroInfo == null) && (i == 0)) { text.text = Singleton <CTextManager> .instance.GetText("Skin_NeedToBuyAHero"); } else if (TalentView.IsBuyTalent(this.m_heroID, i)) { text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_2"); } else if ((i > 0) && !TalentView.IsBuyTalent(this.m_heroID, i - 1)) { int num2 = heroTalentViewInfo.m_heroTalentLevelInfoList[i - 1].m_tarlentLibList.Count - 1; string str = StringHelper.UTF8BytesToString(ref heroTalentViewInfo.m_heroTalentLevelInfoList[i - 1].m_tarlentLibList[num2].szName); string[] args = new string[] { str }; text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_4", args); } else { if (heroInfo == null) { continue; } string str2 = StringHelper.UTF8BytesToString(ref CHeroInfo.GetHeroProficiency(heroInfo.cfgInfo.bJob, heroInfo.m_ProficiencyLV).szTitle); string str3 = StringHelper.UTF8BytesToString(ref CHeroInfo.GetHeroProficiency(heroInfo.cfgInfo.bJob, info4.m_levelDetail.bLvl3UnlockLvl).szTitle); if (heroInfo.m_ProficiencyLV < info4.m_levelDetail.bLvl3UnlockLvl) { component.gameObject.CustomSetActive(true); stUIEventParams eventParams = new stUIEventParams { tag = info4.m_levelDetail.bLvl3LockCostType, tagUInt = info4.m_levelDetail.dwLvl3LockCostPrice, tag2 = i, tagStr = StringHelper.UTF8BytesToString(ref lib.szName) }; CMallSystem.SetPayButton(form, (RectTransform)component.transform, CMallSystem.ResBuyTypeToPayType(info4.m_levelDetail.bLvl3LockCostType), info4.m_levelDetail.dwLvl3LockCostPrice, enUIEventID.Talent_Buy_BtnSellClick, ref eventParams); string[] textArray2 = new string[] { str3 }; text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_7", textArray2); text2.gameObject.CustomSetActive(true); image.gameObject.CustomSetActive(true); CMallSystem.SetPayButton(form, (RectTransform)text.transform, CMallSystem.ResBuyTypeToPayType(info4.m_levelDetail.bLvl3UnLockCostType), info4.m_levelDetail.dwLvl3UnLockCostPrice, enUIEventID.None, ref eventParams); } else { component.gameObject.CustomSetActive(true); stUIEventParams params2 = new stUIEventParams { tag = info4.m_levelDetail.bLvl3UnLockCostType, tagUInt = info4.m_levelDetail.dwLvl3UnLockCostPrice, tag2 = i, tagStr = StringHelper.UTF8BytesToString(ref lib.szName) }; CMallSystem.SetPayButton(form, (RectTransform)component.transform, CMallSystem.ResBuyTypeToPayType(info4.m_levelDetail.bLvl3UnLockCostType), info4.m_levelDetail.dwLvl3UnLockCostPrice, enUIEventID.Talent_Buy_BtnSellClick, ref params2); string[] textArray3 = new string[] { str2 }; text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_8", textArray3); } } script2.SetElementAmount(info4.m_tarlentLibList.Count); for (int j = 0; j < info4.m_tarlentLibList.Count; j++) { GameObject gameObject = script2.GetElemenet(j).gameObject.transform.Find("talentCell").gameObject; Image image2 = gameObject.transform.Find("imgIcon").GetComponent <Image>(); Image image3 = gameObject.transform.Find("lock").GetComponent <Image>(); Text text3 = gameObject.transform.Find("lblName").GetComponent <Text>(); CanvasGroup group = gameObject.GetComponent <CanvasGroup>(); CUIEventScript script3 = gameObject.GetComponent <CUIEventScript>(); ResTalentLib lib2 = info4.m_tarlentLibList[j]; if (lib2 == null) { return; } image2.SetSprite(CUIUtility.s_Sprite_Dynamic_Talent_Dir + lib2.dwIcon, form, true, false, false); image2.color = CUIUtility.s_Color_White; text3.text = StringHelper.UTF8BytesToString(ref lib2.szName); stTalentEventParams params3 = new stTalentEventParams { talentLevelIndex = (byte)i, talentInfo = info4.m_tarlentLibList[j], isCanLearn = false }; if (TalentView.IsNeedBuy(i, j) && !TalentView.IsBuyTalent(this.m_heroID, i)) { params3.isHaveTalent = false; image3.gameObject.CustomSetActive(true); image2.color = CUIUtility.s_Color_GrayShader; } else { params3.isHaveTalent = true; image3.gameObject.CustomSetActive(false); image2.color = CUIUtility.s_Color_White; if ((effectIndex == i) && (j == (info4.m_tarlentLibList.Count - 1))) { CUICommonSystem.PlayAnimator(gameObject, "UnLock_Anim"); } } string strContent = StringHelper.UTF8BytesToString(ref lib2.szDesc); CUICommonSystem.SetCommonTipsEvent(form, gameObject, strContent, enUseableTipsPos.enTop); } } } } } }