hardcoded disclamer mail

This commit is contained in:
rfi 2023-11-19 14:44:27 +07:00
parent 5847d32c51
commit 0705c4373f
3 changed files with 58 additions and 3 deletions

View File

@ -2768,9 +2768,9 @@ namespace AscNet.Common.MsgPack
public string SendName { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public uint CreateTime { get; set; }
public uint SendTime { get; set; }
public uint ExpireTime { get; set; }
public long CreateTime { get; set; }
public long SendTime { get; set; }
public long ExpireTime { get; set; }
[MessagePack.MessagePackObject(true)]
public class NotifyMailsNewMailListRewardGoodsList
{

View File

@ -175,6 +175,30 @@ namespace AscNet.GameServer.Handlers
session.SendPush(notifyAssistData);
session.SendPush(notifyChatLoginData);
#region DisclamerMail
NotifyMails notifyMails = new();
notifyMails.NewMailList.Add(new NotifyMails.NotifyMailsNewMailList()
{
Id = "0",
Status = 0, // MAIL_STATUS_UNREAD
SendName = "AscNet Developers",
Title = "[IMPORTANT] Important Info Regarding This Server Software",
Content = @"Hello Commandant!
Welcome to AscNet, we are happy that you are using this Server Software.
This Server Software is always free and if you are paying to gain access to this you are being SCAMMED, we encourage you to help prevent another buyer like you by making a PSA or telling others whom you may see as potential users.
Sorry for the inconvinience.
AscNet使
使
便",
CreateTime = ((DateTimeOffset)Process.GetCurrentProcess().StartTime).ToUnixTimeSeconds(),
SendTime = ((DateTimeOffset)Process.GetCurrentProcess().StartTime).ToUnixTimeSeconds(),
ExpireTime = DateTimeOffset.Now.ToUnixTimeSeconds() * 2,
IsForbidDelete = true
});
session.SendPush(notifyMails);
#endregion
// NEEDED to not softlock!
session.SendPush(new NotifyFubenPrequelData() { FubenPrequelData = new() });
session.SendPush(new NotifyPrequelChallengeRefreshTime() { NextRefreshTime = (uint)DateTimeOffset.Now.ToUnixTimeSeconds() + 3600 * 24 });

View File

@ -0,0 +1,31 @@
using AscNet.Common.MsgPack;
using MessagePack;
namespace AscNet.GameServer.Handlers
{
#region MsgPackScheme
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
[MessagePackObject(true)]
public class MailReadResponse
{
public int Code;
}
[MessagePackObject(true)]
public class MailReadRequest
{
public string Id;
}
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
#endregion
internal class MailModule
{
[RequestPacketHandler("MailReadRequest")]
public static void MailReadRequestHandler(Session session, Packet.Request packet)
{
session.SendResponse(new MailReadResponse(), packet.Id);
}
}
}