예제 #1
0
 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)
예제 #2
0
 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)
     showClanInviteSystemMsg(self.__userName, result.isSuccess(), result.getCode())
     self.__updateAddToClanBtn()
     self.as_hideWaitingS()
예제 #3
0
 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()
예제 #4
0
 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)
     showClanInviteSystemMsg(self.__userName, result.isSuccess(), result.getCode())
     self.__updateAddToClanBtn()
     self.as_hideWaitingS()
예제 #5
0
 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)
예제 #6
0
 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)
예제 #7
0
 def handleAction(self, model, entityID, action):
     super(_AcceptClanInviteHandler, self).handleAction(model, entityID, action)
     entity = model.getNotification(self.getNotType(), entityID).getEntity()
     clanName = entity.getClanName()
     clanTag = entity.getClanTag()
     result = yield showAcceptClanInviteDialog(clanName, clanTag)
     if result:
         reqResult = yield g_clanCtrl.sendRequest(clan_ctxs.AcceptInviteCtx(self._getInviteID(model, entityID)), allowDelay=True)
         if reqResult.isSuccess():
             showClanJoinAward(clanName, clanTag, entity.getClanId())
예제 #8
0
 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)
예제 #9
0
 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)
예제 #10
0
 def handleAction(self, model, entityID, action):
     super(_AcceptClanInviteHandler,
           self).handleAction(model, entityID, action)
     entity = model.getNotification(self.getNotType(), entityID).getEntity()
     clanName = entity.getClanName()
     clanTag = entity.getClanTag()
     result = yield showAcceptClanInviteDialog(clanName, clanTag)
     if result:
         reqResult = yield g_clanCtrl.sendRequest(clan_ctxs.AcceptInviteCtx(
             self._getInviteID(model, entityID)),
                                                  allowDelay=True)
         if reqResult.isSuccess():
             showClanJoinAward(clanName, clanTag, entity.getClanId())
예제 #11
0
 def sendClanInvite(self):
     profile = g_clanCtrl.getAccountProfile()
     userName = self.userName
     context = CreateInviteCtx(profile.getClanDbID(), [self.databaseID])
     result = yield g_clanCtrl.sendRequest(context, allowDelay=True)
     showClanInviteSystemMsg(userName, result.isSuccess(), result.getCode())
예제 #12
0
 def handleAction(self, model, entityID, action):
     super(_DeclineClanInviteHandler,
           self).handleAction(model, entityID, action)
     yield g_clanCtrl.sendRequest(clan_ctxs.DeclineInviteCtx(
         self._getInviteID(model, entityID)),
                                  allowDelay=True)
예제 #13
0
 def handleAction(self, model, entityID, action):
     super(_DeclineClanAppHandler,
           self).handleAction(model, entityID, action)
     yield g_clanCtrl.sendRequest(clan_ctxs.DeclineApplicationCtx(
         self._getApplicationID(model, entityID)),
                                  allowDelay=True)
예제 #14
0
 def handleAction(self, model, entityID, action):
     super(_DeclineClanInviteHandler, self).handleAction(model, entityID, action)
     yield g_clanCtrl.sendRequest(clan_ctxs.DeclineInviteCtx(self._getInviteID(model, entityID)), allowDelay=True)
예제 #15
0
 def handleAction(self, model, entityID, action):
     super(_AcceptClanInviteHandler, self).handleAction(model, entityID, action)
     entity = model.getNotification(self.getNotType(), entityID).getEntity()
     result = yield showAcceptClanInviteDialog(entity.getClanName(), entity.getClanTag())
     if result:
         yield g_clanCtrl.sendRequest(clan_ctxs.AcceptInviteCtx(self._getInviteID(model, entityID)), allowDelay=True)
예제 #16
0
 def handleAction(self, model, entityID, action):
     super(_DeclineClanAppHandler, self).handleAction(model, entityID, action)
     yield g_clanCtrl.sendRequest(clan_ctxs.DeclineApplicationCtx(self._getApplicationID(model, entityID)), allowDelay=True)
예제 #17
0
 def sendClanInvite(self):
     profile = g_clanCtrl.getAccountProfile()
     userName = self.userName
     context = CreateInviteCtx(profile.getClanDbID(), [self.databaseID])
     result = yield g_clanCtrl.sendRequest(context, allowDelay=True)
     showClanInviteSystemMsg(userName, result.isSuccess(), result.getCode())