完成进入房间和地图功能
This commit is contained in:
@@ -80,11 +80,3 @@ message G2Map_ExitRoomRequest // IRouteRequest,Map2G_ExiRoomResponse
|
||||
message Map2G_ExiRoomResponse // IRouteResponse
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// 通知网关切换地图
|
||||
message Map2G_ChangeMapMessage // IRouteMessage
|
||||
{
|
||||
int32 MapId = 1;
|
||||
int32 Node = 2; //站位节点
|
||||
}
|
||||
@@ -48,4 +48,20 @@ message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapR
|
||||
message Map2C_EnterMapResponse // ICustomRouteResponse
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// 通知客户端切换地图
|
||||
message Map2C_ChangeMap // ICustomRouteMessage,MapRoute
|
||||
{
|
||||
int32 MapId = 1; //地图id
|
||||
int32 Node = 2; //站位节点
|
||||
}
|
||||
|
||||
|
||||
// ///新邮件推送
|
||||
// message S2C_HaveMail // ICustomRouteMessage,SocialRoute
|
||||
// {
|
||||
// MailInfo Mail = 1;
|
||||
// string Key = 2;
|
||||
// }
|
||||
@@ -40,14 +40,6 @@ message G2C_RepeatLogin // IMessage
|
||||
}
|
||||
|
||||
|
||||
/// 通知客户端切换地图
|
||||
message G2C_ChangeMap // IMessage
|
||||
{
|
||||
int32 MapId = 1; //地图id
|
||||
int32 Node = 2; //站位节点
|
||||
}
|
||||
|
||||
|
||||
message C2Game_GetRoleInfoRequest // ICustomRouteRequest,Game2C_GetRoleInfoResponse,GameRoute
|
||||
{
|
||||
|
||||
|
||||
@@ -300,28 +300,4 @@ namespace Fantasy
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知网关切换地图
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2G_ChangeMapMessage : AMessage, IRouteMessage, IProto
|
||||
{
|
||||
public static Map2G_ChangeMapMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2G_ChangeMapMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Node = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2G_ChangeMapMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.Map2G_ChangeMapMessage; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Node { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,5 @@ namespace Fantasy
|
||||
public const uint Map2G_EnterRoomResponse = 1207969556;
|
||||
public const uint G2Map_ExitRoomRequest = 1073751829;
|
||||
public const uint Map2G_ExiRoomResponse = 1207969557;
|
||||
public const uint Map2G_ChangeMapMessage = 939534099;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,4 +209,30 @@ namespace Fantasy
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知客户端切换地图
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2C_ChangeMap : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Map2C_ChangeMap Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_ChangeMap>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Node = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_ChangeMap>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_ChangeMap; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Node { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,30 +129,6 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_RepeatLogin; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知客户端切换地图
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_ChangeMap : AMessage, IMessage, IProto
|
||||
{
|
||||
public static G2C_ChangeMap Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_ChangeMap>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Node = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_ChangeMap>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_ChangeMap; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Node { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Game_GetRoleInfoRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
|
||||
@@ -10,37 +10,37 @@ namespace Fantasy
|
||||
public const uint G2C_ExitRoomResponse = 402663186;
|
||||
public const uint C2Map_EnterMapRequest = 2281711378;
|
||||
public const uint Map2C_EnterMapResponse = 2415929106;
|
||||
public const uint Map2C_ChangeMap = 2147493649;
|
||||
public const uint C2A_LoginRequest = 268445459;
|
||||
public const uint A2C_LoginResponse = 402663187;
|
||||
public const uint C2G_LoginRequest = 268445460;
|
||||
public const uint G2C_LoginResponse = 402663188;
|
||||
public const uint G2C_RepeatLogin = 134227729;
|
||||
public const uint G2C_ChangeMap = 134227730;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711379;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929107;
|
||||
public const uint C2Map_EnterRoomRequest = 2281711380;
|
||||
public const uint Map2C_EnterRoomResponse = 2415929108;
|
||||
public const uint C2Map_Move = 2147493649;
|
||||
public const uint Map2C_RoleEnterMapNotify = 2147493650;
|
||||
public const uint Map2C_RoleExitMapNotify = 2147493651;
|
||||
public const uint Map2C_RoleStateNotify = 2147493652;
|
||||
public const uint Map2C_RoleGearStateNotify = 2147493653;
|
||||
public const uint Map2C_RoleGearChangeNotify = 2147493654;
|
||||
public const uint C2Map_Move = 2147493650;
|
||||
public const uint Map2C_RoleEnterMapNotify = 2147493651;
|
||||
public const uint Map2C_RoleExitMapNotify = 2147493652;
|
||||
public const uint Map2C_RoleStateNotify = 2147493653;
|
||||
public const uint Map2C_RoleGearStateNotify = 2147493654;
|
||||
public const uint Map2C_RoleGearChangeNotify = 2147493655;
|
||||
public const uint C2S_GetConversationsRequest = 2281711381;
|
||||
public const uint S2C_GetConversationsResponse = 2415929109;
|
||||
public const uint C2S_SendMailRequest = 2281711382;
|
||||
public const uint S2C_SendMailResponse = 2415929110;
|
||||
public const uint C2S_DeleteMailRequest = 2281711383;
|
||||
public const uint S2C_DeleteMailResponse = 2415929111;
|
||||
public const uint S2C_HaveMail = 2147493655;
|
||||
public const uint S2C_MailState = 2147493656;
|
||||
public const uint S2C_HaveMail = 2147493656;
|
||||
public const uint S2C_MailState = 2147493657;
|
||||
public const uint C2S_CreateChannelRequest = 2281711384;
|
||||
public const uint S2C_CreateChannelResponse = 2415929112;
|
||||
public const uint C2S_JoinChannelRequest = 2281711385;
|
||||
public const uint S2C_JoinChannelResponse = 2415929113;
|
||||
public const uint C2S_SendMessageRequest = 2281711386;
|
||||
public const uint S2C_SendMessageResponse = 2415929114;
|
||||
public const uint S2C_Message = 2147493657;
|
||||
public const uint S2C_Message = 2147493658;
|
||||
public const uint C2S_CreateClubRequest = 2281711387;
|
||||
public const uint S2C_CreateClubResponse = 2415929115;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711388;
|
||||
@@ -57,6 +57,6 @@ namespace Fantasy
|
||||
public const uint S2C_DissolveClubResponse = 2415929121;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711394;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929122;
|
||||
public const uint S2C_ClubChange = 2147493658;
|
||||
public const uint S2C_ClubChange = 2147493659;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,13 @@ public static class MapUnitSystem
|
||||
return ErrorCode.MapIdError;
|
||||
}
|
||||
|
||||
// map.en
|
||||
|
||||
// 同步客户端
|
||||
self.Scene.NetworkMessagingComponent.SendInnerRoute(self.GateRouteId, new Map2C_ChangeMap()
|
||||
{
|
||||
Node = 1,
|
||||
MapId = mapId
|
||||
});
|
||||
|
||||
await FTask.CompletedTask;
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"profiles": {
|
||||
"Main": {
|
||||
"commandName": "Project",
|
||||
"workingDirectory": "$(OutputPath)",
|
||||
// "workingDirectory": "$(OutputPath)",
|
||||
"environmentVariables": {},
|
||||
"commandLineArgs": "--m Develop"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user