def onXmqpConnected(e): #debug('onXmqpConnected') # send "hola" broadcast data = {'event': EVENTS.XMQP_HOLA, 'capabilities': xmqp.getCapabilitiesData()} if xmqp.is_active(): xmqp.call(data) _sendCapabilities()
def send_minimap_click(path): #debug('send_minimap_click: [...]') if xmqp.is_active(): path = [[int(x), int(y)] for x,y in path] #debug('send_minimap_click: {}'.format(path)) xmqp.call({ 'event': EVENTS.XMQP_MINIMAP_CLICK, 'path': path, 'color': config.networkServicesSettings.x_minimap_clicks_color})
def _DestroyTimersPanel__hideDeathZoneTimer(self, value): if xmqp.is_active() and g_appLoader.getSpaceID() == GUI_GLOBAL_SPACE_ID.BATTLE: code = value if code is None: code = 'ALL' xmqp.call({ 'event':EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable':False, 'code':code})
def _DestroyTimersPanel__showDeathZoneTimer(self, value): if xmqp.is_active() and g_appLoader.getSpaceID() == GUI_GLOBAL_SPACE_ID.BATTLE: code, totalTime, level = value xmqp.call({ 'event':EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable':True, 'code':code, 'totalTime':totalTime, 'level':level})
def _DestroyTimersPanel_hideDeathZoneTimer(self, value): if xmqp.is_active() and g_appLoader.getSpaceID( ) == GUI_GLOBAL_SPACE_ID.BATTLE: code = value if code is None: code = 'ALL' xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': False, 'code': code })
def _DestroyTimersPanel_showDeathZoneTimer(self, value): if xmqp.is_active() and g_appLoader.getSpaceID( ) == GUI_GLOBAL_SPACE_ID.BATTLE: code, totalTime, level = value xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': True, 'code': code, 'totalTime': totalTime, 'level': level })
def _DestroyTimersPanel__showDestroyTimer(self, value): if xmqp.is_active() and g_appLoader.getSpaceID( ) == GUI_GLOBAL_SPACE_ID.BATTLE: if len(value) == 4: code, totalTime, level, startTime = value else: (code, totalTime, level), startTime = value, None xmqp.call({ 'event': EVENTS.XMQP_VEHICLE_TIMER, 'enable': True, 'code': code, 'totalTime': totalTime, 'level': level })
def _TimersPanel_showDestroyTimer(self, value): if xmqp.is_active() and dependency.instance(IAppLoader).getSpaceID() == GuiGlobalSpaceID.BATTLE: if value.needToCloseAll(): xmqp.call({ 'event': EVENTS.XMQP_VEHICLE_TIMER, 'enable': False, 'code': 'ALL'}) elif value.needToCloseTimer(): xmqp.call({ 'event': EVENTS.XMQP_VEHICLE_TIMER, 'enable': False, 'code': value.code}) else: xmqp.call({ 'event': EVENTS.XMQP_VEHICLE_TIMER, 'enable': True, 'code': value.code, 'totalTime': value.totalTime, 'level': value.level})
def _DestroyTimersPanel_showDeathZoneTimer(self, value): if xmqp.is_active() and g_appLoader.getSpaceID( ) == GUI_GLOBAL_SPACE_ID.BATTLE: if value.needToCloseAll(): xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': False, 'code': 'ALL' }) elif value.needToCloseTimer(): xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': False, 'code': value.code }) else: xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': True, 'code': value.code, 'totalTime': value.totalTime, 'level': value.level })
def _TimersPanel_showDeathZoneTimer(self, value): if xmqp.is_active() and dependency.instance(IAppLoader).getSpaceID() == GuiGlobalSpaceID.BATTLE: try: if value.needToCloseAll(): xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': False, 'zoneID': 'ALL'}) elif value.needToCloseTimer(): xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': False, 'zoneID': value.zoneID}) elif value.needToShow(): xmqp.call({ 'event': EVENTS.XMQP_DEATH_ZONE_TIMER, 'enable': True, 'zoneID': value.zoneID, 'totalTime': value.totalTime, 'level': value.level, 'finishTime': value.finishTime}) except Exception as ex: err(traceback.format_exc()) err('value: ' + str(value))
def onXmqpConnected(e): #debug('onXmqpConnected') # send "hola" broadcast data = {'event': EVENTS.XMQP_HOLA, 'capabilities': xmqp.getCapabilitiesData()} if xmqp.is_active(): xmqp.call(data)
def _SixthSenseIndicator_as_showS(self): if xmqp.is_active(): xmqp.call({'event': EVENTS.XMQP_SPOTTED})
def _DestroyTimersPanel__setFireInVehicle(self, isInFire): if xmqp.is_active(): xmqp.call({'event':EVENTS.XMQP_FIRE,'enable':isInFire})
def _TimersPanel__setFireInVehicle(self, isInFire): if xmqp.is_active(): xmqp.call({'event': EVENTS.XMQP_FIRE, 'enable': isInFire})