Пример #1
0
    public int GetCurrWeekofDay()
    {
        DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());

        if (dueDate.Hour <= 5 && dueDate.Minute < 59)
        {
            switch (dueDate.DayOfWeek)
            {
            case DayOfWeek.Sunday:
                return(6);

            case DayOfWeek.Monday:
                return(0);

            case DayOfWeek.Tuesday:
                return(1);

            case DayOfWeek.Wednesday:
                return(2);

            case DayOfWeek.Thursday:
                return(3);

            case DayOfWeek.Friday:
                return(4);

            case DayOfWeek.Saturday:
                return(5);
            }
        }
        return((int)dueDate.DayOfWeek);
    }
    public void AddServerEventHero(EVENT_HEROINFO _EventHero)
    {
        EVENT_HERODATA eVENT_HERODATA = new EVENT_HERODATA();

        eVENT_HERODATA.szCharCode = TKString.NEWString(_EventHero.szCharCode);
        eVENT_HERODATA.i8Rank     = _EventHero.i8Rank;
        eVENT_HERODATA.i32Attack  = _EventHero.i32Attack;
        eVENT_HERODATA.i32Hp      = _EventHero.i32Hp;
        DateTime dueDate = PublicMethod.GetDueDate(_EventHero.i64StartTime);

        eVENT_HERODATA.tStartTime = dueDate;
        DateTime dueDate2 = PublicMethod.GetDueDate(_EventHero.i64EndTime);

        eVENT_HERODATA.tEndTime    = dueDate2;
        eVENT_HERODATA.i32CharKind = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(TKString.NEWString(_EventHero.szCharCode));

        if (eVENT_HERODATA.i32CharKind != 0)
        {
            EVENT_HERODATA eventHeroCheck = this.GetEventHeroCheck(eVENT_HERODATA.i32CharKind, eVENT_HERODATA.i8Rank);
            if (eventHeroCheck != null)
            {
                this.SetEventHeroCheck(eVENT_HERODATA);
            }
            else
            {
                this.m_EventHeroList.Add(eVENT_HERODATA);
            }
        }
        else
        {
            TsLog.LogWarning("TableEventHero - > CharCode Error", new object[0]);
        }
    }
Пример #3
0
    public void On_ClickSetPos(IUIObject a_cObject)
    {
        if (this.m_i16TreasureReward != -1)
        {
            DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());
            GS_TREASUREBOX_SHARING_REQ gS_TREASUREBOX_SHARING_REQ = new GS_TREASUREBOX_SHARING_REQ();
            gS_TREASUREBOX_SHARING_REQ.i32Day            = dueDate.Day;
            gS_TREASUREBOX_SHARING_REQ.i16TreasureUnique = this.m_i16TreasureReward;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TREASUREBOX_SHARING_REQ, gS_TREASUREBOX_SHARING_REQ);
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("663");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
        }
    }
Пример #4
0
    public bool GetBountyInfoDataTime(short iBountyHuntUnique)
    {
        BountyInfoData bountyInfoDataFromUnique = this.GetBountyInfoDataFromUnique(iBountyHuntUnique);

        if (bountyInfoDataFromUnique == null)
        {
            return(false);
        }
        DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());

        if ((short)dueDate.DayOfWeek == bountyInfoDataFromUnique.i16Week)
        {
            return(dueDate.Hour >= (int)bountyInfoDataFromUnique.i16Hour);
        }
        short num = bountyInfoDataFromUnique.i16Week + 1;

        if (num > 6)
        {
            num = 0;
        }
        return((short)dueDate.DayOfWeek == num && dueDate.Hour < (int)bountyInfoDataFromUnique.i16Hour);
    }
Пример #5
0
    public void MakeFundUseInfoItem(NEWGUILD_FUND_USE_INFO Data)
    {
        if (Data == null)
        {
            return;
        }
        NewListItem newListItem = new NewListItem(this.m_nlbGoldRecord.ColumnNum, true, string.Empty);
        DateTime    dueDate     = PublicMethod.GetDueDate(Data.i64UseTime);

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
            "year",
            dueDate.Year,
            "month",
            dueDate.Month,
            "day",
            dueDate.Day
        });

        newListItem.SetListItemData(0, this.m_strText, null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1527"),
            "hour",
            dueDate.Hour,
            "min",
            dueDate.Minute,
            "sec",
            dueDate.Second
        });

        newListItem.SetListItemData(1, this.m_strText, null, null, null);
        newListItem.SetListItemData(2, NrTSingleton <NewGuildManager> .Instance.GetStringFromFundUseType((NewGuildDefine.eNEWGUILD_FUND_USE_TYPE)Data.ui8UseType), null, null, null);
        newListItem.SetListItemData(3, ANNUALIZED.Convert(Data.i64UseFund), null, null, null);
        newListItem.SetListItemData(4, TKString.NEWString(Data.szUseCharName), null, null, null);
        this.m_nlbGoldRecord.Add(newListItem);
    }
Пример #6
0
    private static bool TreasureRewardTimeCheck(string strText, ref int iDay)
    {
        string   value   = string.Empty;
        int      num     = strText.IndexOf("(");
        int      num2    = strText.IndexOf(".");
        int      num3    = strText.IndexOf(")");
        DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());

        if (num != -1 && num2 != -1 && num3 != -1)
        {
            value = strText.Substring(num + 1, num2 - (num + 1));
            int num4 = (int)Convert.ToInt16(value);
            value = strText.Substring(num2 + 1, num3 - (num2 + 1));
            iDay  = (int)Convert.ToInt16(value);
            return(dueDate.Day == iDay && num4 == dueDate.Month);
        }
        if (100 <= NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nMasterLevel)
        {
            iDay = dueDate.Day;
            return(true);
        }
        return(false);
    }
Пример #7
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();
    }
Пример #8
0
    public void SetList(GS_MINE_BATTLE_RESULT_LIST_ACK _ACK, NkDeserializePacket kDeserializePacket)
    {
        if (_ACK.i16Page != 1 && _ACK.ui8Count == 0)
        {
            return;
        }
        if (_ACK.i16Page == 1 && _ACK.ui8Count == 0)
        {
            NoticeIconDlg.SetIcon(ICON_TYPE.MINE_RECORED, false);
        }
        string empty = string.Empty;

        this.m_Box_Page.Text = _ACK.i16Page.ToString();
        this.m_nlbRecordList.Clear();
        this.m_page = _ACK.i16Page;
        for (int i = 0; i < (int)_ACK.ui8Count; i++)
        {
            NewListItem             newListItem = new NewListItem(this.m_nlbRecordList.ColumnNum, true, string.Empty);
            MINE_BATTLE_RESULT_INFO packet      = kDeserializePacket.GetPacket <MINE_BATTLE_RESULT_INFO>();
            if (i == 0)
            {
                NrTSingleton <MineManager> .Instance.m_i64FirstLegionActionID_By_List = packet.i64LegionActionID;
            }
            NrTSingleton <MineManager> .Instance.m_i64LastLegionActionID_By_List = packet.i64LegionActionID;
            newListItem.Data = packet;
            if (packet.i64BattleTime >= 0L)
            {
                DateTime dueDate = PublicMethod.GetDueDate(packet.i64BattleTime);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
                    "year",
                    dueDate.Year,
                    "month",
                    dueDate.Month,
                    "day",
                    dueDate.Day
                });

                newListItem.SetListItemData(1, empty, null, null, null);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1527"),
                    "hour",
                    string.Format("{0:00}", dueDate.Hour),
                    "min",
                    string.Format("{0:00}", dueDate.Minute),
                    "sec",
                    string.Format("{0:00}", dueDate.Second)
                });

                newListItem.SetListItemData(2, empty, null, null, null);
            }
            newListItem.SetListItemData(3, this.GetListText(packet), null, null, null);
            newListItem.SetListItemData(4, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1088"), packet, new EZValueChangedDelegate(this.OnClickBattleResult), null);
            if (packet.i32ItemUnique > 0 && packet.i32ItemNum != 0)
            {
                newListItem.SetListItemData(6, new ITEM
                {
                    m_nItemUnique = packet.i32ItemUnique,
                    m_nItemNum    = packet.i32ItemNum
                }, null, null, null);
            }
            else
            {
                UIBaseInfoLoader loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Attack");

                newListItem.SetListItemData(6, loader, null, null, null);
            }
            this.m_nlbRecordList.Add(newListItem);
        }
        this.m_nlbRecordList.RepositionItems();
    }
Пример #9
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
        });
    }
Пример #10
0
    public void ShowPlunderList()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        this.m_LBRecordList.Clear();
        foreach (PLUNDER_RECORDINFO current in this.record_list)
        {
            string      text        = string.Empty;
            string      text2       = string.Empty;
            NewListItem newListItem = new NewListItem(this.m_LBRecordList.ColumnNum, true, string.Empty);
            DateTime    dueDate     = PublicMethod.GetDueDate(current.i64BattleTime);
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("293");

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

            newListItem.SetListItemData(2, text2, null, null, null);
            if (current.i64AttackPersonID == charPersonInfo.GetPersonID())
            {
                newListItem.SetListItemData(0, false);
                if (current.byWinType == 0)
                {
                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("139");
                }
                else
                {
                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("140");
                }
            }
            else
            {
                newListItem.SetListItemData(0, true);
                if (current.byWinType == 0)
                {
                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("142");
                }
                else
                {
                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("141");
                }
            }
            newListItem.SetListItemData(3, text2, null, null, null);
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471");

            if (current.i64AttackPersonID == charPersonInfo.GetPersonID())
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text,
                    "targetname",
                    TKString.NEWString(current.szDefenceCharName),
                    "count",
                    current.i16DefenceCharLevel
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text,
                    "targetname",
                    TKString.NEWString(current.szAttackCharName),
                    "count",
                    current.i16AttackCharLevel
                });
            }
            newListItem.SetListItemData(4, text2, null, null, null);
            newListItem.SetListItemData(5, current.i64PlunderMoney.ToString(), null, null, null);
            newListItem.SetListItemData(6, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("496"), current, new EZValueChangedDelegate(this.ClickShareReply), null);
            newListItem.SetListItemData(7, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("289"), current, new EZValueChangedDelegate(this.ClickReplay), null);
            newListItem.SetListItemData(7, true);
            this.m_LBRecordList.Add(newListItem);
        }
        this.m_LBRecordList.RepositionItems();
    }
Пример #11
0
    public void ShowinfiBattleList()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        this.m_infiLBRecordList.Clear();
        foreach (INFIBATTLE_RECORDINFO current in this.infirecord_list)
        {
            string      text        = string.Empty;
            string      text2       = string.Empty;
            NewListItem newListItem = new NewListItem(this.m_infiLBRecordList.ColumnNum, true, string.Empty);
            DateTime    dueDate     = PublicMethod.GetDueDate(current.i64BattleTime);
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("293");

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

            newListItem.SetListItemData(1, text2, null, null, null);
            UIBaseInfoLoader loader;
            if (current.i64AttackPersonID == charPersonInfo.GetPersonID())
            {
                if (current.ui8WinType == 0)
                {
                    loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowUp2");

                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2313");
                }
                else
                {
                    loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowMaintain");

                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2314");
                }
            }
            else if (current.ui8WinType == 0)
            {
                loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowDown2");

                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2316");
            }
            else
            {
                loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowMaintain");

                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2315");
            }
            newListItem.SetListItemData(6, loader, null, null, null);
            newListItem.SetListItemData(2, text2, null, null, null);
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471");

            if (current.i64AttackPersonID == charPersonInfo.GetPersonID())
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text,
                    "targetname",
                    TKString.NEWString(current.szDefenceCharName),
                    "count",
                    current.i16DefenceCharLevel
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text,
                    "targetname",
                    TKString.NEWString(current.szAttackCharName),
                    "count",
                    current.i16AttackCharLevel
                });
            }
            newListItem.SetListItemData(3, text2, null, null, null);
            newListItem.SetListItemData(4, string.Empty, current, new EZValueChangedDelegate(this.ClickShareReply), null);
            newListItem.SetListItemData(5, string.Empty, current, new EZValueChangedDelegate(this.ClickReplay), null);
            if (current.i64AttackPersonID == charPersonInfo.GetPersonID())
            {
                if (current.ui8WinType == 0)
                {
                    if (current.i32OldRank == current.i32NewRank)
                    {
                        text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232");
                    }
                    else
                    {
                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2230"),
                            "rankcount",
                            current.i32OldRank - current.i32NewRank
                        });
                    }
                }
                else
                {
                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232");
                }
            }
            else if (current.ui8WinType == 0)
            {
                if (current.i32OldRank == current.i32NewRank)
                {
                    text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232");
                }
                else
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2231"),
                        "rankcount",
                        current.i32NewRank - current.i32OldRank
                    });
                }
            }
            else
            {
                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232");
            }
            newListItem.SetListItemData(7, text2, null, null, null);
            newListItem.SetListItemData(12, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("289"), null, null, null);
            newListItem.SetListItemData(13, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("496"), null, null, null);
            this.m_infiLBRecordList.Add(newListItem);
        }
        this.m_infiLBRecordList.RepositionItems();
    }
    public override bool CheckGameGuide()
    {
        DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());

        return(this.CheckGuide() && dueDate.Day == this.m_i32TreasureDay && this.m_eCheck == GameGuideCheck.CYCLECAL && Time.realtimeSinceStartup - this.m_nCheckTime > this.m_nDelayTime);
    }
Пример #13
0
    public void SetInfo(GS_GUILDWAR_INFO_ACK ACK)
    {
        string text = string.Empty;

        if (NrTSingleton <GuildWarManager> .Instance.CanGetGuildWarReward())
        {
            this.m_boxNotice.Hide(false);
        }
        else
        {
            this.m_boxNotice.Hide(true);
        }
        if (ACK.i64GuildID[1] > 0L)
        {
            base.SetShowLayer(1, true);
            base.SetShowLayer(2, true);
            this.m_lbApplyNoti.Hide(true);
            if (ACK.bGuildWarTimeState == 2)
            {
                this.m_lbGuildWarTimeState.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2979"));
            }
            else if (ACK.bGuildWarTimeState == 3)
            {
                int num;
                if (ACK.i32WarMatchPoint[0] > ACK.i32WarMatchPoint[1])
                {
                    num = 0;
                }
                else if (ACK.i32WarMatchPoint[0] < ACK.i32WarMatchPoint[1])
                {
                    num = 1;
                }
                else
                {
                    num = ((ACK.i32Rank[0] >= ACK.i32Rank[1]) ? 0 : 1);
                }
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2980"),
                    "targetname",
                    TKString.NEWString(ACK.strGuildName[num])
                });

                this.m_lbGuildWarTimeState.SetText(text);
                NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_GUILDWAR_VICTORYMARK", this.m_dtVictoryEffect[num], this.m_dtVictoryEffect[num].GetSize());

                if (num == 0)
                {
                    TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "ETC", "GUILD_WIN", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                }
                else
                {
                    TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "ETC", "GUILD_LOSE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                }
            }
            else
            {
                base.SetShowLayer(2, false);
            }
        }
        else
        {
            base.SetShowLayer(1, false);
            base.SetShowLayer(2, false);
            this.m_lbApplyNoti.Hide(false);
        }
        NrTSingleton <GuildWarManager> .Instance.bIsGuildWar = ACK.bIsGuildWar;
        NrTSingleton <GuildWarManager> .Instance.bIsGuildWarCancelReservation = ACK.bIsCancelReservation;
        this.SetApplyButton();
        for (int i = 0; i < 2; i++)
        {
            if (ACK.i64GuildID[i] > 0L)
            {
                this.m_btGuild[i].Data = ACK.i64GuildID[i];
                string guildPortraitURL = NrTSingleton <NkCharManager> .Instance.GetGuildPortraitURL(ACK.i64GuildID[i]);

                WebFileCache.RequestImageWebFile(guildPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebImageCallback), this.m_dtGMark[i]);
                text = TKString.NEWString(ACK.strGuildName[i]);
                if (NrTSingleton <GuildWarManager> .Instance.bIsGuildWar && i == 0)
                {
                    text = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), TKString.NEWString(ACK.strGuildName[i]));
                }
                this.m_lbGuildName[i].SetText(text);
                this.m_lbMatchPoint[i].SetText(ACK.i32WarMatchPoint[i].ToString());
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1685"),
                    "count",
                    ACK.i32Rank[i]
                });

                this.m_lbGuildWarRank[i].SetText(text);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1786"),
                    "count",
                    ACK.i16Level[i]
                });

                this.m_lbGuildLevel[i].SetText(text);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1303"),
                    "count1",
                    ACK.i16CurMemberNum[i],
                    "count2",
                    ACK.i16MaxMemberNum[i]
                });

                this.m_lbMemberCount[i].SetText(text);
                long      num2             = 0L;
                long      num3             = 1L;
                GUILD_EXP guildLevelUpInfo = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level[i]);

                if (guildLevelUpInfo != null)
                {
                    num2 = ACK.i64Exp[i] - guildLevelUpInfo.m_nExp;
                }
                GUILD_EXP guildLevelUpInfo2 = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level[i] + 1);

                if (guildLevelUpInfo2 != null && guildLevelUpInfo != null)
                {
                    num3 = guildLevelUpInfo2.m_nExp - guildLevelUpInfo.m_nExp;
                    if (0L > num3)
                    {
                        num3 = 0L;
                    }
                }
                float num4 = (float)num2 / (float)num3;
                if (1f < num4)
                {
                    num4 = 1f;
                }
                this.m_dtExpBar[i].SetSize(this.m_fExpWidth[i] * num4, this.m_dtExpBar[i].GetSize().y);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("603"),
                    "count1",
                    num2,
                    "count2",
                    num3
                });

                this.m_lbExpBarText[i].SetText(text);
                if (ACK.i64BirthDate[i] > 0L)
                {
                    DateTime dueDate = PublicMethod.GetDueDate(ACK.i64BirthDate[i]);
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
                        "year",
                        dueDate.Year,
                        "month",
                        dueDate.Month,
                        "day",
                        dueDate.Day
                    });

                    this.m_lbGuildBirth[i].SetText(text);
                }
                else
                {
                    this.m_lbGuildBirth[i].SetText(string.Empty);
                }
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041"),
                    "count",
                    ACK.i32WarPoint[i]
                });

                this.m_lbAccrueHonor[i].SetText(text);
            }
        }
    }
Пример #14
0
    public void SetDetailInfo(GS_NEWGUILD_DETAILINFO_ACK ACK)
    {
        this.m_lGuildID     = ACK.i64GuildID;
        this.m_strGuildName = TKString.NEWString(ACK.strGuildName);
        if (ACK.bGuildWar)
        {
            this.m_strGuildName = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), this.m_strGuildName);
        }
        this.m_lbGuildName.Text = this.m_strGuildName;
        this.Send_GS_DECLAREWAR_LIST_REQ();
        int i16Rank = (int)ACK.i16Rank;

        if (0 < i16Rank)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1689"),
                "count",
                i16Rank,
                "count2",
                ACK.i32Point
            });
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1851"),
                "count",
                ACK.i32Point
            });
        }
        this.m_lbRank.SetText(this.m_strText);
        long      num              = 0L;
        long      num2             = 1L;
        GUILD_EXP guildLevelUpInfo = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level);

        if (guildLevelUpInfo != null)
        {
            num = ACK.i64Exp - guildLevelUpInfo.m_nExp;
        }
        GUILD_EXP guildLevelUpInfo2 = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level + 1);

        if (guildLevelUpInfo2 != null && guildLevelUpInfo != null)
        {
            num2 = guildLevelUpInfo2.m_nExp - guildLevelUpInfo.m_nExp;
            if (0L > num2)
            {
                num2 = 0L;
            }
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1786"),
            "count",
            ACK.i16Level
        });

        this.m_lbLevel.SetText(this.m_strText);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("603"),
            "count1",
            num,
            "count2",
            num2
        });

        this.m_lbExpText.SetText(this.m_strText);
        float num3 = (float)num / (float)num2;

        if (1f < num3)
        {
            num3 = 1f;
        }
        this.m_dtExp.SetSize(this.m_fExpWidth * num3, this.m_dtExp.GetSize().y);
        this.m_lbMasterName.SetText(TKString.NEWString(ACK.strMasterName));
        this.m_strText = TKString.NEWString(ACK.strSubMasterName);
        if (string.Empty == this.m_strText)
        {
            this.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("48");
        }
        this.m_lbSubMasterName.SetText(this.m_strText);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1303"),
            "count1",
            ACK.i16CurMemberNum,
            "count2",
            ACK.i16MaxMemberNum
        });

        this.m_lbMemberNum.SetText(this.m_strText);
        this.m_lbGuildMessage.SetText(TKString.NEWString(ACK.strGuildMessage));
        if (0 < ACK.i16ApplicantNum && 0L < this.m_lGuildID && this.m_lGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID() && NrTSingleton <NewGuildManager> .Instance.IsDischargeMember(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID))
        {
            this.m_bxApplicantNum.Hide(false);
            this.m_bxApplicantNum.SetText(ACK.i16ApplicantNum.ToString());
        }
        else
        {
            this.m_bxApplicantNum.Hide(true);
        }
        if (0L < ACK.i64CreateDate)
        {
            DateTime dueDate = PublicMethod.GetDueDate(ACK.i64CreateDate);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
                "year",
                dueDate.Year,
                "month",
                dueDate.Month,
                "day",
                dueDate.Day
            });

            this.m_lbGuildCreateDate.SetText(this.m_strText);
        }
        else
        {
            this.m_lbGuildCreateDate.SetText(string.Empty);
        }
        this.m_bIsDeclareWarTarget = ACK.bIsDeclareWarTarget;
        this.SetButton();
        this.m_lbFund.SetText(ANNUALIZED.Convert(ACK.i64Fund));
        switch (i16Rank)
        {
        case 1:
            this.m_dtMedal.Hide(false);
            this.m_dtMedal.SetTexture("Win_I_Rank03");
            break;

        case 2:
            this.m_dtMedal.Hide(false);
            this.m_dtMedal.SetTexture("Win_I_Rank02");
            break;

        case 3:
            this.m_dtMedal.Hide(false);
            this.m_dtMedal.SetTexture("Win_I_Rank01");
            break;

        default:
            this.m_dtMedal.Hide(true);
            break;
        }
        if (0L < this.m_lGuildID)
        {
            string guildPortraitURL = NrTSingleton <NkCharManager> .Instance.GetGuildPortraitURL(this.m_lGuildID);

            WebFileCache.RequestImageWebFile(guildPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebImageCallback), null);
        }
    }
Пример #15
0
    public void SetList(GS_MINE_BATTLE_RESULT_GUILDWAR_LIST_ACK _ACK, NkDeserializePacket kDeserializePacket)
    {
        if (_ACK.i16Page != 1 && _ACK.ui8Count == 0)
        {
            return;
        }
        string text = string.Empty;

        this.m_Box_Page.Text = _ACK.i16Page.ToString();
        this.m_nlbRecordList.Clear();
        this.m_page = _ACK.i16Page;
        for (int i = 0; i < (int)_ACK.ui8Count; i++)
        {
            NewListItem newListItem = new NewListItem(this.m_nlbRecordList.ColumnNum, true, string.Empty);
            MINE_BATTLE_RESULT_GUILDWAR_INFO packet = kDeserializePacket.GetPacket <MINE_BATTLE_RESULT_GUILDWAR_INFO>();
            if (i == 0)
            {
                NrTSingleton <MineManager> .Instance.m_i64FirstLegionActionID_By_List = packet.i64LegionActionID;
            }
            NrTSingleton <MineManager> .Instance.m_i64LastLegionActionID_By_List = packet.i64LegionActionID;
            newListItem.Data = packet;
            if (packet.i64BattleTime >= 0L)
            {
                DateTime dueDate = PublicMethod.GetDueDate(packet.i64BattleTime);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
                    "year",
                    dueDate.Year,
                    "month",
                    dueDate.Month,
                    "day",
                    dueDate.Day
                });

                newListItem.SetListItemData(1, text, null, null, null);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1527"),
                    "hour",
                    dueDate.Hour,
                    "min",
                    dueDate.Minute,
                    "sec",
                    dueDate.Second
                });

                newListItem.SetListItemData(2, text, null, null, null);
            }
            byte             grade = 0;
            MINE_CREATE_DATA mineCreateDataFromID = BASE_MINE_CREATE_DATA.GetMineCreateDataFromID(packet.i16MineDataID);
            if (mineCreateDataFromID != null)
            {
                grade = mineCreateDataFromID.GetGrade();
            }
            newListItem.SetListItemData(3, BASE_MINE_DATA.GetMineName(grade, packet.i16MineDataID), null, null, null);
            newListItem.SetListItemData(4, string.Empty, packet, new EZValueChangedDelegate(this.OnClickReplay), null);
            newListItem.SetListItemData(5, string.Empty, packet, new EZValueChangedDelegate(this.ClickShare), null);
            newListItem.SetListItemData(6, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("289"), null, null, null);
            newListItem.SetListItemData(7, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("496"), null, null, null);
            if (packet.bAttack)
            {
                if (packet.bWin)
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2997"),
                        "count",
                        packet.i32GildWarPoint
                    });
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2999");
                }
            }
            else if (packet.bWin)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2998");
            }
            else
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3000");
            }
            newListItem.SetListItemData(9, text, null, null, null);
            this.m_nlbRecordList.Add(newListItem);
        }
        this.m_nlbRecordList.RepositionItems();
    }
Пример #16
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();
    }
Пример #17
0
 public void ShowList()
 {
     string text = string.Empty;
     string text2 = string.Empty;
     NrMyCharInfo kMyCharInfo = NrTSingleton<NkCharManager>.Instance.m_kMyCharInfo;
     NrPersonInfoUser charPersonInfo = NrTSingleton<NkCharManager>.Instance.GetCharPersonInfo(1);
     text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("2759");
     NrTSingleton<CTextParser>.Instance.ReplaceParam(ref text2, new object[]
     {
         text,
         "count",
         kMyCharInfo.ColosseumWinCount
     });
     this.m_laMyColosseum_WinCount.SetText(text2);
     this.m_lbColossenumRecordList.Clear();
     foreach (COLOSSEUM_RECORDINFO current in this.record_list)
     {
         NewListItem newListItem = new NewListItem(this.m_lbColossenumRecordList.ColumnNum, true, string.Empty);
         newListItem.SetListItemData(0, true);
         DateTime dueDate = PublicMethod.GetDueDate(current.i64BattleTime);
         text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("602");
         NrTSingleton<CTextParser>.Instance.ReplaceParam(ref text2, new object[]
         {
             text,
             "year",
             dueDate.Year,
             "month",
             dueDate.Month,
             "day",
             dueDate.Day
         });
         newListItem.SetListItemData(1, text2, null, null, null);
         text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("1527");
         NrTSingleton<CTextParser>.Instance.ReplaceParam(ref text2, new object[]
         {
             text,
             "hour",
             dueDate.Hour,
             "min",
             dueDate.Minute,
             "sec",
             dueDate.Second
         });
         newListItem.SetListItemData(2, text2, null, null, null);
         text2 = TKString.NEWString(current.szTargetName);
         newListItem.SetListItemData(3, text2, null, null, null);
         text2 = "Lv." + current.iTargetLevel.ToString();
         newListItem.SetListItemData(4, text2, null, null, null);
         if (current.i64WinPersonID == charPersonInfo.GetPersonID())
         {
             text2 = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("234");
         }
         else
         {
             text2 = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("235");
         }
         newListItem.SetListItemData(5, text2, null, null, null);
         newListItem.SetListItemData(6, string.Empty, current, new EZValueChangedDelegate(this.ClickReplay), null);
         newListItem.SetListItemData(7, string.Empty, current, new EZValueChangedDelegate(this.ClickShare), null);
         newListItem.SetListItemData(8, NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("289"), null, null, null);
         newListItem.SetListItemData(9, NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("496"), null, null, null);
         this.m_lbColossenumRecordList.Add(newListItem);
     }
     this.m_lbColossenumRecordList.RepositionItems();
 }
Пример #18
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);
        }
    }
Пример #19
0
    public void SetBattleStoryChatList(StoryChat_Info[] array)
    {
        string key = "LastReplayStoryChatID";
        string s   = string.Empty;
        long   num = 0L;

        if (PlayerPrefs.HasKey(key))
        {
            s   = PlayerPrefs.GetString(key);
            num = long.Parse(s);
        }
        if (num < array[0].nLastCommentID)
        {
            PlayerPrefs.SetString(key, array[0].nLastCommentID.ToString());
        }
        this.m_nOldTabIndex = this.m_nCurrentTabInex;
        this.m_StoryChatList.SetColumnData("Mobile/DLG/StoryChat/NLB_Scene01_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];
        }
        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();
        string key2 = "ReplayStoryChatID";
        string s2   = string.Empty;
        long   num2 = 0L;

        if (PlayerPrefs.HasKey(key2))
        {
            s2   = PlayerPrefs.GetString(key2);
            num2 = long.Parse(s2);
        }
        for (int k = 0; k < array.Length; k++)
        {
            if (array[k].nCharKind == 8 || array[k].nCharKind == 6 || array[k].nCharKind == 5)
            {
                NewListItem newListItem = new NewListItem(this.m_StoryChatList.ColumnNum, true, string.Empty);
                char[]      separator   = new char[]
                {
                    '/'
                };
                string[] array2 = TKString.NEWString(array[k].szMessage).Split(separator);
                if (array[k].nCharKind == 8)
                {
                    newListItem.SetListItemData(0, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                    newListItem.SetListItemData(1, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1307"), null, null, null);
                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1956"),
                        "targetname1",
                        array2[1],
                        "targetname2",
                        array2[2]
                    });

                    newListItem.SetListItemData(9, empty, null, null, null);
                    newListItem.SetListItemData(8, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1513"), long.Parse(array2[0]), new EZValueChangedDelegate(this.ClickReplay1), null);
                }
                else if (array[k].nCharKind == 6)
                {
                    newListItem.SetListItemData(0, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                    newListItem.SetListItemData(1, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("436"), null, null, null);
                    string empty2 = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1957"),
                        "targetname1",
                        array2[1],
                        "targetname2",
                        array2[2]
                    });

                    newListItem.SetListItemData(9, empty2, null, null, null);
                    newListItem.SetListItemData(8, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1513"), long.Parse(array2[0]), new EZValueChangedDelegate(this.ClickReplay2), null);
                }
                else if (array[k].nCharKind == 5)
                {
                    newListItem.SetListItemData(0, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Challenge02"), null, null, null);
                    newListItem.SetListItemData(1, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("43"), null, null, null);
                    string empty3 = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1957"),
                        "targetname1",
                        array2[1],
                        "targetname2",
                        array2[2]
                    });

                    newListItem.SetListItemData(9, empty3, null, null, null);
                    newListItem.SetListItemData(8, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1513"), long.Parse(array2[0]), new EZValueChangedDelegate(this.ClickReplay3), null);
                }
                DateTime dueDate           = PublicMethod.GetDueDate(array[k].nTime);
                string   textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301");

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

                newListItem.SetListItemData(2, empty4, null, null, null);
                newListItem.SetListItemData(6, array[k].nCommentCount.ToString(), null, null, null);
                newListItem.SetListItemData(7, array[k].nLikeCount.ToString(), null, null, null);
                if (array[k].nStoryChatID > num2)
                {
                    newListItem.SetListItemData(10, true);
                }
                else
                {
                    newListItem.SetListItemData(10, false);
                }
                this.m_StoryChatList.Add(newListItem);
            }
        }
        this.m_StoryChatList.RepositionItems();
        this.m_Page.Text = this.m_nCurrentPage.ToString();
    }
Пример #20
0
    public void SetPushSetting(byte Notice, byte Friend, byte Guild, bool bNotice = false)
    {
        bool[] array = new bool[3];
        bool   flag  = false;

        array[0] = this.PushCheckBoxSetting(this.m_PushBlocks[0], Notice, 0, bNotice);
        array[1] = this.PushCheckBoxSetting(this.m_PushBlocks[1], Friend, 1, bNotice);
        array[2] = this.PushCheckBoxSetting(this.m_PushBlocks[2], Guild, 2, bNotice);
        for (int i = 0; i < 3; i++)
        {
            if (array[i])
            {
                flag = true;
                break;
            }
        }
        if (bNotice && flag)
        {
            Debug.Log("Show MsgBox!!!");
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI != null)
            {
                StringBuilder stringBuilder      = new StringBuilder();
                string        textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94");

                string   empty   = string.Empty;
                DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("362"),
                    "time",
                    dueDate.ToString()
                });

                stringBuilder.Append(empty);
                stringBuilder.Append("\n");
                for (int j = 0; j < 3; j++)
                {
                    if (array[j])
                    {
                        if (this.GetPushCheckSetting(this.m_PushBlocks[j]) == 0)
                        {
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                            {
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("364"),
                                "target",
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface((3388 + j).ToString())
                            });
                        }
                        else
                        {
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                            {
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("363"),
                                "target",
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface((3388 + j).ToString())
                            });
                        }
                        stringBuilder.Append(empty);
                        stringBuilder.Append("\n");
                    }
                }
                Debug.Log("ShowMsg : " + stringBuilder.ToString());
                msgBoxUI.SetMsg(null, null, textFromMessageBox, stringBuilder.ToString(), eMsgType.MB_OK, 2);
                msgBoxUI.Show();
            }
        }
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo != null)
        {
            for (int k = 0; k < 3; k++)
            {
                kMyCharInfo.PushBlock[k] = this.GetPushCheckSetting(this.m_PushBlocks[k]);
            }
        }
    }
Пример #21
0
    private void ShowEventAlarm()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        int level = kMyCharInfo.GetLevel();
        BUNNING_EVENT_INFO value = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetValue((eBUNNING_EVENT)this.m_nEventType);

        if (value == null)
        {
            return;
        }
        if (level > value.m_nLimitLevel)
        {
            if (value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_DAILYDUNGEON && NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.SetBasicData())
            {
                return;
            }
            if (value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_DAILYQUEST || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_DAILYQUEST1 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_DAILYQUEST2)
            {
                int num = (int)kMyCharInfo.GetCharDetail(5);
                if (0 < num && NrTSingleton <NkQuestManager> .Instance.IsCompletedQuestGroup(num))
                {
                    return;
                }
            }
            Main_UI_LevelUpAlarmSoldier main_UI_LevelUpAlarmSoldier = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MAIN_UI_LEVELUP_ALARM_SOLDIER) as Main_UI_LevelUpAlarmSoldier;

            if (main_UI_LevelUpAlarmSoldier == null)
            {
                main_UI_LevelUpAlarmSoldier = (NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MAIN_UI_LEVELUP_ALARM_SOLDIER) as Main_UI_LevelUpAlarmSoldier);
            }
            if (main_UI_LevelUpAlarmSoldier != null)
            {
                DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());
                TimeSpan t       = new TimeSpan(0, 0, 30);
                if (dueDate < this.m_olddt)
                {
                    return;
                }
                string empty = string.Empty;
                if (value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_EXPEVENT || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GOLDEVENT || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_ITEMEVENT || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE1 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE2 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE3 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE4 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE5 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE6 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE7 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE8 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE9 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE10 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE11 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE12 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE13 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE14 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE15 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE16 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE17 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE18 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE19 || value.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE20)
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(this.m_nEventExplainText.ToString()),
                        "rate",
                        value.m_nRewardCount.ToString()
                    });

                    main_UI_LevelUpAlarmSoldier.SetEventInfo(this.m_nEventType, this.m_nEventTitleText, empty);
                }
                else
                {
                    main_UI_LevelUpAlarmSoldier.SetEventInfo(this.m_nEventType, this.m_nEventTitleText, this.m_nEventExplainText);
                }
                main_UI_LevelUpAlarmSoldier.Show();
                this.m_olddt = dueDate + t;
            }
            TsAudioManager.Container.RequestAudioClip("UI_SFX", "MERCENARY", "LEVEL_UP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        }
    }
Пример #22
0
    public void OnClickSend(IUIObject obj)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        long nChatBlockDate = NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nChatBlockDate;

        if (0L < nChatBlockDate && PublicMethod.GetCurTime() <= nChatBlockDate)
        {
            DateTime dueDate        = PublicMethod.GetDueDate(nChatBlockDate);
            string   textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("312");

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

            CHAT_TYPE selectTab = this.m_SelectTab;
            NrTSingleton <ChatManager> .Instance.MakeChatText(this, selectTab, kMyCharInfo.ColosseumGrade, empty, null);

            this._tfInput.ClearText();
            return;
        }
        if (this._tfInput.Text.Length <= 0)
        {
            this._tfInput.ClearText();
            return;
        }
        if (this._tfInput.Text.Equals(this._tfInput.GetDefaultText()))
        {
            return;
        }
        string text = this.ConvertLinkText(this._tfInput.Text);

        if (text.Contains("[#"))
        {
            text = text.Replace("[#", " ");
        }
        if (text.Contains("RGBA("))
        {
            text = text.Replace("RGBA(", " ");
        }
        if (!NrTSingleton <ChatManager> .Instance.ProcessClientCommand(text, ref this._clChat))
        {
            CHAT_TYPE cHAT_TYPE = this.m_SelectTab;
            if (cHAT_TYPE == CHAT_TYPE.PARTY)
            {
                cHAT_TYPE = CHAT_TYPE.SYSTEM;
            }
            NrTSingleton <ChatManager> .Instance.SendMessage(cHAT_TYPE, text, this.useItemLinkText, this.linkItem, 0, 0L, 0);

            NrTSingleton <ChatManager> .Instance.MakeChatText(this, cHAT_TYPE, kMyCharInfo.ColosseumGrade, text, this.linkItem);
        }
        string text2 = string.Empty;

        if ("true" == MsgHandler.HandleReturn <string>("ReservedWordManagerIsUse", new object[0]))
        {
            text2 = MsgHandler.HandleReturn <string>("ReservedWordManagerReplaceWord", new object[]
            {
                text
            });
        }
        if (text2.Contains("*"))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("797"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
        this._tfInput.ClearText();
        this.useItemLinkText = false;
        this.bIsSetLinkItem  = false;
        this.linkItem        = null;
        this._tfInput.SetDefaultText(string.Empty);
        this._Default.Visible = true;
    }