Exemple #1
0
    private void SetupDeliveryListItem(Transform t, DeliveryDataAndUId deliveryDataAndUId)
    {
        //IL_0014: Unknown result type (might be due to invalid IL or missing references)
        RegionMapDescriptionDeliveryItem regionMapDescriptionDeliveryItem = t.GetComponent <RegionMapDescriptionDeliveryItem>();

        if (regionMapDescriptionDeliveryItem == null)
        {
            regionMapDescriptionDeliveryItem = t.get_gameObject().AddComponent <RegionMapDescriptionDeliveryItem>();
        }
        regionMapDescriptionDeliveryItem.InitUI();
        regionMapDescriptionDeliveryItem.Setup(t, deliveryDataAndUId.data);
        SetEvent(t, "SELECT_DELIVERY", deliveryDataAndUId);
    }
Exemple #2
0
    public void OnQuery_SELECT_DELIVERY()
    {
        DeliveryDataAndUId dataAndUId = (DeliveryDataAndUId)GameSection.GetEventData();

        DeliveryTable.DeliveryData data = dataAndUId.data;
        int  id = (int)dataAndUId.data.id;
        bool is_enough_material = MonoBehaviourSingleton <DeliveryManager> .I.IsCompletableDelivery(id);

        if (!is_enough_material)
        {
            GameSection.SetEventData(new object[4]
            {
                id,
                null,
                false,
                mapData
            });
        }
        else
        {
            bool flag  = FieldManager.IsValidInGame();
            bool flag2 = data.clearEventID != 0;
            if (flag)
            {
                if (data.IsInvalidClearIngame() || flag2)
                {
                    GameSection.ChangeEvent("DELIVERY_ITEM_COMPLETE", null);
                }
                else
                {
                    GameSection.StayEvent();
                    MonoBehaviourSingleton <CoopManager> .I.coopStage.fieldRewardPool.SendFieldDrop(delegate(bool b)
                    {
                        if (b)
                        {
                            SendDeliveryComplete(data, dataAndUId.uId, is_enough_material);
                        }
                    });
                }
            }
            else
            {
                GameSection.StayEvent();
                SendDeliveryComplete(data, dataAndUId.uId, is_enough_material);
            }
        }
    }