示例#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);
    }
示例#2
0
    public void SetListAttackGuildMark()
    {
        for (int i = 0; i < this.m_lbCurrentStatus.Count; i++)
        {
            IUIListObject item = this.m_lbCurrentStatus.GetItem(i);
            if (item != null)
            {
                MINE_GUILD_CURRENTSTATUS_INFO mINE_GUILD_CURRENTSTATUS_INFO = item.Data as MINE_GUILD_CURRENTSTATUS_INFO;
                if (mINE_GUILD_CURRENTSTATUS_INFO != null)
                {
                    if (mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 1 || mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 0)
                    {
                        if (mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID > 0L)
                        {
                            DrawTexture drawTexture = ((UIListItemContainer)item).GetElement(8) as DrawTexture;
                            if (drawTexture != null)
                            {
                                if (mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID() || !mINE_GUILD_CURRENTSTATUS_INFO.bIsAttackGuildNameHide)
                                {
                                    string guildPortraitURL = NrTSingleton <NkCharManager> .Instance.GetGuildPortraitURL(mINE_GUILD_CURRENTSTATUS_INFO.i64AttackGuildID);

                                    WebFileCache.RequestImageWebFile(guildPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebGuildImageCallback), drawTexture);
                                }
                                else
                                {
                                    drawTexture.SetTexture("Win_BI_Nomark");
                                }
                            }
                        }
                    }
                    else if (mINE_GUILD_CURRENTSTATUS_INFO.byCurrentStatusType == 2)
                    {
                        DrawTexture drawTexture2 = ((UIListItemContainer)item).GetElement(8) as DrawTexture;
                        if (drawTexture2 != null)
                        {
                            NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
                            drawTexture2.SetTexture(eCharImageType.SMALL, kMyCharInfo.GetImgFaceCharKind(), -1, string.Empty);
                        }
                    }
                }
            }
        }
    }