DoWM retainers no longer check if you've gathered an item as MIN/BTN
This commit is contained in:
parent
e8ac90119a
commit
0c07ba4f1e
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
|
<Project Sdk="Dalamud.NET.Sdk/11.0.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>6.0</Version>
|
<Version>6.1</Version>
|
||||||
<OutputPath>dist</OutputPath>
|
<OutputPath>dist</OutputPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
10
ARControl/GameData/EVentureCategoryType.cs
Normal file
10
ARControl/GameData/EVentureCategoryType.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace ARControl.GameData;
|
||||||
|
|
||||||
|
public enum EVentureCategoryType
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
MIN,
|
||||||
|
BTN,
|
||||||
|
FSH,
|
||||||
|
DoWM,
|
||||||
|
}
|
@ -63,16 +63,16 @@ internal sealed class Venture
|
|||||||
public uint RowId { get; }
|
public uint RowId { get; }
|
||||||
public ClassJobCategory Category { get; }
|
public ClassJobCategory Category { get; }
|
||||||
|
|
||||||
public string? CategoryName
|
public EVentureCategoryType CategoryType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Category.RowId switch
|
return Category.RowId switch
|
||||||
{
|
{
|
||||||
17 => "MIN",
|
17 => EVentureCategoryType.MIN,
|
||||||
18 => "BTN",
|
18 => EVentureCategoryType.BTN,
|
||||||
19 => "FSH",
|
19 => EVentureCategoryType.FSH,
|
||||||
_ => "DoWM",
|
_ => EVentureCategoryType.DoWM,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,23 +26,26 @@ internal sealed class VentureResolver
|
|||||||
return (null, null);
|
return (null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemToGather = _gameCache.ItemsToGather.FirstOrDefault(x => x.ItemId == itemId);
|
if (venture.CategoryType != EVentureCategoryType.DoWM)
|
||||||
if (itemToGather != null && !character.GatheredItems.Contains(itemToGather.GatheredItemId))
|
|
||||||
{
|
{
|
||||||
_pluginLog.Information($"Character hasn't gathered {venture.Name} yet");
|
var itemToGather = _gameCache.ItemsToGather.FirstOrDefault(x => x.ItemId == itemId);
|
||||||
return (null, null);
|
if (itemToGather != null && !character.GatheredItems.Contains(itemToGather.GatheredItemId))
|
||||||
|
{
|
||||||
|
_pluginLog.Information($"Character hasn't gathered {venture.Name} yet");
|
||||||
|
return (null, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_pluginLog.Debug(
|
_pluginLog.Debug(
|
||||||
$"Found venture {venture.Name}, row = {venture.RowId}, checking if we have high enough stats");
|
$"Found venture {venture.Name}, row = {venture.RowId}, checking if we have high enough stats");
|
||||||
VentureReward? reward = null;
|
VentureReward? reward = null;
|
||||||
if (venture.CategoryName is "MIN" or "BTN")
|
if (venture.CategoryType is EVentureCategoryType.MIN or EVentureCategoryType.BTN)
|
||||||
{
|
{
|
||||||
if (retainer.Gathering >= venture.RequiredGathering)
|
if (retainer.Gathering >= venture.RequiredGathering)
|
||||||
reward = venture.Rewards.Last(
|
reward = venture.Rewards.Last(
|
||||||
x => retainer.Perception >= x.PerceptionMinerBotanist);
|
x => retainer.Perception >= x.PerceptionMinerBotanist);
|
||||||
}
|
}
|
||||||
else if (venture.CategoryName == "FSH")
|
else if (venture.CategoryType == EVentureCategoryType.FSH)
|
||||||
{
|
{
|
||||||
if (retainer.Gathering >= venture.RequiredGathering)
|
if (retainer.Gathering >= venture.RequiredGathering)
|
||||||
reward = venture.Rewards.Last(
|
reward = venture.Rewards.Last(
|
||||||
|
@ -241,7 +241,7 @@ internal sealed class LockedItemsTab : ITab
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if we are the correct job
|
// 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)
|
if (enabled)
|
||||||
{
|
{
|
||||||
// do we have it gathered on this char?
|
// do we have it gathered on this char?
|
||||||
|
@ -226,7 +226,7 @@ internal sealed class VentureListTab : ITab
|
|||||||
|
|
||||||
ImGui.SetNextItemWidth(130 * ImGuiHelpers.GlobalScale);
|
ImGui.SetNextItemWidth(130 * ImGuiHelpers.GlobalScale);
|
||||||
int quantity = item.RemainingQuantity;
|
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))
|
ref quantity, 100))
|
||||||
{
|
{
|
||||||
item.RemainingQuantity = quantity;
|
item.RemainingQuantity = quantity;
|
||||||
@ -452,7 +452,7 @@ internal sealed class VentureListTab : ITab
|
|||||||
.Select(x => new
|
.Select(x => new
|
||||||
{
|
{
|
||||||
Venture = x.First(),
|
Venture = x.First(),
|
||||||
CategoryNames = x.Select(y => y.CategoryName)
|
CategoryNames = x.Select(y => y.CategoryType.ToString())
|
||||||
}))
|
}))
|
||||||
{
|
{
|
||||||
IDalamudTextureWrap? icon = _iconCache.GetIcon(filtered.Venture.IconId);
|
IDalamudTextureWrap? icon = _iconCache.GetIcon(filtered.Venture.IconId);
|
||||||
|
Loading…
Reference in New Issue
Block a user