Example #1
0
 /// <summary>
 /// Make this Item into a copy of the parameter Item
 /// </summary>
 /// <param name="desiredResult"></param>
 public void CopyItem(HealingPotion desiredResult)
 {
     this.ItemId            = desiredResult.ItemId;
     this.Name              = desiredResult.Name;
     this.Description       = desiredResult.Description;
     this.Value             = desiredResult.Value;
     this.IsSellable        = desiredResult.IsSellable;
     this.IsEquiped         = desiredResult.IsEquiped;
     this.PortionsRemaining = desiredResult.PortionsRemaining;
     this.ItemType          = desiredResult.ItemType;
 }
Example #2
0
        /// <summary>
        /// Return a new copy of this Item
        /// </summary>
        /// <returns></returns>
        public override Item CloneItem()
        {
            var output = new HealingPotion();

            output.ItemId            = this.ItemId;
            output.Name              = this.Name;
            output.PortionsRemaining = this.PortionsRemaining;
            output.IsEquiped         = this.IsEquiped;
            output.Description       = this.Description;
            output.Value             = this.Value;
            output.ItemType          = this.ItemType;
            output.IsSellable        = this.IsSellable;
            return(output);
        }