diff --git a/otp/distributed/OTPClientRepository.py b/otp/distributed/OTPClientRepository.py index 5be72389..4a7a4343 100644 --- a/otp/distributed/OTPClientRepository.py +++ b/otp/distributed/OTPClientRepository.py @@ -38,7 +38,6 @@ from otp.otpbase import OTPGlobals from otp.otpbase import OTPLauncherGlobals from otp.otpbase import OTPLocalizer from otp.otpgui import OTPDialog -from otp.uberdog import OtpAvatarManager from toontown.chat.ChatGlobals import * @@ -999,12 +998,10 @@ class OTPClientRepository(ClientRepositoryBase): def _requestAvatarList(self): self.csm.requestAvatars() self.waitForDatabaseTimeout(requestName='WaitForAvatarList') - self.acceptOnce(OtpAvatarManager.OtpAvatarManager.OnlineEvent, self._requestAvatarList) @report(types=['args', 'deltaStamp'], dConfigParam='teleport') def exitWaitForAvatarList(self): self.cleanupWaitingForDatabase() - self.ignore(OtpAvatarManager.OtpAvatarManager.OnlineEvent) self.handler = None return diff --git a/otp/uberdog/OtpAvatarManager.py b/otp/uberdog/OtpAvatarManager.py deleted file mode 100644 index eb30bb78..00000000 --- a/otp/uberdog/OtpAvatarManager.py +++ /dev/null @@ -1,86 +0,0 @@ -from cPickle import loads, dumps -from direct.distributed import DistributedObject -from direct.directnotify import DirectNotifyGlobal -notify = DirectNotifyGlobal.directNotify.newCategory('AvatarManager') - -class OtpAvatarManager(DistributedObject.DistributedObject): - notify = notify - OnlineEvent = 'GlobalAvatarManagerOnline' - - def __init__(self, cr): - DistributedObject.DistributedObject.__init__(self, cr) - self.avatars = {} - - def delete(self): - self.ignoreAll() - self.cr.avatarManager = None - DistributedObject.DistributedObject.delete(self) - return - - def online(self): - messenger.send(OtpAvatarManager.OnlineEvent) - - def sendRequestAvatarList(self): - self.sendUpdate('requestAvatarList', [0]) - - def rejectAvatarList(self, result): - messenger.send('avatarListFailed', [result]) - - def avatarListResponse(self, pickleData): - avatars = loads(pickleData) - messenger.send('avatarList', [avatars]) - - def rejectCreateAvatar(self, result): - messenger.send('createdNewAvatarFailed', [result]) - - def createAvatarResponse(self, avatarId, subId, access, founder): - self.notify.info('new avatarId: %s subId: %s access: %s founder: %s' % (avatarId, - subId, - access, - founder)) - messenger.send('createdNewAvatar', [avatarId, subId]) - - def sendRequestRemoveAvatar(self, avatarId, subId, confirmPassword): - self.sendUpdate('requestRemoveAvatar', [0, - avatarId, - subId, - confirmPassword]) - - def rejectRemoveAvatar(self, reasonId): - messenger.send('rejectRemoveAvatar', [reasonId]) - - def removeAvatarResponse(self, avatarId, subId): - messenger.send('removeAvatarResponse', [avatarId, subId]) - - def sendRequestShareAvatar(self, avatarId, subId, shared): - self.sendUpdate('requestShareAvatar', [0, - avatarId, - subId, - shared]) - - def rejectShareAvatar(self, reasonId): - messenger.send('rejectShareAvatar', [reasonId]) - - def shareAvatarResponse(self, avatarId, subId, shared): - messenger.send('shareAvatarResponse', [avatarId, subId, shared]) - - def sendRequestAvatarSlot(self, subId, slot): - self.sendUpdate('requestAvatarSlot', [0, subId, slot]) - - def rejectAvatarSlot(self, reasonId, subId, slot): - messenger.send('rejectAvatarSlot', [reasonId, subId, slot]) - - def avatarSlotResponse(self, subId, slot): - messenger.send('avatarSlotResponse', [subId, slot]) - - def sendRequestPlayAvatar(self, avatarId, subId): - self.sendUpdate('requestPlayAvatar', [0, avatarId, subId]) - - def rejectPlayAvatar(self, reasonId, avatarId): - messenger.send('rejectPlayAvatar', [reasonId, avatarId]) - - def playAvatarResponse(self, avatarId, subId, access, founder): - messenger.send('playAvatarResponse', [avatarId, - subId, - access, - founder]) diff --git a/otp/uberdog/OtpAvatarManagerAI.py b/otp/uberdog/OtpAvatarManagerAI.py deleted file mode 100644 index 2f3e827c..00000000 --- a/otp/uberdog/OtpAvatarManagerAI.py +++ /dev/null @@ -1,60 +0,0 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectAI import DistributedObjectAI - -class OtpAvatarManagerAI(DistributedObjectAI): - notify = DirectNotifyGlobal.directNotify.newCategory("OtpAvatarManagerAI") - - def online(self): - pass - - def requestAvatarList(self, todo0): - pass - - def rejectAvatarList(self, todo0): - pass - - def avatarListResponse(self, todo0): - pass - - def requestAvatarSlot(self, todo0, todo1, todo2): - pass - - def rejectAvatarSlot(self, todo0, todo1, todo2): - pass - - def avatarSlotResponse(self, todo0, todo1): - pass - - def requestPlayAvatar(self, todo0, todo1, todo2): - pass - - def rejectPlayAvatar(self, todo0, todo1): - pass - - def playAvatarResponse(self, todo0, todo1, todo2, todo3): - pass - - def rejectCreateAvatar(self, todo0): - pass - - def createAvatarResponse(self, todo0, todo1, todo2, todo3): - pass - - def requestRemoveAvatar(self, todo0, todo1, todo2, todo3): - pass - - def rejectRemoveAvatar(self, todo0): - pass - - def removeAvatarResponse(self, todo0, todo1): - pass - - def requestShareAvatar(self, todo0, todo1, todo2, todo3): - pass - - def rejectShareAvatar(self, todo0): - pass - - def shareAvatarResponse(self, todo0, todo1, todo2): - pass - diff --git a/otp/uberdog/OtpAvatarManagerUD.py b/otp/uberdog/OtpAvatarManagerUD.py deleted file mode 100644 index 6ec34e46..00000000 --- a/otp/uberdog/OtpAvatarManagerUD.py +++ /dev/null @@ -1,60 +0,0 @@ -from direct.directnotify import DirectNotifyGlobal -from direct.distributed.DistributedObjectUD import DistributedObjectUD - -class OtpAvatarManagerUD(DistributedObjectUD): - notify = DirectNotifyGlobal.directNotify.newCategory("OtpAvatarManagerUD") - - def online(self): - pass - - def requestAvatarList(self, todo0): - pass - - def rejectAvatarList(self, todo0): - pass - - def avatarListResponse(self, todo0): - pass - - def requestAvatarSlot(self, todo0, todo1, todo2): - pass - - def rejectAvatarSlot(self, todo0, todo1, todo2): - pass - - def avatarSlotResponse(self, todo0, todo1): - pass - - def requestPlayAvatar(self, todo0, todo1, todo2): - pass - - def rejectPlayAvatar(self, todo0, todo1): - pass - - def playAvatarResponse(self, todo0, todo1, todo2, todo3): - pass - - def rejectCreateAvatar(self, todo0): - pass - - def createAvatarResponse(self, todo0, todo1, todo2, todo3): - pass - - def requestRemoveAvatar(self, todo0, todo1, todo2, todo3): - pass - - def rejectRemoveAvatar(self, todo0): - pass - - def removeAvatarResponse(self, todo0, todo1): - pass - - def requestShareAvatar(self, todo0, todo1, todo2, todo3): - pass - - def rejectShareAvatar(self, todo0): - pass - - def shareAvatarResponse(self, todo0, todo1, todo2): - pass -