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

Commit

Permalink
fix: fix some build bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 18, 2023
1 parent a711bfe commit 21b97b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Script/IScriptCombo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static class ScriptComboExtension
{
public static string GetFolder(this ComboSet set)
{
return Path.Combine(Service.Configuration.ScriptComboFolder, $"{(uint)set.JobID}_{set.AuthorName}.json");
return Path.Combine(typeof(ScriptComboExtension).Assembly.Location, $"{(uint)set.JobID}_{set.AuthorName}.json");
}

public static string GetAuthor(this ComboSet set)
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver/Updaters/TargetUpdater_Hostile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ internal unsafe static void UpdateHostileTargets()

switch (IconReplacer.RightNowTargetToHostileType)
{
case 0:
case TargetHostileType.AllTargetsCanAttack:
HostileTargets = AllTargets;
break;

default:
case 1:
case TargetHostileType.TargetsHaveTargetOrAllTargetsCanAttack:
if (!HostileTargets.Any())
HostileTargets = AllTargets;
break;

case 2:
case TargetHostileType.TargetsHaveTarget:
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ private static void DrawRotations(IconReplacer.CustomRotationGroup[] rotations)
}
}


private static void DrawRotation(ICustomRotation rotation, bool canAddButton)
{
ImGui.Spacing();
Expand All @@ -86,7 +85,7 @@ private static void DrawRotation(ICustomRotation rotation, bool canAddButton)

ImGui.Spacing();

DrawConfig(rotation.Config);
DrawConfig(rotation.Config, canAddButton);
}

private static void DrawTargetHostileTYpe(ICustomRotation rotation)
Expand Down Expand Up @@ -144,11 +143,11 @@ private static void DrawHealerSettings(ClassJobID job)
DrawDragFloat(job, LocalizationManager.RightLang.Configwindow_Params_HealingOfTimeSubtractSingle,
() => ConfigurationHelper.GetHealingOfTimeSubtractSingle(job),
(value) => Service.Configuration.HealingOfTimeSubtractSingles[job] = value);

}

private static void DrawConfig(ActionConfiguration actions)
private static void DrawConfig(ActionConfiguration actions, bool canAddButton)
{
var num = actions.GetHashCode();
foreach (var boolean in actions.bools)
{
bool val = boolean.value;
Expand Down Expand Up @@ -238,5 +237,4 @@ private static void DrawDragFloat(ClassJobID job, string desc, Func<float> getVa
Service.Configuration.Save();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ internal static void DrawTexture<T>(T texture, Action otherThing, ClassJobID job
Spacing();
ImGui.PushFont(UiBuilder.IconFont);

if (Directory.Exists(Service.Configuration.ScriptComboFolder)
&& ImGui.Button($"{FontAwesomeIcon.Plus.ToIconString()}##{texture.GetHashCode() + 1}"))
if (ImGui.Button($"{FontAwesomeIcon.Plus.ToIconString()}##{texture.GetHashCode() + 1}"))
{
var newCom = IconReplacer.AddScripCombo(com.JobIDs[0]);
if (newCom != null)
Expand Down

0 comments on commit 21b97b0

Please sign in to comment.