Updated IsOfBaseclasses and isOfBaseClass to work with ICollection types, not just lists

This commit is contained in:
Chomp
2025-02-17 17:00:41 +00:00
parent 2cd2bb2c08
commit 169e1460bb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -339,7 +339,7 @@ public class ItemHelper(
// @param string tpl Item to check base classes of
// @param string[] baseClassTpls base classes to check for
// @returns true if any supplied base classes match
public bool IsOfBaseclasses(string tpl, List<string> baseClassTpls)
public bool IsOfBaseclasses(string tpl, ICollection<string> baseClassTpls)
{
return _itemBaseClassService.ItemHasBaseClass(tpl, baseClassTpls);
}
@@ -62,7 +62,7 @@ public class ItemBaseClassService(
* @param baseClass base class to check for
* @returns true if item inherits from base class passed in
*/
public bool ItemHasBaseClass(string itemTpl, List<string> baseClasses)
public bool ItemHasBaseClass(string itemTpl, ICollection<string> baseClasses)
{
if (!_cacheGenerated)
{