424 lines
14 KiB
C#
424 lines
14 KiB
C#
|
using System.Collections.Generic;
|
||
|
using Thousandto.Plugins.Common;
|
||
|
using Thousandto.Code.Logic.Network;
|
||
|
|
||
|
namespace MSG_GodWeapon
|
||
|
{
|
||
|
public partial class godWeaponInfo : 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 :
|
||
|
groupId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2 :
|
||
|
curLevel = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 3 :
|
||
|
quality = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 4 :
|
||
|
prss = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 5 :
|
||
|
if(modelid == null)
|
||
|
{
|
||
|
modelid = new List<int>();
|
||
|
}
|
||
|
modelid.Add(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,groupId);
|
||
|
ProtoBufUtils.WriteInt32(2,curLevel);
|
||
|
ProtoBufUtils.WriteInt32(3,quality);
|
||
|
ProtoBufUtils.WriteInt32(4,prss);
|
||
|
for (int i = 0; i < modelid.Count; i++)
|
||
|
{
|
||
|
ProtoBufUtils.WriteInt32(5,modelid[i]);
|
||
|
}
|
||
|
ProtoBufUtils.SetVEndIndex(subItemInfoId);
|
||
|
return ProtoBufUtils.CheckAndSetLength(subItemInfoId);
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
groupId = 0;
|
||
|
curLevel = 0;
|
||
|
quality = 0;
|
||
|
prss = 0;
|
||
|
if(modelid != null)
|
||
|
{
|
||
|
modelid.Clear();
|
||
|
}
|
||
|
}
|
||
|
public int groupId;
|
||
|
public int curLevel;
|
||
|
public int quality;
|
||
|
public int prss;
|
||
|
public List<int> modelid = new List<int>();
|
||
|
}
|
||
|
public partial class ReqGodWeaponInit : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 177201;
|
||
|
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 ResGodWeaponInit : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResGodWeaponInit(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 177101;
|
||
|
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(info == null)
|
||
|
{
|
||
|
info = new List<godWeaponInfo>();
|
||
|
}
|
||
|
info.Add(new godWeaponInfo());
|
||
|
totalCount = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
info[info.Count - 1].ReadMessage(ref readPos, totalCount);
|
||
|
break;
|
||
|
case 2:
|
||
|
headPartId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 3:
|
||
|
bodyPartId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 4:
|
||
|
vfxPartId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
if(info != null)
|
||
|
{
|
||
|
info.Clear();
|
||
|
}
|
||
|
headPartId = 0;
|
||
|
bodyPartId = 0;
|
||
|
vfxPartId = 0;
|
||
|
}
|
||
|
public List<godWeaponInfo> info = new List<godWeaponInfo>();
|
||
|
public int headPartId;
|
||
|
public int bodyPartId;
|
||
|
public int vfxPartId;
|
||
|
}
|
||
|
public partial class ReqGodWeaponLevelUp : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 177202;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,groupId);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
groupId = 0;
|
||
|
}
|
||
|
public int groupId;
|
||
|
}
|
||
|
public partial class ResGodWeaponLevelUp : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResGodWeaponLevelUp(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 177102;
|
||
|
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:
|
||
|
groupId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
curLevel = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 3:
|
||
|
prss = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
groupId = 0;
|
||
|
curLevel = 0;
|
||
|
prss = 0;
|
||
|
}
|
||
|
public int groupId;
|
||
|
public int curLevel;
|
||
|
public int prss;
|
||
|
}
|
||
|
public partial class ReqGodWeaponQualityUp : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 177203;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,groupId);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
groupId = 0;
|
||
|
}
|
||
|
public int groupId;
|
||
|
}
|
||
|
public partial class ResGodWeaponQualityUp : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResGodWeaponQualityUp(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 177103;
|
||
|
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:
|
||
|
groupId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
quality = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
groupId = 0;
|
||
|
quality = 0;
|
||
|
}
|
||
|
public int groupId;
|
||
|
public int quality;
|
||
|
}
|
||
|
public partial class ReqGodWeaponEquipPartOrActive : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
||
|
{
|
||
|
|
||
|
public const uint MsgID = 177204;
|
||
|
public void Excute(){}
|
||
|
public void Send()
|
||
|
{
|
||
|
lock (ProtoBufUtils.WriteLocker)
|
||
|
{
|
||
|
byte[] bytes = null;
|
||
|
ProtoBufUtils.InitWriteData();
|
||
|
ProtoBufUtils.WriteInt32(1,groupId);
|
||
|
ProtoBufUtils.WriteInt32(2,modelId);
|
||
|
ProtoBufUtils.WriteInt32(3,type);
|
||
|
bytes = ProtoBufUtils.GetData();
|
||
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
groupId = 0;
|
||
|
modelId = 0;
|
||
|
type = 0;
|
||
|
}
|
||
|
public int groupId;
|
||
|
public int modelId;
|
||
|
public int type;
|
||
|
}
|
||
|
public partial class ResGodWeaponEquipPartOrActive : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResGodWeaponEquipPartOrActive(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 177104;
|
||
|
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:
|
||
|
groupId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
modelId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 3:
|
||
|
type = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
groupId = 0;
|
||
|
modelId = 0;
|
||
|
type = 0;
|
||
|
}
|
||
|
public int groupId;
|
||
|
public int modelId;
|
||
|
public int type;
|
||
|
}
|
||
|
public partial class ResSceneGodWeaponEquipPart : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
||
|
{
|
||
|
public void Excute()
|
||
|
{
|
||
|
HandleMsgResult.getInstance().GS2U_ResSceneGodWeaponEquipPart(this);
|
||
|
}
|
||
|
|
||
|
public const uint MsgID = 177105;
|
||
|
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:
|
||
|
part = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 2:
|
||
|
modelId = ProtoBufUtils.ReadInt32(ref readPos);
|
||
|
break;
|
||
|
case 3:
|
||
|
playerid = ProtoBufUtils.ReadUint64(ref readPos);
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
public void Clear()
|
||
|
{
|
||
|
part = 0;
|
||
|
modelId = 0;
|
||
|
playerid = 0;
|
||
|
}
|
||
|
public int part;
|
||
|
public int modelId;
|
||
|
public ulong playerid;
|
||
|
}
|
||
|
}
|
||
|
|