Files
Main/Assets/Code/Logic/_NetMessage/Messages/QuestionnaireEx.cs

461 lines
15 KiB
C#
Raw Normal View History

2025-01-25 04:38:09 +08:00
using System.Collections.Generic;
using Thousandto.Plugins.Common;
using Thousandto.Code.Logic.Network;
namespace MSG_Questionnaire
{
public partial class ResPanelInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResPanelInfo(this);
}
public const uint MsgID = 523101;
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:
isOpen = ProtoBufUtils.ReadBoolean(ref readPos);
break;
case 2:
endTime = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 3:
state = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
isOpen = false;
endTime = 0;
state = 0;
}
public bool isOpen;
public int endTime;
public int state;
}
public partial class answerInfo : 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 :
answer = ProtoBufUtils.ReadString(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,id);
ProtoBufUtils.WriteString(2,answer);
ProtoBufUtils.SetVEndIndex(subItemInfoId);
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
}
public void Clear()
{
id = 0;
answer = null;
}
public int id;
public string answer;
}
public partial class ReqOpenPanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 523203;
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 ReqSubmitAnswer : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 523201;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
for (int i = 0; i < answers.Count; i++)
{
if(answers != null)
{
answers[i].WriteMessage(1);
}
}
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
if(answers != null)
{
answers.Clear();
}
}
public List<answerInfo> answers = new List<answerInfo>();
}
public partial class ReqGetReward : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 523202;
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 G2PGetPanelInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_G2PGetPanelInfo(this);
}
public const uint MsgID = 523301;
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:
userId = ProtoBufUtils.ReadInt64(ref readPos);
break;
case 2:
roleId = ProtoBufUtils.ReadInt64(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
userId = 0;
roleId = 0;
}
public long userId;
public long roleId;
}
public partial class G2PSubmitAnswer : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_G2PSubmitAnswer(this);
}
public const uint MsgID = 523302;
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:
userId = ProtoBufUtils.ReadInt64(ref readPos);
break;
case 2:
roleId = ProtoBufUtils.ReadInt64(ref readPos);
break;
case 3:
if(answers == null)
{
answers = new List<answerInfo>();
}
answers.Add(new answerInfo());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
answers[answers.Count - 1].ReadMessage(ref readPos, totalCount);
break;
default:
break;
}
}
}
}
public void Clear()
{
userId = 0;
roleId = 0;
if(answers != null)
{
answers.Clear();
}
}
public long userId;
public long roleId;
public List<answerInfo> answers = new List<answerInfo>();
}
public partial class G2PGetReward : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_G2PGetReward(this);
}
public const uint MsgID = 523303;
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:
userId = ProtoBufUtils.ReadInt64(ref readPos);
break;
case 2:
roleId = ProtoBufUtils.ReadInt64(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
userId = 0;
roleId = 0;
}
public long userId;
public long roleId;
}
public partial class P2GOpenState : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_P2GOpenState(this);
}
public const uint MsgID = 523401;
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:
open = ProtoBufUtils.ReadBoolean(ref readPos);
break;
case 2:
remainTime = ProtoBufUtils.ReadInt32(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
open = false;
remainTime = 0;
}
public bool open;
public int remainTime;
}
public partial class P2GGetRewardState : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_P2GGetRewardState(this);
}
public const uint MsgID = 523402;
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:
roleId = ProtoBufUtils.ReadInt64(ref readPos);
break;
case 2:
canGet = ProtoBufUtils.ReadBoolean(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
roleId = 0;
canGet = false;
}
public long roleId;
public bool canGet;
}
public partial class ReqDownloadOver : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 523204;
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 ResDownloadGetAward : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResDownloadGetAward(this);
}
public const uint MsgID = 523102;
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:
isGetDownloadAward = ProtoBufUtils.ReadBoolean(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
isGetDownloadAward = false;
}
public bool isGetDownloadAward;
}
}