From 859eba5e104ee288a05c843c41dfcaff16b787cd Mon Sep 17 00:00:00 2001 From: John Date: Tue, 4 Aug 2015 22:08:38 +0300 Subject: [PATCH] Fix Glove NPC.. I promise --- toontown/toon/GloveShopGui.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/toontown/toon/GloveShopGui.py b/toontown/toon/GloveShopGui.py index f08d6a31..b786f73f 100644 --- a/toontown/toon/GloveShopGui.py +++ b/toontown/toon/GloveShopGui.py @@ -80,7 +80,7 @@ class GloveShopGui: def setClientGlove(self, color): dna = base.localAvatar.style - dna.gloveColor = ToonDNA.allColorsList[color] + dna.gloveColor = color base.localAvatar.setDNA(dna) def __exit(self, state): @@ -91,6 +91,7 @@ class GloveShopGui: def __updateIndex(self, offset): self.index += offset hitLimit = 0 + color = ToonDNA.allColorsList[self.index] if self.index <= 0: self.downArrow['state'] = DGG.DISABLED @@ -103,8 +104,8 @@ class GloveShopGui: hitLimit = 1 else: self.upArrow['state'] = DGG.NORMAL - - if self.lastGlove == self.index: + + if self.lastGlove == color: self.buyButton['state'] = DGG.DISABLED self.notice['text'] = TTLocalizer.GloveGuiSameColor else: @@ -112,8 +113,8 @@ class GloveShopGui: self.notice['text'] = TTLocalizer.GloveGuiNotice % ToontownGlobals.GloveCost self.color['text'] = TTLocalizer.NumToColor[self.index] - self.color['text_fg'] = ToonDNA.allColorsList[self.index] - self.setClientGlove(self.index) + self.color['text_fg'] = color + self.setClientGlove(color) return hitLimit def __runTask(self, task):