diff --git a/gen/ppcs/text.go b/gen/ppcs/text.go index f7360e9..b65ac70 100644 --- a/gen/ppcs/text.go +++ b/gen/ppcs/text.go @@ -64,11 +64,22 @@ const RegTemplateText = `// Generated by github.com/davyxu/protoplus // DO NOT EDIT! using System; using System.Collections.Generic; -using ProtoPlus; #pragma warning disable 162 namespace {{.PackageName}} { + public class MetaInfo + { + public ushort ID; // 消息ID + public Type Type; // 消息类型 + + // 消息方向 + // 在proto中添加[MsgDir: "client -> game" ], 左边为源, 右边为目标 + public string SourcePeer; // 消息发起的源 + public string TargetPeer; // 消息的目标 + + public string Name; + } public static class MessageVisitor {