Mercurial > wow > worldplan
diff WorldQuests.lua @ 52:6439015d74b1
- Set and use callbacks for the BountyBoard and ActionButton elements.
- Check BountyBoard selections when updating pin visual
- Check SpellCanTargetQuest() when determining pin visibility states
author | Nenue |
---|---|
date | Fri, 30 Dec 2016 18:31:32 -0500 |
parents | dbd81d49af02 |
children | b289eb3e6a32 |
line wrap: on
line diff
--- a/WorldQuests.lua Thu Dec 29 13:36:40 2016 -0500 +++ b/WorldQuests.lua Fri Dec 30 18:31:32 2016 -0500 @@ -47,6 +47,10 @@ end end +local InternalDoRefresh = function (self) + WorldPlanQuests:Refresh(true) +end + function Module:Setup() print('|cFFFF4400'..self:GetName()..':Setup()') @@ -57,6 +61,10 @@ hooksecurefunc("ClickWorldMapActionButton", function () self:OnClickWorldMapActionButton() end) hooksecurefunc("WorldMapScrollFrame_ReanchorQuestPOIs", function () self:Refresh() end) hooksecurefunc("WorldMap_UpdateQuestBonusObjectives", function () self:OnUpdateQuestBonusObjectives() end) + + + WorldMapFrame.UIElementsFrame.BountyBoard:SetSelectedBountyChangedCallback(InternalDoRefresh); + WorldMapFrame.UIElementsFrame.ActionButton:SetOnCastChangedCallback(InternalDoRefresh); end function Module:OnConfigUpdate() @@ -457,12 +465,9 @@ if x and y then pin.x = x pin.y = y - pin.owningFrame = self.hostFrame pin.throttle = 1 - - pin:SetParent(self.hostFrame) pin:SetFrameLevel(PinBaseIndex+pin:GetID()) - pin:SetAnchor(pin.x, pin.y, self.hostWidth, self.hostHeight) + pin:SetAnchor(self.hostFrame, pin.x, pin.y, self.hostWidth, self.hostHeight) tinsert(self.UsedPositions, pin) end