Update createrole protocols data
This commit is contained in:
@@ -1,23 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CSNetwork.Protocols.RPCData;
|
||||
|
||||
namespace CSNetwork.Protocols
|
||||
{
|
||||
public class createrole : Protocol
|
||||
{
|
||||
public int Userid { get; set; }
|
||||
public int Localsid { get; set; }
|
||||
public uint Localsid { get; set; }
|
||||
public RoleInfo Roleinfo { get; set; }
|
||||
public Octets Referid { get; set; }
|
||||
|
||||
public createrole() : base(ProtocolType.PROTOCOL_CREATEROLE)
|
||||
{
|
||||
Referid = new Octets();
|
||||
Roleinfo = new RoleInfo();
|
||||
}
|
||||
|
||||
public override Protocol Clone() => new createrole
|
||||
{
|
||||
Userid = Userid,
|
||||
Localsid = Localsid,
|
||||
Roleinfo = Roleinfo?.Clone(),
|
||||
Referid = new Octets(Referid.ToArray())
|
||||
};
|
||||
|
||||
@@ -25,13 +29,23 @@ namespace CSNetwork.Protocols
|
||||
{
|
||||
os.Write(Userid);
|
||||
os.Write(Localsid);
|
||||
if (Roleinfo != null)
|
||||
{
|
||||
Roleinfo.Marshal(os);
|
||||
}
|
||||
else
|
||||
{
|
||||
new RoleInfo().Marshal(os);
|
||||
}
|
||||
os.Write(Referid);
|
||||
}
|
||||
|
||||
public override void Unmarshal(OctetsStream os)
|
||||
{
|
||||
Userid = os.ReadInt32();
|
||||
Localsid = os.ReadInt32();
|
||||
Localsid = os.ReadUInt32();
|
||||
Roleinfo = new RoleInfo();
|
||||
Roleinfo.Unmarshal(os);
|
||||
Referid = os.ReadOctets();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user