Add [mounted]/[nomounted] and [standing]/[sitting] conditionals

Back them with ClassicAPI IsMounted() and UnitStandState("player").
mounted/nomounted are player mount state; standing = stand state 0,
sitting = any non-standing pose (its complement). Player-only, registered
in Keywords, BOOLEAN_CONDITIONALS, and STATIC_CONDITIONALS like [stealth].
This commit is contained in:
Brues
2026-07-26 13:44:16 -05:00
parent 1770f7b6e1
commit 6718a01d79
3 changed files with 33 additions and 0 deletions
+11
View File
@@ -182,6 +182,17 @@ function API.IsSwimming()
return IsSwimming() and true or false
end
-- True if the player is currently mounted.
function API.IsMounted()
return IsMounted() and true or false
end
-- Player's stand state: 0 = standing, non-zero = sitting/sleeping/kneeling/etc.
-- (see UnitStandState). Player-only.
function API.GetPlayerStandState()
return UnitStandState("player") or 0
end
--------------------------------------------------------------------------------
-- Cursor
--------------------------------------------------------------------------------
+18
View File
@@ -5608,6 +5608,23 @@ CleveRoids.Keywords = {
return not CleveRoids.ClassicAPI.IsStealthed()
end,
mounted = function(conditionals)
return CleveRoids.ClassicAPI.IsMounted()
end,
nomounted = function(conditionals)
return not CleveRoids.ClassicAPI.IsMounted()
end,
standing = function(conditionals)
return CleveRoids.ClassicAPI.GetPlayerStandState() == 0
end,
-- Any non-standing pose (sit / chair / sleep / kneel)
sitting = function(conditionals)
return CleveRoids.ClassicAPI.GetPlayerStandState() ~= 0
end,
casting = function(conditionals)
if type(conditionals.casting) ~= "table" then return CleveRoids.CheckSpellCast(conditionals.target, "") end
return Or(conditionals.casting, function (spell)
@@ -9182,6 +9199,7 @@ CleveRoids.STATIC_CONDITIONALS = {
combat = true, nocombat = true, ic = true, ooc = true,
zone = true, nozone = true,
stealth = true, nostealth = true, stl = true, nostl = true,
mounted = true, nomounted = true, standing = true, sitting = true,
form = true, noform = true, stance = true, nostance = true,
equipped = true, noequipped = true, eq = true, noeq = true,
set = true, noset = true,
+4
View File
@@ -121,6 +121,10 @@ local BOOLEAN_CONDITIONALS = {
nocombat = true,
stealth = true,
nostealth = true,
mounted = true,
nomounted = true,
standing = true,
sitting = true,
channeled = true,
nochanneled = true,
checkchanneled = true,