コード例 #1
0
            protected override async Task <ActivityResult> ExecuteSpecificActivity()
            {
                // If item is not in inventory at the moment, we consider that a problem...
                if (!Query.IsViable(_itemToUse))
                {
                    QBCLog.Error(_errorMessage_ItemNotInInventory);
                    return(ActivityResult.Failed);
                }

                var activityResult = ActivityResult.Failed;
                await UtilityCoroutine.UseItem((int)_itemToUse.Entry,
                                               null,  /*missing item is non-fatal*/
                                               null,  /*notification on fail*/
                                               () => { activityResult = ActivityResult.Succeeded; });

                return(activityResult);
            }