baseline: OpenMU upstream b5a0961 (fresh source)
This commit is contained in:
36
src/GameServer/RemoteView/World/WeatherStatusUpdatePlugIn.cs
Normal file
36
src/GameServer/RemoteView/World/WeatherStatusUpdatePlugIn.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
// <copyright file="WeatherStatusUpdatePlugIn.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.World;
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using MUnique.OpenMU.GameLogic.Views.World;
|
||||
using MUnique.OpenMU.Network.Packets.ServerToClient;
|
||||
using MUnique.OpenMU.PlugIns;
|
||||
|
||||
/// <summary>
|
||||
/// The default implementation of the <see cref="IWeatherStatusUpdatePlugIn"/> which is forwarding everything to the game client with specific data packets.
|
||||
/// </summary>
|
||||
[PlugIn]
|
||||
[Display(Name = nameof(PlugInResources.WeatherStatusUpdatePlugIn_Name), Description = nameof(PlugInResources.WeatherStatusUpdatePlugIn_Description), ResourceType = typeof(PlugInResources))]
|
||||
[Guid("44369927-4EE4-47D7-9C6C-DD74FC824071")]
|
||||
public class WeatherStatusUpdatePlugIn : IWeatherStatusUpdatePlugIn
|
||||
{
|
||||
private readonly RemotePlayer _player;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WeatherStatusUpdatePlugIn"/> class.
|
||||
/// </summary>
|
||||
/// <param name="player">The player.</param>
|
||||
public WeatherStatusUpdatePlugIn(RemotePlayer player)
|
||||
{
|
||||
this._player = player;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ValueTask ShowWeatherAsync(byte weather, byte variation)
|
||||
{
|
||||
return this._player.Connection.SendWeatherStatusUpdateAsync(weather, variation);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user