属性控制

This commit is contained in:
2025-09-14 16:26:41 +08:00
parent 57d360f922
commit 3c022ff4b6
43 changed files with 343 additions and 340 deletions

View File

@@ -48,46 +48,6 @@ namespace NBC
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)
@@ -103,30 +63,10 @@ namespace NBC
#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>
@@ -349,7 +289,7 @@ namespace NBC
[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

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

View File

@@ -92,11 +92,9 @@ namespace NBC
{
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
@@ -106,15 +104,11 @@ namespace NBC
[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
@@ -126,7 +120,7 @@ namespace NBC
public override void Dispose()
{
State = default;
Args.Clear();
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
#endif
@@ -134,7 +128,7 @@ namespace NBC
[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
@@ -169,6 +163,6 @@ namespace NBC
[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

@@ -55,6 +55,26 @@ namespace NBC
[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>
@@ -116,6 +136,7 @@ namespace NBC
}
public override void Dispose()
{
Id = default;
Propertys.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2C_RolePropertyChangeNotify>(this);
@@ -125,7 +146,9 @@ namespace NBC
[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