oldschool-toontown/otp/distributed/OTPInternalRepository.py

21 lines
866 B
Python
Raw Normal View History

2019-11-08 21:20:04 -06:00
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.AstronInternalRepository import AstronInternalRepository
# TODO: Remove Astron dependence.
class OTPInternalRepository(AstronInternalRepository):
notify = DirectNotifyGlobal.directNotify.newCategory('OTPInternalRepository')
dbId = 4003
def __init__(self, baseChannel, serverId, dcFileNames, dcSuffix, connectMethod, threadedNet):
AstronInternalRepository.__init__(self, baseChannel, serverId=serverId, dcFileNames=dcFileNames, dcSuffix=dcSuffix, connectMethod=connectMethod, threadedNet=threadedNet)
def handleConnected(self):
AstronInternalRepository.handleConnected(self)
2019-11-15 20:15:38 -06:00
def getAccountIdFromSender(self):
return (self.getMsgSender() >> 32) & 0xFFFFFFFF
2019-11-17 15:29:23 -06:00
def getAvatarIdFromSender(self):
return self.getMsgSender() & 0xFFFFFFFF