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:
- X2_IP_ARMORTYPE_NEXT returns the next appearance type
- X2_IP_ARMORTYPE_PREV returns the previous appearance type
- X2_IP_ARMORTYPE_RANDOM returns a random appearance type
The value of nArmorModel determines the armor model, for which an appearance type is returned. nArmorModel can take on any of the following values:
- ITEM_APPR_ARMOR_MODEL_RFOOT
- ITEM_APPR_ARMOR_MODEL_LFOOT
- ITEM_APPR_ARMOR_MODEL_RSHIN
- ITEM_APPR_ARMOR_MODEL_LSHIN
- ITEM_APPR_ARMOR_MODEL_LTHIGH
- ITEM_APPR_ARMOR_MODEL_RTHIGH
- ITEM_APPR_ARMOR_MODEL_PELVIS
- ITEM_APPR_ARMOR_MODEL_TORSO
- ITEM_APPR_ARMOR_MODEL_BELT
- ITEM_APPR_ARMOR_MODEL_NECK
- ITEM_APPR_ARMOR_MODEL_RFOREARM
- ITEM_APPR_ARMOR_MODEL_LFOREARM
- ITEM_APPR_ARMOR_MODEL_RBICEP
- ITEM_APPR_ARMOR_MODEL_LBICEP
- ITEM_APPR_ARMOR_MODEL_RSHOULDER
- ITEM_APPR_ARMOR_MODEL_LSHOULDER
- ITEM_APPR_ARMOR_MODEL_RHAND
- ITEM_APPR_ARMOR_MODEL_LHAND
- ITEM_APPR_ARMOR_MODEL_ROBE
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
author: motu99, editor: Mistress