Ejemplo n.º 1
0
 public override ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info)
 {
     if (info.rng.Next(this._dropsOutOfY) < this._dropsXoutOfY)
     {
         CommonCode.DropItemLocalPerClientAndSetNPCMoneyTo0(info.npc, this._itemId, info.rng.Next(this._amtDroppedMinimum, this._amtDroppedMaximum + 1), true);
         return(new ItemDropAttemptResult()
         {
             State = ItemDropAttemptResultState.Success
         });
     }
     return(new ItemDropAttemptResult()
     {
         State = ItemDropAttemptResultState.FailedRandomRoll
     });
 }
        public override ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info)
        {
            ItemDropAttemptResult result;

            if (info.rng.Next(_dropsOutOfY) < _dropsXoutOfY)
            {
                CommonCode.DropItemLocalPerClientAndSetNPCMoneyTo0(info.npc, _itemId, info.rng.Next(_amtDroppedMinimum, _amtDroppedMaximum + 1));
                result       = default(ItemDropAttemptResult);
                result.State = ItemDropAttemptResultState.Success;
                return(result);
            }
            result       = default(ItemDropAttemptResult);
            result.State = ItemDropAttemptResultState.FailedRandomRoll;
            return(result);
        }