server-master/srcs/_plugins/WingsEmu.Plugins.PacketHandling/Game/Relations/FInsPacketHandler.cs
2026-02-10 18:21:30 +01:00

24 lines
No EOL
666 B
C#

using System;
using System.Threading.Tasks;
using WingsEmu.Game.Networking;
using WingsEmu.Game.Relations;
using WingsEmu.Packets.ClientPackets;
namespace WingsEmu.Plugins.PacketHandling.Game.Basic;
public class FInsPacketHandler : GenericGamePacketHandlerBase<FInsPacket>
{
protected override async Task HandlePacketAsync(IClientSession session, FInsPacket packet)
{
if (!Enum.TryParse(packet.Type.ToString(), out FInsPacketType type))
{
return;
}
await session.EmitEventAsync(new RelationFriendEvent
{
RequestType = type,
CharacterId = packet.CharacterId
});
}
}