~ruther/NosSmooth

965817483eb1fddcee158b19277481a6ddf16ea4 — Rutherther 2 years ago 5c30f9f
feat(data): add skill attack type, uses secondary weapon and element
M Data/NosSmooth.Data.Abstractions/Infos/ISkillInfo.cs => Data/NosSmooth.Data.Abstractions/Infos/ISkillInfo.cs +15 -0
@@ 45,6 45,16 @@ public interface ISkillInfo : IVNumInfo
    SkillType SkillType { get; }

    /// <summary>
    /// Gets the attack type of the skill.
    /// </summary>
    AttackType AttackType { get; }

    /// <summary>
    /// Gets whether the skill uses secondary weapon, primary weapon is used if false.
    /// </summary>
    public bool UsesSecondaryWeapon { get; }

    /// <summary>
    /// Gets the mana points the skill cast costs.
    /// </summary>
    int MpCost { get; }


@@ 63,4 73,9 @@ public interface ISkillInfo : IVNumInfo
    /// Gets the hit type of the skill.
    /// </summary>
    HitType HitType { get; }

    /// <summary>
    /// Gets the element of the skill.
    /// </summary>
    public Element Element { get; }
}
\ No newline at end of file

M Data/NosSmooth.Data.Abstractions/NosSmooth.Data.Abstractions.csproj => Data/NosSmooth.Data.Abstractions/NosSmooth.Data.Abstractions.csproj +2 -2
@@ 7,9 7,9 @@
        <LangVersion>10</LangVersion>
        <RepositoryUrl>https://github.com/Rutherther/NosSmooth/</RepositoryUrl>
        <PackageLicenseExpression>MIT</PackageLicenseExpression>
        <PackageVersion>2.1.0</PackageVersion>
        <PackageVersion>2.2.0</PackageVersion>
        <TargetFramework>net7.0</TargetFramework>
        <PackageReleaseNotes>Add item type and equipment slot enums.</PackageReleaseNotes>
        <PackageReleaseNotes>Add new skill information: uses secondary weapon, attack type, element</PackageReleaseNotes>
        <AssemblyVersion>2.1.0</AssemblyVersion>
        <FileVersion>2.1.0</FileVersion>
    </PropertyGroup>

M Data/NosSmooth.Data.Database/Data/SkillInfo.cs => Data/NosSmooth.Data.Database/Data/SkillInfo.cs +19 -10
@@ 36,32 36,41 @@ public class SkillInfo : ISkillInfo
    }

    /// <inheritdoc />
    public TranslatableString Name { get;  set; }
    public TranslatableString Name { get; set; }

    /// <inheritdoc />
    public short Range { get;  set; }
    public short Range { get; set; }

    /// <inheritdoc />
    public short ZoneRange { get; set;  }
    public short ZoneRange { get; set; }

    /// <inheritdoc />
    public int CastTime { get; set;  }
    public int CastTime { get; set; }

    /// <inheritdoc />
    public int Cooldown { get; set;  }
    public int Cooldown { get; set; }

    /// <inheritdoc />
    public SkillType SkillType { get; set;  }
    public SkillType SkillType { get; set; }

    /// <inheritdoc />
    public int MpCost { get;  set; }
    public AttackType AttackType { get; set; }

    /// <inheritdoc />
    public short CastId { get; set;  }
    public Element Element { get; set; }

    /// <inheritdoc />
    public TargetType TargetType { get; set;  }
    public bool UsesSecondaryWeapon { get; set; }

    /// <inheritdoc />
    public HitType HitType { get; set;  }
    public int MpCost { get; set; }

    /// <inheritdoc />
    public short CastId { get; set; }

    /// <inheritdoc />
    public TargetType TargetType { get; set; }

    /// <inheritdoc />
    public HitType HitType { get; set; }
}
\ No newline at end of file

M Data/NosSmooth.Data.Database/DatabaseMigrator.cs => Data/NosSmooth.Data.Database/DatabaseMigrator.cs +4 -1
@@ 141,7 141,10 @@ public class DatabaseMigrator
                SkillType = skill.SkillType,
                TargetType = skill.TargetType,
                VNum = skill.VNum,
                ZoneRange = skill.ZoneRange
                ZoneRange = skill.ZoneRange,
                AttackType = skill.AttackType,
                Element = skill.Element,
                UsesSecondaryWeapon = skill.UsesSecondaryWeapon
            };
            dbContext.Add(skillInfo);
        }

M Data/NosSmooth.Data.Database/NosSmooth.Data.Database.csproj => Data/NosSmooth.Data.Database/NosSmooth.Data.Database.csproj +4 -4
@@ 7,11 7,11 @@
        <LangVersion>10</LangVersion>
        <RepositoryUrl>https://github.com/Rutherther/NosSmooth/</RepositoryUrl>
        <PackageLicenseExpression>MIT</PackageLicenseExpression>
        <PackageVersion>2.0.1</PackageVersion>
        <PackageVersion>2.1.0</PackageVersion>
        <TargetFramework>net7.0</TargetFramework>
        <PackageReleaseNotes>Make Monster level ushort</PackageReleaseNotes>
        <AssemblyVersion>2.0.1</AssemblyVersion>
        <FileVersion>2.0.1</FileVersion>
        <PackageReleaseNotes>Add new skill fields.</PackageReleaseNotes>
        <AssemblyVersion>2.1.0</AssemblyVersion>
        <FileVersion>2.1.0</FileVersion>
    </PropertyGroup>

    <ItemGroup>

M Data/NosSmooth.Data.NOSFiles/NosSmooth.Data.NOSFiles.csproj => Data/NosSmooth.Data.NOSFiles/NosSmooth.Data.NOSFiles.csproj +4 -4
@@ 7,11 7,11 @@
        <LangVersion>10</LangVersion>
        <RepositoryUrl>https://github.com/Rutherther/NosSmooth/</RepositoryUrl>
        <PackageLicenseExpression>MIT</PackageLicenseExpression>
        <PackageVersion>2.1.0</PackageVersion>
        <PackageReleaseNotes>Make correct parsing of item bag, type, equipment slot</PackageReleaseNotes>
        <PackageVersion>2.2.0</PackageVersion>
        <PackageReleaseNotes>Add new skill fields.</PackageReleaseNotes>
        <TargetFramework>net7.0</TargetFramework>
        <AssemblyVersion>2.1.0</AssemblyVersion>
        <FileVersion>2.1.0</FileVersion>
        <AssemblyVersion>2.2.0</AssemblyVersion>
        <FileVersion>2.2.0</FileVersion>
    </PropertyGroup>

    <ItemGroup>

M Data/NosSmooth.Data.NOSFiles/Parsers/SkillParser.cs => Data/NosSmooth.Data.NOSFiles/Parsers/SkillParser.cs +8 -2
@@ 49,10 49,13 @@ public class SkillParser : IInfoParser<ISkillInfo>
                    dataEntry.Read<int>(5),
                    dataEntry.Read<int>(6),
                    (SkillType)typeEntry.Read<int>(1),
                    (AttackType)typeEntry.Read<int>(4),
                    typeEntry.Read<bool>(5),
                    dataEntry.Read<int>(9),
                    typeEntry.Read<short>(2),
                    (TargetType)targetEntry.Read<int>(1),
                    (HitType)targetEntry.Read<int>(2)
                    (HitType)targetEntry.Read<int>(2),
                    (Element)typeEntry.Read<int>(6)
                )
            );
        }


@@ 69,9 72,12 @@ public class SkillParser : IInfoParser<ISkillInfo>
        int CastTime,
        int Cooldown,
        SkillType SkillType,
        AttackType AttackType,
        bool UsesSecondaryWeapon,
        int MpCost,
        short CastId,
        TargetType TargetType,
        HitType HitType
        HitType HitType,
        Element Element
    ) : ISkillInfo;
}
\ No newline at end of file

Do not follow this link