1
0
Fork 0

Calculate EHP one time insead of every time

This commit is contained in:
Andrew Tomaka 2013-04-08 20:12:30 -04:00
parent 2f8c6e4a8e
commit 14ff704b5f
2 changed files with 2 additions and 5 deletions

View File

@ -5,7 +5,6 @@ class Barbarian extends DiabloClass {
}
function EHPScore() {
$this->calculateEHP();
$ehp = $this->stats->getStat('EHP Unbuffed');
if($this->type == 'pvp') {
@ -23,7 +22,7 @@ class Barbarian extends DiabloClass {
}
}
private
protected
function calculateEHP() {
if($this->type == 'pvp') {
$ar_mod = 300;$armor_mod = 3000;$inherent_red = .35;$incoming_attack = 250000;

View File

@ -141,9 +141,7 @@ class DiabloClass {
}
function modifyEHP() {
$this->stats->stats['EHP Unbuffed'] = $this->stats->getStat('EHP Unbuffed') *
(1 + $this->stats->getStat('Life Bonus') + $this->stats->getStat('Gem Life')) /
(1 + $this->stats->getStat('Life Bonus'));
$this->calculateEHP();
}
function modifyHP() {