set location for quests

This commit is contained in:
Dave Schuyler 2005-06-09 04:00:28 +00:00
parent 383cfb4704
commit ddef13c674

View File

@ -141,12 +141,23 @@ class DoCollectionManager:
self.notify.warning(
"handleObjectLocation: Asked to update non-existent obj: %s" % (doId))
def handleSetLocation(self, di):
# This was initially added because creating a distributed quest
# object would cause a message like this to be generated.
assert self.notify.debugStateCall(self)
parentId = di.getUint32()
zoneId = di.getUint32()
distObj = self.doId2do.get(self.getMsgChannel())
if distObj is not None:
distObj.setLocation(parentId, zoneId)
def storeObjectLocation(self, doId, parentId, zoneId):
if (parentId is None) or (zoneId is None):
# Do not store null values
return
# TODO: check current location
obj = self.doId2do.get(doId)
if obj is not None:
oldParentId = obj.parentId
oldZoneId = obj.zoneId