WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   UnitDetailedThreatSituation won't work with "nameplatepet" (https://www.wowinterface.com/forums/showthread.php?t=53917)

Tercioo 07-17-16 02:53 PM

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

Quote:

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"

ceylina 07-17-16 05:02 PM

Quote:

Originally Posted by Tercioo (Post 316506)
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


ceylina 08-18-16 02:27 PM

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:



All times are GMT -6. The time now is 10:54 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI