Call as
addon:GetConditionPointResourceV2(unit, cache)
Available directly through addon; no dependency is needed.
What it does
Resolve point resources using the original live class mapping and identity cache, with an explicit TBC player ComboPoints-fallback transport policy. A player fallback matching the readable raw Enum.PowerType table and ComboPoints value captured at module load selects target-combo; explicit class-map entries, other actors and other families retain power. Replaced, inherited or unprovable fallback provenance retains power. This versioned policy does not claim native UnitPower is broken or equivalent. Known unit absence returns false; unavailable required observations return nil with a reason. No current or maximum quantity is queried here.
Arguments
| Name | Type | What it does |
|---|---|---|
self | RMAddon | Rotation Master addon instance (implicit with colon calls). |
unit | string | Exact selected unit token; only the literal player token may select the TBC combo transport. |
cache | table | nil | Evaluation-pass cache, or nil to observe identity directly. Successful player class observations may use the existing longterm identity cache; resource mapping remains live. |
Returns
| 1 | number | boolean | nil | Explicit nonnegative integer selector, false for known unit absence, or nil when required data is unavailable. |
|---|---|---|
| 2 | string | nil | Policy, query-validation or identity/selector availability reason for a nil selector. |
| 3 | string | nil | On a selected resource only, target-combo for the explicit TBC player fallback or power for the existing selected-unit transport. |
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
- Not available on that edition (the reason is in the tooltip)
- Only while Blizzard's deprecation fallbacks are on
| Game API | |||||
|---|---|---|---|---|---|
Enum | |||||
canaccessvalue |
Secret values (Retail and Forever)
On Retail and Forever the game hands addons secret values. This helper checks what it reads (addon.Platform:CanReadValue) and returns nil with a reason such as restricted-value instead of a secret it cannot compare. Treat nil as unavailable, not as false.
How the addon calls it
- Points (evaluate)
local point,reason,transport=addon:GetConditionPointResourceV2(value.unit,cache)
Dependencies
editionPointResource→Core.point_conditions.editionPointResourceplayerClassCacheKey(builtin:Core/point_conditions.lua:playerClassCacheKey)pointComboTypes(builtin:Core/point_conditions.lua:pointComboTypes)pointComboValue(builtin:Core/point_conditions.lua:pointComboValue)pointIdentity→Core.point_conditions.pointIdentity
Source
Core/point_conditions.lua, line 210. Read only in game; Duplicate makes an editable copy.
Core.point_conditions.GetConditionPointResourceV2(self, unit, cache)
local platform=self.Platform
local info=platform:GetClientInfo()
local policy=info.combatDataPolicy
if policy~='probe' and policy~='restricted' then return nil,'unsupported-policy' end
if not platform:CanReadValue(unit) then return nil,'restricted-value' end
if type(unit)~='string' or unit=='' then return nil,'invalid-unit' end
local record,reason=addon.Functions.cache.getCached(cache,pointIdentity,self,unit,playerClassCacheKey)
if not record then return nil,reason end
if not record.exists then return false end
local family=info.family
if policy=='probe' and (family=='era' or family=='progression') then return editionPointResource(platform,info,unit,record.class,cache) end
local points=self.points
if not platform:CanReadValue(points) then return nil,'restricted-value' end
if type(points)~='table' then return nil,'invalid-point-resource-map' end
local fallbackEnum,fallbackTypes
local ok,selected=pcall(function() return points[record.class] end)
if not ok then return nil,'api-error' end
if not platform:CanReadValue(selected) then return nil,'restricted-value' end
if selected==nil or selected==false then
local enum=Enum
if not platform:CanReadValue(enum) then return nil,'restricted-value' end
if type(enum)~='table' then return nil,'point-resource-unavailable' end
local typesOK,types=pcall(function() return enum.PowerType end)
if not typesOK then return nil,'api-error' end
if not platform:CanReadValue(types) then return nil,'restricted-value' end
if type(types)~='table' then return nil,'point-resource-unavailable' end
local fallbackOK,fallback=pcall(function() return types.ComboPoints end)
if not fallbackOK then return nil,'api-error' end
selected=fallback
if not platform:CanReadValue(selected) then return nil,'restricted-value' end
fallbackEnum,fallbackTypes=enum,types
end
if selected==nil then return nil,'point-resource-unavailable' end
if type(selected)~='number' or selected~=selected or selected<0 or selected==math.huge or selected%1~=0 then return nil,'invalid-point-resource' end
if policy=='restricted' and not platform:IsNeverSecretPointPower(selected) then return nil,'unsupported-policy' end
local transport='power'
if unit=='player' and fallbackTypes then
local rawTypes,rawCombo=rawget(fallbackEnum,'PowerType'),rawget(fallbackTypes,'ComboPoints')
if platform:CanReadValue(pointComboTypes) and (not canaccessvalue or canaccessvalue(pointComboTypes))
and platform:CanReadValue(rawTypes) and (not canaccessvalue or canaccessvalue(rawTypes))
and rawequal(fallbackTypes,pointComboTypes) and rawequal(rawTypes,fallbackTypes)
and platform:CanReadValue(rawCombo) and (not canaccessvalue or canaccessvalue(rawCombo)) and rawCombo==selected
and platform:CanReadValue(pointComboValue) and (not canaccessvalue or canaccessvalue(pointComboValue))
and pointComboValue==selected then
local family
if platform:CanReadValue(info) and type(info)=='table' then family=rawget(info,'family') end
if platform:CanReadValue(family) and (not canaccessvalue or canaccessvalue(family)) and family=='tbc' then transport='target-combo' end
end
end
return selected,nil,transport




