def userAddToClan(self): self.as_showWaitingS(WAITING.CLANS_INVITES_SEND, {}) profile = g_clanCtrl.getAccountProfile() context = CreateInviteCtx(profile.getClanDbID(), [self.__databaseID]) result = yield g_clanCtrl.sendRequest(context, allowDelay=True) if result.isSuccess(): SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(profile.getClanName(), profile.getClanAbbrev())) self.as_hideWaitingS()
def sendRequest(self): self.as_setWaitingVisibleS(True) context = CreateApplicationCtx([self.__selectedClan.getClanDbID()]) result = yield g_clanCtrl.sendRequest(context, allowDelay=True) if result.isSuccess(): SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(self.__selectedClan.getClanName(), self.__selectedClan.getClanAbbrev())) self._updateSetaledState() self.as_setWaitingVisibleS(False)
def sendRequest(self): self.as_setWaitingVisibleS(True) context = CreateApplicationCtx([self.__selectedClan.getClanDbID()]) result = yield self.clansCtrl.sendRequest(context, allowDelay=True) if result.isSuccess(): SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(self.__selectedClan.getClanName(), self.__selectedClan.getClanAbbrev())) self._updateSetaledState() self.as_setWaitingVisibleS(False)
def sendClanInvite(self): profile = g_clanCtrl.getAccountProfile() context = CreateInviteCtx(profile.getClanDbID(), [self.databaseID]) result = yield g_clanCtrl.sendRequest(context, allowDelay=True) if result.isSuccess(): SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(profile.getClanName(), profile.getClanAbbrev())) else: SystemMessages.pushMessage(clans_fmts.getInvitesNotSentSysMsg([self.userName or '']), type=SystemMessages.SM_TYPE.Error)
def _sendApplication(self): self.as_showWaitingS(True) context = CreateApplicationCtx([self._clanDossier.getDbID()]) result = yield self.clansCtrl.sendRequest(context, allowDelay=True) if result.isSuccess(): clanInfo = yield self._clanDossier.requestClanInfo() SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(clanInfo.getClanName(), clanInfo.getTag())) self._onAppSuccessfullySent() self.as_showWaitingS(False)
def _sendApplication(self): self.as_showWaitingS(True) context = CreateApplicationCtx([self._clanDossier.getDbID()]) result = yield g_clanCtrl.sendRequest(context, allowDelay=True) if result.isSuccess(): clanInfo = yield self._clanDossier.requestClanInfo() SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(clanInfo.getClanName(), clanInfo.getTag())) self._onAppSuccessfullySent() self.as_showWaitingS(False)