GetAbilityCost does not return 2 values! It only returns 1 -> the costs (number).
It got 4 parameters where the 2nd is the mechanicFlag you need to pass in to the function.
GetAbilityBaseCostInfo coud be the one you are searching for, as it will return as 2nd return value the CombatMechanicFlags
Code:
--- @param abilityId integer
--- @param overrideRank integer|nil
--- @param casterUnitTag string
--- @return integer|nil baseCost, CombatMechanicFlags|nil mechanicFlags, boolean|nil isCostChargedPerTick
function GetAbilityBaseCostInfo(abilityId, overrideRank, casterUnitTag) end
--- @param abilityId integer
--- @param mechanicFlag CombatMechanicFlags
--- @param overrideRank integer|nil
--- @param casterUnitTag string
--- @return integer cost
function GetAbilityCost(abilityId, mechanicFlag, overrideRank, casterUnitTag) end
Those api funtions, their parameters and return values, and the enums like CombatMechanicFlags can be found in the API funtions list:
https://wiki.esoui.com/APIVersion
h5. CombatMechanicFlags
* COMBAT_MECHANIC_FLAGS_DAEDRIC
* COMBAT_MECHANIC_FLAGS_HEALTH
* COMBAT_MECHANIC_FLAGS_MAGICKA
* COMBAT_MECHANIC_FLAGS_MOUNT_STAMINA
* COMBAT_MECHANIC_FLAGS_STAMINA
* COMBAT_MECHANIC_FLAGS_ULTIMATE
* COMBAT_MECHANIC_FLAGS_WEREWOLF
|
Edit:
Moved to proper forums