地图
This commit is contained in:
@@ -3,4 +3,5 @@
|
|||||||
&ę"MultiThread*Addressable@<40>VH
|
&ę"MultiThread*Addressable@<40>VH
|
||||||
(ë"MultiThread*Gate2KCP8 ś@ŤVH
|
(ë"MultiThread*Gate2KCP8 ś@ŤVH
|
||||||
ě"MultiThread*Game@—VH
|
ě"MultiThread*Game@—VH
|
||||||
î"MultiThread*Chat@«VH
|
î"MultiThread*Chat@«VH
|
||||||
|
ď"MultiThread*Map@µVH
|
||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
{"WorksheetNames":[-8419147776733210060,-3495952183970875596,1720330851179383898,5812538452563588342],"Tables":{"-3495952183970875596":1755183581501,"-1088042625810372120":1753532052628,"1720330851179383898":1753711757684,"3730651590607244245":1753532052629,"5812538452563588342":1753532052630}}
|
{"WorksheetNames":[-8419147776733210060,-3495952183970875596,1720330851179383898,5812538452563588342],"Tables":{"-3495952183970875596":1756136538067,"-1088042625810372120":1753532052628,"1720330851179383898":1753711757684,"3730651590607244245":1753532052629,"5812538452563588342":1753532052630}}
|
||||||
@@ -3,5 +3,6 @@
|
|||||||
{"Id":1002,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Addressable","NetworkProtocol":null,"OuterPort":0,"InnerPort":11011,"SceneType":2},
|
{"Id":1002,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Addressable","NetworkProtocol":null,"OuterPort":0,"InnerPort":11011,"SceneType":2},
|
||||||
{"Id":1003,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Gate","NetworkProtocol":"KCP","OuterPort":20000,"InnerPort":11021,"SceneType":3},
|
{"Id":1003,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Gate","NetworkProtocol":"KCP","OuterPort":20000,"InnerPort":11021,"SceneType":3},
|
||||||
{"Id":1004,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Game","NetworkProtocol":null,"OuterPort":0,"InnerPort":11031,"SceneType":4},
|
{"Id":1004,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Game","NetworkProtocol":null,"OuterPort":0,"InnerPort":11031,"SceneType":4},
|
||||||
{"Id":1006,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Chat","NetworkProtocol":null,"OuterPort":0,"InnerPort":11051,"SceneType":8}
|
{"Id":1006,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Chat","NetworkProtocol":null,"OuterPort":0,"InnerPort":11051,"SceneType":8},
|
||||||
|
{"Id":1007,"ProcessConfigId":1,"WorldConfigId":1,"SceneRuntimeMode":"MultiThread","SceneTypeString":"Map","NetworkProtocol":null,"OuterPort":0,"InnerPort":11061,"SceneType":5}
|
||||||
]}
|
]}
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package Fantasy.Network.Message;
|
package Fantasy.Network.Message;
|
||||||
|
|
||||||
message RoleGearItemInfo
|
message UnitGearItemInfo
|
||||||
{
|
{
|
||||||
int64 Id = 1; //唯一id
|
int64 Id = 1; //唯一id
|
||||||
int32 ConfigId = 2; //配置id
|
int32 ConfigId = 2; //配置id
|
||||||
}
|
}
|
||||||
|
|
||||||
message RoleGearInfo
|
message UnitGearInfo
|
||||||
{
|
{
|
||||||
RoleGearItemInfo Rod = 1;
|
UnitGearItemInfo Rod = 1;
|
||||||
RoleGearItemInfo Reel = 2;
|
UnitGearItemInfo Reel = 2;
|
||||||
RoleGearItemInfo Bobber = 3;
|
UnitGearItemInfo Bobber = 3;
|
||||||
RoleGearItemInfo Hook = 4;
|
UnitGearItemInfo Hook = 4;
|
||||||
RoleGearItemInfo Bait = 5;
|
UnitGearItemInfo Bait = 5;
|
||||||
RoleGearItemInfo Lure = 6;
|
UnitGearItemInfo Lure = 6;
|
||||||
RoleGearItemInfo Weight = 7;
|
UnitGearItemInfo Weight = 7;
|
||||||
RoleGearItemInfo Line = 8;
|
UnitGearItemInfo Line = 8;
|
||||||
RoleGearItemInfo Leader = 9;
|
UnitGearItemInfo Leader = 9;
|
||||||
RoleGearItemInfo Feeder = 10;
|
UnitGearItemInfo Feeder = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Vector3Info
|
message Vector3Info
|
||||||
@@ -35,7 +35,7 @@ message QuaternionInfo
|
|||||||
float w = 4;
|
float w = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RoleFishingInfo
|
message UnitFishingInfo
|
||||||
{
|
{
|
||||||
float LineLength = 1;//线长度
|
float LineLength = 1;//线长度
|
||||||
float ReelSpeed = 2;//收线速度
|
float ReelSpeed = 2;//收线速度
|
||||||
@@ -43,37 +43,51 @@ message RoleFishingInfo
|
|||||||
int RodSetting = 4;
|
int RodSetting = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RoleStateInfo
|
message UnitStateInfo
|
||||||
{
|
{
|
||||||
int32 State = 1; //状态id
|
int32 State = 1; //状态id
|
||||||
repeated string Args = 2; //状态参数
|
repeated string Args = 2; //状态参数
|
||||||
}
|
}
|
||||||
|
|
||||||
message MapRoleInfo
|
message MapUnitInfo
|
||||||
{
|
{
|
||||||
int64 Id = 1; //用户id
|
int64 Id = 1; //用户id
|
||||||
RoleSimpleInfo RoleInfo = 2; //基础信息
|
RoleSimpleInfo RoleInfo = 2; //基础信息
|
||||||
MapRolePositionInfo Location = 3; //位置信息
|
MapUnitPositionInfo Location = 3; //位置信息
|
||||||
RoleStateInfo State = 4; //状态信息
|
UnitStateInfo State = 4; //状态信息
|
||||||
RoleGearInfo Gears = 5; //钓组数据
|
UnitGearInfo Gears = 5; //钓组数据
|
||||||
RoleFishingInfo FishingInfo = 6; //钓鱼状态信息
|
UnitFishingInfo FishingInfo = 6; //钓鱼状态信息
|
||||||
|
repeated KeyValueInt32 KV = 7; //属性信息
|
||||||
}
|
}
|
||||||
|
|
||||||
message MapRolePositionInfo
|
message MapUnitPositionInfo
|
||||||
{
|
{
|
||||||
Vector3Info Position = 1;
|
Vector3Info Position = 1;
|
||||||
QuaternionInfo Rotation = 2;
|
QuaternionInfo Rotation = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
C2Map_CreateMapRequest // ICustomRouteRequest,Map2C_CreateMapResponse,MapRoute
|
message C2Map_CreateRoomRequest // ICustomRouteRequest,Map2C_CreateRoomResponse,MapRoute
|
||||||
{
|
{
|
||||||
int32 MapId = 1;//地图id
|
int32 MapId = 1;//房间id
|
||||||
string Password = 2;//进入密码
|
string Password = 2;//进入密码
|
||||||
}
|
}
|
||||||
|
|
||||||
message Map2C_CreateMapResponse // ICustomRouteResponse
|
message Map2C_CreateRoomResponse // ICustomRouteResponse
|
||||||
{
|
{
|
||||||
repeated MapRoleInfo Roles = 1;//地图玩家列表
|
int32 MapId = 1;//地图id
|
||||||
|
int64 RoomId = 2;//房间id
|
||||||
|
}
|
||||||
|
|
||||||
|
message C2Map_EnterRoomRequest // ICustomRouteRequest,Map2C_EnterRoomResponse,MapRoute
|
||||||
|
{
|
||||||
|
int32 MapId = 1;//房间id
|
||||||
|
string Password = 2;//进入密码
|
||||||
|
}
|
||||||
|
|
||||||
|
message Map2C_EnterRoomResponse // ICustomRouteResponse
|
||||||
|
{
|
||||||
|
int32 MapId = 1;//地图id
|
||||||
|
int64 RoomId = 2;//房间id
|
||||||
}
|
}
|
||||||
|
|
||||||
message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute
|
message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute
|
||||||
@@ -84,13 +98,14 @@ message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapR
|
|||||||
|
|
||||||
message Map2C_EnterMapResponse // ICustomRouteResponse
|
message Map2C_EnterMapResponse // ICustomRouteResponse
|
||||||
{
|
{
|
||||||
repeated MapRoleInfo Roles = 1;//地图玩家列表
|
repeated MapUnitInfo Roles = 1; //地图玩家列表
|
||||||
|
int64 MapId = 2; //地图id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message C2Map_Move // ICustomRouteMessage,MapRoute
|
message C2Map_Move // ICustomRouteMessage,MapRoute
|
||||||
{
|
{
|
||||||
MapRolePositionInfo Location = 1;
|
MapUnitPositionInfo Location = 1;
|
||||||
bool IsStop = 2;
|
bool IsStop = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +113,7 @@ message C2Map_Move // ICustomRouteMessage,MapRoute
|
|||||||
///用户进入地图
|
///用户进入地图
|
||||||
message Map2C_RoleEnterMapNotify // ICustomRouteMessage,MapRoute
|
message Map2C_RoleEnterMapNotify // ICustomRouteMessage,MapRoute
|
||||||
{
|
{
|
||||||
MapRoleInfo Info = 1;
|
MapUnitInfo Info = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
///用户离开地图
|
///用户离开地图
|
||||||
@@ -111,26 +126,26 @@ message Map2C_RoleExitMapNotify // ICustomRouteMessage,MapRoute
|
|||||||
message Map2C_RoleStateNotify // ICustomRouteMessage,MapRoute
|
message Map2C_RoleStateNotify // ICustomRouteMessage,MapRoute
|
||||||
{
|
{
|
||||||
int64 Id = 1;
|
int64 Id = 1;
|
||||||
RoleStateInfo State = 2;
|
UnitStateInfo State = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
///玩家钓组状态变化
|
///玩家钓组状态变化
|
||||||
message Map2C_RoleGearStateNotify // ICustomRouteMessage,MapRoute
|
message Map2C_RoleGearStateNotify // ICustomRouteMessage,MapRoute
|
||||||
{
|
{
|
||||||
int64 Id = 1;
|
int64 Id = 1;
|
||||||
RoleFishingInfo State = 2;
|
UnitFishingInfo State = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
///玩家钓组变化
|
///玩家钓组变化
|
||||||
message Map2C_RoleGearChangeNotify // ICustomRouteMessage,MapRoute
|
message Map2C_RoleGearChangeNotify // ICustomRouteMessage,MapRoute
|
||||||
{
|
{
|
||||||
int64 Id = 1;
|
int64 Id = 1;
|
||||||
RoleGearInfo Gears = 2; //钓组数据
|
UnitGearInfo Gears = 2; //钓组数据
|
||||||
}
|
}
|
||||||
|
|
||||||
///玩家位置变化
|
///玩家位置变化
|
||||||
message Map2C_MoveNotify
|
message Map2C_MoveNotify
|
||||||
{
|
{
|
||||||
int64 Id = 1;
|
int64 Id = 1;
|
||||||
MapRolePositionInfo Location = 2;
|
MapUnitPositionInfo Location = 2;
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,11 @@ message KeyValueStringInt64
|
|||||||
string Key = 1; //键
|
string Key = 1; //键
|
||||||
int64 Value = 2; //值
|
int64 Value = 2; //值
|
||||||
}
|
}
|
||||||
|
message KeyValueInt32
|
||||||
|
{
|
||||||
|
int32 Key = 1; //键
|
||||||
|
int32 Value = 2; //值
|
||||||
|
}
|
||||||
message KeyValueInt64
|
message KeyValueInt64
|
||||||
{
|
{
|
||||||
int64 Key = 1; //键
|
int64 Key = 1; //键
|
||||||
|
|||||||
@@ -2,4 +2,5 @@
|
|||||||
GateRoute = 1001 // Gate
|
GateRoute = 1001 // Gate
|
||||||
SocialRoute = 1002 // Social
|
SocialRoute = 1002 // Social
|
||||||
GameRoute = 1003 // Game
|
GameRoute = 1003 // Game
|
||||||
MapRoute = 1004 // Map
|
MapRoute = 1004 // Map
|
||||||
|
RoomRoute = 1005 // Room
|
||||||
@@ -76,6 +76,26 @@ namespace Fantasy
|
|||||||
public long Value { get; set; }
|
public long Value { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
|
public partial class KeyValueInt32 : AMessage, IProto
|
||||||
|
{
|
||||||
|
public static KeyValueInt32 Create(Scene scene)
|
||||||
|
{
|
||||||
|
return scene.MessagePoolComponent.Rent<KeyValueInt32>();
|
||||||
|
}
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
Key = default;
|
||||||
|
Value = default;
|
||||||
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
|
GetScene().MessagePoolComponent.Return<KeyValueInt32>(this);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
[ProtoMember(1)]
|
||||||
|
public int Key { get; set; }
|
||||||
|
[ProtoMember(2)]
|
||||||
|
public int Value { get; set; }
|
||||||
|
}
|
||||||
|
[ProtoContract]
|
||||||
public partial class KeyValueInt64 : AMessage, IProto
|
public partial class KeyValueInt64 : AMessage, IProto
|
||||||
{
|
{
|
||||||
public static KeyValueInt64 Create(Scene scene)
|
public static KeyValueInt64 Create(Scene scene)
|
||||||
|
|||||||
@@ -18,18 +18,18 @@ using Fantasy.Serialize;
|
|||||||
namespace Fantasy
|
namespace Fantasy
|
||||||
{
|
{
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class RoleGearItemInfo : AMessage, IProto
|
public partial class UnitGearItemInfo : AMessage, IProto
|
||||||
{
|
{
|
||||||
public static RoleGearItemInfo Create(Scene scene)
|
public static UnitGearItemInfo Create(Scene scene)
|
||||||
{
|
{
|
||||||
return scene.MessagePoolComponent.Rent<RoleGearItemInfo>();
|
return scene.MessagePoolComponent.Rent<UnitGearItemInfo>();
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
Id = default;
|
Id = default;
|
||||||
ConfigId = default;
|
ConfigId = default;
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<RoleGearItemInfo>(this);
|
GetScene().MessagePoolComponent.Return<UnitGearItemInfo>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
@@ -38,11 +38,11 @@ namespace Fantasy
|
|||||||
public int ConfigId { get; set; }
|
public int ConfigId { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class RoleGearInfo : AMessage, IProto
|
public partial class UnitGearInfo : AMessage, IProto
|
||||||
{
|
{
|
||||||
public static RoleGearInfo Create(Scene scene)
|
public static UnitGearInfo Create(Scene scene)
|
||||||
{
|
{
|
||||||
return scene.MessagePoolComponent.Rent<RoleGearInfo>();
|
return scene.MessagePoolComponent.Rent<UnitGearInfo>();
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
@@ -57,29 +57,29 @@ namespace Fantasy
|
|||||||
Leader = default;
|
Leader = default;
|
||||||
Feeder = default;
|
Feeder = default;
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<RoleGearInfo>(this);
|
GetScene().MessagePoolComponent.Return<UnitGearInfo>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public RoleGearItemInfo Rod { get; set; }
|
public UnitGearItemInfo Rod { get; set; }
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
public RoleGearItemInfo Reel { get; set; }
|
public UnitGearItemInfo Reel { get; set; }
|
||||||
[ProtoMember(3)]
|
[ProtoMember(3)]
|
||||||
public RoleGearItemInfo Bobber { get; set; }
|
public UnitGearItemInfo Bobber { get; set; }
|
||||||
[ProtoMember(4)]
|
[ProtoMember(4)]
|
||||||
public RoleGearItemInfo Hook { get; set; }
|
public UnitGearItemInfo Hook { get; set; }
|
||||||
[ProtoMember(5)]
|
[ProtoMember(5)]
|
||||||
public RoleGearItemInfo Bait { get; set; }
|
public UnitGearItemInfo Bait { get; set; }
|
||||||
[ProtoMember(6)]
|
[ProtoMember(6)]
|
||||||
public RoleGearItemInfo Lure { get; set; }
|
public UnitGearItemInfo Lure { get; set; }
|
||||||
[ProtoMember(7)]
|
[ProtoMember(7)]
|
||||||
public RoleGearItemInfo Weight { get; set; }
|
public UnitGearItemInfo Weight { get; set; }
|
||||||
[ProtoMember(8)]
|
[ProtoMember(8)]
|
||||||
public RoleGearItemInfo Line { get; set; }
|
public UnitGearItemInfo Line { get; set; }
|
||||||
[ProtoMember(9)]
|
[ProtoMember(9)]
|
||||||
public RoleGearItemInfo Leader { get; set; }
|
public UnitGearItemInfo Leader { get; set; }
|
||||||
[ProtoMember(10)]
|
[ProtoMember(10)]
|
||||||
public RoleGearItemInfo Feeder { get; set; }
|
public UnitGearItemInfo Feeder { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class Vector3Info : AMessage, IProto
|
public partial class Vector3Info : AMessage, IProto
|
||||||
@@ -131,11 +131,11 @@ namespace Fantasy
|
|||||||
public float w { get; set; }
|
public float w { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class RoleFishingInfo : AMessage, IProto
|
public partial class UnitFishingInfo : AMessage, IProto
|
||||||
{
|
{
|
||||||
public static RoleFishingInfo Create(Scene scene)
|
public static UnitFishingInfo Create(Scene scene)
|
||||||
{
|
{
|
||||||
return scene.MessagePoolComponent.Rent<RoleFishingInfo>();
|
return scene.MessagePoolComponent.Rent<UnitFishingInfo>();
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
@@ -144,7 +144,7 @@ namespace Fantasy
|
|||||||
OpenLight = default;
|
OpenLight = default;
|
||||||
RodSetting = default;
|
RodSetting = default;
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<RoleFishingInfo>(this);
|
GetScene().MessagePoolComponent.Return<UnitFishingInfo>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
@@ -157,18 +157,18 @@ namespace Fantasy
|
|||||||
public int RodSetting { get; set; }
|
public int RodSetting { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class RoleStateInfo : AMessage, IProto
|
public partial class UnitStateInfo : AMessage, IProto
|
||||||
{
|
{
|
||||||
public static RoleStateInfo Create(Scene scene)
|
public static UnitStateInfo Create(Scene scene)
|
||||||
{
|
{
|
||||||
return scene.MessagePoolComponent.Rent<RoleStateInfo>();
|
return scene.MessagePoolComponent.Rent<UnitStateInfo>();
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
State = default;
|
State = default;
|
||||||
Args.Clear();
|
Args.Clear();
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<RoleStateInfo>(this);
|
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
@@ -177,11 +177,11 @@ namespace Fantasy
|
|||||||
public List<string> Args = new List<string>();
|
public List<string> Args = new List<string>();
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class MapRoleInfo : AMessage, IProto
|
public partial class MapUnitInfo : AMessage, IProto
|
||||||
{
|
{
|
||||||
public static MapRoleInfo Create(Scene scene)
|
public static MapUnitInfo Create(Scene scene)
|
||||||
{
|
{
|
||||||
return scene.MessagePoolComponent.Rent<MapRoleInfo>();
|
return scene.MessagePoolComponent.Rent<MapUnitInfo>();
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
@@ -191,8 +191,9 @@ namespace Fantasy
|
|||||||
State = default;
|
State = default;
|
||||||
Gears = default;
|
Gears = default;
|
||||||
FishingInfo = default;
|
FishingInfo = default;
|
||||||
|
KV.Clear();
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<MapRoleInfo>(this);
|
GetScene().MessagePoolComponent.Return<MapUnitInfo>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
@@ -200,27 +201,29 @@ namespace Fantasy
|
|||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
public RoleSimpleInfo RoleInfo { get; set; }
|
public RoleSimpleInfo RoleInfo { get; set; }
|
||||||
[ProtoMember(3)]
|
[ProtoMember(3)]
|
||||||
public MapRolePositionInfo Location { get; set; }
|
public MapUnitPositionInfo Location { get; set; }
|
||||||
[ProtoMember(4)]
|
[ProtoMember(4)]
|
||||||
public RoleStateInfo State { get; set; }
|
public UnitStateInfo State { get; set; }
|
||||||
[ProtoMember(5)]
|
[ProtoMember(5)]
|
||||||
public RoleGearInfo Gears { get; set; }
|
public UnitGearInfo Gears { get; set; }
|
||||||
[ProtoMember(6)]
|
[ProtoMember(6)]
|
||||||
public RoleFishingInfo FishingInfo { get; set; }
|
public UnitFishingInfo FishingInfo { get; set; }
|
||||||
|
[ProtoMember(7)]
|
||||||
|
public List<KeyValueInt32> KV = new List<KeyValueInt32>();
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class MapRolePositionInfo : AMessage, IProto
|
public partial class MapUnitPositionInfo : AMessage, IProto
|
||||||
{
|
{
|
||||||
public static MapRolePositionInfo Create(Scene scene)
|
public static MapUnitPositionInfo Create(Scene scene)
|
||||||
{
|
{
|
||||||
return scene.MessagePoolComponent.Rent<MapRolePositionInfo>();
|
return scene.MessagePoolComponent.Rent<MapUnitPositionInfo>();
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
Position = default;
|
Position = default;
|
||||||
Rotation = default;
|
Rotation = default;
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<MapRolePositionInfo>(this);
|
GetScene().MessagePoolComponent.Return<MapUnitPositionInfo>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
@@ -229,24 +232,52 @@ namespace Fantasy
|
|||||||
public QuaternionInfo Rotation { get; set; }
|
public QuaternionInfo Rotation { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
public partial class Map2C_CreateMapResponse : AMessage, ICustomRouteResponse, IProto
|
public partial class C2Map_CreateRoomRequest : AMessage, ICustomRouteRequest, IProto
|
||||||
{
|
{
|
||||||
public static Map2C_CreateMapResponse Create(Scene scene)
|
public static C2Map_CreateRoomRequest Create(Scene scene)
|
||||||
{
|
{
|
||||||
return scene.MessagePoolComponent.Rent<Map2C_CreateMapResponse>();
|
return scene.MessagePoolComponent.Rent<C2Map_CreateRoomRequest>();
|
||||||
|
}
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
MapId = default;
|
||||||
|
Password = default;
|
||||||
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
|
GetScene().MessagePoolComponent.Return<C2Map_CreateRoomRequest>(this);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
[ProtoIgnore]
|
||||||
|
public Map2C_CreateRoomResponse ResponseType { get; set; }
|
||||||
|
public uint OpCode() { return OuterOpcode.C2Map_CreateRoomRequest; }
|
||||||
|
[ProtoIgnore]
|
||||||
|
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||||
|
[ProtoMember(1)]
|
||||||
|
public int MapId { get; set; }
|
||||||
|
[ProtoMember(2)]
|
||||||
|
public string Password { get; set; }
|
||||||
|
}
|
||||||
|
[ProtoContract]
|
||||||
|
public partial class Map2C_CreateRoomResponse : AMessage, ICustomRouteResponse, IProto
|
||||||
|
{
|
||||||
|
public static Map2C_CreateRoomResponse Create(Scene scene)
|
||||||
|
{
|
||||||
|
return scene.MessagePoolComponent.Rent<Map2C_CreateRoomResponse>();
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
ErrorCode = default;
|
ErrorCode = default;
|
||||||
Roles.Clear();
|
MapId = default;
|
||||||
|
RoomId = default;
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<Map2C_CreateMapResponse>(this);
|
GetScene().MessagePoolComponent.Return<Map2C_CreateRoomResponse>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
public uint OpCode() { return OuterOpcode.Map2C_CreateMapResponse; }
|
public uint OpCode() { return OuterOpcode.Map2C_CreateRoomResponse; }
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public List<MapRoleInfo> Roles = new List<MapRoleInfo>();
|
public int MapId { get; set; }
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
|
public long RoomId { get; set; }
|
||||||
|
[ProtoMember(3)]
|
||||||
public uint ErrorCode { get; set; }
|
public uint ErrorCode { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
@@ -285,14 +316,17 @@ namespace Fantasy
|
|||||||
{
|
{
|
||||||
ErrorCode = default;
|
ErrorCode = default;
|
||||||
Roles.Clear();
|
Roles.Clear();
|
||||||
|
MapId = default;
|
||||||
#if FANTASY_NET || FANTASY_UNITY
|
#if FANTASY_NET || FANTASY_UNITY
|
||||||
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public List<MapRoleInfo> Roles = new List<MapRoleInfo>();
|
public List<MapUnitInfo> Roles = new List<MapUnitInfo>();
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
|
public long MapId { get; set; }
|
||||||
|
[ProtoMember(3)]
|
||||||
public uint ErrorCode { get; set; }
|
public uint ErrorCode { get; set; }
|
||||||
}
|
}
|
||||||
[ProtoContract]
|
[ProtoContract]
|
||||||
@@ -314,7 +348,7 @@ namespace Fantasy
|
|||||||
[ProtoIgnore]
|
[ProtoIgnore]
|
||||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public MapRolePositionInfo Location { get; set; }
|
public MapUnitPositionInfo Location { get; set; }
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
public bool IsStop { get; set; }
|
public bool IsStop { get; set; }
|
||||||
}
|
}
|
||||||
@@ -339,7 +373,7 @@ namespace Fantasy
|
|||||||
[ProtoIgnore]
|
[ProtoIgnore]
|
||||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public MapRoleInfo Info { get; set; }
|
public MapUnitInfo Info { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户离开地图
|
/// 用户离开地图
|
||||||
@@ -388,7 +422,7 @@ namespace Fantasy
|
|||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
public RoleStateInfo State { get; set; }
|
public UnitStateInfo State { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 玩家钓组状态变化
|
/// 玩家钓组状态变化
|
||||||
@@ -414,7 +448,7 @@ namespace Fantasy
|
|||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
public RoleFishingInfo State { get; set; }
|
public UnitFishingInfo State { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 玩家钓组变化
|
/// 玩家钓组变化
|
||||||
@@ -440,7 +474,7 @@ namespace Fantasy
|
|||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
public RoleGearInfo Gears { get; set; }
|
public UnitGearInfo Gears { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 玩家位置变化
|
/// 玩家位置变化
|
||||||
@@ -463,6 +497,6 @@ namespace Fantasy
|
|||||||
[ProtoMember(1)]
|
[ProtoMember(1)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
[ProtoMember(2)]
|
[ProtoMember(2)]
|
||||||
public MapRolePositionInfo Location { get; set; }
|
public MapUnitPositionInfo Location { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ namespace Fantasy
|
|||||||
{
|
{
|
||||||
public static partial class OuterOpcode
|
public static partial class OuterOpcode
|
||||||
{
|
{
|
||||||
public const uint Map2C_CreateMapResponse = 2415929105;
|
public const uint C2Map_CreateRoomRequest = 2281711377;
|
||||||
public const uint C2Map_EnterMapRequest = 2281711377;
|
public const uint Map2C_CreateRoomResponse = 2415929105;
|
||||||
|
public const uint C2Map_EnterMapRequest = 2281711378;
|
||||||
public const uint Map2C_EnterMapResponse = 2415929106;
|
public const uint Map2C_EnterMapResponse = 2415929106;
|
||||||
public const uint C2Map_Move = 2147493649;
|
public const uint C2Map_Move = 2147493649;
|
||||||
public const uint Map2C_RoleEnterMapNotify = 2147493650;
|
public const uint Map2C_RoleEnterMapNotify = 2147493650;
|
||||||
@@ -16,38 +17,38 @@ namespace Fantasy
|
|||||||
public const uint C2G_LoginRequest = 268445458;
|
public const uint C2G_LoginRequest = 268445458;
|
||||||
public const uint G2C_LoginResponse = 402663186;
|
public const uint G2C_LoginResponse = 402663186;
|
||||||
public const uint G2C_RepeatLogin = 134227729;
|
public const uint G2C_RepeatLogin = 134227729;
|
||||||
public const uint C2Game_GetRoleInfoRequest = 2281711378;
|
public const uint C2Game_GetRoleInfoRequest = 2281711379;
|
||||||
public const uint Game2C_GetRoleInfoResponse = 2415929107;
|
public const uint Game2C_GetRoleInfoResponse = 2415929107;
|
||||||
public const uint C2S_GetConversationsRequest = 2281711379;
|
public const uint C2S_GetConversationsRequest = 2281711380;
|
||||||
public const uint S2C_GetConversationsResponse = 2415929108;
|
public const uint S2C_GetConversationsResponse = 2415929108;
|
||||||
public const uint C2S_SendMailRequest = 2281711380;
|
public const uint C2S_SendMailRequest = 2281711381;
|
||||||
public const uint S2C_SendMailResponse = 2415929109;
|
public const uint S2C_SendMailResponse = 2415929109;
|
||||||
public const uint C2S_DeleteMailRequest = 2281711381;
|
public const uint C2S_DeleteMailRequest = 2281711382;
|
||||||
public const uint S2C_DeleteMailResponse = 2415929110;
|
public const uint S2C_DeleteMailResponse = 2415929110;
|
||||||
public const uint S2C_HaveMail = 2147493655;
|
public const uint S2C_HaveMail = 2147493655;
|
||||||
public const uint S2C_MailState = 2147493656;
|
public const uint S2C_MailState = 2147493656;
|
||||||
public const uint C2S_CreateChannelRequest = 2281711382;
|
public const uint C2S_CreateChannelRequest = 2281711383;
|
||||||
public const uint S2C_CreateChannelResponse = 2415929111;
|
public const uint S2C_CreateChannelResponse = 2415929111;
|
||||||
public const uint C2S_JoinChannelRequest = 2281711383;
|
public const uint C2S_JoinChannelRequest = 2281711384;
|
||||||
public const uint S2C_JoinChannelResponse = 2415929112;
|
public const uint S2C_JoinChannelResponse = 2415929112;
|
||||||
public const uint C2S_SendMessageRequest = 2281711384;
|
public const uint C2S_SendMessageRequest = 2281711385;
|
||||||
public const uint S2C_SendMessageResponse = 2415929113;
|
public const uint S2C_SendMessageResponse = 2415929113;
|
||||||
public const uint S2C_Message = 2147493657;
|
public const uint S2C_Message = 2147493657;
|
||||||
public const uint C2S_CreateClubRequest = 2281711385;
|
public const uint C2S_CreateClubRequest = 2281711386;
|
||||||
public const uint S2C_CreateClubResponse = 2415929114;
|
public const uint S2C_CreateClubResponse = 2415929114;
|
||||||
public const uint C2S_GetClubInfoRequest = 2281711386;
|
public const uint C2S_GetClubInfoRequest = 2281711387;
|
||||||
public const uint S2C_GetClubInfoResponse = 2415929115;
|
public const uint S2C_GetClubInfoResponse = 2415929115;
|
||||||
public const uint C2S_GetMemberListRequest = 2281711387;
|
public const uint C2S_GetMemberListRequest = 2281711388;
|
||||||
public const uint S2C_GetMemberListResponse = 2415929116;
|
public const uint S2C_GetMemberListResponse = 2415929116;
|
||||||
public const uint C2S_GetClubListRequest = 2281711388;
|
public const uint C2S_GetClubListRequest = 2281711389;
|
||||||
public const uint S2C_GetClubListResponse = 2415929117;
|
public const uint S2C_GetClubListResponse = 2415929117;
|
||||||
public const uint C2S_JoinClubRequest = 2281711389;
|
public const uint C2S_JoinClubRequest = 2281711390;
|
||||||
public const uint S2C_JoinClubResponse = 2415929118;
|
public const uint S2C_JoinClubResponse = 2415929118;
|
||||||
public const uint C2S_LeaveClubRequest = 2281711390;
|
public const uint C2S_LeaveClubRequest = 2281711391;
|
||||||
public const uint S2C_LeaveClubResponse = 2415929119;
|
public const uint S2C_LeaveClubResponse = 2415929119;
|
||||||
public const uint C2S_DissolveClubRequest = 2281711391;
|
public const uint C2S_DissolveClubRequest = 2281711392;
|
||||||
public const uint S2C_DissolveClubResponse = 2415929120;
|
public const uint S2C_DissolveClubResponse = 2415929120;
|
||||||
public const uint C2S_DisposeJoinRequest = 2281711392;
|
public const uint C2S_DisposeJoinRequest = 2281711393;
|
||||||
public const uint S2C_DisposeJoinResponse = 2415929121;
|
public const uint S2C_DisposeJoinResponse = 2415929121;
|
||||||
public const uint S2C_ClubChange = 2147493658;
|
public const uint S2C_ClubChange = 2147493658;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ namespace Fantasy
|
|||||||
public const int SocialRoute = 1002; // Social
|
public const int SocialRoute = 1002; // Social
|
||||||
public const int GameRoute = 1003; // Game
|
public const int GameRoute = 1003; // Game
|
||||||
public const int MapRoute = 1004; // Map
|
public const int MapRoute = 1004; // Map
|
||||||
|
public const int RoomRoute = 1005; // Room
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Fantasy;
|
using Fantasy;
|
||||||
using Fantasy.Async;
|
using Fantasy.Async;
|
||||||
using Fantasy.Network;
|
using Fantasy.Network;
|
||||||
|
using Fantasy.Platform.Net;
|
||||||
using NB.Chat;
|
using NB.Chat;
|
||||||
using NB.Game;
|
using NB.Game;
|
||||||
|
|
||||||
@@ -67,6 +68,11 @@ public static class GateLoginHelper
|
|||||||
routeComponent.AddAddress(RouteType.SocialRoute, chatRouteId);
|
routeComponent.AddAddress(RouteType.SocialRoute, chatRouteId);
|
||||||
gateUnit.ChatSceneRouteId = sceneRouteId;
|
gateUnit.ChatSceneRouteId = sceneRouteId;
|
||||||
Log.Info($"连接聊天服成功,gameRouteId:{gameRouteId}");
|
Log.Info($"连接聊天服成功,gameRouteId:{gameRouteId}");
|
||||||
|
|
||||||
|
var gameSceneConfigs = SceneConfigData.Instance.GetSceneBySceneType(SceneType.Map);
|
||||||
|
|
||||||
|
var mapSceneConfig = gameSceneConfigs.First();
|
||||||
|
routeComponent.AddAddress(RouteType.MapRoute, mapSceneConfig.RouteId);
|
||||||
return ErrorCode.Successful;
|
return ErrorCode.Successful;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Folder Include="Map\Helper\" />
|
||||||
|
<Folder Include="Map\System\" />
|
||||||
<Folder Include="Social\Chat\" />
|
<Folder Include="Social\Chat\" />
|
||||||
<Folder Include="Social\Club\" />
|
<Folder Include="Social\Club\" />
|
||||||
<Folder Include="Social\Mail\Handler\Inner\" />
|
<Folder Include="Social\Mail\Handler\Inner\" />
|
||||||
|
|||||||
15
Hotfix/Map/Handler/C2Map_CreateRoomRequestHandler.cs
Normal file
15
Hotfix/Map/Handler/C2Map_CreateRoomRequestHandler.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using Fantasy;
|
||||||
|
using Fantasy.Async;
|
||||||
|
using Fantasy.Network.Interface;
|
||||||
|
|
||||||
|
namespace NB.Map;
|
||||||
|
|
||||||
|
public class C2Map_CreateRoomRequestHandler : RouteRPC<Scene, C2Map_CreateRoomRequest, Map2C_CreateRoomResponse>
|
||||||
|
{
|
||||||
|
protected override async FTask Run(Scene entity, C2Map_CreateRoomRequest request, Map2C_CreateRoomResponse response,
|
||||||
|
Action reply)
|
||||||
|
{
|
||||||
|
Log.Info($"创建房间=== map:{request.MapId} pass:{request.Password}");
|
||||||
|
await FTask.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,6 +47,11 @@ public class OnSceneCreate_Init : AsyncEventSystem<OnCreateScene>
|
|||||||
scene.AddComponent<MailManageComponent>();
|
scene.AddComponent<MailManageComponent>();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SceneType.Map:
|
||||||
|
{
|
||||||
|
Log.Info("创建地图场景===");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await FTask.CompletedTask;
|
await FTask.CompletedTask;
|
||||||
|
|||||||
Reference in New Issue
Block a user