地图
This commit is contained in:
@@ -76,6 +76,26 @@ namespace Fantasy
|
||||
public long Value { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class KeyValueInt32 : AMessage, IProto
|
||||
{
|
||||
public static KeyValueInt32 Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<KeyValueInt32>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Key = default;
|
||||
Value = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<KeyValueInt32>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public int Key { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Value { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class KeyValueInt64 : AMessage, IProto
|
||||
{
|
||||
public static KeyValueInt64 Create(Scene scene)
|
||||
|
||||
@@ -18,18 +18,18 @@ using Fantasy.Serialize;
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class RoleGearItemInfo : AMessage, IProto
|
||||
public partial class UnitGearItemInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleGearItemInfo Create(Scene scene)
|
||||
public static UnitGearItemInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleGearItemInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitGearItemInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
ConfigId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleGearItemInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitGearItemInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -38,11 +38,11 @@ namespace Fantasy
|
||||
public int ConfigId { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class RoleGearInfo : AMessage, IProto
|
||||
public partial class UnitGearInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleGearInfo Create(Scene scene)
|
||||
public static UnitGearInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleGearInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitGearInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
@@ -57,29 +57,29 @@ namespace Fantasy
|
||||
Leader = default;
|
||||
Feeder = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleGearInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitGearInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public RoleGearItemInfo Rod { get; set; }
|
||||
public UnitGearItemInfo Rod { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleGearItemInfo Reel { get; set; }
|
||||
public UnitGearItemInfo Reel { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public RoleGearItemInfo Bobber { get; set; }
|
||||
public UnitGearItemInfo Bobber { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public RoleGearItemInfo Hook { get; set; }
|
||||
public UnitGearItemInfo Hook { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public RoleGearItemInfo Bait { get; set; }
|
||||
public UnitGearItemInfo Bait { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public RoleGearItemInfo Lure { get; set; }
|
||||
public UnitGearItemInfo Lure { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public RoleGearItemInfo Weight { get; set; }
|
||||
public UnitGearItemInfo Weight { get; set; }
|
||||
[ProtoMember(8)]
|
||||
public RoleGearItemInfo Line { get; set; }
|
||||
public UnitGearItemInfo Line { get; set; }
|
||||
[ProtoMember(9)]
|
||||
public RoleGearItemInfo Leader { get; set; }
|
||||
public UnitGearItemInfo Leader { get; set; }
|
||||
[ProtoMember(10)]
|
||||
public RoleGearItemInfo Feeder { get; set; }
|
||||
public UnitGearItemInfo Feeder { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Vector3Info : AMessage, IProto
|
||||
@@ -131,11 +131,11 @@ namespace Fantasy
|
||||
public float w { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class RoleFishingInfo : AMessage, IProto
|
||||
public partial class UnitFishingInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleFishingInfo Create(Scene scene)
|
||||
public static UnitFishingInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleFishingInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitFishingInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
@@ -144,7 +144,7 @@ namespace Fantasy
|
||||
OpenLight = default;
|
||||
RodSetting = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleFishingInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitFishingInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -157,18 +157,18 @@ namespace Fantasy
|
||||
public int RodSetting { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class RoleStateInfo : AMessage, IProto
|
||||
public partial class UnitStateInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleStateInfo Create(Scene scene)
|
||||
public static UnitStateInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleStateInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitStateInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
State = default;
|
||||
Args.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleStateInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -177,11 +177,11 @@ namespace Fantasy
|
||||
public List<string> Args = new List<string>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapRoleInfo : AMessage, IProto
|
||||
public partial class MapUnitInfo : AMessage, IProto
|
||||
{
|
||||
public static MapRoleInfo Create(Scene scene)
|
||||
public static MapUnitInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapRoleInfo>();
|
||||
return scene.MessagePoolComponent.Rent<MapUnitInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
@@ -191,8 +191,9 @@ namespace Fantasy
|
||||
State = default;
|
||||
Gears = default;
|
||||
FishingInfo = default;
|
||||
KV.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapRoleInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<MapUnitInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -200,27 +201,29 @@ namespace Fantasy
|
||||
[ProtoMember(2)]
|
||||
public RoleSimpleInfo RoleInfo { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public MapRolePositionInfo Location { get; set; }
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public RoleStateInfo State { get; set; }
|
||||
public UnitStateInfo State { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public RoleGearInfo Gears { get; set; }
|
||||
public UnitGearInfo Gears { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public RoleFishingInfo FishingInfo { get; set; }
|
||||
public UnitFishingInfo FishingInfo { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public List<KeyValueInt32> KV = new List<KeyValueInt32>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapRolePositionInfo : AMessage, IProto
|
||||
public partial class MapUnitPositionInfo : AMessage, IProto
|
||||
{
|
||||
public static MapRolePositionInfo Create(Scene scene)
|
||||
public static MapUnitPositionInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapRolePositionInfo>();
|
||||
return scene.MessagePoolComponent.Rent<MapUnitPositionInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Position = default;
|
||||
Rotation = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapRolePositionInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<MapUnitPositionInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -229,24 +232,52 @@ namespace Fantasy
|
||||
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;
|
||||
Roles.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<MapRoleInfo> Roles = new List<MapRoleInfo>();
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoomId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
@@ -285,14 +316,17 @@ namespace Fantasy
|
||||
{
|
||||
ErrorCode = default;
|
||||
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<MapRoleInfo> Roles = new List<MapRoleInfo>();
|
||||
public List<MapUnitInfo> Roles = new List<MapUnitInfo>();
|
||||
[ProtoMember(2)]
|
||||
public long MapId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
@@ -314,7 +348,7 @@ namespace Fantasy
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public MapRolePositionInfo Location { get; set; }
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public bool IsStop { get; set; }
|
||||
}
|
||||
@@ -339,7 +373,7 @@ namespace Fantasy
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public MapRoleInfo Info { get; set; }
|
||||
public MapUnitInfo Info { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 用户离开地图
|
||||
@@ -388,7 +422,7 @@ namespace Fantasy
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleStateInfo State { get; set; }
|
||||
public UnitStateInfo State { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家钓组状态变化
|
||||
@@ -414,7 +448,7 @@ namespace Fantasy
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleFishingInfo State { get; set; }
|
||||
public UnitFishingInfo State { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家钓组变化
|
||||
@@ -440,7 +474,7 @@ namespace Fantasy
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleGearInfo Gears { get; set; }
|
||||
public UnitGearInfo Gears { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家位置变化
|
||||
@@ -463,6 +497,6 @@ namespace Fantasy
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public MapRolePositionInfo Location { get; set; }
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,9 @@ namespace Fantasy
|
||||
{
|
||||
public static partial class OuterOpcode
|
||||
{
|
||||
public const uint Map2C_CreateMapResponse = 2415929105;
|
||||
public const uint C2Map_EnterMapRequest = 2281711377;
|
||||
public const uint C2Map_CreateRoomRequest = 2281711377;
|
||||
public const uint Map2C_CreateRoomResponse = 2415929105;
|
||||
public const uint C2Map_EnterMapRequest = 2281711378;
|
||||
public const uint Map2C_EnterMapResponse = 2415929106;
|
||||
public const uint C2Map_Move = 2147493649;
|
||||
public const uint Map2C_RoleEnterMapNotify = 2147493650;
|
||||
@@ -16,38 +17,38 @@ namespace Fantasy
|
||||
public const uint C2G_LoginRequest = 268445458;
|
||||
public const uint G2C_LoginResponse = 402663186;
|
||||
public const uint G2C_RepeatLogin = 134227729;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711378;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711379;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929107;
|
||||
public const uint C2S_GetConversationsRequest = 2281711379;
|
||||
public const uint C2S_GetConversationsRequest = 2281711380;
|
||||
public const uint S2C_GetConversationsResponse = 2415929108;
|
||||
public const uint C2S_SendMailRequest = 2281711380;
|
||||
public const uint C2S_SendMailRequest = 2281711381;
|
||||
public const uint S2C_SendMailResponse = 2415929109;
|
||||
public const uint C2S_DeleteMailRequest = 2281711381;
|
||||
public const uint C2S_DeleteMailRequest = 2281711382;
|
||||
public const uint S2C_DeleteMailResponse = 2415929110;
|
||||
public const uint S2C_HaveMail = 2147493655;
|
||||
public const uint S2C_MailState = 2147493656;
|
||||
public const uint C2S_CreateChannelRequest = 2281711382;
|
||||
public const uint C2S_CreateChannelRequest = 2281711383;
|
||||
public const uint S2C_CreateChannelResponse = 2415929111;
|
||||
public const uint C2S_JoinChannelRequest = 2281711383;
|
||||
public const uint C2S_JoinChannelRequest = 2281711384;
|
||||
public const uint S2C_JoinChannelResponse = 2415929112;
|
||||
public const uint C2S_SendMessageRequest = 2281711384;
|
||||
public const uint C2S_SendMessageRequest = 2281711385;
|
||||
public const uint S2C_SendMessageResponse = 2415929113;
|
||||
public const uint S2C_Message = 2147493657;
|
||||
public const uint C2S_CreateClubRequest = 2281711385;
|
||||
public const uint C2S_CreateClubRequest = 2281711386;
|
||||
public const uint S2C_CreateClubResponse = 2415929114;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711386;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711387;
|
||||
public const uint S2C_GetClubInfoResponse = 2415929115;
|
||||
public const uint C2S_GetMemberListRequest = 2281711387;
|
||||
public const uint C2S_GetMemberListRequest = 2281711388;
|
||||
public const uint S2C_GetMemberListResponse = 2415929116;
|
||||
public const uint C2S_GetClubListRequest = 2281711388;
|
||||
public const uint C2S_GetClubListRequest = 2281711389;
|
||||
public const uint S2C_GetClubListResponse = 2415929117;
|
||||
public const uint C2S_JoinClubRequest = 2281711389;
|
||||
public const uint C2S_JoinClubRequest = 2281711390;
|
||||
public const uint S2C_JoinClubResponse = 2415929118;
|
||||
public const uint C2S_LeaveClubRequest = 2281711390;
|
||||
public const uint C2S_LeaveClubRequest = 2281711391;
|
||||
public const uint S2C_LeaveClubResponse = 2415929119;
|
||||
public const uint C2S_DissolveClubRequest = 2281711391;
|
||||
public const uint C2S_DissolveClubRequest = 2281711392;
|
||||
public const uint S2C_DissolveClubResponse = 2415929120;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711392;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711393;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929121;
|
||||
public const uint S2C_ClubChange = 2147493658;
|
||||
}
|
||||
|
||||
@@ -7,5 +7,6 @@ namespace Fantasy
|
||||
public const int SocialRoute = 1002; // Social
|
||||
public const int GameRoute = 1003; // Game
|
||||
public const int MapRoute = 1004; // Map
|
||||
public const int RoomRoute = 1005; // Room
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user