From 5c1e26e39060e70de535ef4d085f9c0d98b6c6e3 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 8 Apr 2013 21:29:06 -0400 Subject: [PATCH] Life steal on LoH do not count for PvP --- libs/demonhunter.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/demonhunter.php b/libs/demonhunter.php index 0a5d137..28dfe2a 100644 --- a/libs/demonhunter.php +++ b/libs/demonhunter.php @@ -25,11 +25,19 @@ class DemonHunter extends DiabloClass { $lsCoefficient = .2; } + $ls = $this->stats->getStat('Life Steal'); + $loh = $this->stats->getStat('Life on Hit'); + + if($this->type == 'pvp') { + $ls = 0; + $loh = 0; + } + $effectiveLs = $this->stats->getStat('DPS Unbuffed') * - $this->stats->getStat('Life Steal') * $lsCoefficient; + $ls * $lsCoefficient; $mitigation = $this->stats->getStat('EHP Unbuffed') / $this->stats->getStat('Life'); - return 1 + $mitigation * ($this->stats->getStat('Life on Hit') * + return 1 + $mitigation * ($loh * ($this->stats->getStat('Attacks per Second') + 1) / 2 + $this->stats->getStat('Life per Second') + $effectiveLs) / ($this->stats->getStat('Life') * $this->EHPScore() * 10000 /