Exemple #1
0
 public TeamInfo()
 {
     this.stSelfInfo   = new PlayerUniqueID();
     this.stTeamMaster = new PlayerUniqueID();
     this.stTeamInfo   = new TeamAttrib();
     this.MemInfoList  = new ListView <TeamMember>();
 }
Exemple #2
0
 public RoomInfo()
 {
     this.selfInfo       = new PlayerUniqueID();
     this.roomOwner      = new PlayerUniqueID();
     this.roomAttrib     = new RoomAttrib();
     this.campMemberList = new ListView <MemberInfo> [3];
     for (int i = 0; i < 3; i++)
     {
         this.campMemberList[i] = new ListView <MemberInfo>();
     }
 }
Exemple #3
0
 public RoomInfo()
 {
     this.selfInfo       = new PlayerUniqueID();
     this.roomOwner      = new PlayerUniqueID();
     this.roomAttrib     = new RoomAttrib();
     this.campMemberList = new ListView <MemberInfo> [3];
     for (int i = 0; i < 3; i++)
     {
         this.campMemberList[i] = new ListView <MemberInfo>();
     }
     this.fromType = COM_ROOM_FROMTYPE.COM_ROOM_FROM_INTERNAL;
 }
Exemple #4
0
 public TeamMember()
 {
     this.uID = new PlayerUniqueID();
 }
Exemple #5
0
        private static void SetPlayerSlotData(GameObject item, MemberInfo memberInfo, MemberInfo masterMemberInfo, COM_PLAYERCAMP camp, int pos, bool bAvailable, COM_ROOM_FROMTYPE fromType)
        {
            if (bAvailable)
            {
                bool isSelfRoomOwner = Singleton <CRoomSystem> .GetInstance().IsSelfRoomOwner;

                if (memberInfo == null)
                {
                    item.CustomSetActive(true);
                    item.transform.Find("Occupied").gameObject.CustomSetActive(false);
                    GameObject     gameObject = item.transform.Find("BtnJoin").gameObject;
                    CUIEventScript component  = gameObject.GetComponent <CUIEventScript>();
                    if (fromType == COM_ROOM_FROMTYPE.COM_ROOM_FROM_QQSPROT)
                    {
                        gameObject.CustomSetActive(false);
                    }
                    else
                    {
                        gameObject.CustomSetActive(true);
                    }
                    component.m_onClickEventID          = enUIEventID.Room_ChangePos;
                    component.m_onClickEventParams.tag  = (int)camp;
                    component.m_onClickEventParams.tag2 = pos;
                    component.m_onClickEventParams.tag3 = 1;
                }
                else
                {
                    item.CustomSetActive(true);
                    item.transform.Find("Occupied").gameObject.CustomSetActive(true);
                    item.transform.Find("BtnJoin").gameObject.CustomSetActive(false);
                    PlayerUniqueID roomOwner = Singleton <CRoomSystem> .GetInstance().roomInfo.roomOwner;

                    bool           bActive  = roomOwner.ullUid == memberInfo.ullUid;
                    PlayerUniqueID selfInfo = Singleton <CRoomSystem> .GetInstance().roomInfo.selfInfo;

                    bool flag = selfInfo.ullUid == memberInfo.ullUid;
                    item.transform.Find("Occupied/imgOwner").gameObject.CustomSetActive(bActive);
                    CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CInviteSystem.PATH_INVITE_FORM);

                    bool flag2 = true;
                    if (form != null)
                    {
                        CUIListScript component2 = form.GetWidget(7).GetComponent <CUIListScript>();
                        flag2 = (component2.GetSelectedIndex() == 0);
                    }
                    string text = flag2 ? Singleton <CInviteSystem> .GetInstance().GetInviteFriendName(memberInfo.ullUid, (uint)memberInfo.iLogicWorldID) : Singleton <CInviteSystem> .GetInstance().GetInviteGuildMemberName(memberInfo.ullUid);

                    item.transform.Find("Occupied/txtPlayerName").GetComponent <Text>().set_text(string.IsNullOrEmpty(text) ? memberInfo.MemberName : text);
                    GameObject gameObject2 = Utility.FindChild(item, "Occupied/BtnSwap");
                    Transform  transform   = item.transform.Find("Occupied/BtnAddFriend");
                    if (flag)
                    {
                        if (!CSysDynamicBlock.bFriendBlocked)
                        {
                            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                            if (masterRoleInfo != null)
                            {
                                item.transform.Find("Occupied/HeadBg/imgHead").GetComponent <CUIHttpImageScript>().SetImageUrl(masterRoleInfo.HeadUrl);
                            }
                        }
                        if (transform != null)
                        {
                            transform.gameObject.CustomSetActive(false);
                        }
                        gameObject2.CustomSetActive(false);
                    }
                    else if (memberInfo.RoomMemberType == 1u)
                    {
                        if (!string.IsNullOrEmpty(memberInfo.MemberHeadUrl))
                        {
                            if (!CSysDynamicBlock.bFriendBlocked)
                            {
                                item.transform.Find("Occupied/HeadBg/imgHead").GetComponent <CUIHttpImageScript>().SetImageUrl(Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(memberInfo.MemberHeadUrl));
                            }
                            else
                            {
                                CUIFormScript form2 = Singleton <CUIManager> .GetInstance().GetForm(CRoomSystem.PATH_ROOM);

                                if (form2 != null)
                                {
                                    item.transform.Find("Occupied/HeadBg/imgHead").GetComponent <Image>().SetSprite(CUIUtility.s_Sprite_Dynamic_BustPlayer_Dir + "Common_PlayerImg", form2, true, false, false, false);
                                }
                            }
                        }
                        if (masterMemberInfo.swapStatus == 0)
                        {
                            gameObject2.CustomSetActive(true);
                        }
                        else if (masterMemberInfo.swapStatus == 1)
                        {
                            gameObject2.CustomSetActive(false);
                        }
                        else if (masterMemberInfo.swapStatus == 2)
                        {
                            gameObject2.CustomSetActive(masterMemberInfo.swapUid != memberInfo.ullUid);
                        }
                        CUIEventScript component3 = gameObject2.GetComponent <CUIEventScript>();
                        component3.m_onClickEventID          = enUIEventID.Room_ChangePos;
                        component3.m_onClickEventParams.tag  = (int)camp;
                        component3.m_onClickEventParams.tag2 = pos;
                        component3.m_onClickEventParams.tag3 = 2;
                        if (!CSysDynamicBlock.bFriendBlocked)
                        {
                            if (Singleton <CFriendContoller> .instance.model.GetGameOrSnsFriend(memberInfo.ullUid, (uint)memberInfo.iLogicWorldID) == null)
                            {
                                if (transform != null)
                                {
                                    transform.gameObject.CustomSetActive(true);
                                    CUIEventScript component4 = transform.GetComponent <CUIEventScript>();
                                    if (component4 != null)
                                    {
                                        component4.m_onClickEventParams.commonUInt64Param1 = memberInfo.ullUid;
                                        component4.m_onClickEventParams.commonUInt32Param1 = (uint)memberInfo.iLogicWorldID;
                                    }
                                }
                            }
                            else if (transform != null)
                            {
                                transform.gameObject.CustomSetActive(false);
                            }
                        }
                        else if (transform != null)
                        {
                            transform.gameObject.CustomSetActive(false);
                        }
                    }
                    else if (memberInfo.RoomMemberType == 2u)
                    {
                        CUIFormScript form3 = Singleton <CUIManager> .GetInstance().GetForm(CRoomSystem.PATH_ROOM);

                        if (form3 != null)
                        {
                            item.transform.Find("Occupied/HeadBg/imgHead").GetComponent <Image>().SetSprite(CUIUtility.s_Sprite_Dynamic_BustPlayer_Dir + "Img_ComputerHead", form3, true, false, false, false);
                        }
                        gameObject2.CustomSetActive(false);
                        if (transform != null)
                        {
                            transform.gameObject.CustomSetActive(false);
                        }
                    }
                    item.transform.Find("Occupied/BtnKick").gameObject.CustomSetActive(isSelfRoomOwner && !flag);
                    if (fromType == COM_ROOM_FROMTYPE.COM_ROOM_FROM_QQSPROT)
                    {
                        item.transform.Find("Occupied/BtnKick").gameObject.CustomSetActive(false);
                    }
                }
            }
            else
            {
                item.CustomSetActive(false);
            }
        }
Exemple #6
0
        public static void SetPlayerSlotData(GameObject item, TeamMember memberInfo, bool bAvailable)
        {
            if (bAvailable)
            {
                bool bActive          = false;
                bool isSelfTeamMaster = Singleton <CMatchingSystem> .GetInstance().IsSelfTeamMaster;

                if (memberInfo == null)
                {
                    item.CustomSetActive(true);
                    item.transform.Find("Occupied").gameObject.CustomSetActive(false);
                }
                else
                {
                    PlayerUniqueID stTeamMaster = Singleton <CMatchingSystem> .GetInstance().teamInfo.stTeamMaster;

                    bActive = (stTeamMaster.ullUid == memberInfo.uID.ullUid && stTeamMaster.iGameEntity == memberInfo.uID.iGameEntity);
                    PlayerUniqueID stSelfInfo = Singleton <CMatchingSystem> .GetInstance().teamInfo.stSelfInfo;

                    bool flag = stSelfInfo.ullUid == memberInfo.uID.ullUid && stSelfInfo.iGameEntity == memberInfo.uID.iGameEntity;
                    item.CustomSetActive(true);
                    item.transform.Find("Occupied").gameObject.CustomSetActive(true);
                    CUIEventScript componetInChild = Utility.GetComponetInChild <CUIEventScript>(item, "Occupied/BtnKick");
                    componetInChild.m_onClickEventParams.tag = (int)memberInfo.dwPosOfTeam;
                    CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CInviteSystem.PATH_INVITE_FORM);

                    bool flag2 = true;
                    if (form != null)
                    {
                        CUIListScript component = form.GetWidget(7).GetComponent <CUIListScript>();
                        flag2 = (component.GetSelectedIndex() == 0);
                    }
                    string text = flag2 ? Singleton <CInviteSystem> .GetInstance().GetInviteFriendName(memberInfo.uID.ullUid, (uint)memberInfo.uID.iLogicWorldId) : Singleton <CInviteSystem> .GetInstance().GetInviteGuildMemberName(memberInfo.uID.ullUid);

                    item.transform.Find("Occupied/txtPlayerName").GetComponent <Text>().set_text(string.IsNullOrEmpty(text) ? memberInfo.MemberName : text);
                    item.transform.Find("Occupied/BtnKick").gameObject.CustomSetActive(isSelfTeamMaster && !flag);
                    Transform transform  = item.transform.Find("Occupied/HeadBg/NobeIcon");
                    Transform transform2 = item.transform.Find("Occupied/HeadBg/NobeImag");
                    Transform transform3 = item.transform.Find("Occupied/BtnAddFriend");
                    if (flag)
                    {
                        if (!CSysDynamicBlock.bFriendBlocked)
                        {
                            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                            if (masterRoleInfo != null)
                            {
                                Transform transform4 = item.transform.Find("Occupied/HeadBg/imgHead");
                                if (transform4)
                                {
                                    transform4.GetComponent <CUIHttpImageScript>().SetImageUrl(masterRoleInfo.HeadUrl);
                                }
                            }
                        }
                        if (transform3 != null)
                        {
                            transform3.gameObject.CustomSetActive(false);
                        }
                    }
                    else
                    {
                        Transform transform5 = item.transform.Find("Occupied/HeadBg/imgHead");
                        if (!CSysDynamicBlock.bFriendBlocked)
                        {
                            if (transform5)
                            {
                                transform5.GetComponent <CUIHttpImageScript>().SetImageUrl(Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(memberInfo.snsHeadUrl));
                            }
                        }
                        else if (transform5)
                        {
                            transform5.GetComponent <CUIHttpImageScript>().SetImageUrl(null);
                        }
                        if (!CSysDynamicBlock.bFriendBlocked)
                        {
                            if (Singleton <CFriendContoller> .instance.model.GetGameOrSnsFriend(memberInfo.uID.ullUid, (uint)memberInfo.uID.iLogicWorldId) == null)
                            {
                                if (transform3 != null)
                                {
                                    transform3.gameObject.CustomSetActive(true);
                                    CUIEventScript component2 = transform3.GetComponent <CUIEventScript>();
                                    if (component2 != null)
                                    {
                                        component2.m_onClickEventParams.commonUInt64Param1 = memberInfo.uID.ullUid;
                                        component2.m_onClickEventParams.commonUInt32Param1 = (uint)memberInfo.uID.iLogicWorldId;
                                    }
                                }
                            }
                            else if (transform3 != null)
                            {
                                transform3.gameObject.CustomSetActive(false);
                            }
                        }
                        else if (transform3 != null)
                        {
                            transform3.gameObject.CustomSetActive(false);
                        }
                    }
                }
                item.transform.Find("Occupied/imgOwner").gameObject.CustomSetActive(bActive);
            }
            else
            {
                item.CustomSetActive(false);
            }
        }
Exemple #7
0
        public static void SetPlayerSlotData(GameObject item, TeamMember memberInfo, bool bAvailable)
        {
            if (bAvailable)
            {
                bool bActive          = false;
                bool flag2            = false;
                bool isSelfTeamMaster = Singleton <CMatchingSystem> .GetInstance().IsSelfTeamMaster;

                if (memberInfo == null)
                {
                    item.CustomSetActive(true);
                    item.transform.Find("Occupied").gameObject.CustomSetActive(false);
                }
                else
                {
                    PlayerUniqueID stTeamMaster = Singleton <CMatchingSystem> .GetInstance().teamInfo.stTeamMaster;

                    bActive = (stTeamMaster.ullUid == memberInfo.uID.ullUid) && (stTeamMaster.iGameEntity == memberInfo.uID.iGameEntity);
                    PlayerUniqueID stSelfInfo = Singleton <CMatchingSystem> .GetInstance().teamInfo.stSelfInfo;

                    flag2 = (stSelfInfo.ullUid == memberInfo.uID.ullUid) && (stSelfInfo.iGameEntity == memberInfo.uID.iGameEntity);
                    item.CustomSetActive(true);
                    item.transform.Find("Occupied").gameObject.CustomSetActive(true);
                    Utility.GetComponetInChild <CUIEventScript>(item, "Occupied/BtnKick").m_onClickEventParams.tag = (int)memberInfo.dwPosOfTeam;
                    CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CInviteSystem.PATH_INVITE_FORM);

                    bool flag4 = true;
                    if (form != null)
                    {
                        flag4 = form.GetWidget(7).GetComponent <CUIListScript>().GetSelectedIndex() == 0;
                    }
                    string str = !flag4 ? Singleton <CInviteSystem> .GetInstance().GetInviteGuildMemberName(memberInfo.uID.ullUid) : Singleton <CInviteSystem> .GetInstance().GetInviteFriendName(memberInfo.uID.ullUid, (uint)memberInfo.uID.iLogicWorldId);

                    item.transform.Find("Occupied/txtPlayerName").GetComponent <Text>().text = !string.IsNullOrEmpty(str) ? str : memberInfo.MemberName;
                    item.transform.Find("Occupied/BtnKick").gameObject.CustomSetActive(isSelfTeamMaster && !flag2);
                    Transform transform  = item.transform.Find("Occupied/HeadBg/NobeIcon");
                    Transform transform2 = item.transform.Find("Occupied/HeadBg/NobeImag");
                    Transform transform3 = item.transform.Find("Occupied/BtnAddFriend");
                    if (flag2)
                    {
                        if (!CSysDynamicBlock.bFriendBlocked)
                        {
                            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                            if (masterRoleInfo != null)
                            {
                                Transform transform4 = item.transform.Find("Occupied/HeadBg/imgHead");
                                if (transform4 != null)
                                {
                                    transform4.GetComponent <CUIHttpImageScript>().SetImageUrl(masterRoleInfo.HeadUrl);
                                }
                            }
                        }
                        if (transform3 != null)
                        {
                            transform3.gameObject.CustomSetActive(false);
                        }
                    }
                    else
                    {
                        bool flag5 = Singleton <CFriendContoller> .instance.model.IsGameFriend(memberInfo.uID.ullUid, (uint)memberInfo.uID.iLogicWorldId);

                        COMDT_FRIEND_INFO comdt_friend_info = Singleton <CFriendContoller> .instance.model.getFriendByUid(memberInfo.uID.ullUid, !flag5?CFriendModel.FriendType.SNS : CFriendModel.FriendType.GameFriend);

                        if (comdt_friend_info != null)
                        {
                            string str2 = Utility.UTF8Convert(comdt_friend_info.szHeadUrl);
                            if (!string.IsNullOrEmpty(str2) && !CSysDynamicBlock.bFriendBlocked)
                            {
                                Transform transform5 = item.transform.Find("Occupied/HeadBg/imgHead");
                                if (transform5 != null)
                                {
                                    transform5.GetComponent <CUIHttpImageScript>().SetImageUrl(Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(str2));
                                }
                            }
                        }
                        if (!CSysDynamicBlock.bFriendBlocked)
                        {
                            if (Singleton <CFriendContoller> .instance.model.GetGameOrSnsFriend(memberInfo.uID.ullUid, (uint)memberInfo.uID.iLogicWorldId) == null)
                            {
                                if (transform3 != null)
                                {
                                    transform3.gameObject.CustomSetActive(true);
                                    CUIEventScript component = transform3.GetComponent <CUIEventScript>();
                                    if (component != null)
                                    {
                                        component.m_onClickEventParams.commonUInt64Param1 = memberInfo.uID.ullUid;
                                        component.m_onClickEventParams.commonUInt32Param1 = (uint)memberInfo.uID.iLogicWorldId;
                                    }
                                }
                            }
                            else if (transform3 != null)
                            {
                                transform3.gameObject.CustomSetActive(false);
                            }
                        }
                        else if (transform3 != null)
                        {
                            transform3.gameObject.CustomSetActive(false);
                        }
                    }
                }
                item.transform.Find("Occupied/imgOwner").gameObject.CustomSetActive(bActive);
            }
            else
            {
                item.CustomSetActive(false);
            }
        }