예제 #1
0
 def getExperienceBlock(self):
     event = self._event
     eventType = self._event.getType()
     method = event.getMethod()
     op = event.getObjectiveParameter()
     opName = EVENT_BOARDS.summary_param_all(method, op)
     opValue = self._excelItem.getP1()
     rank = self._excelItem.getRank()
     battles = self._excelItem.getP3()
     battleIcon = self._iconByType[op]
     groupPos = self.__getRibbon()
     positionTooltip = makeTooltip(
         TOOLTIPS.elen_summary_rank(groupPos) if groupPos else TOOLTIPS.
         ELEN_SUMMARY_RANK_NORANK)
     battleTooltip = makeTooltip(
         TOOLTIPS.ELEN_SUMMARY_BATTLES_HEADER,
         TOOLTIPS.elen_summary_battles_all_body(eventType))
     experienceTooltip = makeTooltip(
         TOOLTIPS.elen_excel_objparam_all_all_header(method, op),
         TOOLTIPS.elen_excel_objparam_all_all_body(method, op))
     return {
         'experienceValue': str(opValue),
         'experience': opName,
         'position': _ms(EVENT_BOARDS.SUMMARY_POSITION, position=str(rank)),
         'battleValue': str(battles),
         'battle': _ms(EVENT_BOARDS.SUMMARY_BATTLES),
         'experienceIcon': battleIcon,
         'ribbon': groupPos,
         'battleIcon':
         RES_ICONS.MAPS_ICONS_EVENTBOARDS_POPUPICONS_BATTLE_POPUP,
         'experienceTooltip': experienceTooltip,
         'positionTooltip': positionTooltip,
         'battleTooltip': battleTooltip
     }
예제 #2
0
def makeTableHeaderVO(method, objective, eventType):
    if objective == _op.WINS:
        icons = (RES_ICONS.getEventBoardIcon('win_quantity'),
                 RES_ICONS.getEventBoardIcon('battle_exp_average'),
                 RES_ICONS.getEventBoardIcon('battle_quantity'))
    else:
        try:
            icons = [
                (RES_ICONS.getEventBoardIcon(icon) if '%s' not in icon else
                 RES_ICONS.getEventBoardIcon(icon %
                                             _OBJECTIVE_STRINGS[objective]))
                for icon in _METHOD_ICON_NAMES[method]
            ]
        except KeyError:
            LOG_ERROR('WGELEN: Wrong method/objective: %s/%s!' %
                      (method, objective))
            return None

    return {
        'columns': [{
            'tooltip':
            makeTooltip(
                TOOLTIPS.elen_excel_objparam_all_all_header(method, objective),
                TOOLTIPS.elen_excel_objparam_all_all_body(method, objective)),
            'icon':
            icons[0]
        }, {
            'tooltip':
            makeTooltip(
                TOOLTIPS.elen_excel_addparam_all_all_header(method, objective),
                TOOLTIPS.elen_excel_addparam_all_all_body(method, objective)),
            'icon':
            icons[1]
        }, {
            'tooltip':
            makeTooltip(
                TOOLTIPS.ELEN_EXCEL_INFOPARAM_WINS_HEADER,
                TOOLTIPS.elen_excel_infoparam_wins_all_body(eventType)),
            'icon':
            icons[2]
        }],
        'positionTooltip':
        makeTooltip(TOOLTIPS.ELEN_EXCEL_POSITION_HEADER,
                    TOOLTIPS.ELEN_EXCEL_POSITION_BODY),
        'playerTooltip':
        makeTooltip(TOOLTIPS.ELEN_EXCEL_PLAYER_HEADER,
                    TOOLTIPS.ELEN_EXCEL_PLAYER_BODY)
    }