/// <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; } }
/// <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); }