//
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace MUnique.OpenMU.GameServer.RemoteView.Inventory;
using System.Runtime.InteropServices;
using MUnique.OpenMU.GameLogic.Views.Inventory;
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.UpdateMoneyPlugIn_Name), Description = nameof(PlugInResources.UpdateMoneyPlugIn_Description), ResourceType = typeof(PlugInResources))]
[Guid("7a13a613-7098-4407-8ef5-39bae08ce12d")]
public class UpdateMoneyPlugIn : IUpdateMoneyPlugIn
{
private readonly RemotePlayer _player;
///
/// Initializes a new instance of the class.
///
/// The player.
public UpdateMoneyPlugIn(RemotePlayer player) => this._player = player;
///
public async ValueTask UpdateMoneyAsync()
{
await this._player.Connection.SendInventoryMoneyUpdateAsync((uint)this._player.Money).ConfigureAwait(false);
}
}