private void SetCharList()
    {
        NrCharBase[] @char = NrTSingleton <NkCharManager> .Instance.Get_Char();

        NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        int num = 0;

        this.m_nlbCharList.Clear();
        NrCharBase[] array = @char;
        for (int i = 0; i < array.Length; i++)
        {
            NrCharBase nrCharBase = array[i];
            if (nrCharBase != null && nrCharBase.GetPersonID() > 0L && char2.GetPersonID() != nrCharBase.GetPersonID())
            {
                if (num >= this.m_nCurPage * this.m_nNumPerPage && num < (this.m_nCurPage + 1) * this.m_nNumPerPage)
                {
                    NewListItem newListItem = new NewListItem(this.m_nlbCharList.ColumnNum, true, string.Empty);
                    newListItem.SetListItemData(0, nrCharBase.GetCharName(), null, null, null);
                    newListItem.SetListItemData(1, nrCharBase.GetPersonInfo().GetLevel(0L).ToString(), null, null, null);
                    newListItem.Data = nrCharBase.GetCharName();
                    this.m_nlbCharList.Add(newListItem);
                    this.m_nlbCharList.RepositionItems();
                    num++;
                }
                else
                {
                    num++;
                }
            }
        }
        this.m_nTotalPage = num / this.m_nNumPerPage + 1;
    }
Exemplo n.º 2
0
 public void PushCharChat(NrCharBase charBase, string msg, CHAT_TYPE _ChatType)
 {
     this.CharChatQueue.Enqueue(new CharChat(charBase, msg, _ChatType));
     if (80 <= this.ChatMsgList.Count)
     {
         this.ChatMsgList.Dequeue();
     }
     if (charBase.GetCharName() == NrTSingleton <NkCharManager> .Instance.GetCharName())
     {
         MainChatMsg item = new MainChatMsg(_ChatType, charBase.GetCharName(), msg, new ITEM(), string.Empty);
         this.ChatMsgList.Enqueue(item);
     }
 }
Exemplo n.º 3
0
    private void CommandCharList()
    {
        NrCharBase[] @char = NrTSingleton <NkCharManager> .Instance.Get_Char();

        int num = 0;

        NrCharBase[] array = @char;
        for (int i = 0; i < array.Length; i++)
        {
            NrCharBase nrCharBase = array[i];
            if (nrCharBase != null)
            {
                NrTSingleton <NrDebugConsole> .Instance.Print(string.Concat(new object[]
                {
                    num.ToString(),
                    ": ",
                    nrCharBase.GetCharName(),
                    "(",
                    nrCharBase.GetCharUnique(),
                    ")"
                }));
            }
            num++;
        }
    }
Exemplo n.º 4
0
    public void UpdateDamageInfo(long addDamageData)
    {
        if (addDamageData > 0L)
        {
            string empty = string.Empty;
            this.m_TotalMythRaidDamage = addDamageData;
            string text = ANNUALIZED.Convert(this.m_TotalMythRaidDamage);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3133"),
                "damage",
                text
            });

            this.TextUpdateAndPlayAni(this.m_lbDamageNum, empty);
            if (addDamageData >= this.upperBestDamage)
            {
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (@char != null)
                {
                    this.m_lbUpperPlayer.SetText(@char.GetCharName());
                }
                this.TextUpdateAndPlayAni(this.m_lbUpperDamage, addDamageData.ToString());
            }
        }
    }
    public void OnClickStartGuildBoss(IUIObject obj)
    {
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "FORMATION-COMPLETE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        short guildBossLastFloor = NrTSingleton <ContentsLimitManager> .Instance.GetGuildBossLastFloor();

        if (0 < guildBossLastFloor && guildBossLastFloor < SoldierBatch.GUILDBOSS_INFO.m_i16Floor)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("608"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (!SoldierBatch.SOLDIERBATCH.IsHeroGuildBossBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int tempCount = SoldierBatch.SOLDIERBATCH.GetTempCount();
        int num       = 9;

        if (tempCount <= 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("181"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94");

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

        if (tempCount < num)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("147");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                text,
                "currentnum",
                tempCount,
                "maxnum",
                num
            });

            msgBoxUI.SetMsg(new YesDelegate(this.OnCompleteGuildBossBatch), null, textFromMessageBox, empty2, eMsgType.MB_OK_CANCEL, 2);
            return;
        }
        this.OnCompleteGuildBossBatch(null);
    }
    public void OnClickReady(IUIObject obj)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        if (!SoldierBatch.MYTHRAID_INFO.IsReadyBattle(charPersonInfo.GetPersonID()))
        {
            if (!SoldierBatch.SOLDIERBATCH.IsHeroBabelBatch())
            {
                string     empty = string.Empty;
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                    "charname",
                    @char.GetCharName()
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();
            if (SoldierBatch.MYTHRAID_INFO.Count <= 0)
            {
                SoldierBatch.MYTHRAID_INFO.Count = 1;
            }
            byte count = SoldierBatch.MYTHRAID_INFO.Count;
            int  num   = (int)(12 / count);
            if (solBatchNum < num)
            {
                string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("21");

                string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("74");

                string empty2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                {
                    textFromMessageBox2,
                    "currentnum",
                    solBatchNum,
                    "maxnum",
                    num
                });

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

                msgBoxUI.SetMsg(new YesDelegate(this.OnReadyMythRaid), null, textFromMessageBox, empty2, eMsgType.MB_OK_CANCEL, 2);
                return;
            }
        }
        this.OnReadyMythRaid(null);
    }
Exemplo n.º 7
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);
    }
    private string GetCharName()
    {
        if (NrTSingleton <NkCharManager> .Instance == null)
        {
            return(string.Empty);
        }
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char == null)
        {
            return(string.Empty);
        }
        return(@char.GetCharName());
    }
Exemplo n.º 9
0
    private void CommandCharInfo(NrCommandInterpreter.NrCommand kCommand)
    {
        if (kCommand.m_arArg.Count < 1)
        {
            this.ErrorArgCount();
            return;
        }
        short charunique = 0;

        try
        {
            charunique = Convert.ToInt16(kCommand.m_arArg[1]);
        }
        catch (Exception)
        {
            NrTSingleton <NrDebugConsole> .Instance.Print("convert error.");

            return;
        }
        NrCharBase charByCharUnique = NrTSingleton <NkCharManager> .Instance.GetCharByCharUnique(charunique);

        if (charByCharUnique == null)
        {
            NrTSingleton <NrDebugConsole> .Instance.Print("not found character.");

            return;
        }
        NrTSingleton <NrDebugConsole> .Instance.Print("========= " + charByCharUnique.GetCharName() + " ======================");

        NrTSingleton <NrDebugConsole> .Instance.Print(charByCharUnique.Get3DChar().ToString());

        NrTSingleton <NrDebugConsole> .Instance.Print("Pos : " + charByCharUnique.Get3DChar().GetRootGameObject().transform.position.ToString());

        NrTSingleton <NrDebugConsole> .Instance.Print("Scale : " + charByCharUnique.Get3DChar().GetRootGameObject().transform.localScale.ToString());

        NrTSingleton <NrDebugConsole> .Instance.Print("Fade state : " + charByCharUnique.m_fCurrentAlphaFadeLerp);

        NrTSingleton <NrDebugConsole> .Instance.Print("Build step : " + charByCharUnique.m_e3DCharStep);

        this.PrintObjectRenderStateReculsively(charByCharUnique.Get3DChar().GetRootGameObject().transform);
        CharacterController component = charByCharUnique.Get3DChar().GetRootGameObject().GetComponent <CharacterController>();

        if (null != component)
        {
            NrTSingleton <NrDebugConsole> .Instance.Print("there's character controller.");
        }
        charByCharUnique.debugLog.PrintLogs();
        charByCharUnique.m_k3DChar.debugLog.PrintLogs();
    }
Exemplo n.º 10
0
    private void Click_DailyDungeonStart(IUIObject Obj)
    {
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (nrCharUser == null)
        {
            return;
        }
        if (nrCharUser.GetPersonInfoUser() == null)
        {
            return;
        }
        if (!SoldierBatch.SOLDIERBATCH.IsHeroDailyDungeonBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int tempCount = SoldierBatch.SOLDIERBATCH.GetTempCount();
        int num       = 0;

        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON)
        {
            if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
            {
                return;
            }
            num = 6;
        }
        if (tempCount < num)
        {
            this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnCompleteBatch_DailyDungeon), tempCount, num);
            return;
        }
        this.OnCompleteBatch_DailyDungeon(null);
    }
    public void OnClickOK(IUIObject obj)
    {
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "FORMATION-COMPLETE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        SoldierBatch.SOLDIERBATCH.CheckSameBattlePos(SoldierBatch.SOLDIER_BATCH_MODE);
        if (!SoldierBatch.SOLDIERBATCH.IsHeroBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();
        int num;

        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP)
        {
            if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
            {
                return;
            }
            num = 6;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2)
        {
            num = 3;
        }
        else
        {
            num = SoldierBatch.SOLDIERBATCH.GetMaxSolArray();
        }
        if (solBatchNum < num)
        {
            this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnCompleteBatch), solBatchNum, num);
            return;
        }
        this.OnCompleteBatch(null);
    }
    public void OnPlunderStart(IUIObject obj)
    {
        if (!SoldierBatch.SOLDIERBATCH.IsHeroBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_COOLTIME);
        long dueDateTick = PublicMethod.GetDueDateTick(charSubData);

        if (dueDateTick > 0L)
        {
            string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94");

            string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("24");

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

            msgBoxUI.SetMsg(new YesDelegate(this.OnStartMatch), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2);
            return;
        }
        int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();
        int maxSolArray = SoldierBatch.SOLDIERBATCH.GetMaxSolArray();

        if (solBatchNum < maxSolArray)
        {
            this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnStartMatch), solBatchNum, maxSolArray);
            return;
        }
        this.OnStartMatch(null);
    }
Exemplo n.º 13
0
    public void SetReady(GS_TOURNAMENT_PLAYER_STATE_NFY _NFY)
    {
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null && @char.GetCharName().Equals(TKString.NEWString(_NFY.szPlayerName)))
        {
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo != null && myCharInfo.Tournament)
            {
                if (_NFY.nPlayerState != 3)
                {
                    if (_NFY.nPlayerState == 2)
                    {
                    }
                }
            }
        }
    }
    public void OnClickChangeInitiativeGuildBoss(IUIObject obj)
    {
        if (!SoldierBatch.SOLDIERBATCH.IsHeroGuildBossBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        InitiativeSetDlg initiativeSetDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INITIATIVE_SET_DLG) as InitiativeSetDlg;

        if (initiativeSetDlg != null)
        {
            initiativeSetDlg.SetBatchSolList(eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_GUILD_BOSS);
        }
    }
Exemplo n.º 15
0
    public void SetStoryCommentList(byte canLike, StoryComment_Info[] array)
    {
        if (canLike == 0)
        {
            this.m_Like.controlIsEnabled = false;
        }
        if (array == null)
        {
            return;
        }
        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);
        }
        string     b     = string.Empty;
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null)
        {
            b = @char.GetCharName();
        }
        int num = 0;

        for (int i = array.Length - 1; i >= 0; i--)
        {
            if (array[i].nStoryCommentID != 0L)
            {
                NewListItem newListItem = new NewListItem(this.m_DetailList.ColumnNum, true, string.Empty);
                Texture2D   texture2D   = null;
                if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG))
                {
                    StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg;

                    if (storyChatDlg != null)
                    {
                        texture2D = storyChatDlg.GetFriendPortraitPersonID(array[i].nPersonID);
                    }
                }
                if (texture2D != null)
                {
                    newListItem.SetListItemData(1, texture2D, null, null, null, null);
                }
                else
                {
                    EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(array[i].nCharKind);

                    if (eventHeroCharFriendCode != null)
                    {
                        newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                        newListItem.EventMark = true;
                    }
                    newListItem.SetListItemData(1, new CostumeDrawTextureInfo
                    {
                        charKind            = array[i].nCharKind,
                        grade               = -1,
                        costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[i].nFaceCharCostumeUnique)
                    }, null, null, null);
                }
                string text = TKString.NEWString(array[i].szName);
                newListItem.SetListItemData(2, NrTSingleton <UIDataManager> .Instance.GetString(text, "(", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), array[i].nLevel.ToString(), ")"), null, null, null);
                DateTime dueDate           = PublicMethod.GetDueDate(array[i].nTime);
                string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    textFromInterface,
                    "month",
                    dueDate.Month,
                    "day",
                    dueDate.Day,
                    "hour",
                    dueDate.Hour,
                    "min",
                    dueDate.Minute
                });

                newListItem.SetListItemData(3, empty, null, null, null);
                string text2 = TKString.NEWString(array[i].szMessage);
                newListItem.SetListItemData(4, text2, null, null, null);
                newListItem.SetListItemData(5, string.Empty, text, new EZValueChangedDelegate(this.ClickUser), null);
                if (this.m_bMyStoryChat || text == b)
                {
                    newListItem.SetListItemData(6, string.Empty, array[i].nStoryCommentID, new EZValueChangedDelegate(this.DeleteStoryComment), null);
                }
                else
                {
                    newListItem.SetListItemData(6, false);
                }
                newListItem.Data = array[i];
                if (!this.m_bAddComment)
                {
                    this.m_DetailList.Add(newListItem);
                    TsLog.LogError("m_bAddComment ={0} CommentID:{1} Message:{2}", new object[]
                    {
                        this.m_bAddComment,
                        array[i].nStoryCommentID,
                        text2
                    });
                }
                else
                {
                    this.m_DetailList.InsertAdd(1 + num++, newListItem);
                    TsLog.LogError("InsertAdd m_bAddComment ={0} Count = {3} CommentID:{1} Message:{2}", new object[]
                    {
                        this.m_bAddComment,
                        array[i].nStoryCommentID,
                        text2,
                        num
                    });
                }
                this.m_nCommentCount++;
            }
        }
        this.m_DetailList.RepositionItems();
        this.m_bAddComment    = true;
        this.m_nLastCommentID = array[array.Length - 1].nStoryCommentID;
        TsLog.LogError("m_nCommentCount ={0} m_nLastCommentID ={1}", new object[]
        {
            this.m_nCommentCount,
            this.m_nLastCommentID
        });
    }
Exemplo n.º 16
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();
    }
Exemplo n.º 17
0
    public void UpdateUserPersonID(long i64PersonID)
    {
        for (int i = 0; i < this.m_StoryChatList.Count; i++)
        {
            UIListItemContainer item = this.m_StoryChatList.GetItem(i);
            if (!(item == null))
            {
                StoryChat_Info storyChat_Info = (StoryChat_Info)item.data;
                if (storyChat_Info != null)
                {
                    if (storyChat_Info.nPersonID == i64PersonID)
                    {
                        NewListItem newListItem            = new NewListItem(this.m_StoryChatList.ColumnNum, true, string.Empty);
                        Texture2D   friendPortraitPersonID = this.GetFriendPortraitPersonID(storyChat_Info.nPersonID);
                        if (friendPortraitPersonID != null)
                        {
                            newListItem.SetListItemData(1, friendPortraitPersonID, null, null, null, null);
                        }
                        else
                        {
                            EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(storyChat_Info.nCharKind);

                            if (eventHeroCharFriendCode != null)
                            {
                                newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                                newListItem.EventMark = true;
                            }
                            newListItem.SetListItemData(1, storyChat_Info.nCharKind, null, null, null);
                        }
                        string text = TKString.NEWString(storyChat_Info.szName);
                        if (0L < storyChat_Info.nGuildID)
                        {
                            newListItem.SetListItemData(2, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + text, null, null, null);
                        }
                        else
                        {
                            newListItem.SetListItemData(2, text, null, null, null);
                        }
                        newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + storyChat_Info.nLevel.ToString(), null, null, null);
                        DateTime dueDate           = PublicMethod.GetDueDate(storyChat_Info.nTime);
                        string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

                        string empty = string.Empty;
                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                        {
                            textFromInterface,
                            "month",
                            dueDate.Month,
                            "day",
                            dueDate.Day,
                            "hour",
                            dueDate.Hour,
                            "min",
                            dueDate.Minute
                        });

                        newListItem.SetListItemData(4, empty, null, null, null);
                        string text2 = TKString.NEWString(storyChat_Info.szMessage);
                        text2 = text2.Replace("\n", " ");
                        if (89 < text2.Length)
                        {
                            text2  = text2.Substring(0, 89);
                            text2 += "...";
                        }
                        newListItem.SetListItemData(6, text2, null, null, null);
                        newListItem.SetListItemData(9, storyChat_Info.nCommentCount.ToString(), null, null, null);
                        newListItem.SetListItemData(10, storyChat_Info.nLikeCount.ToString(), null, null, null);
                        newListItem.SetListItemData(12, false);
                        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                        if (@char != null)
                        {
                            if (text == @char.GetCharName())
                            {
                                newListItem.SetListItemData(14, string.Empty, storyChat_Info.nStoryChatID, new EZValueChangedDelegate(this.DeleteStoryChat), null);
                            }
                            else
                            {
                                newListItem.SetListItemData(14, false);
                            }
                        }
                        this.m_StoryChatList.RemoveAdd(i, newListItem);
                    }
                }
            }
        }
        this.m_StoryChatList.RepositionItems();
    }
Exemplo n.º 18
0
    public void SetStoryChat(StoryChat_Info info, bool battleReplay)
    {
        GS_STORYCOMMENT_GET_REQ gS_STORYCOMMENT_GET_REQ = new GS_STORYCOMMENT_GET_REQ();

        gS_STORYCOMMENT_GET_REQ.nStoryChatID    = info.nStoryChatID;
        gS_STORYCOMMENT_GET_REQ.nStoryCommentID = 0L;
        gS_STORYCOMMENT_GET_REQ.nLoadCount      = 10;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_GET_REQ, gS_STORYCOMMENT_GET_REQ);
        this.m_CurrentStoryChat = info;
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("322");

        string text  = string.Empty;
        string text2 = TKString.NEWString(info.szName);

        if (!battleReplay)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                textFromInterface,
                "targetname",
                text2
            });
        }
        else if (info.nCharKind == 8)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1307");
        }
        else if (info.nCharKind == 6)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("436");
        }
        else if (info.nCharKind == 5)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("43");
        }
        this.m_Title.Text = text;
        this.m_DetailList.ChangeLineHeight = true;
        this.m_DetailList.LineHeight       = 160f;
        this.m_DetailList.Clear();
        NewListItem newListItem = new NewListItem(this.m_DetailList.ColumnNum, true, string.Empty);

        if (!battleReplay)
        {
            Texture2D texture2D = null;
            if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG))
            {
                StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg;

                if (storyChatDlg != null)
                {
                    texture2D = storyChatDlg.GetFriendPortraitPersonID(info.nPersonID);
                }
            }
            if (texture2D != null)
            {
                newListItem.SetListItemData(1, texture2D, null, null, null, null);
            }
            else
            {
                EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(info.nCharKind);

                if (eventHeroCharFriendCode != null)
                {
                    newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                    newListItem.EventMark = true;
                }
                newListItem.SetListItemData(1, new CostumeDrawTextureInfo
                {
                    charKind            = info.nCharKind,
                    grade               = -1,
                    costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(info.nFaceCharCostumeUnique)
                }, null, null, null);
            }
            newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + info.nLevel.ToString(), null, null, null);
            string text3 = TKString.NEWString(info.szMessage);
            text3 = text3.Replace("\n", "\r\n");
            newListItem.SetListItemData(6, text3, null, null, null);
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            if (@char != null)
            {
                if (text2 == @char.GetCharName())
                {
                    this.m_bMyStoryChat = true;
                }
                else
                {
                    newListItem.SetListItemData(13, false);
                    this.m_bMyStoryChat = false;
                }
            }
        }
        else
        {
            char[] separator = new char[]
            {
                '/'
            };
            string[] array = TKString.NEWString(info.szMessage).Split(separator);
            if (info.nCharKind == 8)
            {
                newListItem.SetListItemData(1, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1956"),
                    "targetname1",
                    array[1],
                    "targetname2",
                    array[2]
                });

                newListItem.SetListItemData(6, empty, null, null, null);
            }
            else if (info.nCharKind == 6)
            {
                newListItem.SetListItemData(1, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                string empty2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1957"),
                    "targetname1",
                    array[1],
                    "targetname2",
                    array[2]
                });

                newListItem.SetListItemData(6, empty2, null, null, null);
            }
            else if (info.nCharKind == 5)
            {
                newListItem.SetListItemData(1, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                string empty3 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1957"),
                    "targetname1",
                    array[1],
                    "targetname2",
                    array[2]
                });

                newListItem.SetListItemData(6, empty3, null, null, null);
            }
            newListItem.SetListItemData(3, false);
            newListItem.SetListItemData(13, false);
            this.m_bMyStoryChat = false;
        }
        newListItem.SetListItemData(2, text2, null, null, null);
        DateTime dueDate = PublicMethod.GetDueDate(info.nTime);

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

        text = string.Empty;
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            textFromInterface,
            "month",
            dueDate.Month,
            "day",
            dueDate.Day,
            "hour",
            dueDate.Hour,
            "min",
            dueDate.Minute
        });

        newListItem.SetListItemData(4, text, null, null, null);
        newListItem.SetListItemData(9, info.nLikeCount.ToString(), null, null, null);
        newListItem.SetListItemData(10, info.nCommentCount.ToString(), null, null, null);
        newListItem.SetListItemData(11, string.Empty, info.nStoryChatID, new EZValueChangedDelegate(this.ClickLikeList), null);
        newListItem.SetListItemData(12, string.Empty, text2, new EZValueChangedDelegate(this.ClickUser), null);
        this.m_DetailList.Add(newListItem);
        this.m_DetailList.RepositionItems();
    }
    public void OnClickStartMythRaid(IUIObject obj)
    {
        byte partyCount       = SoldierBatch.MYTHRAID_INFO.GetPartyCount();
        byte readyPersonCount = SoldierBatch.MYTHRAID_INFO.GetReadyPersonCount();

        if (!SoldierBatch.SOLDIERBATCH.IsHeroBabelBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (partyCount != readyPersonCount)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("182"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();

        if (solBatchNum <= 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("181"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int solBatchNum2 = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();

        if (SoldierBatch.MYTHRAID_INFO.Count <= 0)
        {
            SoldierBatch.MYTHRAID_INFO.Count = 1;
        }
        byte count = SoldierBatch.MYTHRAID_INFO.Count;
        int  num   = (int)(12 / count);

        if (solBatchNum2 < num)
        {
            string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("21");

            string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("74");

            string empty2 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                textFromMessageBox2,
                "currentnum",
                solBatchNum2,
                "maxnum",
                num
            });

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

            msgBoxUI.SetMsg(new YesDelegate(this.OnStartMythRaid), null, textFromMessageBox, empty2, eMsgType.MB_OK_CANCEL, 2);
            return;
        }
        if (solBatchNum2 > num)
        {
            Debug.LogError("최대 배치 수 이상 배치되어 있음");
            return;
        }
        this.OnStartMythRaid(null);
    }
Exemplo n.º 20
0
    public void SetList()
    {
        this.m_lbCurrentStatus.Clear();
        this.m_InfoSettingTime = Time.realtimeSinceStartup;
        string text = string.Empty;
        int    num  = 0;

        foreach (MINE_GUILD_CURRENTSTATUS_INFO current in this.m_listMineGuild_CurrentStatus)
        {
            NewListItem      newListItem          = new NewListItem(this.m_lbCurrentStatus.ColumnNum, true, string.Empty);
            MINE_CREATE_DATA mineCreateDataFromID = BASE_MINE_CREATE_DATA.GetMineCreateDataFromID(current.i16MineDataID);
            if (mineCreateDataFromID != null)
            {
                newListItem.SetListItemData(13, BASE_MINE_DATA.GetMineName(mineCreateDataFromID.GetGrade(), current.i16MineDataID), null, null, null);
                MINE_DATA mineDataFromGrade = BASE_MINE_DATA.GetMineDataFromGrade(BASE_MINE_DATA.ParseGradeFromString(mineCreateDataFromID.MINE_GRADE));
                if (mineDataFromGrade != null)
                {
                    UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(mineDataFromGrade.MINE_ICON_NAME);

                    if (uIBaseInfoLoader != null)
                    {
                        newListItem.SetListItemData(6, uIBaseInfoLoader, current, new EZValueChangedDelegate(this.OnClickDefenceMilitaryInfo), null);
                    }
                }
                int    num2  = 9;
                string text2 = string.Empty;
                if (current.i64DefenceGuildID > 0L)
                {
                    text2 = TKString.NEWString(current.szDefenceGuildName);
                    if (current.bIsGuildWarDefenceGuild)
                    {
                        text2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), text2);
                    }
                    num2 = (int)current.byDefenceMilitaryCount;
                }
                else
                {
                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1325");
                }
                if (100 <= NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nMasterLevel)
                {
                    text2 = text2 + " " + current.i64MineID.ToString();
                }
                newListItem.SetListItemData(2, text2, null, null, null);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1629"),
                    "count",
                    num2,
                    "count2",
                    9
                });

                newListItem.SetListItemData(10, text, null, null, null);
                newListItem.SetListItemData(12, string.Empty, null, null, null);
                if (current.byCurrentStatusType == 1 || current.byCurrentStatusType == 0)
                {
                    if (current.i64AttackGuildID > 0L)
                    {
                        text = TKString.NEWString(current.szAttackGuildName);
                        if (current.bIsGuildWarAttackGuild)
                        {
                            text = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), text);
                        }
                        newListItem.SetListItemData(1, text, null, null, null);
                        newListItem.SetListItemData(5, string.Empty, current, new EZValueChangedDelegate(this.OnClickAttackMilitaryInfo), null);
                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1629"),
                            "count",
                            current.byAttackMilitaryCount,
                            "count2",
                            9
                        });

                        newListItem.SetListItemData(9, text, null, null, null);
                        newListItem.SetListItemData(11, string.Empty, null, null, null);
                    }
                    else
                    {
                        newListItem.SetListItemData(1, string.Empty, null, null, null);
                        newListItem.SetListItemData(9, string.Empty, null, null, null);
                        newListItem.SetListItemData(11, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1632"), null, null, null);
                    }
                    text = this.GetTextFromState(current);
                    if (current.byMilitaryState == 2 || current.byMilitaryState == 3 || current.byMilitaryState == 6 || current.byMilitaryState == 7)
                    {
                        newListItem.SetListItemData(0, false);
                        newListItem.SetListItemData(3, string.Empty, null, null, null);
                        newListItem.SetListItemData(4, text, null, null, null);
                    }
                    else
                    {
                        if (current.byJoinMilitary == 0)
                        {
                            bool flag = true;
                            if (current.i64AttackGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID())
                            {
                                flag = (current.byAttackMilitaryCount < 9);
                            }
                            else if (current.i64DefenceGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID())
                            {
                                flag = (current.byDefenceMilitaryCount < 9);
                            }
                            newListItem.SetListItemData(0, flag);
                            if (flag)
                            {
                                UIBaseInfoLoader loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_B_NewTileBtnBlue");

                                newListItem.SetListItemData(0, loader, current, new EZValueChangedDelegate(this.OnClickMilitaryBatch), null);
                                newListItem.SetListItemData2(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1323"));
                            }
                        }
                        else if (current.byJoinMilitary == 1)
                        {
                            newListItem.SetListItemData(0, true);
                            UIBaseInfoLoader loader2 = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_B_BattleControl");

                            newListItem.SetListItemData(0, loader2, current, new EZValueChangedDelegate(this.OnClickMilitaryReturn), null);
                            newListItem.SetListItemData2(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"));
                        }
                        newListItem.SetListItemData(3, text, null, null, null);
                        newListItem.SetListItemData(4, string.Empty, null, null, null);
                    }
                }
                else if (current.byCurrentStatusType == 2)
                {
                    NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                    newListItem.SetListItemData(1, @char.GetCharName(), null, null, null);
                    text = this.GetTextFromState(current);
                    newListItem.SetListItemData(3, string.Empty, null, null, null);
                    newListItem.SetListItemData(4, text, null, null, null);
                }
                newListItem.Data = current;
                this.m_lbCurrentStatus.Add(newListItem);
                num++;
            }
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1633"),
            "count1",
            this.m_Page,
            "count2",
            this.m_MaxPage
        });

        this.m_bxPage.SetText(text);
        this.SetListAttackGuildMark();
        this.m_lbCurrentStatus.RepositionItems();
    }
Exemplo n.º 21
0
    private void ProcessOTPReady(eOTPRequestType eReqType)
    {
        if (this.szOTPAuthKey[(int)eReqType].Length > 0)
        {
            switch (eReqType)
            {
            case eOTPRequestType.OTPREQ_USERAUTH:
            {
                bool            flag       = false;
                NrWebViewObject gameObject = NrWebViewObject.GetGameObject();
                if (!gameObject.FirstNoticeOpen || gameObject.MainmenuNoticeOpen)
                {
                    flag = true;
                }
                if (flag)
                {
                    string     strCharName = string.Empty;
                    NrCharBase @char       = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                    if (@char != null)
                    {
                        strCharName = @char.GetCharName();
                    }
                    NrMobileNoticeWeb nrMobileNoticeWeb = new NrMobileNoticeWeb();
                    nrMobileNoticeWeb.OnGameNotice(this.szOTPAuthKey[0], strCharName);
                }
                gameObject.FirstNoticeOpen    = true;
                gameObject.MainmenuNoticeOpen = false;
                break;
            }

            case eOTPRequestType.OTPREQ_CHARPORTRAIT:
            {
                NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (char2 != null)
                {
                    NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

                    NkSoldierInfo leaderSoldierInfo = charPersonInfo.GetLeaderSoldierInfo();
                    string        arg = string.Empty;
                    if (charPersonInfo != null && leaderSoldierInfo != null)
                    {
                        arg = this.GetProcessLeaderHero(leaderSoldierInfo.GetCharKind());
                    }
                    string url = string.Format("http://{0}/mobilephoto/user.aspx?otp={1}&type={2}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[1], arg);
                    Application.OpenURL(url);
                }
                break;
            }

            case eOTPRequestType.OTPREQ_GUILDMARK:
                if (0L < NrTSingleton <NewGuildManager> .Instance.GetGuildID())
                {
                    string url2 = string.Format("http://{0}/mobilephoto/guild.aspx?otp={1}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[2]);
                    Application.OpenURL(url2);
                }
                break;

            case eOTPRequestType.OTPREQ_EMAIL:
            {
                string            text = string.Format("http://{0}/member/member_confirm1.aspx?OTP={1}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[3]);
                NrMobileNoticeWeb nrMobileNoticeWeb2 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb2.OpenWebURL(text);
                TsLog.LogOnlyEditor("!!!!!!!!!!!!!!!! OTPREQ_EMAIL :{0}" + text);
                break;
            }

            case eOTPRequestType.OTPREQ_HP_AUTH:
            {
                string url3 = string.Format("http://{0}/mobileAuth/auth.aspx?otp={1}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[4]);
                Application.OpenURL(url3);
                NrTSingleton <NrMainSystem> .Instance.QuitGame(false);

                break;
            }

            case eOTPRequestType.OTPREQ_GUESTID:
            {
                string url4 = string.Empty;
                if (TsPlatform.IsAndroid)
                {
                    url4 = string.Format("http://{0}/member/AuthPlatformSync_auth.aspx?OTP={1}&platform=android", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[5]);
                }
                else
                {
                    url4 = string.Format("http://{0}/member/AuthPlatformSync_auth.aspx?OTP={1}&platform=ios", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[5]);
                }
                NrMobileNoticeWeb nrMobileNoticeWeb3 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb3.OpenWebURL(url4);
                break;
            }

            case eOTPRequestType.OTPREQ_HELPQUESTION:
            {
                NrMobileNoticeWeb nrMobileNoticeWeb4 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb4.OnGameQuestion(this.szOTPAuthKey[6], string.Empty);
                break;
            }

            case eOTPRequestType.OTPREQ_UNREGISTER:
            {
                NrMobileNoticeWeb nrMobileNoticeWeb5 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb5.OnGameUnregister(this.szOTPAuthKey[7]);
                break;
            }
            }
            this.szOTPAuthKey[(int)eReqType] = string.Empty;
        }
    }
Exemplo n.º 22
0
    public void SetStoryChatList(int type, StoryChat_Info[] array)
    {
        this.m_nOldTabIndex = this.m_nCurrentTabInex;
        long guildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID();

        this.m_StoryChatList.SetColumnData("Mobile/DLG/StoryChat/NLB_Talk_ColumnData" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        for (int i = 0; i < StoryChatDlg.MAX_STORYCHAT_LIST_NUM; i++)
        {
            this.m_CurrentStoryChatInfo[i].Init();
        }
        for (int j = 0; j < array.Length; j++)
        {
            this.m_CurrentStoryChatInfo[j] = array[j];
        }
        this.refreshFriendPortrait();
        if (array.Length != StoryChatDlg.MAX_STORYCHAT_LIST_NUM)
        {
            this.m_Next.controlIsEnabled = false;
        }
        else
        {
            this.m_Next.controlIsEnabled = true;
        }
        if (this.m_nCurrentPage == 1)
        {
            this.m_Prev.controlIsEnabled = false;
        }
        else
        {
            this.m_Prev.controlIsEnabled = true;
        }
        this.m_StoryChatList.Clear();
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        string key      = charPersonInfo.GetCharName() + "LastFriendStoryChatID";
        string key2     = charPersonInfo.GetCharName() + "LastGuildStoryChatID";
        string charName = charPersonInfo.GetCharName();
        string s        = string.Empty;
        long   num      = 0L;

        if (type == 0)
        {
            string key3 = charName + "NewStoryChatID";
            if (PlayerPrefs.HasKey(key3))
            {
                s   = PlayerPrefs.GetString(key3);
                num = long.Parse(s);
            }
            string s2   = string.Empty;
            long   num2 = 0L;
            if (PlayerPrefs.HasKey(key))
            {
                s2   = PlayerPrefs.GetString(key);
                num2 = long.Parse(s2);
            }
            if (num2 < array[0].nLastCommentID)
            {
                PlayerPrefs.SetString(key, array[0].nLastCommentID.ToString());
            }
        }
        else if (type == 1)
        {
            string key4 = charName + NrTSingleton <NewGuildManager> .Instance.GetGuildName();

            if (PlayerPrefs.HasKey(key4))
            {
                s   = PlayerPrefs.GetString(key4);
                num = long.Parse(s);
            }
            string s3   = string.Empty;
            long   num3 = 0L;
            if (PlayerPrefs.HasKey(key2))
            {
                s3   = PlayerPrefs.GetString(key2);
                num3 = long.Parse(s3);
            }
            if (num3 < array[0].nLastCommentID)
            {
                if (guildID != 0L)
                {
                    PlayerPrefs.SetString(key2, array[0].nLastCommentID.ToString());
                }
                else
                {
                    PlayerPrefs.SetString(key2, "0");
                }
            }
        }
        for (int k = 0; k < array.Length; k++)
        {
            NewListItem       newListItem    = new NewListItem(this.m_StoryChatList.ColumnNum, true, string.Empty);
            StoryChatPortrait community_User = this.GetCommunity_User(array[k].nPersonID);
            if (community_User != null)
            {
                Texture2D friendPortraitPersonID = this.GetFriendPortraitPersonID(array[k].nPersonID);
                if (friendPortraitPersonID != null)
                {
                    newListItem.SetListItemData(1, friendPortraitPersonID, null, null, null, null);
                }
                else
                {
                    EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(array[k].nCharKind);

                    if (eventHeroCharFriendCode != null)
                    {
                        newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                        newListItem.EventMark = true;
                    }
                    newListItem.SetListItemData(1, new CostumeDrawTextureInfo
                    {
                        imageType           = eCharImageType.SMALL,
                        charKind            = array[k].nCharKind,
                        costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[k].nFaceCharCostumeUnique)
                    }, null, null, null);
                }
            }
            else
            {
                CostumeDrawTextureInfo costumeDrawTextureInfo = new CostumeDrawTextureInfo();
                costumeDrawTextureInfo.imageType           = eCharImageType.SMALL;
                costumeDrawTextureInfo.charKind            = array[k].nCharKind;
                costumeDrawTextureInfo.costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[k].nFaceCharCostumeUnique);

                newListItem.SetListItemData(1, costumeDrawTextureInfo, null, null, null);
                if (costumeDrawTextureInfo.costumePortraitPath == string.Empty)
                {
                    StoryChatPortrait storyChatPortrait = new StoryChatPortrait();
                    storyChatPortrait.Set(array[k].nPersonID, true);
                    this.m_UserPortraitList.Add(storyChatPortrait);
                }
            }
            string text = TKString.NEWString(array[k].szName);
            if (0L < array[k].nGuildID)
            {
                newListItem.SetListItemData(2, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + text, null, null, null);
            }
            else
            {
                newListItem.SetListItemData(2, text, null, null, null);
            }
            newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + array[k].nLevel.ToString(), null, null, null);
            DateTime dueDate           = PublicMethod.GetDueDate(array[k].nTime);
            string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromInterface,
                "month",
                dueDate.Month,
                "day",
                dueDate.Day,
                "hour",
                dueDate.Hour,
                "min",
                dueDate.Minute
            });

            newListItem.SetListItemData(4, empty, null, null, null);
            string text2 = TKString.NEWString(array[k].szMessage);
            text2 = text2.Replace("\n", " ");
            if (89 < text2.Length)
            {
                text2  = text2.Substring(0, 89);
                text2 += "...";
            }
            newListItem.SetListItemData(6, text2, null, null, null);
            newListItem.SetListItemData(9, array[k].nCommentCount.ToString(), null, null, null);
            newListItem.SetListItemData(10, array[k].nLikeCount.ToString(), null, null, null);
            if (type == 0 || type == 1)
            {
                if (array[k].nStoryChatID > num)
                {
                    newListItem.SetListItemData(12, true);
                }
                else
                {
                    newListItem.SetListItemData(12, false);
                }
            }
            else
            {
                newListItem.SetListItemData(12, false);
            }
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            if (@char != null)
            {
                if (text == @char.GetCharName())
                {
                    newListItem.SetListItemData(14, string.Empty, array[k].nStoryChatID, new EZValueChangedDelegate(this.DeleteStoryChat), null);
                }
                else
                {
                    newListItem.SetListItemData(14, false);
                }
            }
            this.m_StoryChatList.Add(newListItem);
        }
        this.m_StoryChatList.RepositionItems();
        this.m_Page.Text = this.m_nCurrentPage.ToString();
        if (type == 1 && guildID <= 0L)
        {
            this.InitStoryChatList(type);
        }
    }
Exemplo n.º 23
0
    public void SetCommentList(long _CommentID)
    {
        if (this.m_CurrentCommentInfo == null)
        {
            return;
        }
        NewListItem newListItem = new NewListItem(this.m_DetailList.ColumnNum, true, string.Empty);
        Texture2D   texture2D   = null;

        if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG))
        {
            StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg;

            if (storyChatDlg != null)
            {
                texture2D = storyChatDlg.GetFriendPortraitPersonID(this.m_CurrentCommentInfo.nPersonID);
            }
        }
        if (texture2D != null)
        {
            newListItem.SetListItemData(1, texture2D, null, null, null, null);
        }
        else
        {
            EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(this.m_CurrentCommentInfo.nCharKind);

            if (eventHeroCharFriendCode != null)
            {
                newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                newListItem.EventMark = true;
            }
            newListItem.SetListItemData(1, new CostumeDrawTextureInfo
            {
                charKind            = this.m_CurrentCommentInfo.nCharKind,
                grade               = -1,
                costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_CurrentCommentInfo.nFaceCharCostumeUnique)
            }, null, null, null);
        }
        string text = TKString.NEWString(this.m_CurrentCommentInfo.szName);

        newListItem.SetListItemData(2, NrTSingleton <UIDataManager> .Instance.GetString(text, "(", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), this.m_CurrentCommentInfo.nLevel.ToString(), ")"), null, null, null);
        DateTime nowTime           = PublicMethod.GetNowTime();
        string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromInterface,
            "month",
            nowTime.Month,
            "day",
            nowTime.Day,
            "hour",
            nowTime.Hour,
            "min",
            nowTime.Minute
        });

        newListItem.SetListItemData(3, empty, null, null, null);
        newListItem.SetListItemData(4, TKString.NEWString(this.m_CurrentCommentInfo.szMessage), null, null, null);
        newListItem.SetListItemData(5, string.Empty, text, new EZValueChangedDelegate(this.ClickUser), null);
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null)
        {
            if (text == @char.GetCharName())
            {
                newListItem.SetListItemData(6, string.Empty, _CommentID, new EZValueChangedDelegate(this.DeleteStoryComment), null);
            }
            else
            {
                newListItem.SetListItemData(6, false);
            }
        }
        else
        {
            newListItem.SetListItemData(6, false);
        }
        newListItem.Data = _CommentID;
        this.m_nCommentCount++;
        this.m_DetailList.InsertAdd(this.m_DetailList.Count, newListItem);
        this.m_DetailList.RepositionItems();
        this.m_DetailList.ScrollPosition = 1f;
        this.m_CurrentCommentInfo        = null;
    }