提交示例代码
This commit is contained in:
BIN
邮件系统课程完整代码/Config/.DS_Store
vendored
Normal file
BIN
邮件系统课程完整代码/Config/.DS_Store
vendored
Normal file
Binary file not shown.
2
邮件系统课程完整代码/Config/Binary/MachineConfigData.bytes
Normal file
2
邮件系统课程完整代码/Config/Binary/MachineConfigData.bytes
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
# 127.0.0.1 127.0.0.1" 127.0.0.1
|
||||
2
邮件系统课程完整代码/Config/Binary/ProcessConfigData.bytes
Normal file
2
邮件系统课程完整代码/Config/Binary/ProcessConfigData.bytes
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
5
邮件系统课程完整代码/Config/Binary/SceneConfigData.bytes
Normal file
5
邮件系统课程完整代码/Config/Binary/SceneConfigData.bytes
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
&é"MultiThread*Addressable@ůUH
|
||||
(ę"MultiThread*Gate2KCP8 ś@úUH
|
||||
ë"MultiThread*Map@űUH
|
||||
ě"MultiThread*Mail@üUH
|
||||
2
邮件系统课程完整代码/Config/Binary/WorldConfigData.bytes
Normal file
2
邮件系统课程完整代码/Config/Binary/WorldConfigData.bytes
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
9 测试服mongodb://127.0.0.1"fantasy_mail*MongoDB
|
||||
BIN
邮件系统课程完整代码/Config/Excel/.DS_Store
vendored
Normal file
BIN
邮件系统课程完整代码/Config/Excel/.DS_Store
vendored
Normal file
Binary file not shown.
1
邮件系统课程完整代码/Config/Excel/Custom.txt
Normal file
1
邮件系统课程完整代码/Config/Excel/Custom.txt
Normal file
@@ -0,0 +1 @@
|
||||
// 自定义导出配置文件,用于配置自定义导出自定义程序的路径
|
||||
BIN
邮件系统课程完整代码/Config/Excel/Server/MachineConfig.xlsx
Normal file
BIN
邮件系统课程完整代码/Config/Excel/Server/MachineConfig.xlsx
Normal file
Binary file not shown.
BIN
邮件系统课程完整代码/Config/Excel/Server/ProcessConfig.xlsx
Normal file
BIN
邮件系统课程完整代码/Config/Excel/Server/ProcessConfig.xlsx
Normal file
Binary file not shown.
BIN
邮件系统课程完整代码/Config/Excel/Server/SceneConfig.xlsx
Normal file
BIN
邮件系统课程完整代码/Config/Excel/Server/SceneConfig.xlsx
Normal file
Binary file not shown.
BIN
邮件系统课程完整代码/Config/Excel/Server/WorldConfig.xlsx
Normal file
BIN
邮件系统课程完整代码/Config/Excel/Server/WorldConfig.xlsx
Normal file
Binary file not shown.
1
邮件系统课程完整代码/Config/Excel/Version.txt
Normal file
1
邮件系统课程完整代码/Config/Excel/Version.txt
Normal file
@@ -0,0 +1 @@
|
||||
{"WorksheetNames":["ProcessConfig","MachineConfig","WorldConfig","SceneConfig","SceneTypeConfig"],"Tables":{"MachineConfig":1739296621442,"SceneConfig":1739530293874,"WorldConfig":1739530344968,"ProcessConfig":1727164776000}}
|
||||
BIN
邮件系统课程完整代码/Config/Json/.DS_Store
vendored
Normal file
BIN
邮件系统课程完整代码/Config/Json/.DS_Store
vendored
Normal file
Binary file not shown.
3
邮件系统课程完整代码/Config/Json/Server/MachineConfigData.Json
Normal file
3
邮件系统课程完整代码/Config/Json/Server/MachineConfigData.Json
Normal file
@@ -0,0 +1,3 @@
|
||||
{"List":[
|
||||
{"Id":1,"OuterIP":"127.0.0.1","OuterBindIP":"127.0.0.1","InnerBindIP":"127.0.0.1"}
|
||||
]}
|
||||
3
邮件系统课程完整代码/Config/Json/Server/ProcessConfigData.Json
Normal file
3
邮件系统课程完整代码/Config/Json/Server/ProcessConfigData.Json
Normal file
@@ -0,0 +1,3 @@
|
||||
{"List":[
|
||||
{"Id":1,"MachineId":1,"StartupGroup":0}
|
||||
]}
|
||||
6
邮件系统课程完整代码/Config/Json/Server/SceneConfigData.Json
Normal file
6
邮件系统课程完整代码/Config/Json/Server/SceneConfigData.Json
Normal file
@@ -0,0 +1,6 @@
|
||||
{"List":[
|
||||
{"Id":1001,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeType":"MultiThread","SceneTypeString":"Addressable","NetworkProtocol":null,"OuterPort":0,"InnerPort":11001,"SceneType":2},
|
||||
{"Id":1002,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeType":"MultiThread","SceneTypeString":"Gate","NetworkProtocol":"KCP","OuterPort":20000,"InnerPort":11002,"SceneType":3},
|
||||
{"Id":1003,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeType":"MultiThread","SceneTypeString":"Map","NetworkProtocol":null,"OuterPort":0,"InnerPort":11003,"SceneType":4},
|
||||
{"Id":1004,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeType":"MultiThread","SceneTypeString":"Mail","NetworkProtocol":null,"OuterPort":0,"InnerPort":11004,"SceneType":9}
|
||||
]}
|
||||
3
邮件系统课程完整代码/Config/Json/Server/WorldConfigData.Json
Normal file
3
邮件系统课程完整代码/Config/Json/Server/WorldConfigData.Json
Normal file
@@ -0,0 +1,3 @@
|
||||
{"List":[
|
||||
{"Id":1,"WorldName":"测试服","DbConnection":"mongodb://127.0.0.1","DbName":"fantasy_mail","DbType":"MongoDB"}
|
||||
]}
|
||||
BIN
邮件系统课程完整代码/Config/NetworkProtocol/.DS_Store
vendored
Normal file
BIN
邮件系统课程完整代码/Config/NetworkProtocol/.DS_Store
vendored
Normal file
Binary file not shown.
38
邮件系统课程完整代码/Config/NetworkProtocol/Inner/InnerMessage.proto
Normal file
38
邮件系统课程完整代码/Config/NetworkProtocol/Inner/InnerMessage.proto
Normal file
@@ -0,0 +1,38 @@
|
||||
syntax = "proto3";
|
||||
package Sining.Message;
|
||||
/// Gate服务器登陆到Mail服务器
|
||||
message G2Mail_LoginRequest // IRouteRequest,Mail2G_LoginResponse
|
||||
{
|
||||
string Name = 1;
|
||||
int64 AccountId = 2;
|
||||
int64 CreateTime = 3;
|
||||
int64 GateRouteId = 4;
|
||||
}
|
||||
message Mail2G_LoginResponse // IRouteResponse
|
||||
{
|
||||
int64 MailUnitRouteId = 1;
|
||||
}
|
||||
/// 发送一个Gate服务器发送给Mail之间的测试协议
|
||||
message G2Mail_TestMessage // IRouteMessage
|
||||
{
|
||||
string Tag = 1;
|
||||
}
|
||||
/// 发送给Mail服务器进行下线
|
||||
message G2Mail_ExitRequest // IRouteRequest,Mail2G_ExitResponse
|
||||
{
|
||||
|
||||
}
|
||||
message Mail2G_ExitResponse // IRouteResponse
|
||||
{
|
||||
|
||||
}
|
||||
/// 其他服务器发送邮件
|
||||
// Protocol Bson
|
||||
message Other2Mail_SendMailRequest // IRouteRequest,Mail2Other_SendMailResponse
|
||||
{
|
||||
MailBox MailBox = 1;
|
||||
}
|
||||
message Mail2Other_SendMailResponse // IRouteResponse
|
||||
{
|
||||
|
||||
}
|
||||
1
邮件系统课程完整代码/Config/NetworkProtocol/OpCode.Cache
Normal file
1
邮件系统课程完整代码/Config/NetworkProtocol/OpCode.Cache
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
165
邮件系统课程完整代码/Config/NetworkProtocol/Outer/OuterMessage.proto
Normal file
165
邮件系统课程完整代码/Config/NetworkProtocol/Outer/OuterMessage.proto
Normal file
@@ -0,0 +1,165 @@
|
||||
syntax = "proto3";
|
||||
package Fantasy.Network.Message;
|
||||
// 协议分为:
|
||||
// ProtoBuf:可以在Outer和Inner文件里使用。
|
||||
// MemoryPack:可以在Outer和Inner文件里使用。
|
||||
// Bson:仅支持在Inner文件里使用。
|
||||
// 使用方式:
|
||||
// 在message协议上方添加// Protocol+空格+协议名字
|
||||
// 例如:// Protocol ProtoBuf 或 // Protocol MemoryPack
|
||||
/// 登陆到Gate服务器
|
||||
message C2G_LoginRequest // IRequest,G2C_LoginResponse
|
||||
{
|
||||
string Name = 1; // 登陆的用户名,现在情况下是如果不存在服务器会自动创建一个新的账号。
|
||||
}
|
||||
message G2C_LoginResponse // IResponse
|
||||
{
|
||||
|
||||
}
|
||||
/// 客户端通知服务器退出游戏
|
||||
message C2G_Exit // IMessage
|
||||
{
|
||||
|
||||
}
|
||||
/// 测试Mail自定义Route协议
|
||||
message C2Mail_TestRequest // ICustomRouteRequest,Mail2C_TestResponse,MailRoute
|
||||
{
|
||||
string Tag = 1;
|
||||
}
|
||||
message Mail2C_TestResponse // ICustomRouteResponse
|
||||
{
|
||||
string Tag = 1;
|
||||
}
|
||||
/// 一个邮件的完整信息
|
||||
message MailInfo
|
||||
{
|
||||
int64 MailId = 1;
|
||||
int64 OwnerId = 2;
|
||||
string Title = 3;
|
||||
string Content = 4;
|
||||
int64 CreateTime = 5;
|
||||
int64 ExpireTime = 6;
|
||||
int32 Money = 7;
|
||||
int32 MailState = 8;
|
||||
int32 MailType = 9;
|
||||
repeated ItemInfo Items = 10;
|
||||
}
|
||||
/// 一个邮件的简单版消息
|
||||
message MailSimplifyInfo
|
||||
{
|
||||
int64 MailId = 1;
|
||||
int64 OwnerId = 2;
|
||||
string Title = 3;
|
||||
string Content = 4;
|
||||
int64 CreateTime = 5;
|
||||
int64 ExpireTime = 6;
|
||||
int32 MailState = 7;
|
||||
int32 MailType = 8;
|
||||
|
||||
}
|
||||
/// 一个简单的物品信息
|
||||
message ItemInfo
|
||||
{
|
||||
int64 ItemId = 1;
|
||||
string Name = 2;
|
||||
}
|
||||
/// Mail通知客户端有新的邮件
|
||||
message Mail2C_HaveMail // ICustomRouteMessage,MailRoute
|
||||
{
|
||||
MailSimplifyInfo Mail = 1;
|
||||
}
|
||||
/// Mail通知客户端邮件状态变化
|
||||
message Mail2C_MailState // ICustomRouteMessage,MailRoute
|
||||
{
|
||||
int32 MailState = 1;
|
||||
int64 MailId = 2;
|
||||
}
|
||||
/// 客户端获取档期所有邮件的信息
|
||||
message C2Mail_GetHaveMailRequest // ICustomRouteRequest,Mail2C_GetHaveMailResposne,MailRoute
|
||||
{
|
||||
|
||||
}
|
||||
message Mail2C_GetHaveMailResposne // ICustomRouteResponse
|
||||
{
|
||||
repeated MailSimplifyInfo Mails = 1;
|
||||
}
|
||||
/// 客户端发开一个邮件
|
||||
message C2Mail_OpenMailRequest // ICustomRouteRequest,Mail2C_OpenMailResposne,MailRoute
|
||||
{
|
||||
int64 MailId = 1;
|
||||
bool ReturnMailInfo = 2;
|
||||
}
|
||||
message Mail2C_OpenMailResposne // ICustomRouteResponse
|
||||
{
|
||||
MailInfo MailInfo = 1;
|
||||
}
|
||||
/// 客户端领取邮件的附件
|
||||
message C2Mail_ReceiveMailRequest // ICustomRouteRequest,Mail2C_ReceiveMailResponse,MailRoute
|
||||
{
|
||||
int64 MailId = 1;
|
||||
bool Money = 2;
|
||||
repeated int64 ItemId = 3;
|
||||
}
|
||||
message Mail2C_ReceiveMailResponse // ICustomRouteResponse
|
||||
{
|
||||
|
||||
}
|
||||
/// 客户端通知服务器删除一个邮件
|
||||
message C2Mail_RemoveMailRequest // ICustomRouteRequest,Mail2C_RemoveMailResponse,MailRoute
|
||||
{
|
||||
int64 MailId = 1;
|
||||
}
|
||||
message Mail2C_RemoveMailResponse // ICustomRouteResponse
|
||||
{
|
||||
|
||||
}
|
||||
/// 客户端玩家发送邮件到另外一个玩家
|
||||
message C2Mail_SendMailRequest // ICustomRouteRequest,Mail2C_SendMailResponse,MailRoute
|
||||
{
|
||||
string UserName = 1;
|
||||
string Title = 2;
|
||||
string Content = 3;
|
||||
int32 Money = 4;
|
||||
repeated int64 ItemId = 5;
|
||||
}
|
||||
message Mail2C_SendMailResponse // ICustomRouteResponse
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
2
邮件系统课程完整代码/Config/NetworkProtocol/RouteType.Config
Normal file
2
邮件系统课程完整代码/Config/NetworkProtocol/RouteType.Config
Normal file
@@ -0,0 +1,2 @@
|
||||
// Route协议定义(需要定义1000以上、因为1000以内的框架预留)
|
||||
MailRoute = 1001 // Mail
|
||||
16
邮件系统课程完整代码/Config/README.md
Normal file
16
邮件系统课程完整代码/Config/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Fantasy-Net.Config
|
||||
在Config文件夹中,存放着Fantasy所需的各种配置文件。这些文件涵盖了多个方面。每个配置文件都有其特定的格式和功能,通过精心设计的这些配置文件,开发团队能够快速调整框架参数,以实现更好的游戏体验,从而提升Fantasy的整体质量。
|
||||
## Excel文件夹
|
||||
里面存放了Fantasy.Net所需的四个Excel配置文件。用户可以利用Fantasy-Net.Exporter工具,依据这四个Excel文件生成相应的JSON文件,以供框架使用。这一过程不仅简化了数据处理,还确保了不同组件之间的无缝对接,使得工作流程更加高效。请确保在导出之前,Excel文件的格式和内容符合要求,以避免产生错误。
|
||||
## Json文件夹
|
||||
在该目录中存放了Fantasy.Net所需的四个JSON配置文件。用户可以根据这四个文件的模板进行添加或修改配置,以满足具体需求。每个项目的功能说明在相应的Excel文件中有详细描述,方便用户理解和使用这些配置文件。我们建议用户仔细阅读Excel文件中的说明,以确保配置的正确性和有效性。
|
||||
## NetworkProtocol文件夹
|
||||
存放框架所需定义网络协议的模版和文件夹
|
||||
### Inner文件夹
|
||||
定义服务器之间的网络协议
|
||||
### Outer文件夹
|
||||
定义客户端和服务器之间的网络协议
|
||||
### RouteType.Config
|
||||
定义自定义Route协议的配置文件
|
||||
## 交流与讨论:
|
||||
__讨论QQ群 : Fantasy服务器开发交流群 569888673 __
|
||||
Reference in New Issue
Block a user