协议修改

This commit is contained in:
2025-09-25 23:22:07 +08:00
parent ddffaac7b3
commit 5218bc7585
16 changed files with 159 additions and 125 deletions

View File

@@ -56,46 +56,6 @@ namespace Fantasy
public VipInfo VipInfo { get; set; }
}
[ProtoContract]
public partial class KeyValueStringInt64 : AMessage, IProto
{
public static KeyValueStringInt64 Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<KeyValueStringInt64>();
}
public override void Dispose()
{
Key = default;
Value = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<KeyValueStringInt64>(this);
#endif
}
[ProtoMember(1)]
public string Key { get; set; }
[ProtoMember(2)]
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)
@@ -111,30 +71,10 @@ namespace Fantasy
#endif
}
[ProtoMember(1)]
public long Key { get; set; }
public int Key { get; set; }
[ProtoMember(2)]
public long Value { get; set; }
}
[ProtoContract]
public partial class KeyValueString : AMessage, IProto
{
public static KeyValueString Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<KeyValueString>();
}
public override void Dispose()
{
Key = default;
Value = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<KeyValueString>(this);
#endif
}
[ProtoMember(1)]
public string Key { get; set; }
[ProtoMember(2)]
public string Value { get; set; }
}
/// <summary>
/// 角色信息
/// </summary>
@@ -357,7 +297,7 @@ namespace Fantasy
[ProtoMember(3)]
public long EndTime { get; set; }
[ProtoMember(4)]
public List<KeyValueStringInt64> Data = new List<KeyValueStringInt64>();
public List<KeyValueInt64> Data = new List<KeyValueInt64>();
}
/// <summary>
/// 技能情况

View File

@@ -70,7 +70,7 @@ namespace Fantasy
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求网关离开房间
/// 请求网关离开房间(离开房间,但是不离开地图)
/// </summary>
[ProtoContract]
public partial class C2G_ExitRoomRequest : AMessage, IRequest, IProto

View File

@@ -100,11 +100,9 @@ namespace Fantasy
{
Rod = default;
Rigs.Clear();
LineLength = default;
ReelSpeed = default;
State = default;
Position = default;
Rotation = default;
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<GearInfo>(this);
#endif
@@ -114,15 +112,11 @@ namespace Fantasy
[ProtoMember(2)]
public List<long> Rigs = new List<long>();
[ProtoMember(3)]
public float LineLength { get; set; }
[ProtoMember(4)]
public float ReelSpeed { get; set; }
[ProtoMember(5)]
public int State { get; set; }
[ProtoMember(6)]
public Vector3Info Position { get; set; }
[ProtoMember(7)]
[ProtoMember(4)]
public Vector3Info Rotation { get; set; }
[ProtoMember(5)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
[ProtoContract]
public partial class UnitStateInfo : AMessage, IProto
@@ -134,7 +128,7 @@ namespace Fantasy
public override void Dispose()
{
State = default;
Args.Clear();
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
#endif
@@ -142,7 +136,7 @@ namespace Fantasy
[ProtoMember(1)]
public int State { get; set; }
[ProtoMember(2)]
public List<string> Args = new List<string>();
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
[ProtoContract]
public partial class MapUnitInfo : AMessage, IProto
@@ -177,6 +171,6 @@ namespace Fantasy
[ProtoMember(6)]
public List<GearInfo> Gears = new List<GearInfo>();
[ProtoMember(7)]
public List<KeyValueInt32> Propertys = new List<KeyValueInt32>();
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
}

View File

@@ -18,28 +18,29 @@ namespace Fantasy
public const uint Game2C_GetRoleInfoResponse = 2415929106;
public const uint Map2C_RoleEnterRoomNotify = 2147493650;
public const uint Map2C_RoleExitRoomNotify = 2147493651;
public const uint Map2C_RoleStateNotify = 2147493652;
public const uint Map2C_RoleGearChangeNotify = 2147493653;
public const uint Map2C_RolePropertyChangeNotify = 2147493654;
public const uint C2Map_Move = 2147493655;
public const uint C2Map_Look = 2147493656;
public const uint Map2C_MoveNotify = 2147493657;
public const uint Map2C_LookeNotify = 2147493658;
public const uint C2Map_RolePropertyChange = 2147493652;
public const uint Map2C_RoleStateNotify = 2147493653;
public const uint Map2C_RoleGearChangeNotify = 2147493654;
public const uint Map2C_RolePropertyChangeNotify = 2147493655;
public const uint C2Map_Move = 2147493656;
public const uint C2Map_Look = 2147493657;
public const uint Map2C_MoveNotify = 2147493658;
public const uint Map2C_LookeNotify = 2147493659;
public const uint C2S_GetConversationsRequest = 2281711379;
public const uint S2C_GetConversationsResponse = 2415929107;
public const uint C2S_SendMailRequest = 2281711380;
public const uint S2C_SendMailResponse = 2415929108;
public const uint C2S_DeleteMailRequest = 2281711381;
public const uint S2C_DeleteMailResponse = 2415929109;
public const uint S2C_HaveMail = 2147493659;
public const uint S2C_MailState = 2147493660;
public const uint S2C_HaveMail = 2147493660;
public const uint S2C_MailState = 2147493661;
public const uint C2S_CreateChannelRequest = 2281711382;
public const uint S2C_CreateChannelResponse = 2415929110;
public const uint C2S_JoinChannelRequest = 2281711383;
public const uint S2C_JoinChannelResponse = 2415929111;
public const uint C2S_SendMessageRequest = 2281711384;
public const uint S2C_SendMessageResponse = 2415929112;
public const uint S2C_Message = 2147493661;
public const uint S2C_Message = 2147493662;
public const uint C2S_CreateClubRequest = 2281711385;
public const uint S2C_CreateClubResponse = 2415929113;
public const uint C2S_GetClubInfoRequest = 2281711386;
@@ -56,6 +57,6 @@ namespace Fantasy
public const uint S2C_DissolveClubResponse = 2415929119;
public const uint C2S_DisposeJoinRequest = 2281711392;
public const uint S2C_DisposeJoinResponse = 2415929120;
public const uint S2C_ClubChange = 2147493662;
public const uint S2C_ClubChange = 2147493663;
}
}

View File

@@ -63,6 +63,26 @@ namespace Fantasy
[ProtoMember(1)]
public long Id { get; set; }
}
[ProtoContract]
public partial class C2Map_RolePropertyChange : AMessage, ICustomRouteMessage, IProto
{
public static C2Map_RolePropertyChange Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Map_RolePropertyChange>();
}
public override void Dispose()
{
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_RolePropertyChange>(this);
#endif
}
public uint OpCode() { return OuterOpcode.C2Map_RolePropertyChange; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
/// <summary>
/// 玩家状态变化同步
/// </summary>
@@ -124,6 +144,7 @@ namespace Fantasy
}
public override void Dispose()
{
Id = default;
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RolePropertyChangeNotify>(this);
@@ -133,7 +154,9 @@ namespace Fantasy
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.MapRoute;
[ProtoMember(1)]
public List<KeyValueInt32> Propertys = new List<KeyValueInt32>();
public long Id { get; set; }
[ProtoMember(2)]
public List<KeyValueInt64> Propertys = new List<KeyValueInt64>();
}
[ProtoContract]
public partial class C2Map_Move : AMessage, ICustomRouteMessage, IProto
@@ -148,6 +171,7 @@ namespace Fantasy
Rotation = default;
Direction = default;
IsStop = default;
IsRun = default;
Timestamp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Map_Move>(this);
@@ -165,6 +189,8 @@ namespace Fantasy
[ProtoMember(4)]
public bool IsStop { get; set; }
[ProtoMember(5)]
public bool IsRun { get; set; }
[ProtoMember(6)]
public long Timestamp { get; set; }
}
[ProtoContract]