From 002e4cc29f2ac7c001a0179cf49ca02c9064cfb3 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Sat, 1 Jun 2024 09:18:00 -0700 Subject: [PATCH] Implement TRADE_ADMIN handler --- .../PacketHandlers/Trade/TradeAdminHandler.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 EOLib/PacketHandlers/Trade/TradeAdminHandler.cs diff --git a/EOLib/PacketHandlers/Trade/TradeAdminHandler.cs b/EOLib/PacketHandlers/Trade/TradeAdminHandler.cs new file mode 100644 index 000000000..90df7e008 --- /dev/null +++ b/EOLib/PacketHandlers/Trade/TradeAdminHandler.cs @@ -0,0 +1,28 @@ +using AutomaticTypeMapper; +using EOLib.Domain.Login; +using EOLib.Domain.Trade; +using Moffat.EndlessOnline.SDK.Protocol.Net; +using Moffat.EndlessOnline.SDK.Protocol.Net.Server; + +namespace EOLib.PacketHandlers.Trade +{ + [AutoMappedType] + public class TradeAdminHandler : TradeOfferUpdateHandler + { + public override PacketFamily Family => PacketFamily.Trade; + + public override PacketAction Action => PacketAction.Admin; + + public TradeAdminHandler(IPlayerInfoProvider playerInfoProvider, + ITradeRepository tradeRepository) + : base(playerInfoProvider, tradeRepository) + { + } + + public override bool HandlePacket(TradeAdminServerPacket packet) + { + Handle(packet.TradeData); + return true; + } + } +}