Ejemplo n.º 1
0
    public void BtClickWhisper(IUIObject obj)
    {
        USER_FRIEND_INFO uSER_FRIEND_INFO = obj.Data as USER_FRIEND_INFO;
        GS_WHISPER_REQ   gS_WHISPER_REQ   = new GS_WHISPER_REQ();

        gS_WHISPER_REQ.RoomUnique = 0;
        TKString.StringChar(TKString.NEWString(uSER_FRIEND_INFO.szName), ref gS_WHISPER_REQ.Name);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
        NrTSingleton <WhisperManager> .Instance.MySendRequest = true;
    }
Ejemplo n.º 2
0
    private static void PlayerLinkFunc(string strText)
    {
        if (strText.Contains("[#"))
        {
            strText = strText.Remove(0, 11);
        }
        int startIndex = strText.IndexOf('[') + 1;
        int num        = strText.LastIndexOf(']') - 1;

        if (num < 0)
        {
            num = strText.Length;
        }
        string     text       = strText.Substring(startIndex, num);
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (nrCharUser == null)
        {
            return;
        }
        NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo();

        if (personInfo == null)
        {
            return;
        }
        string charName = personInfo.GetCharName();

        if (string.IsNullOrEmpty(charName))
        {
            return;
        }
        if (text.Equals(charName))
        {
            return;
        }
        int charKindByName = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByName(strText);

        if (0 < charKindByName)
        {
            return;
        }
        if (TsPlatform.IsMobile)
        {
            NrTSingleton <CRightClickMenu> .Instance.CreateUI(0L, 0, text, CRightClickMenu.KIND.CHAT_USER_LINK_TEXT, CRightClickMenu.TYPE.NAME_SECTION_2, false);
        }
        else
        {
            GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ();
            gS_WHISPER_REQ.RoomUnique = 0;
            TKString.StringChar(text, ref gS_WHISPER_REQ.Name);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
        }
    }
Ejemplo n.º 3
0
    public void BtnClickWhisper(IUIObject obj)
    {
        COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = obj.Data as COMMUNITY_USER_INFO;

        if (cOMMUNITY_USER_INFO != null)
        {
            GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ();
            gS_WHISPER_REQ.RoomUnique = 0;
            TKString.StringChar(cOMMUNITY_USER_INFO.strName, ref gS_WHISPER_REQ.Name);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
            NrTSingleton <WhisperManager> .Instance.MySendRequest = true;
        }
    }
Ejemplo n.º 4
0
    private void ListBoxSelect(IUIObject obj)
    {
        ListBox             listBox      = (ListBox)obj;
        UIListItemContainer selectedItem = listBox.SelectedItem;

        if (selectedItem == null)
        {
            Debug.LogError("CommunityPopupMenuUI_DLG.cs --ListBoxSelectUIListItemContainer l_listitem == null");
            return;
        }
        switch ((int)selectedItem.Data)
        {
        case 1:
        {
            GS_OTHERCHAR_INFO_PERMIT_REQ gS_OTHERCHAR_INFO_PERMIT_REQ = new GS_OTHERCHAR_INFO_PERMIT_REQ();
            gS_OTHERCHAR_INFO_PERMIT_REQ.nPersonID = this.m_nPersonID;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_OTHERCHAR_INFO_PERMIT_REQ, gS_OTHERCHAR_INFO_PERMIT_REQ);
            break;
        }

        case 2:
        {
            NrCharBase charByPersonID = NrTSingleton <NkCharManager> .Instance.GetCharByPersonID(this.m_nPersonID);

            Debug.Log("eCOMMUNITYMENU_WHISPER >> nPersonID : " + this.m_nPersonID.ToString() + " Name : " + charByPersonID.GetCharName());
            GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ();
            gS_WHISPER_REQ.RoomUnique = 0;
            TKString.StringChar(charByPersonID.GetCharName(), ref gS_WHISPER_REQ.Name);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
            break;
        }

        case 4:
        {
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            if (nrCharUser != null && this.m_nPersonID > 0L)
            {
                nrCharUser.SetFollowCharPersonID(this.m_nPersonID, this.m_SelectFriendName);
            }
            break;
        }

        case 5:
        {
            NrCharBase charByPersonID2 = NrTSingleton <NkCharManager> .Instance.GetCharByPersonID(this.m_nPersonID);

            if (charByPersonID2 != null)
            {
                NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.POST_DLG);
            }
            break;
        }

        case 6:
            if (this.m_SelectFriendName != null && this.m_nPersonID != -1L)
            {
                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI != null)
                {
                    string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("8");

                    string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("328");

                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        textFromMessageBox,
                        "Charname",
                        this.m_SelectFriendName
                    });

                    msgBoxUI.SetMsg(new YesDelegate(this.FriendDelYes), null, textFromInterface, empty, eMsgType.MB_OK_CANCEL, 2);
                }
            }
            break;

        case 7:
            return;
        }
        this.Close();
    }