示例#1
0
        private void LoadTable()
        {
            int num = 400 + ((this.m_Index.Length - 0x88b8) / 0xaf);

            this.m_Table = new int[num];
            for (int i = 0; i < num; i++)
            {
                object obj2 = BodyTable.m_Entries[i];
                if ((obj2 == null) || BodyConverter.Contains(i))
                {
                    this.m_Table[i] = i;
                }
                else
                {
                    BodyTableEntry entry = (BodyTableEntry)obj2;
                    this.m_Table[i] = (entry.m_OldID | -2147483648) | (((entry.m_NewHue ^ 0x8000) & 0xffff) << 15);
                }
            }
        }
示例#2
0
        public int ConvertRealID(ref int realID)
        {
            int num;
            int num2;
            int num3;

            if (realID >= 0x88b8)
            {
                num  = 400 + ((realID - 0x88b8) / 0xaf);
                num2 = ((realID - 0x88b8) % 0xaf) / 5;
                num3 = ((realID - 0x88b8) % 0xaf) % 5;
            }
            else if (realID >= 0x55f0)
            {
                num  = 200 + ((realID - 0x55f0) / 0x41);
                num2 = ((realID - 0x55f0) % 0x41) / 5;
                num3 = ((realID - 0x55f0) % 0x41) % 5;
            }
            else
            {
                num  = realID / 110;
                num2 = (realID % 110) / 5;
                num3 = (realID % 110) % 5;
            }
            int num4 = BodyConverter.Convert(ref num);

            switch (num4)
            {
            case 2:
                if (num < 200)
                {
                    realID = ((num * 110) + (num2 * 5)) + num3;
                    return(num4);
                }
                realID = ((0x55f0 + ((num - 200) * 0x41)) + (num2 * 5)) + num3;
                return(num4);

            case 3:
                if (num < 300)
                {
                    realID = ((num * 0x41) + (num2 * 5)) + num3;
                    return(num4);
                }
                if (num < 400)
                {
                    realID = ((0x80e8 + ((num - 300) * 110)) + (num2 * 5)) + num3;
                    return(num4);
                }
                realID = ((0x88b8 + ((num - 400) * 0xaf)) + (num2 * 5)) + num3;
                return(num4);
            }
            if (num4 == 4)
            {
                if (num < 200)
                {
                    realID = ((num * 110) + (num2 * 5)) + num3;
                    return(num4);
                }
                if (num < 400)
                {
                    realID = ((0x55f0 + ((num - 200) * 0x41)) + (num2 * 5)) + num3;
                    return(num4);
                }
                realID = ((0x88b8 + ((num - 400) * 0xaf)) + (num2 * 5)) + num3;
            }
            return(num4);
        }