mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-05 06:00:29 -04:00
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
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
47
server/FSO.Server.Protocol/Electron/Packets/CreateASimResponse.cs
Executable file
47
server/FSO.Server.Protocol/Electron/Packets/CreateASimResponse.cs
Executable file
|
@ -0,0 +1,47 @@
|
|||
using Mina.Core.Buffer;
|
||||
using FSO.Common.Serialization;
|
||||
|
||||
namespace FSO.Server.Protocol.Electron.Packets
|
||||
{
|
||||
public class CreateASimResponse : AbstractElectronPacket
|
||||
{
|
||||
public CreateASimStatus Status { get; set; }
|
||||
public CreateASimFailureReason Reason { get; set; } = CreateASimFailureReason.NONE;
|
||||
public uint NewAvatarId { get; set; }
|
||||
|
||||
public override ElectronPacketType GetPacketType()
|
||||
{
|
||||
return ElectronPacketType.CreateASimResponse;
|
||||
}
|
||||
|
||||
public override void Deserialize(IoBuffer input, ISerializationContext context)
|
||||
{
|
||||
Status = input.GetEnum<CreateASimStatus>();
|
||||
Reason = input.GetEnum<CreateASimFailureReason>();
|
||||
NewAvatarId = input.GetUInt32();
|
||||
}
|
||||
|
||||
public override void Serialize(IoBuffer output, ISerializationContext context)
|
||||
{
|
||||
output.PutEnum<CreateASimStatus>(Status);
|
||||
output.PutEnum<CreateASimFailureReason>(Reason);
|
||||
output.PutUInt32(NewAvatarId);
|
||||
}
|
||||
}
|
||||
|
||||
public enum CreateASimStatus
|
||||
{
|
||||
SUCCESS = 0x01,
|
||||
FAILED = 0x02
|
||||
}
|
||||
|
||||
public enum CreateASimFailureReason
|
||||
{
|
||||
NONE = 0x00,
|
||||
NAME_TAKEN = 0x01,
|
||||
NAME_VALIDATION_ERROR = 0x02,
|
||||
DESC_VALIDATION_ERROR = 0x03,
|
||||
BODY_VALIDATION_ERROR = 0x04,
|
||||
HEAD_VALIDATION_ERROR = 0x05
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue