private static void GetGuildMemberGradeAndStar(GuildMemInfo guildMemInfo, out int rankGrade, out int rankStar) { if (guildMemInfo != null) { rankGrade = CLadderSystem.ConvertEloToRank(guildMemInfo.stBriefInfo.dwScoreOfRank); rankStar = CLadderSystem.GetCurXingByEloAndRankLv(guildMemInfo.stBriefInfo.dwScoreOfRank, (uint)rankGrade); } else { rankGrade = 0; rankStar = 0; } }
private static void GetFriendRankGradeAndStar(COMDT_FRIEND_INFO friendInfo, out int rankGrade, out int rankStar) { if (friendInfo != null && friendInfo.RankVal != null) { uint elo = friendInfo.RankVal[7]; rankGrade = CLadderSystem.ConvertEloToRank(elo); rankStar = CLadderSystem.GetCurXingByEloAndRankLv(elo, (uint)rankGrade); } else { rankGrade = 0; rankStar = 0; } }
public void ShowMentorSearchInfo(COMDT_FRIEND_INFO info, CFriendModel.FriendType friendType, FriendShower.ItemType type) { enMentorState mentorState = CFriendContoller.GetMentorState(0u, null); bool bActive = UT.NeedShowGenderGradeByMentor(type, friendType) && (mentorState == enMentorState.IWantMentor || mentorState == enMentorState.IHasMentor); if (this.m_mentorTitleObj != null) { this.m_mentorTitleObj.transform.parent.gameObject.CustomSetActive(true); this.m_mentorTitleObj.gameObject.CustomSetActive(bActive); string text = string.Empty; try { text = GameDataMgr.famousMentorDatabin.GetDataByKey(info.dwMasterLvl).szTitle; } catch (Exception var_3_84) { } this.m_mentorTitleObj.GetComponent <Text>().text = text; } if (this.m_mentorFamousObj != null) { this.m_mentorFamousObj.gameObject.CustomSetActive(bActive); this.m_mentorFamousObj.text = Singleton <CTextManager> .GetInstance().GetText("Mentor_LvNApprenticeCountInfo", new string[] { info.dwMasterLvl.ToString(), info.dwStudentNum.ToString() }); } if (this.m_RankIconObj != null) { int num = CLadderSystem.ConvertEloToRank(info.RankVal[7]); CLadderView.ShowRankDetail(this.m_RankIconObj.transform.parent.gameObject, (byte)num, Singleton <RankingSystem> .GetInstance().GetRankClass(info.stUin.ullUid), 1u, false, true, false, false, true); } if (UT.NeedShowGenderGradeByMentor(type, friendType)) { this.ShowGenderType(info.bGender); } }