IPGetArmorAppearanceType(object, int, int)

Returns an armor appearance type for the specified armor model.

int IPGetArmorAppearanceType(
    object oArmor,
    int nArmorModel,
    int nMode
);

Parameters

oArmor

The object being examined.

nArmorModel

ITEM_APPR_ARMOR_MODEL_* Armor model for which an appearance type is to be returned.

nMode

X2_IP_ARMORTYPE_* Whether next, previous or a random appearance type is returned.


Description

This function determines the current appearance type for a specified armor model (nArmorModel) of oArmor and returns either the next / previous appearance type (relative to the current appearance type), or a random valid appearance type, drawn from the full list of appearance types for the specified armor model.

The value of the parameter nMode determines whether the next, previous, or a random appearance type is returned.

nMode can be any of the following:

The value of nArmorModel determines the armor model, for which an appearance type is returned. nArmorModel can take on any of the following values:


Remarks

Note that every armor model (-> nArmorModel) can have one to several appearance types.

This function selects one appearance type from the list of possible appearance types for the specified armor model.

The number of appearance types for a given model can be determined by the function IPGetNumberOfArmorAppearances.

Uses Get2DAstring, so might be slow if the relevant 2da file is not cached.

This is an internal function. See the note near the top of #include index for more details.


Requirements

#include "x2_inc_itemprop"


Version

1.61

See Also

functions:  GetItemAppearance | IPGetModifiedArmor | IPGetNumberOfArmorAppearances | IPGetNextArmorAppearanceType | IPGetPrevArmorAppearanceType | IPGetRandomArmorAppearanceType | IPGetWeaponAppearanceType
constants:  ITEM_APPR_* | X2_IP_ARMORTYPE_*
categories:  Item Creation Functions | Item Properties Functions


author: motu99, editor: Mistress