Esempio n. 1
0
        public bool Has(SpellTemplate s)
        {
            var obj = Spells.Where(i => i.Value != null && i.Value.Template != null).Select(i => i.Value.Template)
                      .FirstOrDefault(i => i.Name.Equals(s.Name));

            return(obj != null);
        }
Esempio n. 2
0
        public static Spell Create(int slot, SpellTemplate spellTemplate)
        {
            var obj = new Spell();

            lock (Generator.Random)
            {
                obj.ID = Generator.GenerateNumber();
            }
            obj.Template = spellTemplate;
            obj.Level    = 0;
            obj.Slot     = (byte)slot;
            obj.Lines    = obj.Template.BaseLines;

            AssignDebuffsAndBuffs(obj);

            return(obj);
        }