新增逻辑

This commit is contained in:
2025-12-15 12:30:45 +08:00
parent a4c2bb021b
commit 240bee00c3
56 changed files with 649 additions and 526 deletions

View File

@@ -85,6 +85,7 @@ namespace Fantasy
}
public override void Dispose()
{
ItemId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_UseItemRequest>(this);
#endif
@@ -94,6 +95,8 @@ namespace Fantasy
public uint OpCode() { return OuterOpcode.C2Game_UseItemRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public long ItemId { get; set; }
}
/// <summary>
/// 请求使用物品响应
@@ -509,5 +512,57 @@ namespace Fantasy
[ProtoMember(1)]
public List<AwardInfo> Awards = new List<AwardInfo>();
}
/// <summary>
/// /////////// ******** GM *******/////////////
/// </summary>
/// <summary>
/// 请求执行GM
/// </summary>
[ProtoContract]
public partial class C2Game_GMRequest : AMessage, ICustomRouteRequest
{
public static C2Game_GMRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_GMRequest>();
}
public override void Dispose()
{
Cmd = default;
Args = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_GMRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GMResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_GMRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public string Cmd { get; set; }
[ProtoMember(2)]
public string Args { get; set; }
}
/// <summary>
/// 执行GM返回
/// </summary>
[ProtoContract]
public partial class Game2C_GMResponse : AMessage, ICustomRouteResponse
{
public static Game2C_GMResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GMResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GMResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GMResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
}