From 12a526fa9e6ab700c1faeed2412b899283450787 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sat, 17 Feb 2018 11:59:51 -0500 Subject: [PATCH] Fix for some standup fighter errors --- eos/saveddata/fighter.py | 2 +- gui/builtinItemStatsViews/itemAttributes.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/eos/saveddata/fighter.py b/eos/saveddata/fighter.py index 12e1a7f7e..d2b1b45b7 100644 --- a/eos/saveddata/fighter.py +++ b/eos/saveddata/fighter.py @@ -90,7 +90,7 @@ class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): self.__slot = self.__calculateSlot(self.__item) chargeID = self.getModifiedItemAttr("fighterAbilityLaunchBombType") - if chargeID is not None: + if chargeID: charge = eos.db.getItem(int(chargeID)) self.__charge = charge self.__chargeModifiedAttributes.original = charge.attributes diff --git a/gui/builtinItemStatsViews/itemAttributes.py b/gui/builtinItemStatsViews/itemAttributes.py index 1e1804d1d..cbb8cf246 100644 --- a/gui/builtinItemStatsViews/itemAttributes.py +++ b/gui/builtinItemStatsViews/itemAttributes.py @@ -242,6 +242,8 @@ class ItemParams(wx.Panel): return "%s (%d)" % (group.name, value) if group is not None else str(value) def attributeIDCallback(): + if not value: # some attributes come through with a value of 0? See #1387 + return "%d" % (value) attribute = Attribute.getInstance().getAttributeInfo(value) return "%s (%d)" % (attribute.name.capitalize(), value)