using System; using GameProto; namespace GameLogic { public partial class ProtobufUtility { public static UInt32 MsgEcho = 0; /// /// 根据msgId来生成一个数据包 /// /// /// public static CSPkg BuildCsMsg(int msgId) { CSPkg tmp = new CSPkg(); tmp.Head = new CSPkgHead(); tmp.Head.MsgId = (UInt16)msgId; tmp.Head.Echo = GetNextEcho(); // tmp.Body.create(msgId); return tmp; } private static UInt32 GetNextEcho() { return ++MsgEcho; } } }