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

Extension class to be used with Item objects
Afficher le fichier Open project: zetoken/D3-API-by-ZTn

Méthodes publiques

Méthode Description
CheckAndUpdateWeaponDelta ( this item ) : Item

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

GetActivatedSetBonus ( this items ) : ZTn.BNet.D3.Items.ItemAttributes

Computes the ItemAttributes brought by the set bonuses.

GetActivatedSets ( this items ) : List

Computes the list of Set actually worn.

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

Computes armor brought by the item

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

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

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

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

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

Computes weapon only damages

GetRawBonusDamageMax ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
GetRawBonusDamageMin ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
GetRawWeaponAttackPerSecond ( this item ) : ZTn.BNet.D3.Items.ItemValueRange

Computes weapon attack speed (attack per second).

GetRawWeaponDamageMax ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
GetRawWeaponDamageMin ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
GetRawWeaponDps ( this item ) : ZTn.BNet.D3.Items.ItemValueRange

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

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

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

GetWeaponAttackPerSecond ( this item, ZTn.BNet.D3.Items.ItemValueRange increaseFromOtherItems ) : ZTn.BNet.D3.Items.ItemValueRange
IsAncient ( this item ) : bool

Informs if the item is ancient based on its attributes.

IsItemTypeHelm ( this item ) : System.Boolean
IsItemTypeOther ( this item ) : System.Boolean
IsItemTypeWeapon ( this item ) : System.Boolean
IsJewel ( this item ) : bool

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

IsWeapon ( this item ) : bool

Informs if the item is a weapon based on its characteristics

MergeSocketedGems ( this item ) : Item

Merge socketed gems in the item.

SetAttributeByName ( this item, String fieldName, ZTn.BNet.D3.Items.ItemValueRange value ) : Item

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

Simplify ( this item ) : Item

Simplifies the item by aggregating some raw attributes (for easier editing for example).

UpdateStats ( this item ) : Item

Updates some general item stats based on its attributesRaw.

Method Details

CheckAndUpdateWeaponDelta() public static méthode

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 item ) : Item
item this
Résultat Item

GetActivatedSetBonus() public static méthode

Computes the ItemAttributes brought by the set bonuses.
public static GetActivatedSetBonus ( this items ) : ZTn.BNet.D3.Items.ItemAttributes
items this
Résultat ZTn.BNet.D3.Items.ItemAttributes

GetActivatedSets() public static méthode

Computes the list of Set actually worn.
public static GetActivatedSets ( this items ) : List
items this
Résultat List

GetArmor() public static méthode

Computes armor brought by the item
public static GetArmor ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetAttributeByName() public static méthode

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

GetRawAverageBonusDamage() public static méthode

Computes damages other than weapon damages (on rings, amulets, ...)
public static GetRawAverageBonusDamage ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetRawAverageWeaponDamage() public static méthode

Computes weapon only damages
public static GetRawAverageWeaponDamage ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetRawBonusDamageMax() public static méthode

public static GetRawBonusDamageMax ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetRawBonusDamageMin() public static méthode

public static GetRawBonusDamageMin ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponAttackPerSecond() public static méthode

Computes weapon attack speed (attack per second).
public static GetRawWeaponAttackPerSecond ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDamageMax() public static méthode

public static GetRawWeaponDamageMax ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDamageMin() public static méthode

public static GetRawWeaponDamageMin ( this item ) : ZTn.BNet.D3.Items.ItemValueRange
item this
Résultat ZTn.BNet.D3.Items.ItemValueRange

GetRawWeaponDps() public static méthode

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

GetResistance() public static méthode

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

GetWeaponAttackPerSecond() public static méthode

public static GetWeaponAttackPerSecond ( this item, ZTn.BNet.D3.Items.ItemValueRange increaseFromOtherItems ) : ZTn.BNet.D3.Items.ItemValueRange
item this
increaseFromOtherItems ZTn.BNet.D3.Items.ItemValueRange
Résultat ZTn.BNet.D3.Items.ItemValueRange

IsAncient() public static méthode

Informs if the item is ancient based on its attributes.
public static IsAncient ( this item ) : bool
item this
Résultat bool

IsItemTypeHelm() public static méthode

public static IsItemTypeHelm ( this item ) : System.Boolean
item this
Résultat System.Boolean

IsItemTypeOther() public static méthode

public static IsItemTypeOther ( this item ) : System.Boolean
item this
Résultat System.Boolean

IsItemTypeWeapon() public static méthode

public static IsItemTypeWeapon ( this item ) : System.Boolean
item this
Résultat System.Boolean

IsJewel() public static méthode

Informs if the item is a legendary jewel based on its attributes.
public static IsJewel ( this item ) : bool
item this
Résultat bool

IsWeapon() public static méthode

Informs if the item is a weapon based on its characteristics
public static IsWeapon ( this item ) : bool
item this
Résultat bool

MergeSocketedGems() public static méthode

Merge socketed gems in the item.
public static MergeSocketedGems ( this item ) : Item
item this
Résultat Item

SetAttributeByName() public static méthode

Sets the value of an attribute of an item given the attribute's name
public static SetAttributeByName ( this item, String fieldName, ZTn.BNet.D3.Items.ItemValueRange value ) : Item
item this Source item
fieldName String Name of the attribute to retrieve
value ZTn.BNet.D3.Items.ItemValueRange Value to set
Résultat Item

Simplify() public static méthode

Simplifies the item by aggregating some raw attributes (for easier editing for example).
public static Simplify ( this item ) : Item
item this
Résultat Item

UpdateStats() public static méthode

Updates some general item stats based on its attributesRaw.
public static UpdateStats ( this item ) : Item
item this
Résultat Item