added a function to send an update to an account with channel 3 instead of the old 1
This commit is contained in:
parent
43eecb979f
commit
11b54e8d73
|
|
@ -331,6 +331,9 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns):
|
|||
def GetPuppetConnectionChannel(self, doId):
|
||||
return doId + (1L << 32)
|
||||
|
||||
def GetAccountConnectionChannel(self, doId):
|
||||
return doId + (3L << 32)
|
||||
|
||||
def GetAccountIDFromChannelCode(self, channel):
|
||||
return channel >> 32
|
||||
|
||||
|
|
@ -342,6 +345,11 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns):
|
|||
channelId = self.GetPuppetConnectionChannel(avId)
|
||||
self.sendUpdateToChannel(channelId, fieldName, args)
|
||||
|
||||
def sendUpdateToAccountId(self, accountId, fieldName, args):
|
||||
assert self.notify.debugStateCall(self)
|
||||
channelId = self.GetAccountConnectionChannel(accountId)
|
||||
self.sendUpdateToChannel(channelId, fieldName, args)
|
||||
|
||||
def sendUpdateToChannel(self, channelId, fieldName, args):
|
||||
assert self.notify.debugStateCall(self)
|
||||
if self.air:
|
||||
|
|
|
|||
|
|
@ -262,6 +262,9 @@ class DistributedObjectUD(DistributedObjectBase):
|
|||
def GetPuppetConnectionChannel(self, doId):
|
||||
return doId + (1L << 32)
|
||||
|
||||
def GetAccountConnectionChannel(self, doId):
|
||||
return doId + (3L << 32)
|
||||
|
||||
def GetAccountIDFromChannelCode(self, channel):
|
||||
return channel >> 32
|
||||
|
||||
|
|
@ -273,6 +276,11 @@ class DistributedObjectUD(DistributedObjectBase):
|
|||
channelId = self.GetPuppetConnectionChannel(avId)
|
||||
self.sendUpdateToChannel(channelId, fieldName, args)
|
||||
|
||||
def sendUpdateToAccountId(self, accountId, fieldName, args):
|
||||
assert self.notify.debugStateCall(self)
|
||||
channelId = self.GetAccountConnectionChannel(accountId)
|
||||
self.sendUpdateToChannel(channelId, fieldName, args)
|
||||
|
||||
def sendUpdateToChannel(self, channelId, fieldName, args):
|
||||
assert self.notify.debugStateCall(self)
|
||||
if self.air:
|
||||
|
|
|
|||
Loading…
Reference in New Issue