Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatherer look and fill to nodes #157

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion database.lua
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ function pfDatabase:SearchMetaRelation(query, meta, show)
( not faction or string.find(skill, faction))
then
if id < 0 then
meta["level"] = skill
pfDatabase:SearchObjectID(math.abs(id), meta, maps)
else
pfDatabase:SearchMobID(id, meta, maps)
Expand Down Expand Up @@ -799,7 +800,7 @@ function pfDatabase:SearchObjectID(id, meta, maps, prio)
meta["x"] = x
meta["y"] = y

meta["level"] = nil
-- meta["level"] = nil
meta["spawntype"] = pfQuest_Loc["Object"]
meta["respawn"] = respawn and SecondsToTime(respawn)

Expand Down
27 changes: 20 additions & 7 deletions map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ function pfMap:UpdateNode(frame, node, color, obj)
frame.quest = tab.quest
frame.qlvl = tab.qlvl
frame.itemreq = tab.itemreq

frame.showcut = tab.spawntype == pfQuest_Loc["Object"] or nil
if pfQuest_config["spawncolors"] == "1" then
frame.color = tab.spawn or tab.title
else
Expand Down Expand Up @@ -740,8 +740,12 @@ function pfMap:UpdateNode(frame, node, color, obj)

-- set default sizes for different node types
frame.defsize = (frame.cluster or frame.layer == 4) and 22 or 16

-- make the current route target visible
if obj == "minimap" then --LaYt
frame.defsize = frame.defsize/MinimapCluster:GetScale()
else
frame.defsize = frame.defsize/WorldMapFrame:GetScale()
end
-- make the current route target visible
if target then frame.hl:Show() else frame.hl:Hide() end

-- reset frame size except for highlights
Expand Down Expand Up @@ -895,11 +899,14 @@ function pfMap:UpdateMinimap()
end

local display = nil
if pfUI.minimap then
display = ( abs(xPos) + 8 < pfMap.drawlayer:GetWidth() / 2 and abs(yPos) + 8 < pfMap.drawlayer:GetHeight()/2 ) and true or nil
local objW = pfMap.drawlayer:GetWidth() / 2 --LaYt
local objH = pfMap.drawlayer:GetHeight() / 2

if pfUI.minimap or (Squeenix or (simpleMinimap_Skins and simpleMinimap_Skins:GetShape() == "square")) then
display = ( abs(xPos) + 4 < objW and abs(yPos) + 4 < objH ) and true or nil
else
local distance = sqrt(xPos * xPos + yPos * yPos)
display = ( distance + 8 < pfMap.drawlayer:GetWidth() / 2 ) and true or nil
display = ( distance + 4 < objW ) and true or nil
end

if display then
Expand All @@ -908,7 +915,13 @@ function pfMap:UpdateMinimap()
end

pfMap:UpdateNode(pfMap.mpins[i], node, color, "minimap")

-- LaYt
if (abs(xPos) < objW * 0.7 and abs(yPos) < objH * 0.7) and pfQuest_config["cutoutworldmap"] ~= "1" and pfMap.mpins[i].showcut then
local r,g,b = str2rgb(pfMap.mpins[i].color)
pfMap.mpins[i].tex:SetTexture(pfQuestConfig.path.."\\img\\nodecut")
pfMap.mpins[i].tex:SetVertexColor(r,g,b,1)
end
-- /LaYt
pfMap.mpins[i].hl:Hide()

if pfMap.mpins[i].cluster then
Expand Down