Calculate EHP one time insead of every time
This commit is contained in:
parent
2f8c6e4a8e
commit
14ff704b5f
2 changed files with 2 additions and 5 deletions
|
@ -5,7 +5,6 @@ class Barbarian extends DiabloClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
function EHPScore() {
|
function EHPScore() {
|
||||||
$this->calculateEHP();
|
|
||||||
$ehp = $this->stats->getStat('EHP Unbuffed');
|
$ehp = $this->stats->getStat('EHP Unbuffed');
|
||||||
|
|
||||||
if($this->type == 'pvp') {
|
if($this->type == 'pvp') {
|
||||||
|
@ -23,7 +22,7 @@ class Barbarian extends DiabloClass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private
|
protected
|
||||||
function calculateEHP() {
|
function calculateEHP() {
|
||||||
if($this->type == 'pvp') {
|
if($this->type == 'pvp') {
|
||||||
$ar_mod = 300;$armor_mod = 3000;$inherent_red = .35;$incoming_attack = 250000;
|
$ar_mod = 300;$armor_mod = 3000;$inherent_red = .35;$incoming_attack = 250000;
|
||||||
|
|
|
@ -141,9 +141,7 @@ class DiabloClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
function modifyEHP() {
|
function modifyEHP() {
|
||||||
$this->stats->stats['EHP Unbuffed'] = $this->stats->getStat('EHP Unbuffed') *
|
$this->calculateEHP();
|
||||||
(1 + $this->stats->getStat('Life Bonus') + $this->stats->getStat('Gem Life')) /
|
|
||||||
(1 + $this->stats->getStat('Life Bonus'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function modifyHP() {
|
function modifyHP() {
|
||||||
|
|
Loading…
Reference in a new issue