Skip to content

Commit

Permalink
map: use default values on invalid user input
Browse files Browse the repository at this point in the history
  • Loading branch information
shagu committed Nov 6, 2024
1 parent 57f33e1 commit 97bd742
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -688,10 +688,10 @@ function pfMap:BuildNode(name, parent)
local f = CreateFrame("Button", name, parent)

if parent == WorldMapButton then
f.defalpha = pfQuest_config["worldmaptransp"] + 0
f.defalpha = tonumber(pfQuest_config["worldmaptransp"]) or 1
f.defsize = 16
else
f.defalpha = pfQuest_config["minimaptransp"] + 0
f.defalpha = tonumber(pfQuest_config["minimaptransp"]) or 1
f.defsize = 16
f.minimap = true
end
Expand Down Expand Up @@ -1052,7 +1052,7 @@ pfMap:SetScript("OnUpdate", function()
transition = frame:Animate((frame.texture and frame.defsize + 4 or frame.defsize), 1, fps) or transition
elseif not highlight and pfMap.highlight then
-- fade node
transition = frame:Animate(frame.defsize, tonumber(pfQuest_config["nodefade"]), fps) or transition
transition = frame:Animate(frame.defsize, tonumber(pfQuest_config["nodefade"]) or 0.3, fps) or transition
elseif frame.texture or frame.cluster then
-- defaults for textured nodes
transition = frame:Animate(frame.defsize, 1, fps) or transition
Expand Down

0 comments on commit 97bd742

Please sign in to comment.