新定义

This commit is contained in:
bob
2025-07-30 20:35:46 +08:00
parent 78b647e1bb
commit 246ab02390
10 changed files with 427 additions and 69 deletions

View File

@@ -0,0 +1,310 @@
using ProtoBuf;
using System.Collections.Generic;
using Fantasy;
using NBC;
using NBC.Network.Interface;
using NBC.Serialize;
#pragma warning disable CS8618
namespace NBC
{
/// <summary>
/// 角色基础信息
/// </summary>
[ProtoContract]
public partial class RoleBaseInfo : AMessage, IProto
{
public static RoleBaseInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<RoleBaseInfo>();
}
public override void Dispose()
{
NickName = default;
Head = default;
Country = default;
Level = default;
Exp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleBaseInfo>(this);
#endif
}
[ProtoMember(1)]
public string NickName { get; set; }
[ProtoMember(2)]
public string Head { get; set; }
[ProtoMember(3)]
public string Country { get; set; }
[ProtoMember(4)]
public int Level { get; set; }
[ProtoMember(5)]
public int Exp { 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 KeyValueInt64 : AMessage, IProto
{
public static KeyValueInt64 Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<KeyValueInt64>();
}
public override void Dispose()
{
Key = default;
Value = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<KeyValueInt64>(this);
#endif
}
[ProtoMember(1)]
public long 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>
[ProtoContract]
public partial class RoleInfo : AMessage, IProto
{
public static RoleInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<RoleInfo>();
}
public override void Dispose()
{
BaseInfo = default;
RoleId = default;
Items.Clear();
Fishs.Clear();
Activities.Clear();
Currency.Clear();
Slots.Clear();
Skills.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleInfo>(this);
#endif
}
[ProtoMember(1)]
public RoleBaseInfo BaseInfo { get; set; }
[ProtoMember(2)]
public long RoleId { get; set; }
[ProtoMember(3)]
public List<ItemInfo> Items = new List<ItemInfo>();
[ProtoMember(4)]
public List<FishInfo> Fishs = new List<FishInfo>();
[ProtoMember(5)]
public List<ActivityInfo> Activities = new List<ActivityInfo>();
[ProtoMember(6)]
public List<KeyValueInt64> Currency = new List<KeyValueInt64>();
[ProtoMember(7)]
public List<KeyValueInt64> Slots = new List<KeyValueInt64>();
[ProtoMember(8)]
public List<SkillInfo> Skills = new List<SkillInfo>();
}
/// <summary>
/// VIP信息
/// </summary>
[ProtoContract]
public partial class VipInfo : AMessage, IProto
{
public static VipInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<VipInfo>();
}
public override void Dispose()
{
OpenTime = default;
ExpirationTime = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<VipInfo>(this);
#endif
}
[ProtoMember(1)]
public long OpenTime { get; set; }
[ProtoMember(2)]
public long ExpirationTime { get; set; }
}
/// <summary>
/// 奖励信息
/// </summary>
[ProtoContract]
public partial class AwardInfo : AMessage, IProto
{
public static AwardInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<AwardInfo>();
}
public override void Dispose()
{
ConfigId = default;
Count = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<AwardInfo>(this);
#endif
}
[ProtoMember(1)]
public long ConfigId { get; set; }
[ProtoMember(2)]
public int Count { get; set; }
}
/// <summary>
/// 物品信息
/// </summary>
[ProtoContract]
public partial class ItemInfo : AMessage, IProto
{
public static ItemInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ItemInfo>();
}
public override void Dispose()
{
ConfigId = default;
Id = default;
Count = default;
ExpirationTime = default;
GetTime = default;
Abrasion = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ItemInfo>(this);
#endif
}
[ProtoMember(1)]
public int ConfigId { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
[ProtoMember(3)]
public int Count { get; set; }
[ProtoMember(4)]
public long ExpirationTime { get; set; }
[ProtoMember(5)]
public long GetTime { get; set; }
[ProtoMember(6)]
public long Abrasion { get; set; }
}
/// <summary>
/// fish信息
/// </summary>
[ProtoContract]
public partial class FishInfo : AMessage, IProto
{
public static FishInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<FishInfo>();
}
public override void Dispose()
{
ConfigId = default;
Id = default;
Weight = default;
GetTime = default;
ExpirationTime = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<FishInfo>(this);
#endif
}
[ProtoMember(1)]
public int ConfigId { get; set; }
[ProtoMember(2)]
public long Id { get; set; }
[ProtoMember(3)]
public int Weight { get; set; }
[ProtoMember(4)]
public long GetTime { get; set; }
[ProtoMember(5)]
public long ExpirationTime { get; set; }
}
[ProtoContract]
public partial class ActivityInfo : AMessage, IProto
{
public static ActivityInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<ActivityInfo>();
}
public override void Dispose()
{
Id = default;
StartTime = default;
EndTime = default;
Data.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<ActivityInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public long StartTime { get; set; }
[ProtoMember(3)]
public long EndTime { get; set; }
[ProtoMember(4)]
public List<KeyValueStringInt64> Data = new List<KeyValueStringInt64>();
}
/// <summary>
/// 技能情况
/// </summary>
[ProtoContract]
public partial class SkillInfo : AMessage, IProto
{
public static SkillInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<SkillInfo>();
}
public override void Dispose()
{
ConfigId = default;
Level = default;
Exp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<SkillInfo>(this);
#endif
}
[ProtoMember(1)]
public int ConfigId { get; set; }
[ProtoMember(2)]
public int Level { get; set; }
[ProtoMember(3)]
public int Exp { get; set; }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7c8232cfd90c0ea448f6ef652ac62da8

View File

@@ -0,0 +1,50 @@
using ProtoBuf;
using System.Collections.Generic;
using Fantasy;
using NBC;
using NBC.Network.Interface;
using NBC.Serialize;
#pragma warning disable CS8618
namespace NBC
{
/// <summary>
/// 好友信息
/// </summary>
[ProtoContract]
public partial class FriendInfo : AMessage, IProto
{
public static FriendInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<FriendInfo>();
}
public override void Dispose()
{
Id = default;
AddTime = default;
NickName = default;
Head = default;
Level = default;
Country = default;
OnlineStatus = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<FriendInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public long AddTime { get; set; }
[ProtoMember(3)]
public string NickName { get; set; }
[ProtoMember(4)]
public string Head { get; set; }
[ProtoMember(5)]
public int Level { get; set; }
[ProtoMember(6)]
public string Country { get; set; }
[ProtoMember(7)]
public int OnlineStatus { get; set; }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 91a34da383344484da036f295b87a0ce

View File

@@ -0,0 +1,12 @@
using ProtoBuf;
using System.Collections.Generic;
using Fantasy;
using NBC;
using NBC.Network.Interface;
using NBC.Serialize;
#pragma warning disable CS8618
namespace NBC
{
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b61d5cfc0ac85da449949bc871ec9f52

View File

@@ -0,0 +1,47 @@
using ProtoBuf;
using System.Collections.Generic;
using Fantasy;
using NBC;
using NBC.Network.Interface;
using NBC.Serialize;
#pragma warning disable CS8618
namespace NBC
{
[ProtoContract]
public partial class MailInfo : AMessage, IProto
{
public static MailInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<MailInfo>();
}
public override void Dispose()
{
Id = default;
Title = default;
Content = default;
SendTime = default;
Type = default;
Items.Clear();
IsRead = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<MailInfo>(this);
#endif
}
[ProtoMember(1)]
public long Id { get; set; }
[ProtoMember(2)]
public string Title { get; set; }
[ProtoMember(3)]
public string Content { get; set; }
[ProtoMember(4)]
public long SendTime { get; set; }
[ProtoMember(5)]
public int Type { get; set; }
[ProtoMember(6)]
public List<AwardInfo> Items = new List<AwardInfo>();
[ProtoMember(7)]
public bool IsRead { get; set; }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f01d74f516b672a489dd45e5fa448ad7

View File

@@ -1,67 +0,0 @@
using ProtoBuf;
using System.Collections.Generic;
using Fantasy;
using NBC;
using NBC.Network.Interface;
using NBC.Serialize;
#pragma warning disable CS8618
namespace NBC
{
/// <summary>
/// GameAccount实体类
/// </summary>
[ProtoContract]
public partial class RoleBaseInfo : AMessage, IProto
{
public static RoleBaseInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<RoleBaseInfo>();
}
public override void Dispose()
{
NickName = default;
Head = default;
Country = default;
Level = default;
Exp = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleBaseInfo>(this);
#endif
}
[ProtoMember(1)]
public string NickName { get; set; }
[ProtoMember(2)]
public string Head { get; set; }
[ProtoMember(3)]
public string Country { get; set; }
[ProtoMember(4)]
public int Level { get; set; }
[ProtoMember(5)]
public int Exp { get; set; }
}
/// <summary>
/// 角色信息
/// </summary>
[ProtoContract]
public partial class RoleInfo : AMessage, IProto
{
public static RoleInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<RoleInfo>();
}
public override void Dispose()
{
BaseInfo = default;
RoleId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<RoleInfo>(this);
#endif
}
[ProtoMember(1)]
public RoleBaseInfo BaseInfo { get; set; }
[ProtoMember(2)]
public long RoleId { get; set; }
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 5a7e198038cdd4e4d927a062fefa83d8