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())
def requestToUnassign(self, pID): yield self.prbDispatcher.sendPrbRequest(AssignLegacyCtx(pID, PREBATTLE_ROSTER.UNASSIGNED_IN_TEAM1, 'prebattle/assign'))
def requestToUnassignMember(self, pID): yield self.prbDispatcher.sendPrbRequest( AssignLegacyCtx( pID, self._getPlayerTeam() | PREBATTLE_ROSTER.UNASSIGNED, 'prebattle/assign'))