Пример #1
0
 def __populateData(self, isMutlipleTeams = False):
     arena = avatar_getter.getArena()
     arenaDP = g_sessionProvider.getArenaDP()
     arenaData = ['',
      0,
      '',
      '',
      '']
     if arena:
         arenaData = [toUpper(arena.arenaType.name)]
         descExtra = getPrebattleFullDescription(arena.extraData or {})
         arenaSubType = getArenaSubTypeName(BigWorld.player().arenaTypeID)
         if descExtra:
             arenaData.extend([arena.guiType + 1, descExtra])
         elif arena.guiType in [constants.ARENA_GUI_TYPE.RANDOM, constants.ARENA_GUI_TYPE.TRAINING]:
             arenaTypeName = '#arenas:type/%s/name' % arenaSubType
             arenaData.extend([getNecessaryArenaFrameName(arenaSubType, isBaseExists(BigWorld.player().arenaTypeID, BigWorld.player().team)), arenaTypeName])
         elif arena.guiType in constants.ARENA_GUI_TYPE.RANGE:
             arenaData.append(constants.ARENA_GUI_TYPE_LABEL.LABELS[arena.guiType])
             if arena.guiType == constants.ARENA_GUI_TYPE.EVENT_BATTLES and hasResourcePoints():
                 arenaData.append(i18n.makeString(MENU.LOADING_BATTLETYPES_RESOURCEPOINTS_UPPER))
             elif arena.guiType == constants.ARENA_GUI_TYPE.EVENT_BATTLES and isMutlipleTeams:
                 arenaData.append(i18n.makeString(MENU.LOADING_BATTLETYPES_MIX_UPPER))
             else:
                 arenaData.append('#menu:loading/battleTypes/%d' % arena.guiType)
         else:
             arenaData.extend([arena.guiType + 1, '#menu:loading/battleTypes/%d' % arena.guiType])
         myTeamNumber = arenaDP.getNumberOfTeam()
         getTeamName = g_sessionProvider.getCtx().getTeamName
         arenaData.extend([getTeamName(myTeamNumber), getTeamName(arenaDP.getNumberOfTeam(enemy=True))])
         teamHasBase = 1 if isBaseExists(BigWorld.player().arenaTypeID, myTeamNumber) else 2
         if not isEventBattle():
             typeEvent = 'normal'
             winText = getBattleSubTypeWinText(BigWorld.player().arenaTypeID, teamHasBase)
         else:
             typeEvent = 'fallout'
             if getIsMultiteam():
                 winText = i18n.makeString(ARENAS.TYPE_FALLOUTMUTLITEAM_DESCRIPTION)
             else:
                 winText = i18n.makeString('#arenas:type/%s/description' % arenaSubType)
         arenaData.append(winText)
         arenaData.append(typeEvent)
         vehInfo = arenaDP.getVehicleInfo(arenaDP.getPlayerVehicleID())
         pqTipData = [None] * 3
         pQuests = vehInfo.player.getPotapovQuests()
         serverSettings = g_lobbyContext.getServerSettings()
         isPQEnabled = serverSettings is not None and serverSettings.isPotapovQuestEnabled()
         if isPQEnabled and (arena.guiType == constants.ARENA_GUI_TYPE.RANDOM or arena.guiType == constants.ARENA_GUI_TYPE.TRAINING and constants.IS_DEVELOPMENT):
             if len(pQuests):
                 quest = pQuests[0]
                 pqTipData = [quest.getUserName(), quest.getUserMainCondition(), quest.getUserAddCondition()]
             else:
                 pqTipData = [i18n.makeString('#ingame_gui:potapovQuests/tip'), None, None]
         arenaData.extend(pqTipData)
         arenaData.extend([getArenaIcon(_SMALL_MAP_SOURCE)])
     self.__callEx('arenaData', arenaData)
     return
Пример #2
0
 def __populateData(self, isMutlipleTeams = False):
     arena = avatar_getter.getArena()
     arenaDP = g_sessionProvider.getArenaDP()
     arenaData = ['',
      0,
      '',
      '',
      '']
     if arena:
         arenaData = [toUpper(arena.arenaType.name)]
         descExtra = getPrebattleFullDescription(arena.extraData or {})
         arenaSubType = getArenaSubTypeName(BigWorld.player().arenaTypeID)
         if descExtra:
             arenaData.extend([arena.guiType + 1, descExtra])
         elif arena.guiType in [constants.ARENA_GUI_TYPE.RANDOM, constants.ARENA_GUI_TYPE.TRAINING]:
             arenaTypeName = '#arenas:type/%s/name' % arenaSubType
             arenaData.extend([getNecessaryArenaFrameName(arenaSubType, isBaseExists(BigWorld.player().arenaTypeID, BigWorld.player().team)), arenaTypeName])
         elif arena.guiType in constants.ARENA_GUI_TYPE.RANGE:
             arenaData.append(constants.ARENA_GUI_TYPE_LABEL.LABELS[arena.guiType])
             if arena.guiType == constants.ARENA_GUI_TYPE.EVENT_BATTLES and hasResourcePoints():
                 arenaData.append(i18n.makeString(MENU.LOADING_BATTLETYPES_RESOURCEPOINTS_UPPER))
             elif arena.guiType == constants.ARENA_GUI_TYPE.EVENT_BATTLES and isMutlipleTeams:
                 arenaData.append(i18n.makeString(MENU.LOADING_BATTLETYPES_MIX_UPPER))
             else:
                 arenaData.append('#menu:loading/battleTypes/%d' % arena.guiType)
         else:
             arenaData.extend([arena.guiType + 1, '#menu:loading/battleTypes/%d' % arena.guiType])
         myTeamNumber = arenaDP.getNumberOfTeam()
         getTeamName = g_sessionProvider.getCtx().getTeamName
         arenaData.extend([getTeamName(myTeamNumber), getTeamName(arenaDP.getNumberOfTeam(enemy=True))])
         teamHasBase = 1 if isBaseExists(BigWorld.player().arenaTypeID, myTeamNumber) else 2
         if not isEventBattle():
             typeEvent = 'normal'
             winText = getBattleSubTypeWinText(BigWorld.player().arenaTypeID, teamHasBase)
         else:
             typeEvent = 'fallout'
             if getIsMultiteam():
                 winText = i18n.makeString(ARENAS.TYPE_FALLOUTMUTLITEAM_DESCRIPTION)
             else:
                 winText = i18n.makeString('#arenas:type/%s/description' % arenaSubType)
         arenaData.append(winText)
         arenaData.append(typeEvent)
         vehInfo = arenaDP.getVehicleInfo(arenaDP.getPlayerVehicleID())
         pqTipData = [None] * 3
         pQuests = vehInfo.player.getPotapovQuests()
         serverSettings = g_lobbyContext.getServerSettings()
         isPQEnabled = serverSettings is not None and serverSettings.isPotapovQuestEnabled()
         if isPQEnabled and (arena.guiType == constants.ARENA_GUI_TYPE.RANDOM or arena.guiType == constants.ARENA_GUI_TYPE.TRAINING and constants.IS_DEVELOPMENT):
             if len(pQuests):
                 quest = pQuests[0]
                 pqTipData = [quest.getUserName(), quest.getUserMainCondition(), quest.getUserAddCondition()]
             else:
                 pqTipData = [i18n.makeString('#ingame_gui:potapovQuests/tip'), None, None]
         arenaData.extend(pqTipData)
         arenaData.extend([getArenaIcon(_SMALL_MAP_SOURCE)])
     self.__callEx('arenaData', arenaData)
Пример #3
0
 def __populateData(self, isMutlipleTeams = False):
     arena = avatar_getter.getArena()
     arenaDP = g_sessionProvider.getArenaDP()
     arenaData = ['',
      0,
      '',
      '',
      '']
     if arena:
         arenaData = [toUpper(arena.arenaType.name)]
         descExtra = getPrebattleFullDescription(arena.extraData or {})
         arenaSubType = getArenaSubTypeName(BigWorld.player().arenaTypeID)
         if descExtra:
             arenaData.extend([arena.guiType + 1, descExtra])
         elif arena.guiType in [constants.ARENA_GUI_TYPE.RANDOM, constants.ARENA_GUI_TYPE.TRAINING]:
             arenaTypeName = '#arenas:type/%s/name' % arenaSubType
             arenaData.extend([getNecessaryArenaFrameName(arenaSubType, isBaseExists(BigWorld.player().arenaTypeID, BigWorld.player().team)), arenaTypeName])
         elif arena.guiType in constants.ARENA_GUI_TYPE.RANGE:
             arenaData.append(constants.ARENA_GUI_TYPE_LABEL.LABELS[arena.guiType])
             if arena.guiType == constants.ARENA_GUI_TYPE.EVENT_BATTLES and hasResourcePoints():
                 arenaData.append(i18n.makeString(MENU.LOADING_BATTLETYPES_RESOURCEPOINTS_UPPER))
             elif arena.guiType == constants.ARENA_GUI_TYPE.EVENT_BATTLES and isMutlipleTeams:
                 arenaData.append(i18n.makeString(MENU.LOADING_BATTLETYPES_MIX_UPPER))
             else:
                 arenaData.append('#menu:loading/battleTypes/%d' % arena.guiType)
         else:
             arenaData.extend([arena.guiType + 1, '#menu:loading/battleTypes/%d' % arena.guiType])
         myTeamNumber = arenaDP.getNumberOfTeam()
         getTeamName = g_sessionProvider.getCtx().getTeamName
         arenaData.extend([getTeamName(myTeamNumber), getTeamName(arenaDP.getNumberOfTeam(enemy=True))])
         teamHasBase = 1 if isBaseExists(BigWorld.player().arenaTypeID, myTeamNumber) else 2
         if not isEventBattle():
             typeEvent = 'normal'
             winText = getBattleSubTypeWinText(BigWorld.player().arenaTypeID, teamHasBase)
         else:
             typeEvent = 'fallout'
             if getIsMultiteam():
                 winText = i18n.makeString(ARENAS.TYPE_FALLOUTMUTLITEAM_DESCRIPTION)
             else:
                 winText = i18n.makeString('#arenas:type/%s/description' % arenaSubType)
         arenaData.append(winText)
         arenaData.append(typeEvent)
         arenaData.extend(_getQuestsTipData(arena, arenaDP))
         arenaData.extend([getArenaIcon(_SMALL_MAP_SOURCE)])
     self.__callEx('arenaData', arenaData)
Пример #4
0
 def _addArenaTypeData(self):
     arenaType = arena_info.getArenaType()
     if arenaType:
         self.as_setMapIconS(BattleLoading.SMALL_MAP_SOURCE % arenaType.geometryName)
     BigWorld.wg_setGUIBackground(arena_info.getArenaIcon(BattleLoading.MAP_BG_SOURCE))
Пример #5
0
 def _addArenaTypeData(self):
     BigWorld.wg_setGUIBackground(getArenaIcon(BattleLoading.MAP_BG_SOURCE))
Пример #6
0
 def getScreenIcon(self):
     return arena_info.getArenaIcon(settings.SCREEN_MAP_IMAGE_RES_PATH, self._arena.arenaType, self._arena.guiType)
Пример #7
0
 def getSmallIcon(self):
     return arena_info.getArenaIcon(settings.SMALL_MAP_IMAGE_SF_PATH, self._arena.arenaType, self._arena.guiType)
Пример #8
0
 def _addArenaTypeData(self):
     BigWorld.wg_setGUIBackground(getArenaIcon(BattleLoading.MAP_BG_SOURCE))