baseline: OpenMU upstream b5a0961 (fresh source)

This commit is contained in:
Acentech Dev
2026-07-14 19:00:35 +03:00
parent 450402e47d
commit 36fc125d5c
11968 changed files with 748705 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
// <copyright file="PartyAutoRejoinPlugIn.cs" company="MUnique">
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </copyright>
namespace MUnique.OpenMU.GameLogic.PlugIns;
using System.Runtime.InteropServices;
using MUnique.OpenMU.GameLogic.Views.Party;
using MUnique.OpenMU.PlugIns;
/// <summary>
/// Listens for the <see cref="IPlayerStateChangedPlugIn"/> and automatically rejoins the player
/// to their previous party if it still exists when they enter the world.
/// </summary>
[PlugIn]
[Display(
Name = nameof(PlugInResources.PartyAutoRejoinPlugIn_Name),
Description = nameof(PlugInResources.PartyAutoRejoinPlugIn_Description),
ResourceType = typeof(PlugInResources))]
[Guid("013406B3-02AD-45EF-906B-177CBEC9B2D4")]
public sealed class PartyAutoRejoinPlugIn : IPlayerStateChangedPlugIn
{
/// <inheritdoc />
public async ValueTask PlayerStateChangedAsync(Player player, State previousState, State currentState)
{
if (currentState != PlayerState.EnteredWorld)
{
return;
}
await player.GameContext.PartyManager.OnMemberReconnectedAsync(player).ConfigureAwait(false);
}
}