public bool CanDrop(DropAttemptInfo info)
 {
     if (info.IsExpertMode)
     {
         return(_ruleForExpertMode.CanDrop(info));
     }
     return(_ruleForNormalMode.CanDrop(info));
 }
 public bool CanDrop(DropAttemptInfo info)
 {
     if (info.IsMasterMode)
     {
         return(_ruleForMasterMode.CanDrop(info));
     }
     return(_ruleForDefault.CanDrop(info));
 }
Exemplo n.º 3
0
        private ItemDropAttemptResult ResolveRule(IItemDropRule rule, DropAttemptInfo info)
        {
            if (!rule.CanDrop(info))
            {
                ItemDropAttemptResult itemDropAttemptResult = default(ItemDropAttemptResult);
                itemDropAttemptResult.State = ItemDropAttemptResultState.DoesntFillConditions;
                ItemDropAttemptResult itemDropAttemptResult2 = itemDropAttemptResult;
                ResolveRuleChains(rule, info, itemDropAttemptResult2);
                return(itemDropAttemptResult2);
            }
            ItemDropAttemptResult itemDropAttemptResult3 = (rule as INestedItemDropRule)?.TryDroppingItem(info, ResolveRule) ?? rule.TryDroppingItem(info);

            ResolveRuleChains(rule, info, itemDropAttemptResult3);
            return(itemDropAttemptResult3);
        }
Exemplo n.º 4
0
        private ItemDropAttemptResult ResolveRule(
            IItemDropRule rule,
            DropAttemptInfo info)
        {
            if (!rule.CanDrop(info))
            {
                ItemDropAttemptResult parentResult = new ItemDropAttemptResult()
                {
                    State = ItemDropAttemptResultState.DoesntFillConditions
                };
                this.ResolveRuleChains(rule, info, parentResult);
                return(parentResult);
            }
            ItemDropAttemptResult parentResult1 = !(rule is INestedItemDropRule nestedItemDropRule) ? rule.TryDroppingItem(info) : nestedItemDropRule.TryDroppingItem(info, new ItemDropRuleResolveAction(this.ResolveRule));

            this.ResolveRuleChains(rule, info, parentResult1);
            return(parentResult1);
        }
Exemplo n.º 5
0
 public bool CanDrop(DropAttemptInfo info)
 {
     return(FargoSoulsWorld.EternityMode ? ruleForEMode.CanDrop(info) : ruleForDefault.CanDrop(info));
 }