호출 방법
addon.Platform:GetGlyphSocketSnapshot()
addon을 통해 바로 쓸 수 있으며, 의존성이 필요 없습니다.
하는 일
검증된 리치 왕, 대격변, 판다리아 클라이언트 구성에서 문양 홈을 관찰합니다. slots와 complete 플래그를 반환합니다. 각 칸은 잠겼거나 비어 있는 것으로 알려지면 active=false, 차 있으면 active=true와 spellID, 사용할 수 없으면 active nil과 이유를 가집니다. 알 수 없는 구성과 실패한 개수 조회는 nil과 이유를 반환합니다. 아이템 이름을 비교하거나 아이템과 주문의 정확한 대응을 증명하지 않습니다.
인수
| 이름 | 유형 | 하는 일 |
|---|---|---|
self | RMPlatform | Rotation Master 플랫폼 어댑터 (콜론 호출에서는 암묵적). |
반환값
| 1 | table | nil | slots와 complete를 담은 정규화된 제한된 홈 스냅샷. 조회를 사용할 수 없으면 nil. |
|---|---|---|
| 2 | string | nil | nil인 스냅샷에 대한 정책, 검증 또는 사용 불가 이유. |
버전
기본 제공 도우미는 모든 버전에 등록됩니다. 다른 점은 읽는 게임 API이며, API가 없으면 도우미는 대체 동작을 하거나 이유와 함께 nil을 반환합니다.
- 해당 버전에서 사용할 수 없음 (이유는 툴팁에 표시)
- Blizzard의 지원 중단 대체 함수가 켜져 있을 때만
비공개 값 (Retail과 Forever)
Retail과 Forever에서는 게임이 애드온에 비공개 값을 넘깁니다. 이 도우미는 읽는 값을 확인하고(addon.Platform:CanReadValue), 비교할 수 없는 비공개 값 대신 restricted-value 같은 이유와 함께 nil을 반환합니다. nil은 거짓이 아니라 사용할 수 없음으로 취급하세요.
예시
local snapshot = addon.Platform:GetGlyphSocketSnapshot()
if not snapshot then return nil end
for _, slot in ipairs(snapshot.slots) do
if slot.active and slot.spellID == value.spell then return true end
end
if not snapshot.complete then return nil end
return false의존성
integer→Platform.glyphs.integerlayout→Platform.glyphs.layoutsocket→Platform.glyphs.socket
소스
Platform/glyphs.lua, 97번째 줄. 게임에서는 읽기 전용이며, 복제하면 편집 가능한 사본이 생깁니다.
Platform.glyphs.GetGlyphSocketSnapshot(self)
local position=layout(self:GetClientInfo())
if not position then return nil,'unsupported-glyph-layout' end
if type(GetNumGlyphSockets)~='function' then return nil,'missing-api' end
local ok,count=pcall(GetNumGlyphSockets)
if not ok then return nil,'api-error' end
if not self:CanReadValue(count) then return nil,'restricted-value' end
if count==nil then return nil,'glyph-data-unavailable' end
if not integer(count,0) or count>64 then return nil,'invalid-api-result' end
local fn=GetGlyphSocketInfo
if count>0 and type(fn)~='function' then return nil,'missing-api' end
local result={slots={},complete=true}
for index=1,count do
local record=socket(self,fn,index,position)
result.slots[index]=record
if record.active==nil then result.complete=false end
end
return result




