public void Init(bool bWin) { this.m_allAchievements = new bool[8]; this.m_curAchievemnt = RES_SHOW_ACHIEVEMENT_TYPE.RES_SHOW_ACHIEVEMENT_COUNT; if ((Singleton <BattleLogic> .GetInstance().battleStat != null) && (Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat != null)) { PlayerKDA hostKDA = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat.GetHostKDA(); if (hostKDA != null) { uint mvpPlayer = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, bWin); if ((mvpPlayer != 0) && (mvpPlayer == hostKDA.PlayerId)) { this.m_allAchievements[7] = true; } COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo; if (acntInfo != null) { if (acntInfo.dwCurWeekContinousWinNum == 15) { this.m_allAchievements[0] = true; } else if (acntInfo.dwCurWeekContinousWinNum == 10) { this.m_allAchievements[2] = true; } else if (acntInfo.dwCurWeekContinousWinNum == 5) { this.m_allAchievements[4] = true; } } IEnumerator <HeroKDA> enumerator = hostKDA.GetEnumerator(); while (enumerator.MoveNext()) { HeroKDA current = enumerator.Current; if (current != null) { if (current.LegendaryNum > 0) { this.m_allAchievements[5] = true; } if (current.PentaKillNum > 0) { this.m_allAchievements[1] = true; } if (current.QuataryKillNum > 0) { this.m_allAchievements[3] = true; } if (current.TripleKillNum > 0) { this.m_allAchievements[6] = true; } } } } } }
public static void DoCoinTweenEnd() { if (PVESettleView._coinLTD != null && PVESettleView._coinTweenText != null) { PVESettleView._coinTweenText.text = string.Format("+{0}", PVESettleView._coinTo.ToString("N0")); if (PVESettleView._coinMulti != null && Singleton <BattleStatistic> .GetInstance().acntInfo != null) { COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo; CUICommonSystem.AppendMultipleText(PVESettleView._coinTweenText, CUseable.GetMultiple(acntInfo.dwPvpSettleBaseCoin, ref PVESettleView._coinMulti, 0, -1)); } PVESettleView._coinLTD.cancel(); PVESettleView._coinLTD = null; PVESettleView._coinTweenText = null; PVESettleView._coinMulti = null; } }
public static void DoCoinTweenEnd() { if (CSettlementView._coinLTD != null && CSettlementView._coinTweenText != null) { CSettlementView._coinTweenText.set_text(string.Format("+{0}", CSettlementView._coinTo.ToString("N0"))); COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo; if (Singleton <BattleStatistic> .GetInstance().multiDetail != null) { CUICommonSystem.AppendMultipleText(CSettlementView._coinTweenText, CUseable.GetMultiple(acntInfo.dwPvpSettleBaseCoin, ref Singleton <BattleStatistic> .GetInstance().multiDetail, 0, -1)); } CSettlementView._coinLTD.cancel(); CSettlementView._coinLTD = null; CSettlementView._coinTweenText = null; } if (CSettlementView._continueBtn != null) { CSettlementView._continueBtn.CustomSetActive(true); CSettlementView._continueBtn = null; } }
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()); } } } }
private static void ShowReward(CUIFormScript belongForm, COMDT_SETTLE_RESULT_DETAIL settleData) { if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo() == null) { return; } GameObject gameObject = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/Panel_Gold").gameObject; Text component = gameObject.transform.Find("GoldNum").gameObject.GetComponent <Text>(); GameObject gameObject2 = gameObject.transform.Find("GoldMax").gameObject; if (settleData.stAcntInfo.bReachDailyLimit > 0) { gameObject2.CustomSetActive(true); } else { gameObject2.CustomSetActive(false); } component.text = "0"; COMDT_REWARD_DETAIL stReward = settleData.stReward; COMDT_ACNT_INFO stAcntInfo = settleData.stAcntInfo; if (stAcntInfo != null) { GameObject gameObject3 = belongForm.transform.FindChild("Root/Panel_Award/Award/Panel_PlayerExp/PvpExpNode").gameObject; Text component2 = gameObject3.transform.FindChild("PvpExpTxt").gameObject.GetComponent <Text>(); Text component3 = gameObject3.transform.FindChild("AddPvpExpTxt").gameObject.GetComponent <Text>(); RectTransform component4 = gameObject3.transform.FindChild("PvpExpSliderBg/BasePvpExpSlider").gameObject.GetComponent <RectTransform>(); RectTransform component5 = gameObject3.transform.FindChild("PvpExpSliderBg/AddPvpExpSlider").gameObject.GetComponent <RectTransform>(); Text component6 = gameObject3.transform.FindChild("PlayerName").gameObject.GetComponent <Text>(); CUIHttpImageScript component7 = gameObject3.transform.FindChild("HeadImage").gameObject.GetComponent <CUIHttpImageScript>(); Text component8 = gameObject3.transform.FindChild("PvpLevelTxt").gameObject.GetComponent <Text>(); Image component9 = gameObject3.transform.FindChild("NobeIcon").gameObject.GetComponent <Image>(); MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component9, (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwCurLevel, false); Image component10 = gameObject3.transform.FindChild("HeadFrame").gameObject.GetComponent <Image>(); MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component10, (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwHeadIconId); component8.text = string.Format("Lv.{0}", stAcntInfo.dwPvpLv.ToString()); ResAcntPvpExpInfo dataByKey = GameDataMgr.acntPvpExpDatabin.GetDataByKey((uint)((byte)stAcntInfo.dwPvpLv)); GameObject gameObject4 = gameObject3.transform.FindChild("ExpMax").gameObject; if (stAcntInfo.bExpDailyLimit == 0) { gameObject4.CustomSetActive(false); } component2.text = string.Format("{0}/{1}", stAcntInfo.dwPvpExp, dataByKey.dwNeedExp); component3.text = string.Format("+{0}", stAcntInfo.dwPvpSettleExp); CUICommonSystem.AppendMultipleText(component3, CUseable.GetMultiple(stAcntInfo.dwPvpSettleBaseExp, ref settleData.stMultipleDetail, 15, -1)); component6.text = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().Name; string headUrl = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().HeadUrl; if (!CSysDynamicBlock.bLobbyEntryBlocked) { component7.SetImageUrl(headUrl); } if (stAcntInfo.dwPvpSettleExp > 0u) { Singleton <CSoundManager> .GetInstance().PostEvent("UI_count_jingyan", null); } float num = 0f; if (stAcntInfo.dwPvpExp < stAcntInfo.dwPvpSettleExp) { component4.sizeDelta = new Vector2(num * 260f, component4.sizeDelta.y); PVESettleView._lvUpGrade = stAcntInfo.dwPvpLv; } else { num = (stAcntInfo.dwPvpExp - stAcntInfo.dwPvpSettleExp) / dataByKey.dwNeedExp; component4.sizeDelta = new Vector2(num * 260f, component4.sizeDelta.y); PVESettleView._lvUpGrade = 0u; } float expTo = stAcntInfo.dwPvpExp / dataByKey.dwNeedExp; PVESettleView._expFrom = num; PVESettleView._expTo = expTo; component5.sizeDelta = new Vector2(num * 260f, component5.sizeDelta.y); PVESettleView._expTweenRect = component5; PVESettleView._coinFrom = 0f; PVESettleView._coinTo = 0f; for (int i = 0; i < (int)stReward.bNum; i++) { COMDT_REWARD_INFO cOMDT_REWARD_INFO = stReward.astRewardDetail[i]; byte bType = cOMDT_REWARD_INFO.bType; if (bType == 11) { PVESettleView._coinTo = cOMDT_REWARD_INFO.stRewardInfo.dwPvpCoin; PVESettleView._coinMulti = settleData.stMultipleDetail; } } PVESettleView._coinTweenText = component; PVESettleView.DoCoinAndExpTween(); } ListView <COMDT_REWARD_INFO> listView = new ListView <COMDT_REWARD_INFO>(); GameObject gameObject5 = belongForm.transform.Find("Root/Panel_Award/Award/Panel_QQVIPGold").gameObject; if (gameObject5 != null) { gameObject5.CustomSetActive(false); } GameObject gameObject6 = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/FirstGain").gameObject; if (gameObject6 != null) { gameObject6.CustomSetActive(false); } for (int j = 0; j < (int)stReward.bNum; j++) { COMDT_REWARD_INFO cOMDT_REWARD_INFO = stReward.astRewardDetail[j]; byte bType = cOMDT_REWARD_INFO.bType; if (bType != 6) { if (bType == 11) { CUICommonSystem.AppendMultipleText(component, CUseable.GetMultiple(stAcntInfo.dwPvpSettleBaseCoin, ref settleData.stMultipleDetail, 0, -1)); if (gameObject5 != null) { gameObject5.CustomSetActive(false); Text component11 = gameObject5.transform.FindChild("Text_Value").gameObject.GetComponent <Text>(); GameObject gameObject7 = gameObject5.transform.FindChild("Icon_QQVIP").gameObject; GameObject gameObject8 = gameObject5.transform.FindChild("Icon_QQSVIP").gameObject; gameObject7.CustomSetActive(false); gameObject8.CustomSetActive(false); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); uint qqVipExtraCoin = CUseable.GetQqVipExtraCoin(cOMDT_REWARD_INFO.stRewardInfo.dwPvpCoin, ref settleData.stMultipleDetail, 0); if (masterRoleInfo != null && qqVipExtraCoin > 0u) { component11.text = string.Format("+{0}", qqVipExtraCoin); if (masterRoleInfo.HasVip(16)) { gameObject5.CustomSetActive(true); gameObject8.CustomSetActive(true); } else if (masterRoleInfo.HasVip(1)) { gameObject5.CustomSetActive(true); gameObject7.CustomSetActive(true); } } gameObject5.CustomSetActive(false); } } } else { listView.Add(stReward.astRewardDetail[j]); if (gameObject6 != null) { gameObject6.CustomSetActive(false); } } } GameObject gameObject9 = belongForm.transform.Find("Root/Panel_Award/Award/ItemAndCoin/itemCell").gameObject; gameObject9.CustomSetActive(false); if (listView.get_Count() > 0) { Text component12 = gameObject9.transform.FindChild("ItemName").gameObject.GetComponent <Text>(); gameObject9.CustomSetActive(true); COMDT_REWARD_INFO cOMDT_REWARD_INFO = listView.get_Item(0); PVESettleView.SetItemEtcCell(belongForm, gameObject9, component12, cOMDT_REWARD_INFO, settleData); } }
public void Init(bool bWin) { this.m_allAchievements = new bool[8]; this.m_curAchievemnt = 8; if (Singleton <BattleLogic> .GetInstance().battleStat == null || Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat == null) { return; } PlayerKDA hostKDA = Singleton <BattleLogic> .GetInstance().battleStat.m_playerKDAStat.GetHostKDA(); if (hostKDA == null) { return; } uint mvpPlayer = Singleton <BattleStatistic> .get_instance().GetMvpPlayer(hostKDA.PlayerCamp, bWin); if (mvpPlayer != 0u && mvpPlayer == hostKDA.PlayerId) { this.m_allAchievements[7] = true; } COMDT_ACNT_INFO acntInfo = Singleton <BattleStatistic> .GetInstance().acntInfo; if (acntInfo != null) { if (acntInfo.dwCurWeekContinousWinNum == 15u) { this.m_allAchievements[0] = true; } else if (acntInfo.dwCurWeekContinousWinNum == 10u) { this.m_allAchievements[2] = true; } else if (acntInfo.dwCurWeekContinousWinNum == 5u) { this.m_allAchievements[4] = true; } } ListView <HeroKDA> .Enumerator enumerator = hostKDA.GetEnumerator(); while (enumerator.MoveNext()) { HeroKDA current = enumerator.get_Current(); if (current != null) { if (current.LegendaryNum > 0) { this.m_allAchievements[5] = true; } if (current.PentaKillNum > 0) { this.m_allAchievements[1] = true; } if (current.QuataryKillNum > 0) { this.m_allAchievements[3] = true; } if (current.TripleKillNum > 0) { this.m_allAchievements[6] = true; } } } }