def __pe_onPrebattlesListReceived(self, prbType, _, prebattles): if prbType != PREBATTLE_TYPE.COMPANY: return if self.__ctx: self.__ctx.stopProcessing(True) self.__ctx = None self.__callback(prb_seqs.PrbListIterator(reversed(prebattles)))
def __pe_onPrebattlesListReceived(self, prbType, count, prebattles): """ Listener for event of trainings list receive Args: prbType: items prebattle type count: items count prebattles: items, which are list of (sort key, prebattle ID, prebattle cache data like PREBATTLE_CACHE_KEY -> data """ if prbType != PREBATTLE_TYPE.TRAINING: return self.__callback(prb_seqs.PrbListIterator(prebattles)) self.__setTimeout()
def __pe_onPrebattlesListReceived(self, prbType, count, prebattles): """ Listener for event of companies list receive Args: prbType: items prebattle type count: items count prebattles: items, which are list of (sort key, prebattle ID, prebattle cache data like PREBATTLE_CACHE_KEY -> data """ if prbType != PREBATTLE_TYPE.COMPANY: return else: if self.__ctx: self.__ctx.stopProcessing(True) self.__ctx = None self.__callback(prb_seqs.PrbListIterator(reversed(prebattles))) return
def __pe_onPrebattlesListReceived(self, prbType, count, prebattles): if prbType != PREBATTLE_TYPE.TRAINING: return self.__callback(prb_seqs.PrbListIterator(prebattles)) self.__setTimeout()