Esempio n. 1
0
def onXmqpConnected(e):
    #debug('onXmqpConnected')
    # send "hola" broadcast
    data = {'event': EVENTS.XMQP_HOLA, 'capabilities': xmqp.getCapabilitiesData()}
    if xmqp.is_active():
        xmqp.call(data)
    _sendCapabilities()
Esempio n. 2
0
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})
Esempio n. 3
0
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})
Esempio n. 4
0
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})
Esempio n. 5
0
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})
Esempio n. 6
0
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
        })
Esempio n. 7
0
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
        })
Esempio n. 8
0
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
        })
Esempio n. 9
0
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})
Esempio n. 10
0
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
            })
Esempio n. 11
0
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))
Esempio n. 12
0
def onXmqpConnected(e):
    #debug('onXmqpConnected')
    # send "hola" broadcast
    data = {'event': EVENTS.XMQP_HOLA, 'capabilities': xmqp.getCapabilitiesData()}
    if xmqp.is_active():
        xmqp.call(data)
Esempio n. 13
0
def _SixthSenseIndicator_as_showS(self):
    if xmqp.is_active():
        xmqp.call({'event': EVENTS.XMQP_SPOTTED})
Esempio n. 14
0
def _DestroyTimersPanel__setFireInVehicle(self, isInFire):
    if xmqp.is_active():
        xmqp.call({'event':EVENTS.XMQP_FIRE,'enable':isInFire})
Esempio n. 15
0
def _SixthSenseIndicator_as_showS(self):
    if xmqp.is_active():
        xmqp.call({'event': EVENTS.XMQP_SPOTTED})
Esempio n. 16
0
def _TimersPanel__setFireInVehicle(self, isInFire):
    if xmqp.is_active():
        xmqp.call({'event': EVENTS.XMQP_FIRE, 'enable': isInFire})