地图相关协议
This commit is contained in:
@@ -224,24 +224,52 @@ namespace NBC
|
||||
public QuaternionInfo Rotation { get; set; }
|
||||
}
|
||||
[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()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Units.Clear();
|
||||
MapId = default;
|
||||
RoomId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_CreateMapResponse>(this);
|
||||
GetScene().MessagePoolComponent.Return<Map2C_CreateRoomResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_CreateMapResponse; }
|
||||
public uint OpCode() { return OuterOpcode.Map2C_CreateRoomResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoomId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
@@ -279,15 +307,18 @@ namespace NBC
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Units.Clear();
|
||||
Roles.Clear();
|
||||
MapId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
|
||||
public List<MapUnitInfo> Roles = new List<MapUnitInfo>();
|
||||
[ProtoMember(2)]
|
||||
public long MapId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
|
||||
Reference in New Issue
Block a user