新定义

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,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; }
}
}