172 lines
5.7 KiB
C#
172 lines
5.7 KiB
C#
using System.Collections.Generic;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Logic.Network;
|
|
|
|
namespace MSG_PlatformEvaluate
|
|
{
|
|
public partial class ResEvaluateInfo : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResEvaluateInfo(this);
|
|
}
|
|
|
|
public const uint MsgID = 146101;
|
|
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:
|
|
like = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
share = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
evaluate = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4:
|
|
openLike = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 5:
|
|
openShare = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 6:
|
|
everyDayShare = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 7:
|
|
openEveryDayShare = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
case 8:
|
|
shopEvaluate = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 9:
|
|
openShopEvaluate = ProtoBufUtils.ReadBoolean(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
like = 0;
|
|
share = 0;
|
|
evaluate = 0;
|
|
openLike = false;
|
|
openShare = false;
|
|
everyDayShare = 0;
|
|
openEveryDayShare = false;
|
|
shopEvaluate = 0;
|
|
openShopEvaluate = false;
|
|
}
|
|
public int like;
|
|
public int share;
|
|
public int evaluate;
|
|
public bool openLike;
|
|
public bool openShare;
|
|
public int everyDayShare;
|
|
public bool openEveryDayShare;
|
|
public int shopEvaluate;
|
|
public bool openShopEvaluate;
|
|
}
|
|
public partial class ResEvaluateResult : ProtoBuf.IExtensible, ProtoBuf.IResMessage
|
|
{
|
|
public void Excute()
|
|
{
|
|
HandleMsgResult.getInstance().GS2U_ResEvaluateResult(this);
|
|
}
|
|
|
|
public const uint MsgID = 146102;
|
|
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:
|
|
like = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 2:
|
|
share = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 3:
|
|
evaluate = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 4:
|
|
everyDayShare = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
case 5:
|
|
shopEvaluate = ProtoBufUtils.ReadInt32(ref readPos);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
like = 0;
|
|
share = 0;
|
|
evaluate = 0;
|
|
everyDayShare = 0;
|
|
shopEvaluate = 0;
|
|
}
|
|
public int like;
|
|
public int share;
|
|
public int evaluate;
|
|
public int everyDayShare;
|
|
public int shopEvaluate;
|
|
}
|
|
public partial class ReqEvaluate : ProtoBuf.IExtensible, ProtoBuf.IReqMessage
|
|
{
|
|
|
|
public const uint MsgID = 146201;
|
|
public void Excute(){}
|
|
public void Send()
|
|
{
|
|
lock (ProtoBufUtils.WriteLocker)
|
|
{
|
|
byte[] bytes = null;
|
|
ProtoBufUtils.InitWriteData();
|
|
ProtoBufUtils.WriteInt32(1,type);
|
|
ProtoBufUtils.WriteInt32(2,actType);
|
|
bytes = ProtoBufUtils.GetData();
|
|
Thousandto.Plugins.Common.Networker.Instance.Send(bytes, MsgID);
|
|
}
|
|
}
|
|
public void Clear()
|
|
{
|
|
type = 0;
|
|
actType = 0;
|
|
}
|
|
public int type;
|
|
public int actType;
|
|
}
|
|
}
|
|
|