private void SetMagicInfo(MagicBottleRankData rankData) { base.gameObject.name = rankData.userid + "|" + rankData.rank.ToString(); SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(rankData.icon.ToString()); if (dataById != null) { this.Portrait.spriteName = dataById.headportrait_icon; } SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(rankData.pictureFrame.ToString()); if (dataById2 != null) { this.Frame.spriteName = dataById2.pictureframe_icon; } this.SummonerLv.text = rankData.level.ToString(); this._mName.text = rankData.name; this.MagicBottleLv.text = rankData.magicbottlelevel.ToString() + "级"; this.MagicBottleExp.text = rankData.todayexp.ToString(); this.MagicBottleIcon.spriteName = Tools_ParsePrice.BottleLevelParse(rankData.magicbottlelevel); if (rankData.rank == 1) { this.Bg.spriteName = "Ranking_list_bg_02"; this._mName.color = new Color32(212, 254, 249, 255); this.MagicBottleIcon.transform.Find("bg").GetComponent <UISprite>().color = new Color32(52, 12, 0, 155); this.MagicBottleExp.transform.Find("bg").GetComponent <UISprite>().color = new Color32(52, 12, 0, 155); } else { this.Bg.spriteName = "Ranking_list_bg_01"; this._mName.color = new Color32(212, 254, 249, 255); this.MagicBottleIcon.transform.Find("bg").GetComponent <UISprite>().color = new Color32(0, 18, 52, 155); this.MagicBottleExp.transform.Find("bg").GetComponent <UISprite>().color = new Color32(0, 18, 52, 155); } if (rankData.rank <= 3 && rankData.rank > 0) { this.RankSprite.gameObject.SetActive(true); this.RankLabel.gameObject.SetActive(false); this.RankSprite.spriteName = "Ranking_images_number_" + rankData.rank.ToString(); } else { this.RankSprite.gameObject.SetActive(false); this.RankLabel.gameObject.SetActive(true); this.RankLabel.text = rankData.rank.ToString(); } if (rankData.userid == ModelManager.Instance.Get_userData_X().UserId) { this._mName.color = new Color32(214, 7, 182, 255); this._mName.text = ModelManager.Instance.Get_userData_filed_X("NickName"); } this._mName.GetComponent <AllochroicLabelChecker>().RenderLabel(rankData.CharmRankValue); this._mName.text = rankData.name; }
public void ShowDetailsInfo(string userinfo) { string text; string text2; if (userinfo.Contains('|')) { string[] array = userinfo.Split(new char[] { '|' }); text = array[0]; text2 = array[1]; } else { text = userinfo; text2 = string.Empty; } PlayerData playerData = ModelManager.Instance.Get_GetPlayerData_X(); if (playerData == null) { return; } string b = ToolsFacade.ServerCurrentTime.ToString("y-M-d"); CtrlManager.OpenWindow(WindowID.DetailsInfo, null); this.transform.localPosition = new Vector3(-373.8f, 84.21f, 0f); this.transform.name = text; SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(playerData.Icon.ToString()); if (dataById == null) { ClientLogger.Error(" Can't find Headportrait id=" + playerData.Icon + " in SysSummonersHeadportraitVo"); } else { this.Portrait.mainTexture = ResourceManager.Load <Texture>(dataById.headportrait_icon.ToString(), true, true, null, 0, false); } SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(playerData.Icon2.ToString()); if (dataById2 == null) { ClientLogger.Error(" Can't find Headportrait frame id=" + playerData.Icon2 + " in SysSummonersPictureframeVo"); } else { this.PortraitFrame.spriteName = dataById2.pictureframe_icon; } this.Name.text = playerData.SummName; this.Name.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(playerData.CharmRankvalue); this.SummonerLv.text = CharacterDataMgr.instance.GetUserLevel(playerData.SummLevel).ToString(); this.MobaID.text = "(魔霸号:" + playerData.SummId + ")"; this.LikeCount.text = ModelManager.Instance.Get_GetPlayerData_X().likeCount.ToString(); if (text == ModelManager.Instance.Get_userData_X().UserId) { this.LikeBth.gameObject.SetActive(false); this.LikeCount.gameObject.SetActive(false); } else { this.LikeBth.gameObject.SetActive(true); this.LikeCount.gameObject.SetActive(true); } this.GetState((double)playerData.LadderScore, playerData.LadderRank); int level = (playerData.bottlelevel != 0) ? playerData.bottlelevel : 1; this.MagicIcon.mainTexture = ResourceManager.Load <Texture>(Tools_ParsePrice.BottleLevelParse(level), true, true, null, 0, false); if (playerData.battleinfos != null) { this.BattleInfo(playerData.battleinfos); } this.Charm.text = playerData.usercp.ToString(); this.MagicRank.text = text2; this.PentaKill.text = playerData.pentaKill.ToString(); this.QuataryKill.text = playerData.quadraKill.ToString(); this.TripleKill_.text = playerData.tripleKill.ToString(); this.Legendary.text = playerData.godlike.ToString(); if (PlayerPrefs.GetString(text) == b) { this.LikeBth.GetComponent <UISprite>().spriteName = "Settlement_praise_02"; UIEventListener.Get(this.LikeBth.gameObject).onClick = null; } else { this.LikeBth.GetComponent <UISprite>().spriteName = "Settlement_praise_01"; UIEventListener.Get(this.LikeBth.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickLikeBtn); } }