This commit is contained in:
John 2015-05-28 21:31:56 +03:00 committed by Loudrob
parent 8c47aa0fd0
commit a1fd036cf0
2 changed files with 7 additions and 7 deletions

View file

@ -526,7 +526,6 @@ MonthlySchedule = ((7,
CatalogRentalItem(1, 2880, 1000),
CatalogRentalItem(2, 2890, 1000),
CatalogGardenStarterItem(),
CatalogNametagItem(100),
CatalogNametagItem(0),
CatalogClothingItem(1605, 0, True),
CatalogClothingItem(1602, 0, True),
@ -540,7 +539,8 @@ MonthlySchedule = ((7,
CatalogEmoteItem(23, True),
CatalogEmoteItem(24, True),
CatalogEmoteItem(25, True),
CatalogEmoteItem(26, True))),
CatalogEmoteItem(26, True),
CatalogNametagItem(15, True))),
(5,
26,
6,

View file

@ -8,8 +8,9 @@ from direct.gui.DirectGui import *
class CatalogNametagItem(CatalogItem.CatalogItem):
sequenceNumber = 0
def makeNewItem(self, nametagStyle):
def makeNewItem(self, nametagStyle, isSpecial = False):
self.nametagStyle = nametagStyle
self.isSpecial = isSpecial
CatalogItem.CatalogItem.makeNewItem(self)
def getPurchaseLimit(self):
@ -34,10 +35,7 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
return TTLocalizer.NametagTypeName
def getName(self):
if self.nametagStyle == 100:
name = TTLocalizer.BasicNameTag
else:
name = TTLocalizer.NametagFontNames[self.nametagStyle]
name = TTLocalizer.NametagFontNames[self.nametagStyle]
if TTLocalizer.NametagReverse:
name = TTLocalizer.NametagLabel + name
else:
@ -87,10 +85,12 @@ class CatalogNametagItem(CatalogItem.CatalogItem):
def decodeDatagram(self, di, versionNumber, store):
CatalogItem.CatalogItem.decodeDatagram(self, di, versionNumber, store)
self.nametagStyle = di.getUint16()
self.isSpecial = di.getBool()
def encodeDatagram(self, dg, store):
CatalogItem.CatalogItem.encodeDatagram(self, dg, store)
dg.addUint16(self.nametagStyle)
dg.addBool(self.isSpecial)
def isGift(self):
return 0