/
local cn,cr = strsplit("-",charName,2) |
local cdn = db['hideRealm'] and cn or charName |
if(charData['level'] >= info['minlevel']) then |
line = "" |
local line = "" |
local nd = false |
for questId, questData in pairs(db['quests']) do |
if(questData['expansion'] == expansion and charData['level'] >= questData['minlevel']) then |
if(questData['active']) then |
line = line .. "/" |
end |
local newline = line .. addon['colorize'](questData['name'], charData[questId] and '00ff00' or 'ff0000') |
if(strlen(newline)<=(db['wraplength'] or 255)) then |
if(strlen(newline)<=(db['wraplength'] or 200)) then |
line = newline |
else |
line = line .. "\n" |
GameTooltip:AddDoubleLine(nd and "" or (addon['classcolor'](cdn,(charData['class']))), line) |
nd = true |
line = "" |
end |
-- GameTooltip:AddDoubleLine(" ",addon['colorize'](questData['name'], charData[questId] and '00ff00' or 'ff0000')) |
end |
end |
end |
if(line ~= "" and (((db['sameRealm'] and cr == realm) and true or false) or not db['sameRealm'])) then |
GameTooltip:AddDoubleLine(cdn,strtrim(line)) |
GameTooltip:AddDoubleLine(nd and "" or (addon['classcolor'](cdn,(charData['class']))),(line)) |
end |
end |
end |
}, addon['options']) |
addon['AddConfigEntry'](addon,childName,'toggle','hideRealm',"Hide Realm","Don't display realm in tooltip",1) |
addon['AddConfigEntry'](addon,childName,'toggle','sameRealm',"Same Realm only","Don't display other realms",2) |
addon['AddConfigEntry'](addon,childName,'range','wraplength',"Tooltip length","Wrap listed quests in tooltip",3,5,512,1,false) |
addon['AddConfigEntry'](addon,childName,'execute','resetData',"Reset","Reset stored quest status",3,reset) |
addon['updatePrefs']() |
addon['RegisterFunc']({"QUEST_LOG_UPDATE","PLAYER_LOGOUT","PLAYER_REGEN_DISABLED","PLAYER_REGEN_ENABLED"},"OnEvent", event) |