コード例 #1
0
ファイル: Utils.cs プロジェクト: lvtx/MuEditor
        public static string SKILL_GS2SQL(SKILL_SQL_GS ssg)
        {
            byte[] array     = new byte[3];
            byte[] array2    = array;
            int    gsskillID = ssg.GSSkillID;
            int    num       = gsskillID;
            byte   skillLv   = ssg.SKillLv;
            int    num2      = 0;
            int    num3;

            if (gsskillID > 765)
            {
                num3 = 3;
                num  = 255;
                num2 = gsskillID - 765;
            }
            else if (gsskillID > 510)
            {
                num3 = 2;
                num  = 255;
                num2 = gsskillID - 510;
            }
            else if (gsskillID > 255)
            {
                num3 = 1;
                num  = 255;
                num2 = gsskillID - 255;
            }
            else
            {
                num3 = 0;
            }
            array2[0] = (byte)num;
            array2[1] = (byte)((int)(skillLv * 8) | (num3 & 7));
            array2[2] = (byte)num2;
            return(array2[0].ToString("X2") + array2[1].ToString("X2") + array2[2].ToString("X2"));
        }
コード例 #2
0
        public static string SKILL_GS2SQL(SKILL_SQL_GS ssg)
        {
            byte[] numArray  = new byte[3];
            int    num       = 0;
            int    gSSkillID = ssg.GSSkillID;
            int    num1      = gSSkillID;
            byte   sKillLv   = ssg.SKillLv;
            int    num2      = 0;

            if (gSSkillID > 765)
            {
                num  = 3;
                num1 = 255;
                num2 = gSSkillID - num1 * num;
            }
            else if (gSSkillID > 510)
            {
                num  = 2;
                num1 = 255;
                num2 = gSSkillID - num1 * num;
            }
            else if (gSSkillID <= 255)
            {
                num = 0;
            }
            else
            {
                num  = 1;
                num1 = 255;
                num2 = gSSkillID - num1 * num;
            }
            numArray[0] = (byte)num1;
            numArray[1] = (byte)(sKillLv * 8 | num & 7);
            numArray[2] = (byte)num2;
            return(string.Concat(numArray[0].ToString("X2"), numArray[1].ToString("X2"), numArray[2].ToString("X2")));
        }
コード例 #3
0
ファイル: frmMasterLevel.cs プロジェクト: lvtx/MuEditor
        // Token: 0x0600003D RID: 61 RVA: 0x00007858 File Offset: 0x00005A58
        private string getJNSQL(bool isAll)
        {
            string        format        = "UPDATE Character SET MagicList = {0} WHERE (Name = '" + charName + "')";
            StringBuilder stringBuilder = new StringBuilder("0x");
            int           num           = 0;
            int           num2          = 0;

            for (int i = 0; i < Utils.lstSSG.Count; i++)
            {
                SKILL_SQL_GS skill_SQL_GS = Utils.lstSSG[i];
                if (skill_SQL_GS.GSSkillID > 0 && skill_SQL_GS.GSSkillID < 255)
                {
                    stringBuilder.Append(Utils.SKILL_GS2SQL(skill_SQL_GS));
                    num++;
                }
            }
            if (isAll)
            {
                num2 = 26;
                int num3 = classID;
                if (num3 <= 35)
                {
                    switch (num3)
                    {
                    case 0:
                    case 1:
                    case 3:
                        stringBuilder.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29BDFF2968FF296DFF29C2FF29C7FF2936FF29B8FF2977FF2972FF297CFF299FFF29A4FF2940FF2945FF2959FF295EFF2981FF299A");
                        goto IL_188;

                    case 2:
                        break;

                    default:
                        switch (num3)
                        {
                        case 16:
                        case 17:
                        case 19:
                            stringBuilder.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29CCFF2968FF296DFF29D1FF29D6FF2936FF29DBFF2977FF2972FF297CFF2990FF2995FF2940FF2945FF2959FF295EFF2981FF299A");
                            goto IL_188;

                        case 18:
                            break;

                        default:
                            switch (num3)
                            {
                            case 32:
                            case 33:
                            case 35:
                                stringBuilder.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29E0FF2968FF296DFF29E5FF29EAFF2936FF29EFFF2977FF2972FF297CFF2990FF2995FF2940FF2945FF2959FF295EFF2981FF299A");
                                goto IL_188;
                            }
                            break;
                        }
                        break;
                    }
                }
                else
                {
                    switch (num3)
                    {
                    case 48:
                    case 50:
                        stringBuilder.Append("FF2A18FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29F4FF2968FF296DFF29F9FF29FEFF2936FF2A04FF2977FF2972FF297CFF29AEFF2940FF2945FF2959FF295EFF2981FF299A");
                        goto IL_188;

                    case 49:
                        break;

                    default:
                        switch (num3)
                        {
                        case 64:
                        case 66:
                            stringBuilder.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF2A0EFF2968FF296DFF2A13FF2936FF2A09FF2977FF2972FF297CFF2990FF2995FF2940FF2945FF2959FF295EFF2981FF29A9FF299A");
                            goto IL_188;

                        case 65:
                            break;

                        default:
                            switch (num3)
                            {
                            case 80:
                            case 81:
                            case 83:
                                num2 += 3;
                                stringBuilder.Append("FF2A2CFF2A22FF2A1DFF2A27FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF2A0EFF2968FF296DFF2A13FF2936FF2A09FF2977FF2972FF297CFF2940FF2945FF2959FF295EFF2981FF299AFF299FFF29A4");
                                goto IL_188;
                            }
                            break;
                        }
                        break;
                    }
                }
                num2 = 0;
            }
IL_188:
            for (int j = num2 + num; j < 150; j++)
            {
                stringBuilder.Append("FF0000");
            }
            return(string.Format(format, stringBuilder.ToString()));
        }
コード例 #4
0
        private string getJNSQL(bool isAll)
        {
            int           j;
            StringBuilder stringBuilder;
            string        str            = string.Concat("UPDATE Character SET MagicList = {0} WHERE (Name = '", this.charName, "')");
            StringBuilder stringBuilder1 = new StringBuilder("0x");
            int           num            = 0;
            int           num1           = 0;

            for (int i = 0; i < Utils.lstSSG.Count; i++)
            {
                SKILL_SQL_GS item = Utils.lstSSG[i];
                if (item.GSSkillID > 0 && item.GSSkillID < 255)
                {
                    stringBuilder1.Append(Utils.SKILL_GS2SQL(item));
                    num++;
                }
            }
            if (isAll)
            {
                num1 = 26;
                int num2 = this.classID;
                if (num2 > 35)
                {
                    switch (num2)
                    {
                    case 48:
                    case 50:
                    {
                        stringBuilder1.Append("FF2A18FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29F4FF2968FF296DFF29F9FF29FEFF2936FF2A04FF2977FF2972FF297CFF29AEFF2940FF2945FF2959FF295EFF2981FF299A");
                        for (j = num1 + num; j < 150; j++)
                        {
                            stringBuilder = stringBuilder1.Append("FF0000");
                        }
                        return(string.Format(str, stringBuilder1.ToString()));
                    }

                    case 49:
                    {
                        break;
                    }

                    default:
                    {
                        switch (num2)
                        {
                        case 64:
                        case 66:
                        {
                            stringBuilder1.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF2A0EFF2968FF296DFF2A13FF2936FF2A09FF2977FF2972FF297CFF2990FF2995FF2940FF2945FF2959FF295EFF2981FF29A9FF299A");
                            for (j = num1 + num; j < 150; j++)
                            {
                                stringBuilder = stringBuilder1.Append("FF0000");
                            }
                            return(string.Format(str, stringBuilder1.ToString()));
                        }

                        case 65:
                        {
                            break;
                        }

                        default:
                        {
                            switch (num2)
                            {
                            case 80:
                            case 81:
                            case 83:
                            {
                                num1 = num1 + 3;
                                stringBuilder1.Append("FF2A2CFF2A22FF2A1DFF2A27FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF2A0EFF2968FF296DFF2A13FF2936FF2A09FF2977FF2972FF297CFF2940FF2945FF2959FF295EFF2981FF299AFF299FFF29A4");
                                for (j = num1 + num; j < 150; j++)
                                {
                                    stringBuilder = stringBuilder1.Append("FF0000");
                                }
                                return(string.Format(str, stringBuilder1.ToString()));
                            }
                            }
                            break;
                        }
                        }
                        break;
                    }
                    }
                }
                else
                {
                    switch (num2)
                    {
                    case 0:
                    case 1:
                    case 3:
                    {
                        stringBuilder1.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29BDFF2968FF296DFF29C2FF29C7FF2936FF29B8FF2977FF2972FF297CFF299FFF29A4FF2940FF2945FF2959FF295EFF2981FF299A");
                        for (j = num1 + num; j < 150; j++)
                        {
                            stringBuilder = stringBuilder1.Append("FF0000");
                        }
                        return(string.Format(str, stringBuilder1.ToString()));
                    }

                    case 2:
                    {
                        break;
                    }

                    default:
                    {
                        switch (num2)
                        {
                        case 16:
                        case 17:
                        case 19:
                        {
                            stringBuilder1.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29CCFF2968FF296DFF29D1FF29D6FF2936FF29DBFF2977FF2972FF297CFF2990FF2995FF2940FF2945FF2959FF295EFF2981FF299A");
                            for (j = num1 + num; j < 150; j++)
                            {
                                stringBuilder = stringBuilder1.Append("FF0000");
                            }
                            return(string.Format(str, stringBuilder1.ToString()));
                        }

                        case 18:
                        {
                            break;
                        }

                        default:
                        {
                            switch (num2)
                            {
                            case 32:
                            case 33:
                            case 35:
                            {
                                stringBuilder1.Append("FF293BFF294AFF294FFF2954FF2963FF2986FF298BFF2931FF29E0FF2968FF296DFF29E5FF29EAFF2936FF29EFFF2977FF2972FF297CFF2990FF2995FF2940FF2945FF2959FF295EFF2981FF299A");
                                for (j = num1 + num; j < 150; j++)
                                {
                                    stringBuilder = stringBuilder1.Append("FF0000");
                                }
                                return(string.Format(str, stringBuilder1.ToString()));
                            }
                            }
                            break;
                        }
                        }
                        break;
                    }
                    }
                }
                num1 = 0;
            }
            for (j = num1 + num; j < 150; j++)
            {
                stringBuilder = stringBuilder1.Append("FF0000");
            }
            return(string.Format(str, stringBuilder1.ToString()));
        }