|
@@ -36,22 +36,22 @@ namespace ETEditor
|
|
|
{
|
|
{
|
|
|
msgOpcode.Clear();
|
|
msgOpcode.Clear();
|
|
|
Proto2CS("ETModel", "OuterMessage.proto", clientMessagePath, "OuterOpcode", 100, HeadFlag.Proto);
|
|
Proto2CS("ETModel", "OuterMessage.proto", clientMessagePath, "OuterOpcode", 100, HeadFlag.Proto);
|
|
|
- GenerateOpcode("OuterOpcode", clientMessagePath);
|
|
|
|
|
|
|
+ GenerateOpcode("ETModel", "OuterOpcode", clientMessagePath);
|
|
|
|
|
|
|
|
Proto2CS("ETHotfix", "OuterMessage.proto", serverMessagePath, "OuterOpcode", 100, HeadFlag.Proto | HeadFlag.Bson, false);
|
|
Proto2CS("ETHotfix", "OuterMessage.proto", serverMessagePath, "OuterOpcode", 100, HeadFlag.Proto | HeadFlag.Bson, false);
|
|
|
- GenerateOpcode("OuterOpcode", serverMessagePath);
|
|
|
|
|
|
|
+ GenerateOpcode("ETHotfix", "OuterOpcode", serverMessagePath);
|
|
|
|
|
|
|
|
msgOpcode.Clear();
|
|
msgOpcode.Clear();
|
|
|
Proto2CS("ETHotfix", "HotfixMessage.proto", hotfixMessagePath, "HotfixOpcode", 10000, HeadFlag.None);
|
|
Proto2CS("ETHotfix", "HotfixMessage.proto", hotfixMessagePath, "HotfixOpcode", 10000, HeadFlag.None);
|
|
|
- GenerateOpcode("HotfixOpcode", hotfixMessagePath);
|
|
|
|
|
|
|
+ GenerateOpcode("ETHotfix", "HotfixOpcode", hotfixMessagePath);
|
|
|
|
|
|
|
|
msgOpcode.Clear();
|
|
msgOpcode.Clear();
|
|
|
Proto2CS("ETHotfix", "HotfixMessage.proto", serverMessagePath, "HotfixOpcode", 10000, HeadFlag.Bson, false);
|
|
Proto2CS("ETHotfix", "HotfixMessage.proto", serverMessagePath, "HotfixOpcode", 10000, HeadFlag.Bson, false);
|
|
|
- GenerateOpcode("HotfixOpcode", serverMessagePath);
|
|
|
|
|
|
|
+ GenerateOpcode("ETHotfix", "HotfixOpcode", serverMessagePath);
|
|
|
|
|
|
|
|
msgOpcode.Clear();
|
|
msgOpcode.Clear();
|
|
|
Proto2CS("ETHotfix", "InnerMessage.proto", serverMessagePath, "InnerOpcode", 1000, HeadFlag.Bson, false);
|
|
Proto2CS("ETHotfix", "InnerMessage.proto", serverMessagePath, "InnerOpcode", 1000, HeadFlag.Bson, false);
|
|
|
- GenerateOpcode("InnerOpcode", serverMessagePath);
|
|
|
|
|
|
|
+ GenerateOpcode("ETHotfix", "InnerOpcode", serverMessagePath);
|
|
|
|
|
|
|
|
AssetDatabase.Refresh();
|
|
AssetDatabase.Refresh();
|
|
|
}
|
|
}
|
|
@@ -229,10 +229,10 @@ namespace ETEditor
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private static void GenerateOpcode(string outputFileName, string outputPath)
|
|
|
|
|
|
|
+ private static void GenerateOpcode(string ns, string outputFileName, string outputPath)
|
|
|
{
|
|
{
|
|
|
StringBuilder sb = new StringBuilder();
|
|
StringBuilder sb = new StringBuilder();
|
|
|
- sb.AppendLine("namespace ETModel");
|
|
|
|
|
|
|
+ sb.AppendLine($"namespace {ns}");
|
|
|
sb.AppendLine("{");
|
|
sb.AppendLine("{");
|
|
|
sb.AppendLine($"\tpublic static partial class {outputFileName}");
|
|
sb.AppendLine($"\tpublic static partial class {outputFileName}");
|
|
|
sb.AppendLine("\t{");
|
|
sb.AppendLine("\t{");
|