def init(self, ctx=None): self.__playersMatchingStartedAt = None self.__slotVehicleFilters = [] self.storage.release() ret = super(StrongholdEntity, self).init(ctx) rev = self._getUnitRevision() if rev > 1: self.requestUpdateStronghold() self.requestSlotVehicleFilters() unitMgr = prb_getters.getClientUnitMgr() if unitMgr: unitMgr.onUnitResponseReceived += self.onUnitResponseReceived unitMgr.onUnitNotifyReceived += self.onUnitNotifyReceived self.__strongholdSettings.init() self.__strongholdUpdateEventsMapping = {'header': self.__onUpdateHeader, 'timer': self.__onUpdateTimer, 'state': self.__onUpdateState, 'reserve': self.__onUpdateReserve} playerInfo = self.getPlayerInfo() self.__isInSlot = playerInfo.isInSlot if self.canShowStrongholdsBattleQueue(): g_eventDispatcher.showStrongholdsBattleQueue() else: g_eventDispatcher.loadStrongholds() return ret
def executeInit(self, ctx): prbType = self._entity.getEntityType() flags = self._entity.getFlags() g_eventDispatcher.loadStrongholds(prbType) if flags.isInIdle(): g_eventDispatcher.setUnitProgressInCarousel(prbType, True) return FUNCTIONAL_FLAG.LOAD_WINDOW
def init(self, ctx=None): self.storage.release() ret = super(StrongholdEntity, self).init(ctx) _, unit = self.getUnit() if unit._extras.get('rev', 0) > 1: self.requestUpdateStronghold() unitMgr = prb_getters.getClientUnitMgr() if unitMgr: unitMgr.onUnitResponseReceived += self.onUnitResponseReceived unitMgr.onUnitNotifyReceived += self.onUnitNotifyReceived self.__strongholdSettings.init() self.__strongholdUpdateEventsMapping = { 'header': self.__onUpdateHeader, 'timer': self.__onUpdateTimer, 'state': self.__onUpdateState, 'reserve': self.__onUpdateReserve } playerInfo = self.getPlayerInfo() self.__isInSlot = playerInfo.isInSlot if isLeaguesEnabled() and self.hasLockedState(): g_eventDispatcher.showStrongholdsBattleQueue() else: g_eventDispatcher.loadStrongholds() return ret
def __showBattleRoom(): g_eventDispatcher.loadStrongholds() g_eventDispatcher.loadHangar()
def _loadUnit(self): g_eventDispatcher.loadStrongholds(self._prbType)