Exemplo n.º 1
0
        public void HandleMemberPresenceUpdatedEvent(Club.ClubMemberPresenceUpdatedEvent updatePresenceEvent)
        {
            CommunityMember communityMember = this.m_memberList.Find((CommunityMember member) => member.MemberID == updatePresenceEvent.MemberID);

            if (communityMember != null)
            {
                communityMember.HandlePresenceUpdateEvent(updatePresenceEvent);
            }
        }
 public void PopulateMemberInfo(CommunityMember member)
 {
     this.m_memberInfo         = member;
     this.m_characterName.text = this.m_memberInfo.Name;
     this.m_classImage.sprite  = GeneralHelpers.LoadClassIcon((int)this.m_memberInfo.Class);
     this.m_buttonText.SetNewStringKey(this.m_memberInfo.ConvertRoleToString());
     this.SetButtonState(this.m_memberInfo.GetAssignableRoles().Count > 0);
     this.SetRoleIconVisibility();
 }
Exemplo n.º 3
0
 public void SetMemberInfo(CommunityMember member)
 {
     this.m_characterNameText.text = member.Name.ToUpper();
     this.m_kickButtonText.text    = MobileClient.FormatString(StaticDB.GetString("COMMUNITIES_KICK_MEMBER", "[PH] Kick %s"), this.m_characterNameText.text);
     this.m_member = member;
     this.SetRoleToggleState();
     this.SetValidAssignableRoles();
     this.m_memberRole.onValueChanged.AddListener((bool argument0) => this.SetMemberRole());
     this.m_moderatorRole.onValueChanged.AddListener((bool argument1) => this.SetModeratorRole());
     this.m_leaderRole.onValueChanged.AddListener((bool argument2) => this.SetLeaderRole());
     this.m_ownerRole.onValueChanged.AddListener((bool argument3) => this.SetOwnerRole());
 }
Exemplo n.º 4
0
 private void OnRoleUpdatedEvent(Club.ClubMemberRoleUpdatedEvent roleUpdatedEvent)
 {
     if (this.m_focusedStream != null && this.m_community != null && roleUpdatedEvent.ClubID == this.m_community.ClubId && base.gameObject.activeSelf)
     {
         CommunityMember updatedMember = this.m_community.GetUpdatedMember(roleUpdatedEvent);
         if (updatedMember != null && updatedMember.IsSelf && !updatedMember.IsModerator && this.m_focusedStream.ForLeadersAndModerators)
         {
             this.ForceCloseChatPanel();
             AllPopups.instance.ShowGenericPopupFull(StaticDB.GetString("CHANNEL_NO_LONGER_VALID", "[PH] The channel is no longer valid."));
         }
     }
 }
Exemplo n.º 5
0
        public void HandleMemberRoleUpdatedEvent(Club.ClubMemberRoleUpdatedEvent updateRoleEvent)
        {
            CommunityMember communityMember = this.m_memberList.Find((CommunityMember member) => member.MemberID == updateRoleEvent.MemberID);

            if (communityMember != null)
            {
                communityMember.HandleRoleUpdateEvent(updateRoleEvent);
                if (communityMember.IsSelf)
                {
                    this.RefreshStreams();
                    CommunityData.Instance.FireChannelRefreshCallback(updateRoleEvent.ClubID);
                }
            }
        }
Exemplo n.º 6
0
        public bool CanAccessUpdatedChannel(Club.ClubStreamUpdatedEvent streamUpdatedEvent)
        {
            ClubStreamInfo?streamInfo = Club.GetStreamInfo(streamUpdatedEvent.ClubID, streamUpdatedEvent.StreamID);

            if (streamInfo != null)
            {
                if (!streamInfo.Value.leadersAndModeratorsOnly)
                {
                    return(true);
                }
                CommunityMember communityMember = this.m_memberList.Find((CommunityMember member) => member.IsSelf);
                if (communityMember != null && communityMember.IsModerator)
                {
                    return(true);
                }
            }
            return(false);
        }
 public void PopulateMemberInfo(CommunityMember member)
 {
     this.m_characterName.text = member.Name;
     this.m_classImage.sprite  = GeneralHelpers.LoadClassIcon((int)member.Class);
     this.m_memberInfo         = member;
 }
 public void AddMemberToRoster(CommunityMember member)
 {
     this.m_contentPane.AddAsChildObject <CommunityRosterItem>(this.m_memberButtonPrefab).PopulateMemberInfo(member);
 }
Exemplo n.º 9
0
        public void HandleMemberRoleUpdatedEvent(Club.ClubMemberRoleUpdatedEvent updateRoleEvent)
        {
            CommunityMember communityMember = this.m_memberList.Find((CommunityMember member) => member.MemberID == updateRoleEvent.MemberID);

            communityMember.HandleRoleUpdateEvent(updateRoleEvent);
        }