Beispiel #1
0
 def __doRequestToAssignMember(self, pID):
     ctx = AssignLegacyCtx(
         pID,
         self._getPlayerTeam() | PREBATTLE_ROSTER.ASSIGNED,
         'prebattle/assign')
     result = yield self.prbDispatcher.sendPrbRequest(ctx)
     if not result:
         self._showActionErrorMessage(ctx.getLastErrorString())
 def changeTeam(self, accID, slot):
     roster = int(slot)
     if not slot:
         roster = self.prbEntity.getRosterKey(accID)
         if not roster & PREBATTLE_ROSTER.UNASSIGNED:
             roster |= PREBATTLE_ROSTER.UNASSIGNED
     ctx = AssignLegacyCtx(accID, roster, waitingID='prebattle/assign')
     result = yield self.prbDispatcher.sendPrbRequest(ctx)
     if not result:
         self._showActionErrorMessage(ctx.getLastErrorString())