From 45f6f5af768534ecdd4587db372371f937e62ee8 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Fri, 20 Jan 2023 19:29:27 +0100 Subject: [PATCH] feat(game): keep only skills of type Player in player's skills --- Core/NosSmooth.Game/NosSmooth.Game.csproj | 3 ++- .../PacketHandlers/Skills/PlayerSkillResponder.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/NosSmooth.Game/NosSmooth.Game.csproj b/Core/NosSmooth.Game/NosSmooth.Game.csproj index b801642..d884a97 100644 --- a/Core/NosSmooth.Game/NosSmooth.Game.csproj +++ b/Core/NosSmooth.Game/NosSmooth.Game.csproj @@ -9,7 +9,8 @@ https://github.com/Rutherther/NosSmooth/ MIT 2.4.2 - Change position of caster when receiving su packet. + Remove passives from player skills. + Change position of caster when receiving su packet. diff --git a/Core/NosSmooth.Game/PacketHandlers/Skills/PlayerSkillResponder.cs b/Core/NosSmooth.Game/PacketHandlers/Skills/PlayerSkillResponder.cs index 498c2a3..39731d4 100644 --- a/Core/NosSmooth.Game/PacketHandlers/Skills/PlayerSkillResponder.cs +++ b/Core/NosSmooth.Game/PacketHandlers/Skills/PlayerSkillResponder.cs @@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging; using NosSmooth.Core.Extensions; using NosSmooth.Core.Packets; using NosSmooth.Data.Abstractions; +using NosSmooth.Data.Abstractions.Enums; using NosSmooth.Game.Data.Characters; using NosSmooth.Game.Events.Characters; using NosSmooth.Game.Events.Core; @@ -95,6 +96,7 @@ public class PlayerSkillResponder : IPacketResponder } otherSkillsFromCharacter.RemoveAll(x => x.SkillVNum == primarySkill.SkillVNum || x.SkillVNum == secondarySkill.SkillVNum); + otherSkillsFromCharacter.RemoveAll(x => x.Info?.SkillType != SkillType.Player); skills = new Data.Characters.Skills(primarySkill, secondarySkill, otherSkillsFromCharacter); await _game.CreateOrUpdateSkillsAsync -- 2.49.0