From 00834e66e7e07250e0985d08d4ffc6dcacf8a3d0 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 6 Dec 2012 13:40:40 -0500 Subject: [PATCH] Remove Elemental Damage From Calculations Diablo Progress currently includes elemental damage in their unbuffed DPS score. By calculating it, we are double dipping and artificially increasing scores. All instances of elemental damage have been removed from the formula. --- d3hog_driver.php | 4 +--- libs/dpclass.php | 14 ++++---------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/d3hog_driver.php b/d3hog_driver.php index c4580d2..111f82a 100644 --- a/d3hog_driver.php +++ b/d3hog_driver.php @@ -4,7 +4,6 @@ include_once(__DIR__ . '/libs/dpclass.php'); if($_POST['submit']) { $diabloProgressUrl = trim($_POST['url']); - $elementalOnWeapon = isset($_POST['elemental']['elemental']) ? true : false; if(preg_match('{^http://www.diabloprogress.com/hero/.*\-[\d]+/.*/[\d]+$}', $diabloProgressUrl) != 1) { die('Bad URL. Please enter the entire diablo progress URL.

Example: http://www.diabloprogress.com/hero/celanian-1548/HsuMing/21706367'); } @@ -17,7 +16,7 @@ if($_POST['submit']) { $contents = curl_exec($curl); curl_close($curl); - $character = DPClassFactory::createClassObject($contents, $elementalOnWeapon); + $character = DPClassFactory::createClassObject($contents); if($character === FALSE) { die('Bad class. Either your class could not be detected or we do not support your class at this time.'); @@ -38,6 +37,5 @@ Misc Score: miscScore(), 2, '.', ','); ?>
D3 Progress URL:
- Elemental Damage on Weapon: />
\ No newline at end of file diff --git a/libs/dpclass.php b/libs/dpclass.php index 92bc583..0fa7fdc 100644 --- a/libs/dpclass.php +++ b/libs/dpclass.php @@ -1,16 +1,16 @@ dpHTML = $characterPage; $this->class = get_class($this); - $this->elementalOnWeapon = $elementalOnWeapon; $this->parseStats(); } @@ -136,10 +135,6 @@ class DPClass { } } - if($this->elementalOnWeapon && $totalElemental != 1) { - $totalElemental *= .5; - } - return ($totalElemental > 0) ? $totalElemental : 0; } @@ -165,7 +160,6 @@ class DPClass { function modifyDPSUnbuffed() { $this->stats['DPS Unbuffed'] = $this->getStat('DPS Unbuffed') * - (1 + $this->getStat('All Elemental Damage')) * max(1, 1 + ($this->getStat('+DPS Against Elites') / 2)); }