Fixed bug where modified DPS was not being used for DPS Score
This commit is contained in:
parent
354650e421
commit
f7ba2ca831
|
@ -35,7 +35,6 @@ class DiabloClass {
|
||||||
|
|
||||||
$this->stats->stats['All Elemental Damage'] = $this->elementalDamage();
|
$this->stats->stats['All Elemental Damage'] = $this->elementalDamage();
|
||||||
|
|
||||||
$this->modifyDPSUnbuffed();
|
|
||||||
$this->calculateEHP();
|
$this->calculateEHP();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +48,15 @@ class DiabloClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
function DPSScore() {
|
function DPSScore() {
|
||||||
return $this->stats->getStat('DPS Unbuffed') / 1000;
|
if($this->type == 'pvp') {
|
||||||
|
$eliteDivisor = 1;
|
||||||
|
} else {
|
||||||
|
$eliteDivisor = 2;
|
||||||
|
}
|
||||||
|
$dps = $this->stats->getStat('DPS Unbuffed') *
|
||||||
|
max(1, 1 + ($this->stats->getStat('+DPS Against Elites') / $eliteDivisor));
|
||||||
|
|
||||||
|
return $dps / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EHPScore() {
|
function EHPScore() {
|
||||||
|
@ -102,16 +109,6 @@ class DiabloClass {
|
||||||
return $this->stats->getStat('Paragon Level') == 100;
|
return $this->stats->getStat('Paragon Level') == 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
function modifyDPSUnbuffed() {
|
|
||||||
if($this->type == 'pvp') {
|
|
||||||
$eliteDivisor = 1;
|
|
||||||
} else {
|
|
||||||
$eliteDivisor = 2;
|
|
||||||
}
|
|
||||||
$this->stats->stats['DPS Unbuffed'] = $this->stats->getStat('DPS Unbuffed') *
|
|
||||||
max(1, 1 + ($this->stats->getStat('+DPS Against Elites') / $eliteDivisor));
|
|
||||||
}
|
|
||||||
|
|
||||||
private
|
private
|
||||||
function elementalDamage() {
|
function elementalDamage() {
|
||||||
$totalElemental = 0;
|
$totalElemental = 0;
|
||||||
|
|
Loading…
Reference in New Issue