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,25 @@
using Common.Database;
using Common.Resources.Proto;
namespace PemukulPaku.GameServer.Handlers.Openworld
{
[PacketCmdId(CmdId.ReportOpenworldSpawnPointReq)]
internal class ReportOpenworldSpawnPointReqHandler : IPacketHandler
{
public void Handle(Session session, Packet packet)
{
ReportOpenworldSpawnPointReq Data = packet.GetDecodedBody<ReportOpenworldSpawnPointReq>();
ReportOpenworldSpawnPointRsp Rsp = new()
{
retcode = ReportOpenworldSpawnPointRsp.Retcode.Succ,
MapId = Data.MapId,
PointInfo = Data.PointInfo
};
OpenWorldScheme? OpenWorldData = session.Player.OpenWorlds.FirstOrDefault(x => x.MapId == Data.MapId);
if (OpenWorldData is not null)
OpenWorldData.SpawnPoint = Data.PointInfo;
session.Send(Packet.FromProto(Rsp, CmdId.ReportOpenworldSpawnPointRsp));
}
}
}