Glove NPC

This commit is contained in:
John 2015-08-04 22:00:20 +03:00
parent 8acb336dae
commit ed9c41bbf4
2 changed files with 2 additions and 2 deletions

View file

@ -22,6 +22,6 @@ class DistributedNPCGloveAI(DistributedNPCToonBaseAI.DistributedNPCToonBaseAI):
av.takeMoney(ToontownGlobals.GloveCost) av.takeMoney(ToontownGlobals.GloveCost)
newDNA = ToonDNA.ToonDNA() newDNA = ToonDNA.ToonDNA()
newDNA.makeFromNetString(av.getDNAString()) newDNA.makeFromNetString(av.getDNAString())
newDNA.gloveColor = color newDNA.gloveColor = ToonDNA.allColorsList[color]
taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId) taskMgr.doMethodLater(1.0, lambda task: av.b_setDNAString(newDNA.makeNetString()), 'transform-%d' % avId)
self.sendUpdate('changeGloveResult', [avId, GloveNPCGlobals.CHANGE_SUCCESSFUL]) self.sendUpdate('changeGloveResult', [avId, GloveNPCGlobals.CHANGE_SUCCESSFUL])

View file

@ -80,7 +80,7 @@ class GloveShopGui:
def setClientGlove(self, color): def setClientGlove(self, color):
dna = base.localAvatar.style dna = base.localAvatar.style
dna.gloveColor = color dna.gloveColor = ToonDNA.allColorsList[color]
base.localAvatar.setDNA(dna) base.localAvatar.setDNA(dna)
def __exit(self, state): def __exit(self, state):