Exemple #1
0
        public SkillClass(string FileName)
        {
            byte[]     numArray   = new byte[] { 252, 207, 171 };
            int        num        = 96;
            FileInfo   fileInfo   = new FileInfo(FileName);
            long       length     = (fileInfo.Length - (long)4) / (long)num;
            FileStream fileStream = new FileStream(FileName, FileMode.Open);

            for (int i = 0; (long)i < length; i++)
            {
                int          num1         = 0;
                CMagicDamage cMagicDamage = new CMagicDamage();
                byte[]       numArray1    = new byte[num];
                fileStream.Read(numArray1, 0, num);
                for (int j = 0; j < num; j++)
                {
                    numArray1[j] = (byte)(numArray1[j] ^ numArray[j % 3]);
                }
                cMagicDamage.m_Number = i;
                Array.Copy(numArray1, num1, cMagicDamage.Name, 0, 32);
                num1               = num1 + 32;
                cMagicDamage.饭骇    = BitConverter.ToUInt16(numArray1, num1);
                num1               = num1 + 2;
                cMagicDamage.单固瘤   = BitConverter.ToUInt16(numArray1, num1);
                num1               = num1 + 2;
                cMagicDamage.荤侩付唱樊 = BitConverter.ToUInt16(numArray1, num1);
                num1               = num1 + 2;
                cMagicDamage.绢呼府萍  = BitConverter.ToUInt16(numArray1, num1);
                num1               = num1 + 2;
                cMagicDamage.芭府    = BitConverter.ToUInt32(numArray1, num1);
                num1               = num1 + 4;
                cMagicDamage.Delay = BitConverter.ToUInt32(numArray1, num1);
                num1               = num1 + 4;
                cMagicDamage.Eng   = BitConverter.ToUInt32(numArray1, num1);
                num1               = num1 + 4;
                cMagicDamage.Cha   = BitConverter.ToUInt16(numArray1, num1);
                num1               = num1 + 2;
                cMagicDamage.加己    = numArray1[num1];
                num1++;
                cMagicDamage.SkilluseType = numArray1[num1];
                num1++;
                cMagicDamage.SkillBrand = BitConverter.ToInt32(numArray1, num1);
                num1 = num1 + 4;
                cMagicDamage.KillCout = numArray1[num1];
                num1++;
                cMagicDamage.iStatuNumber.stOne = numArray1[num1];
                num1++;
                cMagicDamage.iStatuNumber.stTwo = numArray1[num1];
                num1++;
                cMagicDamage.iStatuNumber.stThe = numArray1[num1];
                num1++;
                cMagicDamage.iClassNumber.WIZARD = numArray1[num1];
                num1++;
                cMagicDamage.iClassNumber.KNIGHT = numArray1[num1];
                num1++;
                cMagicDamage.iClassNumber.ELF = numArray1[num1];
                num1++;
                cMagicDamage.iClassNumber.MAGUMSA = numArray1[num1];
                num1++;
                cMagicDamage.iClassNumber.DARKLORD = numArray1[num1];
                num1++;
                cMagicDamage.iClassNumber.SUMMONER = numArray1[num1];
                num1++;
                cMagicDamage.iClassNumber.MONK = numArray1[num1];
                num1++;
                cMagicDamage.胶懦珐农 = numArray1[num1];
                num1++;
                cMagicDamage.酒捞能锅龋 = BitConverter.ToUInt16(numArray1, num1);
                num1 = num1 + 2;
                cMagicDamage.胶懦鸥涝 = BitConverter.ToUInt16(numArray1, num1);
                num1              = num1 + 2;
                cMagicDamage.鞘夸塞  = BitConverter.ToUInt16(numArray1, num1);
                num1              = num1 + 2;
                cMagicDamage.家葛眉仿 = BitConverter.ToUInt16(numArray1, num1);
                num1              = num1 + 2;
                cMagicDamage.家葛SD = BitConverter.ToUInt16(numArray1, num1);
                num1              = num1 + 2;
                cMagicDamage.鞘夸刮酶 = BitConverter.ToUInt16(numArray1, num1);
                num1              = num1 + 2;
                cMagicDamage.公扁胶懦 = numArray1[num1];
                num1++;
                cMagicDamage.单固瘤备盒 = numArray1[num1];
                num1++;
                cMagicDamage.滚橇牢郸胶 = BitConverter.ToUInt16(numArray1, num1);
                num1 = num1 + 2;
                cMagicDamage.鸥百措惑 = numArray1[num1];
                num1++;
                cMagicDamage.鸥百康开 = numArray1[num1];
                num1++;
                cMagicDamage.荤芭府郴厘局拱 = numArray1[num1];
                num1++;
                cMagicDamage.鸥百卵扁 = numArray1[num1];
                num1++;
                cMagicDamage.呕巴眉农 = numArray1[num1];
                num1++;
                cMagicDamage.厘厚眉农 = numArray1[num1];
                num1++;
                cMagicDamage.UNK = BitConverter.ToUInt16(numArray1, num1);
                num1             = num1 + 2;
                this.cMagic[i]   = cMagicDamage;
            }
        }
Exemple #2
0
        public SkillClass(string FileName)
        {
            byte[] array = new byte[]
            {
                252,
                207,
                171
            };
            int        num        = 96;
            FileInfo   fileInfo   = new FileInfo(FileName);
            long       num2       = (fileInfo.Length - 4L) / 96L;
            FileStream fileStream = new FileStream(FileName, FileMode.Open);
            int        num3       = 0;

            while ((long)num3 < num2)
            {
                int          num4         = 0;
                CMagicDamage cmagicDamage = new CMagicDamage();
                byte[]       array2       = new byte[num];
                fileStream.Read(array2, 0, num);
                for (int i = 0; i < num; i++)
                {
                    byte[] array3 = array2;
                    int    num5   = i;
                    array3[num5] ^= array[i % 3];
                }
                cmagicDamage.m_Number = num3;
                Array.Copy(array2, num4, cmagicDamage.Name, 0, 32);
                num4 += 32;
                cmagicDamage.ushort_0 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_1 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_2 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_3 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.uint_0 = BitConverter.ToUInt32(array2, num4);
                num4 += 4;
                cmagicDamage.Delay = BitConverter.ToUInt32(array2, num4);
                num4               += 4;
                cmagicDamage.Eng    = BitConverter.ToUInt32(array2, num4);
                num4               += 4;
                cmagicDamage.Cha    = BitConverter.ToUInt16(array2, num4);
                num4               += 2;
                cmagicDamage.byte_0 = array2[num4];
                num4++;
                cmagicDamage.SkilluseType = array2[num4];
                num4++;
                cmagicDamage.SkillBrand = BitConverter.ToInt32(array2, num4);
                num4 += 4;
                cmagicDamage.KillCout = array2[num4];
                num4++;
                cmagicDamage.iStatuNumber.stOne = array2[num4];
                num4++;
                cmagicDamage.iStatuNumber.stTwo = array2[num4];
                num4++;
                cmagicDamage.iStatuNumber.stThe = array2[num4];
                num4++;
                cmagicDamage.iClassNumber.WIZARD = array2[num4];
                num4++;
                cmagicDamage.iClassNumber.KNIGHT = array2[num4];
                num4++;
                cmagicDamage.iClassNumber.ELF = array2[num4];
                num4++;
                cmagicDamage.iClassNumber.MAGUMSA = array2[num4];
                num4++;
                cmagicDamage.iClassNumber.DARKLORD = array2[num4];
                num4++;
                cmagicDamage.iClassNumber.SUMMONER = array2[num4];
                num4++;
                cmagicDamage.iClassNumber.MONK = array2[num4];
                num4++;
                cmagicDamage.byte_1 = array2[num4];
                num4++;
                cmagicDamage.ushort_4 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_5 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_6 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_7 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_8 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.ushort_9 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.byte_2 = array2[num4];
                num4++;
                cmagicDamage.byte_3 = array2[num4];
                num4++;
                cmagicDamage.ushort_10 = BitConverter.ToUInt16(array2, num4);
                num4 += 2;
                cmagicDamage.byte_4 = array2[num4];
                num4++;
                cmagicDamage.byte_5 = array2[num4];
                num4++;
                cmagicDamage.byte_6 = array2[num4];
                num4++;
                cmagicDamage.byte_7 = array2[num4];
                num4++;
                cmagicDamage.byte_8 = array2[num4];
                num4++;
                cmagicDamage.byte_9 = array2[num4];
                num4++;
                cmagicDamage.UNK  = BitConverter.ToUInt16(array2, num4);
                num4             += 2;
                this.cMagic[num3] = cmagicDamage;
                num3++;
            }
        }