Exemple #1
0
        public bool CheckJobRankUp(UnitData self, bool canCreate = false, bool useCommon = true)
        {
            if (this.Param == null || this.Rank >= this.GetJobRankCap(self))
            {
                return(false);
            }
            PlayerData        player            = MonoSingleton <GameManager> .Instance.Player;
            NeedEquipItemList needEquipItemList = new NeedEquipItemList();

            if (canCreate)
            {
                if (!player.CheckEnableCreateEquipItemAll(self, this.mEquips, !useCommon ? (NeedEquipItemList)null : needEquipItemList) && !needEquipItemList.IsEnoughCommon())
                {
                    return(false);
                }
            }
            else
            {
                for (int index = 0; index < 6; ++index)
                {
                    if (this.mEquips[index] == null || !this.mEquips[index].IsEquiped())
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
 public void CallApi(NeedEquipItemList need_euip_item, PlayerData player)
 {
     if (Network.Mode == Network.EConnectMode.Online)
     {
         this.ExecRequest((WebAPI) new ReqItemCompositAll(this.mItemParam.iname, need_euip_item.IsEnoughCommon(), new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
         ((Behaviour)this).set_enabled(true);
     }
     else
     {
         player.CreateItemAll(this.mItemParam);
     }
 }
Exemple #3
0
 public bool CanAllEquip(ref int cost, ref Dictionary <string, int> equips, ref Dictionary <string, int> consumes, NeedEquipItemList item_list = null)
 {
     return(MonoSingleton <GameManager> .Instance.Player.CheckEnableCreateEquipItemAll(this.Owner, this.Equips, ref consumes, ref cost, item_list));
 }
Exemple #4
0
 public bool CanAllEquip(ref int cost, ref Dictionary <string, int> equips, ref Dictionary <string, int> consumes, ref int target_rank, ref bool can_jobmaster, ref bool can_jobmax, NeedEquipItemList item_list = null, bool all = false)
 {
     if (all)
     {
         return(MonoSingleton <GameManager> .Instance.Player.CheckEnable2(this.Owner, this.Equips, ref consumes, ref cost, ref target_rank, ref can_jobmaster, ref can_jobmax, (NeedEquipItemList)null));
     }
     return(MonoSingleton <GameManager> .Instance.Player.CheckEnableCreateEquipItemAll(this.Owner, this.Equips, ref consumes, ref cost, item_list));
 }
        private void Refresh()
        {
            this.mItemParam = MonoSingleton <GameManager> .Instance.GetItemParam(GlobalVars.SelectedCreateItemID);

            int  cost       = 0;
            bool is_ikkatsu = false;
            Dictionary <string, int> consumes  = (Dictionary <string, int>)null;
            NeedEquipItemList        item_list = new NeedEquipItemList();

            MonoSingleton <GameManager> .Instance.Player.CheckEnableCreateItem(this.mItemParam, ref is_ikkatsu, ref cost, ref consumes, item_list);

            for (int index = 0; index < this.mConsumeObjects.Count; ++index)
            {
                this.mConsumeObjects[index].get_gameObject().SetActive(false);
            }
            if (consumes != null)
            {
                int index = 0;
                using (Dictionary <string, int> .Enumerator enumerator = consumes.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        KeyValuePair <string, int> current = enumerator.Current;
                        if (index >= this.mConsumeObjects.Count)
                        {
                            GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate);
                            gameObject.get_transform().SetParent((Transform)this.ItemLayoutParent, false);
                            this.mConsumeObjects.Add(gameObject);
                        }
                        GameObject mConsumeObject = this.mConsumeObjects[index];
                        DataSource.Bind <ConsumeItemData>(mConsumeObject, new ConsumeItemData()
                        {
                            param = MonoSingleton <GameManager> .Instance.GetItemParam(current.Key),
                            num   = current.Value
                        });
                        mConsumeObject.SetActive(true);
                        ++index;
                    }
                }
            }
            using (Dictionary <byte, NeedEquipItemDictionary> .KeyCollection.Enumerator enumerator = item_list.CommonNeedNum.Keys.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    byte current = enumerator.Current;
                    NeedEquipItemDictionary equipItemDictionary = item_list.CommonNeedNum[current];
                    ItemParam commonItemParam = equipItemDictionary.CommonItemParam;
                    if (commonItemParam != null)
                    {
                        for (int index = 0; index < equipItemDictionary.list.Count; ++index)
                        {
                            ItemParam itemParam = equipItemDictionary.list[index].Param;
                            if (itemParam != null)
                            {
                                if ((int)itemParam.cmn_type - 1 == 2)
                                {
                                    GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate);
                                    gameObject.get_gameObject().SetActive(true);
                                    gameObject.get_transform().SetParent((Transform)this.ItemLayoutParent, false);
                                    ItemData itemData = this.CreateItemData(itemParam.iname, 1);
                                    DataSource.Bind <ItemData>(gameObject, itemData);
                                }
                                else
                                {
                                    GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.CommonItemTemplate);
                                    gameObject.get_gameObject().SetActive(true);
                                    gameObject.get_transform().SetParent((Transform)this.CommonItemLayoutParent, false);
                                    ItemData data = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(itemParam.iname) ?? this.CreateItemData(commonItemParam.iname, 0);

                                    ItemData cmmon_data = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(commonItemParam.iname) ?? this.CreateItemData(commonItemParam.iname, 0);

                                    ((CommonConvertItem)gameObject.GetComponent <CommonConvertItem>()).Bind(data, cmmon_data, equipItemDictionary.list[index].NeedPiece);
                                }
                            }
                        }
                    }
                }
            }
            DataSource.Bind <ItemParam>(((Component)this).get_gameObject(), this.mItemParam);
            GameParameter.UpdateAll(((Component)this).get_gameObject());
        }
        public override void OnActivate(int pinID)
        {
            if (pinID != 0 && pinID != 100)
            {
                return;
            }
            PlayerData player = MonoSingleton <GameManager> .Instance.Player;

            this.mItemParam = MonoSingleton <GameManager> .Instance.GetItemParam(GlobalVars.SelectedCreateItemID);

            if (!player.CheckItemCapacity(this.mItemParam, 1))
            {
                ((Behaviour)this).set_enabled(false);
                this.ActivateOutputLinks(2);
            }
            else if (pinID == 0)
            {
                if (MonoSingleton <GameManager> .Instance.GetRecipeParam(this.mItemParam.recipe).cost > player.Gold)
                {
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(3);
                }
                else
                {
                    CreateItemResult result_type = player.CheckCreateItem(this.mItemParam);
                    if (result_type == CreateItemResult.NotEnough)
                    {
                        ((Behaviour)this).set_enabled(false);
                        this.ActivateOutputLinks(4);
                    }
                    else if (result_type == CreateItemResult.CanCreateCommon)
                    {
                        int cost = 0;
                        Dictionary <string, int> consumes = (Dictionary <string, int>)null;
                        bool is_ikkatsu             = false;
                        NeedEquipItemList item_list = new NeedEquipItemList();
                        MonoSingleton <GameManager> .GetInstanceDirect().Player.CheckEnableCreateItem(this.mItemParam, ref is_ikkatsu, ref cost, ref consumes, item_list);

                        UIUtility.ConfirmBox(LocalizedText.Get("sys.COMMON_EQUIP_CHECK_MADE", new object[1]
                        {
                            (object)item_list.GetCommonItemListString()
                        }), (UIUtility.DialogResultEvent)(go => this.CallApiNormal(player, result_type)), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1, (string)null, (string)null);
                    }
                    else
                    {
                        this.CallApiNormal(player, result_type);
                    }
                }
            }
            else
            {
                int cost = 0;
                Dictionary <string, int> consumes = (Dictionary <string, int>)null;
                bool is_ikkatsu = false;
                NeedEquipItemList need_euip_item = new NeedEquipItemList();
                bool flag = player.CheckEnableCreateItem(this.mItemParam, ref is_ikkatsu, ref cost, ref consumes, need_euip_item);
                if (cost > player.Gold)
                {
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(3);
                }
                else if (!flag && !need_euip_item.IsEnoughCommon())
                {
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(4);
                }
                else if (need_euip_item.IsEnoughCommon())
                {
                    UIUtility.ConfirmBox(LocalizedText.Get("sys.COMMON_EQUIP_CHECK_ONETAP", new object[1]
                    {
                        (object)need_euip_item.GetCommonItemListString()
                    }), (UIUtility.DialogResultEvent)(go => this.CallApi(need_euip_item, player)), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1, (string)null, (string)null);
                }
                else
                {
                    this.CallApi(need_euip_item, player);
                }
            }
        }
        private void Start()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListItem, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListTransform, (UnityEngine.Object)null))
            {
                return;
            }
            this.ListItem.SetActive(false);
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CostText, (UnityEngine.Object)null))
            {
                this.CostText.set_text("0");
            }
            this.mCurrentUnit = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null);
            if (this.mCurrentUnit == null)
            {
                return;
            }
            bool flag1 = this.mCurrentUnit.CurrentJob.Rank == 0;

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.RankMaxEquipAttention, (UnityEngine.Object)null))
            {
                this.RankMaxEquipAttention.SetActive(!flag1);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.JobInfo, (UnityEngine.Object)null))
            {
                this.JobInfo.SetActive(!flag1);
                DataSource.Bind <JobData>(this.JobInfo, this.mCurrentUnit.CurrentJob);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AllEquipConfirm, (UnityEngine.Object)null))
            {
                if (this.mCurrentUnit.JobIndex >= this.mCurrentUnit.NumJobsAvailable)
                {
                    this.AllEquipConfirm.set_text(LocalizedText.Get("sys.UNIT_ALLEQUIP_CHANGE_CONFIRM"));
                }
                else
                {
                    this.AllEquipConfirm.set_text(!flag1 ? LocalizedText.Get("sys.UNIT_ALLEQUIP_CONFIRM") : LocalizedText.Get("sys.UNIT_ALLEQUIP_UNLOCK_CONFIRM"));
                }
            }
            int cost = 0;
            Dictionary <string, int> equips   = new Dictionary <string, int>();
            Dictionary <string, int> consumes = new Dictionary <string, int>();

            this.NeedEquipList = new NeedEquipItemList();
            if (!this.mCurrentUnit.CurrentJob.CanAllEquip(ref cost, ref equips, ref consumes, ref this.target_rank, ref this.can_jobmaster, ref this.can_jobmax, this.NeedEquipList, this.IsAllIn))
            {
                return;
            }
            this.target_rank = Mathf.Min(this.mCurrentUnit.GetJobRankCap(), Mathf.Max(this.target_rank, this.mCurrentUnit.CurrentJob.Rank + 1));
            if (!this.IsAllIn)
            {
                this.can_jobmaster = this.mCurrentUnit.GetJobRankCap() == JobParam.MAX_JOB_RANK && this.target_rank == this.mCurrentUnit.GetJobRankCap() && this.mCurrentUnit.CurrentJob.Rank == this.mCurrentUnit.GetJobRankCap();
            }
            this.SetCommonFlag(this.NeedEquipList.IsEnoughCommon());
            List <ItemParam> items = MonoSingleton <GameManager> .Instance.MasterParam.Items;

            using (Dictionary <string, int> .KeyCollection.Enumerator enumerator = equips.Keys.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string    key       = enumerator.Current;
                    ItemParam itemParam = items.Find((Predicate <ItemParam>)(eq => eq.iname == key));
                    if (itemParam != null)
                    {
                        GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ListItem);
                        gameObject.get_gameObject().SetActive(true);
                        gameObject.get_transform().SetParent(this.ListTransform, false);
                        ItemData itemData = this.CreateItemData(itemParam.iname, equips[key]);
                        DataSource.Bind <ItemData>(gameObject, itemData);
                    }
                }
            }
            using (Dictionary <string, int> .KeyCollection.Enumerator enumerator = consumes.Keys.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string    key       = enumerator.Current;
                    ItemParam itemParam = items.Find((Predicate <ItemParam>)(eq => eq.iname == key));
                    if (itemParam != null)
                    {
                        GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ListItem);
                        gameObject.get_gameObject().SetActive(true);
                        gameObject.get_transform().SetParent(this.ListTransform, false);
                        ItemData itemData = this.CreateItemData(itemParam.iname, consumes[key]);
                        DataSource.Bind <ItemData>(gameObject, itemData);
                    }
                }
            }
            if (this.NeedEquipList.IsEnoughCommon())
            {
                using (Dictionary <byte, NeedEquipItemDictionary> .KeyCollection.Enumerator enumerator = this.NeedEquipList.CommonNeedNum.Keys.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        NeedEquipItemDictionary equipItemDictionary = this.NeedEquipList.CommonNeedNum[enumerator.Current];
                        ItemParam commonItemParam = equipItemDictionary.CommonItemParam;
                        if (commonItemParam != null)
                        {
                            bool flag2 = true;
                            for (int index = 0; index < equipItemDictionary.list.Count; ++index)
                            {
                                ItemParam itemParam = equipItemDictionary.list[index].Param;
                                if (itemParam != null && (int)itemParam.cmn_type - 1 != 2)
                                {
                                    flag2 = false;
                                    GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.CommonListItem);
                                    gameObject.get_gameObject().SetActive(true);
                                    gameObject.get_transform().SetParent(this.CommonListTransform, false);
                                    ItemData data = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(itemParam.iname) ?? this.CreateItemData(itemParam.iname, 0);

                                    ItemData cmmon_data = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(commonItemParam.iname) ?? this.CreateItemData(commonItemParam.iname, 0);

                                    ((CommonConvertItem)gameObject.GetComponent <CommonConvertItem>()).Bind(data, cmmon_data, equipItemDictionary.list[index].NeedPiece);
                                }
                            }
                            if (flag2)
                            {
                                this.IsSoul = true;
                                GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ListItem);
                                gameObject.get_gameObject().SetActive(true);
                                gameObject.get_transform().SetParent(this.ListTransform, false);
                                ItemData itemData = this.CreateItemData(commonItemParam.iname, equipItemDictionary.list.Count);
                                DataSource.Bind <ItemData>(gameObject, itemData);
                            }
                        }
                    }
                }
            }
            GameManager instance = MonoSingleton <GameManager> .Instance;
            bool        flag3    = cost > instance.Player.Gold;

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.YesButton, (UnityEngine.Object)null))
            {
                ((Selectable)this.YesButton).set_interactable(!flag3);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NoGoldWarningText, (UnityEngine.Object)null))
            {
                ((Component)this.NoGoldWarningText).get_gameObject().SetActive(flag3);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CostText, (UnityEngine.Object)null))
            {
                this.CostText.set_text(cost.ToString());
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MaxJobLv, (UnityEngine.Object)null))
            {
                this.MaxJobLv.set_text("/" + this.mCurrentUnit.GetJobRankCap().ToString());
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TargetJobLv, (UnityEngine.Object)null))
            {
                this.TargetJobLv.set_text(this.target_rank.ToString());
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ScrollParent, (UnityEngine.Object)null))
            {
                this.DecelerationRate = this.ScrollParent.get_decelerationRate();
                this.ScrollParent.set_decelerationRate(0.0f);
            }
            this.ListRectTranceform.set_anchoredPosition(new Vector2((float)this.ListRectTranceform.get_anchoredPosition().x, 0.0f));
            this.StartCoroutine(this.ScrollInit());
        }
Exemple #8
0
        private void RefreshRecipeItems()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.RecipeParent, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.SelectedItem, (UnityEngine.Object)null))
            {
                return;
            }
            ((Component)this.RecipeParent).get_gameObject().SetActive(false);
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CreateButton, (UnityEngine.Object)null))
            {
                ((Component)this.CreateButton).get_gameObject().SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CreateButtonAll, (UnityEngine.Object)null))
            {
                ((Component)this.CreateButtonAll).get_gameObject().SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ConfirmRecipeButton, (UnityEngine.Object)null))
            {
                ((Component)this.ConfirmRecipeButton).get_gameObject().SetActive(false);
            }
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.RecipeListItemTemplate, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.RecipeListParent, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.RecipeListLine, (UnityEngine.Object)null))
            {
                return;
            }
            for (int index = 0; index < this.RecipeItems.Count; ++index)
            {
                ((Component)this.RecipeItems[index]).get_gameObject().SetActive(false);
            }
            int index1 = this.mItemParamTree.Count - 1;

            DataSource.Bind <ItemParam>(((Component)this.SelectedItem).get_gameObject(), this.mItemParamTree[index1]);
            RecipeParam recipeParam = MonoSingleton <GameManager> .Instance.GetRecipeParam(this.mItemParamTree[index1].recipe);

            if (recipeParam == null)
            {
                return;
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ConfirmRecipeButton, (UnityEngine.Object)null))
            {
                ((Component)this.ConfirmRecipeButton).get_gameObject().SetActive(true);
            }
            ((Component)this.RecipeParent).get_gameObject().SetActive(true);
            this.ActiveCommonEquipButton(this.IsCommonEquipUI((long)GlobalVars.SelectedUnitUniqueID, (int)GlobalVars.SelectedEquipmentSlot));
            for (int index2 = 0; index2 < recipeParam.items.Length; ++index2)
            {
                if (index2 >= this.RecipeItems.Count)
                {
                    ((Component)this.RecipeListItemTemplate).get_gameObject().SetActive(index2 > 0);
                    ((Component)this.RecipeListLine).get_gameObject().SetActive(index2 > 0);
                    ListItemEvents listItemEvents = (ListItemEvents)UnityEngine.Object.Instantiate <ListItemEvents>((M0)this.RecipeListItemTemplate);
                    ((Component)listItemEvents).get_transform().SetParent((Transform)this.RecipeListParent, false);
                    this.RecipeItems.Add((EquipRecipeItem)((Component)listItemEvents).get_gameObject().GetComponent <EquipRecipeItem>());
                    ((Component)this.RecipeListLine).get_gameObject().SetActive(false);
                    ((Component)this.RecipeListItemTemplate).get_gameObject().SetActive(false);
                }
                ListItemEvents component = (ListItemEvents)((Component)this.RecipeItems[index2]).GetComponent <ListItemEvents>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    component.OnSelect = new ListItemEvents.ListItemEvent(this.OnRecipeItemSelect);
                }
                ((Component)this.RecipeItems[index2]).get_gameObject().SetActive(true);
                RecipeItem          recipeItem = recipeParam.items[index2];
                RecipeItemParameter data       = new RecipeItemParameter();
                data.Item = MonoSingleton <GameManager> .Instance.GetItemParam(recipeItem.iname);

                data.RecipeItem = recipeItem;
                data.Amount     = MonoSingleton <GameManager> .Instance.Player.GetItemAmount(data.Item.iname);

                data.RequiredAmount = recipeItem.num;
                DataSource.Bind <RecipeItemParameter>(((Component)this.RecipeItems[index2]).get_gameObject(), data);
            }
            int cost = 0;
            Dictionary <string, int> consumes = (Dictionary <string, int>)null;
            bool is_ikkatsu = false;

            this.mNeedEquipItemList = new NeedEquipItemList();
            bool flag1 = MonoSingleton <GameManager> .GetInstanceDirect().Player.CheckEnableCreateItem(this.mItemParamTree[index1], ref is_ikkatsu, ref cost, ref consumes, this.mNeedEquipItemList);

            List <RecipeTree> recipeTreeChildren = this.mNeedEquipItemList.GetCurrentRecipeTreeChildren();
            bool            flag2      = recipeTreeChildren != null && recipeTreeChildren.Count > 0;
            EquipRecipeItem component1 = (EquipRecipeItem)((Component)this.SelectedItem).GetComponent <EquipRecipeItem>();

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null))
            {
                component1.SetIsCommonLine(this.mNeedEquipItemList.IsEnoughCommon());
            }
            for (int index2 = 0; index2 < this.RecipeItems.Count; ++index2)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                UnitEquipmentWindow.\u003CRefreshRecipeItems\u003Ec__AnonStorey391 itemsCAnonStorey391 = new UnitEquipmentWindow.\u003CRefreshRecipeItems\u003Ec__AnonStorey391();
                this.RecipeItems[index2].SetIsCommonLine(flag2 && !flag1 && this.mNeedEquipItemList.IsEnoughCommon());
                // ISSUE: reference to a compiler-generated field
                itemsCAnonStorey391.recipe = DataSource.FindDataOfClass <RecipeItemParameter>(((Component)this.RecipeItems[index2]).get_gameObject(), (RecipeItemParameter)null);
                // ISSUE: reference to a compiler-generated method
                RecipeTree recipeTree = !flag2 ? (RecipeTree)null : recipeTreeChildren.Find(new Predicate <RecipeTree>(itemsCAnonStorey391.\u003C\u003Em__452));
                bool       flag3      = this.mNeedEquipItemList.IsEnoughCommon();
                this.RecipeItems[index2].SetIsCommon(recipeTree != null && (recipeTree.IsCommon && flag3));
            }
            if (!flag1 && !this.mNeedEquipItemList.IsEnoughCommon())
            {
                return;
            }
            if (is_ikkatsu)
            {
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CreateButtonAll, (UnityEngine.Object)null))
                {
                    return;
                }
                ((Component)this.CreateButtonAll).get_gameObject().SetActive(true);
            }
            else
            {
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CreateButton, (UnityEngine.Object)null))
                {
                    return;
                }
                ((Component)this.CreateButton).get_gameObject().SetActive(true);
            }
        }
        public override void OnActivate(int pinID)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            FlowNode_CreateItem.\u003COnActivate\u003Ec__AnonStorey2C8 activateCAnonStorey2C8 = new FlowNode_CreateItem.\u003COnActivate\u003Ec__AnonStorey2C8();
            // ISSUE: reference to a compiler-generated field
            activateCAnonStorey2C8.\u003C\u003Ef__this = this;
            if (pinID != 0 && pinID != 100)
            {
                return;
            }
            // ISSUE: reference to a compiler-generated field
            activateCAnonStorey2C8.player = MonoSingleton <GameManager> .Instance.Player;
            this.mItemParam = MonoSingleton <GameManager> .Instance.GetItemParam(GlobalVars.SelectedCreateItemID);

            // ISSUE: reference to a compiler-generated field
            if (!activateCAnonStorey2C8.player.CheckItemCapacity(this.mItemParam, 1))
            {
                ((Behaviour)this).set_enabled(false);
                this.ActivateOutputLinks(2);
            }
            else if (pinID == 0)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                FlowNode_CreateItem.\u003COnActivate\u003Ec__AnonStorey2C9 activateCAnonStorey2C9 = new FlowNode_CreateItem.\u003COnActivate\u003Ec__AnonStorey2C9();
                // ISSUE: reference to a compiler-generated field
                activateCAnonStorey2C9.\u003C\u003Ef__ref\u0024712 = activateCAnonStorey2C8;
                // ISSUE: reference to a compiler-generated field
                activateCAnonStorey2C9.\u003C\u003Ef__this = this;
                // ISSUE: reference to a compiler-generated field
                if (MonoSingleton <GameManager> .Instance.GetRecipeParam(this.mItemParam.recipe).cost > activateCAnonStorey2C8.player.Gold)
                {
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(3);
                }
                else
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    activateCAnonStorey2C9.result_type = activateCAnonStorey2C8.player.CheckCreateItem(this.mItemParam);
                    // ISSUE: reference to a compiler-generated field
                    if (activateCAnonStorey2C9.result_type == CreateItemResult.NotEnough)
                    {
                        ((Behaviour)this).set_enabled(false);
                        this.ActivateOutputLinks(4);
                    }
                    else
                    {
                        // ISSUE: reference to a compiler-generated field
                        if (activateCAnonStorey2C9.result_type == CreateItemResult.CanCreateCommon)
                        {
                            int cost = 0;
                            Dictionary <string, int> consumes = (Dictionary <string, int>)null;
                            bool is_ikkatsu             = false;
                            NeedEquipItemList item_list = new NeedEquipItemList();
                            MonoSingleton <GameManager> .GetInstanceDirect().Player.CheckEnableCreateItem(this.mItemParam, ref is_ikkatsu, ref cost, ref consumes, item_list);

                            // ISSUE: reference to a compiler-generated method
                            UIUtility.ConfirmBox(LocalizedText.Get("sys.COMMON_EQUIP_CHECK_MADE", new object[1]
                            {
                                (object)item_list.GetCommonItemListString()
                            }), new UIUtility.DialogResultEvent(activateCAnonStorey2C9.\u003C\u003Em__2A1), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1, (string)null, (string)null);
                        }
                        else
                        {
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            this.CallApiNormal(activateCAnonStorey2C8.player, activateCAnonStorey2C9.result_type);
                        }
                    }
                }
            }
            else
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                FlowNode_CreateItem.\u003COnActivate\u003Ec__AnonStorey2CA activateCAnonStorey2Ca = new FlowNode_CreateItem.\u003COnActivate\u003Ec__AnonStorey2CA();
                // ISSUE: reference to a compiler-generated field
                activateCAnonStorey2Ca.\u003C\u003Ef__ref\u0024712 = activateCAnonStorey2C8;
                // ISSUE: reference to a compiler-generated field
                activateCAnonStorey2Ca.\u003C\u003Ef__this = this;
                int cost = 0;
                Dictionary <string, int> consumes = (Dictionary <string, int>)null;
                bool is_ikkatsu = false;
                // ISSUE: reference to a compiler-generated field
                activateCAnonStorey2Ca.need_euip_item = new NeedEquipItemList();
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                bool flag = activateCAnonStorey2C8.player.CheckEnableCreateItem(this.mItemParam, ref is_ikkatsu, ref cost, ref consumes, activateCAnonStorey2Ca.need_euip_item);
                // ISSUE: reference to a compiler-generated field
                if (cost > activateCAnonStorey2C8.player.Gold)
                {
                    ((Behaviour)this).set_enabled(false);
                    this.ActivateOutputLinks(3);
                }
                else
                {
                    // ISSUE: reference to a compiler-generated field
                    if (!flag && !activateCAnonStorey2Ca.need_euip_item.IsEnoughCommon())
                    {
                        ((Behaviour)this).set_enabled(false);
                        this.ActivateOutputLinks(4);
                    }
                    else
                    {
                        // ISSUE: reference to a compiler-generated field
                        if (activateCAnonStorey2Ca.need_euip_item.IsEnoughCommon())
                        {
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated method
                            UIUtility.ConfirmBox(LocalizedText.Get("sys.COMMON_EQUIP_CHECK_ONETAP", new object[1]
                            {
                                (object)activateCAnonStorey2Ca.need_euip_item.GetCommonItemListString()
                            }), new UIUtility.DialogResultEvent(activateCAnonStorey2Ca.\u003C\u003Em__2A2), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1, (string)null, (string)null);
                        }
                        else
                        {
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            this.CallApi(activateCAnonStorey2Ca.need_euip_item, activateCAnonStorey2C8.player);
                        }
                    }
                }
            }
        }