mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user