-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathEventCodeInputHandler.cs
More file actions
37 lines (31 loc) · 1.3 KB
/
Copy pathEventCodeInputHandler.cs
File metadata and controls
37 lines (31 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Ddon.Shared.Model;
using Arrowgene.Logging;
namespace Arrowgene.Ddon.GameServer.Handler
{
public class EventCodeInputHandler : GameRequestPacketHandler<C2SEventCodeInputReq, S2CEventCodeInputRes>
{
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(EventCodeInputHandler));
public EventCodeInputHandler(DdonGameServer server) : base(server)
{
}
public override S2CEventCodeInputRes Handle(GameClient client, C2SEventCodeInputReq request)
{
S2CEventCodeInputRes res = new S2CEventCodeInputRes();
// TODO: based on event code figure out which items should be sent
// https://h1g.jp/dd-on/?%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E3%82%B3%E3%83%BC%E3%83%89
// https://dengekionline.com/elem/000/001/138/1138291/
if (request.Code == "UPCT-YUAW-3K16-8255")
{
res.Name = "Silver Tickets and Trial Support Boat Course";
}
else
{
throw new ResponseErrorException(ErrorCode.ERROR_CODE_EVENT_CODE_INPUT_LOCK);
}
// TODO: send mail with items
return res;
}
}
}