public int CurrentEventCount()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return(0);
        }
        int level = kMyCharInfo.GetLevel();
        int num   = 0;

        for (int i = 0; i < 7; i++)
        {
            EVENT_INFO eventInfo = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetEventInfo(i);

            if (eventInfo != null)
            {
                if (eventInfo.m_nEventType != 0)
                {
                    if (NrTSingleton <ContentsLimitManager> .Instance.IsChallenge() || eventInfo.m_nEventType != 36)
                    {
                        BUNNING_EVENT_INFO value = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetValue((eBUNNING_EVENT)eventInfo.m_nEventType);

                        if (value != null)
                        {
                            if (level <= value.m_nLimitLevel)
                            {
                                num++;
                            }
                        }
                    }
                }
            }
        }
        if (this.SetBasicData())
        {
            num++;
        }
        int num2 = (int)kMyCharInfo.GetCharDetail(5);

        if (0 < num2 && NrTSingleton <NkQuestManager> .Instance.IsCompletedQuestGroup(num2))
        {
            num++;
        }
        int num3 = 0;

        for (int j = 0; j < 7; j++)
        {
            if (this.m_EventInfo[j].m_nEventType > 0)
            {
                num3++;
                if (this.m_EventInfo[j].m_nEventType == 1 || this.m_EventInfo[j].m_nEventType == 14 || this.m_EventInfo[j].m_nEventType == 18)
                {
                    num3--;
                }
            }
        }
        return(num3 - num);
    }
 public void Set_Value(eBUNNING_EVENT eBurnningEvent, BUNNING_EVENT_INFO value)
 {
     if (eBurnningEvent <= eBUNNING_EVENT.eBUNNING_EVENT_NONE || eBurnningEvent >= eBUNNING_EVENT.eBUNNING_EVENT_MAX)
     {
         return;
     }
     this.m_BunningEvent[(int)eBurnningEvent] = value;
 }
Ejemplo n.º 3
0
    private void SetEventImage()
    {
        BUNNING_EVENT_INFO value = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetValue((eBUNNING_EVENT)this.m_nEventType);

        string bundlepath = string.Format("{0}", "UI/etc/" + value.m_strSolTalkImg);

        NrTSingleton <UIImageBundleManager> .Instance.RequestBundleImage(bundlepath, new PostProcPerItem(this.SetImage));
    }
    public override bool ParseDataFromNDT(TsDataReader dr)
    {
        foreach (TsDataReader.Row data in dr)
        {
            BUNNING_EVENT_INFO bUNNING_EVENT_INFO = new BUNNING_EVENT_INFO();
            bUNNING_EVENT_INFO.SetData(data);
            bUNNING_EVENT_INFO.m_eEventType = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetBurnningEventCode(bUNNING_EVENT_INFO.strEventType);

            NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.Set_Value(bUNNING_EVENT_INFO.m_eEventType, bUNNING_EVENT_INFO);
        }
        return(true);
    }
Ejemplo n.º 5
0
    public void SetSelectInfoItem(int nEventType, bool bCurrentEvent)
    {
        string text = string.Empty;

        if (bCurrentEvent)
        {
            EVENT_INFO eventInfoFromType = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetEventInfoFromType(nEventType);

            if (eventInfoFromType == null)
            {
                return;
            }
            BUNNING_EVENT_INFO value = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetValue((eBUNNING_EVENT)nEventType);

            if (value == null)
            {
                return;
            }
            int num = eventInfoFromType.m_nStartTime + eventInfoFromType.m_nEndDurationTime / 60;
            if (num >= 0 && num > 24)
            {
                num -= 24;
            }
            string text2 = this.EventWeek((int)eventInfoFromType.m_nEventInfoWeek);
            if (nEventType == 15)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2550");
            }
            else if (nEventType == 16)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2560");
            }
            else if (nEventType == 17)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2561");
            }
            else if (value.m_nYear > 0)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2307"),
                    "month",
                    value.m_nMonth.ToString(),
                    "day",
                    value.m_nDay.ToString(),
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endmonth",
                    value.m_nEndMonth.ToString(),
                    "endday",
                    value.m_nEndDay.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            else if (eventInfoFromType.m_nEventType == 4)
            {
                text2 = this.EventWeek(-1);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text2,
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            else if (eventInfoFromType.m_nEventType == 19 || eventInfoFromType.m_nEventType == 20 || eventInfoFromType.m_nEventType == 21 || eventInfoFromType.m_nEventType == 22 || eventInfoFromType.m_nEventType == 23 || eventInfoFromType.m_nEventType == 24)
            {
                string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2543");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    textFromInterface,
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text2,
                    "starttime",
                    eventInfoFromType.m_nStartTime.ToString(),
                    "endtime",
                    num.ToString()
                });
            }
            this.m_lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(eventInfoFromType.m_nTitleText.ToString()));
            this.m_lbEventDetail.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(eventInfoFromType.m_nExplain.ToString()));
        }
        else
        {
            BUNNING_EVENT_REFLASH_INFO bUNNING_EVENT_REFLASH_INFO = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.Get_Value((eBUNNING_EVENT)nEventType);

            if (bUNNING_EVENT_REFLASH_INFO == null)
            {
                return;
            }
            BUNNING_EVENT_INFO value = NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.GetValue((eBUNNING_EVENT)nEventType);

            if (value == null)
            {
                return;
            }
            int num2 = bUNNING_EVENT_REFLASH_INFO.m_nStartTime + bUNNING_EVENT_REFLASH_INFO.m_nEndTime / 60;
            if (num2 >= 0 && num2 > 24)
            {
                num2 -= 24;
            }
            string text3 = this.EventWeek((int)value.m_nWeek);
            if (nEventType == 15)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2550");
            }
            else if (nEventType == 16)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2560");
            }
            else if (nEventType == 17)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2561");
            }
            else if (value.m_nYear > 0)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text3, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2307"),
                    "month",
                    value.m_nMonth.ToString(),
                    "day",
                    value.m_nDay.ToString(),
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endmonth",
                    value.m_nEndMonth.ToString(),
                    "endday",
                    value.m_nEndDay.ToString(),
                    "endtime",
                    num2.ToString()
                });

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text3,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            else if (bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_BUFFDAMAGE)
            {
                text3 = this.EventWeek(-1);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text3,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            else if (bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF1 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF2 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF3 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF4 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF5 || bUNNING_EVENT_REFLASH_INFO.m_eEventType == eBUNNING_EVENT.eBUNNING_EVENT_GMBUFF6)
            {
                string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2543");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    textFromInterface2,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1794"),
                    "day",
                    text3,
                    "starttime",
                    bUNNING_EVENT_REFLASH_INFO.m_nStartTime.ToString(),
                    "endtime",
                    num2.ToString()
                });
            }
            this.m_lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(bUNNING_EVENT_REFLASH_INFO.m_nTitleText.ToString()));
            this.m_lbEventDetail.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(bUNNING_EVENT_REFLASH_INFO.m_nExplain.ToString()));
        }
        this.m_lbTime.SetText(text);
    }
Ejemplo n.º 6
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));
        }
    }