Fix retainers repeating the last venture when out of tasks

We now manually set them to execute a Quick Venture when nothing else is
left to do, instead of relying on AR's behavior.
This commit is contained in:
Liza 2023-10-13 19:06:17 +02:00
parent 37bdefcc55
commit a151105520
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<Version>2.2</Version> <Version>2.3</Version>
<LangVersion>11.0</LangVersion> <LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

View File

@ -78,9 +78,7 @@ public sealed partial class AutoRetainerControlPlugin : IDalamudPlugin
private void SendRetainerToVenture(string retainerName) private void SendRetainerToVenture(string retainerName)
{ {
var venture = GetNextVenture(retainerName, false); var venture = GetNextVenture(retainerName, false);
if (venture == QuickVentureId) if (venture.HasValue)
_autoRetainerApi.SetVenture(0);
else if (venture.HasValue)
_autoRetainerApi.SetVenture(venture.Value); _autoRetainerApi.SetVenture(venture.Value);
} }
@ -264,6 +262,13 @@ public sealed partial class AutoRetainerControlPlugin : IDalamudPlugin
_pluginInterface.SavePluginConfig(_configuration); _pluginInterface.SavePluginConfig(_configuration);
} }
// Unsure if this (eventually) will do venture plans you've configured in AutoRetainer, but by default
// (with Assign + Reassign) as config options, returning `0` here as suggested in
// https://discord.com/channels/1001823907193552978/1001825038598676530/1161295221447983226
// will just repeat the last venture.
//
// That makes sense, of course, but it's also not really the desired behaviour for when you're at the end
// of a list.
return QuickVentureId; return QuickVentureId;
} }
else else