Пример #1
0
 private void SetupListItem(PartyInviteCharaInfo info, int i, Transform t, bool is_recycle)
 {
     SetCharaInfo(info, i, t, is_recycle, false);
     SetActive(t, UI.OBJ_DISABLE_USER_MASK, !info.canEntry || info.invite || selectedUserIdList.Contains(info.userId));
     SetActive(t, UI.OBJ_INVITED, info.invite);
     SetButtonEnabled(t, !info.invite && info.canEntry);
     SetActive(t, UI.OBJ_SELECTED, selectedUserIdList.Contains(info.userId));
     SetActive(t, UI.OBJ_NOT_PROGRESSED, !info.canEntry);
     SetActive(t, UI.OBJ_ROOMCONDITION, false);
     if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName() == "LoungeInviteFriend")
     {
         bool flag = (int)info.level < 15;
         SetActive(t, UI.OBJ_CANT_LOUNGE, flag);
         bool flag2 = false;
         LoungeModel.Lounge loungeData = MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData;
         for (int j = 0; j < loungeData.slotInfos.Count; j++)
         {
             if (loungeData.slotInfos[j].userInfo != null && loungeData.slotInfos[j].userInfo.userId == info.userId)
             {
                 flag2 = true;
                 break;
             }
         }
         SetActive(t, UI.OBJ_IN_LOUNGE, flag2);
         if (flag || flag2)
         {
             SetActive(t, UI.OBJ_INVITED, false);
             SetActive(t, UI.OBJ_NOT_PROGRESSED, false);
             SetActive(t, UI.OBJ_ROOMCONDITION, false);
         }
         SetButtonEnabled(t, !info.invite && info.canEntry && !flag2 && !flag);
     }
 }
Пример #2
0
    private void InitLounge(int index, Transform t)
    {
        SetEvent(t, "SELECT_LOUNGE", index);
        LoungeModel.Lounge lounge    = lounges[index];
        CharaInfo          charaInfo = null;

        for (int i = 0; i < lounge.slotInfos.Count; i++)
        {
            if (lounge.slotInfos[i].userInfo.userId == lounge.ownerUserId)
            {
                charaInfo = lounge.slotInfos[i].userInfo;
                break;
            }
        }
        SetLabelText(t, UI.LBL_HOST_NAME, charaInfo.name);
        SetLabelText(t, UI.LBL_HOST_LV, charaInfo.level.ToString());
        SetLabelText(t, UI.LBL_LOUNGE_NAME, lounge.name);
        string text = StringTable.Get(STRING_CATEGORY.LOUNGE_LABEL, (uint)lounge.label);

        SetLabelText(t, UI.LBL_LABEL, text);
        SetStamp(t, lounge.stampId);
        int num  = lounge.num + 1;
        int num2 = lounge.slotInfos.Count((LoungeModel.SlotInfo slotInfo) => slotInfo != null && slotInfo.userInfo != null && slotInfo.userInfo.userId != lounge.ownerUserId);

        for (int j = 0; j < 7; j++)
        {
            bool is_visible = j < num - 1;
            SetActive(t, loungeMembers[j], is_visible);
            SetToggle(t, loungeMembers[j], j < num2);
        }
    }
Пример #3
0
    private void UpdateLounge(LoungeModel.Lounge lounge, List <FollowLoungeMember> followLoungeMember, LoungeModel.LoungeServer loungeServer, LoungeModel.InviteFriendInfo inviteFriendInfo, List <int> firstMetUserIds)
    {
        if (loungeData != null && loungeData.status == 10 && (lounge.status == 100 || lounge.status == 105))
        {
            isChangeStarted = true;
        }
        this.inviteFriendInfo = inviteFriendInfo;
        this.firstMetUserIds  = firstMetUserIds;
        loungeData            = lounge;
        if (followLoungeMember != null)
        {
            this.followLoungeMember = followLoungeMember;
        }
        if (loungeServer != null)
        {
            loungeServerData = loungeServer;
            if (!MonoBehaviourSingleton <LoungeWebSocket> .I.IsConnected())
            {
                connection = MonoBehaviourSingleton <LoungeNetworkManager> .I.CreateChatConnection();

                MonoBehaviourSingleton <ChatManager> .I.CreateLoungeChat(connection);

                connection.Join(0, MonoBehaviourSingleton <UserInfoManager> .I.userInfo.name);
            }
        }
        if (loungeMemberStatus != null)
        {
            loungeMemberStatus.SyncLoungeMember(loungeData);
        }
    }
    private void GetCurrentLoungeSettings()
    {
        LoungeModel.Lounge loungeData = MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData;
        bool isLock   = (loungeData.isLock == 1) ? true : false;
        int  capacity = loungeData.num + 1;

        createRequest = new CreateRequestParam(loungeData.stampId, loungeData.minLv, loungeData.maxLv, capacity, (LOUNGE_LABEL)loungeData.label, isLock, loungeData.name);
    }
Пример #5
0
 private bool IsHostChange(LoungeModel.Lounge lounge, int leaveUserId)
 {
     if (GetOwnerUserId() != leaveUserId)
     {
         return(false);
     }
     if (lounge == null)
     {
         return(false);
     }
     if (lounge.status == 30)
     {
         return(false);
     }
     return(true);
 }
Пример #6
0
    public void SyncLoungeMember(LoungeModel.Lounge lounge)
    {
        List <int> list  = new List <int>();
        List <int> list2 = new List <int>();

        list = (from x in lounge.slotInfos
                where x.userInfo != null && !memberes.Any((LoungeMemberStatus m) => m.userId == x.userInfo.userId)
                select x.userInfo.userId).ToList();
        list2 = (from m in memberes
                 where !lounge.slotInfos.Any((LoungeModel.SlotInfo x) => x.userInfo != null && x.userInfo.userId == m.userId)
                 select m into x
                 select x.userId).ToList();
        for (int i = 0; i < list.Count; i++)
        {
            memberes.Add(new LoungeMemberStatus(list[i]));
        }
        for (int j = 0; j < list2.Count; j++)
        {
            Remove(list2[j]);
        }
    }
Пример #7
0
 public LoungeMemberesStatus(LoungeModel.Lounge lounge)
 {
     memberes = (from x in lounge.slotInfos
                 select new LoungeMemberStatus(x)).ToList();
 }