private void OnQuery_SELECT_COMPLETED_RUSH()
    {
        int index = (int)GameSection.GetEventData();

        DeliveryTable.DeliveryData deliveryData = clearedDeliveries[index];
        if (deliveryData.GetConditionType(0u) == DELIVERY_CONDITION_TYPE.COMPLETE_DELIVERY_ID)
        {
            int id = (int)deliveryData.id;
            DeliveryRewardList deliveryRewardList = new DeliveryRewardList();
            GameSection.SetEventData(new object[3]
            {
                id,
                deliveryRewardList,
                true
            });
        }
        else
        {
            ArenaTable.ArenaData arenaData = deliveryData.GetArenaData();
            MonoBehaviourSingleton <QuestManager> .I.SetCurrentQuestID((uint)arenaData.questIds[0], true);

            MonoBehaviourSingleton <QuestManager> .I.SetCurrentArenaId(arenaData.id);

            GameSection.ChangeEvent("TO_ROOM", deliveryData);
        }
    }
    private List <DeliveryTable.DeliveryData> CreateClearedDliveryList(ARENA_RANK borderRank)
    {
        List <DeliveryTable.DeliveryData> list = new List <DeliveryTable.DeliveryData>();
        List <ClearStatusDelivery>        clearStatusDelivery = MonoBehaviourSingleton <DeliveryManager> .I.clearStatusDelivery;
        int i = 0;

        for (int count = clearStatusDelivery.Count; i < count; i++)
        {
            ClearStatusDelivery d = clearStatusDelivery[i];
            if (d.deliveryStatus == 3)
            {
                DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)d.deliveryId);

                if (deliveryTableData.eventID == eventData.eventId && !Array.Exists(deliveryInfo, (Delivery x) => x.dId == d.deliveryId))
                {
                    ArenaTable.ArenaData arenaData = deliveryTableData.GetArenaData();
                    if (arenaData != null && arenaData.rank >= borderRank && deliveryTableData.GetConditionType(0u) != DELIVERY_CONDITION_TYPE.COMPLETE_DELIVERY_ID)
                    {
                        list.Add(deliveryTableData);
                        if (deliveryTableData.clearEventID != 0)
                        {
                            string text = deliveryTableData.clearEventTitle;
                            if (string.IsNullOrEmpty(text))
                            {
                                text = deliveryTableData.name;
                            }
                            stories.Add(new Story((int)deliveryTableData.clearEventID, text));
                        }
                    }
                }
            }
        }
        return(list);
    }
    private void CreateArenaList()
    {
        arenaDataList.Clear();
        for (int i = 0; i < deliveryInfo.Length; i++)
        {
            DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)deliveryInfo[i].dId);

            ArenaTable.ArenaData arenaData = deliveryTableData.GetArenaData();
            if (arenaData == null)
            {
                Debug.LogError((object)(this.get_name() + " " + deliveryTableData.name + " : arenaDataが見つかりません"));
            }
            else
            {
                arenaDataList.Add(arenaData);
            }
        }
    }
    private void OnQuery_SELECT_RUSH()
    {
        int  index = (int)GameSection.GetEventData();
        bool flag  = MonoBehaviourSingleton <DeliveryManager> .I.IsCompletableDelivery(visibleDeliveryList[index].dId);

        int delivery_id = visibleDeliveryList[index].dId;

        if (flag)
        {
            DeliveryTable.DeliveryData table = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)visibleDeliveryList[index].dId);

            changeToDeliveryClearEvent = true;
            bool is_tutorial        = !TutorialStep.HasFirstDeliveryCompleted();
            bool enable_clear_event = table.clearEventID != 0;
            GameSection.StayEvent();
            MonoBehaviourSingleton <DeliveryManager> .I.isStoryEventEnd = false;
            MonoBehaviourSingleton <DeliveryManager> .I.SendDeliveryComplete(visibleDeliveryList[index].uId, enable_clear_event, delegate(bool is_success, DeliveryRewardList recv_reward)
            {
                if (is_success)
                {
                    if (is_tutorial)
                    {
                        TutorialStep.isSendFirstRewardComplete = true;
                    }
                    if (!enable_clear_event)
                    {
                        MonoBehaviourSingleton <DeliveryManager> .I.isStoryEventEnd = false;
                        GameSection.ChangeStayEvent("RUSH_REWARD", new object[2]
                        {
                            delivery_id,
                            recv_reward
                        });
                    }
                    else
                    {
                        GameSection.ChangeStayEvent("CLEAR_EVENT", new object[3]
                        {
                            (int)table.clearEventID,
                            delivery_id,
                            recv_reward
                        });
                    }
                }
                else
                {
                    changeToDeliveryClearEvent = false;
                }
                GameSection.ResumeEvent(is_success, null);
            });
        }
        else
        {
            DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)delivery_id);

            if (deliveryTableData.GetConditionType(0u) == DELIVERY_CONDITION_TYPE.COMPLETE_DELIVERY_ID)
            {
                GameSection.SetEventData(new object[2]
                {
                    delivery_id,
                    null
                });
            }
            else
            {
                ArenaTable.ArenaData arenaData = deliveryTableData.GetArenaData();
                MonoBehaviourSingleton <QuestManager> .I.SetCurrentQuestID((uint)arenaData.questIds[0], true);

                MonoBehaviourSingleton <QuestManager> .I.SetCurrentArenaId(arenaData.id);

                GameSection.ChangeEvent("TO_ROOM", deliveryTableData);
            }
        }
    }
Пример #5
0
 public void InitArenaData(DeliveryTable.DeliveryData info)
 {
     arenaData = info.GetArenaData();
 }