Replace ugly method with beautiful

This commit is contained in:
DenialMC 2015-05-16 14:03:46 +03:00
parent 0f4521a19e
commit a03c70c0e6

View file

@ -313,7 +313,7 @@ class CatalogItemPanel(DirectFrame):
self.buyButton['state'] = DGG.DISABLED
elif self['item'].getEmblemPrices() and not base.localAvatar.isEnoughMoneyAndEmblemsToBuy(self['item'].getPrice(self['type']), self['item'].getEmblemPrices()):
self.buyButton['state'] = DGG.DISABLED
elif self['item'].__class__.__name__ == "CatalogHouseItem" and self['item'].houseId == localAvatar.houseType:
elif hasattr(self['item'], 'houseId') and self['item'].houseId == localAvatar.houseType:
auxText = TTLocalizer.CatalogPurchasedMaxText
elif self['item'].getPrice(self['type']) <= base.localAvatar.getMoney() + base.localAvatar.getBankMoney():
self.buyButton['state'] = DGG.NORMAL