Exemplo n.º 1
0
 def _execute(self, dst):
     del dst[:]
     e = BigWorld.entities[self.planEntityId]
     if isSector(e) and not e.settings.isBase and not e.settings.isFreeZone:
         dst.append(e.id)
     sectorEntities = ifilter(lambda s: not s.settings.isBase and not s.settings.isFreeZone, e.entitiesInRange(10000, 'ACSector', (0, 0, 0)))
     dst.extend((s.id for s in sectorEntities))
     return 'out'
Exemplo n.º 2
0
 def _execute(self, entityId):
     e = BigWorld.entities.get(entityId)
     if e is None:
         logEntityDoesNotExistError(entityId, self)
         return ''
     elif not isSector(e):
         logNotSupportedEntityError(e, self)
         return ''
     else:
         return e.settings.presetName
Exemplo n.º 3
0
 def _execute(self, entityId):
     e = BigWorld.entities.get(entityId)
     if e is None:
         logEntityDoesNotExistError(entityId, self)
         return 0
     elif not isSector(e):
         logNotSupportedEntityError(e, self)
         return 0
     else:
         return e.capturePoints
Exemplo n.º 4
0
 def _execute(self, entityId):
     e = BigWorld.entities.get(entityId)
     if e is None:
         logEntityDoesNotExistError(entityId, self)
         return 0
     elif not isSector(e):
         logNotSupportedEntityError(e, self)
         return 0
     else:
         center, radius = e.settings.geometry.boundingCircle
         return radius
Exemplo n.º 5
0
 def _execute(self, entityId):
     e = BigWorld.entities.get(entityId)
     if e is None:
         logEntityDoesNotExistError(entityId, self)
         return 0
     elif not isSector(e):
         logNotSupportedEntityError(e, self)
         return 0
     elif e.stateContainer.state != SECTOR_STATE.LOCKED:
         return 0
     else:
         return e.stateContainer.nextStateTimestamp - BigWorld.time()
Exemplo n.º 6
0
 def _execute(self, entityId, teamId):
     e = BigWorld.entities.get(entityId)
     if e is None:
         logEntityDoesNotExistError(entityId, self)
         return 0
     elif not isSector(e):
         logNotSupportedEntityError(e, self)
         return 0
     elif teamId not in TEAM_ID.CHOSEN:
         logError(self, 'Invalid team id, team code: ' + str(teamId))
         return 0
     else:
         return e.captureStatus[teamId]
Exemplo n.º 7
0
 def _execute(self, entityId, sectorId):
     from Bot.BotConsts import STRATEGY_TARGET_TYPE, StrategyTargetSectorData
     e = BigWorld.entities.get(entityId)
     s = BigWorld.entities.get(sectorId)
     if e is None:
         logEntityDoesNotExistError(entityId, self)
         return
     elif s is None:
         logEntityDoesNotExistError(sectorId, self)
         return
     elif not isAvatarBot(e):
         logNotSupportedEntityError(e, self)
         return
     elif not isSector(s):
         logNotSupportedEntityError(s, self)
         return
     else:
         e.updateStrategyTarget(STRATEGY_TARGET_TYPE.SECTOR, StrategyTargetSectorData(position=s.position, sectorID=s.ident, sectorEntityID=sectorId))
         return 'out'