# Weapon Damage

Grammarmaximum|Minimize/Maximize damage of unit weapon index vs attribute.
FlagsNative | Function

# Arguments

Returns — fixed

native fixed UnitWeaponDamage(
	unit inUnit,
	int inIndex,
	int inAttribute,
	bool inMaximum,
);

Category: Unit / Weapons

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:2539

    for ( ; ( (auto91D56C1A_ai >= 0 && lv_itWeapon <= auto91D56C1A_ae) || (auto91D56C1A_ai < 0 && lv_itWeapon >= auto91D56C1A_ae) ) ; lv_itWeapon += auto91D56C1A_ai ) {
        if ((UnitWeaponGet(lp_unit, lv_itWeapon) != null) && (UnitWeaponIsEnabled(lp_unit, lv_itWeapon) == true)) {
            return UnitWeaponDamage(lp_unit, lv_itWeapon, c_unitAttributeNone, false);
        }