private void _addChat(GC_ChatMsg _data) { eChatTarget type = eChatTarget.eChatTarget_other; PlayerInfoBase player = null; if (_data.PlayerID == MainPlayer.Instance.PlayerInfo.PlayerID) { type = eChatTarget.eChatTarget_mine; player = MainPlayer.Instance.PlayerInfo; } else { type = eChatTarget.eChatTarget_other; player = LobbySystem.Instance.GetPlayerInfo(_data.PlayerID); } _addChat(type, player.PlayerName, player.Level, _data.Chat); }
public void UpdateFromPlayerInfo(PlayerInfoBase playerInfo) { if (playerInfo == null) { return; } if (Login != null && string.Compare(playerInfo.Login, Login, StringComparison.OrdinalIgnoreCase) != 0) { return; } Login = playerInfo.Login; NickName = playerInfo.NickName; SpectatorStatus.IsSpectator = playerInfo.IsSpectator; PlayerID = playerInfo.PlayerId; TeamID = playerInfo.TeamId; IsInOfficialMode = playerInfo.IsInOfficialMode; DetailMode |= PlayerSettingsDetailMode.BasicPlayerInfo; }