ZoneEntityBase.py 739 B

12345678910111213141516171819202122232425262728
  1. """ZoneEntityBase module: contains the ZoneEntityBase class"""
  2. import Entity
  3. import LevelConstants
  4. class ZoneEntityBase(Entity.Entity):
  5. def __init__(self, level, entId):
  6. Entity.Entity.__init__(self, level, entId)
  7. self.zoneId = None
  8. def destroy(self):
  9. del self.zoneId
  10. Entity.Entity.destroy(self)
  11. def isUberZone(self):
  12. return self.entId == LevelConstants.UberZoneEntId
  13. def setZoneId(self, zoneId):
  14. """set the network zoneId that this zone entity corresponds to"""
  15. self.zoneId = zoneId
  16. def getZoneId(self):
  17. """network zoneId"""
  18. return self.zoneId
  19. def getZoneNum(self):
  20. """zoneNum from model / entityId"""
  21. return self.entId