use nampower for default moving conditional when available. add rooted to mycc/nomycc/cc/nocc. add swimming/noswimming support with nampower 2_36

This commit is contained in:
Jrc13245
2026-02-15 14:38:58 -05:00
parent e3cfde0506
commit d5fefc3198
2 changed files with 47 additions and 13 deletions
+16 -1
View File
@@ -97,7 +97,12 @@
(e.g., "0x0600000012345678") instead of raw numbers to avoid Lua 64-bit precision loss
- LearnTalentRank(talentPage, talentIndex, rank) - Learn a specific talent rank directly
Current version: v2.35.0
Player State Functions (v2.36+):
- PlayerIsMoving() - Returns 1 if player is moving, nil if stationary
- PlayerIsRooted() - Returns 1 if player is rooted, nil if not
- PlayerIsSwimming() - Returns 1 if player is swimming, nil if not
Current version: v2.36.0
]]
local _G = _G or getfenv(0)
@@ -262,6 +267,11 @@ API.VERSION_REQUIREMENTS = {
-- v2.35+ - GUID string fix and talent helper
["GuidStringFormat"] = { 2, 35, 0 }, -- GetUnitData/GetUnitField return GUID fields as hex strings
["LearnTalentRank"] = { 2, 35, 0, "LearnTalentRank" },
-- v2.36+ - Player state functions
["PlayerIsMoving"] = { 2, 36, 0, "PlayerIsMoving" },
["PlayerIsRooted"] = { 2, 36, 0, "PlayerIsRooted" },
["PlayerIsSwimming"] = { 2, 36, 0, "PlayerIsSwimming" },
}
-- Check if a specific feature is available
@@ -410,6 +420,11 @@ local function InitializeFeatures()
f.hasGuidStringFormat = API.HasFeature("GuidStringFormat")
f.hasLearnTalentRank = API.HasFeature("LearnTalentRank")
-- v2.36+ Player state functions
f.hasPlayerIsMoving = API.HasFeature("PlayerIsMoving")
f.hasPlayerIsRooted = API.HasFeature("PlayerIsRooted")
f.hasPlayerIsSwimming = API.HasFeature("PlayerIsSwimming")
-- Runtime detection for enhanced spell functions (verify by testing)
if f.hasEnhancedSpellFunctions and GetSpellTexture then
local success, result = pcall(function()