mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 13:40:13 -05:00
Fix quest title showing as NPC guild
When an NPC is part of a quest, tooltip line 2 might be the quest name or something else non-Guild-related. Fortunately each line has a type associated with it, so if it's not type None (0), don't treat it like a guild. I could check for types like QuestTitle (17) but since the tooltip lines can contain any arbitrary information, it's best to make sure it's what we want instead of making sure it's not something specific that we don't want.
This commit is contained in:
@ -72,6 +72,10 @@ local function FigureNPCGuild(unit)
|
||||
if not left_2 or left_2:find(LEVEL_start) then
|
||||
return nil
|
||||
end
|
||||
-- tooltips can contain any data, including quest info, so check for the type of the line before using it, if present
|
||||
if Enum and Enum.TooltipDataLineType and info and info.lines[2] and info.lines[2].type ~= Enum.TooltipDataLineType.None then
|
||||
return nil
|
||||
end
|
||||
return left_2
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user