484 lines
17 KiB
C#
484 lines
17 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_StateStifle
|
|
{
|
|
public partial class LevelCondition : 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 :
|
|
conditionId = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
progress = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
total = 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,conditionId);
|
|
ProtoBufUtils.WriteInt32(2,progress);
|
|
ProtoBufUtils.WriteInt32(3,total);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
conditionId = 0;
|
|
progress = 0;
|
|
total = 0;
|
|
}
|
|
public int conditionId;
|
|
public int progress;
|
|
public int total;
|
|
}
|
|
public partial class StateStifleLevel : 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 :
|
|
level = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
star = 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,level);
|
|
ProtoBufUtils.WriteInt32(2,star);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
level = 0;
|
|
star = 0;
|
|
}
|
|
public int level;
|
|
public int star;
|
|
}
|
|
public partial class soulSpirit : 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 :
|
|
state = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2 :
|
|
promoteLv = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3 :
|
|
promotePorgress = ProtoBufUtils.ReadInt64(ref readPos);
|
|
break;
|
|
case 4 :
|
|
evolveLv = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5 :
|
|
id = 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,state);
|
|
ProtoBufUtils.WriteInt32(2,promoteLv);
|
|
ProtoBufUtils.WriteInt64(3,promotePorgress);
|
|
ProtoBufUtils.WriteInt32(4,evolveLv);
|
|
ProtoBufUtils.WriteInt32(5,id);
|
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
|
}
|
|
public void Clear()
|
|
{
|
|
state = 0;
|
|
promoteLv = 0;
|
|
promotePorgress = 0;
|
|
evolveLv = 0;
|
|
id = 0;
|
|
}
|
|
public int state;
|
|
public int promoteLv;
|
|
public long promotePorgress;
|
|
public int evolveLv;
|
|
public int id;
|
|
}
|
|
public partial class ReqOpenStateStiflePanle : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 180201;
|
|
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 ResStateStifleBase : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResStateStifleBase(this);
|
|
}
|
|
|
|
public const uint MsgID = 180101;
|
|
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(conditionValue == null)
|
|
{
|
|
conditionValue = new List<LevelCondition>();
|
|
}
|
|
conditionValue.Add(new LevelCondition());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
conditionValue[conditionValue.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
conditionReach = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 3:
|
|
if(level == null)
|
|
{
|
|
level = new StateStifleLevel();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
level.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 4:
|
|
if(soulSpiritList == null)
|
|
{
|
|
soulSpiritList = new List<soulSpirit>();
|
|
}
|
|
soulSpiritList.Add(new soulSpirit());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
soulSpiritList[soulSpiritList.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(conditionValue != null)
|
|
{
|
|
conditionValue.Clear();
|
|
}
|
|
conditionReach = false;
|
|
if(level != null)
|
|
{
|
|
level.Clear();
|
|
}
|
|
if(soulSpiritList != null)
|
|
{
|
|
soulSpiritList.Clear();
|
|
}
|
|
}
|
|
public List<LevelCondition> conditionValue = new List<LevelCondition>();
|
|
public bool conditionReach;
|
|
public StateStifleLevel level;
|
|
public List<soulSpirit> soulSpiritList = new List<soulSpirit>();
|
|
}
|
|
public partial class ReqUpLevel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 180202;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteBoolean(1,oneKey);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
oneKey = false;
|
|
}
|
|
public bool oneKey;
|
|
}
|
|
public partial class ResUpLevel : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResUpLevel(this);
|
|
}
|
|
|
|
public const uint MsgID = 180103;
|
|
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:
|
|
oneKey = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 2:
|
|
if(level == null)
|
|
{
|
|
level = new StateStifleLevel();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
level.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 3:
|
|
conditionReach = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 4:
|
|
if(conditionValue == null)
|
|
{
|
|
conditionValue = new List<LevelCondition>();
|
|
}
|
|
conditionValue.Add(new LevelCondition());
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
conditionValue[conditionValue.Count - 1].ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 5:
|
|
fight = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
oneKey = false;
|
|
if(level != null)
|
|
{
|
|
level.Clear();
|
|
}
|
|
conditionReach = false;
|
|
if(conditionValue != null)
|
|
{
|
|
conditionValue.Clear();
|
|
}
|
|
fight = 0;
|
|
}
|
|
public bool oneKey;
|
|
public StateStifleLevel level;
|
|
public bool conditionReach;
|
|
public List<LevelCondition> conditionValue = new List<LevelCondition>();
|
|
public int fight;
|
|
}
|
|
public partial class ReqUpPromoteLevel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 180203;
|
|
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 ReqUpEvolveLevel : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 180204;
|
|
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 ReqActiveSoulSpirit : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 180205;
|
|
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 ResSoulSpiritInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResSoulSpiritInfo(this);
|
|
}
|
|
|
|
public const uint MsgID = 180102;
|
|
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(soulSpiritList == null)
|
|
{
|
|
soulSpiritList = new soulSpirit();
|
|
}
|
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
|
soulSpiritList.ReadMessage(ref readPos, totalCount);
|
|
break;
|
|
case 2:
|
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
isSuc = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 4:
|
|
fight = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
if(soulSpiritList != null)
|
|
{
|
|
soulSpiritList.Clear();
|
|
}
|
|
type = 0;
|
|
isSuc = false;
|
|
fight = 0;
|
|
}
|
|
public soulSpirit soulSpiritList;
|
|
public int type;
|
|
public bool isSuc;
|
|
public int fight;
|
|
}
|
|
}
|
|
|