예제 #1
0
 // Token: 0x0600047F RID: 1151 RVA: 0x000209A4 File Offset: 0x0001EDA4
 public void SetTime_TimerEvt(TimerEvent.Type set_evtType, int timeSpanSec, int activeTime)
 {
     Debug.Log(string.Concat(new object[]
     {
         "[EventTimerManager] イベント発生時間を指定 [ activeTime = ",
         activeTime,
         " / timeSpanSec = ",
         timeSpanSec,
         " ](",
         set_evtType.ToString(),
         " / Timer = ",
         SuperGameMaster.saveData.evtList_timer.Count,
         " / actEvtCnt = ",
         SuperGameMaster.saveData.evtList_active.Count
     }));
     foreach (EventTimerFormat eventTimerFormat in SuperGameMaster.saveData.evtList_timer)
     {
         if (set_evtType == eventTimerFormat.evtType)
         {
             if (timeSpanSec != -1)
             {
                 eventTimerFormat.timeSpanSec = timeSpanSec;
             }
             if (activeTime != -1)
             {
                 eventTimerFormat.activeTime = activeTime;
             }
         }
     }
 }
예제 #2
0
    // Token: 0x0600047E RID: 1150 RVA: 0x00020850 File Offset: 0x0001EC50
    public void delete_Act_Timer_EvtList_forType(TimerEvent.Type evtType)
    {
        int count  = SuperGameMaster.saveData.evtList_timer.Count;
        int count2 = SuperGameMaster.saveData.evtList_active.Count;

        SuperGameMaster.saveData.evtList_timer.RemoveAll((EventTimerFormat evt) => evt.evtType.Equals(evtType));
        SuperGameMaster.saveData.evtList_active.RemoveAll((EventTimerFormat evt) => evt.evtType.Equals(evtType));
        if (count != SuperGameMaster.saveData.evtList_timer.Count)
        {
            Debug.Log(string.Concat(new object[]
            {
                "[EventTimerManager] Timer イベントを削除しました: ",
                evtType.ToString(),
                " / ",
                count,
                " > ",
                SuperGameMaster.saveData.evtList_timer.Count
            }));
        }
        if (count2 != SuperGameMaster.saveData.evtList_active.Count)
        {
            Debug.Log(string.Concat(new object[]
            {
                "[EventTimerManager] Active イベントを削除しました: ",
                evtType.ToString(),
                " / ",
                count2,
                " > ",
                SuperGameMaster.saveData.evtList_active.Count
            }));
        }
    }
예제 #3
0
    // Token: 0x06000472 RID: 1138 RVA: 0x0001FA04 File Offset: 0x0001DE04
    public void TimerAdd(EventTimerFormat addEvt)
    {
        EventTimerFormat eventTimerFormat = new EventTimerFormat(addEvt);

        if (eventTimerFormat.timeSpanSec < 0)
        {
            this.ActiveAdd(eventTimerFormat);
        }
        else
        {
            int num = 0;
            while (this.search_TimerEvtIndex_forId(num) != -1)
            {
                num++;
            }
            eventTimerFormat.id      = num;
            eventTimerFormat.addTime = SuperGameMaster.GetLastDateTime().AddSeconds((double)eventTimerFormat.timeSpanSec);
            SuperGameMaster.saveData.evtList_timer.Add(new EventTimerFormat(eventTimerFormat));
            SuperGameMaster.saveData.evtList_timer.Sort((EventTimerFormat x, EventTimerFormat y) => x.timeSpanSec - y.timeSpanSec);
            object[] array = new object[8];
            array[0] = "[EventTimerManager] Timer イベントを追加: id = ";
            array[1] = eventTimerFormat.id;
            array[2] = " / timeSpan = ";
            array[3] = eventTimerFormat.timeSpanSec;
            array[4] = " || evtType = ";
            int             num2    = 5;
            TimerEvent.Type evtType = eventTimerFormat.evtType;
            array[num2] = evtType.ToString();
            array[6]    = " / evtId = ";
            array[7]    = eventTimerFormat.evtId;
            Debug.Log(string.Concat(array));
        }
    }
예제 #4
0
    // Token: 0x0600047A RID: 1146 RVA: 0x000205C0 File Offset: 0x0001E9C0
    public List <EventTimerFormat> get_TimerEvtList_forType(TimerEvent.Type evtType)
    {
        List <EventTimerFormat> list = new List <EventTimerFormat>();

        foreach (EventTimerFormat eventTimerFormat in SuperGameMaster.saveData.evtList_timer)
        {
            if (eventTimerFormat.evtType == evtType)
            {
                list.Add(new EventTimerFormat(eventTimerFormat));
            }
        }
        return(new List <EventTimerFormat>(list));
    }
예제 #5
0
    // Token: 0x06000475 RID: 1141 RVA: 0x0001FC68 File Offset: 0x0001E068
    public void Proc(int addTimer, TimerEvent.Type proc_evtType)
    {
        Debug.Log(string.Concat(new object[]
        {
            "[EventTimerManager] イベントProc(",
            proc_evtType.ToString(),
            " / add = ",
            addTimer,
            "): Timer = ",
            SuperGameMaster.saveData.evtList_timer.Count,
            " / actEvtCnt = ",
            SuperGameMaster.saveData.evtList_active.Count
        }));
        foreach (EventTimerFormat eventTimerFormat in SuperGameMaster.saveData.evtList_active)
        {
            if (!eventTimerFormat.trigger)
            {
                if (proc_evtType == TimerEvent.Type.NONE || proc_evtType == eventTimerFormat.evtType)
                {
                    eventTimerFormat.timeSpanSec -= addTimer;
                }
            }
        }
        foreach (EventTimerFormat eventTimerFormat2 in SuperGameMaster.saveData.evtList_timer)
        {
            if (proc_evtType == TimerEvent.Type.NONE || proc_evtType == eventTimerFormat2.evtType)
            {
                eventTimerFormat2.timeSpanSec -= addTimer;
                if (eventTimerFormat2.timeSpanSec <= 0)
                {
                    this.ActiveAdd(eventTimerFormat2);
                }
            }
        }
        this.ActiveMath(proc_evtType);
        int count  = SuperGameMaster.saveData.evtList_timer.Count;
        int count2 = SuperGameMaster.saveData.evtList_active.Count;

        if (proc_evtType == TimerEvent.Type.NONE)
        {
            SuperGameMaster.saveData.evtList_timer.RemoveAll((EventTimerFormat evt) => evt.timeSpanSec < 0);
            SuperGameMaster.saveData.evtList_active.RemoveAll((EventTimerFormat evt) => evt.timeSpanSec < 0);
        }
        else
        {
            SuperGameMaster.saveData.evtList_timer.RemoveAll((EventTimerFormat evt) => evt.timeSpanSec < 0 && evt.evtType == proc_evtType);
            SuperGameMaster.saveData.evtList_active.RemoveAll((EventTimerFormat evt) => evt.timeSpanSec < 0 && evt.evtType == proc_evtType);
        }
        if (count != SuperGameMaster.saveData.evtList_timer.Count)
        {
            Debug.Log(string.Concat(new object[]
            {
                "[EventTimerManager] Timer イベントが削除されました: ",
                count,
                " > ",
                SuperGameMaster.saveData.evtList_timer.Count
            }));
        }
        if (count2 != SuperGameMaster.saveData.evtList_active.Count)
        {
            Debug.Log(string.Concat(new object[]
            {
                "[EventTimerManager] Active イベントが削除されました:",
                count2,
                " > ",
                SuperGameMaster.saveData.evtList_active.Count
            }));
        }
    }
예제 #6
0
 // Token: 0x06000489 RID: 1161 RVA: 0x00020C08 File Offset: 0x0001F008
 public int search_TimerEvtIndex_forType_andId(TimerEvent.Type type, int type_evtId)
 {
     return(SuperGameMaster.saveData.evtList_timer.FindIndex((EventTimerFormat rec) => rec.evtType.Equals(type) && rec.evtId.Equals(type_evtId)));
 }
예제 #7
0
 // Token: 0x06000487 RID: 1159 RVA: 0x00020B98 File Offset: 0x0001EF98
 public int search_ActEvtIndex_forType(TimerEvent.Type type)
 {
     return(SuperGameMaster.saveData.evtList_active.FindIndex((EventTimerFormat rec) => rec.evtType.Equals(type)));
 }
예제 #8
0
    // Token: 0x06000476 RID: 1142 RVA: 0x0001FF8C File Offset: 0x0001E38C
    public void ActiveMath(TimerEvent.Type proc_evtType)
    {
        List <EventTimerFormat> list = new List <EventTimerFormat>();

        foreach (EventTimerFormat eventTimerFormat in SuperGameMaster.saveData.evtList_active)
        {
            if (proc_evtType == TimerEvent.Type.NONE || proc_evtType == eventTimerFormat.evtType)
            {
                switch (eventTimerFormat.evtType)
                {
                case TimerEvent.Type.GoTravel:
                    if (eventTimerFormat.timeSpanSec < 0)
                    {
                        SuperGameMaster.set_FlagAdd(Flag.Type.GOTRAVEL, 1);
                    }
                    SuperGameMaster.ResetSave_BagDeskList_virtual();
                    break;

                case TimerEvent.Type.BackHome:
                    SuperGameMaster.ResetSave_BagDeskList_virtual();
                    break;

                case TimerEvent.Type.Picture:
                    if (eventTimerFormat.timeSpanSec < 0)
                    {
                        SuperGameMaster.set_FlagAdd(Flag.Type.GOTRAVEL, 1);
                    }
                    SuperGameMaster.ResetSave_BagDeskList_virtual();
                    break;

                case TimerEvent.Type.Return:
                    SuperGameMaster.ResetSave_BagDeskList_virtual();
                    break;

                case TimerEvent.Type.Friend:
                    if (eventTimerFormat.timeSpanSec <= 0)
                    {
                        int num  = eventTimerFormat.timeSpanSec;
                        int num2 = 0;
                        CharacterDataFormat characterDataFormat = SuperGameMaster.sDataBase.get_CharaDB_forId(eventTimerFormat.evtId);
IL_2E9:
                        while (num + num2 <= 0)
                        {
                            num += 21600;
                            while (UnityEngine.Random.Range(0, 100) >= 10)
                            {
                                num += 1800;
                                if (num > 1296000)
                                {
IL_2C1:
                                    num2  = UnityEngine.Random.Range(6, 9);
                                    num2 *= 1800;
                                    if (characterDataFormat.flagValue > SuperGameMaster.Count_CollectionFlag())
                                    {
                                        num2 = 0;
                                        goto IL_2E9;
                                    }
                                    goto IL_2E9;
                                }
                            }
                            goto IL_2C1;
                        }
                        list.Add(new EventTimerFormat
                        {
                            id          = -1,
                            timeSpanSec = num,
                            activeTime  = num2,
                            addTime     = new DateTime(1970, 1, 1),
                            evtType     = TimerEvent.Type.Friend,
                            evtId       = characterDataFormat.id,
                            evtValue    = new List <int>(),
                            evtValue    =
                            {
                                UnityEngine.Random.Range(0,   characterDataFormat.rndPos.Length),
                                0,
                                eventTimerFormat.evtValue[2],
                                eventTimerFormat.evtValue[3],
                                eventTimerFormat.evtValue[4],
                                0
                            },
                            trigger = false
                        });
                    }
                    break;

                case TimerEvent.Type.Gift:
                {
                    int count = SuperGameMaster.saveData.MailList.Count;
                    if (count >= 100)
                    {
                        SuperGameMaster.saveData.MailList.RemoveAt(0);
                        Debug.Log("[EventTimerManager] 昔のメールを削除しました");
                    }
                    MailEventFormat mailEventFormat = new MailEventFormat();
                    mailEventFormat.NewMail();
                    int evtId = eventTimerFormat.evtId;
                    CharacterDataFormat characterDataFormat2 = SuperGameMaster.sDataBase.get_CharaDB_forId(evtId);
                    Define.Gift         gift = (Define.Gift)eventTimerFormat.evtValue[0];
                    if (gift != Define.Gift.Clover)
                    {
                        if (gift != Define.Gift.FourClover)
                        {
                            if (gift == Define.Gift.Ticket)
                            {
                                mailEventFormat.title  = characterDataFormat2.name + "のおかえし";
                                mailEventFormat.ticket = eventTimerFormat.evtValue[1];
                            }
                        }
                        else
                        {
                            mailEventFormat.title     = characterDataFormat2.name + "のおかえし";
                            mailEventFormat.itemId    = 1000;
                            mailEventFormat.itemStock = eventTimerFormat.evtValue[1];
                        }
                    }
                    else
                    {
                        mailEventFormat.title       = characterDataFormat2.name + "のおかえし";
                        mailEventFormat.CloverPoint = eventTimerFormat.evtValue[1];
                    }
                    mailEventFormat.senderCharaId = characterDataFormat2.id;
                    mailEventFormat.mailEvt       = EvtId.Gift;
                    mailEventFormat.mailId        = SuperGameMaster.saveData.MailList_nextId;
                    mailEventFormat.date          = SuperGameMaster.saveData.lastDateTime;
                    SuperGameMaster.saveData.MailList.Add(mailEventFormat);
                    SuperGameMaster.saveData.MailList_nextId++;
                    Debug.Log(string.Concat(new object[]
                        {
                            "[EventTimerManager] メール追加(",
                            SuperGameMaster.saveData.MailList.Count,
                            ") ID:",
                            mailEventFormat.mailId,
                            " next:",
                            SuperGameMaster.saveData.MailList_nextId
                        }));
                    eventTimerFormat.trigger     = false;
                    eventTimerFormat.timeSpanSec = -1;
                    break;
                }
                }
            }
        }
        foreach (EventTimerFormat addEvt in list)
        {
            SuperGameMaster.evtMgr.TimerAdd(addEvt);
        }
    }
예제 #9
0
    // Token: 0x060003CE RID: 974 RVA: 0x00016EE4 File Offset: 0x000152E4
    public void GetEventList()
    {
        List <EventTimerFormat> list = new List <EventTimerFormat>();
        string text = "\n\n\n";

        text += "【旅行変数】#################### \n";
        string text2 = text;

        text = string.Concat(new object[]
        {
            text2,
            "  home = ",
            SuperGameMaster.saveData.home,
            " / drift = ",
            SuperGameMaster.saveData.drift,
            "\n"
        });
        if (!SuperGameMaster.saveData.standby)
        {
            text += "<color=#999999>";
        }
        text2 = text;
        text  = string.Concat(new object[]
        {
            text2,
            " standbyWait [ ",
            SuperGameMaster.saveData.standby,
            " ] = ",
            SuperGameMaster.saveData.standbyWait / 3600,
            "h ",
            SuperGameMaster.saveData.standbyWait % 3600 / 60,
            "m ",
            SuperGameMaster.saveData.standbyWait % 60,
            "s(",
            SuperGameMaster.saveData.standbyWait,
            ")\n"
        });
        if (!SuperGameMaster.saveData.standby)
        {
            text += "</color>";
        }
        text2 = text;
        text  = string.Concat(new object[]
        {
            text2,
            "  restTime = ",
            SuperGameMaster.saveData.restTime / 3600,
            "h ",
            SuperGameMaster.saveData.restTime % 3600 / 60,
            "m ",
            SuperGameMaster.saveData.restTime % 60,
            "s(",
            SuperGameMaster.saveData.restTime,
            ")\n"
        });
        text2 = text;
        text  = string.Concat(new object[]
        {
            text2,
            "  lastTravelTime = ",
            SuperGameMaster.saveData.lastTravelTime / 3600,
            "h ",
            SuperGameMaster.saveData.lastTravelTime % 3600 / 60,
            "m ",
            SuperGameMaster.saveData.lastTravelTime % 60,
            "s(",
            SuperGameMaster.saveData.lastTravelTime,
            ")\n"
        });
        list  = SuperGameMaster.evtMgr.get_TimerList();
        text2 = text;
        text  = string.Concat(new object[]
        {
            text2,
            "\n【予約イベント】[",
            list.Count,
            "] (evtList_timer) =========== \n"
        });
        foreach (EventTimerFormat eventTimerFormat in list)
        {
            switch (eventTimerFormat.evtType)
            {
            case TimerEvent.Type.GoTravel:
                text += "<color=#99ff99>";
                break;

            case TimerEvent.Type.BackHome:
                text += "<color=#99ff99>";
                break;

            case TimerEvent.Type.Picture:
                text += "<color=#ccffcc>";
                break;

            case TimerEvent.Type.Drift:
                text += "<color=#ff9999>";
                break;

            case TimerEvent.Type.Return:
                text += "<color=#ff9999>";
                break;

            case TimerEvent.Type.Friend:
                text += "<color=#ccccff>";
                break;

            case TimerEvent.Type.Gift:
                text += "<color=#9999ff>";
                break;

            default:
                text += "<color=white>";
                break;
            }
            text2 = text;
            text  = string.Concat(new object[]
            {
                text2,
                "<b>\u3000[ID = ",
                eventTimerFormat.id,
                "] 発生まで > ",
                eventTimerFormat.timeSpanSec / 3600,
                "h ",
                eventTimerFormat.timeSpanSec % 3600 / 60,
                "m ",
                eventTimerFormat.timeSpanSec % 60,
                "s(",
                eventTimerFormat.timeSpanSec,
                ")\n</b>"
            });
            text2 = text;
            object[] array = new object[6];
            array[0] = text2;
            array[1] = "  \u3000        evtType = ";
            int             num     = 2;
            TimerEvent.Type evtType = eventTimerFormat.evtType;
            array[num] = evtType.ToString();
            array[3]   = " / evtId = ";
            array[4]   = eventTimerFormat.evtId;
            array[5]   = "\n";
            text       = string.Concat(array);
            text      += "  \u3000        value(";
            foreach (int num2 in eventTimerFormat.evtValue)
            {
                text = text + num2 + ",";
            }
            text += ")\n";
            if (eventTimerFormat.trigger)
            {
                text += "    \u3000      Active時間:(なし)\n";
            }
            else
            {
                text2 = text;
                text  = string.Concat(new object[]
                {
                    text2,
                    " \u3000         Active時間:",
                    eventTimerFormat.activeTime / 3600,
                    "h ",
                    eventTimerFormat.activeTime % 3600 / 60,
                    "m ",
                    eventTimerFormat.activeTime % 60,
                    "s(",
                    eventTimerFormat.activeTime,
                    ")\n"
                });
            }
            text  = text + " \u3000         追加時刻:" + eventTimerFormat.addTime.ToString() + "\n";
            text += "</color>";
        }
        list  = SuperGameMaster.evtMgr.get_ActiveList();
        text2 = text;
        text  = string.Concat(new object[]
        {
            text2,
            "\n【実行中イベント】[",
            list.Count,
            "] (evtList_active) ========== \n"
        });
        foreach (EventTimerFormat eventTimerFormat2 in SuperGameMaster.saveData.evtList_active)
        {
            switch (eventTimerFormat2.evtType)
            {
            case TimerEvent.Type.GoTravel:
                text += "<color=#99ff99>";
                break;

            case TimerEvent.Type.BackHome:
                text += "<color=#99ff99>";
                break;

            case TimerEvent.Type.Picture:
                text += "<color=#ccffcc>";
                break;

            case TimerEvent.Type.Drift:
                text += "<color=#ff9999>";
                break;

            case TimerEvent.Type.Return:
                text += "<color=#ff9999>";
                break;

            case TimerEvent.Type.Friend:
                text += "<color=#ccccff>";
                break;

            case TimerEvent.Type.Gift:
                text += "<color=#9999ff>";
                break;

            default:
                text += "<color=white>";
                break;
            }
            if (!eventTimerFormat2.trigger)
            {
                text2 = text;
                text  = string.Concat(new object[]
                {
                    text2,
                    "<b>\u3000[ID = ",
                    eventTimerFormat2.id,
                    "] 終了まで > ",
                    eventTimerFormat2.timeSpanSec / 3600,
                    "h ",
                    eventTimerFormat2.timeSpanSec % 3600 / 60,
                    "m ",
                    eventTimerFormat2.timeSpanSec % 60,
                    "s(",
                    eventTimerFormat2.timeSpanSec,
                    ")\n</b>"
                });
            }
            else
            {
                text2 = text;
                text  = string.Concat(new object[]
                {
                    text2,
                    "\u3000[ID = ",
                    eventTimerFormat2.id,
                    "] (Trigger)\n"
                });
            }
            text2 = text;
            object[] array2 = new object[6];
            array2[0] = text2;
            array2[1] = "     \u3000     evtType = ";
            int             num3     = 2;
            TimerEvent.Type evtType2 = eventTimerFormat2.evtType;
            array2[num3] = evtType2.ToString();
            array2[3]    = " / evtId = ";
            array2[4]    = eventTimerFormat2.evtId;
            array2[5]    = "\n";
            text         = string.Concat(array2);
            text        += "  \u3000        value(";
            foreach (int num4 in eventTimerFormat2.evtValue)
            {
                text = text + num4 + ",";
            }
            text += ")\n";
            if (eventTimerFormat2.trigger)
            {
                text += "    \u3000      Active指定時間:(なし)\n";
            }
            else
            {
                text2 = text;
                text  = string.Concat(new object[]
                {
                    text2,
                    " \u3000         Active指定時間:",
                    eventTimerFormat2.activeTime / 3600,
                    "h ",
                    eventTimerFormat2.activeTime % 3600 / 60,
                    "m ",
                    eventTimerFormat2.activeTime % 60,
                    "s(",
                    eventTimerFormat2.activeTime,
                    ")\n"
                });
            }
            text  = text + " \u3000         追加時刻:" + eventTimerFormat2.addTime.ToString() + "\n";
            text += "</color>";
        }
        this.Result_text.GetComponent <Text>().text = text;
    }