public void SetData(ConsumableItemRecipeSheet.Row recipeRow) { recipeCellView.Set(recipeRow); materialPanel.SetData(recipeRow, true, Widget.Find <Combination>().selectedIndex >= 0); Enable(); stateType = Combination.StateType.CombineConsumable; }
public void SetData(EquipmentItemRecipeSheet.Row recipeRow, int?subRecipeId = null) { recipeCellView.Set(recipeRow); materialPanel.SetData(recipeRow, subRecipeId); Enable(); var requiredBlockIndex = recipeRow.RequiredBlockIndex; if (subRecipeId.HasValue) { var subSheet = Game.Game.instance.TableSheets.EquipmentItemSubRecipeSheet; if (subSheet.TryGetValue((int)subRecipeId, out var subRecipe)) { requiredBlockIndex += subRecipe.RequiredBlockIndex; } } RequiredBlockIndexSubject.OnNext(requiredBlockIndex); stateType = Combination.StateType.CombineEquipment; }