Difference between revisions of "IPGetModifiedWeapon"
|Line 60:||Line 60:|
Latest revision as of 03:05, 25 December 2017
IPGetModifiedWeapon(object, int, int, int)
Returns a copy of a weapon with the appearance of one weapon part modified.
Weapon acting as blueprint for a single modification.
ITEM_APPR_WEAPON_MODEL_* Weapon part for which the appearance type is modified.
X2_IP_WEAPONTYPE_* Defines how the new appearance type of the weapon part is to be determined.
Destroys the blueprint object on successful modification.
This function determines the current appearance for a specified weapon part (nPart) of oWeapon and creates a copy of oWeapon with a modified appearance for the specified weapon part.
If the modified copy is created successfully, the modified copy is returned. Otherwise the original blueprint (oWeapon) is returned.
If bDestroyOldOnSuccess is TRUE, the original weapon blueprint (oWeapon) will be destroyed on success.
The value of nPart determines the weapon part number, for which the appearance will be modified. nPart can take on any of the following values:
Depending on the value of nMode, the new appearance of the specified weapon part will be set to either the next / previous appearance type of the weapon part (relative to its current appearance) or to a random appearance, drawn from the full list of appearance types for the specified weapon part.
nMode can be any of the following:
- X2_IP_WEAPONTYPE_NEXT returns the next appearance type
- X2_IP_WEAPONTYPE_PREV returns the previous appearance type
- X2_IP_WEAPONTYPE_RANDOM returns a random appearance type
This function eventually calls #include index for more details.
#include " x2_inc_itemprop "
author: motu99, editor: Mistress