コード例 #1
0
ファイル: ItemAppearance.cs プロジェクト: nwn-dotnet/Anvil
        /// <summary>
        /// Sets the weapon color of this item.
        /// </summary>
        /// <param name="slot">The weapon color index to be assigned.</param>
        /// <param name="value">The new color to assign.</param>
        public void SetWeaponColor(ItemAppearanceWeaponColor slot, byte value)
        {
            int index = (int)slot;

            if (index >= 0 && index <= 5)
            {
                item.Item.m_nLayeredTextureColors[index] = value;
            }
        }
コード例 #2
0
ファイル: ItemAppearance.cs プロジェクト: nwn-dotnet/Anvil
        /// <summary>
        /// Gets the weapon color of this item.
        /// </summary>
        /// <param name="slot">The weapon color index to query.</param>
        public byte GetWeaponColor(ItemAppearanceWeaponColor slot)
        {
            int index = (int)slot;

            if (index >= 0 && index <= 5)
            {
                return(item.Item.m_nLayeredTextureColors[index]);
            }

            return(0);
        }