~ruther/NosSmooth

73f80b9e05e1a05e9bca6df01db44d324e5309c5 — Rutherther 2 years ago d9dee03
feat(game): remove primary and secondary skill from OtherSkills, add AllSkills
M Core/NosSmooth.Game/Data/Characters/Skills.cs => Core/NosSmooth.Game/Data/Characters/Skills.cs +7 -1
@@ 17,4 17,10 @@ public record Skills
    Skill PrimarySkill,
    Skill SecondarySkill,
    IReadOnlyList<Skill> OtherSkills
);
\ No newline at end of file
)
{
    /// <summary>
    /// Gets all skills contained in this collection.
    /// </summary>
    public IEnumerable<Skill> AllSkills => new[] { PrimarySkill, SecondarySkill }.Concat(OtherSkills);
}
\ No newline at end of file

M Core/NosSmooth.Game/PacketHandlers/Skills/PlayerSkillResponder.cs => Core/NosSmooth.Game/PacketHandlers/Skills/PlayerSkillResponder.cs +1 -0
@@ 94,6 94,7 @@ public class PlayerSkillResponder : IPacketResponder<SkiPacket>
            otherSkillsFromCharacter.Add(await CreateSkill(newSkill, default));
        }

        otherSkillsFromCharacter.RemoveAll(x => x.SkillVNum == primarySkill.SkillVNum || x.SkillVNum == secondarySkill.SkillVNum);
        skills = new Data.Characters.Skills(primarySkill, secondarySkill, otherSkillsFromCharacter);

        await _game.CreateOrUpdateSkillsAsync

Do not follow this link