Map pins: skip SetPassThroughButtons in combat
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
46fd5cb8a9
commit
25e3aa4fec
4 changed files with 20 additions and 3 deletions
|
|
@ -76,6 +76,9 @@ function NumTaxiNodes() return #taxi end
|
|||
function TaxiNodeName(i) return taxi[i][1] end
|
||||
function TaxiNodeGetType(i) return taxi[i][2] end
|
||||
|
||||
local inCombat = false
|
||||
function InCombatLockdown() return inCombat end
|
||||
|
||||
local faction = "Alliance"
|
||||
function UnitFactionGroup() return faction end
|
||||
|
||||
|
|
@ -95,7 +98,7 @@ MapCanvasDataProviderMixin = {
|
|||
MapCanvasPinMixin = {
|
||||
UseFrameLevelType = function() end,
|
||||
SetScalingLimits = function() end,
|
||||
CheckMouseButtonPassthrough = function() end,
|
||||
CheckMouseButtonPassthrough = function(self) self.passthrough = true end,
|
||||
GetMap = function() return WorldMapFrame end,
|
||||
}
|
||||
local function texture()
|
||||
|
|
@ -200,6 +203,13 @@ waypoint = nil
|
|||
loch:OnMouseClickAction("LeftButton")
|
||||
check(waypoint and waypoint.m == 1432, "waypoint set on Loch Modan, got " .. tostring(waypoint and waypoint.m))
|
||||
|
||||
-- SetPassThroughButtons is protected in combat: pins drawn in combat skip it
|
||||
check(show(1432)[8].passthrough, "passthrough set out of combat")
|
||||
inCombat = true
|
||||
local fought = show(1432)[8]
|
||||
check(fought and not fought.passthrough, "no passthrough call in combat")
|
||||
inCombat = false
|
||||
|
||||
-- slash toggles and counts
|
||||
SlashCmdList.FLIGHTFINDER("")
|
||||
check(printed and printed:find("hidden") and printed:find("%d+ / %d+"), "slash prints hidden + count: " .. tostring(printed))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue