协议修改

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

@@ -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]