Files
Main/Assets/Code/Logic/_NetMessage/Messages/FallingSkyEx.cs
2025-01-25 04:38:09 +08:00

402 lines
14 KiB
C#

using System.Collections.Generic;
using Thousandto.Plugins.Common;
using Thousandto.Code.Logic.Network;
namespace MSG_FallingSky
{
public partial class FallSkyTaskData : 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 :
taskID = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 2 :
progress = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 3 :
state = ProtoBufUtils.ReadBoolean(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,taskID);
ProtoBufUtils.WriteInt32(2,progress);
ProtoBufUtils.WriteBoolean(3,state);
ProtoBufUtils.SetVEndIndex(subItemInfoId);
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
}
public void Clear()
{
taskID = 0;
progress = 0;
state = false;
}
public int taskID;
public int progress;
public bool state;
}
public partial class FallSkyLevelData : 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 :
levelId = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 2 :
isGetfeelReward = ProtoBufUtils.ReadBoolean(ref readPos);
break;
case 3 :
isGetpayReward = ProtoBufUtils.ReadBoolean(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,levelId);
ProtoBufUtils.WriteBoolean(2,isGetfeelReward);
ProtoBufUtils.WriteBoolean(3,isGetpayReward);
ProtoBufUtils.SetVEndIndex(subItemInfoId);
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
}
public void Clear()
{
levelId = 0;
isGetfeelReward = false;
isGetpayReward = false;
}
public int levelId;
public bool isGetfeelReward;
public bool isGetpayReward;
}
public partial class ResOnlineFallSkyInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResOnlineFallSkyInfo(this);
}
public const uint MsgID = 190101;
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:
hasPay = ProtoBufUtils.ReadBoolean(ref readPos);
break;
case 2:
if(taskDataList == null)
{
taskDataList = new List<FallSkyTaskData>();
}
taskDataList.Add(new FallSkyTaskData());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
taskDataList[taskDataList.Count - 1].ReadMessage(ref readPos, totalCount);
break;
case 3:
if(levelDataList == null)
{
levelDataList = new List<FallSkyLevelData>();
}
levelDataList.Add(new FallSkyLevelData());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
levelDataList[levelDataList.Count - 1].ReadMessage(ref readPos, totalCount);
break;
case 4:
round = ProtoBufUtils.ReadInt32(ref readPos);
break;
case 5:
lastTime = ProtoBufUtils.ReadInt64(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
hasPay = false;
if(taskDataList != null)
{
taskDataList.Clear();
}
if(levelDataList != null)
{
levelDataList.Clear();
}
round = 0;
lastTime = 0;
}
public bool hasPay;
public List<FallSkyTaskData> taskDataList = new List<FallSkyTaskData>();
public List<FallSkyLevelData> levelDataList = new List<FallSkyLevelData>();
public int round;
public long lastTime;
}
public partial class ResRefreshFallSkyTask : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResRefreshFallSkyTask(this);
}
public const uint MsgID = 190102;
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(taskData == null)
{
taskData = new List<FallSkyTaskData>();
}
taskData.Add(new FallSkyTaskData());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
taskData[taskData.Count - 1].ReadMessage(ref readPos, totalCount);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(taskData != null)
{
taskData.Clear();
}
}
public List<FallSkyTaskData> taskData = new List<FallSkyTaskData>();
}
public partial class ResRefreshRechargeState : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResRefreshRechargeState(this);
}
public const uint MsgID = 190104;
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:
hasPay = ProtoBufUtils.ReadBoolean(ref readPos);
break;
default:
break;
}
}
}
}
public void Clear()
{
hasPay = false;
}
public bool hasPay;
}
public partial class ReqGetFallSkyTaskReward : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 190201;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteInt32(1,taskID);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
taskID = 0;
}
public int taskID;
}
public partial class ReqGetFallSkyLevelReward : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 190202;
public void Excute(){}
public void Send()
{
lock (ProtoBufUtils.WriteLocker)
{
byte[] bytes = null;
ProtoBufUtils.InitWriteData();
ProtoBufUtils.WriteInt32(1,levelId);
ProtoBufUtils.WriteBoolean(2,isFree);
bytes = ProtoBufUtils.GetData();
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
}
}
public void Clear()
{
levelId = 0;
isFree = false;
}
public int levelId;
public bool isFree;
}
public partial class ReqOnekeyGetFallSkyLevelReward : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 190204;
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 ResRefreshFallSkyLevel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
{
public void Excute()
{
HandleMsgResult.getInstance().GS2U_ResRefreshFallSkyLevel(this);
}
public const uint MsgID = 190103;
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(levelData == null)
{
levelData = new List<FallSkyLevelData>();
}
levelData.Add(new FallSkyLevelData());
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
levelData[levelData.Count - 1].ReadMessage(ref readPos, totalCount);
break;
default:
break;
}
}
}
}
public void Clear()
{
if(levelData != null)
{
levelData.Clear();
}
}
public List<FallSkyLevelData> levelData = new List<FallSkyLevelData>();
}
public partial class ReqOnekeyGetFallSkyTaskReward : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
{
public const uint MsgID = 190205;
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()
{
}
}
}