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 name of positional.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 22, 2023
1 parent dde7934 commit e16da0f
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion RotationSolver/Actions/BaseAction/BaseAction_BasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ internal virtual EnemyPositional EnermyPositonal
{
get
{
if (ConfigurationHelper.ActionLocations.TryGetValue((ActionID)ID, out var location))
if (ConfigurationHelper.ActionPositionals.TryGetValue((ActionID)ID, out var location))
{
return location.Loc;
}
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Data/EnemyPositional.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace RotationSolver.Data;
public enum EnemyPositional : byte
{
None,
Back,
Side,
Rear,
Flank,
Front,
}
30 changes: 15 additions & 15 deletions RotationSolver/Helpers/ConfigurationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ namespace RotationSolver.Helpers;
internal static class ConfigurationHelper
{
public record LocationInfo(EnemyPositional Loc, byte[] Tags);
public static readonly SortedList<ActionID, LocationInfo> ActionLocations = new SortedList<ActionID, LocationInfo>()
public static readonly SortedList<ActionID, LocationInfo> ActionPositionals = new SortedList<ActionID, LocationInfo>()
{
{ActionID.FangandClaw, new( EnemyPositional.Side, new byte[] { 13, 10 })},
{ActionID.WheelingThrust, new(EnemyPositional.Back, new byte[] { 10, 13 }) },
{ActionID.ChaosThrust, new(EnemyPositional.Back, new byte[] { 61, 28 }) },
{ActionID.ChaoticSpring, new(EnemyPositional.Back, new byte[] { 66, 28 }) },
{ActionID.Demolish, new(EnemyPositional.Back, new byte[] { 46, 60 }) },
{ActionID.SnapPunch, new(EnemyPositional.Side, new byte[] { 19, 21 }) },
{ActionID.TrickAttack, new(EnemyPositional.Back, new byte[] { 25 }) },
{ActionID.AeolianEdge,new( EnemyPositional.Back, new byte[] { 30, 68 }) },
{ActionID.ArmorCrush, new(EnemyPositional.Side, new byte[] { 30, 66 }) },
{ActionID.Suiton, new(EnemyPositional.Back, new byte[] { }) },
{ActionID.Gibbet, new(EnemyPositional.Side , new byte[] { 11 })},
{ActionID.Gallows, new(EnemyPositional.Back, new byte[] { 11 }) },
{ActionID.Gekko, new(EnemyPositional.Back , new byte[] { 68, 29, 72 })},
{ActionID.Kasha, new(EnemyPositional.Side, new byte[] { 29, 68, 72 }) },
{ActionID.FangandClaw, new( EnemyPositional.Flank, new byte[] { 13, 10 })},
{ActionID.WheelingThrust, new(EnemyPositional.Rear, new byte[] { 10, 13 }) },
{ActionID.ChaosThrust, new(EnemyPositional.Rear, new byte[] { 61, 28 }) },
{ActionID.ChaoticSpring, new(EnemyPositional.Rear, new byte[] { 66, 28 }) },
{ActionID.Demolish, new(EnemyPositional.Rear, new byte[] { 46, 60 }) },
{ActionID.SnapPunch, new(EnemyPositional.Flank, new byte[] { 19, 21 }) },
{ActionID.TrickAttack, new(EnemyPositional.Rear, new byte[] { 25 }) },
{ActionID.AeolianEdge,new(EnemyPositional.Rear, new byte[] { 30, 68 }) },
{ActionID.ArmorCrush, new(EnemyPositional.Flank, new byte[] { 30, 66 }) },
{ActionID.Suiton, new(EnemyPositional.Rear, new byte[] { }) },
{ActionID.Gibbet, new(EnemyPositional.Flank , new byte[] { 11 })},
{ActionID.Gallows, new(EnemyPositional.Rear, new byte[] { 11 }) },
{ActionID.Gekko, new(EnemyPositional.Rear , new byte[] { 68, 29, 72 })},
{ActionID.Kasha, new(EnemyPositional.Flank, new byte[] { 29, 68, 72 }) },
};


Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Helpers/ObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ internal static EnemyPositional FindEnemyLocation(this GameObject enemy)
double angle = Math.Acos(Vector2.Dot(dirVec, faceVec) / dirVec.Length() / faceVec.Length());

if (angle < Math.PI / 4) return EnemyPositional.Front;
else if (angle > Math.PI * 3 / 4) return EnemyPositional.Back;
return EnemyPositional.Side;
else if (angle > Math.PI * 3 / 4) return EnemyPositional.Rear;
return EnemyPositional.Flank;
}

public unsafe static bool CanAttack(this GameObject actor)
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Localization/EnumTranslations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ internal static class EnumTranslations
public static string ToName(this EnemyPositional value) => value switch
{
EnemyPositional.None => LocalizationManager.RightLang.EnemyLocation_None,
EnemyPositional.Back => LocalizationManager.RightLang.EnemyLocation_Back,
EnemyPositional.Side => LocalizationManager.RightLang.EnemyLocation_Side,
EnemyPositional.Rear => LocalizationManager.RightLang.EnemyLocation_Rear,
EnemyPositional.Flank => LocalizationManager.RightLang.EnemyLocation_Flank,
EnemyPositional.Front => LocalizationManager.RightLang.EnemyLocation_Front,
_ => string.Empty,
};
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"Timeline_StatusSelfDesc": "StatusSelf",
"Action_Friendly": "Support",
"Action_Attack": "Attack",
"Action_WrongLocation": "Positional {0}!",
"Action_WrongPositional": "Positional {0}!",
"ActionConditionType_Elapsed": "Elapsed",
"ActionConditionType_ElapsedGCD": "ElapsedGCD ",
"ActionConditionType_Remain": "RemainTime",
Expand Down Expand Up @@ -193,8 +193,8 @@
"JobRole_DiscipleoftheLand": "Disciple of the Land",
"JobRole_DiscipleoftheHand": "Disciple of the Hand",
"EnemyLocation_None": "None",
"EnemyLocation_Back": "Back",
"EnemyLocation_Side": "Side",
"EnemyLocation_Rear": "Rear",
"EnemyLocation_Flank": "Flank",
"EnemyLocation_Front": "Front",
"MemberInfoName": {
"IsMoving": "IsMoving",
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ internal class Strings
#region Actions
public string Action_Friendly { get; set; } = "Support";
public string Action_Attack { get; set; } = "Attack";
public string Action_WrongLocation { get; set; } = "Positional {0}!";
public string Action_WrongPositional { get; set; } = "Positional {0}!";

#endregion

Expand Down Expand Up @@ -265,8 +265,8 @@ internal class Strings

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

#endregion
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver/SigReplacers/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ private static unsafe void RecordAction(GameObject tar, Action action, byte flag
if (flag != 0)
{
Service.FlyTextGui.AddFlyText(Dalamud.Game.Gui.FlyText.FlyTextKind.NamedIcon, 0, 0, 0, "Flag:" + flag.ToString(), "",
ImGui.GetColorU32(new Vector4(0.4f, 0, 0, 1)), 0, action.Icon);
ImGui.GetColorU32(new Vector4(0.4f, 0, 0, 1)), 94662, action.Icon);
}
#endif

//事后骂人!
if (Service.Configuration.PositionalFeedback
&& ConfigurationHelper.ActionLocations.TryGetValue(id, out var loc)
&& ConfigurationHelper.ActionPositionals.TryGetValue(id, out var loc)
&& loc.Tags.Length > 0 && !loc.Tags.Contains(flag))
{
var str = string.Format(LocalizationManager.RightLang.Action_WrongLocation, loc.Loc.ToName());
var str = string.Format(LocalizationManager.RightLang.Action_WrongPositional, loc.Loc.ToName());
Service.FlyTextGui.AddFlyText(Dalamud.Game.Gui.FlyText.FlyTextKind.NamedIcon, 0, 0, 0, str, "",
ImGui.GetColorU32(new Vector4(0.4f, 0, 0, 1)), 0, action.Icon);
if (!string.IsNullOrEmpty(Service.Configuration.PositionalErrorText))
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Windows/OverlayWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ private static void DrawLocation()
pts.Add(scrPos);
switch (ShouldPositional)
{
case EnemyPositional.Side:
case EnemyPositional.Flank:
SectorPlots(ref pts, pPosition, radius, Math.PI * 0.25 + rotation, COUNT);
pts.Add(scrPos);
SectorPlots(ref pts, pPosition, radius, Math.PI * 1.25 + rotation, COUNT);
break;
case EnemyPositional.Back:
case EnemyPositional.Rear:
SectorPlots(ref pts, pPosition, radius, Math.PI * 0.75 + rotation, COUNT);
break;
default:
Expand Down

0 comments on commit e16da0f

Please sign in to comment.