Fix Elemental Damage on Weapon Bug

This commit is contained in:
Andrew Tomaka 2012-11-29 12:38:20 -05:00
parent 640ea3fc3a
commit 64ad49e2ab

View file

@ -125,7 +125,7 @@ class DPClass {
} }
function elementalDamage() { function elementalDamage() {
$totalElemental = 1; $totalElemental = 0;
foreach($this->stats as $stat => $value) { foreach($this->stats as $stat => $value) {
if(preg_match('/\+DPS \(.*\)/', $stat) > 0) { if(preg_match('/\+DPS \(.*\)/', $stat) > 0) {
$totalElemental += $value; $totalElemental += $value;
@ -161,7 +161,7 @@ class DPClass {
function modifyDPSUnbuffed() { function modifyDPSUnbuffed() {
$this->stats['DPS Unbuffed'] = $this->getStat('DPS Unbuffed') * $this->stats['DPS Unbuffed'] = $this->getStat('DPS Unbuffed') *
$this->getStat('All Elemental Damage') * (1 + $this->getStat('All Elemental Damage')) *
max(1, 1 + ($this->getStat('+DPS Against Elites') / 2)); max(1, 1 + ($this->getStat('+DPS Against Elites') / 2));
} }