UnitDetailedThreatSituation won't work with "nameplatepet" - WoWInterface
Thread Tools Display Modes
07-17-16, 02:53 PM   #1
An Aku'mai Servant
Tercioo's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 38
UnitDetailedThreatSituation won't work with "nameplatepet"

UnitDetailedThreatSituation isn't working with the unitid "nameplatepet".

Message: ..\FrameXML\CompactUnitFrame.lua line 346:
Usage: UnitDetailedThreatSituation("unit" [, "mob"])
[C]: UnitDetailedThreatSituation()
..\FrameXML\CompactUnitFrame.lua:346: CompactUnitFrame_IsOnThreatListWithPlayer()
[C]: CompactUnitFrame_UpdateName()
(*temporary) = "player"
(*temporary) = "nameplatepet5"
07-17-16, 05:02 PM   #2
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
Originally Posted by Tercioo View Post
UnitDetailedThreatSituation isn't working with the unitid "nameplatepet".
Reported that several times during the demon invasion testing. I guess they haven't got around to it. Funny seeing how many times that has been posted in the bug forum.

Perhaps they need to just bring it online with other parts of FrameXML/CompactUnitFrame.lua

function CompactUnitFrame_IsOnThreatListWithPlayer(unit)
	local _, threatStatus = UnitDetailedThreatSituation("player", unit);
	return IsOnThreatList(threatStatus);
Perhaps should be

function CompactUnitFrame_IsOnThreatListWithPlayer(frame)
	local _, threatStatus = UnitDetailedThreatSituation("player", frame.displayedUnit);
	return IsOnThreatList(threatStatus);
08-18-16, 02:27 PM   #3
A Wyrmkin Dreamwalker
Join Date: Oct 2014
Posts: 50
To add to this, it looks like when a unit's faction changes like it does in the invasions, you can get this error:

10x FrameXML\CompactUnitFrame.lua:346: Usage: UnitDetailedThreatSituation("unit" [, "mob"])
[C]: in function `UnitDetailedThreatSituation'
FrameXML\CompactUnitFrame.lua:346: in function `CompactUnitFrame_IsOnThreatListWithPlayer'
FrameXML\CompactUnitFrame.lua:509: in function `CompactUnitFrame_UpdateName'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:126: in function `OnUnitFactionChanged'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:44: in function <...eBlizzard_NamePlates\Blizzard_NamePlates.lua:18>


WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » UnitDetailedThreatSituation won't work with "nameplatepet"

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off