Example #1
0
        /// <summary>
        /// Sets the weapon model of this item.
        /// </summary>
        /// <param name="slot">The weapon model index to be assigned.</param>
        /// <param name="value">The new model to assign.</param>
        public void SetWeaponModel(ItemAppearanceWeaponModel slot, byte value)
        {
            int index = (int)slot;

            if (index >= 0 && index <= 2)
            {
                item.Item.m_nModelPart[index] = value;
            }
        }
Example #2
0
        /// <summary>
        /// Gets the weapon model of this item.
        /// </summary>
        /// <param name="slot">The weapon model index to query.</param>
        public byte GetWeaponModel(ItemAppearanceWeaponModel slot)
        {
            int index = (int)slot;

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

            return(0);
        }