예제 #1
0
 def __onRoundFinished(self, winnerTeam, reason):
     if BattleReplay.g_replayCtrl.isPlaying:
         return
     else:
         g_bootcampEvents.onUIStateChanged(UI_STATE.STOP)
         gui_event_dispatcher.toggleGUIVisibility()
         from gui.Scaleform.daapi.settings.views import VIEW_ALIAS
         from gui.shared import events, g_eventBus, EVENT_BUS_SCOPE
         asBattleResultType = BOOTCAMP_BATTLE_RESULT_MESSAGE.DEFEAT
         if winnerTeam == BigWorld.player().team:
             asBattleResultType = BOOTCAMP_BATTLE_RESULT_MESSAGE.VICTORY
         elif winnerTeam == 0:
             asBattleResultType = BOOTCAMP_BATTLE_RESULT_MESSAGE.DRAW
         g_bootcamp.setBattleResults(BigWorld.player().arenaUniqueID,
                                     asBattleResultType, reason)
         LOG_DEBUG('Show battle result final message.')
         g_eventBus.handleEvent(
             events.LoadViewEvent(
                 VIEW_ALIAS.BOOTCAMP_BATTLE_FINISHED_WINDOW, None),
             EVENT_BUS_SCOPE.BATTLE)
         if asBattleResultType == BOOTCAMP_BATTLE_RESULT_MESSAGE.VICTORY:
             SoundGroups.g_instance.playSound2D('vo_bc_victory')
         elif asBattleResultType == BOOTCAMP_BATTLE_RESULT_MESSAGE.DEFEAT:
             SoundGroups.g_instance.playSound2D('vo_bc_defeat')
         elif asBattleResultType == BOOTCAMP_BATTLE_RESULT_MESSAGE.DRAW:
             SoundGroups.g_instance.playSound2D('vo_bc_draw')
         return
 def __onRoundFinished(self, winnerTeam, reason):
     if BattleReplay.g_replayCtrl.isPlaying:
         return
     g_bootcampEvents.onUIStateChanged(UI_STATE.STOP)
     g_bootcampEvents.hideGUIForWinMessage()
     asBattleResultType = BOOTCAMP_BATTLE_RESULT_MESSAGE.DEFEAT
     if winnerTeam == BigWorld.player().team:
         asBattleResultType = BOOTCAMP_BATTLE_RESULT_MESSAGE.VICTORY
     elif winnerTeam == 0:
         asBattleResultType = BOOTCAMP_BATTLE_RESULT_MESSAGE.DRAW
     g_bootcamp.setBattleResults(BigWorld.player().arenaUniqueID,
                                 asBattleResultType, reason)
예제 #3
0
 def onKickedFromArena(self, reasonCode):
     arenaID = BigWorld.player().arenaUniqueID
     g_bootcamp.setBattleResults(arenaID,
                                 BOOTCAMP_BATTLE_RESULT_MESSAGE.FAILURE,
                                 reasonCode)
     g_bootcampEvents.onUIStateChanged(UI_STATE.STOP)
예제 #4
0
 def onKickedFromArena(self, reasonCode):
     arenaID = BigWorld.player().arenaUniqueID
     g_bootcamp.setBattleResults(arenaID,
                                 BOOTCAMP_BATTLE_RESULT_MESSAGE.FAILURE,
                                 reasonCode)