IPDyeArmor(object, int, action)

Changes the color of an armor.

object IPDyeArmor(
    object oItem,
    int nColorType,
    action nColor
);

Parameters

oItem

Armor to dye.

nColorType

ITEM_APPR_ARMOR_COLOR_*

nColor

Color from 0 to 63


Description

Changes the color of an item armor

oItem - The armor
nColorType - ITEM_APPR_ARMOR_COLOR_* constant
nColor - color from 0 to 63

Since oItem is destroyed in the process, the function returns the item created with the color changed



Remarks

Simply a wrapper function that calls CopyItemAndModify and destroys the original oItem.


Known Bugs

Not really a bug, but: No checks are made to see if the copied item is valid. Thus, it will delete the original oItem even if the function fails, for instance if you feed it something other than an armor for oItem (like a weapon or a placeable).


Requirements

#include "x2_inc_itemprop"

Version

1.61

See Also

functions: CopyItemAndModify
categories: Item Creation Functions | Item Properties Functions
constants: ITEM_APPR_* Constants


 author: Lilac Soul