//
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace MUnique.OpenMU.GameServer.RemoteView.MiniGames;
using System.Runtime.InteropServices;
using MUnique.OpenMU.GameLogic;
using MUnique.OpenMU.GameLogic.Views.MiniGames;
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]
[Guid("ef0cc7e9-07c6-4e60-afae-f8dd19332ad7")]
public class HeykelSavasiHudStatePlugIn : IHeykelSavasiHudStatePlugIn
{
private readonly RemotePlayer _player;
///
/// Initializes a new instance of the class.
///
/// The player.
public HeykelSavasiHudStatePlugIn(RemotePlayer player) => this._player = player;
///
public async ValueTask UpdateHudStateAsync(byte phase, byte myTeam, byte redCount, byte blueCount, byte redProgress, byte blueProgress, ushort remainingSeconds)
{
var connection = this._player.Connection;
if (connection is null)
{
return;
}
await connection.SendHeykelSavasiHudStateAsync(phase, myTeam, redCount, blueCount, redProgress, blueProgress, remainingSeconds).ConfigureAwait(false);
}
}