Bläddra i källkod

districtId in not wantOtpServer

Dave Schuyler 21 år sedan
förälder
incheckning
a0c343d591
1 ändrade filer med 12 tillägg och 5 borttagningar
  1. 12 5
      direct/src/distributed/DistributedObjectAI.py

+ 12 - 5
direct/src/distributed/DistributedObjectAI.py

@@ -278,11 +278,18 @@ class DistributedObjectAI(DirectObject.DirectObject):
         if not wantOtpServer:
             parentId = 0
         # Make the dclass do the hard work
-        dg = self.dclass.aiFormatGenerate(
-                self, self.doId, parentId, zoneId,
-                repository.serverId,
-                repository.ourChannel,
-                optionalFields)
+        if not wantOtpServer:
+            dg = self.dclass.aiFormatGenerate(
+                    self, self.doId, 0, zoneId,
+                    repository.districtId,
+                    repository.ourChannel,
+                    optionalFields)
+        else:
+            dg = self.dclass.aiFormatGenerate(
+                    self, self.doId, parentId, zoneId,
+                    repository.serverId,
+                    repository.ourChannel,
+                    optionalFields)
         repository.send(dg)
             
     def initFromServerResponse(self, valDict):