Example #1
0
    def create(self, mapName):
        global _V_START_POS
        global _V_START_ANGLES
        try:
            LOG_DEBUG('OfflineMapCreator.Create( %s )' % mapName)
            g_appLoader.showBattlePage()
            cfgType = 'basic'
            self.__loadCfg(cfgType, mapName)
            BigWorld.worldDrawEnabled(False)
            BigWorld.setWatcher('Visibility/GUI', False)
            self.__spaceId = BigWorld.createSpace()
            self.__isActive = True
            self.__arenaTypeID = self.__getArenaTypeId(mapName)
            self.__spaceMappingId = BigWorld.addSpaceGeometryMapping(self.__spaceId, None, 'spaces/' + mapName)
            self.__vEntityId = BigWorld.createEntity('Avatar', self.__spaceId, 0, _V_START_POS, (_V_START_ANGLES[2], _V_START_ANGLES[1], _V_START_ANGLES[0]), {})
            avatar = BigWorld.entities[self.__vEntityId]
            avatar.arenaUniqueID = 0
            avatar.arenaTypeID = self.__arenaTypeID
            avatar.arenaBonusType = constants.ARENA_BONUS_TYPE.UNKNOWN
            avatar.arenaGuiType = constants.ARENA_GUI_TYPE.UNKNOWN
            avatar.arenaExtraData = {}
            avatar.weatherPresetID = 0
            BigWorld.player(avatar)
            self.__setupCamera()
            BigWorld.worldDrawEnabled(True)
        except:
            LOG_DEBUG('OfflineMapCreator.Create( %s ): FAILED with: ' % mapName)
            LOG_CURRENT_EXCEPTION()
            self.cancel()

        return
Example #2
0
    def create(self, mapName):
        global _V_START_POS
        global _V_START_ANGLES
        try:
            LOG_DEBUG('OfflineMapCreator.Create( %s )' % mapName)
            g_appLoader.showBattlePage()
            cfgType = 'basic'
            self.__loadCfg(cfgType, mapName)
            BigWorld.worldDrawEnabled(False)
            BigWorld.setWatcher('Visibility/GUI', False)
            self.__spaceId = BigWorld.createSpace()
            self.__isActive = True
            self.__arenaTypeID = self._arenaTypeIDByArenaName.get(mapName)
            self.__accountID = BigWorld.createEntity(
                'Account', self.__spaceId, 0, _V_START_POS,
                (_V_START_ANGLES[2], _V_START_ANGLES[1], _V_START_ANGLES[0]),
                dict())
            self.__spaceMappingId = BigWorld.addSpaceGeometryMapping(
                self.__spaceId, None, 'spaces/' + mapName)
            self.__vEntityId = BigWorld.createEntity(
                'Avatar', self.__spaceId, 0, _V_START_POS,
                (_V_START_ANGLES[2], _V_START_ANGLES[1], _V_START_ANGLES[0]),
                dict())
            BigWorld.player(BigWorld.entities[self.__vEntityId])
            self.__setupCamera()
            BigWorld.worldDrawEnabled(True)
        except:
            LOG_DEBUG('OfflineMapCreator.Create( %s ): FAILED with: ' %
                      mapName)
            LOG_CURRENT_EXCEPTION()
            self.cancel()

        return
 def arenaLoadCompleted(self):
     self.__isCompleted = True
     g_appLoader.showBattlePage()
     BigWorld.wg_setReducedFpsMode(False)
     from messenger import MessengerEntry
     MessengerEntry.g_instance.onAvatarShowGUI()
     BigWorld.wg_clearTextureReuseList()
     if self._viewComponents:
         for cmp in self._viewComponents:
             cmp.arenaLoadCompleted()
Example #4
0
 def arenaLoadCompleted(self):
     self.__isCompleted = True
     g_appLoader.showBattlePage()
     BigWorld.wg_setReducedFpsMode(False)
     from messenger import MessengerEntry
     MessengerEntry.g_instance.onAvatarShowGUI()
     BigWorld.enableLoadingTimer(False)
     uniprof.exitFromRegion('avatar.arena.loading')
     uniprof.enterToRegion('avatar.arena.battle')
     BigWorld.wg_clearTextureReuseList()
     if self._viewComponents:
         for component in self._viewComponents:
             component.arenaLoadCompleted()
Example #5
0
 def arenaLoadCompleted(self):
     g_appLoader.showBattlePage()
     BigWorld.wg_setReducedFpsMode(False)
     from messenger import MessengerEntry
     MessengerEntry.g_instance.onAvatarShowGUI()
     BigWorld.wg_clearTextureReuseList()