示例#1
0
    public void REQ_INVITE_FRIEND()
    {
        NrMyCharInfo kMyCharInfo      = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        int          limitFriendCount = BASE_FRIENDCOUNTLIMIT_DATA.GetLimitFriendCount((short)kMyCharInfo.GetLevel());

        if (kMyCharInfo.m_kFriendInfo.GetFriendCount() >= limitFriendCount)
        {
            return;
        }
        if (Friend_InvitePersonManager.Get_Instance().IsAble_InvitePerson(kMyCharInfo.GetLevel(), kMyCharInfo.m_kFriendInfo.GetFriendCount()))
        {
            GS_GUIDE_INVITE_FRIEND_REQ gS_GUIDE_INVITE_FRIEND_REQ = new GS_GUIDE_INVITE_FRIEND_REQ();
            gS_GUIDE_INVITE_FRIEND_REQ.ui8ReqType = 0;
            SendPacket.GetInstance().SendObject(912, gS_GUIDE_INVITE_FRIEND_REQ);
        }
    }
示例#2
0
    public void BtClickAdd(IUIObject obj)
    {
        NrMyCharInfo kMyCharInfo      = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        int          limitFriendCount = BASE_FRIENDCOUNTLIMIT_DATA.GetLimitFriendCount((short)kMyCharInfo.GetLevel());

        if (kMyCharInfo.m_kFriendInfo.GetFriendCount() >= limitFriendCount)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("630");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        this.m_clMsg = (CommunityMsgUI_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.COMMUNITYMSG_DLG);

        this.m_clMsg.SetMode(eMsgMox_Type.eCommunity_Friend_Add);
    }
示例#3
0
    public void BtClickRecommend(IUIObject obj)
    {
        NrMyCharInfo kMyCharInfo      = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        int          limitFriendCount = BASE_FRIENDCOUNTLIMIT_DATA.GetLimitFriendCount((short)kMyCharInfo.GetLevel());

        if (kMyCharInfo.m_kFriendInfo.GetFriendCount() >= limitFriendCount)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("630");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        this.fStartTime_InviteFriend = Time.realtimeSinceStartup;
        this.m_bInviteFriend         = true;
        this.m_btFriendRecommend.SetEnabled(false);
        GS_GUIDE_INVITE_FRIEND_REQ gS_GUIDE_INVITE_FRIEND_REQ = new GS_GUIDE_INVITE_FRIEND_REQ();

        gS_GUIDE_INVITE_FRIEND_REQ.ui8ReqType = 1;
        SendPacket.GetInstance().SendObject(912, gS_GUIDE_INVITE_FRIEND_REQ);
        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.COMMUNITY_DLG);

        this.Close();
    }
示例#4
0
    public void BtClickFaceBookAdd(IUIObject obj)
    {
        if (!TsPlatform.IsMobile || TsPlatform.IsEditor)
        {
            return;
        }
        NrMyCharInfo kMyCharInfo      = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        int          limitFriendCount = BASE_FRIENDCOUNTLIMIT_DATA.GetLimitFriendCount((short)kMyCharInfo.GetLevel());

        if (kMyCharInfo.m_kFriendInfo.GetFriendCount() >= limitFriendCount)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("630");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int @int = PlayerPrefs.GetInt("FacebookGetFriend:" + kMyCharInfo.m_PersonID.ToString());

        TsLog.LogWarning("FacebookGetFriend:{0}={1}", new object[]
        {
            kMyCharInfo.m_PersonID,
            @int
        });
        if (@int == 0)
        {
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1019");

            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            msgBoxUI.SetMsg(new YesDelegate(this._OnMessageBoxOK), null, new NoDelegate(this._OnMessageBoxCancel), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1018"), textFromInterface, eMsgType.MB_OK_CANCEL);
            msgBoxUI.Show();
        }
        else
        {
            NmFacebookManager.instance.InviteUser();
        }
    }