mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-12 09:12:25 -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
76
server/FSO.Server.Protocol/Voltron/Packets/RSGZWrapperPDU.cs
Executable file
76
server/FSO.Server.Protocol/Voltron/Packets/RSGZWrapperPDU.cs
Executable file
|
@ -0,0 +1,76 @@
|
|||
using Mina.Core.Buffer;
|
||||
using FSO.Server.Protocol.Voltron.Model;
|
||||
using FSO.Common.Serialization;
|
||||
|
||||
namespace FSO.Server.Protocol.Voltron.Packets
|
||||
{
|
||||
public class RSGZWrapperPDU : AbstractVoltronPacket
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public Gender Gender { get; set; }
|
||||
public SkinTone SkinTone { get; set; }
|
||||
public uint HeadOutfitId { get; set; }
|
||||
public uint BodyOutfitId { get; set; }
|
||||
|
||||
|
||||
public override void Deserialize(IoBuffer input, ISerializationContext context)
|
||||
{
|
||||
//ignoring the dbwrapper junk
|
||||
//byte 17 and 18 change without changing settings, perhaps a message id?
|
||||
input.Skip(37);
|
||||
this.Name = input.GetPascalVLCString();
|
||||
this.Description = input.GetPascalVLCString();
|
||||
this.Gender = input.Get() == 0x1 ? Gender.FEMALE : Gender.MALE;
|
||||
|
||||
var skin = input.Get();
|
||||
switch (skin) {
|
||||
default:
|
||||
case 0x00:
|
||||
SkinTone = SkinTone.LIGHT;
|
||||
break;
|
||||
case 0x01:
|
||||
SkinTone = SkinTone.MEDIUM;
|
||||
break;
|
||||
case 0x02:
|
||||
SkinTone = SkinTone.DARK;
|
||||
break;
|
||||
}
|
||||
|
||||
this.HeadOutfitId = input.GetUInt32();
|
||||
input.Skip(4); //Unknown
|
||||
this.BodyOutfitId = input.GetUInt32();
|
||||
}
|
||||
|
||||
public override VoltronPacketType GetPacketType()
|
||||
{
|
||||
return VoltronPacketType.RSGZWrapperPDU;
|
||||
}
|
||||
|
||||
public override void Serialize(IoBuffer output, ISerializationContext context)
|
||||
{
|
||||
output.Skip(37);
|
||||
|
||||
output.PutPascalVLCString(Name);
|
||||
output.PutPascalVLCString(Description);
|
||||
output.Put(Gender == Gender.FEMALE ? (byte)0x01 : (byte)0x00);
|
||||
|
||||
switch (SkinTone)
|
||||
{
|
||||
case SkinTone.LIGHT:
|
||||
output.Put(0x00);
|
||||
break;
|
||||
case SkinTone.MEDIUM:
|
||||
output.Put(0x01);
|
||||
break;
|
||||
case SkinTone.DARK:
|
||||
output.Put(0x02);
|
||||
break;
|
||||
}
|
||||
|
||||
output.PutUInt32(HeadOutfitId);
|
||||
output.Skip(4);//Unknown
|
||||
output.PutUInt32(BodyOutfitId);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue