Exemplo n.º 1
0
    private void ClickSend(IUIObject obj)
    {
        if (0 >= this.m_InputText.Text.Length)
        {
            return;
        }
        if (string.Empty == this.m_InputText.Text)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char == null)
        {
            return;
        }
        string text = this.m_InputText.Text;

        if ("true" == MsgHandler.HandleReturn <string>("ReservedWordManagerIsUse", new object[0]))
        {
            text = MsgHandler.HandleReturn <string>("ReservedWordManagerReplaceWord", new object[]
            {
                text
            });
        }
        if (text.Contains("*"))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("797"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
        if (this.m_DetailList.ChangeLineHeight)
        {
            this.m_DetailList.ChangeLineHeight = false;
            this.m_DetailList.LineHeight       = 114f;
            this.m_DetailList.SetColumnData("Mobile/DLG/StoryChat/NLB_News01_ColumnData" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        }
        this.m_CurrentCommentInfo           = new StoryComment_Info();
        this.m_CurrentCommentInfo.nPersonID = myCharInfo.m_PersonID;
        this.m_CurrentCommentInfo.nCharKind = myCharInfo.GetImgFaceCharKind();
        this.m_CurrentCommentInfo.szName    = TKString.StringChar(@char.GetCharName());
        this.m_CurrentCommentInfo.szMessage = TKString.StringChar(text);
        this.m_CurrentCommentInfo.nLevel    = (short)myCharInfo.GetLevel();
        GS_STORYCOMMENT_SET_REQ gS_STORYCOMMENT_SET_REQ = new GS_STORYCOMMENT_SET_REQ();

        gS_STORYCOMMENT_SET_REQ.m_nStoryCommentID = 0L;
        gS_STORYCOMMENT_SET_REQ.nStoryChatID      = this.m_CurrentStoryChat.nStoryChatID;
        TKString.StringChar(text, ref gS_STORYCOMMENT_SET_REQ.szMessage);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_SET_REQ, gS_STORYCOMMENT_SET_REQ);
    }
Exemplo n.º 2
0
    private void RequestDeleteStoryComment(object obj)
    {
        if (obj == null)
        {
            return;
        }
        long nStoryCommentID = (long)obj;
        GS_STORYCOMMENT_SET_REQ gS_STORYCOMMENT_SET_REQ = new GS_STORYCOMMENT_SET_REQ();

        gS_STORYCOMMENT_SET_REQ.m_nStoryCommentID = nStoryCommentID;
        gS_STORYCOMMENT_SET_REQ.nStoryChatID      = this.m_CurrentStoryChat.nStoryChatID;
        TKString.StringChar(string.Empty, ref gS_STORYCOMMENT_SET_REQ.szMessage);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_SET_REQ, gS_STORYCOMMENT_SET_REQ);
    }