public SpellAuraInterruptSelector(SpellTemplate spell)
 {
     InitializeComponent();
     _spell = spell;
     uint flags = spell.AuraInterruptFlags;
     if ((flags & 1 << 0) != 0)
         p.IsChecked = true;
     if ((flags & 1 << 1) != 0)
         p1.IsChecked = true;
     if ((flags & 1 << 2) != 0)
         p2.IsChecked = true;
     if ((flags & 1 << 3) != 0)
         p3.IsChecked = true;
     if ((flags & 1 << 4) != 0)
         p4.IsChecked = true;
     if ((flags & 1 << 5) != 0)
         p5.IsChecked = true;
     if ((flags & 1 << 6) != 0)
         p6.IsChecked = true;
     if ((flags & 1 << 7) != 0)
         p7.IsChecked = true;
     if ((flags & 1 << 8) != 0)
         p8.IsChecked = true;
     if ((flags & 1 << 9) != 0)
         p9.IsChecked = true;
     if ((flags & 1 << 10) != 0)
         p10.IsChecked = true;
     if ((flags & 1 << 11) != 0)
         p11.IsChecked = true;
     if ((flags & 1 << 12) != 0)
         p12.IsChecked = true;
     if ((flags & 1 << 13) != 0)
         p13.IsChecked = true;
     if ((flags & 1 << 14) != 0)
         p14.IsChecked = true;
     if ((flags & 1 << 15) != 0)
         p15.IsChecked = true;
     if ((flags & 1 << 16) != 0)
         p16.IsChecked = true;
     if ((flags & 1 << 17) != 0)
         p17.IsChecked = true;
     if ((flags & 1 << 18) != 0)
         p18.IsChecked = true;
     if ((flags & 1 << 19) != 0)
         p19.IsChecked = true;
     if ((flags & 1 << 20) != 0)
         p20.IsChecked = true;
     if ((flags & 1 << 21) != 0)
         p21.IsChecked = true;
     if ((flags & 1 << 22) != 0)
         p22.IsChecked = true;
     if ((flags & 1 << 23) != 0)
         p23.IsChecked = true;
     if ((flags & 1 << 24) != 0)
         p24.IsChecked = true;
     if ((flags & 1 << 25) != 0)
         p25.IsChecked = true;
 }
Example #2
0
 public SpellProcSelector(SpellTemplate spell)
 {
     InitializeComponent();
     _spell = spell;
     uint proc = spell.Proc;
     this.Title = "PROC of SPELL " + spell.ID;
     if ((proc & (1 << 0)) != 0)
         p.IsChecked = true;
     if ((proc & (1 << 1)) != 0)
         p1.IsChecked = true;
     if ((proc & (1 << 2)) != 0)
         p2.IsChecked = true;
     if ((proc & (1 << 3)) != 0)
         p3.IsChecked = true;
     if ((proc & (1 << 4)) != 0)
         p4.IsChecked = true;
     if ((proc & (1 << 5)) != 0)
         p5.IsChecked = true;
     if ((proc & (1 << 6)) != 0)
         p6.IsChecked = true;
     if ((proc & (1 << 7)) != 0)
         p7.IsChecked = true;
     if ((proc & (1 << 8)) != 0)
         p8.IsChecked = true;
     if ((proc & (1 << 9)) != 0)
         p9.IsChecked = true;
     if ((proc & (1 << 10)) != 0)
         p10.IsChecked = true;
     if ((proc & (1 << 11)) != 0)
         p11.IsChecked = true;
     if ((proc & (1 << 12)) != 0)
         p12.IsChecked = true;
     if ((proc & (1 << 13)) != 0)
         p13.IsChecked = true;
     if ((proc & (1 << 14)) != 0)
         p14.IsChecked = true;
     if ((proc & (1 << 15)) != 0)
         p15.IsChecked = true;
     if ((proc & (1 << 16)) != 0)
         p16.IsChecked = true;
     if ((proc & (1 << 17)) != 0)
         p17.IsChecked = true;
     if ((proc & (1 << 18)) != 0)
         p18.IsChecked = true;
     if ((proc & (1 << 19)) != 0)
         p19.IsChecked = true;
     if ((proc & (1 << 20)) != 0)
         p20.IsChecked = true;
     if ((proc & (1 << 21)) != 0)
         p21.IsChecked = true;
     if ((proc & (1 << 22)) != 0)
         p22.IsChecked = true;
     if ((proc & (1 << 23)) != 0)
         p23.IsChecked = true;
     if ((proc & (1 << 24)) != 0)
         p24.IsChecked = true;
 }
 public SpellCastInterruptSelector(SpellTemplate spell)
 {
     InitializeComponent();
     this.Title = "CAST INTERRUPT of " + spell.ID;
     _spell = spell;
     uint flags = spell.InterruptFlags;
     if ((flags & 1 << 0) != 0)
         p.IsChecked = true;
     if ((flags & 1 << 1) != 0)
         p1.IsChecked = true;
     if ((flags & 1 << 2) != 0)
         p2.IsChecked = true;
     if ((flags & 1 << 3) != 0)
         p3.IsChecked = true;
     if ((flags & 1 << 4) != 0)
         p4.IsChecked = true;
     if ((flags & 1 << 5) != 0)
         p5.IsChecked = true;
 }
 public void Load(SpellTemplate spell)
 {
     if (spell == null)
         return;
     _spell = spell;
     for (int i = 0; i != 32; ++i)
     {
         attr[i].IsChecked = (_spell.Attributes[0] & (1 << i)) != 0;
         attrEx[i].IsChecked = (_spell.Attributes[1] & (1 << i)) != 0;
         attrEx2[i].IsChecked = (_spell.Attributes[2] & (1 << i)) != 0;
         attrEx3[i].IsChecked = (_spell.Attributes[3] & (1 << i)) != 0;
         attrEx4[i].IsChecked = (_spell.Attributes[4] & (1 << i)) != 0;
         attrEx5[i].IsChecked = (_spell.Attributes[5] & (1 << i)) != 0;
         attrEx6[i].IsChecked = (_spell.Attributes[6] & (1 << i)) != 0;
         attrEx7[i].IsChecked = (_spell.Attributes[7] & (1 << i)) != 0;
     }
 }
Example #5
0
        public SpellFamilySelector(SpellTemplate spell, int type)
        {
            // type:
            // 0 - spell family mask
            // 1 - spell effect mask 1
            // 2 - spell effect mask 2
            // 3 - spell effect mask 3
            InitializeComponent();
            _spell = spell;
            _type = type;
            long high, middle, low;
            switch (type)
            {
                case 0:
                    low = spell.FamilyMaskA;
                    middle = spell.FamilyMaskB;
                    high = spell.FamilyMaskC;
                    break;
                case 1:
                    low = spell.EffectSpellMaskA[0];
                    middle = spell.EffectSpellMaskB[0];
                    high = spell.EffectSpellMaskC[0];
                    break;
                case 2:
                    low = spell.EffectSpellMaskA[1];
                    middle = spell.EffectSpellMaskB[1];
                    high = spell.EffectSpellMaskC[1];
                    break;
                case 3:
                    low = spell.EffectSpellMaskA[2];
                    middle = spell.EffectSpellMaskB[2];
                    high = spell.EffectSpellMaskC[2];
                    break;
                default:    // should not happen
                    high = 0;
                    middle = 0;
                    low = 0;
                    break;
            }

            ffClass.ItemsSource = DataDefine.SpellFamily;
            ffClass.SelectedValuePath = "Key";
            ffClass.DisplayMemberPath = "Value";
            ffClass.SelectedValue = spell.Family;

            l1.IsChecked = (low & 1 << 0) != 0;
            l2.IsChecked = (low & 1 << 1) != 0;
            l3.IsChecked = (low & 1 << 2) != 0;
            l4.IsChecked = (low & 1 << 3) != 0;
            l5.IsChecked = (low & 1 << 4) != 0;
            l6.IsChecked = (low & 1 << 5) != 0;
            l7.IsChecked = (low & 1 << 6) != 0;
            l8.IsChecked = (low & 1 << 7) != 0;
            l9.IsChecked = (low & 1 << 8) != 0;
            l10.IsChecked = (low & 1 << 9) != 0;
            l11.IsChecked = (low & 1 << 10) != 0;
            l12.IsChecked = (low & 1 << 11) != 0;
            l13.IsChecked = (low & 1 << 12) != 0;
            l14.IsChecked = (low & 1 << 13) != 0;
            l15.IsChecked = (low & 1 << 14) != 0;
            l16.IsChecked = (low & 1 << 15) != 0;
            l17.IsChecked = (low & 1 << 16) != 0;
            l18.IsChecked = (low & 1 << 17) != 0;
            l19.IsChecked = (low & 1 << 18) != 0;
            l20.IsChecked = (low & 1 << 19) != 0;
            l21.IsChecked = (low & 1 << 20) != 0;
            l22.IsChecked = (low & 1 << 21) != 0;
            l23.IsChecked = (low & 1 << 22) != 0;
            l24.IsChecked = (low & 1 << 23) != 0;
            l25.IsChecked = (low & 1 << 24) != 0;
            l26.IsChecked = (low & 1 << 25) != 0;
            l27.IsChecked = (low & 1 << 26) != 0;
            l28.IsChecked = (low & 1 << 27) != 0;
            l29.IsChecked = (low & 1 << 28) != 0;
            l30.IsChecked = (low & 1 << 29) != 0;
            l31.IsChecked = (low & 1 << 30) != 0;
            l32.IsChecked = (low & 1 << 31) != 0;
            m1.IsChecked = (middle & 1 << 0) != 0;
            m2.IsChecked = (middle & 1 << 1) != 0;
            m3.IsChecked = (middle & 1 << 2) != 0;
            m4.IsChecked = (middle & 1 << 3) != 0;
            m5.IsChecked = (middle & 1 << 4) != 0;
            m6.IsChecked = (middle & 1 << 5) != 0;
            m7.IsChecked = (middle & 1 << 6) != 0;
            m8.IsChecked = (middle & 1 << 7) != 0;
            m9.IsChecked = (middle & 1 << 8) != 0;
            m10.IsChecked = (middle & 1 << 9) != 0;
            m11.IsChecked = (middle & 1 << 10) != 0;
            m12.IsChecked = (middle & 1 << 11) != 0;
            m13.IsChecked = (middle & 1 << 12) != 0;
            m14.IsChecked = (middle & 1 << 13) != 0;
            m15.IsChecked = (middle & 1 << 14) != 0;
            m16.IsChecked = (middle & 1 << 15) != 0;
            m17.IsChecked = (middle & 1 << 16) != 0;
            m18.IsChecked = (middle & 1 << 17) != 0;
            m19.IsChecked = (middle & 1 << 18) != 0;
            m20.IsChecked = (middle & 1 << 19) != 0;
            m21.IsChecked = (middle & 1 << 20) != 0;
            m22.IsChecked = (middle & 1 << 21) != 0;
            m23.IsChecked = (middle & 1 << 22) != 0;
            m24.IsChecked = (middle & 1 << 23) != 0;
            m25.IsChecked = (middle & 1 << 24) != 0;
            m26.IsChecked = (middle & 1 << 25) != 0;
            m27.IsChecked = (middle & 1 << 26) != 0;
            m28.IsChecked = (middle & 1 << 27) != 0;
            m29.IsChecked = (middle & 1 << 28) != 0;
            m30.IsChecked = (middle & 1 << 29) != 0;
            m31.IsChecked = (middle & 1 << 30) != 0;
            m32.IsChecked = (middle & 1 << 31) != 0;
            h1.IsChecked = (high & 1 << 0) != 0;
            h2.IsChecked = (high & 1 << 1) != 0;
            h3.IsChecked = (high & 1 << 2) != 0;
            h4.IsChecked = (high & 1 << 3) != 0;
            h5.IsChecked = (high & 1 << 4) != 0;
            h6.IsChecked = (high & 1 << 5) != 0;
            h7.IsChecked = (high & 1 << 6) != 0;
            h8.IsChecked = (high & 1 << 7) != 0;
            h9.IsChecked = (high & 1 << 8) != 0;
            h10.IsChecked = (high & 1 << 9) != 0;
            h11.IsChecked = (high & 1 << 10) != 0;
            h12.IsChecked = (high & 1 << 11) != 0;
            h13.IsChecked = (high & 1 << 12) != 0;
            h14.IsChecked = (high & 1 << 13) != 0;
            h15.IsChecked = (high & 1 << 14) != 0;
            h16.IsChecked = (high & 1 << 15) != 0;
            h17.IsChecked = (high & 1 << 16) != 0;
            h18.IsChecked = (high & 1 << 17) != 0;
            h19.IsChecked = (high & 1 << 18) != 0;
            h20.IsChecked = (high & 1 << 19) != 0;
            h21.IsChecked = (high & 1 << 20) != 0;
            h22.IsChecked = (high & 1 << 21) != 0;
            h23.IsChecked = (high & 1 << 22) != 0;
            h24.IsChecked = (high & 1 << 23) != 0;
            h25.IsChecked = (high & 1 << 24) != 0;
            h26.IsChecked = (high & 1 << 25) != 0;
            h27.IsChecked = (high & 1 << 26) != 0;
            h28.IsChecked = (high & 1 << 27) != 0;
            h29.IsChecked = (high & 1 << 28) != 0;
            h30.IsChecked = (high & 1 << 29) != 0;
            h31.IsChecked = (high & 1 << 30) != 0;
            h32.IsChecked = (high & 1 << 31) != 0;

            flagH.Content = String.Format("H: {0:X8}", high);
            flagM.Content = String.Format("M: {0:X8}", middle);
            flagL.Content = String.Format("L: {0:X8}", low);

            foreach (var sp in LegacyToolBox.Data.Spell)
            {
                if (sp.Family != spell.Family)
                    continue;

                if ((sp.FamilyMaskA & 1 << 0) != 0)
                    sl1s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 1) != 0)
                    sl2s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 2) != 0)
                    sl3s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 3) != 0)
                    sl4s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 4) != 0)
                    sl5s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 5) != 0)
                    sl6s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 6) != 0)
                    sl7s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 7) != 0)
                    sl8s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 8) != 0)
                    sl9s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 9) != 0)
                    sl10s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 10) != 0)
                    sl11s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 11) != 0)
                    sl12s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 12) != 0)
                    sl13s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 13) != 0)
                    sl14s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 14) != 0)
                    sl15s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 15) != 0)
                    sl16s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 16) != 0)
                    sl17s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 17) != 0)
                    sl18s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 18) != 0)
                    sl19s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 19) != 0)
                    sl20s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 20) != 0)
                    sl21s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 21) != 0)
                    sl22s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 22) != 0)
                    sl23s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 23) != 0)
                    sl24s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 24) != 0)
                    sl25s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 25) != 0)
                    sl26s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 26) != 0)
                    sl27s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 27) != 0)
                    sl28s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 28) != 0)
                    sl29s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 29) != 0)
                    sl30s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 30) != 0)
                    sl31s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskA & 1 << 31) != 0)
                    sl32s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 0) != 0)
                    sm1s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 1) != 0)
                    sm2s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 2) != 0)
                    sm3s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 3) != 0)
                    sm4s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 4) != 0)
                    sm5s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 5) != 0)
                    sm6s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 6) != 0)
                    sm7s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 7) != 0)
                    sm8s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 8) != 0)
                    sm9s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 9) != 0)
                    sm10s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 10) != 0)
                    sm11s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 11) != 0)
                    sm12s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 12) != 0)
                    sm13s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 13) != 0)
                    sm14s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 14) != 0)
                    sm15s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 15) != 0)
                    sm16s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 16) != 0)
                    sm17s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 17) != 0)
                    sm18s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 18) != 0)
                    sm19s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 19) != 0)
                    sm20s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 20) != 0)
                    sm21s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 21) != 0)
                    sm22s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 22) != 0)
                    sm23s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 23) != 0)
                    sm24s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 24) != 0)
                    sm25s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 25) != 0)
                    sm26s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 26) != 0)
                    sm27s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 27) != 0)
                    sm28s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 28) != 0)
                    sm29s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 29) != 0)
                    sm30s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 30) != 0)
                    sm31s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskB & 1 << 31) != 0)
                    sm32s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 0) != 0)
                    sh1s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 1) != 0)
                    sh2s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 2) != 0)
                    sh3s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 3) != 0)
                    sh4s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 4) != 0)
                    sh5s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 5) != 0)
                    sh6s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 6) != 0)
                    sh7s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 7) != 0)
                    sh8s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 8) != 0)
                    sh9s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 9) != 0)
                    sh10s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 10) != 0)
                    sh11s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 11) != 0)
                    sh12s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 12) != 0)
                    sh13s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 13) != 0)
                    sh14s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 14) != 0)
                    sh15s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 15) != 0)
                    sh16s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 16) != 0)
                    sh17s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 17) != 0)
                    sh18s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 18) != 0)
                    sh19s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 19) != 0)
                    sh20s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 20) != 0)
                    sh21s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 21) != 0)
                    sh22s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 22) != 0)
                    sh23s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 23) != 0)
                    sh24s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 24) != 0)
                    sh25s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 25) != 0)
                    sh26s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 26) != 0)
                    sh27s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 27) != 0)
                    sh28s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 28) != 0)
                    sh29s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 29) != 0)
                    sh30s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 30) != 0)
                    sh31s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
                if ((sp.FamilyMaskC & 1 << 31) != 0)
                    sh32s.Items.Add(String.Format("{0} - {1}{2}", sp.ID, sp.Name, sp.Rank == "" ? "" : "(" + sp.Rank + ")"));
            }
        }
Example #6
0
 public static void DeleteSpell(ObservableCollection<SpellTemplate> list, SpellTemplate spell)
 {
     list.Remove(spell);
 }
Example #7
0
 public static SpellTemplate CreateSpell(ObservableCollection<SpellTemplate> list)
 {
     SpellTemplate spell = new SpellTemplate();
     spell.ID = (from d in list select d.ID).Max() + 1;
     spell.Category = 0;
     spell.Dispel = 0;
     spell.Mechanic = 0;
     spell.Attributes[0] = 0;
     spell.Attributes[1] = 0;
     spell.Attributes[2] = 0;
     spell.Attributes[3] = 0;
     spell.Attributes[4] = 0;
     spell.Attributes[5] = 0;
     spell.Attributes[6] = 0;
     spell.Attributes[7] = 0;
     spell.Stance[0] = 0;
     spell.Stance[1] = 0;
     spell.StanceNot[0] = 0;
     spell.StanceNot[1] = 0;
     spell.Targets = 0;
     spell.TargetCreatureType = 0;
     spell.RequiredSpellFocus = 0;
     spell.RequireFacingTarget = false;
     spell.CasterAuraState = 0;
     spell.TargetAuraState = 0;
     spell.ExcludeCasterAuraState = 0;
     spell.ExcludeTargetAuraState = 0;
     spell.CasterAuraSpell = 0;
     spell.TargetAuraSpell = 0;
     spell.ExcludeCasterAuraSpell = 0;
     spell.ExcludeTargetAuraSpell = 0;
     spell.CastingTime = 0;
     spell.Cooldown = 0;
     spell.CategoryCooldown = 0;
     spell.InterruptFlags = 0;
     spell.AuraInterruptFlags = 0;
     spell.ChannelInterruptFlags = 0;
     spell.Proc = 0;
     spell.ProcChance = 0;
     spell.ProcCharges = 0;
     spell.MaxLevel = 0;
     spell.BaseLevel = 0;
     spell.Level = 0;
     spell.Duration = 0;
     spell.PowerType = 0;
     spell.PowerCost = 0;
     spell.PowerCostPerLevel = 0;
     spell.PowerCostPerSecond = 0;
     spell.PowerCostPerSecondPerLevel = 0;
     spell.Range = 0;
     spell.Speed = 0;
     spell.ModalNextSpell = 0;
     spell.StackAmount = 0;
     spell.Totem[0] = 0;
     spell.Totem[1] = 0;
     spell.Reagent[0] = 0;
     spell.Reagent[1] = 0;
     spell.Reagent[2] = 0;
     spell.Reagent[3] = 0;
     spell.Reagent[4] = 0;
     spell.Reagent[5] = 0;
     spell.Reagent[6] = 0;
     spell.Reagent[7] = 0;
     spell.ReagentCount[0] = 0;
     spell.ReagentCount[1] = 0;
     spell.ReagentCount[2] = 0;
     spell.ReagentCount[3] = 0;
     spell.ReagentCount[4] = 0;
     spell.ReagentCount[5] = 0;
     spell.ReagentCount[6] = 0;
     spell.ReagentCount[7] = 0;
     spell.EquippedItemClass = -1;
     spell.EquippedItemSubClassMask = 0;
     spell.EquippedItemInventoryTypeMask = 0;
     spell.Effect[0] = 0;
     spell.Effect[1] = 0;
     spell.Effect[2] = 0;
     spell.EffectDieSides[0] = 0;
     spell.EffectDieSides[1] = 0;
     spell.EffectDieSides[2] = 0;
     spell.EffectPointsPerLevel[0] = 0;
     spell.EffectPointsPerLevel[1] = 0;
     spell.EffectPointsPerLevel[2] = 0;
     spell.EffectBasePoints[0] = 0;
     spell.EffectBasePoints[1] = 0;
     spell.EffectBasePoints[2] = 0;
     spell.EffectMechanic[0] = 0;
     spell.EffectMechanic[1] = 0;
     spell.EffectMechanic[2] = 0;
     spell.EffectTargetA[0] = 0;
     spell.EffectTargetA[1] = 0;
     spell.EffectTargetA[2] = 0;
     spell.EffectTargetB[0] = 0;
     spell.EffectTargetB[1] = 0;
     spell.EffectTargetB[2] = 0;
     spell.EffectRadius[0] = 0;
     spell.EffectRadius[1] = 0;
     spell.EffectRadius[2] = 0;
     spell.EffectApplyAura[0] = 0;
     spell.EffectApplyAura[1] = 0;
     spell.EffectApplyAura[2] = 0;
     spell.EffectAmplitude[0] = 0;
     spell.EffectAmplitude[1] = 0;
     spell.EffectAmplitude[2] = 0;
     spell.EffectMultipleValue[0] = 0;
     spell.EffectMultipleValue[1] = 0;
     spell.EffectMultipleValue[2] = 0;
     spell.EffectChainTargets[0] = 0;
     spell.EffectChainTargets[1] = 0;
     spell.EffectChainTargets[2] = 0;
     spell.EffectItemType[0] = 0;
     spell.EffectItemType[1] = 0;
     spell.EffectItemType[2] = 0;
     spell.EffectMisc[0] = 0;
     spell.EffectMisc[1] = 0;
     spell.EffectMisc[2] = 0;
     spell.EffectMiscB[0] = 0;
     spell.EffectMiscB[1] = 0;
     spell.EffectMiscB[2] = 0;
     spell.EffectTriggerSpell[0] = 0;
     spell.EffectTriggerSpell[1] = 0;
     spell.EffectTriggerSpell[2] = 0;
     spell.EffectPointsPerComboPoint[0] = 0;
     spell.EffectPointsPerComboPoint[1] = 0;
     spell.EffectPointsPerComboPoint[2] = 0;
     spell.EffectSpellMaskA[0] = 0;
     spell.EffectSpellMaskA[1] = 0;
     spell.EffectSpellMaskA[2] = 0;
     spell.EffectSpellMaskB[0] = 0;
     spell.EffectSpellMaskB[1] = 0;
     spell.EffectSpellMaskB[2] = 0;
     spell.EffectSpellMaskC[0] = 0;
     spell.EffectSpellMaskC[1] = 0;
     spell.EffectSpellMaskC[2] = 0;
     spell.Visual[0] = 0;
     spell.Visual[1] = 0;
     spell.Icon = 0;
     spell.ActiveIcon = 0;
     spell.Priority = 0;
     spell.Name = "";
     spell.NameFlags = 0;
     spell.Rank = "";
     spell.RankFlags = 0;
     spell.Description = "";
     spell.DescriptionFlags = 0;
     spell.ToolTip = "";
     spell.ToolTipFlags = 0;
     spell.PowerCostPercent = 0;
     spell.GlobalCategory = 0;
     spell.GlobalCooldown = 0;
     spell.MaxTargetLevel = 0;
     spell.Family = 0;
     spell.FamilyMaskA = 0;
     spell.FamilyMaskB = 0;
     spell.FamilyMaskC = 0;
     spell.MaxAffectTargets = 0;
     spell.DamageClass = 0;
     spell.PreventionType = 0;
     spell.StanceBarOrder = 0;
     spell.EffectDamageMultiplier[0] = 0;
     spell.EffectDamageMultiplier[1] = 0;
     spell.EffectDamageMultiplier[2] = 0;
     spell.MinFaction = 0;
     spell.MinReputation = 0;
     spell.RequiredAuraVision = 0;
     spell.TotemCategory[0] = 0;
     spell.TotemCategory[1] = 0;
     spell.AreaGroup = 0;
     spell.SchoolMask = 0;
     spell.RuneCost = 0;
     spell.Missile = 0;
     spell.PowerDisplay = 0;
     spell.EffectBonusMultiplier[0] = 0;
     spell.EffectBonusMultiplier[1] = 0;
     spell.DescriptionVariable = 0;
     spell.Difficulty = 0;
     list.Add(spell);
     return spell;
 }
Example #8
0
 public static ObservableCollection<SpellTemplate> LoadAllSpell()
 {
     using (FileStream stream = File.OpenRead(LegacyToolBox.DATA_PATH + "DBC/Spell.dbc"))
     {
         ObservableCollection<SpellTemplate> list = new ObservableCollection<SpellTemplate>();
         BinaryReader r = new BinaryReader(stream);
         stream.Position = 4;
         int records = r.ReadInt32();
         int rowCount = r.ReadInt32();
         int rowSize = r.ReadInt32();
         int stringBlockSize = r.ReadInt32();
         int dataSize = 20 + records * rowSize;
         for (int i = 0; i != records; ++i)
         {
             SpellTemplate spell = new SpellTemplate();
             spell.ID = r.ReadUInt32();
             spell.Category = r.ReadUInt32();
             spell.Dispel = r.ReadInt32();
             spell.Mechanic = r.ReadInt32();
             for (int j = 0; j != spell.Attributes.Length; ++j)
                 spell.Attributes[j] = r.ReadUInt32();
             spell.Stance[0] = r.ReadUInt32();
             spell.Stance[1] = r.ReadUInt32();
             spell.StanceNot[0] = r.ReadUInt32();
             spell.StanceNot[1] = r.ReadUInt32();
             spell.Targets = r.ReadUInt32();
             spell.TargetCreatureType = r.ReadUInt32();
             spell.RequiredSpellFocus = r.ReadUInt32();
             spell.RequireFacingTarget = r.ReadUInt32() == 0 ? false : true;
             spell.CasterAuraState = r.ReadInt32();
             spell.TargetAuraState = r.ReadInt32();
             spell.ExcludeCasterAuraState = r.ReadInt32();
             spell.ExcludeTargetAuraState = r.ReadInt32();
             spell.CasterAuraSpell = r.ReadUInt32();
             spell.TargetAuraSpell = r.ReadUInt32();
             spell.ExcludeCasterAuraSpell = r.ReadUInt32();
             spell.ExcludeTargetAuraSpell = r.ReadUInt32();
             spell.CastingTime = r.ReadInt32();
             spell.Cooldown = r.ReadUInt32();
             spell.CategoryCooldown = r.ReadUInt32();
             spell.InterruptFlags = r.ReadUInt32();
             spell.AuraInterruptFlags = r.ReadUInt32();
             spell.ChannelInterruptFlags = r.ReadUInt32();
             spell.Proc = r.ReadUInt32();
             spell.ProcChance = r.ReadUInt32();
             spell.ProcCharges = r.ReadUInt32();
             spell.MaxLevel = r.ReadUInt32();
             spell.BaseLevel = r.ReadUInt32();
             spell.Level = r.ReadUInt32();
             spell.Duration = r.ReadInt32();
             spell.PowerType = r.ReadInt32();
             spell.PowerCost = r.ReadUInt32();
             spell.PowerCostPerLevel = r.ReadUInt32();
             spell.PowerCostPerSecond = r.ReadUInt32();
             spell.PowerCostPerSecondPerLevel = r.ReadUInt32();
             spell.Range = r.ReadInt32();
             spell.Speed = r.ReadSingle();
             spell.ModalNextSpell = r.ReadUInt32();
             spell.StackAmount = r.ReadUInt32();
             spell.Totem[0] = r.ReadInt32();
             spell.Totem[1] = r.ReadInt32();
             for (int j = 0; j != spell.Reagent.Length; ++j)
                 spell.Reagent[j] = r.ReadInt32();
             for (int j = 0; j != spell.ReagentCount.Length; ++j)
                 spell.ReagentCount[j] = r.ReadUInt32();
             spell.EquippedItemClass = r.ReadInt32();
             spell.EquippedItemSubClassMask = r.ReadInt32();
             spell.EquippedItemInventoryTypeMask = r.ReadInt32();
             spell.Effect[0] = r.ReadInt32();
             spell.Effect[1] = r.ReadInt32();
             spell.Effect[2] = r.ReadInt32();
             spell.EffectDieSides[0] = r.ReadInt32();
             spell.EffectDieSides[1] = r.ReadInt32();
             spell.EffectDieSides[2] = r.ReadInt32();
             spell.EffectPointsPerLevel[0] = r.ReadSingle();
             spell.EffectPointsPerLevel[1] = r.ReadSingle();
             spell.EffectPointsPerLevel[2] = r.ReadSingle();
             spell.EffectBasePoints[0] = r.ReadInt32();
             spell.EffectBasePoints[1] = r.ReadInt32();
             spell.EffectBasePoints[2] = r.ReadInt32();
             spell.EffectMechanic[0] = r.ReadUInt32();
             spell.EffectMechanic[1] = r.ReadUInt32();
             spell.EffectMechanic[2] = r.ReadUInt32();
             spell.EffectTargetA[0] = r.ReadInt32();
             spell.EffectTargetA[1] = r.ReadInt32();
             spell.EffectTargetA[2] = r.ReadInt32();
             spell.EffectTargetB[0] = r.ReadInt32();
             spell.EffectTargetB[1] = r.ReadInt32();
             spell.EffectTargetB[2] = r.ReadInt32();
             spell.EffectRadius[0] = r.ReadInt32();
             spell.EffectRadius[1] = r.ReadInt32();
             spell.EffectRadius[2] = r.ReadInt32();
             spell.EffectApplyAura[0] = r.ReadInt32();
             spell.EffectApplyAura[1] = r.ReadInt32();
             spell.EffectApplyAura[2] = r.ReadInt32();
             spell.EffectAmplitude[0] = r.ReadUInt32();
             spell.EffectAmplitude[1] = r.ReadUInt32();
             spell.EffectAmplitude[2] = r.ReadUInt32();
             spell.EffectMultipleValue[0] = r.ReadSingle();
             spell.EffectMultipleValue[1] = r.ReadSingle();
             spell.EffectMultipleValue[2] = r.ReadSingle();
             spell.EffectChainTargets[0] = r.ReadUInt32();
             spell.EffectChainTargets[1] = r.ReadUInt32();
             spell.EffectChainTargets[2] = r.ReadUInt32();
             spell.EffectItemType[0] = r.ReadUInt32();
             spell.EffectItemType[1] = r.ReadUInt32();
             spell.EffectItemType[2] = r.ReadUInt32();
             spell.EffectMisc[0] = r.ReadInt32();
             spell.EffectMisc[1] = r.ReadInt32();
             spell.EffectMisc[2] = r.ReadInt32();
             spell.EffectMiscB[0] = r.ReadInt32();
             spell.EffectMiscB[1] = r.ReadInt32();
             spell.EffectMiscB[2] = r.ReadInt32();
             spell.EffectTriggerSpell[0] = r.ReadUInt32();
             spell.EffectTriggerSpell[1] = r.ReadUInt32();
             spell.EffectTriggerSpell[2] = r.ReadUInt32();
             spell.EffectPointsPerComboPoint[0] = r.ReadSingle();
             spell.EffectPointsPerComboPoint[1] = r.ReadSingle();
             spell.EffectPointsPerComboPoint[2] = r.ReadSingle();
             spell.EffectSpellMaskA[0] = r.ReadUInt32();
             spell.EffectSpellMaskB[0] = r.ReadUInt32();
             spell.EffectSpellMaskC[0] = r.ReadUInt32();
             spell.EffectSpellMaskA[1] = r.ReadUInt32();
             spell.EffectSpellMaskB[1] = r.ReadUInt32();
             spell.EffectSpellMaskC[1] = r.ReadUInt32();
             spell.EffectSpellMaskA[2] = r.ReadUInt32();
             spell.EffectSpellMaskB[2] = r.ReadUInt32();
             spell.EffectSpellMaskC[2] = r.ReadUInt32();
             spell.Visual[0] = r.ReadUInt32();
             spell.Visual[1] = r.ReadUInt32();
             spell.Icon = r.ReadUInt32();
             spell.ActiveIcon = r.ReadUInt32();
             spell.Priority = r.ReadUInt32();
             stream.Position += 16;
             spell.Name = DBC.ReadString(r, dataSize);
             stream.Position += 44;
             spell.NameFlags = r.ReadUInt32();
             stream.Position += 16;
             spell.Rank = DBC.ReadString(r, dataSize);
             stream.Position += 44;
             spell.RankFlags = r.ReadUInt32();
             stream.Position += 16;
             spell.Description = DBC.ReadString(r, dataSize);
             stream.Position += 44;
             spell.DescriptionFlags = r.ReadUInt32();
             stream.Position += 16;
             spell.ToolTip = DBC.ReadString(r, dataSize);
             stream.Position += 44;
             spell.ToolTipFlags = r.ReadUInt32();
             spell.PowerCostPercent = r.ReadUInt32();
             spell.GlobalCategory = r.ReadUInt32();
             spell.GlobalCooldown = r.ReadUInt32();
             spell.MaxTargetLevel = r.ReadUInt32();
             spell.Family = r.ReadInt32();
             spell.FamilyMaskA = r.ReadUInt32();
             spell.FamilyMaskB = r.ReadUInt32();
             spell.FamilyMaskC = r.ReadUInt32();
             spell.MaxAffectTargets = r.ReadUInt32();
             spell.DamageClass = r.ReadInt32();
             spell.PreventionType = r.ReadUInt32();
             spell.StanceBarOrder = r.ReadUInt32();
             spell.EffectDamageMultiplier[0] = r.ReadSingle();
             spell.EffectDamageMultiplier[1] = r.ReadSingle();
             spell.EffectDamageMultiplier[2] = r.ReadSingle();
             spell.MinFaction = r.ReadUInt32();
             spell.MinReputation = r.ReadUInt32();
             spell.RequiredAuraVision = r.ReadUInt32();
             spell.TotemCategory[0] = r.ReadInt32();
             spell.TotemCategory[1] = r.ReadInt32();
             spell.AreaGroup = r.ReadInt32();
             spell.SchoolMask = r.ReadUInt32();
             spell.RuneCost = r.ReadUInt32();
             spell.Missile = r.ReadUInt32();
             spell.PowerDisplay = r.ReadUInt32();
             spell.EffectBonusMultiplier[0] = r.ReadSingle();
             spell.EffectBonusMultiplier[1] = r.ReadSingle();
             spell.EffectBonusMultiplier[2] = r.ReadSingle();
             spell.DescriptionVariable = r.ReadUInt32();
             spell.Difficulty = r.ReadUInt32();
             list.Add(spell);
         }
         r.Close();
         return list;
     }
 }