更新最新框架

This commit is contained in:
Bob.Song
2025-11-11 17:43:11 +08:00
parent 7b10d4cb31
commit fd3c6ec38d
1048 changed files with 11041 additions and 87002 deletions

View File

@@ -1,29 +0,0 @@
{
"Export": {
"NetworkProtocolDirectory": {
"Value": "../../Config/NetworkProtocol/",
"Comment": "ProtoBuf文件所在的文件夹位置"
},
"NetworkProtocolServerDirectory": {
"Value": "../../Entity/Generate/NetworkProtocol/",
"Comment": "ProtoBuf生成到服务端的文件夹位置"
},
"NetworkProtocolClientDirectory": {
"Value": "../../../Fishing2/Assets/Scripts/Generate/NetworkProtocol/",
"Comment": "ProtoBuf生成到客户端的文件夹位置"
},
"Serializes": {
"Value": [
// {
// "KeyIndex": 0,
// "NameSpace" : "MemoryPack",
// "SerializeName": "MemoryPack",
// "Attribute": "\t[MemoryPackable]",
// "Ignore": "\t\t[MemoryPackIgnore]",
// "Member": "MemoryPackOrder"
// }
],
"Comment": "自定义序列化器"
}
}
}

View File

@@ -1,206 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v9.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v9.0": {
"Fantasy.Tools.NetworkProtocol/1.0.0": {
"dependencies": {
"CommandLineParser": "2.9.1",
"Microsoft.Extensions.Configuration.Json": "9.0.6",
"Newtonsoft.Json": "13.0.3"
},
"runtime": {
"Fantasy.Tools.NetworkProtocol.dll": {}
}
},
"CommandLineParser/2.9.1": {
"runtime": {
"lib/netstandard2.0/CommandLine.dll": {
"assemblyVersion": "2.9.1.0",
"fileVersion": "2.9.1.0"
}
}
},
"Microsoft.Extensions.Configuration/9.0.6": {
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "9.0.6",
"Microsoft.Extensions.Primitives": "9.0.6"
},
"runtime": {
"lib/net9.0/Microsoft.Extensions.Configuration.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Microsoft.Extensions.Configuration.Abstractions/9.0.6": {
"dependencies": {
"Microsoft.Extensions.Primitives": "9.0.6"
},
"runtime": {
"lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Microsoft.Extensions.Configuration.FileExtensions/9.0.6": {
"dependencies": {
"Microsoft.Extensions.Configuration": "9.0.6",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.6",
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.6",
"Microsoft.Extensions.FileProviders.Physical": "9.0.6",
"Microsoft.Extensions.Primitives": "9.0.6"
},
"runtime": {
"lib/net9.0/Microsoft.Extensions.Configuration.FileExtensions.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Microsoft.Extensions.Configuration.Json/9.0.6": {
"dependencies": {
"Microsoft.Extensions.Configuration": "9.0.6",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.6",
"Microsoft.Extensions.Configuration.FileExtensions": "9.0.6",
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.6"
},
"runtime": {
"lib/net9.0/Microsoft.Extensions.Configuration.Json.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Microsoft.Extensions.FileProviders.Abstractions/9.0.6": {
"dependencies": {
"Microsoft.Extensions.Primitives": "9.0.6"
},
"runtime": {
"lib/net9.0/Microsoft.Extensions.FileProviders.Abstractions.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Microsoft.Extensions.FileProviders.Physical/9.0.6": {
"dependencies": {
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.6",
"Microsoft.Extensions.FileSystemGlobbing": "9.0.6",
"Microsoft.Extensions.Primitives": "9.0.6"
},
"runtime": {
"lib/net9.0/Microsoft.Extensions.FileProviders.Physical.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Microsoft.Extensions.FileSystemGlobbing/9.0.6": {
"runtime": {
"lib/net9.0/Microsoft.Extensions.FileSystemGlobbing.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Microsoft.Extensions.Primitives/9.0.6": {
"runtime": {
"lib/net9.0/Microsoft.Extensions.Primitives.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.625.26613"
}
}
},
"Newtonsoft.Json/13.0.3": {
"runtime": {
"lib/net6.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.3.27908"
}
}
}
}
},
"libraries": {
"Fantasy.Tools.NetworkProtocol/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"CommandLineParser/2.9.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==",
"path": "commandlineparser/2.9.1",
"hashPath": "commandlineparser.2.9.1.nupkg.sha512"
},
"Microsoft.Extensions.Configuration/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-VWB5jdkxHsRiuoniTqwOL32R4OWyp5If/bAucLjRJczRVNcwb8iCXKLjn3Inv8fv+jHMVMnvQLg7xhSys+y5PA==",
"path": "microsoft.extensions.configuration/9.0.6",
"hashPath": "microsoft.extensions.configuration.9.0.6.nupkg.sha512"
},
"Microsoft.Extensions.Configuration.Abstractions/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3GgMIi2jP8g1fBW93Z9b9Unamc0SIsgyhiCmC91gq4loTixK9vQMuxxUsfJ1kRGwn+/FqLKwOHqmn0oYWn3Fvw==",
"path": "microsoft.extensions.configuration.abstractions/9.0.6",
"hashPath": "microsoft.extensions.configuration.abstractions.9.0.6.nupkg.sha512"
},
"Microsoft.Extensions.Configuration.FileExtensions/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-pCEueasI5JhJ24KYzMFxtG40zyLnWpcQYawpARh9FNq9XbWozuWgexmdkPa8p8YoVNlpi3ecKfcjfoRMkKAufw==",
"path": "microsoft.extensions.configuration.fileextensions/9.0.6",
"hashPath": "microsoft.extensions.configuration.fileextensions.9.0.6.nupkg.sha512"
},
"Microsoft.Extensions.Configuration.Json/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-N0dgOYQ9tDzJouL9Tyx2dgMCcHV2pBaY8yVtorbDqYYwiDRS2zd1TbhTA2FMHqXF3SMjBoO+gONZcDoA79gdSA==",
"path": "microsoft.extensions.configuration.json/9.0.6",
"hashPath": "microsoft.extensions.configuration.json.9.0.6.nupkg.sha512"
},
"Microsoft.Extensions.FileProviders.Abstractions/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-q9FPkSGVA9ipI255p3PBAvWNXas5Tzjyp/DwYSwT+46mIFw9fWZahsF6vHpoxLt5/vtANotH2sAm7HunuFIx9g==",
"path": "microsoft.extensions.fileproviders.abstractions/9.0.6",
"hashPath": "microsoft.extensions.fileproviders.abstractions.9.0.6.nupkg.sha512"
},
"Microsoft.Extensions.FileProviders.Physical/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-l+dFA0NRl90vSIiJNy5d7V0kpTEOWHTqbgoWYzlTwF5uiM5sWJ953haaELKE05jkyJdnemVTnqjrlgo4wo7oyg==",
"path": "microsoft.extensions.fileproviders.physical/9.0.6",
"hashPath": "microsoft.extensions.fileproviders.physical.9.0.6.nupkg.sha512"
},
"Microsoft.Extensions.FileSystemGlobbing/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==",
"path": "microsoft.extensions.filesystemglobbing/9.0.6",
"hashPath": "microsoft.extensions.filesystemglobbing.9.0.6.nupkg.sha512"
},
"Microsoft.Extensions.Primitives/9.0.6": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BHniU24QV67qp1pJknqYSofAPYGmijGI8D+ci9yfw33iuFdyOeB9lWTg78ThyYLyQwZw3s0vZ36VMb0MqbUuLw==",
"path": "microsoft.extensions.primitives/9.0.6",
"hashPath": "microsoft.extensions.primitives.9.0.6.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
"path": "newtonsoft.json/13.0.3",
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
}
}
}

View File

@@ -1,12 +0,0 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@@ -0,0 +1,84 @@
syntax = "proto3";
package Sining.Message;
///通知游戏服角色进入该游戏服
message G2Common_EnterRequest // IRouteRequest,G2Common_EnterResponse
{
int64 AccountId = 1; //账号id
int64 GateRouteId = 2; //网关路由地址
int32 RouteType = 3; //登陆的路由类型
}
message G2Common_EnterResponse // IRouteResponse
{
int64 UnitRouteId = 1; //实体的路由id
int32 RouteType = 2; //登陆的场景类型
}
message G2Common_ExitRequest // IRouteRequest,Common2G_ExitResponse
{
int64 AccountId = 1; //账号id
int64 GateRouteId = 2;//网关路由地址
}
message Common2G_ExitResponse // IRouteResponse
{
}
///获取玩家基础信息
message S2G_GetPlayerBasicInfoRequest // IRouteRequest,G2S_GetPlayerBasicInfoResponse
{
repeated int64 IdList = 1; // 查询列表
}
///获取玩家基础信息响应
message G2S_GetPlayerBasicInfoResponse // IRouteResponse
{
repeated RoleSimpleInfo RoleList = 1;
}
message S2G_ChatMessage // IRouteMessage
{
ChatMessageInfo Message = 1; //聊天内容
repeated int64 IdList = 2; // 群发列表
}
///创建聊天频道
message Club2Chat_CreateChannel // IRouteMessage
{
int64 ChannelId = 1; //频道id
}
/// 请求进入房间
message G2Map_EnterMapRequest // IRouteRequest,Map2G_EnterMapResponse
{
string RoomCode = 1; //房间代码
int64 AccountId = 2; //账号id
int32 MapId = 3; //地图id
}
/// 请求进入房间响应
message Map2G_EnterMapResponse // IRouteResponse
{
string RoomCode = 1; //房间代码
int32 MapId = 2; //地图id
repeated MapUnitInfo Units = 3; //房间玩家列表
}
/// 请求离开房间
message G2Map_ExitRoomRequest // IRouteRequest,Map2G_ExiRoomResponse
{
string RoomCode = 1; //房间代码
int64 AccountId = 2; //账号id
}
/// 请求离开房间响应
message Map2G_ExiRoomResponse // IRouteResponse
{
}

Binary file not shown.

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,102 @@
syntax = "proto3";
package Fantasy.Network.Message;
////////////// ******** 物品信息 *******/////////////
///请求背包列表
message C2Game_GetItemsRequest // ICustomRouteRequest,Game2C_GetItemsResponse,GameRoute
{
}
///请求背包列表响应
message Game2C_GetItemsResponse // ICustomRouteResponse
{
repeated ItemInfo Items = 1; //物品信息
repeated ItemBindInfo Rigs = 2; //钓组信息
}
///请求使用物品
message C2Game_UseItemRequest // ICustomRouteRequest,Game2C_UseItemResponse,GameRoute
{
}
///请求使用物品响应
message Game2C_UseItemResponse // ICustomRouteResponse
{
}
///物品变化
message Game2C_ItemChange // ICustomRouteMessage,GameRoute
{
int32 Type = 1; //变化类型 0.新增 1,更新 -1删除
repeated ItemInfo Items = 2; //物品信息
repeated int64 Removes = 3; //移除物品(移除时有)
}
////////////// ******** 钓组 *******/////////////
///请求安装或取下配件
message C2Game_RigChangeRequest // ICustomRouteRequest,Game2C_RigChangeResponse,GameRoute
{
int64 RodId = 1;//杆子id
int64 RigId = 2;//变更的配件
bool IsAdd = 3;//是否添加
}
///请求安装配件响应
message Game2C_RigChangeResponse // ICustomRouteResponse
{
ItemBindInfo Rigs = 1; //变化钓组信息
}
////////////// ******** 鱼护 *******/////////////
///请求鱼护列表
message C2Game_GetFishsRequest // ICustomRouteRequest,Game2C_GetFishsResponse,GameRoute
{
}
///请求鱼护列表响应
message Game2C_GetFishsResponse // ICustomRouteResponse
{
repeated FishInfo Fishs = 1;
}
///鱼护变化
message Game2C_FishChange // ICustomRouteMessage,GameRoute
{
int32 Type = 1; //变化类型 0.新增 1,更新 -1删除
repeated FishInfo Fishs = 2; //物品信息
repeated int64 Removes = 3; //移除物品(移除时有)
}
///请求出售
message C2Game_SellFishRequest // ICustomRouteRequest,Game2C_SellFishResponse,GameRoute
{
repeated int64 Ids = 1; //出售id
}
///请求出售响应
message Game2C_SellFishResponse // ICustomRouteResponse
{
repeated AwardInfo Awards = 1; //奖励
}
////////////// ******** 商店 *******/////////////
///请求购买
message C2Game_BuyRequest // ICustomRouteRequest,Game2C_GetFishsResponse,GameRoute
{
}
///请求购买响应
message Game2C_BuyResponse // ICustomRouteResponse
{
repeated AwardInfo Awards = 1; //奖励
}

View File

@@ -0,0 +1,65 @@
syntax = "proto3";
package Fantasy.Network.Message;
/// 请求创建房间
message C2Map_CreateRoomRequest // ICustomRouteRequest,Map2C_CreateRoomResponse,MapRoute
{
int32 MapId = 1;//地图id
}
/// 请求创建房间成功
message Map2C_CreateRoomResponse // ICustomRouteResponse
{
string RoomCode = 1; //房间代码
repeated MapUnitInfo Units = 2; //房间玩家列表
}
/// 请求网关离开房间(离开房间,但是不离开地图)
message C2G_ExitRoomRequest // IRequest,G2C_ExitRoomResponse
{
string RoomCode = 1; //房间代码
}
/// 请求网关进入离开响应
message G2C_ExitRoomResponse // IResponse
{
string RoomCode = 1; //房间代码
}
/// 请求网关进入地图
message C2G_EnterMapRequest // IRequest,G2C_EnterMapResponse
{
string RoomCode = 1; //房间代码
int32 MapId = 2; //地图id
}
/// 请求网关进入房间响应
message G2C_EnterMapResponse // IResponse
{
int32 MapId = 1; //地图id
string RoomCode = 2; //房间代码
repeated MapUnitInfo Units = 3; //房间玩家列表
}
// // 请求进入地图
// message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute
// {
// int32 MapId = 1;//地图id
// string RoomCode = 2;//房间id如果是进入房间
// }
// message Map2C_EnterMapResponse // ICustomRouteResponse
// {
// }
/// 通知客户端切换地图
message Map2C_ChangeMap // ICustomRouteMessage,MapRoute
{
int32 MapId = 1; //地图id
int32 Node = 2; //站位节点
}

View File

@@ -0,0 +1,52 @@
syntax = "proto3";
package Fantasy.Network.Message;
// 协议分为:
// ProtoBuf:可以在Outer和Inner文件里使用。
// MemoryPack:可以在Outer和Inner文件里使用。
// Bson:仅支持在Inner文件里使用。
// 使用方式:
// 在message协议上方添加// Protocol+空格+协议名字
// 例如:// Protocol ProtoBuf 或 // Protocol MemoryPack
message C2A_LoginRequest // IRequest,A2C_LoginResponse
{
string Username = 1;
string Password = 2;
int32 LoginType = 3; //登录方式
int32 Region = 4; //登录地区,如果是注册,则必须传入
}
message A2C_LoginResponse // IResponse
{
string ToKen = 1;
}
/// 客户端登录到Gate服务器
message C2G_LoginRequest // IRequest,G2C_LoginResponse
{
string ToKen = 1;
}
message G2C_LoginResponse // IResponse
{
int64 RoleId = 1;
}
/// 通知客户端重复登录
message G2C_RepeatLogin // IMessage
{
}
message C2Game_GetRoleInfoRequest // ICustomRouteRequest,Game2C_GetRoleInfoResponse,GameRoute
{
}
message Game2C_GetRoleInfoResponse // ICustomRouteResponse
{
RoleInfo RoleInfo = 1; //账号信息
string RoomCode = 2; //所在房间
}

View File

@@ -0,0 +1,85 @@
syntax = "proto3";
package Fantasy.Network.Message;
//************** 进入 离开 **********************
///用户进入地图
message Map2C_RoleEnterRoomNotify // ICustomRouteMessage,MapRoute
{
MapUnitInfo Info = 2;
}
///用户离开地图
message Map2C_RoleExitRoomNotify // ICustomRouteMessage,MapRoute
{
int64 Id = 1;//离开人员
}
//************** 参数变化 **********************
message C2Map_RolePropertyChange // ICustomRouteMessage,MapRoute
{
repeated KeyValueInt64 Propertys = 1; //变化的属性信息
}
///玩家状态变化同步
message Map2C_RoleStateNotify // ICustomRouteMessage,MapRoute
{
int64 Id = 1;
UnitStateInfo State = 2;
}
///玩家钓组变化
message Map2C_RoleGearChangeNotify // ICustomRouteMessage,MapRoute
{
int64 Id = 1;
repeated GearInfo Gears = 2; //钓组数据
}
//玩家属性值变化
message Map2C_RolePropertyChangeNotify // ICustomRouteMessage,MapRoute
{
int64 Id = 1;
repeated KeyValueInt64 Propertys = 2; //变化的属性信息
}
//************** 移动 旋转 **********************
// 角色移动
message C2Map_Move // ICustomRouteMessage,MapRoute
{
Vector3Info Position = 1; //当前位置
Vector3Info Rotation = 2; //角色方向
Vector3Info Direction = 3; // 移动方向
bool IsStop = 4; // 是否是停止移动
bool IsRun = 5;
int64 Timestamp = 6; // 时间点
}
// 角色朝向变化
message C2Map_Look // ICustomRouteMessage,MapRoute
{
Vector3Info Rotation = 1; //角色方向
int64 Timestamp = 2; // 时间点
}
///玩家移动推送
message Map2C_MoveNotify // ICustomRouteMessage,MapRoute
{
int64 Id = 1; // id
Vector3Info Position = 2; //当前位置
Vector3Info Rotation = 3; //角色方向
Vector3Info Direction = 4; // 移动方向
bool IsStop = 5; // 是否停止移动
bool IsRun = 6; //是否奔跑
int64 Timestamp = 7; // 时间点
}
///玩家旋转推送
message Map2C_LookeNotify // ICustomRouteMessage,MapRoute
{
int64 Id = 1; // id
Vector3Info Rotation = 2; //角色方向
int64 Timestamp = 3; // 时间点
}

View File

@@ -0,0 +1,251 @@
syntax = "proto3";
package Fantasy.Network.Message;
////////////// ******** 私聊/邮件 *******/////////////
/// 会话信息
message ConversationInfo
{
RoleSimpleInfo RoleInfo = 1; //对方信息
repeated MailInfo List = 2;//对话列表
}
message MailInfo
{
int64 Id = 1; //邮件id
int64 Sender = 2; //发送者
string Content = 3; //内容
int64 CreateTime = 4; //发送时间
int32 MailType = 5; //邮件类型
int32 MailState = 6; //邮件状态
repeated AwardInfo Items = 7; //附件列表
}
///请求会话列表
message C2S_GetConversationsRequest // ICustomRouteRequest,S2C_GetConversationsResponse,SocialRoute
{
}
///请求会话列表响应
message S2C_GetConversationsResponse // ICustomRouteResponse
{
repeated ConversationInfo List = 1;
}
///发送邮件消息
message C2S_SendMailRequest // ICustomRouteRequest,S2C_SendMailResponse,SocialRoute
{
int64 Target = 1; //目标id
string Content = 2; //内容
repeated AwardInfo Items = 3; //附件列表
}
///发送邮件消息响应
message S2C_SendMailResponse // ICustomRouteResponse
{
}
///发送删除会话消息
message C2S_DeleteMailRequest // ICustomRouteRequest,S2C_DeleteMailResponse,SocialRoute
{
int64 Id = 1; //会话id
}
///发送删除会话消息响应
message S2C_DeleteMailResponse // ICustomRouteResponse
{
int64 Id = 1; //会话id
}
///新邮件推送
message S2C_HaveMail // ICustomRouteMessage,SocialRoute
{
MailInfo Mail = 1;
string Key = 2;
}
message S2C_MailState // ICustomRouteMessage,SocialRoute
{
int32 MailState = 1;
int64 MailId = 2;
}
////////////// ******** 频道聊天 *******/////////////
message ChatUserInfo
{
int64 Id = 1;//用户id
int64 Name = 2;//用户名
}
message ChatMessageInfo
{
int32 Type = 1; //消息类型
int64 Source = 2; //消息来源
ChatUserInfo Trigger = 3; //触发者
string Content = 4; //内容
int64 SendTime = 5; //发送时间
}
///创建频道
message C2S_CreateChannelRequest // ICustomRouteRequest,S2C_CreateChannelResponse,SocialRoute
{
string Name = 1; //频道名称
}
///创建频道响应
message S2C_CreateChannelResponse // ICustomRouteResponse
{
int64 ChannelId = 1; //创建的频道id
}
///请求进入频道
message C2S_JoinChannelRequest // ICustomRouteRequest,S2C_JoinChannelResponse,SocialRoute
{
int64 Target = 1; // 频道id
}
///进入频道响应
message S2C_JoinChannelResponse // ICustomRouteResponse
{
}
///发送消息
message C2S_SendMessageRequest // ICustomRouteRequest,S2C_SendMessageResponse,SocialRoute
{
string Message = 1;
int64 Target = 2; //目标id
}
///发送消息响应
message S2C_SendMessageResponse // ICustomRouteResponse
{
}
///推送消息
message S2C_Message // ICustomRouteMessage,SocialRoute
{
ChatMessageInfo Message = 1;
}
////////////// ******** 工会 *******/////////////
message ClubInfo
{
int64 Id = 1; //工会ID
string Name = 2; //工会名称
int64 CreateTime = 3; //创建时间
int64 OwnerId = 4; //工会创建者ID
int32 MemberCount = 5; //成员数量
}
///请求创建工会
message C2S_CreateClubRequest // ICustomRouteRequest,S2C_CreateClubResponse,SocialRoute
{
string Name = 1; //工会名称
}
///创建工会响应
message S2C_CreateClubResponse // ICustomRouteResponse
{
ClubInfo Club = 1; //创建的工会信息
}
///请求工会信息
message C2S_GetClubInfoRequest // ICustomRouteRequest,S2C_GetClubInfoResponse,SocialRoute
{
int64 ClubId = 1; //工会ID
}
///响应工会信息
message S2C_GetClubInfoResponse // ICustomRouteResponse
{
string Name = 1; //工会名称
}
/// 请求工会成员列表
message C2S_GetMemberListRequest // ICustomRouteRequest,S2C_GetMemberListResponse,SocialRoute
{
int64 ClubId = 1; //工会ID
}
/// 响应工会成员列表
message S2C_GetMemberListResponse // ICustomRouteResponse
{
repeated RoleSimpleInfo Members = 1; //工会成员列表
}
///获取工会列表请求
message C2S_GetClubListRequest // ICustomRouteRequest,S2C_GetClubListResponse,SocialRoute
{
}
///获取工会列表响应
message S2C_GetClubListResponse // ICustomRouteResponse
{
repeated ClubInfo Clubs = 1; //工会列表
}
/// 请求加入工会
message C2S_JoinClubRequest // ICustomRouteRequest,S2C_JoinClubResponse,SocialRoute
{
int64 ClubId = 1; //工会ID
}
/// 响应加入工会
message S2C_JoinClubResponse // ICustomRouteResponse
{
ClubInfo Club = 1; //加入的工会信息
}
/// 请求退出工会
message C2S_LeaveClubRequest // ICustomRouteRequest,S2C_LeaveClubResponse,SocialRoute
{
int64 ClubId = 1; //工会ID
}
/// 响应退出工会
message S2C_LeaveClubResponse // ICustomRouteResponse
{
int64 ClubId = 1; //退出的工会ID
}
/// 请求解散工会
message C2S_DissolveClubRequest // ICustomRouteRequest,S2C_DissolveClubResponse,SocialRoute
{
int64 ClubId = 1; //工会ID
}
/// 响应解散工会
message S2C_DissolveClubResponse // ICustomRouteResponse
{
int64 ClubId = 1; //解散的工会ID
}
/// 请求操作申请
message C2S_DisposeJoinRequest // ICustomRouteRequest,S2C_DisposeJoinResponse,SocialRoute
{
int64 ClubId = 1; //工会ID
int64 ApplicantId = 2; //申请人ID
int32 Agree = 3; //是否同意申请1表示同意0表示拒绝
}
/// 响应操作申请
message S2C_DisposeJoinResponse // ICustomRouteResponse
{
int64 ClubId = 1; //工会ID
int64 ApplicantId = 2; //申请人ID
int32 Agree = 3; //是否同意申请1表示同意0表示拒绝
}
///推送消息
message S2C_ClubChange // ICustomRouteMessage,SocialRoute
{
ClubInfo Club = 1;
int32 ChangeType = 2; //变更类型 0.创建 1.解散 2.加入 3.退出 4.申请处理
}

View File

@@ -0,0 +1,109 @@
syntax = "proto3";
package Fantasy.Network.Message;
/// 角色基础信息
message RoleBaseInfo
{
string NickName = 1; //昵称
string Head = 2; //头像
string Country = 3; //国家
int32 Level = 4; //等级
int32 Exp = 5; //当前等级
VipInfo VipInfo = 6; //vip信息
}
message KeyValueInt64
{
int32 Key = 1; //键
int64 Value = 2; // 值
}
/// 角色信息
message RoleInfo
{
RoleBaseInfo BaseInfo = 1;
int64 RoleId = 2; //账号id
repeated ItemInfo Items = 3; //身上物品
repeated ItemBindInfo ItemBinds = 4; //物品绑定信息
repeated FishInfo Fishs = 5; //鱼护
repeated ActivityInfo Activities = 6; //活动信息
repeated KeyValueInt64 Currency = 7; //货币信息
repeated KeyValueInt64 Slots = 8; //插槽使用情况
repeated SkillInfo Skills = 9; //技能信息
int32 MapId = 10; //当前所在地图
}
/// 角色信息
message RoleSimpleInfo
{
int64 RoleId = 1;
string NickName = 2; //昵称
string Head = 3; //头像
string Country = 4; //国家
int32 Level = 5; //等级
int32 Vip = 6; //vip级别
int32 MapId = 7; //当前所在地图
}
/// VIP信息
message VipInfo
{
int32 Level = 1; //VIP信息
int64 OpenTime = 2; //开通时间
int64 ExpirationTime = 3; //到期时间
}
///奖励信息
message AwardInfo
{
int64 ConfigId = 1; //奖励id
int32 Count = 2; //数量
}
///玩家当前使用钓组信息
message ItemBindInfo
{
int64 Item = 1; //主物品
repeated int64 BindItems = 2; //绑定物品
}
///物品信息
message ItemInfo
{
uint32 ConfigId = 1; //配置id
int64 Id = 2; //物品id
int32 Count = 3; //数量
int64 ExpirationTime = 4; //失效时间
int64 GetTime = 5; //获得时间
int32 Abrasion = 6; //耐久度
}
///fish信息
message FishInfo
{
uint32 ConfigId = 1; //配置id
int64 Id = 2; //物品id
int32 Weight = 3; //重量
int64 GetTime = 4; //获得时间
int64 ExpirationTime = 5; //失效时间
}
//活动信息
message ActivityInfo
{
int64 Id = 1; //活动id
int64 StartTime = 2; //开始时间
int64 EndTime = 3; //结束时间
repeated KeyValueInt64 Data = 4; //活动数据
}
///技能情况
message SkillInfo
{
uint32 ConfigId = 1; //技能配置id
int32 Level = 2; //技能等级
int32 Exp = 3; //技能经验
}

View File

@@ -0,0 +1,49 @@
message Vector3Info
{
float x = 1;
float y = 2;
float z = 3;
}
message Vector2Info
{
float x = 1;
float y = 2;
}
message QuaternionInfo
{
float x = 1;
float y = 2;
float z = 3;
float w = 4;
}
///玩家当前使用钓组信息
message GearInfo
{
int64 Rod = 1;
repeated int64 Rigs = 2; //钓组配件
Vector3Info Position = 3; //钓组当前位置
Vector3Info Rotation = 4; //钓组方向
repeated KeyValueInt64 Propertys = 5; //钓组参数信息
}
message UnitStateInfo
{
int32 State = 1; //状态id
repeated KeyValueInt64 Propertys = 2; //状态参数信息
}
message MapUnitInfo
{
int64 Id = 1; //用户id
RoleSimpleInfo RoleInfo = 2; //基础信息
Vector3Info Position = 3; //当前位置
Vector3Info Rotation = 4; //角色方向
UnitStateInfo State = 5; //状态信息
repeated GearInfo Gears = 6; //钓组数据
repeated KeyValueInt64 Propertys = 7; //属性信息
}

View File

@@ -0,0 +1,3 @@
// Roaming协议定义(需要定义10000以上、因为10000以内的框架预留)
MapRoamingType = 10001
ChatRoamingType = 10002

View File

@@ -0,0 +1,5 @@
// Route协议定义(需要定义1000以上、因为1000以内的框架预留)
GateRoute = 1001 // Gate
SocialRoute = 1002 // Social
GameRoute = 1003 // Game
MapRoute = 1004 // 地图

View File

@@ -1,21 +0,0 @@
@echo off
echo Please select an option:
echo 1. Client
echo 2. Server
echo 3. All
set /p choice=Please select an option:
if "%choice%"=="1" (
echo Client
dotnet Fantasy.Tools.NetworkProtocol.dll --p 1
) else if "%choice%"=="2" (
echo Server
dotnet Fantasy.Tools.NetworkProtocol.dll --p 2
) else if "%choice%"=="3" (
echo All
dotnet Fantasy.Tools.NetworkProtocol.dll --p 3
) else (
echo Invalid option
)

View File

@@ -1,24 +0,0 @@
#!/bin/bash
echo "1. Client"
echo "2. Server"
echo "3. All"
read -n 1 -p "Please select an option:" choice
echo ""
echo ""
script_dir=$(cd $(dirname $0) && pwd)
case $choice in
1)
dotnet $script_dir/Fantasy.Tools.NetworkProtocol.dll --p 1 --f $script_dir
;;
2)
dotnet $script_dir/Fantasy.Tools.NetworkProtocol.dll --p 2 --f $script_dir
;;
3)
dotnet $script_dir/Fantasy.Tools.NetworkProtocol.dll --p 3 --f $script_dir
;;
*)
echo "Invalid option"
;;
esac

View File

@@ -1,34 +0,0 @@
#if SERVER
using ProtoBuf;
(UsingNamespace)
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
#else
using ProtoBuf;
(UsingNamespace)
using System.Collections.Generic;
using Fantasy;
using NBC;
using NBC.Network.Interface;
using NBC.Serialize;
#pragma warning disable CS8618
namespace NBC
{
#endif
(Content)}