ddon-server/Arrowgene.Ddon.GameServer/Handler/MailSystemMailGetListHeadHandler.cs
Ryan Yappert 0e865d30cf
Feature: Communication Features (#983)
* Adds packet structures, handlers, and server support for Player Mail, Blacklists, Group Chats and Message Sets.
Implements rudimentary GM features via chat command.
Adds support for IP Bans and muted players.
Simplifies how login stamps are handled.
Cleans up and modernizes some old packet handlers.

* Rebase. Fix CommandRoute and AccountRoute. Cleanup and response to PR comments. Rearrange some of the schedule_next stuff in the DB creation schema for clarity.
2026-04-18 01:27:57 -07:00

24 lines
921 B
C#

using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Logging;
namespace Arrowgene.Ddon.GameServer.Handler
{
public class MailSystemMailGetListHeadHandler : GameRequestPacketHandler<C2SMailSystemMailGetListHeadReq, S2CMailSystemMailGetListHeadRes>
{
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(MailSystemMailGetListHeadHandler));
public MailSystemMailGetListHeadHandler(DdonGameServer server) : base(server)
{
}
public override S2CMailSystemMailGetListHeadRes Handle(GameClient client, C2SMailSystemMailGetListHeadReq request)
{
var messages = Server.Database.SelectSystemMailMessages(client.Character.CharacterId);
return new S2CMailSystemMailGetListHeadRes()
{
Num = (uint) messages.Count,
};
}
}
}