Aufruf als
addon:GetConditionPointResourceV2(unit, cache)
Direkt über addon verfügbar; keine Abhängigkeit nötig.
Was sie bewirkt
Punktressourcen mit der ursprünglichen Live-Klassenzuordnung und dem Identitäts-Cache auflösen, mit einer expliziten Transportrichtlinie für den ComboPoints-Rückgriff des TBC-Spielers. Ein Spieler-Rückgriff, der zur lesbaren rohen Tabelle Enum.PowerType und zum beim Laden des Moduls erfassten Wert ComboPoints passt, wählt target-combo; explizite Einträge der Klassenzuordnung, andere Akteure und andere Familien behalten power. Ersetzte, geerbte oder nicht nachweisbare Herkunft des Rückgriffs behält power. Diese versionierte Richtlinie behauptet nicht, dass das native UnitPower defekt oder gleichwertig ist. Bekannte Abwesenheit der Einheit ergibt false; nicht verfügbare erforderliche Beobachtungen ergeben nil mit einem Grund. Hier wird weder die aktuelle noch die maximale Menge abgefragt.
Argumente
| Name | Typ | Was sie bewirkt |
|---|---|---|
self | RMAddon | Addon-Instanz von Rotation Master (bei Doppelpunktaufrufen implizit). |
unit | string | Exakte ausgewählte Einheitenkennung; nur die literale Kennung player darf den TBC-Combo-Transport wählen. |
cache | table | nil | Cache des Auswertungsdurchlaufs oder nil, um die Identität direkt zu beobachten. Erfolgreiche Beobachtungen der Spielerklasse können den vorhandenen Langzeit-Identitäts-Cache nutzen; die Ressourcenzuordnung bleibt live. |
Rückgabewerte
| 1 | number | boolean | nil | Expliziter nichtnegativer ganzzahliger Selektor, false bei bekannter Abwesenheit der Einheit oder nil, wenn erforderliche Daten nicht verfügbar sind. |
|---|---|---|
| 2 | string | nil | Grund aus Richtlinie, Abfragevalidierung oder Identitäts-/Selektorverfügbarkeit für einen nil-Selektor. |
| 3 | string | nil | Nur bei einer ausgewählten Ressource: target-combo für den expliziten TBC-Spieler-Rückgriff oder power für den vorhandenen Transport der ausgewählten Einheit. |
Editionen
Integrierte Hilfsfunktionen werden auf jeder Edition registriert. Unterschiedlich ist die Spiel-API, die sie lesen; fehlt eine, weicht die Hilfsfunktion aus oder gibt nil mit einem Grund zurück.
- Auf dieser Edition nicht verfügbar (den Grund nennt der Tooltip)
- Nur, solange Blizzards Ersatz für veraltete Funktionen aktiv ist
| Spiel-API | |||||
|---|---|---|---|---|---|
Enum | |||||
canaccessvalue |
Geheime Werte (Retail und Forever)
Auf Retail und Forever übergibt das Spiel Addons geheime Werte. Diese Hilfsfunktion prüft, was sie liest (addon.Platform:CanReadValue), und gibt statt eines geheimen Werts, den sie nicht vergleichen kann, nil mit einem Grund wie restricted-value zurück. Behandeln Sie nil als nicht verfügbar, nicht als false.
Wie das Addon sie aufruft
- Punkte (evaluate)
local point,reason,transport=addon:GetConditionPointResourceV2(value.unit,cache)
Abhängigkeiten
editionPointResource→Core.point_conditions.editionPointResourceplayerClassCacheKey(builtin:Core/point_conditions.lua:playerClassCacheKey)pointComboTypes(builtin:Core/point_conditions.lua:pointComboTypes)pointComboValue(builtin:Core/point_conditions.lua:pointComboValue)pointIdentity→Core.point_conditions.pointIdentity
Quelle
Core/point_conditions.lua, Zeile 210. Im Spiel schreibgeschützt; Duplizieren erstellt eine bearbeitbare Kopie.
Core.point_conditions.GetConditionPointResourceV2(self, unit, cache)
local platform=self.Platform
local info=platform:GetClientInfo()
local policy=info.combatDataPolicy
if policy~='probe' and policy~='restricted' then return nil,'unsupported-policy' end
if not platform:CanReadValue(unit) then return nil,'restricted-value' end
if type(unit)~='string' or unit=='' then return nil,'invalid-unit' end
local record,reason=addon.Functions.cache.getCached(cache,pointIdentity,self,unit,playerClassCacheKey)
if not record then return nil,reason end
if not record.exists then return false end
local family=info.family
if policy=='probe' and (family=='era' or family=='progression') then return editionPointResource(platform,info,unit,record.class,cache) end
local points=self.points
if not platform:CanReadValue(points) then return nil,'restricted-value' end
if type(points)~='table' then return nil,'invalid-point-resource-map' end
local fallbackEnum,fallbackTypes
local ok,selected=pcall(function() return points[record.class] end)
if not ok then return nil,'api-error' end
if not platform:CanReadValue(selected) then return nil,'restricted-value' end
if selected==nil or selected==false then
local enum=Enum
if not platform:CanReadValue(enum) then return nil,'restricted-value' end
if type(enum)~='table' then return nil,'point-resource-unavailable' end
local typesOK,types=pcall(function() return enum.PowerType end)
if not typesOK then return nil,'api-error' end
if not platform:CanReadValue(types) then return nil,'restricted-value' end
if type(types)~='table' then return nil,'point-resource-unavailable' end
local fallbackOK,fallback=pcall(function() return types.ComboPoints end)
if not fallbackOK then return nil,'api-error' end
selected=fallback
if not platform:CanReadValue(selected) then return nil,'restricted-value' end
fallbackEnum,fallbackTypes=enum,types
end
if selected==nil then return nil,'point-resource-unavailable' end
if type(selected)~='number' or selected~=selected or selected<0 or selected==math.huge or selected%1~=0 then return nil,'invalid-point-resource' end
if policy=='restricted' and not platform:IsNeverSecretPointPower(selected) then return nil,'unsupported-policy' end
local transport='power'
if unit=='player' and fallbackTypes then
local rawTypes,rawCombo=rawget(fallbackEnum,'PowerType'),rawget(fallbackTypes,'ComboPoints')
if platform:CanReadValue(pointComboTypes) and (not canaccessvalue or canaccessvalue(pointComboTypes))
and platform:CanReadValue(rawTypes) and (not canaccessvalue or canaccessvalue(rawTypes))
and rawequal(fallbackTypes,pointComboTypes) and rawequal(rawTypes,fallbackTypes)
and platform:CanReadValue(rawCombo) and (not canaccessvalue or canaccessvalue(rawCombo)) and rawCombo==selected
and platform:CanReadValue(pointComboValue) and (not canaccessvalue or canaccessvalue(pointComboValue))
and pointComboValue==selected then
local family
if platform:CanReadValue(info) and type(info)=='table' then family=rawget(info,'family') end
if platform:CanReadValue(family) and (not canaccessvalue or canaccessvalue(family)) and family=='tbc' then transport='target-combo' end
end
end
return selected,nil,transport




