diff --git a/Assets/Scripts/Generate/NetworkProtocol/Account.cs b/Assets/Scripts/Generate/NetworkProtocol/Account.cs new file mode 100644 index 000000000..d077a5435 --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/Account.cs @@ -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 +{ + /// + /// 角色基础信息 + /// + [ProtoContract] + public partial class RoleBaseInfo : AMessage, IProto + { + public static RoleBaseInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + NickName = default; + Head = default; + Country = default; + Level = default; + Exp = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(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(); + } + public override void Dispose() + { + Key = default; + Value = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(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(); + } + public override void Dispose() + { + Key = default; + Value = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(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(); + } + public override void Dispose() + { + Key = default; + Value = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public string Key { get; set; } + [ProtoMember(2)] + public string Value { get; set; } + } + /// + /// 角色信息 + /// + [ProtoContract] + public partial class RoleInfo : AMessage, IProto + { + public static RoleInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + 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(this); +#endif + } + [ProtoMember(1)] + public RoleBaseInfo BaseInfo { get; set; } + [ProtoMember(2)] + public long RoleId { get; set; } + [ProtoMember(3)] + public List Items = new List(); + [ProtoMember(4)] + public List Fishs = new List(); + [ProtoMember(5)] + public List Activities = new List(); + [ProtoMember(6)] + public List Currency = new List(); + [ProtoMember(7)] + public List Slots = new List(); + [ProtoMember(8)] + public List Skills = new List(); + } + /// + /// VIP信息 + /// + [ProtoContract] + public partial class VipInfo : AMessage, IProto + { + public static VipInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + OpenTime = default; + ExpirationTime = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public long OpenTime { get; set; } + [ProtoMember(2)] + public long ExpirationTime { get; set; } + } + /// + /// 奖励信息 + /// + [ProtoContract] + public partial class AwardInfo : AMessage, IProto + { + public static AwardInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + ConfigId = default; + Count = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public long ConfigId { get; set; } + [ProtoMember(2)] + public int Count { get; set; } + } + /// + /// 物品信息 + /// + [ProtoContract] + public partial class ItemInfo : AMessage, IProto + { + public static ItemInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + ConfigId = default; + Id = default; + Count = default; + ExpirationTime = default; + GetTime = default; + Abrasion = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(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; } + } + /// + /// fish信息 + /// + [ProtoContract] + public partial class FishInfo : AMessage, IProto + { + public static FishInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + ConfigId = default; + Id = default; + Weight = default; + GetTime = default; + ExpirationTime = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(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(); + } + public override void Dispose() + { + Id = default; + StartTime = default; + EndTime = default; + Data.Clear(); +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(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 Data = new List(); + } + /// + /// 技能情况 + /// + [ProtoContract] + public partial class SkillInfo : AMessage, IProto + { + public static SkillInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + public override void Dispose() + { + ConfigId = default; + Level = default; + Exp = default; +#if FANTASY_NET || FANTASY_UNITY + GetScene().MessagePoolComponent.Return(this); +#endif + } + [ProtoMember(1)] + public int ConfigId { get; set; } + [ProtoMember(2)] + public int Level { get; set; } + [ProtoMember(3)] + public int Exp { get; set; } + } +} diff --git a/Assets/Scripts/Generate/NetworkProtocol/Account.cs.meta b/Assets/Scripts/Generate/NetworkProtocol/Account.cs.meta new file mode 100644 index 000000000..894c30f45 --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/Account.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7c8232cfd90c0ea448f6ef652ac62da8 \ No newline at end of file diff --git a/Assets/Scripts/Generate/NetworkProtocol/Friend.cs b/Assets/Scripts/Generate/NetworkProtocol/Friend.cs new file mode 100644 index 000000000..5bcf16ec8 --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/Friend.cs @@ -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 +{ + /// + /// 好友信息 + /// + [ProtoContract] + public partial class FriendInfo : AMessage, IProto + { + public static FriendInfo Create(Scene scene) + { + return scene.MessagePoolComponent.Rent(); + } + 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(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; } + } +} diff --git a/Assets/Scripts/Generate/NetworkProtocol/Friend.cs.meta b/Assets/Scripts/Generate/NetworkProtocol/Friend.cs.meta new file mode 100644 index 000000000..9f41c24e7 --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/Friend.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 91a34da383344484da036f295b87a0ce \ No newline at end of file diff --git a/Assets/Scripts/Generate/NetworkProtocol/GlobalData.cs b/Assets/Scripts/Generate/NetworkProtocol/GlobalData.cs new file mode 100644 index 000000000..b63f5ca3c --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/GlobalData.cs @@ -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 +{ +} diff --git a/Assets/Scripts/Generate/NetworkProtocol/GlobalData.cs.meta b/Assets/Scripts/Generate/NetworkProtocol/GlobalData.cs.meta new file mode 100644 index 000000000..01b1d43b3 --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/GlobalData.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: b61d5cfc0ac85da449949bc871ec9f52 \ No newline at end of file diff --git a/Assets/Scripts/Generate/NetworkProtocol/Mail.cs b/Assets/Scripts/Generate/NetworkProtocol/Mail.cs new file mode 100644 index 000000000..5c4a27de7 --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/Mail.cs @@ -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(); + } + 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(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 Items = new List(); + [ProtoMember(7)] + public bool IsRead { get; set; } + } +} diff --git a/Assets/Scripts/Generate/NetworkProtocol/Mail.cs.meta b/Assets/Scripts/Generate/NetworkProtocol/Mail.cs.meta new file mode 100644 index 000000000..67bfb5e0a --- /dev/null +++ b/Assets/Scripts/Generate/NetworkProtocol/Mail.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f01d74f516b672a489dd45e5fa448ad7 \ No newline at end of file diff --git a/Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs b/Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs deleted file mode 100644 index d651bc0d2..000000000 --- a/Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs +++ /dev/null @@ -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 -{ - /// - /// GameAccount实体类 - /// - [ProtoContract] - public partial class RoleBaseInfo : AMessage, IProto - { - public static RoleBaseInfo Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - NickName = default; - Head = default; - Country = default; - Level = default; - Exp = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(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 RoleInfo : AMessage, IProto - { - public static RoleInfo Create(Scene scene) - { - return scene.MessagePoolComponent.Rent(); - } - public override void Dispose() - { - BaseInfo = default; - RoleId = default; -#if FANTASY_NET || FANTASY_UNITY - GetScene().MessagePoolComponent.Return(this); -#endif - } - [ProtoMember(1)] - public RoleBaseInfo BaseInfo { get; set; } - [ProtoMember(2)] - public long RoleId { get; set; } - } -} diff --git a/Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs.meta b/Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs.meta deleted file mode 100644 index 393559e17..000000000 --- a/Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 5a7e198038cdd4e4d927a062fefa83d8 \ No newline at end of file