Skip to content

Commit

Permalink
Removed DBM arrow integration as it doesnt exists in MoP anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
aglarcz authored Feb 23, 2022
1 parent c85b2e0 commit a63fef3
Showing 1 changed file with 0 additions and 62 deletions.
62 changes: 0 additions & 62 deletions HandyNotes_PandariaTreasures/HandyNotes_PandariaTreasures.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@ PandariaTreasures.nodes = { }

local nodes = PandariaTreasures.nodes
local isTomTomloaded = false
local isDBMloaded = false

if (IsAddOnLoaded("TomTom")) then
isTomTomloaded = true
end

if (IsAddOnLoaded("DBM-Core")) then
isDBMloaded = true
end

-- idx 1 -> Warscout, idx 2 -> Warbringer, follows achievement criteria order
if (zul_again == nil) then
zul_again = { -1, -1}
Expand Down Expand Up @@ -452,18 +447,6 @@ local function generateMenu(button, level)
UIDropDownMenu_AddButton(info, level)
end

if isDBMloaded == true then
info.text = "Add this treasure as DBM Arrow"
info.func = AddDBMArrow
info.arg1 = clickedMapFile
info.arg2 = clickedCoord
UIDropDownMenu_AddButton(info, level)

info.text = "Hide DBM Arrow"
info.func = HideDBMArrow
UIDropDownMenu_AddButton(info, level)
end

info.text = CLOSE
info.func = function() CloseDropDownMenus() end
info.arg1 = nil
Expand Down Expand Up @@ -1163,49 +1146,4 @@ function addtoTomTom(button, mapFile, coord)
world = true
})
end
end

if isDBMloaded == true then
local ArrowDesc = DBMArrow:CreateFontString(nil, "OVERLAY", "GameTooltipText")
ArrowDesc:SetWidth(400)
ArrowDesc:SetHeight(100)
ArrowDesc:SetPoint("CENTER", DBMArrow, "CENTER", 0, -35)
ArrowDesc:SetTextColor(1, 1, 1, 1)
ArrowDesc:SetJustifyH("CENTER")
DBMArrow.Desc = ArrowDesc
end

function AddDBMArrow(button, mapFile, coord)
if isDBMloaded == true then
local mapId = HandyNotes:GetMapFiletoMapID(mapFile)
local x, y = HandyNotes:getXY(coord)
local desc = nodes[mapFile][coord][2];

if (nodes[mapFile][coord][3] ~= nil) and (PandariaTreasures.db.profile.show_loot == true) then
if ((nodes[mapFile][coord][7] ~= nil) and (nodes[mapFile][coord][7] ~= "")) then
desc = desc.."\nLoot: " .. GetItem(nodes[mapFile][coord][7]);
desc = desc.."\nLootinfo: " .. nodes[mapFile][coord][3];
else
desc = desc.."\nLoot: " .. nodes[mapFile][coord][3];
end

end

if (nodes[mapFile][coord][4] ~= "") and (PandariaTreasures.db.profile.show_notes == true) then
desc = desc.."\n" .. nodes[mapFile][coord][4]
end

if not DBMArrow.Desc:IsShown() then
DBMArrow.Desc:Show()
end

x = x*100
y = y*100
DBMArrow.Desc:SetText(desc)
DBM.Arrow:ShowRunTo(x, y, nil, nil, true)
end
end

function HideDBMArrow()
DBM.Arrow:Hide(true)
end

0 comments on commit a63fef3

Please sign in to comment.