|
@@ -331,6 +331,9 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns):
|
|
|
def GetPuppetConnectionChannel(self, doId):
|
|
def GetPuppetConnectionChannel(self, doId):
|
|
|
return doId + (1L << 32)
|
|
return doId + (1L << 32)
|
|
|
|
|
|
|
|
|
|
+ def GetAccountConnectionChannel(self, doId):
|
|
|
|
|
+ return doId + (3L << 32)
|
|
|
|
|
+
|
|
|
def GetAccountIDFromChannelCode(self, channel):
|
|
def GetAccountIDFromChannelCode(self, channel):
|
|
|
return channel >> 32
|
|
return channel >> 32
|
|
|
|
|
|
|
@@ -342,6 +345,11 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns):
|
|
|
channelId = self.GetPuppetConnectionChannel(avId)
|
|
channelId = self.GetPuppetConnectionChannel(avId)
|
|
|
self.sendUpdateToChannel(channelId, fieldName, args)
|
|
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):
|
|
def sendUpdateToChannel(self, channelId, fieldName, args):
|
|
|
assert self.notify.debugStateCall(self)
|
|
assert self.notify.debugStateCall(self)
|
|
|
if self.air:
|
|
if self.air:
|