提交示例代码
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Fantasy.Async;
|
||||
using Fantasy.DataStructure.Collection;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
namespace Fantasy;
|
||||
|
||||
public class C2Mail_TestRequestHandler : RouteRPC<MailUnit, C2Mail_TestRequest, Mail2C_TestResponse>
|
||||
{
|
||||
protected override async FTask Run(MailUnit mailUnit, C2Mail_TestRequest request, Mail2C_TestResponse response, Action reply)
|
||||
{
|
||||
Log.Debug($"这是一个测试的自定义消息协议 Tag:{mailUnit.Name}");
|
||||
response.Tag = "666";
|
||||
// using var accountId = ListPool<long>.Create(65491190472245249);
|
||||
var mail = MailFactory.Create(mailUnit.Scene, MailType.System, "测试所有人指定日期玩家邮件", "测试所有人指定日期玩家邮件内容", 9991);
|
||||
var mailBox = MailBoxFactory.Create(mailUnit.Scene, MailBoxType.AllToDate, mailUnit.AccountId, mail,
|
||||
1000 * 60 * 60);
|
||||
await MailHelper.Send(mailUnit.Scene, mailBox);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user