C# Class ZTn.BNet.D3.Calculator.Helpers.ItemAttributesExtension

Extension class to be used with ItemAttributes objects
Show file Open project: zetoken/D3-API-by-ZTn

Public Methods

Method Description
CheckAndUpdateWeaponDelta ( this itemAttr ) : ZTn.BNet.D3.Items.ItemAttributes

Check a specific case of "invalid" weapon damage values: If bonus min > delta, then delta should be replaced by bonus min + 1

CheckAndUpdateWeaponDelta ( this itemAttr, String resist ) : ZTn.BNet.D3.Items.ItemAttributes

Check a specific case of "invalid" Weapon damage values (based on a specific resist): If bonus min > delta, then delta should be replaced by bonus min + 1

GetArmor ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes armor brought by an item.

GetAttributeByName ( this itemAttributes, String fieldName ) : ZTn.BNet.D3.Items.ItemValueRange

Returns the value of an attribute of an item given the attribute's name

GetBaseWeaponDamageMax ( this weaponAttr, String resist ) : ZTn.BNet.D3.Items.ItemValueRange

Computes max damage of the weapon without taking account of "+% weapon damage".

GetBaseWeaponDamageMin ( this itemAttr, String resist ) : ZTn.BNet.D3.Items.ItemValueRange

Computes min damage of the weapon without taking account of "+% weapon damage".

GetRawAverageBonusDamage ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes damages other than weapon damages (on rings, amulets, ...).

GetRawAverageWeaponDamage ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes weapon only damages

GetRawBonusDamageMax ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes max damage of the item.

GetRawBonusDamageMax ( this itemAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange

Computes max damage of the item (based on a specific resist).

GetRawBonusDamageMin ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes min damage of the item.

GetRawBonusDamageMin ( this itemAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange

Computes min damage of the item (based on a specific resist).

GetRawWeaponAttackPerSecond ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes weapon attack speed (attack per second).

GetRawWeaponDamageMax ( this weaponAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes max damage of the weapon.

GetRawWeaponDamageMax ( this weaponAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange

Computes max damage of the weapon (based on a specific resist).

GetRawWeaponDamageMin ( this weaponAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes min damage of the weapon.

GetRawWeaponDamageMin ( this weaponAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange

Computes min damage of the weapon (based on a specific resist).

GetRawWeaponDps ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange

Computes raw weapon dps ie before all multipliers ( = average damage * attack per second )

GetResistance ( this itemAttr, String resist ) : ZTn.BNet.D3.Items.ItemValueRange

Returns the resistance value given by the gems for the given resist

GetSimplified ( this itemAttr ) : ZTn.BNet.D3.Items.ItemAttributes

Returns a new ItemAttributes by aggregating some raw attributes of itemAttr (for easier editing for example).

GetWeaponAttackPerSecond ( this weaponAttr, ZTn.BNet.D3.Items.ItemValueRange increaseFromOtherItems ) : ZTn.BNet.D3.Items.ItemValueRange

Computes weapon attack speed.

IsAncient ( this itemAttr ) : bool

Informs if the item is ancient based on its attributes.

IsJewel ( this itemAttr ) : bool

Informs if the item is a legendary jewel based on its attributes.

IsWeapon ( this itemAttr ) : bool

Informs if the item is a weapon based on its attributes

SetAttributeByName ( this itemAttributes, string fieldName, ZTn.BNet.D3.Items.ItemValueRange value ) : ZTn.BNet.D3.Items.ItemAttributes

Sets the value of an attribute of an ItemAttributes given the attribute's name

Method Details

CheckAndUpdateWeaponDelta() public static method

Check a specific case of "invalid" weapon damage values: If bonus min > delta, then delta should be replaced by bonus min + 1
public static CheckAndUpdateWeaponDelta ( this itemAttr ) : ZTn.BNet.D3.Items.ItemAttributes
itemAttr this
return ZTn.BNet.D3.Items.ItemAttributes

CheckAndUpdateWeaponDelta() public static method

Check a specific case of "invalid" Weapon damage values (based on a specific resist): If bonus min > delta, then delta should be replaced by bonus min + 1
public static CheckAndUpdateWeaponDelta ( this itemAttr, String resist ) : ZTn.BNet.D3.Items.ItemAttributes
itemAttr this
resist String
return ZTn.BNet.D3.Items.ItemAttributes

GetArmor() public static method

Computes armor brought by an item.
public static GetArmor ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this Attributes of an item.
return ZTn.BNet.D3.Items.ItemValueRange

GetAttributeByName() public static method

Returns the value of an attribute of an item given the attribute's name
public static GetAttributeByName ( this itemAttributes, String fieldName ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttributes this Source attributes
fieldName String Name of the attribute to retrieve
return ZTn.BNet.D3.Items.ItemValueRange

GetBaseWeaponDamageMax() public static method

Computes max damage of the weapon without taking account of "+% weapon damage".
public static GetBaseWeaponDamageMax ( this weaponAttr, String resist ) : ZTn.BNet.D3.Items.ItemValueRange
weaponAttr this Attributes of a weapon.
resist String
return ZTn.BNet.D3.Items.ItemValueRange

GetBaseWeaponDamageMin() public static method

Computes min damage of the weapon without taking account of "+% weapon damage".
public static GetBaseWeaponDamageMin ( this itemAttr, String resist ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this Attributes of a weapon.
resist String
return ZTn.BNet.D3.Items.ItemValueRange

GetRawAverageBonusDamage() public static method

Computes damages other than weapon damages (on rings, amulets, ...).
public static GetRawAverageBonusDamage ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this Attributes of an item.
return ZTn.BNet.D3.Items.ItemValueRange

GetRawAverageWeaponDamage() public static method

Computes weapon only damages
public static GetRawAverageWeaponDamage ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this
return ZTn.BNet.D3.Items.ItemValueRange

GetRawBonusDamageMax() public static method

Computes max damage of the item.
public static GetRawBonusDamageMax ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this Attributes of an item.
return ZTn.BNet.D3.Items.ItemValueRange

GetRawBonusDamageMax() public static method

Computes max damage of the item (based on a specific resist).
public static GetRawBonusDamageMax ( this itemAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this Attributes of an item.
resist String Name of the resist.
useDamageTypePercentBonus bool
return ZTn.BNet.D3.Items.ItemValueRange

GetRawBonusDamageMin() public static method

Computes min damage of the item.
public static GetRawBonusDamageMin ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this Attributes of an item.
return ZTn.BNet.D3.Items.ItemValueRange

GetRawBonusDamageMin() public static method

Computes min damage of the item (based on a specific resist).
public static GetRawBonusDamageMin ( this itemAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this Attributes of an item.
resist String Name of the resist.
useDamageTypePercentBonus bool
return ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponAttackPerSecond() public static method

Computes weapon attack speed (attack per second).
public static GetRawWeaponAttackPerSecond ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this
return ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDamageMax() public static method

Computes max damage of the weapon.
public static GetRawWeaponDamageMax ( this weaponAttr ) : ZTn.BNet.D3.Items.ItemValueRange
weaponAttr this Attributes of a weapon.
return ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDamageMax() public static method

Computes max damage of the weapon (based on a specific resist).
public static GetRawWeaponDamageMax ( this weaponAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange
weaponAttr this Attributes of a weapon.
resist String Name of the resist.
useDamageTypePercentBonus bool
return ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDamageMin() public static method

Computes min damage of the weapon.
public static GetRawWeaponDamageMin ( this weaponAttr ) : ZTn.BNet.D3.Items.ItemValueRange
weaponAttr this Attributes of a weapon.
return ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDamageMin() public static method

Computes min damage of the weapon (based on a specific resist).
public static GetRawWeaponDamageMin ( this weaponAttr, String resist, bool useDamageTypePercentBonus = true ) : ZTn.BNet.D3.Items.ItemValueRange
weaponAttr this Attributes of a weapon.
resist String Name of the resist.
useDamageTypePercentBonus bool
return ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDps() public static method

Computes raw weapon dps ie before all multipliers ( = average damage * attack per second )
public static GetRawWeaponDps ( this itemAttr ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this
return ZTn.BNet.D3.Items.ItemValueRange

GetResistance() public static method

Returns the resistance value given by the gems for the given resist
public static GetResistance ( this itemAttr, String resist ) : ZTn.BNet.D3.Items.ItemValueRange
itemAttr this
resist String
return ZTn.BNet.D3.Items.ItemValueRange

GetSimplified() public static method

Returns a new ItemAttributes by aggregating some raw attributes of itemAttr (for easier editing for example).
public static GetSimplified ( this itemAttr ) : ZTn.BNet.D3.Items.ItemAttributes
itemAttr this
return ZTn.BNet.D3.Items.ItemAttributes

GetWeaponAttackPerSecond() public static method

Computes weapon attack speed.
public static GetWeaponAttackPerSecond ( this weaponAttr, ZTn.BNet.D3.Items.ItemValueRange increaseFromOtherItems ) : ZTn.BNet.D3.Items.ItemValueRange
weaponAttr this Attributes of used weapon.
increaseFromOtherItems ZTn.BNet.D3.Items.ItemValueRange Increase Attack Speed from items other than the weapon.
return ZTn.BNet.D3.Items.ItemValueRange

IsAncient() public static method

Informs if the item is ancient based on its attributes.
public static IsAncient ( this itemAttr ) : bool
itemAttr this Attributes of the item.
return bool

IsJewel() public static method

Informs if the item is a legendary jewel based on its attributes.
public static IsJewel ( this itemAttr ) : bool
itemAttr this Attributes of the item.
return bool

IsWeapon() public static method

Informs if the item is a weapon based on its attributes
public static IsWeapon ( this itemAttr ) : bool
itemAttr this Attributes of the item.
return bool

SetAttributeByName() public static method

Sets the value of an attribute of an ItemAttributes given the attribute's name
public static SetAttributeByName ( this itemAttributes, string fieldName, ZTn.BNet.D3.Items.ItemValueRange value ) : ZTn.BNet.D3.Items.ItemAttributes
itemAttributes this Source attributes
fieldName string Name of the attribute to retrieve
value ZTn.BNet.D3.Items.ItemValueRange Value to set
return ZTn.BNet.D3.Items.ItemAttributes