示例#1
0
文件: Mob.cs 项目: dmbyer/Hedron
        /// <summary>
        /// Copies this item's properties to another item.
        /// </summary>
        /// <param name="mob">The item to copy to.</param>
        /// <remarks>Doesn't copy IDs or cache type.</remarks>
        public void CopyTo(Mob mob)
        {
            if (mob == null)
            {
                return;
            }

            base.CopyTo(mob);
            Behavior.CopyTo(mob.Behavior);
            mob.Level = Level;
        }
示例#2
0
        /// <summary>
        /// Copies this item's properties to another item.
        /// </summary>
        /// <param name="item">The item to copy to.</param>
        /// <remarks>Doesn't copy IDs or cache type.</remarks>
        public virtual void CopyTo(EntityInanimate item)
        {
            if (item == null)
            {
                return;
            }

            base.CopyTo(item);

            Behavior.CopyTo(item.Behavior);
            item.Rarity = Rarity;
            Material.CopyTo(item.Material);
            item.Slot = Slot;
            Value.CopyTo(item.Value);
        }