新增逻辑
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user