Kshabazz\BattleNet\D3\Hero¶
- class Hero¶
Class Hero
- __construct($pJson)¶
Constructor
Parameters: - $pJson (string) –
- arcaneResist()¶
Get arcane resist.
Returns: int
- armor()¶
Get armor stat.
Returns: int
- attackSpeed()¶
Get attack speed.
Returns: float
- characterClass()¶
Character class
Returns: string (barbarian|crusader|demon-hunter|monk|witch-doctor|wizard)
- coldResist()¶
Get cold resist.
Returns: int
- criticalHitChance()¶
Returns: float
- criticalHitDamage()¶
Returns: float
- dexterity()¶
Get dexterity.
Returns: int
- eliteKills()¶
Get number of elites killed.
Returns: int
- fireResist()¶
Get fire resist.
Returns: int
- gender()¶
Get gender.
Returns: int 0 for male, 1 for woman.
- get($pProperty, $pType = 'string')¶
Get data from the hero JSON data retrieved from Battle.net API.
Parameters: - $pProperty (string) –
- $pType (string) –
Returns: mixed
- highestProgression()¶
Get the highest level completed.
Returns: string
- id()¶
Returns: int
- intelligence()¶
Get intelligence.
Returns: int
- isDead()¶
Indicates whether the Hero has fallen.
Returns: bool
- isDualWielding(Http $pHttp)¶
Determine if a hero is brandishing a weapon in each hand.
Parameters: - $pHttp (Http) –
Returns: bool
- isHardCore()¶
Get hardcore flag.
Returns: bool
- isSeasonal()¶
Get seasonal flag.
Returns: bool
- items()¶
Get items.
Returns: array
- itemsHashesBySlot()¶
Get a list of hashes for each item the hero has equipped.
Returns: array|null Null when the hero has no items equipped.
- json()¶
Get JSON.
Returns: string JSON passed into constructor.
- lastUpdated()¶
Get when last updated.
Returns: string
- level()¶
Get level.
Returns: int
- lightningResist()¶
Get lightning resistance.
Returns: int
- name()¶
Get name.
Returns: string
- paragonLevel()¶
Get paragon level.
Returns: int
- physicalResist()¶
Get physical resistance.
Returns: int
- poisonResist()¶
Get poison resistance.
Returns: int
- preCalculatedStats()¶
Get character stats calculated by Battle.Net.
Returns: array
- primaryAttribute()¶
Get primary attribute.
Returns: string
- progression()¶
Get hero act progress.
Returns: array
- punchDamage()¶
Get damage you can do with a single punch.
Returns: float
- skills()¶
Get character skills.
Returns: array
- primaryAttributeBonus()¶
Get primary stat bonus (bonuses from items not included).
Returns: int
- strength()¶
Get strength.
Returns: int
- vitality()¶
Get vitality.
Returns: int
- baseAttributeLevelBonus($pProperty, $pMultiplier)¶
Black box for computing the total for dexterity/intelligence/strength/vitality.
Parameters: - $pProperty (string) –
- $pMultiplier (int) –
- determinePrimaryAttribute()¶
Use the hero’s class to determine the primary attribute.
Returns: string
- init()¶
Returns: $this