mysimulation/server/FSO.Server.Protocol/Gluon/Packets/NotifyLotRoommateChange.cs
Tony Bark 22191ce648 Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib
- Added FreeSO's API server to handle most backend operations
2024-05-01 02:55:43 -04:00

39 lines
1.2 KiB
C#
Executable file

using FSO.Common.Serialization;
using FSO.Server.Protocol.Gluon.Model;
using Mina.Core.Buffer;
namespace FSO.Server.Protocol.Gluon.Packets
{
/// <summary>
/// A signal sent from the city server to notify a lot that an avatar's roommate status on that lot has changed.
/// May wish to change this to be more generic for further avatar related changes in future.
/// </summary>
public class NotifyLotRoommateChange : AbstractGluonPacket
{
public uint AvatarId;
public uint ReplaceId;
public int LotId;
public ChangeType Change;
public override void Deserialize(IoBuffer input, ISerializationContext context)
{
AvatarId = input.GetUInt32();
ReplaceId = input.GetUInt32();
LotId = input.GetInt32();
Change = input.GetEnum<ChangeType>();
}
public override GluonPacketType GetPacketType()
{
return GluonPacketType.NotifyLotRoommateChange;
}
public override void Serialize(IoBuffer output, ISerializationContext context)
{
output.PutUInt32(AvatarId);
output.PutUInt32(ReplaceId);
output.PutInt32(LotId);
output.PutEnum(Change);
}
}
}