房间创建和进入相关逻辑和协议
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package Sining.Message;
|
||||
|
||||
///通知游戏服角色进入该游戏服
|
||||
message G2Common_EnterRequest // IRouteRequest,G2Common_EnterResponse
|
||||
{
|
||||
@@ -10,7 +11,7 @@ message G2Common_EnterRequest // IRouteRequest,G2Common_EnterResponse
|
||||
|
||||
message G2Common_EnterResponse // IRouteResponse
|
||||
{
|
||||
int64 RoleRouteId = 1; //实体的路由id
|
||||
int64 UnitRouteId = 1; //实体的路由id
|
||||
int32 RouteType = 2; //登陆的场景类型
|
||||
}
|
||||
|
||||
@@ -50,3 +51,19 @@ message Club2Chat_CreateChannel // IRouteMessage
|
||||
{
|
||||
int64 ChannelId = 1; //频道id
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// 请求进入房间
|
||||
message G2Map_EnterRoomRequest // IRouteRequest,Map2G_EnterRoomResponse
|
||||
{
|
||||
string RoomCode = 1; //房间代码
|
||||
int64 AccountId = 2; //账号id
|
||||
}
|
||||
|
||||
/// 请求进入房间响应
|
||||
message Map2G_EnterRoomResponse // IRouteResponse
|
||||
{
|
||||
string RoomCode = 1; //房间代码
|
||||
repeated MapUnitInfo Units = 2; //房间玩家列表
|
||||
}
|
||||
@@ -1,44 +1,3 @@
|
||||
syntax = "proto3";
|
||||
package Fantasy.Network.Message;
|
||||
|
||||
/// 请求创建房间
|
||||
message C2Game_CreateRoomRequest // ICustomRouteRequest,Game2C_CreateRoomResponse,MapRoute
|
||||
{
|
||||
int32 MapId = 1;//地图id
|
||||
string Password = 2;//进入密码
|
||||
}
|
||||
|
||||
/// 请求创建房间成功
|
||||
message Game2C_CreateRoomResponse // ICustomRouteResponse
|
||||
{
|
||||
int32 MapId = 1;//地图id
|
||||
int64 RoomId = 2;//房间id
|
||||
}
|
||||
|
||||
/// 请求进入地图
|
||||
message C2Game_EnterMapRequest // ICustomRouteRequest,Game2C_EnterMapResponse,MapRoute
|
||||
{
|
||||
int32 MapId = 1; //房间id
|
||||
int32 Type = 2; //进入地图方式
|
||||
}
|
||||
|
||||
/// 请求进入地图响应
|
||||
message Game2C_EnterMapResponse // ICustomRouteResponse
|
||||
{
|
||||
int32 MapId = 1; //地图id
|
||||
int Pos = 2; //位置
|
||||
}
|
||||
|
||||
/// 请求进入房间
|
||||
message C2Game_EnterRoomRequest // ICustomRouteRequest,Game2C_EnterRoomResponse,MapRoute
|
||||
{
|
||||
int32 MapId = 1;//房间id
|
||||
string Password = 2;//进入密码
|
||||
}
|
||||
|
||||
/// 请求进入房间响应
|
||||
message Game2C_EnterRoomResponse // ICustomRouteResponse
|
||||
{
|
||||
int32 MapId = 1;//地图id
|
||||
int64 RoomId = 2;//房间id
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
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_EnterRoomRequest // IRequest,G2C_EnterRoomResponse
|
||||
{
|
||||
string RoomCode = 1; //房间代码
|
||||
}
|
||||
/// 请求网关进入房间响应
|
||||
message G2C_EnterRoomResponse // IResponse
|
||||
{
|
||||
string RoomCode = 1; //房间代码
|
||||
repeated MapUnitInfo Units = 2; //房间玩家列表
|
||||
}
|
||||
|
||||
|
||||
|
||||
message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute
|
||||
{
|
||||
int32 MapId = 1;//地图id
|
||||
int64 RoomId = 2;//房间id,如果联机则有
|
||||
}
|
||||
|
||||
message Map2C_EnterMapResponse // ICustomRouteResponse
|
||||
{
|
||||
int32 MapId = 1; //地图id
|
||||
}
|
||||
@@ -31,16 +31,7 @@ message G2C_LoginResponse // IResponse
|
||||
int64 RoleId = 1;
|
||||
}
|
||||
|
||||
/// 客户端登陆聊天服
|
||||
message C2G_LoginChatRequest
|
||||
{
|
||||
int32 Type = 1;
|
||||
}
|
||||
/// 客户端登陆聊天服响应
|
||||
message G2C_LoginChatResponse // IResponse
|
||||
{
|
||||
int64 RouteId = 1;
|
||||
}
|
||||
|
||||
|
||||
/// 通知客户端重复登录
|
||||
message G2C_RepeatLogin // IMessage
|
||||
|
||||
@@ -1,72 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package Fantasy.Network.Message;
|
||||
|
||||
message UnitGearItemInfo
|
||||
{
|
||||
int64 Id = 1; //唯一id
|
||||
int32 ConfigId = 2; //配置id
|
||||
}
|
||||
|
||||
message UnitGearInfo
|
||||
{
|
||||
UnitGearItemInfo Rod = 1;
|
||||
UnitGearItemInfo Reel = 2;
|
||||
UnitGearItemInfo Bobber = 3;
|
||||
UnitGearItemInfo Hook = 4;
|
||||
UnitGearItemInfo Bait = 5;
|
||||
UnitGearItemInfo Lure = 6;
|
||||
UnitGearItemInfo Weight = 7;
|
||||
UnitGearItemInfo Line = 8;
|
||||
UnitGearItemInfo Leader = 9;
|
||||
UnitGearItemInfo Feeder = 10;
|
||||
}
|
||||
|
||||
message Vector3Info
|
||||
{
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
float z = 3;
|
||||
}
|
||||
message QuaternionInfo
|
||||
{
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
float z = 3;
|
||||
float w = 4;
|
||||
}
|
||||
|
||||
message UnitFishingInfo
|
||||
{
|
||||
float LineLength = 1;//线长度
|
||||
float ReelSpeed = 2;//收线速度
|
||||
bool OpenLight = 3;//打开手电筒
|
||||
int RodSetting = 4;
|
||||
}
|
||||
|
||||
message UnitStateInfo
|
||||
{
|
||||
int32 State = 1; //状态id
|
||||
repeated string Args = 2; //状态参数
|
||||
}
|
||||
|
||||
message MapUnitInfo
|
||||
{
|
||||
int64 Id = 1; //用户id
|
||||
RoleSimpleInfo RoleInfo = 2; //基础信息
|
||||
MapUnitPositionInfo Location = 3; //位置信息
|
||||
UnitStateInfo State = 4; //状态信息
|
||||
UnitGearInfo Gears = 5; //钓组数据
|
||||
UnitFishingInfo FishingInfo = 6; //钓鱼状态信息
|
||||
repeated KeyValueInt32 KV = 7; //属性信息
|
||||
}
|
||||
|
||||
message MapUnitPositionInfo
|
||||
{
|
||||
Vector3Info Position = 1;
|
||||
QuaternionInfo Rotation = 2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
message C2Map_EnterRoomRequest // ICustomRouteRequest,Map2C_EnterRoomResponse,MapRoute
|
||||
{
|
||||
@@ -80,17 +14,7 @@ message Map2C_EnterRoomResponse // ICustomRouteResponse
|
||||
int64 RoomId = 2;//房间id
|
||||
}
|
||||
|
||||
message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute
|
||||
{
|
||||
int32 MapId = 1;//地图id
|
||||
int64 RoomId = 2;//房间id,如果联机则有
|
||||
}
|
||||
|
||||
message Map2C_EnterMapResponse // ICustomRouteResponse
|
||||
{
|
||||
repeated MapUnitInfo Roles = 1; //地图玩家列表
|
||||
int64 MapId = 2; //地图id
|
||||
}
|
||||
|
||||
|
||||
message C2Map_Move // ICustomRouteMessage,MapRoute
|
||||
|
||||
65
Config/NetworkProtocol/Outer/data/MapProtoData.proto
Normal file
65
Config/NetworkProtocol/Outer/data/MapProtoData.proto
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
message UnitGearItemInfo
|
||||
{
|
||||
int64 Id = 1; //唯一id
|
||||
int32 ConfigId = 2; //配置id
|
||||
}
|
||||
|
||||
message UnitGearInfo
|
||||
{
|
||||
UnitGearItemInfo Rod = 1;
|
||||
UnitGearItemInfo Reel = 2;
|
||||
UnitGearItemInfo Bobber = 3;
|
||||
UnitGearItemInfo Hook = 4;
|
||||
UnitGearItemInfo Bait = 5;
|
||||
UnitGearItemInfo Lure = 6;
|
||||
UnitGearItemInfo Weight = 7;
|
||||
UnitGearItemInfo Line = 8;
|
||||
UnitGearItemInfo Leader = 9;
|
||||
UnitGearItemInfo Feeder = 10;
|
||||
}
|
||||
|
||||
message Vector3Info
|
||||
{
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
float z = 3;
|
||||
}
|
||||
message QuaternionInfo
|
||||
{
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
float z = 3;
|
||||
float w = 4;
|
||||
}
|
||||
|
||||
message UnitFishingInfo
|
||||
{
|
||||
float LineLength = 1;//线长度
|
||||
float ReelSpeed = 2;//收线速度
|
||||
bool OpenLight = 3;//打开手电筒
|
||||
int RodSetting = 4;
|
||||
}
|
||||
|
||||
message UnitStateInfo
|
||||
{
|
||||
int32 State = 1; //状态id
|
||||
repeated string Args = 2; //状态参数
|
||||
}
|
||||
|
||||
message MapUnitInfo
|
||||
{
|
||||
int64 Id = 1; //用户id
|
||||
RoleSimpleInfo RoleInfo = 2; //基础信息
|
||||
MapUnitPositionInfo Location = 3; //位置信息
|
||||
UnitStateInfo State = 4; //状态信息
|
||||
UnitGearInfo Gears = 5; //钓组数据
|
||||
UnitFishingInfo FishingInfo = 6; //钓鱼状态信息
|
||||
repeated KeyValueInt32 KV = 7; //属性信息
|
||||
}
|
||||
|
||||
message MapUnitPositionInfo
|
||||
{
|
||||
Vector3Info Position = 1;
|
||||
QuaternionInfo Rotation = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user