muffin v7.38.8
This commit is contained in:
parent
5e2d8f648b
commit
3e10cbbbf2
51 changed files with 2585 additions and 1972 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
|
||||
|
|
@ -43,7 +44,7 @@ internal static class EquipRecommended
|
|||
}
|
||||
}
|
||||
|
||||
internal sealed class DoEquipRecommended(IClientState clientState, IChatGui chatGui, ICondition condition) : TaskExecutor<EquipTask>()
|
||||
internal sealed class DoEquipRecommended(IObjectTable objectTable, IChatGui chatGui, ICondition condition) : TaskExecutor<EquipTask>()
|
||||
{
|
||||
private bool _checkedOrTriggeredEquipmentUpdate;
|
||||
|
||||
|
|
@ -55,7 +56,11 @@ internal static class EquipRecommended
|
|||
{
|
||||
return false;
|
||||
}
|
||||
RecommendEquipModule.Instance()->SetupForClassJob((byte)clientState.LocalPlayer.ClassJob.RowId);
|
||||
if (!(objectTable[0] is ICharacter character))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
RecommendEquipModule.Instance()->SetupForClassJob((byte)character.ClassJob.RowId);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
@ -47,12 +48,17 @@ internal static class Jump
|
|||
}
|
||||
}
|
||||
|
||||
internal abstract class JumpBase<T>(MovementController movementController, IClientState clientState, IFramework framework) : TaskExecutor<T>() where T : class, IJumpTask
|
||||
internal abstract class JumpBase<T>(MovementController movementController, IObjectTable objectTable, IFramework framework) : TaskExecutor<T>() where T : class, IJumpTask
|
||||
{
|
||||
protected unsafe override bool Start()
|
||||
{
|
||||
IGameObject gameObject = _003CobjectTable_003EP[0];
|
||||
if (gameObject == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
float num = base.Task.JumpDestination.CalculateStopDistance();
|
||||
if ((_003CclientState_003EP.LocalPlayer.Position - base.Task.JumpDestination.Position).Length() <= num)
|
||||
if ((gameObject.Position - base.Task.JumpDestination.Position).Length() <= num)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -94,8 +100,8 @@ internal static class Jump
|
|||
|
||||
internal sealed class DoSingleJump : JumpBase<SingleJumpTask>
|
||||
{
|
||||
public DoSingleJump(MovementController movementController, IClientState clientState, IFramework framework)
|
||||
: base(movementController, clientState, framework)
|
||||
public DoSingleJump(MovementController movementController, IObjectTable objectTable, IFramework framework)
|
||||
: base(movementController, objectTable, framework)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -110,19 +116,19 @@ internal static class Jump
|
|||
|
||||
internal sealed class DoRepeatedJumps : JumpBase<RepeatedJumpTask>
|
||||
{
|
||||
private readonly IClientState _clientState;
|
||||
private readonly IObjectTable _objectTable;
|
||||
|
||||
private DateTime _continueAt;
|
||||
|
||||
private int _attempts;
|
||||
|
||||
public DoRepeatedJumps(MovementController movementController, IClientState clientState, IFramework framework, ICondition condition, ILogger<DoRepeatedJumps> logger)
|
||||
public DoRepeatedJumps(MovementController movementController, IObjectTable objectTable, IFramework framework, ICondition condition, ILogger<DoRepeatedJumps> logger)
|
||||
{
|
||||
_003Ccondition_003EP = condition;
|
||||
_003Clogger_003EP = logger;
|
||||
_clientState = clientState;
|
||||
_objectTable = objectTable;
|
||||
_continueAt = DateTime.MinValue;
|
||||
base._002Ector(movementController, clientState, framework);
|
||||
base._002Ector(movementController, objectTable, framework);
|
||||
}
|
||||
|
||||
protected override bool Start()
|
||||
|
|
@ -137,12 +143,17 @@ internal static class Jump
|
|||
{
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
float num = base.Task.JumpDestination.CalculateStopDistance();
|
||||
if ((_clientState.LocalPlayer.Position - base.Task.JumpDestination.Position).Length() <= num || _clientState.LocalPlayer.Position.Y >= base.Task.JumpDestination.Position.Y - 0.5f)
|
||||
IGameObject gameObject = _objectTable[0];
|
||||
if (gameObject == null)
|
||||
{
|
||||
return ETaskResult.TaskComplete;
|
||||
}
|
||||
_003Clogger_003EP.LogTrace("Y-Heights for jumps: player={A}, target={B}", _clientState.LocalPlayer.Position.Y, base.Task.JumpDestination.Position.Y - 0.5f);
|
||||
float num = base.Task.JumpDestination.CalculateStopDistance();
|
||||
if ((gameObject.Position - base.Task.JumpDestination.Position).Length() <= num || gameObject.Position.Y >= base.Task.JumpDestination.Position.Y - 0.5f)
|
||||
{
|
||||
return ETaskResult.TaskComplete;
|
||||
}
|
||||
_003Clogger_003EP.LogTrace("Y-Heights for jumps: player={A}, target={B}", gameObject.Position.Y, base.Task.JumpDestination.Position.Y - 0.5f);
|
||||
if (ActionManager.Instance()->UseAction(ActionType.GeneralAction, 2u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null))
|
||||
{
|
||||
_attempts++;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ internal static class SinglePlayerDuty
|
|||
public const ushort Naadam = 688;
|
||||
}
|
||||
|
||||
internal sealed class Factory(BossModIpc bossModIpc, TerritoryData territoryData, ICondition condition, IClientState clientState) : ITaskFactory
|
||||
internal sealed class Factory(BossModIpc bossModIpc, TerritoryData territoryData, ICondition condition, IClientState clientState, IObjectTable objectTable) : ITaskFactory
|
||||
{
|
||||
public IEnumerable<ITask> CreateAllTasks(Quest quest, QuestSequence sequence, QuestStep step)
|
||||
{
|
||||
|
|
@ -70,7 +70,7 @@ internal static class SinglePlayerDuty
|
|||
{
|
||||
return true;
|
||||
}
|
||||
Vector3 vector = clientState.LocalPlayer?.Position ?? default(Vector3);
|
||||
Vector3 vector = objectTable[0]?.Position ?? default(Vector3);
|
||||
return (new Vector3(352.01f, -1.45f, 288.59f) - vector).Length() < 10f;
|
||||
}, "Wait(moving to Ovoo)");
|
||||
yield return new Mount.UnmountTask();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue