Skip to content

Commit

Permalink
Merge pull request #98 from FFXIV-CombatReborn/api-level-attribute
Browse files Browse the repository at this point in the history
Added in APILevel check
  • Loading branch information
NostraThomas99 authored Apr 16, 2024
2 parents 0c1d6de + d723c62 commit efa109a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions RotationSolver/Updaters/RotationUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,17 @@ private static CustomRotationGroup[] LoadCustomRotationGroup(List<Assembly> asse
foreach (var type in TryGetTypes(assembly))
{
if (type.GetInterfaces().Contains(typeof(ICustomRotation))
&& !type.IsAbstract && !type.IsInterface && type.GetConstructor([]) != null)
//&& type.GetCustomAttribute<ApiAttribute>()?.ApiVersion == Service.ApiVersion) //TODO: Check for API version
&& !type.IsAbstract && !type.IsInterface && type.GetConstructor([]) != null
&& type.GetCustomAttribute<ApiAttribute>()?.ApiVersion == Service.ApiVersion)
{
rotationList.Add(type);
}
//else if (type.GetInterfaces().Contains(typeof(ICustomRotation))
// && !type.IsAbstract && !type.IsInterface && type.GetConstructor([]) != null)
//{
// var name = type.GetCustomAttribute<RotationAttribute>()?.Name ?? "Unknown";
// Svc.Chat.PrintError($"Failed to load rotation {name} from assembly {assembly}");
//}
}
}

Expand Down

0 comments on commit efa109a

Please sign in to comment.