호출 방법
addon.Platform:GetLossOfControlCount()
addon을 통해 바로 쓸 수 있으며, 의존성이 필요 없습니다.
하는 일
보호된 인수 없는 점 호출로 문서화된 활성 제어 불가 개수를 읽습니다. 읽을 수 있는 유한한 음수가 아닌 정수가 필요합니다. 0은 완전한 빈 검색이며 행 API가 필요 없습니다. RM은 검색을 256행으로 제한하고 그 자원 예산을 넘으면 사용할 수 없음을 반환하며, 이는 밝혀진 기본 최댓값이 아닙니다. 필수 관찰이 없거나, 실패하거나, 제한되거나, 잘못되면 사용할 수 없음으로 남습니다.
인수
| 이름 | 유형 | 하는 일 |
|---|---|---|
self | RMPlatform | Rotation Master 플랫폼 어댑터 (콜론 호출에서는 암묵적). |
반환값
| 1 | number | nil | 0부터 RM 검색 예산까지의 알려진 활성 개수. 사용할 수 없으면 nil. |
|---|---|---|
| 2 | string | nil | nil 개수에 대한 전투 정책, 기능, 관찰 또는 검색 예산 이유. |
버전
기본 제공 도우미는 모든 버전에 등록됩니다. 다른 점은 읽는 게임 API이며, API가 없으면 도우미는 대체 동작을 하거나 이유와 함께 nil을 반환합니다.
- 해당 버전에서 사용할 수 없음 (이유는 툴팁에 표시)
- Blizzard의 지원 중단 대체 함수가 켜져 있을 때만
| 게임 API | |||||
|---|---|---|---|---|---|
C_LossOfControl | |||||
canaccessvalue |
비공개 값 (Retail과 Forever)
Retail과 Forever에서는 게임이 애드온에 비공개 값을 넘깁니다. 이 도우미는 읽는 값을 확인하고(addon.Platform:CanReadValue), 비교할 수 없는 비공개 값 대신 restricted-value 같은 이유와 함께 nil을 반환합니다. nil은 거짓이 아니라 사용할 수 없음으로 취급하세요.
예시
local count = addon.Platform:GetLossOfControlCount()
if count == nil then return nil end
return count > 0소스
Platform/loss_of_control.lua, 16번째 줄. 게임에서는 읽기 전용이며, 복제하면 편집 가능한 사본이 생깁니다.
Platform.loss_of_control.GetLossOfControlCount(self)
local policy=self:GetCombatDataPolicy()
if policy~='probe' and policy~='restricted' then return nil,'unsupported-policy' end
local namespace=C_LossOfControl
if not self:CanReadValue(namespace) then return nil,'restricted-value' end
if type(namespace)~='table' then return nil,'missing-api' end
local methodOk,method=pcall(function() return namespace.GetActiveLossOfControlDataCount end)
if not methodOk then return nil,'api-error' end
if not self:CanReadValue(method) then return nil,'restricted-value' end
if type(method)~='function' then return nil,'missing-api' end
local ok,count=pcall(method)
if not ok then return nil,'api-error' end
if not self:CanReadValue(count) then return nil,'restricted-value' end
if canaccessvalue and not canaccessvalue(count) then return nil,'restricted-value' end
if count==nil then return nil,'loss-of-control-count-unavailable' end
if type(count)~='number' or count~=count or count==math.huge or count==-math.huge or count<0 or count%1~=0 then return nil,'invalid-api-result' end
if count>256 then return nil,'loss-of-control-budget-exceeded' end
return count




