forked from PGR/ascnet
hardcoded disclamer mail
This commit is contained in:
parent
5847d32c51
commit
0705c4373f
|
@ -2768,9 +2768,9 @@ namespace AscNet.Common.MsgPack
|
||||||
public string SendName { get; set; }
|
public string SendName { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
public uint CreateTime { get; set; }
|
public long CreateTime { get; set; }
|
||||||
public uint SendTime { get; set; }
|
public long SendTime { get; set; }
|
||||||
public uint ExpireTime { get; set; }
|
public long ExpireTime { get; set; }
|
||||||
[MessagePack.MessagePackObject(true)]
|
[MessagePack.MessagePackObject(true)]
|
||||||
public class NotifyMailsNewMailListRewardGoodsList
|
public class NotifyMailsNewMailListRewardGoodsList
|
||||||
{
|
{
|
||||||
|
|
|
@ -175,6 +175,30 @@ namespace AscNet.GameServer.Handlers
|
||||||
session.SendPush(notifyAssistData);
|
session.SendPush(notifyAssistData);
|
||||||
session.SendPush(notifyChatLoginData);
|
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!
|
// NEEDED to not softlock!
|
||||||
session.SendPush(new NotifyFubenPrequelData() { FubenPrequelData = new() });
|
session.SendPush(new NotifyFubenPrequelData() { FubenPrequelData = new() });
|
||||||
session.SendPush(new NotifyPrequelChallengeRefreshTime() { NextRefreshTime = (uint)DateTimeOffset.Now.ToUnixTimeSeconds() + 3600 * 24 });
|
session.SendPush(new NotifyPrequelChallengeRefreshTime() { NextRefreshTime = (uint)DateTimeOffset.Now.ToUnixTimeSeconds() + 3600 * 24 });
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue