Ejemplo n.º 1
0
 public static Spell GetSpellByName(SpellList list, string name)
 {
     for (int i = 0; i < list.Spells.Length; i++)
     {
         if (list.Spells[i].Name == name)
         {
             return list.Spells[i];
         }
     }
     return null;
 }
Ejemplo n.º 2
0
 public static Spell GetSpellByPower(SpellList list, string power)
 {
     for (int i = 0; i < list.Spells.Length; i++)
     {
         if (list.Spells[i].FullPower == power)
         {
             return list.Spells[i];
         }
     }
     return null;
 }
Ejemplo n.º 3
0
 public static Spell GetSpellByID(SpellList list, int spellID)
 {
     if (spellID < list.Start)
     {
         return null;
     }
     spellID -= list.Start;
     if (spellID >= list.Spells.Length)
     {
         return null;
     }
     return list.Spells[spellID];
 }