DoWM retainers no longer check if you've gathered an item as MIN/BTN

This commit is contained in:
Liza 2025-01-12 21:37:29 +01:00
parent e8ac90119a
commit 0c07ba4f1e
Signed by: liza
GPG Key ID: 2C41B84815CF6445
6 changed files with 28 additions and 15 deletions

View File

@ -1,6 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
<PropertyGroup>
<Version>6.0</Version>
<Version>6.1</Version>
<OutputPath>dist</OutputPath>
</PropertyGroup>

View File

@ -0,0 +1,10 @@
namespace ARControl.GameData;
public enum EVentureCategoryType
{
None,
MIN,
BTN,
FSH,
DoWM,
}

View File

@ -63,16 +63,16 @@ internal sealed class Venture
public uint RowId { get; }
public ClassJobCategory Category { get; }
public string? CategoryName
public EVentureCategoryType CategoryType
{
get
{
return Category.RowId switch
{
17 => "MIN",
18 => "BTN",
19 => "FSH",
_ => "DoWM",
17 => EVentureCategoryType.MIN,
18 => EVentureCategoryType.BTN,
19 => EVentureCategoryType.FSH,
_ => EVentureCategoryType.DoWM,
};
}
}

View File

@ -26,23 +26,26 @@ internal sealed class VentureResolver
return (null, null);
}
if (venture.CategoryType != EVentureCategoryType.DoWM)
{
var itemToGather = _gameCache.ItemsToGather.FirstOrDefault(x => x.ItemId == itemId);
if (itemToGather != null && !character.GatheredItems.Contains(itemToGather.GatheredItemId))
{
_pluginLog.Information($"Character hasn't gathered {venture.Name} yet");
return (null, null);
}
}
_pluginLog.Debug(
$"Found venture {venture.Name}, row = {venture.RowId}, checking if we have high enough stats");
VentureReward? reward = null;
if (venture.CategoryName is "MIN" or "BTN")
if (venture.CategoryType is EVentureCategoryType.MIN or EVentureCategoryType.BTN)
{
if (retainer.Gathering >= venture.RequiredGathering)
reward = venture.Rewards.Last(
x => retainer.Perception >= x.PerceptionMinerBotanist);
}
else if (venture.CategoryName == "FSH")
else if (venture.CategoryType == EVentureCategoryType.FSH)
{
if (retainer.Gathering >= venture.RequiredGathering)
reward = venture.Rewards.Last(

View File

@ -241,7 +241,7 @@ internal sealed class LockedItemsTab : ITab
}
// check if we are the correct job
bool enabled = character.Retainers.Any(x => item.Ventures.Any(v => v.MatchesJob(x.Job)));
bool enabled = character.Retainers.Any(x => item.Ventures.Any(v => v.CategoryType != EVentureCategoryType.DoWM && v.MatchesJob(x.Job)));
if (enabled)
{
// do we have it gathered on this char?

View File

@ -226,7 +226,7 @@ internal sealed class VentureListTab : ITab
ImGui.SetNextItemWidth(130 * ImGuiHelpers.GlobalScale);
int quantity = item.RemainingQuantity;
if (ImGui.InputInt($"{venture.Name} ({string.Join(" ", ventures.Select(x => x.CategoryName))})",
if (ImGui.InputInt($"{venture.Name} ({string.Join(" ", ventures.Select(x => x.CategoryType.ToString()))})",
ref quantity, 100))
{
item.RemainingQuantity = quantity;
@ -452,7 +452,7 @@ internal sealed class VentureListTab : ITab
.Select(x => new
{
Venture = x.First(),
CategoryNames = x.Select(y => y.CategoryName)
CategoryNames = x.Select(y => y.CategoryType.ToString())
}))
{
IDalamudTextureWrap? icon = _iconCache.GetIcon(filtered.Venture.IconId);