Callbacks

Callbacks

LibNameplate_NewNameplate

Fires when a new nameplate appears on the screen.

Args
frame: Nameplate frame


LibNameplate_RecycleNameplate

Fires when a nameplate is hidden. Any GUIDs linked to this nameplate are no longer valid.

Args
frame: Nameplate frame


LibNameplate_FoundGUID

Fires when a GUID has been linked a nameplate.

Args
frame: Nameplate frame
GUID: GUID that's linked to the nameplate.
unitID: The unitID the GUID is from.


LibNameplate_TargetNameplate

Fires when user targets a nameplate.
Note: Use this callback instead of requesting GetTargetNameplate() on the PLAYER_TARGET_CHANGED event.

Args
frame: Nameplate frame


LibNameplate_MouseoverNameplate

Fires when user mouseover a nameplate.
Note, use this callback instead of requesting LibNP:GetNameplateByUnit("mouseover") during the UPDATE_MOUSEOVER_UNIT event.

Args
frame: Nameplate frame


LibNameplate_CombatChange

Fires when a nameplate enters or exits combat.

Args
frame: Nameplate frame


LibNameplate_HealthChange

Fires when the health of a nameplate changes.

Args
frame: Nameplate frame
health: Current health of the nameplate.


LibNameplate_ThreatChange

Fires when the threat of a nameplate changes.

Args
frame: Nameplate frame
threatSituation: LOW / MEDIUM / HIGH


Example

local LibNameplate = LibStub("LibNameplate-1.0", true)
function MyAddon:MyLoadingFunction()
	LibNameplate.RegisterCallback(MyAddon, "LibNameplate_NewNameplate")
end

function MyAddon:LibNameplate_NewNameplate(_, plate)
	local plateName = LibNameplate:GetName(plate)
	print(plateName.." is on screen!")
end

Comments

Posts Quoted:
Reply
Clear All Quotes