M Core/NosSmooth.Game/Data/Entities/LivingEntity.cs => Core/NosSmooth.Game/Data/Entities/LivingEntity.cs +1 -1
@@ 57,7 57,7 @@ public interface ILivingEntity : IEntity
/// <summary>
/// Gets the VNums of the effects the entity has.
/// </summary>
- public IReadOnlyList<long>? EffectsVNums { get; set; }
+ public IReadOnlyList<short>? EffectsVNums { get; set; }
/// <summary>
/// Gets the name of the entity. May be null if unknown.
M Core/NosSmooth.Game/PacketHandlers/Entities/StPacketResponder.cs => Core/NosSmooth.Game/PacketHandlers/Entities/StPacketResponder.cs +1 -1
@@ 45,7 45,7 @@ public class StPacketResponder : IPacketResponder<StPacket>
return Task.FromResult(Result.FromSuccess());
}
- entity.EffectsVNums = packet.BuffVNums?.Select(x => x.CardId).Cast<long>().ToList();
+ entity.EffectsVNums = packet.BuffVNums?.Select(x => x.CardId).ToList();
entity.Level = packet.Level;
if (entity is Player player)
{
R Extensions/NosSmooth.Extensions.Combat/Responders/SuResponder.cs => Extensions/NosSmooth.Extensions.Combat/Responders/SkillUseResponder.cs +9 -1
@@ 5,6 5,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using NosSmooth.Core.Packets;
+using NosSmooth.Packets;
using NosSmooth.Packets.Server.Battle;
using Remora.Results;
@@ 13,7 14,7 @@ namespace NosSmooth.Extensions.Combat.Responders;
/// <summary>
/// Responds to su packet.
/// </summary>
-public class SuResponder : IPacketResponder<SuPacket>
+public class SuResponder : IPacketResponder<SuPacket>, IPacketResponder<BsPacket>
{
private readonly CombatManager _combatManager;
@@ 32,4 33,11 @@ public class SuResponder : IPacketResponder<SuPacket>
_combatManager.CancelSkillTokensAsync(ct);
return Task.FromResult(Result.FromSuccess());
}
+
+ /// <inheritdoc />
+ public Task<Result> Respond(PacketEventArgs<BsPacket> packetArgs, CancellationToken ct = default)
+ {
+ _combatManager.CancelSkillTokensAsync(ct);
+ return Task.FromResult(Result.FromSuccess());
+ }
}=
\ No newline at end of file