新定义
This commit is contained in:
318
Entity/Generate/NetworkProtocol/Account.cs
Normal file
318
Entity/Generate/NetworkProtocol/Account.cs
Normal file
@@ -0,0 +1,318 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Fantasy;
|
||||
using Fantasy.Network.Interface;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable RedundantUsingDirective
|
||||
// ReSharper disable RedundantOverriddenMember
|
||||
// ReSharper disable PartialTypeWithSinglePart
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable CheckNamespace
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
/// <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; }
|
||||
}
|
||||
}
|
||||
@@ -18,58 +18,41 @@ using Fantasy.Serialize;
|
||||
namespace Fantasy
|
||||
{
|
||||
/// <summary>
|
||||
/// GameAccount实体类
|
||||
/// 好友信息
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class RoleBaseInfo : AMessage, IProto
|
||||
public partial class FriendInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleBaseInfo Create(Scene scene)
|
||||
public static FriendInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleBaseInfo>();
|
||||
return scene.MessagePoolComponent.Rent<FriendInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
AddTime = default;
|
||||
NickName = default;
|
||||
Head = default;
|
||||
Country = default;
|
||||
Level = default;
|
||||
Exp = default;
|
||||
Country = default;
|
||||
OnlineStatus = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleBaseInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<FriendInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public string NickName { get; set; }
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string Head { get; set; }
|
||||
public long AddTime { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public string Country { get; set; }
|
||||
public string NickName { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public int Level { get; set; }
|
||||
public string Head { 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; }
|
||||
public int Level { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public string Country { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public int OnlineStatus { get; set; }
|
||||
}
|
||||
}
|
||||
20
Entity/Generate/NetworkProtocol/GlobalData.cs
Normal file
20
Entity/Generate/NetworkProtocol/GlobalData.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Fantasy;
|
||||
using Fantasy.Network.Interface;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable RedundantUsingDirective
|
||||
// ReSharper disable RedundantOverriddenMember
|
||||
// ReSharper disable PartialTypeWithSinglePart
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable CheckNamespace
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
}
|
||||
55
Entity/Generate/NetworkProtocol/Mail.cs
Normal file
55
Entity/Generate/NetworkProtocol/Mail.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Fantasy;
|
||||
using Fantasy.Network.Interface;
|
||||
using Fantasy.Serialize;
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable RedundantUsingDirective
|
||||
// ReSharper disable RedundantOverriddenMember
|
||||
// ReSharper disable PartialTypeWithSinglePart
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable CheckNamespace
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user