提交进入地图和创建房间相关逻辑和协议

This commit is contained in:
2025-08-27 18:05:55 +08:00
parent f6d85a1e0a
commit 94af0e5ddb
31 changed files with 562 additions and 68 deletions

View File

@@ -129,6 +129,30 @@ 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
{