Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: changed the logic of auto defense area
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 15, 2023
1 parent 5a5623a commit 613456b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ literally, `Rotation Solver` helps you to choose the target and then click the a
- [ReAction](https://github.com/UnknownX7/ReAction)
- etc...

NOTICE: It can't use with [`Block Targeting Treasure Hunt Enemies`](https://github.com/Caraxi/SimpleTweaksPlugin/blob/7e94915afa17ea873d48be2c469ebdaddd2e5200/Tweaks/TreasureHuntTargets.cs) in [Simple Tweaks](https://github.com/Caraxi/SimpleTweaksPlugin).

I don't know why. I just used the [GetIsTargetable](https://github.com/aers/FFXIVClientStructs/blob/c554a586c4649a472433734b45c59a4bc4979ead/FFXIVClientStructs/FFXIV/Client/Game/Object/GameObject.cs#L71) Method in [FFXIVClientStructs](https://github.com/aers/FFXIVClientStructs). If anybody knows why, please tell me.

## Links

If you have any questions about usage, please check the [Wiki](https://archidog1998.github.io/RotationSolver/#/). Wiki is NOT ready yet...
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Commands/RSCommands_Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal static unsafe void DoAnAction(bool isGCD)
var localPlayer = Service.Player;
if (localPlayer == null) return;

//0.2s内,不能重复按按钮。
//Do not click the button in 0.2s
if (DateTime.Now - _fastClickStopwatch < _fastSpan) return;
_fastClickStopwatch = DateTime.Now;

Expand Down
16 changes: 12 additions & 4 deletions RotationSolver/Updaters/TargetUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,19 @@ private static bool IsHostileCastingArea(BattleChara h)
{
return IsHostileCastingBase(h, (act) =>
{
if (h.CastTargetObjectId == h.TargetObjectId) return false;
if ((act.CastType == 1 || act.CastType == 2) &&
act.Range == 0 &&
act.EffectRange >= 40)
if ((act.CastType == 1 || act.CastType == 2)
&& act.Range == 0
&& act.EffectRange >= 40)
return true;

if (act.CastType == 2
&& act.EffectRange == 6
&& act.Cast100ms == 50
&& act.CanTargetHostile
&& !act.CanTargetSelf
&& act.Range == 100)
return true;

return false;
});
}
Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
using Dalamud.Utility.Signatures;
using FFXIVClientStructs.FFXIV.Client.Game;
using RotationSolver.Localization;
using System.ComponentModel;
using System.Text.RegularExpressions;
using Action = Lumina.Excel.GeneratedSheets.Action;

namespace RotationSolver;

Expand Down

0 comments on commit 613456b

Please sign in to comment.