Ejemplo n.º 1
0
    public override string GetGameGuideText()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return(string.Empty);
        }
        short level = (short)kMyCharInfo.GetLevel();
        int   num   = 0;
        FRIENDCOUNTLIMIT_DATA firneCountLimitInfo = BASE_FRIENDCOUNTLIMIT_DATA.GetFirneCountLimitInfo(level);

        if (firneCountLimitInfo != null)
        {
            num = firneCountLimitInfo.FriendLimitCount;
        }
        string textFromToolTip = NrTSingleton <NrTextMgr> .Instance.GetTextFromToolTip("2052");

        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromToolTip,
            "count",
            num
        });

        return(empty);
    }
Ejemplo n.º 2
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);
        }
    }
Ejemplo n.º 3
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);
    }
Ejemplo n.º 4
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();
    }
Ejemplo n.º 5
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();
        }
    }
Ejemplo n.º 6
0
 public override bool CheckGameGuide()
 {
     if (this.m_eCheck == GameGuideCheck.LEVELUP)
     {
         NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
         if (kMyCharInfo == null)
         {
             return(false);
         }
         short level = (short)kMyCharInfo.GetLevel();
         int   @int  = PlayerPrefs.GetInt("FriendLimitCheckLevel");
         FRIENDCOUNTLIMIT_DATA firneCountLimitInfo = BASE_FRIENDCOUNTLIMIT_DATA.GetFirneCountLimitInfo(level);
         if (firneCountLimitInfo == null)
         {
             return(false);
         }
         if ((int)firneCountLimitInfo.Level_Max > @int)
         {
             PlayerPrefs.SetInt("FriendLimitCheckLevel", (int)firneCountLimitInfo.Level_Max);
             return(true);
         }
     }
     return(false);
 }