mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
[swimming] via ClassicAPI IsSwimming; drop nampower 2.36 gate
Add ClassicAPI.IsSwimming wrapper and route [swimming]/[noswimming] and the swim/noswim aliases through it. Removes the Nampower v2.36 hasPlayerIsSwimming version gate and the "requires Nampower 2.36" warning (ClassicAPI's IsSwimming is always available). Same semantics.
This commit is contained in:
@@ -128,6 +128,11 @@ function API.IsStealthed()
|
||||
return IsStealthed()
|
||||
end
|
||||
|
||||
-- True if the player is currently swimming.
|
||||
function API.IsSwimming()
|
||||
return IsSwimming() and true or false
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- NamePlate
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
+5
-33
@@ -7412,26 +7412,12 @@ CleveRoids.Keywords = {
|
||||
|
||||
-- [swimming] - Player is currently swimming (Nampower v2.36+)
|
||||
swimming = function(conditionals)
|
||||
if not CleveRoids.NampowerAPI.features.hasPlayerIsSwimming then
|
||||
if not CleveRoids._swimmingErrorShown then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000[SuperCleveRoidMacros]|r The [swimming] conditional requires Nampower v2.36.0 or newer.", 1, 0.5, 0.5)
|
||||
CleveRoids._swimmingErrorShown = true
|
||||
end
|
||||
return false
|
||||
end
|
||||
return PlayerIsSwimming() == 1
|
||||
return CleveRoids.ClassicAPI.IsSwimming()
|
||||
end,
|
||||
|
||||
-- [noswimming] - Player is NOT swimming (Nampower v2.36+)
|
||||
-- [noswimming] - Player is NOT swimming
|
||||
noswimming = function(conditionals)
|
||||
if not CleveRoids.NampowerAPI.features.hasPlayerIsSwimming then
|
||||
if not CleveRoids._swimmingErrorShown then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000[SuperCleveRoidMacros]|r The [swimming] conditional requires Nampower v2.36.0 or newer.", 1, 0.5, 0.5)
|
||||
CleveRoids._swimmingErrorShown = true
|
||||
end
|
||||
return false
|
||||
end
|
||||
return PlayerIsSwimming() ~= 1
|
||||
return not CleveRoids.ClassicAPI.IsSwimming()
|
||||
end,
|
||||
|
||||
-- [rooted] - Player is currently rooted (Nampower v2.36+)
|
||||
@@ -9235,24 +9221,10 @@ CleveRoids.Keywords = {
|
||||
|
||||
-- swim / noswim → swimming / noswimming (saves 4/6 chars)
|
||||
swim = function(conditionals)
|
||||
if not CleveRoids.NampowerAPI.features.hasPlayerIsSwimming then
|
||||
if not CleveRoids._swimmingErrorShown then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000[SuperCleveRoidMacros]|r The [swimming] conditional requires Nampower v2.36.0 or newer.", 1, 0.5, 0.5)
|
||||
CleveRoids._swimmingErrorShown = true
|
||||
end
|
||||
return false
|
||||
end
|
||||
return PlayerIsSwimming() == 1
|
||||
return CleveRoids.ClassicAPI.IsSwimming()
|
||||
end,
|
||||
noswim = function(conditionals)
|
||||
if not CleveRoids.NampowerAPI.features.hasPlayerIsSwimming then
|
||||
if not CleveRoids._swimmingErrorShown then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000[SuperCleveRoidMacros]|r The [swimming] conditional requires Nampower v2.36.0 or newer.", 1, 0.5, 0.5)
|
||||
CleveRoids._swimmingErrorShown = true
|
||||
end
|
||||
return false
|
||||
end
|
||||
return PlayerIsSwimming() ~= 1
|
||||
return not CleveRoids.ClassicAPI.IsSwimming()
|
||||
end,
|
||||
|
||||
-- osp / noosp → onswingpending / noonswingpending (saves 11/13 chars)
|
||||
|
||||
Reference in New Issue
Block a user