muffin v7.38.8
This commit is contained in:
parent
5e2d8f648b
commit
3e10cbbbf2
51 changed files with 2585 additions and 1972 deletions
|
|
@ -50,7 +50,7 @@ internal static class Mount
|
|||
}
|
||||
}
|
||||
|
||||
internal sealed class MountEvaluator(GameFunctions gameFunctions, ICondition condition, TerritoryData territoryData, IClientState clientState, ILogger<MountEvaluator> logger)
|
||||
internal sealed class MountEvaluator(GameFunctions gameFunctions, ICondition condition, TerritoryData territoryData, IClientState clientState, IObjectTable objectTable, ILogger<MountEvaluator> logger)
|
||||
{
|
||||
public unsafe MountResult EvaluateMountState(MountTask task, bool dryRun, ref DateTime retryAt)
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ internal static class Mount
|
|||
}
|
||||
if (task.MountIf == EMountIf.AwayFromPosition)
|
||||
{
|
||||
float num = System.Numerics.Vector3.Distance((FFXIVClientStructs.FFXIV.Common.Math.Vector3)(clientState.LocalPlayer?.Position ?? ((System.Numerics.Vector3)FFXIVClientStructs.FFXIV.Common.Math.Vector3.Zero)), task.Position.GetValueOrDefault());
|
||||
float num = System.Numerics.Vector3.Distance((FFXIVClientStructs.FFXIV.Common.Math.Vector3)(objectTable[0]?.Position ?? ((System.Numerics.Vector3)FFXIVClientStructs.FFXIV.Common.Math.Vector3.Zero)), task.Position.GetValueOrDefault());
|
||||
if (task.TerritoryId == clientState.TerritoryType && num < 30f && !Conditions.Instance()->Diving)
|
||||
{
|
||||
logger.Log(logLevel, "Not using mount, as we're close to the target");
|
||||
|
|
@ -159,7 +159,7 @@ internal static class Mount
|
|||
}
|
||||
}
|
||||
|
||||
internal sealed class UnmountExecutor(ICondition condition, ILogger<UnmountTask> logger, GameFunctions gameFunctions, IClientState clientState) : TaskExecutor<UnmountTask>()
|
||||
internal sealed class UnmountExecutor(ICondition condition, ILogger<UnmountTask> logger, GameFunctions gameFunctions, IObjectTable objectTable) : TaskExecutor<UnmountTask>()
|
||||
{
|
||||
private bool _unmountTriggered;
|
||||
|
||||
|
|
@ -221,10 +221,9 @@ internal static class Mount
|
|||
|
||||
private unsafe bool IsUnmounting()
|
||||
{
|
||||
IPlayerCharacter localPlayer = clientState.LocalPlayer;
|
||||
if (localPlayer != null)
|
||||
if (objectTable[0] is IPlayerCharacter playerCharacter)
|
||||
{
|
||||
BattleChara* address = (BattleChara*)localPlayer.Address;
|
||||
BattleChara* address = (BattleChara*)playerCharacter.Address;
|
||||
return (address->Mount.Flags & 1) == 1;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue