Adopt ClassicAPI in Conditionals: item cooldown, stealth, nameplates

- GetItemCooldownCached: resolve via ClassicAPI GetItemCooldown (by item
  id/name) instead of FindItemLocation + nampower GetItemIdCooldown +
  link parsing; equipment slots (1-19) still query the inventory slot.
- [stealth]/[nostealth] and [stl]/[nostl], and the Rogue branch of
  GetCurrentShapeshiftIndex, now use ClassicAPI IsStealthed() (covers
  Rogue Stealth + Druid Prowl) instead of class-gated localized buff
  lookups. Note: [nostealth] is now true for non-stealth classes.
- CountEnemiesMatching nameplate scan uses C_NamePlate.GetNamePlateGUIDs()
  instead of walking WorldFrame children and extracting GUIDs via
  pcall(frame.GetName).
- Add ClassicAPI.IsStealthed / GetNamePlateGUIDs wrappers.
This commit is contained in:
Brues
2026-06-21 01:05:28 -05:00
parent af38410249
commit 5d5b46b0a6
2 changed files with 37 additions and 35 deletions
+19
View File
@@ -118,3 +118,22 @@ end
function API.GetActionInfo(slot)
return GetActionInfo(slot)
end
--------------------------------------------------------------------------------
-- State
--------------------------------------------------------------------------------
-- True if the player is in Stealth (Rogue) or Prowl (Druid).
function API.IsStealthed()
return IsStealthed()
end
--------------------------------------------------------------------------------
-- NamePlate
--------------------------------------------------------------------------------
-- 1-based table of GUID strings (0x... format) for every unit with an allocated
-- nameplate, including default vanilla nameplates. Order isn't stable.
function API.GetNamePlateGUIDs()
return C_NamePlate.GetNamePlateGUIDs()
end