호출 방법
Platform.glyphs.layout(info)
의존성 Platform.glyphs.layout을(를) 기록한 뒤 그 이름으로 호출하세요. 네임스페이스 호출은 self를 넘기지 않으므로 콜론 호출을 쓰거나 객체를 직접 넘기세요.
하는 일
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.
인수
| 이름 | 유형 | 하는 일 |
|---|---|---|
info | table | Client information from addon.Platform:GetClientInfo() (projectId, family, expansion, version, interface). |
반환값
| 1 | number | nil | Return position of the glyph spell ID, or nil for an unsupported client layout. |
|---|
버전
기본 제공 도우미는 모든 버전에 등록됩니다. 다른 점은 읽는 게임 API이며, API가 없으면 도우미는 대체 동작을 하거나 이유와 함께 nil을 반환합니다.
게임 API를 직접 읽지 않습니다.
애드온에서 호출하는 방식
Platform.glyphs.GetGlyphSocketSnapshotlocal position=layout(self:GetClientInfo())
소스
Platform/glyphs.lua, 51번째 줄. 게임에서는 읽기 전용이며, 복제하면 편집 가능한 사본이 생깁니다.
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