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
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
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 getClanRoleUserString(self): position = self.clanInfo[3] return getClanRoleString(position)
def _getClanRole(self, member): return text_styles.standard(i18n.makeString(getClanRoleString(member.getClanRole())))
def getRoleString(self): return clans_fmts.getClanRoleString(self.role_bw_flag)
def getRoleUserString(self): return clans_fmts.getClanRoleString(self.getRole())