public void UpdateUI() { CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerInfoSystem.sPlayerInfoFormPath); if (form == null) { return; } CPlayerProfile profile = Singleton <CPlayerInfoSystem> .get_instance().GetProfile(); if (profile == null) { return; } this.m_famousMentorData = null; GameObject widget = form.GetWidget(21); GameObject widget2 = form.GetWidget(18); GameObject widget3 = form.GetWidget(19); GameObject widget4 = form.GetWidget(20); GameObject widget5 = form.GetWidget(22); GameObject widget6 = form.GetWidget(23); GameObject widget7 = form.GetWidget(24); GameObject widget8 = form.GetWidget(25); GameObject widget9 = form.GetWidget(26); GameObject widget10 = form.GetWidget(27); GameObject widget11 = form.GetWidget(28); GameObject widget12 = form.GetWidget(29); GameObject widget13 = form.GetWidget(30); widget12.CustomSetActive(true); widget13.CustomSetActive(false); string text = Singleton <CTextManager> .GetInstance().GetText("Common_NoData"); widget6.CustomSetActive(!profile.isMasterData); widget7.CustomSetActive(profile._mentorInfo.ullMasterUid == 0uL); widget5.CustomSetActive(profile._mentorInfo.ullMasterUid != 0uL); enMentorState mentorState = CFriendContoller.GetMentorState(profile.PvpLevel(), null); if (!profile.isMasterData) { switch (mentorState) { case enMentorState.IWantMentor: case enMentorState.IHasMentor: widget6.transform.Find("Text").GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Mentor_ProposeApprentice"); break; case enMentorState.IWantApprentice: case enMentorState.IHasApprentice: widget6.transform.Find("Text").GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Mentor_ProposeMentor"); break; default: widget6.CustomSetActive(false); break; } } if (profile._mentorInfo.dwStudentNum != 0u) { widget3.GetComponent <Text>().text = profile._mentorInfo.dwStudentNum.ToString(); } else { widget3.GetComponent <Text>().text = text; } if (profile._mentorInfo.dwFinishStudentNum != 0u) { widget4.GetComponent <Text>().text = profile._mentorInfo.dwFinishStudentNum.ToString(); } else { widget4.GetComponent <Text>().text = text; } string text2 = Utility.UTF8Convert(profile._mentorInfo.szRoleName); if (string.IsNullOrEmpty(text2)) { text2 = text; } if (mentorState == enMentorState.IWantMentor || mentorState == enMentorState.IHasMentor || profile._mentorInfo.dwMasterPoint == 0u) { this.SetTempNoData(form, text2); } else { widget10.CustomSetActive(true); widget8.CustomSetActive(true); widget9.CustomSetActive(true); GameDataMgr.famousMentorDatabin.Accept(new Action <ResFamousMentor>(this.FamousMentorInVisitor)); if (this.m_famousMentorData == null) { this.SetTempNoData(form, text2); return; } widget11.CustomSetActive(true); widget8.GetComponent <Text>().text = this.m_famousMentorData.szTitle; string prefabPath = string.Format("{0}{1}.prefab", CUIUtility.s_Sprite_System_ShareUI_Dir, this.m_famousMentorData.iLevel.ToString()); CUIUtility.SetImageSprite(widget11.GetComponent <Image>(), prefabPath, null, true, false, false, false); widget2.GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Mentor_PlayerInfo", new string[] { this.m_famousMentorData.iLevel.ToString(), this.m_famousMentorData.szTitle, profile._mentorInfo.dwMasterPoint.ToString(), text2 }); ResFamousMentor dataByKey = GameDataMgr.famousMentorDatabin.GetDataByKey(this.m_famousMentorData.dwID + 1u); if (dataByKey == null) { widget9.GetComponent <Text>().text = profile._mentorInfo.dwMasterPoint + string.Empty; } else { widget9.GetComponent <Text>().text = profile._mentorInfo.dwMasterPoint + "/" + dataByKey.dwPoint; } uint num = 0u; if (this.m_famousMentorData.dwID != 1u) { ResFamousMentor dataByKey2 = GameDataMgr.famousMentorDatabin.GetDataByKey(this.m_famousMentorData.dwID - 1u); if (dataByKey2 != null) { num = dataByKey2.dwPoint; } } if (this.m_famousMentorData.dwPoint == num) { widget10.GetComponent <Image>().fillAmount = 0f; } else { widget10.GetComponent <Image>().fillAmount = (profile._mentorInfo.dwMasterPoint - num) / (this.m_famousMentorData.dwPoint - num); } } this.mentorStateStr = null; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); enMentorState mentorState2 = CFriendContoller.GetMentorState(profile.PvpLevel(), null); enMentorState mentorState3 = CFriendContoller.GetMentorState(masterRoleInfo.PvpLevel, null); if ((mentorState2 == enMentorState.IHasApprentice || mentorState2 == enMentorState.IWantApprentice) && (mentorState3 == enMentorState.IHasMentor || mentorState3 == enMentorState.IWantMentor)) { this.mentorStateStr = Singleton <CTextManager> .GetInstance().GetText("Mentor_GetMentor"); this.m_addViewtype = 2; if (masterRoleInfo.m_mentorInfo != null && masterRoleInfo.m_mentorInfo.ullMasterUid != 0uL) { this.mentorStateStr = null; } } else if ((mentorState3 == enMentorState.IHasApprentice || mentorState3 == enMentorState.IWantApprentice) && (mentorState2 == enMentorState.IHasMentor || mentorState2 == enMentorState.IWantMentor)) { this.mentorStateStr = Singleton <CTextManager> .GetInstance().GetText("Mentor_GetApprentice"); this.m_addViewtype = 3; } widget6.CustomSetActive(this.mentorStateStr != null); }