ddon-server/Arrowgene.Ddon.GameServer/Handler/EntryBoardEntryBoardListHandler.cs
Paul Campbell 1e0aeaf6b6 feat: Enable 8 person parties and add new quest
- Added the ability to recruit up to 8 members depending on the
  information provided in the quest JSON.
- Added a new EXM "Phindym War Chronicles"
- Added a new shop category to Gregory called "Crimson Exchange"
- Attempted to balance the quest "The Dragon Awakened" for 8 players as
  originally intended.
- Figured out how to decode the board ID back into a proper quest ID.
- Removed board id field from EXM quest JSON.
- Fixed more issues related to random rewards.
2024-09-17 23:57:00 -04:00

47 lines
1.8 KiB
C#

using Arrowgene.Buffers;
using Arrowgene.Ddon.GameServer.Characters;
using Arrowgene.Ddon.GameServer.Dump;
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Server.Network;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Ddon.Shared.Entity.Structure;
using Arrowgene.Ddon.Shared.Network;
using Arrowgene.Logging;
using System.Linq;
namespace Arrowgene.Ddon.GameServer.Handler
{
public class EntryBoardEntryBoardListHandler : GameRequestPacketHandler<C2SEntryBoardEntryBoardListReq, S2CEntryBoardEntryBoardListRes>
{
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(EntryBoardEntryBoardListHandler));
public EntryBoardEntryBoardListHandler(DdonGameServer server) : base(server)
{
}
public override S2CEntryBoardEntryBoardListRes Handle(GameClient client, C2SEntryBoardEntryBoardListReq request)
{
// var result = new S2CEntryBoardEntryBoardListRes.Serializer().Read(GameFull.Dump_709.AsBuffer());
var result = new S2CEntryBoardEntryBoardListRes();
foreach (var boardId in request.BoardIdList.Select(x => x.Value).ToList())
{
var quest = QuestManager.GetQuestByBoardId(boardId);
if (quest != null)
{
var contentParams = new CDataEntryBoardListParam()
{
BoardId = boardId,
SortieMin = (ushort) quest.MissionParams.MinimumMembers,
NoPartyMembers = (ushort) quest.MissionParams.MaximumMembers,
TimeOut = BoardManager.PARTY_BOARD_TIMEOUT,
};
result.EntryList.Add(contentParams);
}
}
return result;
}
}
}