diff --git a/ClassicAPI.lua b/ClassicAPI.lua index 8b884ff..505ea74 100644 --- a/ClassicAPI.lua +++ b/ClassicAPI.lua @@ -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 -------------------------------------------------------------------------------- diff --git a/Conditionals.lua b/Conditionals.lua index f616d21..e640cb3 100644 --- a/Conditionals.lua +++ b/Conditionals.lua @@ -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, diff --git a/Core.lua b/Core.lua index 9f79fa8..cf983b1 100644 --- a/Core.lua +++ b/Core.lua @@ -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,