feat(hs): view plugin to open team-select panel

This commit is contained in:
Acentech Dev
2026-07-20 23:28:04 +03:00
parent f5e1f46444
commit 2efe1ef84d
2 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
// <copyright file="ShowHeykelSavasiTeamPanelPlugIn.cs" company="MUnique">
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </copyright>
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;
/// <summary>
/// The default implementation of the <see cref="IShowHeykelSavasiTeamPanelPlugIn"/> which is forwarding everything to the game client with specific data packets.
/// </summary>
[PlugIn]
[Guid("bccff260-8f1c-40fe-90b2-110723e13374")]
public class ShowHeykelSavasiTeamPanelPlugIn : IShowHeykelSavasiTeamPanelPlugIn
{
private readonly RemotePlayer _player;
/// <summary>
/// Initializes a new instance of the <see cref="ShowHeykelSavasiTeamPanelPlugIn"/> class.
/// </summary>
/// <param name="player">The player.</param>
public ShowHeykelSavasiTeamPanelPlugIn(RemotePlayer player) => this._player = player;
/// <inheritdoc/>
public async ValueTask ShowTeamPanelAsync(int redCount, int blueCount)
{
var connection = this._player.Connection;
if (connection is null)
{
return;
}
await connection.SendHeykelSavasiOpenTeamPanelAsync((byte)redCount, (byte)blueCount).ConfigureAwait(false);
}
}