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

30 lines
No EOL
832 B
C#

// WingsEmu
//
// Developed by NosWings Team
using System;
using System.Threading.Tasks;
using WingsAPI.Packets.Enums.Families;
using WingsEmu.Game.Families.Event;
using WingsEmu.Game.Networking;
using WingsEmu.Packets.ClientPackets;
namespace WingsEmu.Plugins.PacketHandling.Game.Families;
public class FamilyFAuthPacketHandler : GenericGamePacketHandlerBase<FAuthPacket>
{
protected override async Task HandlePacketAsync(IClientSession session, FAuthPacket packet)
{
if (!Enum.TryParse(packet.AuthorityId.ToString(), out FamilyActionType actionType))
{
return;
}
await session.EmitEventAsync(new FamilyChangeSettingsEvent
{
Authority = packet.MemberType,
FamilyActionType = actionType,
Value = packet.Value
});
}
}