Пример #1
0
 def __packQuestSlot(self, quest = None):
     _getText = self.app.utilsManager.textManager.getText
     ttHeader, ttBody, ttAttention, ttNote = (None, None, None, None)
     if quest is not None:
         tile = g_eventsCache.potapov.getTiles()[quest.getTileID()]
         season = g_eventsCache.potapov.getSeasons()[tile.getSeasonID()]
         isInProgress = True
         ttHeader = quest.getUserName()
         ttBody = quests_fmts.getFullTileUserName(season, tile)
         if quest.needToGetReward():
             icon = self.app.utilsManager.getHtmlIconText(ImageUrlProperties(RES_ICONS.MAPS_ICONS_LIBRARY_ATTENTIONICONFILLED, 16, 16, -3, 0))
             description = _getText(TextType.NEUTRAL_TEXT, i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_GETAWARD, icon=icon))
             ttAttention = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_MISSIONCOMPLETE_ATTENTION)
         else:
             description = _getText(TextType.STANDARD_TEXT, quests_fmts.getPQFullDescription(quest))
             ttNote = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_MISSION_NOTE)
         title = _getText(TextType.MIDDLE_TITLE, i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_TITLE, questName=quest.getUserName()))
     else:
         title, isInProgress = '', False
         description = _getText(TextType.DISABLE_TEXT, i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_NODATA))
         ttHeader = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_EMPTY_HEADER)
         ttBody = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_EMPTY_BODY)
     return {'id': quest.getID() if quest else None,
      'title': title,
      'description': description,
      'inProgress': isInProgress,
      'completed': quest and quest.needToGetReward(),
      'ttHeader': ttHeader,
      'ttBody': ttBody,
      'ttNote': ttNote,
      'ttAttention': ttAttention}
Пример #2
0
 def __packQuestSlot(self, quest = None):
     ttHeader, ttBody, ttAttention, ttNote = (None, None, None, None)
     if quest is not None:
         tile = _getQuestsCache().getTiles()[quest.getTileID()]
         season = _getQuestsCache().getSeasons()[tile.getSeasonID()]
         isInProgress = True
         ttHeader = quest.getUserName()
         ttBody = quests_fmts.getFullTileUserName(season, tile)
         if quest.needToGetReward():
             icon = icons.makeImageTag(RES_ICONS.MAPS_ICONS_LIBRARY_ATTENTIONICONFILLED, 16, 16, -3, 0)
             description = text_styles.neutral(i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_GETAWARD, icon=icon))
             ttAttention = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_MISSIONCOMPLETE_ATTENTION)
         else:
             description = text_styles.standard(quests_fmts.getPQFullDescription(quest))
             ttNote = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_MISSION_NOTE)
         title = text_styles.middleTitle(i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_TITLE, questName=quest.getUserName()))
     else:
         title, isInProgress = '', False
         description = text_styles.disabled(i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_NODATA))
         ttHeader = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_EMPTY_HEADER)
         ttBody = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_EMPTY_BODY)
     return {'id': quest.getID() if quest else None,
      'title': title,
      'description': description,
      'inProgress': isInProgress,
      'completed': quest and quest.needToGetReward(),
      'ttHeader': ttHeader,
      'ttBody': ttBody,
      'ttNote': ttNote,
      'ttAttention': ttAttention}
Пример #3
0
 def __packQuestSlot(self, quest = None):
     ttHeader, ttBody, ttAttention, ttNote = (None, None, None, None)
     if quest is not None:
         tile = _getQuestsCache().getTiles()[quest.getTileID()]
         season = _getQuestsCache().getSeasons()[tile.getSeasonID()]
         isInProgress = True
         ttHeader = quest.getUserName()
         ttBody = quests_fmts.getFullTileUserName(season, tile)
         if quest.needToGetReward():
             icon = icons.makeImageTag(RES_ICONS.MAPS_ICONS_LIBRARY_ATTENTIONICONFILLED, 16, 16, -3, 0)
             description = text_styles.neutral(i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_GETAWARD, icon=icon))
             ttAttention = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_MISSIONCOMPLETE_ATTENTION)
         else:
             description = text_styles.standard(quests_fmts.getPQFullDescription(quest))
             ttNote = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_MISSION_NOTE)
         title = text_styles.middleTitle(i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_TITLE, questName=quest.getUserName()))
     else:
         title, isInProgress = '', False
         description = text_styles.disabled(i18n.makeString(QUESTS.PERSONAL_SEASONS_SLOTS_NODATA))
         ttHeader = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_EMPTY_HEADER)
         ttBody = i18n.makeString(TOOLTIPS.PRIVATEQUESTS_SLOT_EMPTY_BODY)
     return {'id': quest.getID() if quest else None,
      'title': title,
      'description': description,
      'inProgress': isInProgress,
      'completed': quest and quest.needToGetReward(),
      'ttHeader': ttHeader,
      'ttBody': ttBody,
      'ttNote': ttNote,
      'ttAttention': ttAttention}