호출 방법
addon.Platform:GetTalentGroupRoleObservation(group)
addon을 통해 바로 쓸 수 있으며, 의존성이 필요 없습니다.
하는 일
점검 또는 제한 정책 클라이언트에서 이전 방식의 정확한 GetTalentGroupRole(group) 점 호출의 첫 번째 역할 결과를 관찰합니다. 읽을 수 있는 선택 그룹을 nil을 인수 하나로 포함해 그대로 전달하며, 그룹 범위를 추론하거나, 다른 API로 대체하거나, 플레이어 유닛을 조회하지 않습니다. 이전 방식의 완전한 주 역할 선언은 판단하지 않습니다. 역할 데이터가 없거나, 실패하거나, 제한되거나, 비어 있거나, 잘못되면 사용할 수 없으며, 읽을 수 있는 비어 있지 않은 향후 문자열은 그대로 유지합니다.
인수
| 이름 | 유형 | 하는 일 |
|---|---|---|
self | RMPlatform | Rotation Master 플랫폼 어댑터 (콜론 호출에서는 암묵적). |
group | any | 실시간으로 선택된 특성 그룹 인수. 읽기 가능 여부 확인 후 인수 하나로 그대로 전달됩니다. |
반환값
| 1 | string | nil | 알려진 비어 있지 않은 역할 문자열. 사용할 수 없으면 nil. |
|---|---|---|
| 2 | string | nil | 정책, 기능 또는 필수 관찰 사용 불가 이유. |
버전
기본 제공 도우미는 모든 버전에 등록됩니다. 다른 점은 읽는 게임 API이며, API가 없으면 도우미는 대체 동작을 하거나 이유와 함께 nil을 반환합니다.
- 해당 버전에서 사용할 수 없음 (이유는 툴팁에 표시)
- Blizzard의 지원 중단 대체 함수가 켜져 있을 때만
| 게임 API | |||||
|---|---|---|---|---|---|
GetTalentGroupRole |
비공개 값 (Retail과 Forever)
Retail과 Forever에서는 게임이 애드온에 비공개 값을 넘깁니다. 이 도우미는 읽는 값을 확인하고(addon.Platform:CanReadValue), 비교할 수 없는 비공개 값 대신 restricted-value 같은 이유와 함께 nil을 반환합니다. nil은 거짓이 아니라 사용할 수 없음으로 취급하세요.
예시
local group = GetActiveTalentGroup and GetActiveTalentGroup()
local role = addon.Platform:GetTalentGroupRoleObservation(group)
if role == nil then return nil end
return role == "TANK"의존성
readField→Platform.role.readFieldroleValue→Platform.role.roleValue
소스
Platform/role.lua, 96번째 줄. 게임에서는 읽기 전용이며, 복제하면 편집 가능한 사본이 생깁니다.
Platform.role.GetTalentGroupRoleObservation(self, group)
local policy=self:GetCombatDataPolicy()
if policy~='probe' and policy~='restricted' then return nil,'unsupported-policy' end
if not self:CanReadValue(group) then return nil,'restricted-value' end
local query,reason=readField(self,_G,'GetTalentGroupRole')
if reason then return nil,reason end
if type(query)~='function' then return nil,'missing-api' end
local ok,role=pcall(query,group)
if not ok then return nil,'api-error' end
return roleValue(self,role)




