public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
 {
     if (info.IsExpertMode)
     {
         return(resolveAction(_ruleForExpertMode, info));
     }
     return(resolveAction(_ruleForNormalMode, info));
 }
 public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
 {
     if (info.IsMasterMode)
     {
         return(resolveAction(_ruleForMasterMode, info));
     }
     return(resolveAction(_ruleForDefault, info));
 }
        public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
        {
            int num = -1;
            ItemDropAttemptResult result;

            if (info.rng.Next(_outOfY) == 0)
            {
                num = info.rng.Next(_options.Length);
                resolveAction(_options[num], info);
                result       = default(ItemDropAttemptResult);
                result.State = ItemDropAttemptResultState.Success;
                return(result);
            }
            result       = default(ItemDropAttemptResult);
            result.State = ItemDropAttemptResultState.FailedRandomRoll;
            return(result);
        }
Exemplo n.º 4
0
 public ItemDropAttemptResult TryDroppingItem(
     DropAttemptInfo info,
     ItemDropRuleResolveAction resolveAction)
 {
     if (info.rng.Next(this._outOfY) == 0)
     {
         int index = info.rng.Next(this._options.Length);
         ItemDropAttemptResult dropAttemptResult = resolveAction(this._options[index], info);
         return(new ItemDropAttemptResult()
         {
             State = ItemDropAttemptResultState.Success
         });
     }
     return(new ItemDropAttemptResult()
     {
         State = ItemDropAttemptResultState.FailedRandomRoll
     });
 }
Exemplo n.º 5
0
 public ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info, ItemDropRuleResolveAction resolveAction)
 {
     return(FargoSoulsWorld.EternityMode ? resolveAction(ruleForEMode, info) : resolveAction(ruleForDefault, info));
 }