Chiamala come
Platform.glyphs.layout(info)
Registra la dipendenza Platform.glyphs.layout, poi chiamala con quel nome. Una chiamata con spazio dei nomi non passa self: usa una chiamata con i due punti o passa tu l'oggetto.
Cosa fa
Maps client information to the position in the GetGlyphSocketInfo result that holds the glyph spell ID. It recognizes only progression-family Wrath (3.4.0-3.4.3), Cataclysm (4.4.0-4.4.2) and Mists (5.5.0-5.5.4) clients whose version string and interface number agree, returning 3 for Wrath and 4 for Cataclysm and Mists; every other client returns nil.
Argomenti
| Nome | Tipo | Cosa fa |
|---|---|---|
info | table | Client information from addon.Platform:GetClientInfo() (projectId, family, expansion, version, interface). |
Valori restituiti
| 1 | number | nil | Return position of the glyph spell ID, or nil for an unsupported client layout. |
|---|
Edizioni
Le funzioni di supporto integrate sono registrate su ogni edizione. Ciò che cambia è l'API di gioco che leggono; dove ne manca una, la funzione di supporto ripiega su un'alternativa o restituisce nil con un motivo.
Non legge direttamente alcuna API di gioco.
Come la chiama l'addon
Platform.glyphs.GetGlyphSocketSnapshotlocal position=layout(self:GetClientInfo())
Sorgente
Platform/glyphs.lua, riga 51. Nel gioco è in sola lettura; Duplica crea una copia modificabile.
Platform.glyphs.layout(info)
local editions={
[11]={expansion=2,prefix='3.4.',last=3,base=30400,position=3},
[14]={expansion=3,prefix='4.4.',last=2,base=40400,position=4},
[19]={expansion=4,prefix='5.5.',last=4,base=50500,position=4},
}
local edition=editions[info.projectId]
if not edition or info.family~='progression' or info.expansion~=edition.expansion then return nil end
for patch=0,edition.last do
if info.version==edition.prefix..patch and info.interface==edition.base+patch then return edition.position end
end