Add protocol createrole_re
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using CSNetwork.Protocols.RPCData;
|
||||
|
||||
namespace CSNetwork.Protocols
|
||||
{
|
||||
public class createrole_re : Protocol
|
||||
{
|
||||
public int result { get; set; }
|
||||
public int roleid { get; set; }
|
||||
public uint localsid { get; set; }
|
||||
public RoleInfo roleinfo { get; set; }
|
||||
public int refretcode { get; set; }
|
||||
|
||||
public createrole_re() : base(ProtocolType.PROTOCOL_CREATEROLE_RE)
|
||||
{
|
||||
roleinfo = new RoleInfo();
|
||||
}
|
||||
|
||||
public override Protocol Clone() => new createrole_re
|
||||
{
|
||||
result = result,
|
||||
roleid = roleid,
|
||||
localsid = localsid,
|
||||
roleinfo = roleinfo?.Clone(),
|
||||
refretcode = refretcode
|
||||
};
|
||||
|
||||
public override void Marshal(OctetsStream os)
|
||||
{
|
||||
os.Write(result);
|
||||
os.Write(roleid);
|
||||
os.Write(localsid);
|
||||
if (roleinfo != null)
|
||||
{
|
||||
roleinfo.Marshal(os);
|
||||
}
|
||||
else
|
||||
{
|
||||
new RoleInfo().Marshal(os);
|
||||
}
|
||||
os.Write(refretcode);
|
||||
}
|
||||
|
||||
public override void Unmarshal(OctetsStream os)
|
||||
{
|
||||
result = os.ReadInt32();
|
||||
roleid = os.ReadInt32();
|
||||
localsid = os.ReadUInt32();
|
||||
roleinfo = new RoleInfo();
|
||||
roleinfo.Unmarshal(os);
|
||||
refretcode = os.ReadInt32();
|
||||
}
|
||||
|
||||
public override int PriorPolicy() => 101;
|
||||
|
||||
public override bool SizePolicy(int size) => size <= 8192;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3640555d366b4e34bbefbbf040f7f339
|
||||
Reference in New Issue
Block a user