Call as
addon.Platform:GetPlayerOwnerClassObservation()
Available directly through addon; no dependency is needed.
What it does
Read a fresh protected UnitClass player observation for rotation ownership. Consume only the readable nonempty class filename from return two. No existence, level, vehicle, family or combat-policy read is added, and no result persists across calls. Core ownership still validates the class token and character key separately; overridden context providers retain their complete original path.
Arguments
| Name | Type | What it does |
|---|---|---|
self | RMPlatform | Rotation Master platform adapter (implicit with colon calls). |
Returns
| 1 | string | nil | Fresh readable class filename, or nil when unavailable. |
|---|---|---|
| 2 | string | nil | Capability or observation availability reason for a nil class. |
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 | |||||
|---|---|---|---|---|---|
UnitClass | |||||
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.
Example
local class = addon.Platform:GetPlayerOwnerClassObservation()
if class == nil then return nil end
return class == "DRUID"Source
Platform/rotation_owner.lua, line 18. Read only in game; Duplicate makes an editable copy.
Platform.rotation_owner.GetPlayerOwnerClassObservation(self)
if type(UnitClass)~='function' then return nil,'missing-api' end
local ok,_,class=pcall(UnitClass,'player')
if not ok then return nil,'api-error' end
if not self:CanReadValue(class) then return nil,'restricted-value' end
if canaccessvalue and not canaccessvalue(class) then return nil,'restricted-value' end
if class==nil then return nil,'class-data-unavailable' end
if type(class)~='string' or class=='' then return nil,'invalid-api-result' end
return class




