Esempio n. 1
0
    public void Init(string head, string frame, long summonerExp)
    {
        SysSummonersPictureframeVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(frame);

        if (dataById != null)
        {
            this.S_HeadFrame.mainTexture = ResourceManager.Load <Texture>(dataById.pictureframe_icon, true, true, null, 0, false);
        }
        else
        {
            ClientLogger.Warn("SysSummonerPictureframeVo is NullFrameNumber is" + frame);
            this.S_HeadFrame.mainTexture = ResourceManager.Load <Texture>("pictureframe_0000", true, true, null, 0, false);
        }
        SysSummonersHeadportraitVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(head);

        if (dataById2 == null)
        {
            this.S_Summoner.mainTexture = ResourceManager.Load <Texture>("headportrait_0001", true, true, null, 0, false);
        }
        else
        {
            this.S_Summoner.mainTexture = ResourceManager.Load <Texture>(dataById2.headportrait_icon, true, true, null, 0, false);
        }
        this.S_LV.text = CharacterDataMgr.instance.GetUserLevel(summonerExp).ToString();
    }
        private void ReFreshLeftBtn()
        {
            bool flag = false;

            this.transform.Find("TypeButton/1/NewMark").gameObject.SetActive(false);
            this.transform.Find("TypeButton/2/NewMark").gameObject.SetActive(false);
            this.transform.Find("TypeButton/3/NewMark").gameObject.SetActive(false);
            for (int i = 0; i < this.AvatarStateLst.Count; i++)
            {
                if (this.AvatarStateLst[i][1] == "1")
                {
                    SysSummonersHeadportraitVo headportraitVo = this.GetHeadportraitVo(this.AvatarStateLst[i][0]);
                    if (headportraitVo != null)
                    {
                        int headportrait_classify = headportraitVo.headportrait_classify;
                        this.transform.Find("TypeButton/" + headportrait_classify + "/NewMark").gameObject.SetActive(true);
                        flag = true;
                        break;
                    }
                }
                else
                {
                    flag = false;
                }
            }
            this.transform.Find("TypeButton/All/NewMark").gameObject.SetActive(flag);
            Singleton <SummonerView> .Instance.passportView.SwitchAvatarNewMark(flag);
        }
        public void ShowPlayer(AgentBaseInfo _data)
        {
            this.mGameObject.SetActive(true);
            SysSummonersHeadportraitVo dataById  = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(_data.head.ToString());
            SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(_data.headFrame.ToString());

            this.mHeadIcon.spriteName     = dataById.headportrait_icon;
            this.mHeadFrame.spriteName    = dataById2.pictureframe_icon;
            this.targetData               = _data;
            this.targetSummId             = ((_data.UserId <= 100000L) ? _data.UserId : (_data.UserId - 100000L));
            this.mSummonerLevelLabel.text = _data.Level.ToString();
            this.mSummonerName.text       = _data.NickName.ToString();
            this.mSummonerName.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(_data.CharmRankvalue);
            this.mStageLabel.text  = ChatPlayerInfoController.mStatePrefix + _data.Ladder.ToString();
            this.mBottleLabel.text = ChatPlayerInfoController.mBottlePrefix + _data.BotLevel.ToString();
            if (string.IsNullOrEmpty(_data.TeamName))
            {
                this.mTeamLabel.gameObject.SetActive(false);
            }
            else
            {
                this.mTeamLabel.gameObject.SetActive(true);
                this.mTeamLabel.text = ChatPlayerInfoController.mTeamPrefix + _data.TeamName.ToString();
            }
            this.isFriend = (ModelManager.Instance.Get_FriendDataList_X().Find((FriendData obj) => obj.TargetId == this.targetSummId) != null);
            this.mAddFriend.SetActive(!this.isFriend);
        }
Esempio n. 4
0
    public void Initialize(FriendData data)
    {
        SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(data.Icon.ToString());

        if (dataById != null)
        {
            this.Avatar.spriteName = dataById.headportrait_icon.ToString();
        }
        else
        {
            this.Avatar.spriteName = "headportrait_0001";
        }
        SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(data.PictureFrame.ToString());

        if (dataById2 != null)
        {
            this.Frame.spriteName = dataById2.pictureframe_icon;
        }
        else
        {
            this.Frame.spriteName = "pictureframe_0000";
        }
        this.Name.text = data.TargetName;
        this.Name.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(data.CharmRankValue);
        this.SetGameState((GameStatus)data.GameStatus);
        UIEventListener.Get(base.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickToChat);
    }
Esempio n. 5
0
 private void CreateBookItem(SysSummonersHeadportraitVo portraitVo)
 {
     if (this.IsIllegalArgument(portraitVo))
     {
         return;
     }
     this.SetQualityFrame(portraitVo.headportrait_quality);
     this.SetTexture(portraitVo.headportrait_icon, 140);
 }
Esempio n. 6
0
    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;
    }
Esempio n. 7
0
    private void SetHeroInfo(SummonerLadderRankData summonerLadderRankData)
    {
        SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(summonerLadderRankData.IconId.ToString());

        if (dataById != null)
        {
            this.Portrait.spriteName = dataById.headportrait_icon.ToString();
        }
        SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(summonerLadderRankData.PictureFrame.ToString());

        if (dataById2 != null)
        {
            this.Frame.spriteName = dataById2.pictureframe_icon;
        }
        this._rName.text     = summonerLadderRankData.NickName;
        this.SummonerLv.text = CharacterDataMgr.instance.GetUserLevel(summonerLadderRankData.Exp).ToString();
        base.gameObject.name = summonerLadderRankData.UserId + "|" + summonerLadderRankData.MagicBottleRank.ToString();
        if (summonerLadderRankData.Rank == 1)
        {
            this.Bg.spriteName     = "Ranking_list_bg_02";
            this._rName.color      = new Color32(212, 254, 249, 255);
            this._rTeamLabel.color = new Color32(253, 236, 120, 255);
            this.RankIcon.transform.Find("bg").GetComponent <UISprite>().color  = new Color32(52, 12, 0, 155);
            this.RankPoint.transform.Find("bg").GetComponent <UISprite>().color = new Color32(52, 12, 0, 155);
        }
        else
        {
            this.Bg.spriteName     = "Ranking_list_bg_01";
            this._rName.color      = new Color32(212, 254, 249, 255);
            this._rTeamLabel.color = new Color32(0, 214, 253, 255);
            this.RankIcon.transform.Find("bg").GetComponent <UISprite>().color  = new Color32(0, 18, 52, 155);
            this.RankPoint.transform.Find("bg").GetComponent <UISprite>().color = new Color32(0, 18, 52, 155);
        }
        if (summonerLadderRankData.Rank <= 3 && summonerLadderRankData.Rank > 0)
        {
            this.RankSprite.gameObject.SetActive(true);
            this.RankLabel.gameObject.SetActive(false);
            this.RankSprite.spriteName = "Ranking_images_number_" + summonerLadderRankData.Rank.ToString();
        }
        else
        {
            this.RankSprite.gameObject.SetActive(false);
            this.RankLabel.gameObject.SetActive(true);
            this.RankLabel.text = summonerLadderRankData.Rank.ToString();
        }
        if (summonerLadderRankData.UserId == ModelManager.Instance.Get_userData_X().UserId)
        {
            this._rName.color = new Color32(214, 7, 182, 255);
            this._rName.text  = ModelManager.Instance.Get_userData_filed_X("NickName");
        }
        this._rName.GetComponent <AllochroicLabelChecker>().RenderLabel(summonerLadderRankData.CharmRankValue);
        this.SetRankUp(summonerLadderRankData.RankUp);
    }
 public void UpdateAvatarItem(SysSummonersHeadportraitVo vo, bool _isOwn, bool _isNewGet)
 {
     UIEventListener.Get(base.transform.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickAvatarItem);
     this.Avatar.gameObject.SetActive(true);
     this.Frame.gameObject.SetActive(false);
     this.BG.spriteName     = "Change_head_frame_0" + vo.headportrait_quality;
     this.Avatar.spriteName = vo.headportrait_icon;
     this.Name.text         = LanguageManager.Instance.GetStringById(vo.headportrait_name);
     if (vo.headportrait_new == 1)
     {
         this.NEW.gameObject.SetActive(true);
     }
     else
     {
         this.NEW.gameObject.SetActive(false);
     }
     if (_isNewGet)
     {
         this.NewPoint.gameObject.SetActive(true);
         this.NEW.gameObject.SetActive(false);
     }
     else
     {
         this.NewPoint.gameObject.SetActive(false);
     }
     if (_isOwn)
     {
         this.PriceTag.gameObject.SetActive(false);
         this.Describe.gameObject.SetActive(false);
         this.State.gameObject.SetActive(true);
         if (vo.headportrait_id == Singleton <ChangeAvatarView> .Instance.Avatar)
         {
             this.State.text  = "使用中";
             this.State.color = new Color32(255, 246, 10, 255);
         }
         else
         {
             this.State.text  = "已拥有";
             this.State.color = new Color32(11, 233, 0, 255);
         }
     }
     else
     {
         this.State.gameObject.SetActive(false);
         this.SetDescribe(vo.headportrait_output, vo.headportrait_id);
         if (vo.headportrait_output == 1)
         {
             this.PriceTag.SetData(GoodsSubject.HeadPortrait, vo.headportrait_id.ToString(), 1, null, null, null);
         }
     }
 }
Esempio n. 9
0
        private void UpdateView()
        {
            UserData userData = ModelManager.Instance.Get_userData_X();
            SysSummonersPictureframeVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(userData.PictureFrame.ToString());

            this.SummonerFrame.spriteName = dataById.pictureframe_icon;
            SysSummonersHeadportraitVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(userData.Avatar.ToString());

            this.SummonerIcon.mainTexture = ResourceManager.Load <Texture>(dataById2.headportrait_icon, true, true, null, 0, false);
            this.LeftLevel.text           = this.m_curLevel.ToString();
            this.RightLevel.text          = this.m_nextLevel.ToString();
            this.LeftHeroMaxLevel.text    = BaseDataMgr.instance.GetDataById <SysSummonersLevelVo>(this.m_curLevel.ToString()).hero_main.ToString();
            this.RightHeroMaxLevel.text   = BaseDataMgr.instance.GetDataById <SysSummonersLevelVo>(this.m_nextLevel.ToString()).hero_main.ToString();
        }
Esempio n. 10
0
        private void UpdatePassportData()
        {
            this.InitPanel();
            int    num  = ModelManager.Instance.Get_userData_filed_X("PictureFrame");
            int    num2 = ModelManager.Instance.Get_userData_filed_X("Avatar");
            string text = ModelManager.Instance.Get_userData_filed_X("NickName");
            long   num3 = ModelManager.Instance.Get_userData_filed_X("Exp");
            long   num4 = ModelManager.Instance.Get_userData_filed_X("SummonerId");
            int    rank = ModelManager.Instance.Get_userData_filed_X("CharmRankValue");

            this.ShowVIPInformation();
            SysSummonersPictureframeVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(num.ToString());

            if (dataById == null)
            {
                ClientLogger.Error("PictureFrame=" + num.ToString() + "SysSummonersPictureframeVo中找不到");
                this.HeroHeadFrame_Texture.spriteName = "pictureframe_0000";
            }
            else
            {
                this.HeroHeadFrame_Texture.spriteName = dataById.pictureframe_icon;
            }
            SysSummonersHeadportraitVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(num2.ToString());

            if (dataById2 == null)
            {
                ClientLogger.Error("Avatar=" + num2.ToString() + "SysSummonersHeadportraitVo中找不到");
                this.HeroHead_Texture.mainTexture = ResourceManager.Load <Texture>("headportrait_0001", true, true, null, 0, false);
                this.QRHeroHead.mainTexture       = this.HeroHead_Texture.mainTexture;
            }
            else
            {
                this.HeroHead_Texture.mainTexture = ResourceManager.Load <Texture>(dataById2.headportrait_icon, true, true, null, 0, false);
                this.QRHeroHead.mainTexture       = this.HeroHead_Texture.mainTexture;
            }
            this.NameLabel.text = text;
            this.NameLabel.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(rank);
            this.PlayerLevel.text = CharacterDataMgr.instance.GetUserLevel(num3).ToString();
            long exp = num3;

            this.PlayerExp.width     = (int)((double)CharacterDataMgr.instance.GetUserCurrentExp(exp) / (double)CharacterDataMgr.instance.GetUserNextLevelExp(exp) * 220.0);
            this.PlayerID.text       = num4.ToString();
            this.Charming.text       = ModelManager.Instance.Get_userData_X().Charm.ToString();
            this.MagicBottle.text    = ModelManager.Instance.Get_BottleData_Level().ToString();
            this.MaxLadderScore.text = ModelManager.Instance.Get_userData_X().HighScore.ToString();
            this.RefreshNameCardCount();
            this.CheckNewMark();
            this.GetQRTexture();
            this.UpdateSociatyView();
        }
 public void UpdateSample(string _id)
 {
     this.UpdateClickFrame(_id);
     this.selectPortraitName = _id;
     if (this.isHeadPortraitPanel)
     {
         SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(_id);
         this.SampleAvatar.spriteName = dataById.headportrait_icon;
         this.SampleName.text         = LanguageManager.Instance.GetStringById(dataById.headportrait_name);
         this.SampleDesc.text         = LanguageManager.Instance.GetStringById(dataById.headportrait_describe);
         if (this.AvatarStateLst.Find((string[] item) => item[0] == _id) != null)
         {
             if (_id == this.Avatar.ToString())
             {
                 this.UpdateUseBtn(true);
             }
             else
             {
                 this.UpdateUseBtn(false);
             }
         }
         else
         {
             this.UpdateBtnMng(dataById.headportrait_skip);
         }
     }
     else
     {
         SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(_id);
         this.SampleFrame.spriteName = dataById2.pictureframe_icon;
         this.SampleName.text        = LanguageManager.Instance.GetStringById(dataById2.pictureframe_name);
         this.SampleDesc.text        = LanguageManager.Instance.GetStringById(dataById2.pictureframe_describe);
         if (this.FrameStateLst.Find((string[] item) => item[0] == _id) != null)
         {
             if (_id == this.PictureFrame.ToString())
             {
                 this.UpdateUseBtn(true);
             }
             else
             {
                 this.UpdateUseBtn(false);
             }
         }
         else
         {
             this.UpdateBtnMng(dataById2.pictureframe_skip);
         }
     }
 }
Esempio n. 12
0
        private void Init()
        {
            this.mSummonerIcon  = base.transform.Find("BelowEffPanel/Fx_playerlvup/zhong/Sprite").GetComponent <MeshRenderer>();
            this.expBar         = base.transform.Find("UICircleProgressBar").GetComponent <UICircleProgressBar>();
            this.mCurLevel      = base.transform.Find("StaticPanel/Level").GetComponent <UILabel>();
            this.mCurLevelTemp  = base.transform.Find("StaticPanel/LevelTemp").GetComponent <UILabel>();
            this.mGainExpLabel  = base.transform.Find("StaticPanel/AddNum").GetComponent <UILabel>();
            this.mAboveEffPanel = base.transform.Find("AboveEffPanel");
            SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(ModelManager.Instance.Get_userData_X().Avatar.ToString());

            if (dataById != null)
            {
                this.mSummonerIcon.material.SetTexture("_MainTex", ResourceManager.Load <Texture>(dataById.headportrait_icon, true, true, null, 0, false));
            }
            this.initFlag = true;
        }
Esempio n. 13
0
        private void UpdatePortrait()
        {
            Dictionary <string, object> dicByType = BaseDataMgr.instance.GetDicByType <SysSummonersHeadportraitVo>();
            List <string> list = new List <string>(dicByType.Keys);

            this.Name = list[0];
            for (int i = 0; i < 16; i++)
            {
                SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(list[i].ToString());
                if (dataById.portrait_type == 1)
                {
                    this.headportrait.transform.GetChild(i).name = dataById.headportrait_id.ToString();
                    this.headportrait.transform.GetChild(i).GetComponent <UITexture>().mainTexture = ResourceManager.Load <Texture>(dataById.headportrait_icon, true, true, null, 0, false);
                    UIEventListener expr_B5 = UIEventListener.Get(this.headportrait.transform.GetChild(i).gameObject);
                    expr_B5.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_B5.onClick, new UIEventListener.VoidDelegate(this.CreatePor));
                }
            }
        }
 public override void Init(string[] param)
 {
     base.Init(param);
     if (base.Valid)
     {
         base.Num = 1;
         SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(param[2]);
         if (dataById != null)
         {
             base.SIcon   = dataById.headportrait_icon;
             base.BIcon   = dataById.headportrait_icon;
             base.TypeDes = LanguageManager.Instance.GetStringById("Currency_HeadPortrait");
             base.Des     = LanguageManager.Instance.GetStringById(dataById.headportrait_name);
             base.Quality = dataById.headportrait_quality;
             base.Valid   = true;
         }
     }
 }
Esempio n. 15
0
        private void CreateList(GameObject friendItemPre, List <FriendData> FriendDataList, int index = 0)
        {
            for (int i = 0; i < FriendDataList.Count; i++)
            {
                GameObject gameObject;
                if (i + index < this.BlackListPanel.childCount)
                {
                    gameObject = this.BlackListPanel.GetChild(i + index).gameObject;
                    gameObject.gameObject.SetActive(true);
                }
                else
                {
                    gameObject = NGUITools.AddChild(this.BlackListPanel.gameObject, friendItemPre);
                }
                FriendItem component = gameObject.GetComponent <FriendItem>();
                component.apply.gameObject.name  = FriendDataList[i].TargetId.ToString();
                component.refuse.gameObject.name = FriendDataList[i].TargetId.ToString();
                gameObject.name = FriendDataList[i].TargetId.ToString();
                SysSummonersPictureframeVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(FriendDataList[i].PictureFrame.ToString());
                component.pictureFrame.spriteName = dataById.pictureframe_icon;
                SysSummonersHeadportraitVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(FriendDataList[i].Icon.ToString());
                component.texture.spriteName = dataById2.headportrait_icon;
                component.Name       = FriendDataList[i].TargetName;
                component.name.text  = FriendDataList[i].TargetName;
                component.id         = FriendDataList[i].TargetId;
                component.level.text = CharacterDataMgr.instance.GetUserLevel(FriendDataList[i].Exp).ToString();
                if (UIEventListener.Get(component.transform.Find("RemoveBlackBtn").gameObject).onClick == null)
                {
                    UIEventListener expr_1C4 = UIEventListener.Get(component.transform.Find("RemoveBlackBtn").gameObject);
                    expr_1C4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_1C4.onClick, new UIEventListener.VoidDelegate(this.OnRemoveBlackBtn));
                }
            }
            int count = this.GetBlackList().Count;

            if (this.BlackListPanel.childCount > count)
            {
                for (int j = 0; j < this.BlackListPanel.childCount - count; j++)
                {
                    this.BlackListPanel.GetChild(count + j).gameObject.SetActive(false);
                }
            }
        }
Esempio n. 16
0
    public void Init(FriendData friendData, RoomFriendStatus net)
    {
        if (friendData == null)
        {
            return;
        }
        this.ResetInvitingState();
        this.FriendStatus = net;
        this._data        = friendData;
        this.F_Name.text  = friendData.TargetName;
        this.F_Name.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(friendData.CharmRankValue);
        this.F_GradeNumber.text = CharacterDataMgr.instance.GetUserLevel(friendData.Exp).ToString();
        SysSummonersHeadportraitVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersHeadportraitVo>(friendData.Icon.ToString());

        if (dataById == null)
        {
            this.F_Summoner.spriteName = "headportrait_0001";
        }
        else
        {
            this.F_Summoner.spriteName = dataById.headportrait_icon;
        }
        SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(friendData.PictureFrame.ToString());

        if (dataById2 == null)
        {
            this.F_SummonerFrame.spriteName = "pictureframe_0000";
        }
        else
        {
            this.F_SummonerFrame.spriteName = dataById2.pictureframe_icon;
        }
        UIEventListener.Get(this.F_Refuse.gameObject).onClick = new UIEventListener.VoidDelegate(this.OnClickInvite);
        this.F_Invitation.text = string.Empty;
        this.SetGameState(this.FriendStatus);
        MobaMessageManager.RegistMessage(MobaTeamRoomCode.Room_RefuseJoinInvite, new MobaMessageFunc(this.OnMsg_RefuseJoinInvite));
    }
Esempio n. 17
0
        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);
            }
        }
        public void ReFreshUI(bool isHead, int avatar, int frame)
        {
            this.isHeadPortraitPanel = isHead;
            this.Avatar       = avatar;
            this.PictureFrame = frame.ToString();
            this.AllBtn.GetComponent <UIToggle>().startsActive = true;
            if (isHead)
            {
                this.TitleLabel.text = "召唤师头像";
                this.SampleAvatar.gameObject.SetActive(true);
                this.SampleFrame.gameObject.SetActive(false);
                this.AllBtn.Find("Label").GetComponent <UILabel>().text     = LanguageManager.Instance.GetStringById("headportrait_classify_all");
                this.OutlookBtn.Find("Label").GetComponent <UILabel>().text = LanguageManager.Instance.GetStringById("headportrait_classify_appearanc");
                this.ActiveBtn.Find("Label").GetComponent <UILabel>().text  = LanguageManager.Instance.GetStringById("headportrait_classify_activity");
                this.AchievBtn.Find("Label").GetComponent <UILabel>().text  = LanguageManager.Instance.GetStringById("headportrait_classify_achievement");
                this.HeadportraitVo     = BaseDataMgr.instance.GetTypeDicByType <SysSummonersHeadportraitVo>();
                this.OwnAvatar          = CharacterDataMgr.instance.GetPortrait(CharacterDataMgr.Portrait.CommonPortrait);
                this.selectPortraitName = this.Avatar.ToString();
                for (int i = 0; i < this.OwnAvatar.Count; i++)
                {
                    string[] array = this.OwnAvatar[i].Split(new char[]
                    {
                        '_'
                    });
                    if (array.Length == 2)
                    {
                        this.AvatarStateLst.Add(array);
                    }
                }
                this.ReFreshLeftBtn();
            }
            else
            {
                this.TitleLabel.text = "召唤师头像框";
                this.SampleAvatar.gameObject.SetActive(false);
                this.SampleFrame.gameObject.SetActive(true);
                this.AllBtn.Find("Label").GetComponent <UILabel>().text     = LanguageManager.Instance.GetStringById("headportrait_classify_all");
                this.OutlookBtn.Find("Label").GetComponent <UILabel>().text = LanguageManager.Instance.GetStringById("headportrait_classify_appearanc");
                this.ActiveBtn.Find("Label").GetComponent <UILabel>().text  = LanguageManager.Instance.GetStringById("headportrait_classify_activity");
                this.AchievBtn.Find("Label").GetComponent <UILabel>().text  = LanguageManager.Instance.GetStringById("headportrait_classify_achievement");
                this.PictureframeVo     = BaseDataMgr.instance.GetTypeDicByType <SysSummonersPictureframeVo>();
                this.OwnFrame           = CharacterDataMgr.instance.GetSummonerFrame();
                this.selectPortraitName = this.PictureFrame;
                for (int j = 0; j < this.OwnFrame.Count; j++)
                {
                    string[] array2 = this.OwnFrame[j].Split(new char[]
                    {
                        '_'
                    });
                    if (array2.Length == 2)
                    {
                        this.FrameStateLst.Add(array2);
                    }
                }
                this.ReFreshLeftBtnFrame();
                SysSummonersPictureframeVo dataById = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(this.PictureFrame);
                if (dataById != null)
                {
                    this.SampleFrame.spriteName = dataById.pictureframe_icon;
                }
                else
                {
                    this.SampleFrame.spriteName = "pictureframe_0000";
                }
            }
            SysSummonersHeadportraitVo headportraitVo = this.GetHeadportraitVo(this.Avatar.ToString());

            if (headportraitVo == null)
            {
                this.SampleAvatar.spriteName = "headportrait_0001";
            }
            else
            {
                this.SampleAvatar.spriteName = headportraitVo.headportrait_icon;
            }
            if (isHead)
            {
                this.SampleName.text = LanguageManager.Instance.GetStringById(headportraitVo.headportrait_name);
                this.SampleDesc.text = LanguageManager.Instance.GetStringById(headportraitVo.headportrait_describe);
            }
            else
            {
                SysSummonersPictureframeVo dataById2 = BaseDataMgr.instance.GetDataById <SysSummonersPictureframeVo>(this.PictureFrame);
                if (dataById2 == null)
                {
                    return;
                }
                this.SampleName.text = LanguageManager.Instance.GetStringById(dataById2.pictureframe_name);
                this.SampleDesc.text = LanguageManager.Instance.GetStringById(dataById2.pictureframe_describe);
            }
            this.UpdateUseBtn(true);
            this.Click_SelectType(this.AllBtn.gameObject);
        }