예제 #1
0
        public Spell(ISpellRecord record)
        {
            m_record = record;
            m_id     = m_record.SpellId;
            m_level  = (byte)m_record.Level;

            Template  = SpellManager.Instance.GetSpellTemplate(Id);
            SpellType = SpellManager.Instance.GetSpellType(Template.TypeId);
            var counter = 1;

            ByLevel = SpellManager.Instance.GetSpellLevels(Template).ToDictionary(entry => counter++);
        }
예제 #2
0
        public Spell(ISpellRecord record)
        {
            this.m_record = record;
            this.m_id     = this.m_record.SpellId;
            this.m_level  = (byte)this.m_record.Level;
            this.Template = Singleton <SpellManager> .Instance.GetSpellTemplate(this.Id);

            this.SpellType = Singleton <SpellManager> .Instance.GetSpellType(this.Template.TypeId);

            int counter = 1;

            this.ByLevel = Singleton <SpellManager> .Instance.GetSpellLevels(this.Template).ToDictionary((SpellLevelTemplate entry) => counter++);
        }