public void Load()
public void Load() { if (File.Exists(Constants.DataHolderPath + "Magictype.txt")) { using (StreamReader read = File.OpenText(Constants.DataHolderPath + "Magictype.txt")) { string Linebas; while ((Linebas = read.ReadLine()) != null) { string[] line = Linebas.Split(new string[] { "@@", " " }, StringSplitOptions.RemoveEmptyEntries); Magic spell = new Magic(); spell.ID = ushort.Parse(line[1]); spell.AttackInFly = AttackInFlay(spell); spell.Type = (MagicSort)byte.Parse(line[2]); spell.Name = line[3]; spell.Level = byte.Parse(line[8]); spell.UseMana = ushort.Parse(line[9]); if (spell.ID == (ushort)Game.Enums.SpellID.RevengeTail) spell.Damage = int.Parse(line[10]); else if (spell.ID == (ushort)Game.Enums.SpellID.ToxicFog) spell.Damage = (byte)((double.Parse(line[10]) % 100)); else { if ((spell.Type == MagicSort.AddMana || spell.Type == MagicSort.Recruit || spell.Type == MagicSort.Attack) && double.Parse(line[10]) < 10000 || spell.Type == MagicSort.Auras) spell.Damage = int.Parse(line[10]); else spell.Damage = Math.Min((float)(double.Parse(line[10]) % 1000), 500);//(float)((double.Parse(line[10]) % 1000) / 10000); } if (spell.ID == 12580 || spell.ID == 12590 || spell.ID == 12600)
if (spell.ID == 10490) spell.Damage = 150;