Beispiel #1
0
        public Spell(Game game, IChampion owner, string spellName, byte slot)
        {
            Owner             = owner;
            SpellName         = spellName;
            Slot              = slot;
            _game             = game;
            SpellData         = game.Config.ContentManager.GetSpellData(spellName);
            _scriptEngine     = game.ScriptEngine;
            _networkIdManager = game.NetworkIdManager;

            //Set the game script for the spell
            _spellGameScript = _scriptEngine.CreateObject <IGameScript>("Spells", spellName) ?? new GameScriptEmpty();
            //Activate spell - Notes: Deactivate is never called as spell removal hasn't been added
            _spellGameScript.OnActivate(owner);
        }