Beispiel #1
0
        public bool BCanSendHeart(COMDT_ACNT_UNIQ uniq, COM_FRIEND_TYPE friendType)
        {
            int heartDataIndex = this.GetHeartDataIndex(uniq, friendType);

            return((heartDataIndex == -1) || this._sendHeartList[heartDataIndex].bCanSend);
        }
Beispiel #2
0
 public static void Send_Request_BeFriend(COMDT_ACNT_UNIQ uniq, string veriyText = "")
 {
     Send_Request_BeFriend(uniq.ullUid, uniq.dwLogicWorldId, veriyText);
 }
Beispiel #3
0
        public static void OnRankingArenaElementEnable(CUIEvent uiEvent)
        {
            int        srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList;
            GameObject srcWidget = uiEvent.m_srcWidget;
            GameObject obj3      = Utility.FindChild(srcWidget, "addFriendBtn");
            GameObject obj4      = Utility.FindChild(srcWidget, "sendButton");

            if (Singleton <CArenaSystem> .instance.m_rankInfoList.astFigterDetail[srcWidgetIndexInBelongedList].stFigterData.bMemberType == 1)
            {
                COMDT_ARENA_MEMBER_OF_ACNT fighterInfo = CArenaSystem.GetFighterInfo(Singleton <CArenaSystem> .instance.m_rankInfoList.astFigterDetail[srcWidgetIndexInBelongedList].stFigterData);
                ulong ullUid       = fighterInfo.ullUid;
                uint  logicWorldID = (uint)MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID;

                COMDT_FRIEND_INFO comdt_friend_info = Singleton <CFriendContoller> .instance.model.GetInfo(CFriendModel.FriendType.GameFriend, ullUid, logicWorldID);

                COMDT_FRIEND_INFO comdt_friend_info2 = Singleton <CFriendContoller> .instance.model.GetInfo(CFriendModel.FriendType.SNS, ullUid, logicWorldID);

                bool flag  = comdt_friend_info != null;
                bool flag2 = comdt_friend_info2 != null;
                if (!flag && !flag2)
                {
                    ulong playerUllUID = (uint)Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().playerUllUID;

                    obj3.CustomSetActive(playerUllUID != fighterInfo.ullUid);
                    obj4.CustomSetActive(false);
                    CUIEventScript componetInChild = Utility.GetComponetInChild <CUIEventScript>(obj3, "AddFriend");
                    componetInChild.m_onClickEventID         = enUIEventID.Ranking_ArenaAddFriend;
                    componetInChild.m_onClickEventParams.tag = (int)logicWorldID;
                    componetInChild.m_onClickEventParams.commonUInt64Param1 = fighterInfo.ullUid;
                }
                else
                {
                    COMDT_ACNT_UNIQ uniq = (comdt_friend_info != null) ? comdt_friend_info.stUin : comdt_friend_info2.stUin;
                    obj3.CustomSetActive(false);
                    obj4.CustomSetActive(true);
                    bool flag3 = Singleton <CFriendContoller> .instance.model.HeartData.BCanSendHeart(uniq, COM_FRIEND_TYPE.COM_FRIEND_TYPE_GAME);

                    bool flag4 = Singleton <CFriendContoller> .instance.model.HeartData.BCanSendHeart(uniq, COM_FRIEND_TYPE.COM_FRIEND_TYPE_SNS);

                    bool isEnable = flag3 && flag4;
                    CUICommonSystem.SetButtonEnableWithShader(obj4.GetComponent <Button>(), isEnable, true);
                    if (isEnable)
                    {
                        CUIEventScript component = obj4.GetComponent <CUIEventScript>();
                        if (flag)
                        {
                            component.m_onClickEventID = enUIEventID.Ranking_Friend_GAME_SendCoin;
                        }
                        else
                        {
                            component.m_onClickEventID = enUIEventID.Friend_SendCoin;
                        }
                        component.m_onClickEventParams.tag = srcWidgetIndexInBelongedList;
                        component.m_onClickEventParams.commonUInt64Param1 = uniq.ullUid;
                        component.m_onClickEventParams.commonUInt64Param2 = uniq.dwLogicWorldId;
                    }
                }
            }
            else
            {
                obj3.CustomSetActive(false);
                obj4.CustomSetActive(false);
            }
            CArenaSystem.Arena_RankElementEnable(uiEvent);
        }
Beispiel #4
0
 public static void Check_AddReCallCD(COMDT_ACNT_UNIQ uniq, COM_FRIEND_TYPE friendType)
 {
     Singleton <CFriendContoller> .GetInstance().model.SnsReCallData.Add(uniq, friendType);
 }
 public static void Send_Request_BeFriend(COMDT_ACNT_UNIQ uniq)
 {
     Send_Request_BeFriend(uniq.ullUid, uniq.dwLogicWorldId);
 }
 public bool BInCd(COMDT_ACNT_UNIQ uniq, COM_FRIEND_TYPE friendType)
 {
     return(this.GetFriendReCallDataIndex(uniq, friendType) != -1);
 }
Beispiel #7
0
 public COMDT_FRIEND_INFO GetInfo(FriendType type, COMDT_ACNT_UNIQ uniq)
 {
     return(this.getFriendInfo(uniq.ullUid, uniq.dwLogicWorldId, this.GetList(type)));
 }
Beispiel #8
0
        public void Remove(FriendType type, COMDT_ACNT_UNIQ uniq)
        {
            COMDT_FRIEND_INFO info = this.GetInfo(type, uniq);

            this.Remove(type, info);
        }
Beispiel #9
0
        public static void OnRankingArenaElementEnable(CUIEvent uiEvent)
        {
            int        srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList;
            GameObject srcWidget   = uiEvent.m_srcWidget;
            GameObject gameObject  = Utility.FindChild(srcWidget, "addFriendBtn");
            GameObject gameObject2 = Utility.FindChild(srcWidget, "sendButton");

            if (Singleton <CArenaSystem> .get_instance().m_rankInfoList.astFigterDetail[srcWidgetIndexInBelongedList].stFigterData.bMemberType == 1)
            {
                COMDT_ARENA_MEMBER_OF_ACNT fighterInfo = CArenaSystem.GetFighterInfo(Singleton <CArenaSystem> .get_instance().m_rankInfoList.astFigterDetail[srcWidgetIndexInBelongedList].stFigterData);
                ulong ullUid       = fighterInfo.ullUid;
                uint  logicWorldID = (uint)MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID;

                COMDT_FRIEND_INFO info = Singleton <CFriendContoller> .get_instance().model.GetInfo(CFriendModel.FriendType.GameFriend, ullUid, logicWorldID);

                COMDT_FRIEND_INFO info2 = Singleton <CFriendContoller> .get_instance().model.GetInfo(CFriendModel.FriendType.SNS, ullUid, logicWorldID);

                bool flag  = info != null;
                bool flag2 = info2 != null;
                if (!flag && !flag2)
                {
                    ulong num = (ulong)((uint)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().playerUllUID);
                    gameObject.CustomSetActive(num != fighterInfo.ullUid);
                    gameObject2.CustomSetActive(false);
                    CUIEventScript componetInChild = Utility.GetComponetInChild <CUIEventScript>(gameObject, "AddFriend");
                    componetInChild.m_onClickEventID         = enUIEventID.Ranking_ArenaAddFriend;
                    componetInChild.m_onClickEventParams.tag = (int)logicWorldID;
                    componetInChild.m_onClickEventParams.commonUInt64Param1 = fighterInfo.ullUid;
                }
                else
                {
                    COMDT_ACNT_UNIQ cOMDT_ACNT_UNIQ = (info != null) ? info.stUin : info2.stUin;
                    gameObject.CustomSetActive(false);
                    gameObject2.CustomSetActive(true);
                    bool flag3 = Singleton <CFriendContoller> .get_instance().model.HeartData.BCanSendHeart(cOMDT_ACNT_UNIQ);

                    CUICommonSystem.SetButtonEnableWithShader(gameObject2.GetComponent <Button>(), flag3, true);
                    if (flag3)
                    {
                        CUIEventScript component = gameObject2.GetComponent <CUIEventScript>();
                        if (flag)
                        {
                            component.m_onClickEventID = enUIEventID.Ranking_Friend_GAME_SendCoin;
                        }
                        else
                        {
                            component.m_onClickEventID = enUIEventID.Friend_SendCoin;
                        }
                        component.m_onClickEventParams.tag = srcWidgetIndexInBelongedList;
                        component.m_onClickEventParams.commonUInt64Param1 = cOMDT_ACNT_UNIQ.ullUid;
                        component.m_onClickEventParams.commonUInt64Param2 = (ulong)cOMDT_ACNT_UNIQ.dwLogicWorldId;
                    }
                }
            }
            else
            {
                gameObject.CustomSetActive(false);
                gameObject2.CustomSetActive(false);
            }
            CArenaSystem.Arena_RankElementEnable(uiEvent);
        }
 private void Handle_Invite_Data(COMDT_ACNT_UNIQ uin)
 {
     this.model.SnsReCallData.Add(uin, COM_FRIEND_TYPE.COM_FRIEND_TYPE_SNS);
 }
Beispiel #11
0
        public bool BCanSendHeart(COMDT_ACNT_UNIQ uniq)
        {
            int heartDataIndex = this.GetHeartDataIndex(uniq);

            return(heartDataIndex == -1 || this._sendHeartList[heartDataIndex].bCanSend);
        }