Fix Glove NPC.. I promise

This commit is contained in:
John 2015-08-04 22:08:38 +03:00
parent ed9c41bbf4
commit 859eba5e10

View file

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