Exemplo n.º 1
0
        public Character(ILogger <Character> logger,
                         IGameWorld gameWorld,
                         ICharacterConfiguration characterConfig,
                         IBackgroundTaskQueue taskQueue,
                         IDatabasePreloader databasePreloader,
                         IChatManager chatManager,
                         ILinkingManager linkinManager,
                         IDyeingManager dyeingManager) : base(databasePreloader)
        {
            _logger          = logger;
            _gameWorld       = gameWorld;
            _characterConfig = characterConfig;
            _taskQueue       = taskQueue;
            _chatManager     = chatManager;
            _linkingManager  = linkinManager;
            _dyeingManager   = dyeingManager;
            _packetsHelper   = new PacketsHelper();

            _castTimer.Elapsed          += CastTimer_Elapsed;
            _summonVehicleTimer.Elapsed += SummonVehicleTimer_Elapsed;

            OnMaxHPChanged += Character_OnMaxHPChanged;
            OnMaxMPChanged += Character_OnMaxMPChanged;
            OnMaxSPChanged += Character_OnMaxSPChanged;

            OnDead += Character_OnDead;

            Bless.Instance.OnDarkBlessChanged  += OnDarkBlessChanged;
            Bless.Instance.OnLightBlessChanged += OnLightBlessChanged;
        }