Exemplo n.º 1
0
 // Token: 0x0600C292 RID: 49810 RVA: 0x0035FE74 File Offset: 0x0035E074
 protected override bool IsNeedLoadDynamicRes()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsNeedLoadDynamicRes_hotfix != null)
     {
         return(Convert.ToBoolean(this.m_IsNeedLoadDynamicRes_hotfix.call(new object[]
         {
             this
         })));
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     base.ClearAssetList();
     this.CollectHeroModelAssets(this.m_playerContext.BusinessCard.Heroes);
     this.CollectHeroModelAssets(this.m_playerContext.BusinessCard.MostSkilledHeroes);
     base.CollectSpriteAsset(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(this.m_playerContext.BusinessCard.HeadIcon)));
     if (this.m_playerContext.IsMe(this.m_playerContext.BusinessCard.UserId))
     {
         foreach (Hero hero in this.m_playerContext.GetHeros())
         {
             ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel);
             if (charImageInfo != null)
             {
                 base.CollectAsset(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1"));
             }
         }
     }
     return(base.IsNeedLoadDynamicRes());
 }
Exemplo n.º 2
0
        // Token: 0x06012645 RID: 75333 RVA: 0x004B905C File Offset: 0x004B725C
        public void UpdateItemInfo(RankingListType rankType, int headIconId, int rankLevel, int lv, string playerName, int score, string heroName = "")
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateItemInfoRankingListTypeInt32Int32Int32StringInt32String_hotfix != null)
            {
                this.m_UpdateItemInfoRankingListTypeInt32Int32Int32StringInt32String_hotfix.call(new object[]
                {
                    this,
                    rankType,
                    headIconId,
                    rankLevel,
                    lv,
                    playerName,
                    score,
                    heroName
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            string playerHeadIconImageName = UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(headIconId));
            Sprite sprite = AssetUtility.Instance.GetSprite(playerHeadIconImageName);

            this.HeadIconImage.sprite = sprite;
            this.PlayerLevelText.text = lv.ToString();
            this.PlayerNameText.text  = playerName;
            if (rankLevel == 2147483647)
            {
                IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                this.RankValueImage.gameObject.SetActive(false);
                this.RankValueText.gameObject.SetActive(true);
                this.RankValueText.text = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Ranking_UnReach);
            }
            else if (rankLevel > 3)
            {
                this.RankValueImage.gameObject.SetActive(false);
                this.RankValueText.gameObject.SetActive(true);
                this.RankValueText.text = rankLevel.ToString();
            }
            else
            {
                this.RankValueImage.gameObject.SetActive(true);
                this.RankValueText.gameObject.SetActive(false);
                this.RankValueImage.sprite = this.GetRankLevelSprite(rankLevel);
            }
            this.UpdateDetailInfo(rankType, heroName, score);
        }
    public static int GetHeadPortrait_s(IntPtr l)
    {
        int result;

        try
        {
            int headIcon;
            LuaObject.checkType(l, 1, out headIcon);
            int headPortrait = HeadIconTools.GetHeadPortrait(headIcon);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, headPortrait);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Exemplo n.º 4
0
 // Token: 0x0600F5A3 RID: 62883 RVA: 0x0040FB68 File Offset: 0x0040DD68
 public void InitPlayerInfo(UserSummary player, bool isInvited)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitPlayerInfoUserSummaryBoolean_hotfix != null)
     {
         this.m_InitPlayerInfoUserSummaryBoolean_hotfix.call(new object[]
         {
             this,
             player,
             isInvited
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_isAdd      = isInvited;
     this.InvitePlayer = player;
     base.gameObject.SetActive(true);
     this.m_headIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(player.HeadIcon)));
     UIUtility.SetPlayerHeadFrame(this.m_HeadFrameDummy, HeadIconTools.GetHeadFrame(player.HeadIcon), true, "Normal");
     this.m_levelText.text = player.Level.ToString();
     this.m_nameText.text  = player.Name.ToString();
     this.m_powerText.text = player.TopHeroBattlePower.ToString();
     this.m_onlineStateCtrl.SetToUIState((!player.Online) ? "Offline" : "Online", false, true);
     this.m_headIconStateCtrl.SetToUIState((!player.Online) ? "Offline" : "Online", false, true);
     if (!player.Online)
     {
         this.m_OffLineText.text    = UIUtility.GetMemberOnlineText(player.Online, player.LogoutTime);
         this.m_headIconGrey.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(player.HeadIcon)));
     }
     this.m_addButtonStateCtrl.SetToUIState((!this.m_isAdd) ? "Add" : "Done", false, true);
 }
 // Token: 0x06009FC4 RID: 40900 RVA: 0x002D21DC File Offset: 0x002D03DC
 public void SetPlayer(ProArenaTopRankPlayer player)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetPlayerProArenaTopRankPlayer_hotfix != null)
     {
         this.m_SetPlayerProArenaTopRankPlayer_hotfix.call(new object[]
         {
             this,
             player
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_playerNameText.text     = player.Name;
     this.m_arenaPointsText.text    = player.ArenaPoints.ToString();
     if (this.m_playerIconImage != null)
     {
         this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(player.HeadIcon)));
     }
     if (this.m_playerHeadFrameTransform != null)
     {
         UIUtility.SetPlayerHeadFrame(this.m_playerHeadFrameTransform, HeadIconTools.GetHeadFrame(player.HeadIcon), true, "Normal");
     }
     if (this.m_playerLevelText != null)
     {
         this.m_playerLevelText.text = player.Level.ToString();
     }
     if (this.m_arenaLevelIconImage != null)
     {
         IConfigDataLoader        configDataLoader         = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
         ConfigDataArenaLevelInfo configDataArenaLevelInfo = configDataLoader.GetConfigDataArenaLevelInfo(player.ArenaLevel);
         if (configDataArenaLevelInfo != null)
         {
             this.m_arenaLevelIconImage.sprite = AssetUtility.Instance.GetSprite(configDataArenaLevelInfo.Icon);
         }
     }
 }
 // Token: 0x0600EF84 RID: 61316 RVA: 0x003FDD60 File Offset: 0x003FBF60
 public void SetSelectGuildInfo(GuildSearchInfo guildSearchInfo)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetSelectGuildInfoGuildSearchInfo_hotfix != null)
     {
         this.m_SetSelectGuildInfoGuildSearchInfo_hotfix.call(new object[]
         {
             this,
             guildSearchInfo
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (guildSearchInfo != null)
     {
         this.SetInfoPanelState(true);
     }
     this.m_selectGuildInfo    = guildSearchInfo;
     this.m_charLevelText.text = guildSearchInfo.PresidentMemberInfo.Level.ToString();
     this.m_charName.text      = guildSearchInfo.PresidentMemberInfo.Name.ToString();
     this.m_charIcon.sprite    = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(guildSearchInfo.PresidentMemberInfo.HeadIcon)));
     UIUtility.SetPlayerHeadFrame(this.m_headFrameDummy, HeadIconTools.GetHeadFrame(guildSearchInfo.PresidentMemberInfo.HeadIcon), true, "Normal");
     this.m_guildNameText.text        = guildSearchInfo.Name;
     this.m_guildDeclarationText.text = guildSearchInfo.HiringDeclaration;
     if (guildSearchInfo.HaveSendJoinReq)
     {
         this.m_guildJoinButtonAnimation.SetToUIState("Grey", false, true);
         this.m_guildJoinButton.enabled = false;
     }
     else
     {
         this.m_guildJoinButtonAnimation.SetToUIState("Normal", false, true);
         this.m_guildJoinButton.enabled = true;
     }
 }
        // Token: 0x0600AECB RID: 44747 RVA: 0x00309E10 File Offset: 0x00308010
        public void Open(RealTimePVPBattleReport battleReport)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OpenRealTimePVPBattleReport_hotfix != null)
            {
                this.m_OpenRealTimePVPBattleReport_hotfix.call(new object[]
                {
                    this,
                    battleReport
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            UIUtility.SetUIStateOpen(this.m_uiStateController, "Open", null, false, true);
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            int num = 0;

            if (battleReport.Win)
            {
                if (projectLPlayerContext.IsMe(battleReport.PlayerDatas[1].UserId))
                {
                    num = 1;
                }
            }
            else if (projectLPlayerContext.IsMe(battleReport.PlayerDatas[0].UserId))
            {
                num = 1;
            }
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData  = battleReport.PlayerDatas[num];
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[1 - num];

            this.m_winPlayerName.text    = realTimePVPBattleReportPlayerData.Name;
            this.m_winPlayerLV.text      = realTimePVPBattleReportPlayerData.Level.ToString();
            this.m_winPlayerIcon.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(realTimePVPBattleReportPlayerData.HeadIcon)));
            this.m_losePlayerName.text   = realTimePVPBattleReportPlayerData2.Name;
            this.m_losePlayerLV.text     = realTimePVPBattleReportPlayerData2.Level.ToString();
            this.m_losePlayerIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(realTimePVPBattleReportPlayerData2.HeadIcon)));
        }
 // Token: 0x06009FC5 RID: 40901 RVA: 0x002D2360 File Offset: 0x002D0560
 public void SetPlayer(ProRealTimePVPLeaderboardPlayerInfo player, ProUserSummary userSummary)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetPlayerProRealTimePVPLeaderboardPlayerInfoProUserSummary_hotfix != null)
     {
         this.m_SetPlayerProRealTimePVPLeaderboardPlayerInfoProUserSummary_hotfix.call(new object[]
         {
             this,
             player,
             userSummary
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_playerNameText.text     = userSummary.Name;
     this.m_arenaPointsText.text    = player.Score.ToString();
     if (this.m_playerIconImage != null)
     {
         this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(userSummary.HeadIcon)));
     }
     if (this.m_playerHeadFrameTransform != null)
     {
         UIUtility.SetPlayerHeadFrame(this.m_playerHeadFrameTransform, HeadIconTools.GetHeadFrame(userSummary.HeadIcon), true, "Normal");
     }
     if (this.m_playerLevelText != null)
     {
         this.m_playerLevelText.text = userSummary.Level.ToString();
     }
     if (this.m_arenaLevelIconImage != null)
     {
         IConfigDataLoader            configDataLoader             = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
         ConfigDataRealTimePVPDanInfo configDataRealTimePVPDanInfo = configDataLoader.GetConfigDataRealTimePVPDanInfo(player.Dan);
         if (configDataRealTimePVPDanInfo != null)
         {
             this.m_arenaLevelIconImage.sprite = AssetUtility.Instance.GetSprite(configDataRealTimePVPDanInfo.Icon);
         }
     }
 }
Exemplo n.º 9
0
 // Token: 0x0600F4E2 RID: 62690 RVA: 0x0040DF44 File Offset: 0x0040C144
 public void InitItemInfo(GuildMember member, bool isSelf)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitItemInfoGuildMemberBoolean_hotfix != null)
     {
         this.m_InitItemInfoGuildMemberBoolean_hotfix.call(new object[]
         {
             this,
             member,
             isSelf
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.Member = member;
     base.gameObject.SetActive(true);
     this.m_headIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(member.HeadIcon)));
     UIUtility.SetPlayerHeadFrame(this.m_HeadFrameDummy, HeadIconTools.GetHeadFrame(member.HeadIcon), true, "Normal");
     this.m_levelText.text    = member.Level.ToString();
     this.m_nameText.text     = member.Name;
     this.m_positionText.text = this.SetTitleTextByEnum(member.Title);
     this.m_powerText.text    = member.TopHeroBattlePower.ToString();
     this.m_exploitText.text  = "0";
     this.m_vitalityText.text = member.TotalActivities.ToString();
     this.m_onlineStateCtrl.SetToUIState((!member.Online) ? "Offline" : "Online", false, true);
     this.m_headIconStateCtrl.SetToUIState((!member.Online) ? "Offline" : "Online", false, true);
     if (!member.Online)
     {
         this.m_OffLineText.text    = UIUtility.GetMemberOnlineText(member.Online, member.LogoutTime);
         this.m_headIconGrey.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(member.HeadIcon)));
     }
     this.m_stateCtrl.SetToUIState((!isSelf) ? "Normal" : "Self", false, true);
 }
        // Token: 0x0600AECA RID: 44746 RVA: 0x00309B68 File Offset: 0x00307D68
        public void Open(ArenaBattleReport battleReport)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OpenArenaBattleReport_hotfix != null)
            {
                this.m_OpenArenaBattleReport_hotfix.call(new object[]
                {
                    this,
                    battleReport
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            UIUtility.SetUIStateOpen(this.m_uiStateController, "Open", null, false, true);
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            if (battleReport.AttackerGotArenaPoints > 0)
            {
                this.m_winPlayerName.text  = battleReport.AttackerName;
                this.m_winPlayerLV.text    = battleReport.AttackerLevel.ToString();
                this.m_losePlayerName.text = battleReport.DefenderName;
                this.m_losePlayerLV.text   = battleReport.DefenderLevel.ToString();
                if (projectLPlayerContext.IsMe(battleReport.AttackerUserId))
                {
                    this.m_winPlayerIcon.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(projectLPlayerContext.GetPlayerHeadPortrait()));
                    this.m_losePlayerIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(battleReport.OpponentHeadIcon)));
                }
                else
                {
                    this.m_winPlayerIcon.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(battleReport.OpponentHeadIcon)));
                    this.m_losePlayerIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(projectLPlayerContext.GetPlayerHeadPortrait()));
                }
            }
            else
            {
                this.m_winPlayerName.text  = battleReport.DefenderName;
                this.m_winPlayerLV.text    = battleReport.DefenderLevel.ToString();
                this.m_losePlayerName.text = battleReport.AttackerName;
                this.m_losePlayerLV.text   = battleReport.AttackerLevel.ToString();
                if (projectLPlayerContext.IsMe(battleReport.DefenderUserId))
                {
                    this.m_winPlayerIcon.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(projectLPlayerContext.GetPlayerHeadPortrait()));
                    this.m_losePlayerIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(battleReport.OpponentHeadIcon)));
                }
                else
                {
                    this.m_winPlayerIcon.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(battleReport.OpponentHeadIcon)));
                    this.m_losePlayerIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(projectLPlayerContext.GetPlayerHeadPortrait()));
                }
            }
        }
        // Token: 0x06009F28 RID: 40744 RVA: 0x002D03F8 File Offset: 0x002CE5F8
        public void SetRealTimePVPBattleReport(RealTimePVPBattleReport battleReport)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetRealTimePVPBattleReportRealTimePVPBattleReport_hotfix != null)
            {
                this.m_SetRealTimePVPBattleReportRealTimePVPBattleReport_hotfix.call(new object[]
                {
                    this,
                    battleReport
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            int num = configDataLoader.UtilityGetVersion(VersionInfoId.VersionInfoId_BattleReport);

            this.m_replayButton.gameObject.SetActive(battleReport.ReportType != RealTimePVPBattleReportType.Invaild && battleReport.Version == num);
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData;
            RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData2;

            if (projectLPlayerContext.IsMe(battleReport.PlayerDatas[0].UserId))
            {
                realTimePVPBattleReportPlayerData  = battleReport.PlayerDatas[0];
                realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[1];
            }
            else
            {
                realTimePVPBattleReportPlayerData  = battleReport.PlayerDatas[1];
                realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[0];
            }
            this.m_playerNameText.text  = realTimePVPBattleReportPlayerData2.Name;
            this.m_playerLevelText.text = realTimePVPBattleReportPlayerData2.Level.ToString();
            if (battleReport.Win)
            {
                this.m_scoreText.text = UIUtility.AddColorTag(realTimePVPBattleReportPlayerData.ScoreDiff.ToString(), new Color(0.13333334f, 0.6745098f, 0.219607845f));
                this.m_modeUIStateCtrl.SetToUIState("Succeed", false, true);
            }
            else
            {
                this.m_scoreText.text = UIUtility.AddColorTag(realTimePVPBattleReportPlayerData.ScoreDiff.ToString(), Color.red);
                this.m_modeUIStateCtrl.SetToUIState("Failed", false, true);
            }
            this.m_typeUIStateCtrl.SetToUIState((battleReport.ReportType != RealTimePVPBattleReportType.Friendly) ? "Ladder" : "Casual", false, true);
            TimeSpan timeSpan = projectLPlayerContext.GetServerTime() - battleReport.CreateTime;

            if (timeSpan.TotalHours < 1.0)
            {
                this.m_timeText.text = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_InOneHour);
            }
            else if (timeSpan.TotalDays < 1.0 && timeSpan.TotalHours >= 1.0)
            {
                this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_HoursAgo), Math.Floor(timeSpan.TotalHours).ToString());
            }
            else if (timeSpan.TotalDays >= 1.0)
            {
                this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_DaysAgo), Math.Floor(timeSpan.TotalDays).ToString());
            }
            this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(realTimePVPBattleReportPlayerData2.HeadIcon)));
            this.m_battleReport           = battleReport;
        }
Exemplo n.º 12
0
        // Token: 0x06009E98 RID: 40600 RVA: 0x002CEB38 File Offset: 0x002CCD38
        public void SetArenaOpponent(ArenaOpponent o, int idx, bool isGuardBattle)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetArenaOpponentArenaOpponentInt32Boolean_hotfix != null)
            {
                this.m_SetArenaOpponentArenaOpponentInt32Boolean_hotfix.call(new object[]
                {
                    this,
                    o,
                    idx,
                    isGuardBattle
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_playerNameText.text     = o.Name;
            this.m_playerLevelText.text    = o.Level.ToString();
            this.m_playerIconImage.sprite  = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(o.HeadIcon)));
            if (isGuardBattle)
            {
                this.m_arenaPointsGameObject.SetActive(false);
            }
            else
            {
                this.m_arenaPointsGameObject.SetActive(true);
                this.m_arenaPointsText.text = o.ArenaPoints.ToString();
            }
            this.m_index = idx;
            int num = 3 - idx;

            if (isGuardBattle)
            {
                this.m_uiStateCtrl.SetToUIState("High", false, true);
            }
            else if (num == 1)
            {
                this.m_uiStateCtrl.SetToUIState("Low", false, true);
            }
            else if (num == 2)
            {
                this.m_uiStateCtrl.SetToUIState("Normal", false, true);
            }
            else if (num == 3)
            {
                this.m_uiStateCtrl.SetToUIState("High", false, true);
            }
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ConfigDataArenaOpponentPointZoneInfo configDataArenaOpponentPointZoneInfo = configDataLoader.GetConfigDataArenaOpponentPointZoneInfo(num);

            if (configDataArenaOpponentPointZoneInfo != null)
            {
                this.m_victoryPointsText.text = "+ " + configDataArenaOpponentPointZoneInfo.VictoryPoint;
            }
        }
        // Token: 0x0600C457 RID: 50263 RVA: 0x00365A10 File Offset: 0x00363C10
        public void UpdateChatInfo(ChatComponent.ChatMessageClient chatClientInfo, bool isPlaying = false)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateChatInfoChatMessageClientBoolean_hotfix != null)
            {
                this.m_UpdateChatInfoChatMessageClientBoolean_hotfix.call(new object[]
                {
                    this,
                    chatClientInfo,
                    isPlaying
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_currChatInfo            = chatClientInfo;
            ChatMessage     chatMessageInfo = chatClientInfo.ChatMessageInfo;
            ChatContentType chatContentType = chatMessageInfo.ChatContentType;

            if (chatContentType != ChatContentType.Text)
            {
                if (chatContentType != ChatContentType.Voice)
                {
                    if (chatContentType == ChatContentType.CustomBigExpression)
                    {
                        this.PlayerNameText.text = chatMessageInfo.SrcName;
                        ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
                        this.SendTimeText.text = this.SetChatMsgTime(projectLPlayerContext.ServerTimeToLocalTime(chatMessageInfo.SendTime));
                        ChatChannel channelId = chatMessageInfo.ChannelId;
                        if (channelId != ChatChannel.Sys)
                        {
                            this.PlayerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(chatMessageInfo.AvatarId)));
                            UIUtility.SetPlayerHeadFrame(this.PlayerHeadFrameTransform, HeadIconTools.GetHeadFrame(chatMessageInfo.AvatarId), true, "Normal");
                            this.PlayerLevelText.text = chatMessageInfo.SrcPlayerLevel.ToString();
                        }
                        string                      text                        = (chatMessageInfo as ChatTextMessage).Text;
                        int                         key                         = int.Parse(text);
                        IConfigDataLoader           configDataLoader            = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                        ConfigDataBigExpressionInfo configDataBigExpressionInfo = configDataLoader.GetConfigDataBigExpressionInfo(key);
                        this.FaceIcon.sprite = AssetUtility.Instance.GetSprite(configDataBigExpressionInfo.ExpressionIconPath);
                        this.SetToBigExpressionMode();
                    }
                }
                else
                {
                    this.PlayerNameText.text = chatMessageInfo.SrcName;
                    ProjectLPlayerContext projectLPlayerContext2 = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
                    this.SendTimeText.text = this.SetChatMsgTime(projectLPlayerContext2.ServerTimeToLocalTime(chatMessageInfo.SendTime));
                    ChatChannel channelId2 = chatMessageInfo.ChannelId;
                    if (channelId2 != ChatChannel.Sys)
                    {
                        this.PlayerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(chatMessageInfo.AvatarId)));
                        UIUtility.SetPlayerHeadFrame(this.PlayerHeadFrameTransform, HeadIconTools.GetHeadFrame(chatMessageInfo.AvatarId), true, "Normal");
                        this.PlayerLevelText.text = chatMessageInfo.SrcPlayerLevel.ToString();
                    }
                    ChatVoiceMessage chatVoiceMessage = chatMessageInfo as ChatVoiceMessage;
                    this.VoiceLengthText.text  = chatVoiceMessage.VoiceLength.ToString() + "'";
                    this.VoiceContentText.text = chatVoiceMessage.TranslateText;
                    if (string.IsNullOrEmpty(chatVoiceMessage.TranslateText))
                    {
                        this.VoiceContentText.gameObject.SetActive(false);
                    }
                    else
                    {
                        this.VoiceContentText.gameObject.SetActive(true);
                    }
                    this.SetToVoiceMode();
                }
            }
            else
            {
                this.PlayerNameText.text = chatMessageInfo.SrcName;
                ProjectLPlayerContext projectLPlayerContext3 = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
                this.SendTimeText.text = this.SetChatMsgTime(projectLPlayerContext3.ServerTimeToLocalTime(chatMessageInfo.SendTime));
                ChatChannel channelId3 = chatMessageInfo.ChannelId;
                if (channelId3 != ChatChannel.Sys)
                {
                    this.PlayerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(chatMessageInfo.AvatarId)));
                    UIUtility.SetPlayerHeadFrame(this.PlayerHeadFrameTransform, HeadIconTools.GetHeadFrame(chatMessageInfo.AvatarId), true, "Normal");
                    this.PlayerLevelText.text = chatMessageInfo.SrcPlayerLevel.ToString();
                }
                string text2 = (chatMessageInfo as ChatTextMessage).Text;
                if (this.m_isEmojiTextInit)
                {
                    this.ContentText.SetContent(text2);
                }
                else
                {
                    this.ContentText.text = text2;
                }
                this.SetToTextMode();
            }
            base.gameObject.SetActive(true);
        }
 // Token: 0x0600B29B RID: 45723 RVA: 0x0031612C File Offset: 0x0031432C
 public void SetHeadIcon(int headIconId)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeadIconInt32_hotfix != null)
     {
         this.m_SetHeadIconInt32_hotfix.call(new object[]
         {
             this,
             headIconId
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_headIconImage.sprite    = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerRoundHeadIconImageName(HeadIconTools.GetHeadPortrait(headIconId)));
     UIUtility.SetPlayerHeadFrame(this.m_headFrameTransform, HeadIconTools.GetHeadFrame(headIconId), true, "Normal");
 }
Exemplo n.º 15
0
        // Token: 0x06012746 RID: 75590 RVA: 0x004BCBD0 File Offset: 0x004BADD0
        protected override List <string> CollectAllDynamicResForLoad()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CollectAllDynamicResForLoad_hotfix != null)
            {
                return((List <string>) this.m_CollectAllDynamicResForLoad_hotfix.call(new object[]
                {
                    this
                }));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.ClearAssetList();
            foreach (RankingTargetPlayerInfo rankingTargetPlayerInfo in this.m_currRankList.PlayerList)
            {
                string playerHeadIconImageName = UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(rankingTargetPlayerInfo.PlayerInfo.HeadIcon));
                if (!string.IsNullOrEmpty(playerHeadIconImageName))
                {
                    base.CollectSpriteAsset(playerHeadIconImageName);
                }
            }
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            string playerHeadIconImageName2             = UIUtility.GetPlayerHeadIconImageName(projectLPlayerContext.GetPlayerHeadPortrait());

            if (!string.IsNullOrEmpty(playerHeadIconImageName2))
            {
                base.CollectSpriteAsset(playerHeadIconImageName2);
            }
            return(base.CollectAllDynamicResForLoad());
        }
        // Token: 0x06009EDA RID: 40666 RVA: 0x002CF528 File Offset: 0x002CD728
        public void SetArenaBattleReport(ArenaBattleReport battleReport)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetArenaBattleReportArenaBattleReport_hotfix != null)
            {
                this.m_SetArenaBattleReportArenaBattleReport_hotfix.call(new object[]
                {
                    this,
                    battleReport
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            bool flag = projectLPlayerContext.IsMe(battleReport.AttackerUserId);
            int  num  = configDataLoader.UtilityGetVersion(VersionInfoId.VersionInfoId_BattleReport);

            this.m_replayButton.gameObject.SetActive(battleReport.Status != ArenaBattleReportStatus.Invaild && battleReport.Version == num);
            int num2;

            if (flag)
            {
                this.m_playerNameText.text  = battleReport.DefenderName;
                this.m_playerLevelText.text = battleReport.DefenderLevel.ToString();
                this.m_revengeButton.gameObject.SetActive(false);
                this.m_haveRevengeButton.gameObject.SetActive(false);
                num2 = battleReport.AttackerGotArenaPoints;
            }
            else
            {
                this.m_playerNameText.text  = battleReport.AttackerName;
                this.m_playerLevelText.text = battleReport.AttackerLevel.ToString();
                if (battleReport.Status == ArenaBattleReportStatus.Defend)
                {
                    this.m_haveRevengeButton.gameObject.SetActive(false);
                    this.m_revengeButton.gameObject.SetActive(true);
                }
                else if (battleReport.Status == ArenaBattleReportStatus.Revenged)
                {
                    this.m_haveRevengeButton.gameObject.SetActive(true);
                    this.m_revengeButton.gameObject.SetActive(false);
                }
                else if (battleReport.Status == ArenaBattleReportStatus.RevengeDefend)
                {
                    this.m_haveRevengeButton.gameObject.SetActive(false);
                    this.m_revengeButton.gameObject.SetActive(false);
                }
                num2 = battleReport.DefenderGotArenaPoints;
            }
            if (num2 >= 0)
            {
                this.m_arenaPointsText.text = UIUtility.AddColorTag(num2.ToString(), new Color(0.13333334f, 0.6745098f, 0.219607845f));
                if (flag)
                {
                    this.m_modeUIStateCtrl.SetToUIState("Attack", false, true);
                }
                else
                {
                    this.m_modeUIStateCtrl.SetToUIState("Defense", false, true);
                }
            }
            else
            {
                this.m_arenaPointsText.text = UIUtility.AddColorTag(num2.ToString(), Color.red);
                if (flag)
                {
                    this.m_modeUIStateCtrl.SetToUIState("AttackFailed", false, true);
                }
                else
                {
                    this.m_modeUIStateCtrl.SetToUIState("DefenseFailed", false, true);
                }
            }
            TimeSpan timeSpan = projectLPlayerContext.GetServerTime() - new DateTime(battleReport.CreateTime);

            if (timeSpan.TotalHours < 1.0)
            {
                this.m_timeText.text = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_InOneHour);
            }
            else if (timeSpan.TotalDays < 1.0 && timeSpan.TotalHours >= 1.0)
            {
                this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_HoursAgo), Math.Floor(timeSpan.TotalHours).ToString());
            }
            else if (timeSpan.TotalDays >= 1.0)
            {
                this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_DaysAgo), Math.Floor(timeSpan.TotalDays).ToString());
            }
            this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(battleReport.OpponentHeadIcon)));
            this.m_battleReport           = battleReport;
        }
 // Token: 0x0600F532 RID: 62770 RVA: 0x0040EBAC File Offset: 0x0040CDAC
 public void InitItemInfo(UserSummary player)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitItemInfoUserSummary_hotfix != null)
     {
         this.m_InitItemInfoUserSummary_hotfix.call(new object[]
         {
             this,
             player
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.Player = player;
     base.gameObject.SetActive(true);
     this.m_headIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(player.HeadIcon)));
     UIUtility.SetPlayerHeadFrame(this.m_HeadFrameDummy, HeadIconTools.GetHeadFrame(player.HeadIcon), true, "Normal");
     this.m_levelText.text = player.Level.ToString();
     this.m_nameText.text  = player.Name;
     this.m_powerText.text = player.TopHeroBattlePower.ToString();
     this.m_headIconStateCtrl.SetToUIState((!player.Online) ? "Offline" : "Online", false, true);
     if (!player.Online)
     {
         this.m_headIconGrey.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(player.HeadIcon)));
     }
 }
Exemplo n.º 18
0
 // Token: 0x0600F0BA RID: 61626 RVA: 0x00400D10 File Offset: 0x003FEF10
 public void Refresh()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Refresh_hotfix != null)
     {
         this.m_Refresh_hotfix.call(new object[]
         {
             this
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_charName.text           = this.m_guildJoinInvitation.Name;
     this.m_charLevelText.text      = this.m_guildJoinInvitation.Level.ToString();
     this.m_charIcon.sprite         = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(this.m_guildJoinInvitation.HeadIcon)));
     UIUtility.SetPlayerHeadFrame(this.m_headFrameDummy, HeadIconTools.GetHeadFrame(this.m_guildJoinInvitation.HeadIcon), true, "Normal");
     this.m_inviteGuildName.text = this.m_guildJoinInvitation.GuildName;
 }
Exemplo n.º 19
0
        // Token: 0x06013DF0 RID: 81392 RVA: 0x0050F914 File Offset: 0x0050DB14
        public void SetPlayer(int index, int headIconId, int level)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetPlayerInt32Int32Int32_hotfix != null)
            {
                this.m_SetPlayerInt32Int32Int32_hotfix.call(new object[]
                {
                    this,
                    index,
                    headIconId,
                    level
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            GameObject playerInfoGameObject = this.GetPlayerInfoGameObject(index);

            if (playerInfoGameObject != null)
            {
                playerInfoGameObject.SetActive(true);
                Image component = playerInfoGameObject.transform.GetComponent <Image>();
                if (component != null)
                {
                    component.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(headIconId)));
                }
                Transform parent = Utility.FindChildComponent <Transform>(playerInfoGameObject, "HeadFrameDummy", true);
                UIUtility.SetPlayerHeadFrame(parent, HeadIconTools.GetHeadFrame(headIconId), true, "Normal");
                Text text = Utility.FindChildComponent <Text>(playerInfoGameObject, "LevelText", true);
                if (text != null)
                {
                    text.text = level.ToString();
                }
            }
        }
Exemplo n.º 20
0
 // Token: 0x0600EC36 RID: 60470 RVA: 0x003F1D10 File Offset: 0x003EFF10
 public void SetGroupInfo(ProChatGroupCompactInfo groupInfo)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetGroupInfoProChatGroupCompactInfo_hotfix != null)
     {
         this.m_SetGroupInfoProChatGroupCompactInfo_hotfix.call(new object[]
         {
             this,
             groupInfo
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_groupInfo             = groupInfo;
     this.m_groupIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(groupInfo.Owner.HeadIcon)));
     UIUtility.SetPlayerHeadFrame(this.m_groupHeadFrameTransform, HeadIconTools.GetHeadFrame(groupInfo.Owner.HeadIcon), true, "Normal");
     this.m_onlinePlayerNumText.text = string.Format(this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Friend_OnlineCount), groupInfo.OnlineUserCount);
     this.m_groupNameText.text       = groupInfo.ChatGroupName;
 }
 // Token: 0x0600F1C6 RID: 61894 RVA: 0x00403A48 File Offset: 0x00401C48
 public void SetData(GuildMassiveCombatMemberInfo guildMassiveCombatMemberInfo, int rank)
 {
     if (rank <= 3)
     {
         this.m_rankValueImage.gameObject.SetActive(true);
         this.m_rankValueText.gameObject.SetActive(false);
         if (rank == 1)
         {
             this.m_rankValueImage.sprite = AssetUtility.Instance.GetSprite("UI/Common_New_ABS/Icon/Icon_One.png");
         }
         else if (rank == 2)
         {
             this.m_rankValueImage.sprite = AssetUtility.Instance.GetSprite("UI/Common_New_ABS/Icon/Icon_Two.png");
         }
         else if (rank == 3)
         {
             this.m_rankValueImage.sprite = AssetUtility.Instance.GetSprite("UI/Common_New_ABS/Icon/Icon_Three.png");
         }
     }
     else
     {
         this.m_rankValueImage.gameObject.SetActive(false);
         this.m_rankValueText.gameObject.SetActive(true);
         this.m_rankValueText.text = rank.ToString();
     }
     this.m_totalContributionText.text = guildMassiveCombatMemberInfo.Points.ToString();
     this.m_todayContributionText.text = guildMassiveCombatMemberInfo.PointsToday.ToString();
     this.m_playerNameText.text        = guildMassiveCombatMemberInfo.Summary.Name;
     this.m_levelText.text             = guildMassiveCombatMemberInfo.Summary.Level.ToString();
     this.m_jobText.text    = UIUtility.GetGuildTitleText(guildMassiveCombatMemberInfo.Title);
     this.m_headIcon.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(guildMassiveCombatMemberInfo.Summary.HeadIcon)));
     UIUtility.SetPlayerHeadFrame(this.m_headFrameDummy, HeadIconTools.GetHeadFrame(guildMassiveCombatMemberInfo.Summary.HeadIcon), true, "Normal");
 }