mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-16 07:34:37 +01:00
yae openworld but dialogs aren't triggered
This commit is contained in:
37
GameServer/Handlers/Openworld/GetNewOpenworldReqHandler.cs
Normal file
37
GameServer/Handlers/Openworld/GetNewOpenworldReqHandler.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Common;
|
||||
using Common.Database;
|
||||
using Common.Resources.Proto;
|
||||
|
||||
namespace PemukulPaku.GameServer.Handlers.Openworld
|
||||
{
|
||||
[PacketCmdId(CmdId.GetNewOpenworldReq)]
|
||||
internal class GetNewOpenworldReqHandler : IPacketHandler
|
||||
{
|
||||
public void Handle(Session session, Packet packet)
|
||||
{
|
||||
GetNewOpenworldRsp Rsp = new()
|
||||
{
|
||||
retcode = GetNewOpenworldRsp.Retcode.Succ,
|
||||
DataType = OpenworldDataType.OpenworldDataAll,
|
||||
QuestLevel = 1,
|
||||
QuestStar = 0,
|
||||
MaxQuestLevel = 1,
|
||||
NextRefreshTime = (uint)Global.GetUnixInSeconds() + 3600 * 24 * 3,
|
||||
CloseTime = (uint)Global.GetUnixInSeconds() + 3600 * 24 * 3,
|
||||
GlobalRandomSeed = Global.GetRandomSeed()
|
||||
};
|
||||
Rsp.Techs.AddRange(OpenWorld.ShowMapList.Select(x => new OpenworldTechData() { MapId = x }));
|
||||
Rsp.MapLists.AddRange(session.Player.OpenWorlds.Select(ow => new OpenworldMapBriefData() {
|
||||
MapId = ow.MapId,
|
||||
Status = 3,
|
||||
Cycle = ow.Cycle,
|
||||
QuestLevel = ow.QuestLevel,
|
||||
HasTakeFinishRewardCycle = ow.HasTakeFinishRewardCycle
|
||||
}));
|
||||
|
||||
session.Send(Packet.FromProto(Rsp, CmdId.GetNewOpenworldRsp));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user