Call as
addon.Platform:GetTalentGroupRoleObservation(group)
Available directly through addon; no dependency is needed.
What it does
Observe the first role result of the exact legacy GetTalentGroupRole(group) dot call on probe- and restricted-policy clients. Forward the readable selected group unchanged, including nil as one argument; do not infer group bounds, substitute another API or query a player unit. The complete legacy primary declaration is not established. Missing, failed, restricted, empty or malformed role data is unavailable; readable nonempty future strings remain exact.
Arguments
| Name | Type | What it does |
|---|---|---|
self | RMPlatform | Rotation Master platform adapter (implicit with colon calls). |
group | any | Live selected talent-group argument, forwarded unchanged as one argument after readability checking. |
Returns
| 1 | string | nil | Known nonempty role string, or nil when unavailable. |
|---|---|---|
| 2 | string | nil | Policy, capability or required-observation availability reason. |
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 | |||||
|---|---|---|---|---|---|
GetTalentGroupRole |
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.
Example
local group = GetActiveTalentGroup and GetActiveTalentGroup()
local role = addon.Platform:GetTalentGroupRoleObservation(group)
if role == nil then return nil end
return role == "TANK"Dependencies
readField→Platform.role.readFieldroleValue→Platform.role.roleValue
Source
Platform/role.lua, line 96. Read only in game; Duplicate makes an editable copy.
Platform.role.GetTalentGroupRoleObservation(self, group)
local policy=self:GetCombatDataPolicy()
if policy~='probe' and policy~='restricted' then return nil,'unsupported-policy' end
if not self:CanReadValue(group) then return nil,'restricted-value' end
local query,reason=readField(self,_G,'GetTalentGroupRole')
if reason then return nil,reason end
if type(query)~='function' then return nil,'missing-api' end
local ok,role=pcall(query,group)
if not ok then return nil,'api-error' end
return roleValue(self,role)




