IPGetWeaponEnhancementBonus(object, int)

Returns a weapon's enhancement bonus.

int IPGetWeaponEnhancementBonus(
    object oWeapon,
    int nEnhancementBonusType = ITEM_PROPERTY_ENHANCEMENT_BONUS
);

Parameters

oWeapon

Weapon to get enhancement bonus from.

nEnhancementBonusType

See remarks. (Default: ITEM_PROPERTY_ENHANCEMENT_BONUS)


Description

Returns the current enhancement bonus of a weapon (+1 to +20), 0 if there is no enhancement bonus. You can test for a specific type of enhancement bonus by passing the appropritate ITEM_PROPERTY_ENHANCEMENT_BONUS_* constant into nEnhancementBonusType



Remarks

The following values are valid for nEnhancementBonusType:

ITEM_PROPERTY_ENHANCEMENT_BONUS
ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP
ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP
ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_SPECIFIC_ALIGNEMENT


Requirements

#include "x2_inc_itemprop"

Version

1.61

See Also

categories: Get Data from Object Functions | Item Creation Functions | Item Properties Functions
constants: ITEM_PROPERTY_* Constants


 author: Lilac Soul