diff --git a/LibNameplateRegistry-1.0/LibNameplateRegistry-1.0.lua b/LibNameplateRegistry-1.0/LibNameplateRegistry-1.0.lua index 8c984c8..3e88f4a 100644 --- a/LibNameplateRegistry-1.0/LibNameplateRegistry-1.0.lua +++ b/LibNameplateRegistry-1.0/LibNameplateRegistry-1.0.lua @@ -43,7 +43,7 @@ This file was last updated on @file-date-iso@ by @file-author@ -- -- Library framework {{{ -local MAJOR, MINOR = "LibNameplateRegistry-1.0", 19 +local MAJOR, MINOR = "LibNameplateRegistry-1.0", 20 -- used to be set using debug packager tags but they've been broken ever since the new wowace.com... -- see: https://www.curseforge.com/forums/wow-sites/wow-sites-feedback/185461-curse-keyword-substitution-not-applied-for @@ -343,7 +343,16 @@ function LNR_Private.RawGetPlateType (frame) local unitToken = LNR_Private:GetUnitTokenFromPlate(frame); - local reaction = UnitReaction('player', unitToken); + -- a recent accessibility update is using nameplates to display interaction + -- icons over GameObject on which UnitReaction returns nil. + -- In such case, return a number that will be interpreted as neutral + local reaction = UnitReaction('player', unitToken) or 3; + + --@debug@ + if DEBUG then + Debug(INFO, 'RawGetPlateType - unitToken:', unitToken, 'reaction:', UnitReaction('player', unitToken), 'final reaction:', reaction); + end + --@end-debug@ if reaction > 4 then reaction = 'FRIENDLY'; @@ -354,7 +363,7 @@ function LNR_Private.RawGetPlateType (frame) end --TODO check if tapped state is still detectable in some ways (API removed in 7.0.3) - local unitType = UnitPlayerControlled(LNR_Private:GetUnitTokenFromPlate(frame)) and 'PLAYER' or 'NPC'; + local unitType = UnitPlayerControlled(unitToken) and 'PLAYER' or 'NPC'; return reaction, unitType;