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

Commit

Permalink
fix: fixed icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jun 25, 2023
1 parent ec31f83 commit f0256a1
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 9 deletions.
13 changes: 12 additions & 1 deletion Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"3": 0.6,
"9": 0.6,
"15": 0.6,
"16": 0.6,
Expand Down Expand Up @@ -253,6 +254,9 @@
"15990": 0.6,
"15991": 0.6,
"15992": 0.6,
"15993": 0.6,
"15994": 0.6,
"15995": 0.6,
"15996": 0.6,
"15997": 0.6,
"15999": 0.6,
Expand All @@ -261,7 +265,10 @@
"16002": 0.6,
"16006": 0.6,
"16007": 0.6,
"16008": 0.6,
"16009": 0.6,
"16010": 0.6,
"16012": 0.6,
"16015": 0.6,
"16137": 0.6,
"16138": 0.6,
Expand Down Expand Up @@ -329,7 +336,7 @@
"16552": 0.6,
"16553": 0.6,
"16554": 0.6,
"16555": 0.6,
"16555": 0.1,
"16926": 0.1,
"17209": 0.6,
"17215": 0.1,
Expand All @@ -356,11 +363,14 @@
"21292": 2.1,
"21910": 2.1,
"21912": 2.1,
"21913": 2.1,
"21925": 0.1,
"22185": 0.6,
"22189": 0.6,
"22377": 2.1,
"22382": 0.1,
"22411": 1.1,
"22478": 2.1,
"22605": 2.1,
"23023": 2.1,
"23036": 2.1,
Expand Down Expand Up @@ -467,6 +477,7 @@
"26791": 2.1,
"26798": 2.1,
"26802": 2.1,
"28619": 2.1,
"28917": 2.1,
"29223": 0.1,
"29224": 0.1,
Expand Down
3 changes: 3 additions & 0 deletions Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
29352,
29356,
29561,
29582,
29584,
29595,
29818,
30134,
30140,
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public bool IsInCooldown
public uint ID => _action.RowId;
public uint AdjustedID => (uint)Service.GetAdjustedActionId((ActionID)ID);

public uint IconID => _action.Icon;
public uint IconID => ID == (uint)ActionID.Sprint ? 104u : _action.Icon;

private byte CoolDownGroup { get; }

Expand Down
15 changes: 11 additions & 4 deletions RotationSolver.Basic/Data/IconSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,18 @@ public static class IconSet
public static TextureWrap GetTexture(this IAction action, bool isAdjust = true)
{
uint iconId = 0;
if (action != null && !_actionIcons.TryGetValue(isAdjust ? action.AdjustedID : action.ID, out iconId))
if (action != null )
{
iconId = action is IBaseAction ? Service.GetSheet<Lumina.Excel.GeneratedSheets.Action>().GetRow(action.AdjustedID).Icon
: Service.GetSheet<Lumina.Excel.GeneratedSheets.Item>().GetRow(action.AdjustedID).Icon;
_actionIcons[action.AdjustedID] = iconId;
var adjust = action.AdjustedID;
var id = isAdjust ? adjust : action.ID;

if (!_actionIcons.TryGetValue(id, out iconId))
{
iconId = id == action.ID ? action.IconID : action is IBaseAction ? Service.GetSheet<Lumina.Excel.GeneratedSheets.Action>().GetRow(action.AdjustedID).Icon
: Service.GetSheet<Lumina.Excel.GeneratedSheets.Item>().GetRow(action.AdjustedID).Icon;

_actionIcons[action.AdjustedID] = iconId;
}
}
return GetTexture(iconId);
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/Basic/SCH_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public abstract class SCH_Base : CustomRotation

protected override bool SpeedAbility(out IAction act)
{
if(Expedient.CanUse(out act, CanUseOption.MustUse)) return true;
if(InCombat && Expedient.CanUse(out act, CanUseOption.MustUse)) return true;
return base.SpeedAbility(out act);
}
}
2 changes: 2 additions & 0 deletions RotationSolver/Commands/RSCommands_StateSpecialCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using ECommons.DalamudServices;
using ECommons.GameHelpers;
using RotationSolver.Localization;
using RotationSolver.Updaters;

namespace RotationSolver.Commands;

Expand All @@ -27,6 +28,7 @@ private static unsafe void DoStateCommandType(StateCommandType stateType) => DoO
{
Service.Config.TargetingIndex += 1;
Service.Config.TargetingIndex %= Service.Config.TargetingTypes.Count;
ActionUpdater._cancelTime = DateTime.MinValue;
}

if (Service.Config.ToggleManual
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"ConfigWindow_HelpItem_Burst": "Open a window to burst.",
"ConfigWindow_HelpItem_MoveForward": "Open a window to move forward.",
"ConfigWindow_HelpItem_MoveBack": "Open a window to move back.",
"ConfigWindow_HelpItem_Speed": "Open a window to speed up.",
"ConfigWindow_HelpItem_EndSpecial": "To end this special duration before the set time.",
"ConfigWindow_Helper_SwitchRotation": "Click to switch authors",
"ConfigWindow_Helper_HighEndWarning": "This <{0}> rotation is not allowed to be used in High-end Duty!",
Expand Down Expand Up @@ -123,6 +124,7 @@
"ConfigWindow_Param_AutoUseTrueNorth": "Auto TrueNorth (Melee)",
"ConfigWindow_Param_RaisePlayerBySwift": "Raise player by swift",
"ConfigWindow_Param_UseGroundBeneficialAbility": "Use beneficial ground-targeted actions",
"ConfigWindow_Param_AutoSpeedOutOfCombat": "Use speed actions when out of combat.",
"ConfigWindow_Param_RaisePlayerByCasting": "Raise player by casting when swift is in cooldown",
"ConfigWindow_Param_UseHealWhenNotAHealer": "Use heal when not-healer",
"ConfigWindow_Param_LessMPNoRaise": "Never raise player if MP is less than the set value",
Expand Down Expand Up @@ -265,6 +267,7 @@
"SpecialCommandType_AntiKnockback": "Anti-Knockback",
"SpecialCommandType_Burst": "Burst",
"SpecialCommandType_EndSpecial": "End Special",
"SpecialCommandType_Speed": "Speed",
"SpecialCommandType_Smart": "Auto Target ",
"SpecialCommandType_Manual": "Manual Target",
"SpecialCommandType_Cancel": "Cancel",
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver/Updaters/MajorUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ private static void FrameworkUpdate(Framework framework)
PainterManager.ActionIds.Clear();
if (Service.Config.TeachingMode && ActionUpdater.NextAction!= null)
{
PainterManager.ActionIds.Add(ActionUpdater.NextAction.AdjustedID);
//Sprint action id is 3 however the id in hot bar is 4.
var id = ActionUpdater.NextAction.AdjustedID;
PainterManager.ActionIds.Add(id == (uint)ActionID.Sprint ? 4 : id);
}
ActionUpdater.UpdateActionInfo();

Expand Down
2 changes: 1 addition & 1 deletion XIVPainter

0 comments on commit f0256a1

Please sign in to comment.