573 lines
19 KiB
C#
573 lines
19 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_Fashion
|
|
{
|
|
public partial class Fashion : ProtoBuf.IMessageInfo, ProtoBuf.IExtensible
|
|
{
|
|
public void Send(){}
|
|
public void Excute(){}
|
|
public void ReadMessage(ref int readPos, int totalCount)
|
|
{
|
|
int endIndex = totalCount + readPos - 1;
|
|
while (readPos <= endIndex)
|
|
{
|
|
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
|
|
switch (fieldNumber)
|
|
{
|
|
case 1 :
|
|
id = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
state = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 3 :
|
|
star = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
isActive = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 5 :
|
|
conditionReach = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 6 :
|
|
if(conditionValue == null)
|
|
{
|
|
conditionValue = new List<FashionCondition>();
|
|
}
|
|
conditionValue.Add(new FashionCondition());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
conditionValue[conditionValue.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 7 :
|
|
if(fashionHairs == null)
|
|
{
|
|
fashionHairs = new List<FashionHair>();
|
|
}
|
|
fashionHairs.Add(new FashionHair());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
fashionHairs[fashionHairs.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
public int WriteMessage(int fieldNumber)
|
|
{
|
|
ProtoBufUtils.WriteHeader(fieldNumber, ProtoBuf.WireType.String);
|
|
int subItemInfoId = ProtoBufUtils.GetSubItemInfoId();
|
|
ProtoBufUtils.SetEmptyLength(subItemInfoId);
|
|
ProtoBufUtils.SetVBeginIndex(subItemInfoId);
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
ProtoBufUtils.WriteBoolean(2,state);
|
|
ProtoBufUtils.WriteInt32(3,star);
|
|
ProtoBufUtils.WriteBoolean(4,isActive);
|
|
ProtoBufUtils.WriteBoolean(5,conditionReach);
|
|
for (int i = 0; i < conditionValue.Count; i++)
|
|
{
|
|
if(conditionValue != null)
|
|
{
|
|
conditionValue[i].WriteMessage(6);
|
|
}
|
|
}
|
|
for (int i = 0; i < fashionHairs.Count; i++)
|
|
{
|
|
if(fashionHairs != null)
|
|
{
|
|
fashionHairs[i].WriteMessage(7);
|
|
}
|
|
}
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
state = false;
|
|
star = 0;
|
|
isActive = false;
|
|
conditionReach = false;
|
|
if(conditionValue != null)
|
|
{
|
|
conditionValue.Clear();
|
|
}
|
|
if(fashionHairs != null)
|
|
{
|
|
fashionHairs.Clear();
|
|
}
|
|
}
|
|
public int id;
|
|
public bool state;
|
|
public int star;
|
|
public bool isActive;
|
|
public bool conditionReach;
|
|
public List<FashionCondition> conditionValue = new List<FashionCondition>();
|
|
public List<FashionHair> fashionHairs = new List<FashionHair>();
|
|
}
|
|
public partial class FashionCondition : ProtoBuf.IMessageInfo, ProtoBuf.IExtensible
|
|
{
|
|
public void Send(){}
|
|
public void Excute(){}
|
|
public void ReadMessage(ref int readPos, int totalCount)
|
|
{
|
|
int endIndex = totalCount + readPos - 1;
|
|
while (readPos <= endIndex)
|
|
{
|
|
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
|
|
switch (fieldNumber)
|
|
{
|
|
case 1 :
|
|
variable = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
value = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
public int WriteMessage(int fieldNumber)
|
|
{
|
|
ProtoBufUtils.WriteHeader(fieldNumber, ProtoBuf.WireType.String);
|
|
int subItemInfoId = ProtoBufUtils.GetSubItemInfoId();
|
|
ProtoBufUtils.SetEmptyLength(subItemInfoId);
|
|
ProtoBufUtils.SetVBeginIndex(subItemInfoId);
|
|
ProtoBufUtils.WriteInt32(1,variable);
|
|
ProtoBufUtils.WriteInt32(2,value);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
variable = 0;
|
|
value = 0;
|
|
}
|
|
public int variable;
|
|
public int value;
|
|
}
|
|
public partial class FashionHair : ProtoBuf.IMessageInfo, ProtoBuf.IExtensible
|
|
{
|
|
public void Send(){}
|
|
public void Excute(){}
|
|
public void ReadMessage(ref int readPos, int totalCount)
|
|
{
|
|
int endIndex = totalCount + readPos - 1;
|
|
while (readPos <= endIndex)
|
|
{
|
|
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
|
|
switch (fieldNumber)
|
|
{
|
|
case 1 :
|
|
postion = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
state = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 3 :
|
|
r = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4 :
|
|
g = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5 :
|
|
b = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
public int WriteMessage(int fieldNumber)
|
|
{
|
|
ProtoBufUtils.WriteHeader(fieldNumber, ProtoBuf.WireType.String);
|
|
int subItemInfoId = ProtoBufUtils.GetSubItemInfoId();
|
|
ProtoBufUtils.SetEmptyLength(subItemInfoId);
|
|
ProtoBufUtils.SetVBeginIndex(subItemInfoId);
|
|
ProtoBufUtils.WriteInt32(1,postion);
|
|
ProtoBufUtils.WriteBoolean(2,state);
|
|
ProtoBufUtils.WriteInt32(3,r);
|
|
ProtoBufUtils.WriteInt32(4,g);
|
|
ProtoBufUtils.WriteInt32(5,b);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
postion = 0;
|
|
state = false;
|
|
r = 0;
|
|
g = 0;
|
|
b = 0;
|
|
}
|
|
public int postion;
|
|
public bool state;
|
|
public int r;
|
|
public int g;
|
|
public int b;
|
|
}
|
|
public partial class ReqDress : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 145201;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
}
|
|
public int id;
|
|
}
|
|
public partial class ReqActive : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 145202;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
}
|
|
public int id;
|
|
}
|
|
public partial class ResUpdateFashion : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResUpdateFashion(this);
|
|
}
|
|
|
|
public const uint MsgID = 145101;
|
|
public void Send(){}
|
|
public void ReadMessage(byte[] bytes)
|
|
{
|
|
lock (ProtoBufUtils.ReadLocker)
|
|
{
|
|
Clear();
|
|
int endIndex = bytes.Length - 1;
|
|
int readPos = 0;
|
|
int totalCount = 0;
|
|
ProtoBufUtils.InitReadData(bytes, ref readPos);
|
|
while (readPos <= endIndex)
|
|
{
|
|
int curType = bytes[readPos] & 7;
|
|
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
|
|
switch (fieldNumber)
|
|
{
|
|
case 1:
|
|
if(fashion == null)
|
|
{
|
|
fashion = new Fashion();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
fashion.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(fashion != null)
|
|
{
|
|
fashion.Clear();
|
|
}
|
|
}
|
|
public Fashion fashion;
|
|
}
|
|
public partial class ResFashionsInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResFashionsInfo(this);
|
|
}
|
|
|
|
public const uint MsgID = 145102;
|
|
public void Send(){}
|
|
public void ReadMessage(byte[] bytes)
|
|
{
|
|
lock (ProtoBufUtils.ReadLocker)
|
|
{
|
|
Clear();
|
|
int endIndex = bytes.Length - 1;
|
|
int readPos = 0;
|
|
int totalCount = 0;
|
|
ProtoBufUtils.InitReadData(bytes, ref readPos);
|
|
while (readPos <= endIndex)
|
|
{
|
|
int curType = bytes[readPos] & 7;
|
|
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
|
|
switch (fieldNumber)
|
|
{
|
|
case 1:
|
|
if(fashions == null)
|
|
{
|
|
fashions = new List<Fashion>();
|
|
}
|
|
fashions.Add(new Fashion());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
fashions[fashions.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(fashions != null)
|
|
{
|
|
fashions.Clear();
|
|
}
|
|
}
|
|
public List<Fashion> fashions = new List<Fashion>();
|
|
}
|
|
public partial class ResFashionBodyBroadcast : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResFashionBodyBroadcast(this);
|
|
}
|
|
|
|
public const uint MsgID = 145103;
|
|
public void Send(){}
|
|
public void ReadMessage(byte[] bytes)
|
|
{
|
|
lock (ProtoBufUtils.ReadLocker)
|
|
{
|
|
Clear();
|
|
int endIndex = bytes.Length - 1;
|
|
int readPos = 0;
|
|
int totalCount = 0;
|
|
ProtoBufUtils.InitReadData(bytes, ref readPos);
|
|
while (readPos <= endIndex)
|
|
{
|
|
int curType = bytes[readPos] & 7;
|
|
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
|
|
switch (fieldNumber)
|
|
{
|
|
case 1:
|
|
playerId = ProtoBufUtils.ReadUint64(ref readPos);
|
|
break;
|
|
case 2:
|
|
id = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(hairColor == null)
|
|
{
|
|
hairColor = new FashionHair();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
hairColor.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 4:
|
|
headId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5:
|
|
headFrameId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 6:
|
|
buchenId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
playerId = 0;
|
|
id = 0;
|
|
if(hairColor != null)
|
|
{
|
|
hairColor.Clear();
|
|
}
|
|
headId = 0;
|
|
headFrameId = 0;
|
|
buchenId = 0;
|
|
}
|
|
public ulong playerId;
|
|
public int id;
|
|
public FashionHair hairColor;
|
|
public int headId;
|
|
public int headFrameId;
|
|
public int buchenId;
|
|
}
|
|
public partial class ReqHairColor : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 145203;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
if(hairColor != null)
|
|
{
|
|
hairColor.WriteMessage(2);
|
|
}
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
if(hairColor != null)
|
|
{
|
|
hairColor.Clear();
|
|
}
|
|
}
|
|
public int id;
|
|
public FashionHair hairColor;
|
|
}
|
|
public partial class ResHairColor : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResHairColor(this);
|
|
}
|
|
|
|
public const uint MsgID = 145104;
|
|
public void Send(){}
|
|
public void ReadMessage(byte[] bytes)
|
|
{
|
|
lock (ProtoBufUtils.ReadLocker)
|
|
{
|
|
Clear();
|
|
int endIndex = bytes.Length - 1;
|
|
int readPos = 0;
|
|
int totalCount = 0;
|
|
ProtoBufUtils.InitReadData(bytes, ref readPos);
|
|
while (readPos <= endIndex)
|
|
{
|
|
int curType = bytes[readPos] & 7;
|
|
int fieldNumber = ProtoBufUtils.ReadFieldNumber(ref readPos);
|
|
switch (fieldNumber)
|
|
{
|
|
case 1:
|
|
id = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
if(hairColor == null)
|
|
{
|
|
hairColor = new FashionHair();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
hairColor.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
if(hairColor != null)
|
|
{
|
|
hairColor.Clear();
|
|
}
|
|
}
|
|
public int id;
|
|
public FashionHair hairColor;
|
|
}
|
|
public partial class ReqFashionsInfo : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 145204;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
}
|
|
}
|
|
public partial class ReqFashionStarUp : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 145205;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
}
|
|
public int id;
|
|
}
|
|
public partial class ReqDressHair : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 145206;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,id);
|
|
ProtoBufUtils.WriteInt32(2,postion);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
id = 0;
|
|
postion = 0;
|
|
}
|
|
public int id;
|
|
public int postion;
|
|
}
|
|
}
|
|
|