// Token: 0x06013BD6 RID: 80854 RVA: 0x00507980 File Offset: 0x00505B80 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; Image headIconImage = this.m_headIconImage; Sprite sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerSmallHeadIconImageName(HeadIconTools.GetHeadPortrait(headIconId))); this.m_headIconImageGrey.sprite = sprite; headIconImage.sprite = sprite; UIUtility.SetPlayerHeadFrame(this.m_headFrameTransform, HeadIconTools.GetHeadFrame(headIconId), true, "Normal"); }
public static int GetHeadFrame_s(IntPtr l) { int result; try { int headIcon; LuaObject.checkType(l, 1, out headIcon); int headFrame = HeadIconTools.GetHeadFrame(headIcon); LuaObject.pushValue(l, true); LuaObject.pushValue(l, headFrame); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// 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); } } }
// 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: 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); }