World of Warcraft Forever API · C_NamePlateManager.md, for your AI
C_NamePlateManager
4 functions, 7 events, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
C_NamePlateManager.GetNamePlateHitTestInsets
left, right, top, bottom = C_NamePlateManager.GetNamePlateHitTestInsets(type)
Returns the values used to adjust the hit testing area for nameplates.
Arguments
type | NamePlateType |
|---|
Returns
left | uiUnit | |
|---|---|---|
right | uiUnit | |
top | uiUnit | |
bottom | uiUnit |
C_NamePlateManager.IsNamePlateUnitBehindCamera
isBehindCamera = C_NamePlateManager.IsNamePlateUnitBehindCamera(unitToken)
Returns whether the unit to which the nameplate is attached is behind the player's camera.
Arguments
unitToken | UnitTokenNamePlate |
|---|
Returns
isBehindCamera | bool |
|---|
C_NamePlateManager.SetNamePlateHitTestInsets
C_NamePlateManager.SetNamePlateHitTestInsets(type, left, right, top, bottom)
Provide values to adjust the hit testing area for nameplates. Positive values will decrease the hit test area, negative values will increase it. Note that all hit testing is clamped to the bounds of the nameplate and can not be moved outside it.
Arguments
type | NamePlateType | |
|---|---|---|
left | uiUnit | |
right | uiUnit | |
top | uiUnit | |
bottom | uiUnit |
C_NamePlateManager.SetNamePlateSimplified
C_NamePlateManager.SetNamePlateSimplified(unitToken, isSimplified)
Set whether the nameplate attached to a unit is considered simplified, which can change the way it's displayed.
Arguments
unitToken | UnitTokenNamePlate | |
|---|---|---|
isSimplified | bool |
Events
FORBIDDEN_NAME_PLATE_CREATED
namePlateFrame | NamePlateFrame |
|---|
FORBIDDEN_NAME_PLATE_UNIT_ADDED
unitToken | UnitTokenType |
|---|
FORBIDDEN_NAME_PLATE_UNIT_REMOVED
unitToken | UnitTokenType |
|---|
NAME_PLATE_CREATED
namePlateFrame | NamePlateFrame |
|---|
NAME_PLATE_UNIT_ADDED
unitToken | UnitTokenType |
|---|
NAME_PLATE_UNIT_BEHIND_CAMERA_CHANGED
unitTarget | UnitTokenVariant | |
|---|---|---|
isBehindCamera | bool |
NAME_PLATE_UNIT_REMOVED
unitToken | UnitTokenType |
|---|