mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 00:37:54 +00:00
Sorry nacib
This commit is contained in:
parent
d5dc2c9d50
commit
18fb9b1924
3 changed files with 7 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
from toontown.toon import ToonDNA
|
||||
import CatalogItem, CatalogItemList
|
||||
import base64, json
|
||||
import json
|
||||
|
||||
def createFromJson(jsonData):
|
||||
return createFromFields(json.loads(jsonData))
|
||||
|
@ -35,16 +35,16 @@ class GiftAvatar:
|
|||
|
||||
def setDNAString(self, dnaString):
|
||||
self.style = ToonDNA.ToonDNA()
|
||||
self.style.makeFromNetString(base64.b64decode(dnaString))
|
||||
self.style.makeFromNetString(dnaString.decode('base64'))
|
||||
|
||||
def setMailboxContents(self, contents):
|
||||
self.mailboxContents = CatalogItemList.CatalogItemList(base64.b64decode(contents), store=CatalogItem.Customization)
|
||||
self.mailboxContents = CatalogItemList.CatalogItemList(contents.decode('base64'), store=CatalogItem.Customization)
|
||||
|
||||
def setGiftSchedule(self, onOrder):
|
||||
self.onGiftOrder = CatalogItemList.CatalogItemList(base64.b64decode(onOrder), store=CatalogItem.Customization | CatalogItem.DeliveryDate)
|
||||
self.onGiftOrder = CatalogItemList.CatalogItemList(onOrder.decode('base64'), store=CatalogItem.Customization | CatalogItem.DeliveryDate)
|
||||
|
||||
def setDeliverySchedule(self, onOrder):
|
||||
self.onOrder = CatalogItemList.CatalogItemList(base64.b64decode(onOrder), store=CatalogItem.Customization | CatalogItem.DeliveryDate)
|
||||
self.onOrder = CatalogItemList.CatalogItemList(onOrder.decode('base64'), store=CatalogItem.Customization | CatalogItem.DeliveryDate)
|
||||
|
||||
def setHat(self, hat):
|
||||
self.hat = hat
|
||||
|
|
|
@ -8,7 +8,6 @@ from toontown.catalog import CatalogItem, CatalogInvalidItem, GiftAvatar
|
|||
from toontown.catalog.CatalogItemList import CatalogItemList
|
||||
from toontown.uberdog import TopToonsGlobals
|
||||
|
||||
import base64
|
||||
import json
|
||||
import time
|
||||
|
||||
|
@ -33,7 +32,7 @@ class LoadGiftAvatar:
|
|||
return
|
||||
|
||||
for key in ('setDNAString', 'setMailboxContents', 'setGiftSchedule', 'setDeliverySchedule'):
|
||||
fields[key] = base64.b64encode(fields[key][0])
|
||||
fields[key] = fields[key][0].encode('base64')
|
||||
|
||||
newDict = self.copyDict(fields, 'setDNAString', 'setMailboxContents', 'setGiftSchedule', 'setDeliverySchedule', 'setHat', 'setGlasses', 'setBackpack',
|
||||
'setShoes', 'setHatList', 'setGlassesList', 'setBackpackList', 'setShoes', 'setShoesList', 'setCustomMessages', 'setEmoteAccess',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import base64
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
import json
|
||||
import time
|
||||
|
@ -41,7 +40,7 @@ class ToontownRPCHandlerBase:
|
|||
"""
|
||||
# First, base64 decode the token:
|
||||
try:
|
||||
token = base64.b64decode(token)
|
||||
token = token.decode('base64')
|
||||
except TypeError:
|
||||
return (-32001, 'Token decode failure')
|
||||
|
||||
|
|
Loading…
Reference in a new issue