From 25a945f9e612762210cf4579dc0314dd1add4ffe Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Thu, 20 Apr 2017 11:37:11 -0700 Subject: [PATCH] Catch bug where remote reppers have the fueled multiplier applied when they have no charges. --- eos/saveddata/fit.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 04854e568..32cbe5aa8 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -1187,14 +1187,16 @@ class Fit(object): if force_recalc is False: return self.__remoteReps - # We are rerunning the recalcs. Explicitly set to 0 to make sure we don't duplicate anything and correctly - # set all values to 0. + # We are rerunning the recalcs. Explicitly set to 0 to make sure we don't duplicate anything and correctly set all values to 0. for remote_type in self.__remoteReps: self.__remoteReps[remote_type] = 0 for stuff in chain(self.modules, self.drones): remote_type = None - modifier = stuff.getModifiedItemAttr("chargedArmorDamageMultiplier", 1) + if stuff.charge: + fueledMultiplier = stuff.getModifiedItemAttr("chargedArmorDamageMultiplier", 1) + else: + fueledMultiplier = 1 if isinstance(stuff, Module) and (stuff.isEmpty or stuff.state < State.ACTIVE): continue @@ -1249,7 +1251,7 @@ class Fit(object): hp = droneHull else: hp = 0 - self.__remoteReps[remote_type] += (hp * modifier) / duration + self.__remoteReps[remote_type] += (hp * fueledMultiplier) / duration return self.__remoteReps