Call as
Conditions.totem.observe(cache, method, ...)
Record the dependency Conditions.totem.observe, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.
What it does
Calls a totem platform method through the evaluation cache, passing the platform as its self argument.
Arguments
| Name | Type | What it does |
|---|---|---|
cache | table | nil | Evaluation-pass cache passed to getCached, or nil to read directly. |
method | function | Platform method, such as platform.GetTotemInfo. |
... | any | Arguments forwarded after the platform. |
Returns
| 1 | any | Whatever the method returns, typically a record or nil and a 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.
It reads no game API directly.
How the addon calls it
- Totem Present (evaluate)
local record,reason=observe(cache,platform.GetTotemInfo,value.spell) - Totem Time Remaining (evaluate)
local record,reason=observe(cache,platform.GetTotemInfo,value.spell) Conditions.totem.findSpecificlocal target,reason=observe(cache,platform.GetSpellInfo,value.spell)
Dependencies
platform(builtin:Conditions/totem.lua:platform)
Source
Conditions/totem.lua, line 54. Read only in game; Duplicate makes an editable copy.
Conditions.totem.observe(cache, method, ...)
return addon.getCached(cache,method,platform,...)