Example #1
0
        public SkillsManager(ILogger <SkillsManager> logger, IGameDefinitionsPreloder definitionsPreloder, IDatabase database, IHealthManager healthManager, IAttackManager attackManager, IBuffsManager buffsManager, IStatsManager statsManager, IElementProvider elementProvider, ICountryProvider countryProvider, ICharacterConfiguration characterConfig, ILevelProvider levelProvider, IAdditionalInfoManager additionalInfoManager, IMapProvider mapProvider, ITeleportationManager teleportationManager, IMovementManager movementManager, IShapeManager shapeManager, IPartyManager partyManager, IGamePacketFactory packetFactory)
        {
            _logger = logger;
            _definitionsPreloder      = definitionsPreloder;
            _database                 = database;
            _healthManager            = healthManager;
            _attackManager            = attackManager;
            _buffsManager             = buffsManager;
            _statsManager             = statsManager;
            _elementProvider          = elementProvider;
            _countryProvider          = countryProvider;
            _characterConfig          = characterConfig;
            _levelProvider            = levelProvider;
            _additionalInfoManager    = additionalInfoManager;
            _mapProvider              = mapProvider;
            _teleportationManager     = teleportationManager;
            _movementManager          = movementManager;
            _shapeManager             = shapeManager;
            _partyManager             = partyManager;
            _packetFactory            = packetFactory;
            _levelProvider.OnLevelUp += OnLevelUp;

#if DEBUG
            _logger.LogDebug("SkillsManager {hashcode} created", GetHashCode());
#endif
        }
Example #2
0
 public GMCreateNpcHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IGameDefinitionsPreloder definitionsPreloder, IMovementManager movementManager, IMapProvider mapProvider, IGameWorld gameWorld, INpcFactory npcFactory) : base(packetFactory, gameSession)
 {
     _definitionsPreloder = definitionsPreloder;
     _movementManager     = movementManager;
     _mapProvider         = mapProvider;
     _gameWorld           = gameWorld;
     _npcFactory          = npcFactory;
 }
Example #3
0
 public RebirthHandler(IGamePacketFactory packetFactory, IGameSession gameSession, IMapProvider mapProvider, IGameWorld gameWorld, IHealthManager healthManager, ITeleportationManager teleportationManager, IMovementManager movementManager, IBuffsManager buffsManager, IInventoryManager inventoryManager, IGameDefinitionsPreloder definitionsPreloder) : base(packetFactory, gameSession)
 {
     _mapProvider          = mapProvider;
     _gameWorld            = gameWorld;
     _healthManager        = healthManager;
     _teleportationManager = teleportationManager;
     _movementManager      = movementManager;
     _buffsManager         = buffsManager;
     _inventoryManager     = inventoryManager;
     _definitionsPreloder  = definitionsPreloder;
 }
Example #4
0
        public QuestsManager(ILogger <QuestsManager> logger, IGameDefinitionsPreloder definitionsPreloader, IMapProvider mapProvider, IGameWorld gameWorld, IDatabase database, IPartyManager partyManager, IInventoryManager inventoryManager, IDatabasePreloader databasePreloader, IItemEnchantConfiguration enchantConfig, IItemCreateConfiguration itemCreateConfig, ILevelingManager levelingManager)
        {
            _logger = logger;
            _definitionsPreloader = definitionsPreloader;
            _mapProvider          = mapProvider;
            _gameWorld            = gameWorld;
            _database             = database;
            _partyManager         = partyManager;
            _inventoryManager     = inventoryManager;
            _databasePreloader    = databasePreloader;
            _enchantConfig        = enchantConfig;
            _itemCreateConfig     = itemCreateConfig;
            _levelingManager      = levelingManager;
#if DEBUG
            _logger.LogDebug("QuestsManager {hashcode} created", GetHashCode());
#endif
        }
Example #5
0
        public AIManager(ILogger <AIManager> logger, IMovementManager movementManager, ICountryProvider countryProvider, IAttackManager attackManager, IUntouchableManager untouchableManager, IMapProvider mapProvider, ISkillsManager skillsManager, IStatsManager statsManager, IElementProvider elementProvider, IGameDefinitionsPreloder definitionsPreloder, ISpeedManager speedManager)
        {
            _logger              = logger;
            _movementManager     = movementManager;
            _countryProvider     = countryProvider;
            _attackManager       = attackManager;
            _untouchableManager  = untouchableManager;
            _mapProvider         = mapProvider;
            _skillsManager       = skillsManager;
            _statsManager        = statsManager;
            _elementProvider     = elementProvider;
            _definitionsPreloder = definitionsPreloder;
            _speedManager        = speedManager;

            _attackManager.OnTargetChanged += AttackManager_OnTargetChanged;
#if DEBUG
            _logger.LogDebug("AIManager {hashcode} created", GetHashCode());
#endif
        }
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IWorldServer worldServer, ILogsDatabase logsDb, IDatabase mainDb, IGameDefinitionsPreloder definitionsPreloder, RoleManager <DbRole> roleManager)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();

            app.UseRouting();

            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
                endpoints.MapBlazorHub();
                endpoints.MapFallbackToPage("/_Host");
            });


            roleManager.CreateAsync(new DbRole()
            {
                Name = DbRole.SUPER_ADMIN
            }).Wait();
            roleManager.CreateAsync(new DbRole()
            {
                Name = DbRole.ADMIN
            }).Wait();
            roleManager.CreateAsync(new DbRole()
            {
                Name = DbRole.USER
            }).Wait();

            mainDb.Migrate();
            logsDb.Migrate();
            definitionsPreloder.Preload();
            worldServer.Start();
        }
Example #7
0
 public NpcFactory(ILogger <Npc> logger, IGameDefinitionsPreloder preloader, IServiceProvider serviceProvider)
 {
     _logger          = logger;
     _preloader       = preloader;
     _serviceProvider = serviceProvider;
 }
Example #8
0
 public CharacterFactory(ILogger <ICharacterFactory> logger,
                         IDatabase database,
                         ILogger <Character> characterLogger,
                         IGameWorld gameWorld,
                         IDatabasePreloader databasePreloader,
                         IGameDefinitionsPreloder definitionsPreloder,
                         ICountryProvider countryProvider,
                         ISpeedManager speedManager,
                         IStatsManager statsManager,
                         IHealthManager healthManager,
                         ILevelProvider levelProvider,
                         ILevelingManager levelingManager,
                         IInventoryManager inventoryManager,
                         ILinkingManager linkingManager,
                         IGuildManager guildManager,
                         IGameSession gameSession,
                         IStealthManager stealthManager,
                         IAttackManager attackManager,
                         ISkillsManager skillsManager,
                         IBuffsManager buffsManager,
                         IElementProvider elementProvider,
                         IKillsManager killsManager,
                         IVehicleManager vehicleManager,
                         IShapeManager shapeManager,
                         IMovementManager movementManager,
                         IAdditionalInfoManager additionalInfoManager,
                         IMapProvider mapProvider,
                         ITeleportationManager teleportationManager,
                         IPartyManager partyManager,
                         ITradeManager tradeManager,
                         IFriendsManager friendsManager,
                         IDuelManager duelManager,
                         IBankManager bankManager,
                         IQuestsManager questsManager,
                         IUntouchableManager untouchableManager,
                         IWarehouseManager warehouseManager,
                         IShopManager shopManager,
                         ISkillCastingManager skillCastingManager,
                         ICastProtectionManager castProtectionManager,
                         IGamePacketFactory packetFactory,
                         UserManager <DbUser> userManager)
 {
     _logger                = logger;
     _database              = database;
     _characterLogger       = characterLogger;
     _gameWorld             = gameWorld;
     _databasePreloader     = databasePreloader;
     _definitionsPreloder   = definitionsPreloder;
     _countryProvider       = countryProvider;
     _speedManager          = speedManager;
     _statsManager          = statsManager;
     _healthManager         = healthManager;
     _levelProvider         = levelProvider;
     _levelingManager       = levelingManager;
     _inventoryManager      = inventoryManager;
     _linkingManager        = linkingManager;
     _guildManager          = guildManager;
     _gameSession           = gameSession;
     _stealthManager        = stealthManager;
     _attackManager         = attackManager;
     _skillsManager         = skillsManager;
     _buffsManager          = buffsManager;
     _elementProvider       = elementProvider;
     _killsManager          = killsManager;
     _vehicleManager        = vehicleManager;
     _shapeManager          = shapeManager;
     _movementManager       = movementManager;
     _additionalInfoManager = additionalInfoManager;
     _mapProvider           = mapProvider;
     _teleportationManager  = teleportationManager;
     _partyManager          = partyManager;
     _tradeManager          = tradeManager;
     _friendsManager        = friendsManager;
     _duelManager           = duelManager;
     _bankManager           = bankManager;
     _questsManager         = questsManager;
     _untouchableManager    = untouchableManager;
     _warehouseManager      = warehouseManager;
     _shopManager           = shopManager;
     _skillCastingManager   = skillCastingManager;
     _castProtectionManager = castProtectionManager;
     _packetFactory         = packetFactory;
     _userManager           = userManager;
 }