From 12dc7f22322c2898303dd9e43ed32d20b67f72ea Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Wed, 11 Dec 2024 16:19:34 +0100 Subject: [PATCH] Use actual seed for allied society quests --- Questionable/Functions/AlliedSocietyQuestFunctions.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Questionable/Functions/AlliedSocietyQuestFunctions.cs b/Questionable/Functions/AlliedSocietyQuestFunctions.cs index 4fd70419..af6f5eab 100644 --- a/Questionable/Functions/AlliedSocietyQuestFunctions.cs +++ b/Questionable/Functions/AlliedSocietyQuestFunctions.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.InteropServices; using FFXIVClientStructs.FFXIV.Client.Game; using Microsoft.Extensions.Logging; using Questionable.Data; @@ -45,7 +46,7 @@ internal sealed class AlliedSocietyQuestFunctions return []; bool rankedUp = (rankData & 0x80) != 0; - byte seed = 183; + byte seed = Marshal.ReadByte((nint)QuestManager.Instance() + 0x698); // TODO Use clientstructs List result = []; foreach (NpcData npcData in _questsByAlliedSociety[alliedSociety]) { @@ -56,7 +57,7 @@ internal sealed class AlliedSocietyQuestFunctions else { var quests = CalculateAvailableQuests(npcData.AllQuests, seed, outranksAll, currentRank, rankedUp); - _logger.LogInformation("Available for {Tribe} (Issuer: {IssuerId}: {Quests}", alliedSociety, npcData.IssuerDataId, string.Join(", ", quests)); + _logger.LogInformation("Available for {Tribe} (Seed: {Seed}, Issuer: {IssuerId}): {Quests}", alliedSociety, seed, npcData.IssuerDataId, string.Join(", ", quests)); _dailyQuests[key] = quests; result.AddRange(quests);