Anvil
Anvil.API.ItemAppearance Class Reference

Public Member Functions

NwItem ChangeAppearance (Action< ItemAppearance > changes)
 Creates a new item with the specified appearance changes.
The existing item is destroyed and replaced with the new item.
If the item was equipped, it is restored to the original equipment slot. More...
 
void ClearArmorPieceColor (CreaturePart modelSlot, ItemAppearanceArmorColor colorSlot)
 Clears any per-part color overrides set for the specified part slot. More...
 
void CopyTo (NwItem otherItem)
 Copies this item appearance to another item.

Parameters
otherItemThe item to copy this appearance to.
More...
 
void Deserialize (string serialized)
 Updates this item appearance using the value retrieved through Serialize. More...
 
byte GetArmorColor (ItemAppearanceArmorColor slot)
 Gets the armor color of this item. More...
 
ushort GetArmorModel (CreaturePart slot)
 Gets the armor model of this item. More...
 
byte GetArmorPieceColor (CreaturePart modelSlot, ItemAppearanceArmorColor colorSlot)
 Gets the armor color for a piece of this item. More...
 
ushort GetSimpleModel ()
 Gets the base model of this item. More...
 
byte GetWeaponColor (ItemAppearanceWeaponColor slot)
 Gets the weapon color of this item. More...
 
ushort GetWeaponModel (ItemAppearanceWeaponModel slot)
 Gets the weapon model of this item. More...
 
string Serialize ()
 Gets a string containing the entire appearance for this item. More...
 
void SetArmorColor (ItemAppearanceArmorColor slot, byte value)
 Sets the armor color of this item. More...
 
void SetArmorModel (CreaturePart slot, ushort value)
 Sets the armor model of this item. More...
 
void SetArmorPieceColor (CreaturePart modelSlot, ItemAppearanceArmorColor colorSlot, byte value)
 Sets the armor color for a piece of this item. More...
 
void SetSimpleModel (ushort value)
 Sets the base model of this item. More...
 
void SetWeaponColor (ItemAppearanceWeaponColor slot, byte value)
 Sets the weapon color of this item. More...
 
void SetWeaponModel (ItemAppearanceWeaponModel slot, ushort value)
 Sets the weapon model of this item. More...
 

Member Function Documentation

◆ ChangeAppearance()

NwItem Anvil.API.ItemAppearance.ChangeAppearance ( Action< ItemAppearance changes)
inline

Creates a new item with the specified appearance changes.
The existing item is destroyed and replaced with the new item.
If the item was equipped, it is restored to the original equipment slot.

Parameters
changesThe appearance changes to apply.
Returns
The new item with the updated appearance.

◆ ClearArmorPieceColor()

void Anvil.API.ItemAppearance.ClearArmorPieceColor ( CreaturePart  modelSlot,
ItemAppearanceArmorColor  colorSlot 
)
inline

Clears any per-part color overrides set for the specified part slot.

Parameters
modelSlotThe model portion of the slot to clear.
colorSlotThe color portion of the slot to clear.

◆ CopyTo()

void Anvil.API.ItemAppearance.CopyTo ( NwItem  otherItem)
inline

Copies this item appearance to another item.

Parameters
otherItemThe item to copy this appearance to.

◆ Deserialize()

void Anvil.API.ItemAppearance.Deserialize ( string  serialized)
inline

Updates this item appearance using the value retrieved through Serialize.

Parameters
serializedThe serialized item appearance.
Exceptions
ArgumentExceptionThrown if an invalid serialized string is specified.

◆ GetArmorColor()

byte Anvil.API.ItemAppearance.GetArmorColor ( ItemAppearanceArmorColor  slot)
inline

Gets the armor color of this item.

Parameters
slotThe armor color slot index to query.

◆ GetArmorModel()

ushort Anvil.API.ItemAppearance.GetArmorModel ( CreaturePart  slot)
inline

Gets the armor model of this item.

Parameters
slotThe armor model slot index to query.

◆ GetArmorPieceColor()

byte Anvil.API.ItemAppearance.GetArmorPieceColor ( CreaturePart  modelSlot,
ItemAppearanceArmorColor  colorSlot 
)
inline

Gets the armor color for a piece of this item.

Parameters
modelSlotThe model portion of the slot to query.
colorSlotThe color portion of the slot to query.

◆ GetSimpleModel()

ushort Anvil.API.ItemAppearance.GetSimpleModel ( )
inline

Gets the base model of this item.

◆ GetWeaponColor()

byte Anvil.API.ItemAppearance.GetWeaponColor ( ItemAppearanceWeaponColor  slot)
inline

Gets the weapon color of this item.

Parameters
slotThe weapon color index to query.

◆ GetWeaponModel()

ushort Anvil.API.ItemAppearance.GetWeaponModel ( ItemAppearanceWeaponModel  slot)
inline

Gets the weapon model of this item.

Parameters
slotThe weapon model index to query.

◆ Serialize()

string Anvil.API.ItemAppearance.Serialize ( )
inline

Gets a string containing the entire appearance for this item.

Returns
A string representing the item's appearance.

◆ SetArmorColor()

void Anvil.API.ItemAppearance.SetArmorColor ( ItemAppearanceArmorColor  slot,
byte  value 
)
inline

Sets the armor color of this item.

Parameters
slotThe armor color slot index to be assigned.
valueThe new color to assign.

◆ SetArmorModel()

void Anvil.API.ItemAppearance.SetArmorModel ( CreaturePart  slot,
ushort  value 
)
inline

Sets the armor model of this item.

Parameters
slotThe armor model slot index to be assigned.
valueThe new model to assign.

◆ SetArmorPieceColor()

void Anvil.API.ItemAppearance.SetArmorPieceColor ( CreaturePart  modelSlot,
ItemAppearanceArmorColor  colorSlot,
byte  value 
)
inline

Sets the armor color for a piece of this item.

Parameters
modelSlotThe model portion of the slot to assign.
colorSlotThe color portion of the slot to assign.
valueThe new color to assign.

◆ SetSimpleModel()

void Anvil.API.ItemAppearance.SetSimpleModel ( ushort  value)
inline

Sets the base model of this item.

◆ SetWeaponColor()

void Anvil.API.ItemAppearance.SetWeaponColor ( ItemAppearanceWeaponColor  slot,
byte  value 
)
inline

Sets the weapon color of this item.

Parameters
slotThe weapon color index to be assigned.
valueThe new color to assign.

◆ SetWeaponModel()

void Anvil.API.ItemAppearance.SetWeaponModel ( ItemAppearanceWeaponModel  slot,
ushort  value 
)
inline

Sets the weapon model of this item.

Parameters
slotThe weapon model index to be assigned.
valueThe new model to assign.

The documentation for this class was generated from the following file: