IPGetModifiedArmor(object, int, int, int)

Copies and modifies an armor and returns it as an object.

void IPGetModifiedArmor(
    object oArmor,
    int nPart,
    int nMode,
    int bDestroyOldOnSuccess
);

Parameters

oArmor

Armor to modify.

nPart

ITEM_APPR_ARMOR_MODEL_*

nMode

X2_IP_ARMORTYPE_*

bDestroyOldOnSuccess

TRUE to destroy original armor on success, FALSE to not do so.


Description

Returns a new armor based of oArmor with nPartModified

nPart - ITEM_APPR_ARMOR_MODEL_* constant of the part to be changed

nMode -
X2_IP_ARMORTYPE_NEXT - next valid appearance
X2_IP_ARMORTYPE_PREV - previous valid apperance;
X2_IP_ARMORTYPE_RANDOM - random valid appearance (torso is never changed);

bDestroyOldOnSuccess - Destroy oArmor in process?

Uses Get2DAstring, so do not use in loops



Requirements

#include "x2_inc_itemprop"

Version

1.61

See Also

categories: Item Creation Functions | Item Properties Functions
constants: ITEM_APPR_* Constants | X2_IP_ARMORTYPE_* Constants


 author: Lilac Soul