// // Licensed under the MIT License. See LICENSE file in the project root for full license information. // namespace MUnique.OpenMU.GameServer.RemoteView.Trade; using System.Runtime.InteropServices; using MUnique.OpenMU.GameLogic; using MUnique.OpenMU.GameLogic.Views.Trade; using MUnique.OpenMU.Network.Packets.ServerToClient; using MUnique.OpenMU.PlugIns; /// /// The default implementation of the which is forwarding everything to the game client with specific data packets. /// [PlugIn] [Display(Name = nameof(PlugInResources.ShowTradeRequestPlugIn_Name), Description = nameof(PlugInResources.ShowTradeRequestPlugIn_Description), ResourceType = typeof(PlugInResources))] [Guid("2e6e8c0e-8220-46e3-931a-630d596178ca")] public class ShowTradeRequestPlugIn : IShowTradeRequestPlugIn { private readonly RemotePlayer _player; /// /// Initializes a new instance of the class. /// /// The player. public ShowTradeRequestPlugIn(RemotePlayer player) => this._player = player; /// public async ValueTask ShowTradeRequestAsync(ITrader requester) { await this._player.Connection.SendTradeRequestAsync(requester.Name).ConfigureAwait(false); } }