示例#1
0
 def _removeGameListeners(self):
     g_eventBus.removeListener(GameEvent.SCREEN_SHOT_MADE, self.__handleScreenShotMade)
     g_critMemHandler.onMemCrit -= self.__handleMemoryCriticalMessage
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleMessageByCode -= self.__onShowVehicleMessageByCode
         ctrl.onShowVehicleMessageByKey -= self.__onShowVehicleMessageByKey
     super(VehicleMessages, self)._removeGameListeners()
示例#2
0
 def __changeVehicleSetting(self, tag, entityName):
     result, error = g_sessionProvider.getEquipmentsCtrl().changeSettingByTag(
         tag, entityName=entityName, avatar=BigWorld.player()
     )
     if not result and error:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.onShowVehicleErrorByKey(error.key, error.ctx)
示例#3
0
 def __changeVehicleSetting(self, tag, entityName):
     result, error = g_sessionProvider.getEquipmentsCtrl(
     ).changeSettingByTag(tag,
                          entityName=entityName,
                          avatar=BigWorld.player())
     if not result and error:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.onShowVehicleErrorByKey(error.key, error.ctx)
示例#4
0
 def _removeGameListeners(self):
     g_eventBus.removeListener(GameEvent.SCREEN_SHOT_MADE,
                               self.__handleScreenShotMade)
     g_critMemHandler.onMemCrit -= self.__handleMemoryCriticalMessage
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleMessageByCode -= self.__onShowVehicleMessageByCode
         ctrl.onShowVehicleMessageByKey -= self.__onShowVehicleMessageByKey
     super(VehicleMessages, self)._removeGameListeners()
示例#5
0
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowPlayerMessageByCode -= self.__onShowPlayerMessageByCode
         ctrl.onShowPlayerMessageByKey -= self.__onShowPlayerMessageByKey
     ctrl = g_sessionProvider.getEquipmentsCtrl()
     if ctrl:
         ctrl.onEquipmentUpdated -= self.__onCombatEquipmentUpdated
     arena = avatar_getter.getArena()
     if arena:
         arena.onCombatEquipmentUsed -= self.__onCombatEquipmentUsed
     super(PlayerMessages, self)._removeGameListeners()
示例#6
0
    def _addGameListeners(self):
        super(VehicleMessages, self)._addGameListeners()
        g_eventBus.addListener(GameEvent.SCREEN_SHOT_MADE, self.__handleScreenShotMade)
        for message in g_critMemHandler.messages:
            self.__handleMemoryCriticalMessage(message)

        g_critMemHandler.onMemCrit += self.__handleMemoryCriticalMessage
        ctrl = g_sessionProvider.getBattleMessagesCtrl()
        if ctrl:
            ctrl.onShowVehicleMessageByCode += self.__onShowVehicleMessageByCode
            ctrl.onShowVehicleMessageByKey += self.__onShowVehicleMessageByKey
            ctrl.onUIPopulated()
示例#7
0
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowPlayerMessageByCode -= self.__onShowPlayerMessageByCode
         ctrl.onShowPlayerMessageByKey -= self.__onShowPlayerMessageByKey
     ctrl = g_sessionProvider.getEquipmentsCtrl()
     if ctrl:
         ctrl.onEquipmentUpdated -= self.__onCombatEquipmentUpdated
     arena = avatar_getter.getArena()
     if arena:
         arena.onCombatEquipmentUsed -= self.__onCombatEquipmentUsed
     super(PlayerMessages, self)._removeGameListeners()
示例#8
0
    def _addGameListeners(self):
        super(VehicleMessages, self)._addGameListeners()
        g_eventBus.addListener(GameEvent.SCREEN_SHOT_MADE,
                               self.__handleScreenShotMade)
        for message in g_critMemHandler.messages:
            self.__handleMemoryCriticalMessage(message)

        g_critMemHandler.onMemCrit += self.__handleMemoryCriticalMessage
        ctrl = g_sessionProvider.getBattleMessagesCtrl()
        if ctrl:
            ctrl.onShowVehicleMessageByCode += self.__onShowVehicleMessageByCode
            ctrl.onShowVehicleMessageByKey += self.__onShowVehicleMessageByKey
            ctrl.onUIPopulated()
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleErrorByKey -= self.__onShowVehicleErrorByKey
     super(VehicleErrorMessages, self)._removeGameListeners()
示例#10
0
 def __showInfoMessage(self, msg, args = None):
     from gui.battle_control import g_sessionProvider
     if not self.isTimeWarpInProgress:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.showInfoMessage(msg, True, args)
示例#11
0
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleErrorByKey -= self.__onShowVehicleErrorByKey
     super(VehicleErrorMessages, self)._removeGameListeners()
示例#12
0
 def __showInfoMessage(self, msg, args=None):
     from gui.battle_control import g_sessionProvider
     if not self.isTimeWarpInProgress:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.showInfoMessage(msg, True, args)