Fix for some standup fighter errors

This commit is contained in:
blitzmann
2018-02-17 11:59:51 -05:00
parent f66485c48a
commit 12a526fa9e
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -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)