地图修改
This commit is contained in:
@@ -76,6 +76,7 @@ namespace Fantasy
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ItemId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_UseItemRequest>(this);
|
||||
#endif
|
||||
@@ -85,6 +86,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>
|
||||
/// 请求使用物品响应
|
||||
@@ -500,5 +503,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; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Fantasy
|
||||
public Map2C_CreateRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Map_CreateRoomRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
}
|
||||
@@ -184,7 +184,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_ChangeMap; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
|
||||
@@ -90,25 +90,31 @@ namespace Fantasy
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Rod = default;
|
||||
Rigs.Clear();
|
||||
Item = default;
|
||||
Binds.Clear();
|
||||
Position = default;
|
||||
Rotation = default;
|
||||
Propertys.Clear();
|
||||
InUse = default;
|
||||
InHand = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<GearInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long Rod { get; set; }
|
||||
public ItemInfo Item { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<long> Rigs = new List<long>();
|
||||
public List<ItemInfo> Binds = new List<ItemInfo>();
|
||||
[ProtoMember(3)]
|
||||
public Vector3Info Position { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public Vector3Info Rotation { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
|
||||
[ProtoMember(6)]
|
||||
public bool InUse { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public bool InHand { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class UnitStateInfo : AMessage
|
||||
|
||||
@@ -29,9 +29,10 @@ namespace Fantasy
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static async FTask<Game2C_UseItemResponse> C2Game_UseItemRequest(this Session session)
|
||||
public static async FTask<Game2C_UseItemResponse> C2Game_UseItemRequest(this Session session, long itemId)
|
||||
{
|
||||
using var request = Fantasy.C2Game_UseItemRequest.Create(session.Scene);
|
||||
request.ItemId = itemId;
|
||||
return (Game2C_UseItemResponse)await session.Call(request);
|
||||
}
|
||||
|
||||
@@ -168,6 +169,21 @@ namespace Fantasy
|
||||
session.Send(message);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static async FTask<Game2C_GMResponse> C2Game_GMRequest(this Session session, C2Game_GMRequest request)
|
||||
{
|
||||
return (Game2C_GMResponse)await session.Call(request);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static async FTask<Game2C_GMResponse> C2Game_GMRequest(this Session session, string cmd, string args)
|
||||
{
|
||||
using var request = Fantasy.C2Game_GMRequest.Create(session.Scene);
|
||||
request.Cmd = cmd;
|
||||
request.Args = args;
|
||||
return (Game2C_GMResponse)await session.Call(request);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static async FTask<Map2C_CreateRoomResponse> C2Map_CreateRoomRequest(this Session session, C2Map_CreateRoomRequest request)
|
||||
{
|
||||
@@ -311,6 +327,21 @@ namespace Fantasy
|
||||
session.Send(message);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static async FTask<Map2C_TakeItemResponse> C2Map_TakeItemRequest(this Session session, C2Map_TakeItemRequest request)
|
||||
{
|
||||
return (Map2C_TakeItemResponse)await session.Call(request);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static async FTask<Map2C_TakeItemResponse> C2Map_TakeItemRequest(this Session session, int id, bool task)
|
||||
{
|
||||
using var request = Fantasy.C2Map_TakeItemRequest.Create(session.Scene);
|
||||
request.Id = id;
|
||||
request.Task = task;
|
||||
return (Map2C_TakeItemResponse)await session.Call(request);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void C2Map_RolePropertyChange(this Session session, C2Map_RolePropertyChange message)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,10 @@ namespace Fantasy
|
||||
public const uint C2Game_BuyRequest = 2281711384;
|
||||
public const uint Game2C_BuyResponse = 2415929112;
|
||||
public const uint Game2C_RewardNotify = 2147493651;
|
||||
public const uint C2Map_CreateRoomRequest = 2281711385;
|
||||
public const uint Map2C_CreateRoomResponse = 2415929113;
|
||||
public const uint C2Game_GMRequest = 2281711385;
|
||||
public const uint Game2C_GMResponse = 2415929113;
|
||||
public const uint C2Map_CreateRoomRequest = 2281711386;
|
||||
public const uint Map2C_CreateRoomResponse = 2415929114;
|
||||
public const uint C2G_ExitRoomRequest = 268445457;
|
||||
public const uint G2C_ExitRoomResponse = 402663185;
|
||||
public const uint C2G_EnterMapRequest = 268445458;
|
||||
@@ -33,10 +35,12 @@ namespace Fantasy
|
||||
public const uint C2G_LoginRequest = 268445460;
|
||||
public const uint G2C_LoginResponse = 402663188;
|
||||
public const uint G2C_RepeatLogin = 134227729;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711386;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929114;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711387;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929115;
|
||||
public const uint Map2C_RoleEnterRoomNotify = 2147493653;
|
||||
public const uint Map2C_RoleExitRoomNotify = 2147493654;
|
||||
public const uint C2Map_TakeItemRequest = 2281711388;
|
||||
public const uint Map2C_TakeItemResponse = 2415929116;
|
||||
public const uint C2Map_RolePropertyChange = 2147493655;
|
||||
public const uint Map2C_RoleStateNotify = 2147493656;
|
||||
public const uint Map2C_RoleGearChangeNotify = 2147493657;
|
||||
@@ -45,37 +49,37 @@ namespace Fantasy
|
||||
public const uint C2Map_Look = 2147493660;
|
||||
public const uint Map2C_MoveNotify = 2147493661;
|
||||
public const uint Map2C_LookeNotify = 2147493662;
|
||||
public const uint C2S_GetConversationsRequest = 2281711387;
|
||||
public const uint S2C_GetConversationsResponse = 2415929115;
|
||||
public const uint C2S_SendMailRequest = 2281711388;
|
||||
public const uint S2C_SendMailResponse = 2415929116;
|
||||
public const uint C2S_DeleteMailRequest = 2281711389;
|
||||
public const uint S2C_DeleteMailResponse = 2415929117;
|
||||
public const uint C2S_GetConversationsRequest = 2281711389;
|
||||
public const uint S2C_GetConversationsResponse = 2415929117;
|
||||
public const uint C2S_SendMailRequest = 2281711390;
|
||||
public const uint S2C_SendMailResponse = 2415929118;
|
||||
public const uint C2S_DeleteMailRequest = 2281711391;
|
||||
public const uint S2C_DeleteMailResponse = 2415929119;
|
||||
public const uint S2C_HaveMail = 2147493663;
|
||||
public const uint S2C_MailState = 2147493664;
|
||||
public const uint C2S_CreateChannelRequest = 2281711390;
|
||||
public const uint S2C_CreateChannelResponse = 2415929118;
|
||||
public const uint C2S_JoinChannelRequest = 2281711391;
|
||||
public const uint S2C_JoinChannelResponse = 2415929119;
|
||||
public const uint C2S_SendMessageRequest = 2281711392;
|
||||
public const uint S2C_SendMessageResponse = 2415929120;
|
||||
public const uint C2S_CreateChannelRequest = 2281711392;
|
||||
public const uint S2C_CreateChannelResponse = 2415929120;
|
||||
public const uint C2S_JoinChannelRequest = 2281711393;
|
||||
public const uint S2C_JoinChannelResponse = 2415929121;
|
||||
public const uint C2S_SendMessageRequest = 2281711394;
|
||||
public const uint S2C_SendMessageResponse = 2415929122;
|
||||
public const uint S2C_Message = 2147493665;
|
||||
public const uint C2S_CreateClubRequest = 2281711393;
|
||||
public const uint S2C_CreateClubResponse = 2415929121;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711394;
|
||||
public const uint S2C_GetClubInfoResponse = 2415929122;
|
||||
public const uint C2S_GetMemberListRequest = 2281711395;
|
||||
public const uint S2C_GetMemberListResponse = 2415929123;
|
||||
public const uint C2S_GetClubListRequest = 2281711396;
|
||||
public const uint S2C_GetClubListResponse = 2415929124;
|
||||
public const uint C2S_JoinClubRequest = 2281711397;
|
||||
public const uint S2C_JoinClubResponse = 2415929125;
|
||||
public const uint C2S_LeaveClubRequest = 2281711398;
|
||||
public const uint S2C_LeaveClubResponse = 2415929126;
|
||||
public const uint C2S_DissolveClubRequest = 2281711399;
|
||||
public const uint S2C_DissolveClubResponse = 2415929127;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711400;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929128;
|
||||
public const uint C2S_CreateClubRequest = 2281711395;
|
||||
public const uint S2C_CreateClubResponse = 2415929123;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711396;
|
||||
public const uint S2C_GetClubInfoResponse = 2415929124;
|
||||
public const uint C2S_GetMemberListRequest = 2281711397;
|
||||
public const uint S2C_GetMemberListResponse = 2415929125;
|
||||
public const uint C2S_GetClubListRequest = 2281711398;
|
||||
public const uint S2C_GetClubListResponse = 2415929126;
|
||||
public const uint C2S_JoinClubRequest = 2281711399;
|
||||
public const uint S2C_JoinClubResponse = 2415929127;
|
||||
public const uint C2S_LeaveClubRequest = 2281711400;
|
||||
public const uint S2C_LeaveClubResponse = 2415929128;
|
||||
public const uint C2S_DissolveClubRequest = 2281711401;
|
||||
public const uint S2C_DissolveClubResponse = 2415929129;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711402;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929130;
|
||||
public const uint S2C_ClubChange = 2147493666;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleEnterRoomNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public MapUnitInfo Info { get; set; }
|
||||
}
|
||||
@@ -51,10 +51,65 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleExitRoomNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求拿起物品
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Map_TakeItemRequest : AMessage, ICustomRouteRequest
|
||||
{
|
||||
public static C2Map_TakeItemRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_TakeItemRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
Task = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_TakeItemRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Map2C_TakeItemResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Map_TakeItemRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public int Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public bool Task { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求拿起物品响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2C_TakeItemResponse : AMessage, ICustomRouteResponse
|
||||
{
|
||||
public static Map2C_TakeItemResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_TakeItemResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Id = default;
|
||||
Task = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_TakeItemResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_TakeItemResponse; }
|
||||
[ProtoMember(1)]
|
||||
public int Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public bool Task { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_RolePropertyChange : AMessage, ICustomRouteMessage
|
||||
{
|
||||
@@ -71,7 +126,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2Map_RolePropertyChange; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
|
||||
}
|
||||
@@ -95,7 +150,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleStateNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
@@ -121,7 +176,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleGearChangeNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
@@ -144,7 +199,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RolePropertyChangeNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
@@ -171,7 +226,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2Map_Move; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public Vector3Info Position { get; set; }
|
||||
[ProtoMember(2)]
|
||||
@@ -202,7 +257,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2Map_Look; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public Vector3Info Rotation { get; set; }
|
||||
[ProtoMember(2)]
|
||||
@@ -233,7 +288,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_MoveNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
@@ -270,7 +325,7 @@ namespace Fantasy
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_LookeNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
|
||||
@@ -6,6 +6,5 @@ namespace Fantasy
|
||||
public const int GateRoute = 1001; // Gate
|
||||
public const int SocialRoute = 1002; // Social
|
||||
public const int GameRoute = 1003; // Game
|
||||
public const int MapRoute = 1004; // 地图
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user