Пример #1
0
        /// <summary>
        /// Copies this item appearance to another item.
        /// <param name="otherItem">The item to copy this appearance to.</param>
        /// </summary>
        public void CopyTo(NwItem otherItem)
        {
            ItemAppearance otherAppearance = otherItem.Appearance;

            for (int idx = 0; idx < 6; idx++)
            {
                otherAppearance.item.Item.m_nLayeredTextureColors[idx] = item.Item.m_nLayeredTextureColors[idx];
            }

            for (int idx = 0; idx < 3; idx++)
            {
                otherAppearance.item.Item.m_nModelPart[idx] = item.Item.m_nModelPart[idx];
            }

            for (int idx = 0; idx < 19; idx++)
            {
                otherAppearance.item.Item.m_nArmorModelPart[idx] = item.Item.m_nArmorModelPart[idx];
            }

            for (byte texture = 0; texture < 6; texture++)
            {
                for (byte part = 0; part < 19; part++)
                {
                    otherAppearance.item.Item.SetLayeredTextureColorPerPart(texture, part, item.Item.GetLayeredTextureColorPerPart(texture, part));
                }
            }
        }
Пример #2
0
 internal ItemAppearance(NwItem item)
 {
     this.item = item;
 }
Пример #3
0
 /// <summary>
 /// Gets if the specified item will fit in this inventory.
 /// </summary>
 /// <param name="item">The item to check.</param>
 /// <returns>True if the item will fit, otherwise false.</returns>
 public bool CheckFit(NwItem item)
 {
     return(CheckFit(item.BaseItem));
 }