using System.Collections.Generic; using Thousandto.Plugins.Common; using Thousandto.Code.Logic.Network; namespace MSG_Question { public partial class ReqSystemQuestion : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 305201; 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 ResSystemQuestionResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResSystemQuestionResult(this); } public const uint MsgID = 305101; 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: reason = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: questionId = ProtoBufUtils.ReadInt32(ref readPos); break; case 3: if(options == null) { options = new List(); } options.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; default: break; } } } } public void Clear() { reason = 0; questionId = 0; if(options != null) { options.Clear(); } } public int reason; public int questionId; public List options = new List(); } public partial class ReqPlayerSendQuestion : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 305202; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteString(1,title); for (int i = 0; i < options.Count; i++) { ProtoBufUtils.WriteString(2,options[i]); } ProtoBufUtils.WriteInt32(3,right); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { title = null; if(options != null) { options.Clear(); } right = 0; } public string title; public List options = new List(); public int right; } public partial class ResPlayerSendQuestionResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResPlayerSendQuestionResult(this); } public const uint MsgID = 302102; 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: reason = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { reason = 0; } public int reason; } public partial class ResPlayerAnswerResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResPlayerAnswerResult(this); } public const uint MsgID = 305103; 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: reason = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { reason = 0; } public int reason; } public partial class ResPlayerQuestions : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResPlayerQuestions(this); } public const uint MsgID = 305104; 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.ReadFixed64(ref readPos); break; case 2: title = ProtoBufUtils.ReadString(ref readPos); break; case 3: remaining = ProtoBufUtils.ReadInt32(ref readPos); break; case 4: answerCount = ProtoBufUtils.ReadInt32(ref readPos); break; case 5: if(options == null) { options = new List(); } options.Add(ProtoBufUtils.ReadString(ref readPos)); break; case 6: name = ProtoBufUtils.ReadString(ref readPos); break; default: break; } } } } public void Clear() { id = 0; title = null; remaining = 0; answerCount = 0; if(options != null) { options.Clear(); } name = null; } public ulong id; public string title; public int remaining; public int answerCount; public List options = new List(); public string name; } public partial class ResAllPlayerAnswer : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResAllPlayerAnswer(this); } public const uint MsgID = 305105; 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: name = ProtoBufUtils.ReadString(ref readPos); break; case 2: count = ProtoBufUtils.ReadInt32(ref readPos); break; case 3: right = ProtoBufUtils.ReadString(ref readPos); break; case 4: if(appraise == null) { appraise = new List(); } appraise.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; default: break; } } } } public void Clear() { name = null; count = 0; right = null; if(appraise != null) { appraise.Clear(); } } public string name; public int count; public string right; public List appraise = new List(); } public partial class ResExceptionalAllPlayer : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResExceptionalAllPlayer(this); } public const uint MsgID = 305106; 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: answerName = ProtoBufUtils.ReadString(ref readPos); break; case 2: questionName = ProtoBufUtils.ReadString(ref readPos); break; case 3: count = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { answerName = null; questionName = null; count = 0; } public string answerName; public string questionName; public int count; } public partial class ReqPlayerQuestionsCount : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 305204; 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 ResPlayerQuestionCount : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResPlayerQuestionCount(this); } public const uint MsgID = 305107; 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: reason = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: count = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { reason = 0; count = 0; } public int reason; public int count; } public partial class ResSendQuestions : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResSendQuestions(this); } public const uint MsgID = 305108; 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: type = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: qid = ProtoBufUtils.ReadFixed64(ref readPos); break; case 3: title = ProtoBufUtils.ReadInt32(ref readPos); break; case 4: if(options == null) { options = new List(); } options.Add(ProtoBufUtils.ReadInt32(ref readPos)); break; case 5: rightIndex = ProtoBufUtils.ReadInt32(ref readPos); break; case 6: remaTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 7: currentNum = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { type = 0; qid = 0; title = 0; if(options != null) { options.Clear(); } rightIndex = 0; remaTime = 0; currentNum = 0; } public int type; public ulong qid; public int title; public List options = new List(); public int rightIndex; public int remaTime; public int currentNum; } public partial class ReqPlayerAnswer : ProtoBuf.IExtensible, ProtoBuf.IReqMessage { public const uint MsgID = 305203; public void Excute(){} public void Send() { lock (ProtoBufUtils.WriteLocker) { byte[] bytes = null; ProtoBufUtils.InitWriteData(); ProtoBufUtils.WriteFixed64(1,id); ProtoBufUtils.WriteInt32(2,index); ProtoBufUtils.WriteInt32(3,appraise); ProtoBufUtils.WriteInt32(4,exceptional); bytes = ProtoBufUtils.GetData(); Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID); } } public void Clear() { id = 0; index = 0; appraise = 0; exceptional = 0; } public ulong id; public int index; public int appraise; public int exceptional; } public partial class Anwserresult : 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.ReadUint64(ref readPos); break; case 2 : name = ProtoBufUtils.ReadString(ref readPos); break; case 3 : index = ProtoBufUtils.ReadInt32(ref readPos); break; case 4 : desc = 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.WriteUint64(1,id); ProtoBufUtils.WriteString(2,name); ProtoBufUtils.WriteInt32(3,index); ProtoBufUtils.WriteString(4,desc); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { id = 0; name = null; index = 0; desc = null; } public ulong id; public string name; public int index; public string desc; } public partial class ResAnswerList : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResAnswerList(this); } public const uint MsgID = 305109; 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(res == null) { res = new List(); } res.Add(new Anwserresult()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); res[res.Count - 1].ReadMessage(ref readPos, totalCount); break; default: break; } } } } public void Clear() { if(res != null) { res.Clear(); } } public List res = new List(); } public partial class KV : 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 : K = ProtoBufUtils.ReadInt32(ref readPos); break; case 2 : V = 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,K); ProtoBufUtils.WriteInt32(2,V); ProtoBufUtils.SetVEndIndex(subItemInfoId); return ProtoBufUtils.CheckAndSetLength(subItemInfoId); } public void Clear() { K = 0; V = 0; } public int K; public int V; } public partial class ResOverQuestions : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResOverQuestions(this); } public const uint MsgID = 305110; 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: rightIndex = ProtoBufUtils.ReadInt32(ref readPos); break; case 2: desc = ProtoBufUtils.ReadString(ref readPos); break; case 3: rewardDesc = ProtoBufUtils.ReadString(ref readPos); break; case 4: isRight = ProtoBufUtils.ReadInt32(ref readPos); break; case 5: if(reward == null) { reward = new List(); } reward.Add(new KV()); totalCount = ProtoBufUtils.ReadInt32(ref readPos); reward[reward.Count - 1].ReadMessage(ref readPos, totalCount); break; case 6: remaTime = ProtoBufUtils.ReadInt32(ref readPos); break; case 7: isOver = ProtoBufUtils.ReadBoolean(ref readPos); break; case 8: type = ProtoBufUtils.ReadInt32(ref readPos); break; case 9: titleId = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { rightIndex = 0; desc = null; rewardDesc = null; isRight = 0; if(reward != null) { reward.Clear(); } remaTime = 0; isOver = false; type = 0; titleId = 0; } public int rightIndex; public string desc; public string rewardDesc; public int isRight; public List reward = new List(); public int remaTime; public bool isOver; public int type; public int titleId; } public partial class ResAnswerPoints : ProtoBuf.IExtensible, ProtoBuf.IResMessage { public void Excute() { HandleMsgResult.getInstance().GS2U_ResAnswerPoints(this); } public const uint MsgID = 305111; 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(name == null) { name = new List(); } name.Add(ProtoBufUtils.ReadString(ref readPos)); break; case 2: oneself = ProtoBufUtils.ReadInt32(ref readPos); break; default: break; } } } } public void Clear() { if(name != null) { name.Clear(); } oneself = 0; } public List name = new List(); public int oneself; } }