Call as
addon.Platform:GetPlayerFormObservation()
Available directly through addon; no dependency is needed.
What it does
Observe the current player form with one protected zero-argument GetShapeshiftForm call. Preserve every readable finite numeric result, including zero, signed and fractional values; no stronger native index domain is inferred. Missing, failed, nil, restricted or nonfinite data remains unavailable. No form count, class, spell ID, unit or optional argument is added.
Arguments
| Name | Type | What it does |
|---|---|---|
self | RMPlatform | Rotation Master platform adapter (implicit with colon calls). |
Returns
| 1 | number | nil | Readable finite current-form observation, including zero for the current unshifted comparison; nil when unavailable. |
|---|---|---|
| 2 | string | nil | Client-policy, capability, call or observation availability reason for a nil form. |
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 | |||||
|---|---|---|---|---|---|
GetShapeshiftForm | |||||
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 form = addon.Platform:GetPlayerFormObservation()
if form == nil then return nil end
return form == 0 -- not shapeshiftedSource
Platform/form.lua, line 17. Read only in game; Duplicate makes an editable copy.
Platform.form.GetPlayerFormObservation(self)
local policy=self:GetCombatDataPolicy()
if policy~='probe' and policy~='restricted' then return nil,'unsupported-policy' end
if type(GetShapeshiftForm)~='function' then return nil,'missing-api' end
local ok,result=pcall(GetShapeshiftForm)
if not ok then return nil,'api-error' end
if not self:CanReadValue(result) then return nil,'restricted-value' end
if canaccessvalue and not canaccessvalue(result) then return nil,'restricted-value' end
if result==nil then return nil,'form-unavailable' end
if type(result)~='number' or result~=result or result==math.huge or result==-math.huge then return nil,'invalid-api-result' end
return result




