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

Commit

Permalink
fix: removed the positional feedback and add the link to avarice 2.0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 21, 2023
1 parent 8a1b69c commit 9fef719
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 79 deletions.
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ public bool IsInCooldown
public unsafe float CastTime => ActionManager.GetAdjustedCastTime(ActionType.Spell, AdjustedID) / 1000f;

/// <summary>
/// Action Posotional.
/// Action Positional.
/// </summary>
public virtual EnemyPositional EnemyPositional
public EnemyPositional EnemyPositional
{
get
{
Expand Down
5 changes: 0 additions & 5 deletions RotationSolver.Basic/Actions/IBaseAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ public interface IBaseAction : IAction
[EditorBrowsable(EditorBrowsableState.Never)]
internal bool IsEot { get; }

/// <summary>
/// Posotional of this action.
/// </summary>
EnemyPositional EnemyPositional { get; }

/// <summary>
/// If player has these statuses from player self, this action will not used.
/// </summary>
Expand Down
3 changes: 0 additions & 3 deletions RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ public class PluginConfiguration : IPluginConfiguration

public bool ShowInfoOnDtr = true;

public bool SayPositional = true;

public bool ToastPositional = true;
public bool HealOutOfCombat = false;
public bool ShowInfoOnToast = true;
public bool RaiseAll = false;
Expand Down
9 changes: 0 additions & 9 deletions RotationSolver/Localization/EnumTranslations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ internal static class EnumTranslations
_ => k.ToString(),
};

public static string ToName(this EnemyPositional value) => value switch
{
EnemyPositional.None => LocalizationManager.RightLang.EnemyLocation_None,
EnemyPositional.Rear => LocalizationManager.RightLang.EnemyLocation_Rear,
EnemyPositional.Flank => LocalizationManager.RightLang.EnemyLocation_Flank,
EnemyPositional.Front => LocalizationManager.RightLang.EnemyLocation_Front,
_ => string.Empty,
};

public static string ToName(this DescType type) => type switch
{
DescType.BurstActions => LocalizationManager.RightLang.DescType_BurstActions,
Expand Down
6 changes: 0 additions & 6 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@
"ConfigWindow_Param_SampleLength": "The sample length of the line.",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing",
"ConfigWindow_Param_KeyBoardNoiseTimes": "Effect times",
"ConfigWindow_Param_ToastPositional": "Hint positional anticipation by Toast",
"ConfigWindow_Param_SayPositional": "Hint positional anticipation by shouting",
"ConfigWindow_Param_DrawPositional": "Draw Positional on the screen",
"ConfigWindow_Param_DrawMeleeRange": "Draw the range of melee on the screen",
"ConfigWindow_Param_DrawMeleeOffset": "Draw the offset of melee on the screen",
Expand Down Expand Up @@ -321,10 +319,6 @@
"JobRole_RangedMagical": "Magical",
"JobRole_DiscipleOfTheLand": "Disciple of the Land",
"JobRole_DiscipleOfTheHand": "Disciple of the Hand",
"EnemyLocation_None": "None",
"EnemyLocation_Rear": "Rear",
"EnemyLocation_Flank": "Flank",
"EnemyLocation_Front": "Front",
"MemberInfoName": {
"IsMoving": "IsMoving",
"HaveHostilesInRange": "Have Hostiles InRange",
Expand Down
9 changes: 0 additions & 9 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ internal partial class Strings
public string ConfigWindow_Param_SampleLength { get; set; } = "The sample length of the line.";
public string ConfigWindow_Param_KeyBoardNoise { get; set; } = "Simulate the effect of pressing";
public string ConfigWindow_Param_KeyBoardNoiseTimes { get; set; } = "Effect times";
public string ConfigWindow_Param_ToastPositional { get; set; } = "Hint positional anticipation by Toast";
public string ConfigWindow_Param_SayPositional { get; set; } = "Hint positional anticipation by shouting";
public string ConfigWindow_Param_DrawPositional { get; set; } = "Draw Positional on the screen";
public string ConfigWindow_Param_DrawMeleeRange { get; set; } = "Draw the range of melee on the screen";
public string ConfigWindow_Param_DrawMeleeOffset { get; set; } = "Draw the offset of melee on the screen";
Expand Down Expand Up @@ -448,13 +446,6 @@ internal partial class Strings

#endregion

#region EnemyLocation
public string EnemyLocation_None { get; set; } = "None";
public string EnemyLocation_Rear { get; set; } = "Rear";
public string EnemyLocation_Flank { get; set; } = "Flank";
public string EnemyLocation_Front { get; set; } = "Front";

#endregion
public Dictionary<string, string> MemberInfoName { get; set; } = new Dictionary<string, string>()
{
#region Rotation
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/UI/PainterManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public PositionalDrawing()

SubItems = new IDrawing3D[] { _noneCir, _flankCir, _rearCir };
}
void SetAction(uint id) => Svc.PluginInterface.GetOrCreateData("Avarice.ActionOverride", () => new List<uint>() { id });

public override void UpdateOnFrame(XIVPainter.XIVPainter painter)
{
if (Target == null || !Target.IsNPCEnemy())
Expand Down
6 changes: 0 additions & 6 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ private void DrawParamAdvanced()
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_SayOutStateChanged,
ref Service.Config.SayOutStateChanged, Service.Default.SayOutStateChanged);

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_SayPositional,
ref Service.Config.SayPositional, Service.Default.SayPositional);

ImGui.Separator();

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_PoslockCasting,
Expand Down Expand Up @@ -293,9 +290,6 @@ private void DrawParamDisplay()
ref Service.Config.NamePlateIconId, Service.Default.NamePlateIconId, 5, 0, 150000, otherThing: RSCommands.UpdateStateNamePlate);

ImGui.Spacing();

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_ToastPositional,
ref Service.Config.ToastPositional, Service.Default.ToastPositional);
}

private void DrawParamAction()
Expand Down
40 changes: 2 additions & 38 deletions RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,6 @@ internal static void UpdateNextAction()
if (NextGCDAction != GcdAction)
{
NextGCDAction = GcdAction;

var rightJobAndTarget = (Player.Object.IsJobCategory(JobRole.Tank) || Player.Object.IsJobCategory(JobRole.Melee)) && GcdAction.Target.IsNPCEnemy();

if (rightJobAndTarget && GcdAction.IsSingleTarget)
{
PainterManager.UpdatePositional(GcdAction.EnemyPositional, GcdAction.Target);
}
else
{
PainterManager.ClearPositional();
}

if (GcdAction.EnemyPositional != EnemyPositional.None
&& GcdAction.Target.HasPositional()
&& !localPlayer.HasStatus(true, CustomRotation.TrueNorth.StatusProvide))
{

if (CheckAction())
{
string positional = GcdAction.EnemyPositional.ToName();
if (Service.Config.SayPositional) SpeechHelper.Speak(positional);
if (Service.Config.ToastPositional) Svc.Toasts.ShowQuest(" " + positional,
new Dalamud.Game.Gui.Toast.QuestToastOptions()
{
IconId = GcdAction.IconID,
});
}
}
}
}
return;
Expand All @@ -97,18 +69,10 @@ internal static void UpdateNextAction()
PainterManager.ClearPositional();
}

static DateTime lastTime;
static bool CheckAction()
{
if (DateTime.Now - lastTime > new TimeSpan(0, 0, 3) && DataCenter.StateType != StateCommandType.Cancel)
{
lastTime = DateTime.Now;
return true;
}
else return false;
}
private static void SetAction(uint id) => Svc.PluginInterface.GetOrCreateData("Avarice.ActionOverride", () => new List<uint>() { id })[0] = id;
internal unsafe static void UpdateActionInfo()
{
SetAction(NextGCDAction?.AdjustedID ?? 0);
UpdateWeaponTime();
UpdateCombatTime();
UpdateBluSlots();
Expand Down

0 comments on commit 9fef719

Please sign in to comment.