快速使用协议

This commit is contained in:
2025-11-19 00:08:10 +08:00
parent 32dadfcfad
commit c8e7b38d3f
8 changed files with 192 additions and 95 deletions

View File

@@ -58,6 +58,7 @@ namespace Fantasy
ErrorCode = default;
Items.Clear();
Rigs.Clear();
Slots.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetItemsResponse>(this);
#endif
@@ -68,6 +69,8 @@ namespace Fantasy
[ProtoMember(2)]
public List<ItemBindInfo> Rigs = new List<ItemBindInfo>();
[ProtoMember(3)]
public List<long> Slots = new List<long>();
[ProtoMember(4)]
public uint ErrorCode { get; set; }
}
/// <summary>
@@ -204,6 +207,61 @@ namespace Fantasy
public uint ErrorCode { get; set; }
}
/// <summary>
/// /////////// ******** 快速使用插槽 *******/////////////
/// </summary>
/// <summary>
/// 请求设置快速使用
/// </summary>
[ProtoContract]
public partial class C2Game_SetSlotRequest : AMessage, ICustomRouteRequest
{
public static C2Game_SetSlotRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_SetSlotRequest>();
}
public override void Dispose()
{
Index = default;
Id = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_SetSlotRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_SetSlotResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_SetSlotRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int Index { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
}
/// <summary>
/// 请求设置快速使用响应
/// </summary>
[ProtoContract]
public partial class Game2C_SetSlotResponse : AMessage, ICustomRouteResponse
{
public static Game2C_SetSlotResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_SetSlotResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Slots.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_SetSlotResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_SetSlotResponse; }
[ProtoMember(1)]
public List<long> Slots = new List<long>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// /////////// ******** 鱼护 *******/////////////
/// </summary>
/// <summary>