示例#1
0
 def _requestClanInfo(self):
     isShowClanProfileBtnVisible = False
     if self.lobbyContext.getServerSettings().clanProfile.isEnabled():
         isShowClanProfileBtnVisible = True
     clanDBID, clanInfo = self.itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         clanData = {
             'id':
             clanDBID,
             'header':
             clanInfo.getClanName(),
             'topLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
             'topValue':
             text_styles.main(getClanRoleString(
                 clanInfo.getMembersFlags())),
             'bottomLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
             'bottomValue':
             text_styles.main(
                 backport.getLongDateFormat(clanInfo.getJoiningTime()))
         }
         btnParams = self._getClanBtnParams(isShowClanProfileBtnVisible)
         clanData.update(btnParams)
         self.as_setClanDataS(clanData)
         self.requestClanEmblem32x32(clanDBID)
     return
示例#2
0
 def _requestClanInfo(self):
     if self.clansCtrl.isEnabled():
         isShowClanProfileBtnVisible = True
     else:
         isShowClanProfileBtnVisible = self.__isFortClanProfileAvailable()
     clanDBID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         clanData = {
             'id':
             clanDBID,
             'header':
             clanInfo.getClanName(),
             'topLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
             'topValue':
             text_styles.main(getClanRoleString(
                 clanInfo.getMembersFlags())),
             'bottomLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
             'bottomValue':
             text_styles.main(
                 BigWorld.wg_getLongDateFormat(clanInfo.getJoiningTime()))
         }
         btnParams = self._getClanBtnParams(isShowClanProfileBtnVisible)
         clanData.update(btnParams)
         self.as_setClanDataS(clanData)
         self.requestClanEmblem32x32(clanDBID)
     return
    def __makeRosters(self):
        result = []
        for dbID in self.__fixedPlayers:
            player = findFirst(lambda m: m.getID() == dbID, g_clanCache.clanMembers)
            if player is not None:
                intTotalMining, intWeekMining = self.fortCtrl.getFort().getPlayerContributions(dbID)
                role = text_styles.standard(i18n.makeString(getClanRoleString(player.getClanRole())))
                roleID = self.CLAN_MEMBER_ROLES.index(player.getClanRole())
                vo = vo_converters.makeSimpleClanListRenderVO(player, intTotalMining, intWeekMining, role, roleID)
                result.append(vo)

        return result
示例#4
0
    def __makeRosters(self):
        result = []
        for dbID in self.__fixedPlayers:
            player = findFirst(lambda m: m.getID() == dbID, g_clanCache.clanMembers)
            if player is not None:
                intTotalMining, intWeekMining = self.fortCtrl.getFort().getPlayerContributions(dbID)
                role = text_styles.standard(i18n.makeString(getClanRoleString(player.getClanRole())))
                roleID = self.CLAN_MEMBER_ROLES.index(player.getClanRole())
                vo = vo_converters.makeSimpleClanListRenderVO(player, intTotalMining, intWeekMining, role, roleID)
                result.append(vo)

        return result
 def _requestClanInfo(self):
     if self.clansCtrl.isEnabled():
         isShowClanProfileBtnVisible = True
     else:
         isShowClanProfileBtnVisible = self.__isFortClanProfileAvailable()
     clanDBID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         clanData = {'id': clanDBID,
          'header': clanInfo.getClanName(),
          'topLabel': _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
          'topValue': text_styles.main(getClanRoleString(clanInfo.getMembersFlags())),
          'bottomLabel': _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
          'bottomValue': text_styles.main(BigWorld.wg_getLongDateFormat(clanInfo.getJoiningTime()))}
         btnParams = self._getClanBtnParams(isShowClanProfileBtnVisible)
         clanData.update(btnParams)
         self.as_setClanDataS(clanData)
         self.requestClanEmblem32x32(clanDBID)
     return
示例#6
0
 def getClanRoleUserString(self):
     position = self.clanInfo[3]
     return getClanRoleString(position)
示例#7
0
 def _getClanRole(self, member):
     return text_styles.standard(i18n.makeString(getClanRoleString(member.getClanRole())))
示例#8
0
 def getClanRoleUserString(self):
     position = self.clanInfo[3]
     return getClanRoleString(position)
示例#9
0
 def getRoleString(self):
     return clans_fmts.getClanRoleString(self.role_bw_flag)
示例#10
0
 def getRoleString(self):
     return clans_fmts.getClanRoleString(self.role_bw_flag)
示例#11
0
 def getRoleUserString(self):
     return clans_fmts.getClanRoleString(self.getRole())
 def _getClanRole(self, member):
     return text_styles.standard(i18n.makeString(getClanRoleString(member.getClanRole())))
示例#13
0
 def getRoleUserString(self):
     return clans_fmts.getClanRoleString(self.getRole())