def stopBattle(): Focus.inBattle = False MarkersStorage.clear() if Focus.lastCallback is not None: try: BigWorld.cancelCallback(Focus.lastCallback) except: pass Focus.lastCallback = None
def stopBattle(): if event.ns == _SPACE.SF_BATTLE: Focus.inBattle = False MarkersStorage.clear() if Focus.lastCallback is not None: try: BigWorld.cancelCallback(Focus.lastCallback) except: pass Focus.lastCallback = None
def showMarker(enemyID,config): if enemyID is None or MarkersStorage.hasMarker(enemyID): return minimap = g_windowsManager.battleWindow.minimap if minimap is None: return enemyVehicle = BigWorld.entities.get(enemyID) if enemyVehicle is None: return if not enemyVehicle.isAlive(): return indicator = DirectionIndicator(config) if indicator is None: return indicatorCtrl = DirectionIndicatorCtrl(indicator, config, enemyVehicle) VehicleMarker = VehicleMarkers(enemyID, minimap, 5, indicatorCtrl) if VehicleMarker is not None: MarkersStorage.addMarker(enemyID, VehicleMarker, config)
def showMarker(enemyID, config): if enemyID is None or MarkersStorage.hasMarker(enemyID): return battle = g_appLoader.getDefBattleApp() if battle is None: return minimap = battle.minimap enemyVehicle = BigWorld.entities.get(enemyID) if enemyVehicle is None: return if not enemyVehicle.isAlive(): return indicator = DirectionIndicator(config) if indicator is None: return indicatorCtrl = DirectionIndicatorCtrl(indicator, config, enemyVehicle) VehicleMarker = VehicleMarkers(enemyID, minimap, 5, indicatorCtrl) if VehicleMarker is not None: MarkersStorage.addMarker(enemyID, VehicleMarker, config)
def check(): if not Focus.inBattle: return MarkersStorage.updateMarkers(Focus.myConf) Focus.lastCallback = BigWorld.callback(0.7, Focus.check)
def check(): if not Focus.inBattle: return MarkersStorage.updateMarkers(Focus.myConf) Focus.lastCallback = BigWorld.callback(0.7,Focus.check)