431 lines
14 KiB
C#
431 lines
14 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_ElementTemple
|
|
{
|
|
public partial class battleInfo : 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 :
|
|
battleId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
occupy = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 3 :
|
|
battleOnlyId = ProtoBufUtils.ReadInt64(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,battleId);
|
|
ProtoBufUtils.WriteBoolean(2,occupy);
|
|
ProtoBufUtils.WriteInt64(3,battleOnlyId);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
battleId = 0;
|
|
occupy = false;
|
|
battleOnlyId = 0;
|
|
}
|
|
public int battleId;
|
|
public bool occupy;
|
|
public long battleOnlyId;
|
|
}
|
|
public partial class areaObjectInfo : 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 :
|
|
configId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
if(battleInfo == null)
|
|
{
|
|
battleInfo = new battleInfo();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
battleInfo.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,configId);
|
|
if(battleInfo != null)
|
|
{
|
|
battleInfo.WriteMessage(2);
|
|
}
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
configId = 0;
|
|
if(battleInfo != null)
|
|
{
|
|
battleInfo.Clear();
|
|
}
|
|
}
|
|
public int configId;
|
|
public battleInfo battleInfo;
|
|
}
|
|
public partial class battleStateInfo : 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 :
|
|
battleState = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
roleIds = ProtoBufUtils.ReadInt64(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,battleState);
|
|
ProtoBufUtils.WriteInt64(2,roleIds);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
battleState = 0;
|
|
roleIds = 0;
|
|
}
|
|
public int battleState;
|
|
public long roleIds;
|
|
}
|
|
public partial class ReqOpenElementTemplePanel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 171201;
|
|
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 ResOpenElementTemplePanel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResOpenElementTemplePanel(this);
|
|
}
|
|
|
|
public const uint MsgID = 171101;
|
|
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:
|
|
countDown = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
enter_time = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
max_time = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
countDown = 0;
|
|
enter_time = 0;
|
|
max_time = 0;
|
|
}
|
|
public int countDown;
|
|
public int enter_time;
|
|
public int max_time;
|
|
}
|
|
public partial class ReqContinuedTime : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 171202;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt64(1,roleId);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
}
|
|
public long roleId;
|
|
}
|
|
public partial class ResContinuedTime : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResContinuedTime(this);
|
|
}
|
|
|
|
public const uint MsgID = 171102;
|
|
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:
|
|
engyer = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
engyer = 0;
|
|
}
|
|
public long roleId;
|
|
public int engyer;
|
|
}
|
|
public partial class ResElementTempleMonsterRefreshInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResElementTempleMonsterRefreshInfo(this);
|
|
}
|
|
|
|
public const uint MsgID = 171103;
|
|
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:
|
|
countDown = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(areaInfo == null)
|
|
{
|
|
areaInfo = new List<areaObjectInfo>();
|
|
}
|
|
areaInfo.Add(new areaObjectInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
areaInfo[areaInfo.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
countDown = 0;
|
|
if(areaInfo != null)
|
|
{
|
|
areaInfo.Clear();
|
|
}
|
|
}
|
|
public long roleId;
|
|
public int countDown;
|
|
public List<areaObjectInfo> areaInfo = new List<areaObjectInfo>();
|
|
}
|
|
public partial class ResElementTempleEngyerZero : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResElementTempleEngyerZero(this);
|
|
}
|
|
|
|
public const uint MsgID = 171104;
|
|
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;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
roleId = 0;
|
|
}
|
|
public long roleId;
|
|
}
|
|
public partial class ResBattleChangeState : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResBattleChangeState(this);
|
|
}
|
|
|
|
public const uint MsgID = 171105;
|
|
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(battleStateInfo == null)
|
|
{
|
|
battleStateInfo = new List<battleStateInfo>();
|
|
}
|
|
battleStateInfo.Add(new battleStateInfo());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
battleStateInfo[battleStateInfo.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(battleStateInfo != null)
|
|
{
|
|
battleStateInfo.Clear();
|
|
}
|
|
}
|
|
public List<battleStateInfo> battleStateInfo = new List<battleStateInfo>();
|
|
}
|
|
}
|
|
|