yae openworld but dialogs aren't triggered

This commit is contained in:
rafi1212122
2023-06-12 20:06:26 +07:00
parent f9e0aa8e1f
commit bfe8347610
26 changed files with 537 additions and 12 deletions

View File

@@ -0,0 +1,20 @@
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));
}
}
}