Quantcast UnitDetailedThreatSituation won't work with "nameplatepet" - WoWInterface
 
Thread Tools Display Modes
07-17-16, 02:53 PM   #1
Tercioo
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"])
Debug:
[C]: UnitDetailedThreatSituation()
..\FrameXML\CompactUnitFrame.lua:346: CompactUnitFrame_IsOnThreatListWithPlayer()
..\FrameXML\CompactUnitFrame.lua:509:
..\FrameXML\CompactUnitFrame.lua:499
[C]: CompactUnitFrame_UpdateName()
..\FrameXML\CompactUnitFrame.lua:92:
..\FrameXML\CompactUnitFrame.lua:51
Locals:
(*temporary) = "player"
(*temporary) = "nameplatepet5"
 
07-17-16, 05:02 PM   #2
ceylina
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


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

Code:
function CompactUnitFrame_IsOnThreatListWithPlayer(frame)
	local _, threatStatus = UnitDetailedThreatSituation("player", frame.displayedUnit);
	return IsOnThreatList(threatStatus);
end
 
08-18-16, 02:27 PM   #3
ceylina
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:

Code:
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>

Locals:
 
 

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