Skip to content

Commit

Permalink
test of #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Oct 9, 2024
1 parent 61d64a7 commit ff98869
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion Automaton/Features/AutoFollow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private void ClearMaster()

private void Follow(IFramework framework)
{
if (!Player.Available) return;
if (!Player.Available || TaskManager.IsBusy) return;

master = Svc.Objects.FirstOrDefault(x => x.EntityId == masterObjectID || !Config.AutoFollowName.IsNullOrEmpty() && x.Name.TextValue.Equals(Config.AutoFollowName, StringComparison.InvariantCultureIgnoreCase));

Expand All @@ -93,6 +93,33 @@ private void Follow(IFramework framework)

if (master.ObjectKind == Dalamud.Game.ClientState.Objects.Enums.ObjectKind.Player)
{
// prioritise riding pillion
//if (Svc.Party.Any(p => p.ObjectId == master.GameObjectId) && GetRow<Mount>(master.Character()->Mount.MountId)?.ExtraSeats > 0)
//{
// if (P.Memory.RidePillion == null) goto Mount;
// // ignore DistanceToKeep
// if (!Player.IsNear(master))
// {
// movement.Enabled = true;
// movement.DesiredPosition = master.Position;
// return;
// }
// else
// {
// movement.Enabled = false;
// if (Svc.Condition[ConditionFlag.Mounted])
// {
// ActionManager.Instance()->UseAction(ActionType.GeneralAction, 23);
// return;
// }
// TaskManager.Enqueue(() => Svc.Log.Debug("Detected mounted party member with extra seats, mounting..."));
// TaskManager.Enqueue(() => P.Memory.RidePillion(master.BattleChara(), 10));
// TaskManager.Enqueue(() => Svc.Condition[ConditionFlag.Mounted]);
// return;
// }
//}

Mount:
// mount
if (master.Character()->IsMounted() && CanMount())
{
Expand Down

0 comments on commit ff98869

Please sign in to comment.