mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-13 10:24:34 +01:00
21 lines
935 B
C#
21 lines
935 B
C#
using Common.Database;
|
|
using Common.Resources.Proto;
|
|
|
|
namespace PemukulPaku.GameServer.Handlers.Openworld
|
|
{
|
|
[PacketCmdId(CmdId.TakeOpenworldStoryRewardReq)]
|
|
internal class TakeOpenworldStoryRewardReqHandler : IPacketHandler
|
|
{
|
|
public void Handle(Session session, Packet packet)
|
|
{
|
|
TakeOpenworldStoryRewardReq Data = packet.GetDecodedBody<TakeOpenworldStoryRewardReq>();
|
|
UserScheme.OpenWorldStoryScheme? ow = session.Player.User.OpenWorldStory.FirstOrDefault(x => x.StoryId == Data.StoryId);
|
|
if (ow is not null)
|
|
ow.IsDone = true;
|
|
|
|
session.Send(Packet.FromProto(new TakeOpenworldStoryRewardRsp() { retcode = TakeOpenworldStoryRewardRsp.Retcode.Succ, StoryId = Data.StoryId }, CmdId.TakeOpenworldStoryRewardRsp));
|
|
session.ProcessPacket(Packet.FromProto(new GetOpenworldStoryReq() { }, CmdId.GetOpenworldStoryReq));
|
|
}
|
|
}
|
|
}
|