feat(map): remove looted object node pins on loot
When a quest object node is opened/looted, that specific node's map/minimap pin now disappears immediately even before the objective is fully collected, instead of all node pins staying until turn-in. On LOOT_OPENED, QuestieQuest:RemoveLootedObjectivePins finds the active object-objective spawn nearest the player's world position (<=12 yd), marks it consumed in Questie.db.char.lootedObjectSpawns, and repopulates just that objective so clustering recomputes with the node skipped. _DetermineIconsToDraw skips consumed object spawns, so removal persists across redraws and /reload. ClearLootedSpawns runs on AcceptQuest, so abandoning and re-doing the quest (including after an Ascension prestige) shows every node again. Works in every data source mode (auto/learner/static/none): suppression is centralized in the shared _DetermineIconsToDraw that all redraw routes funnel through, operating on the mode-resolved objective.spawnList. Matching is radius-based (1.5 zone units) so a learner spawn re-added at the player's position for the just-looted node is suppressed too. Scoped to object-type objectives; monster/kill pins are unchanged.
This commit is contained in:
@@ -181,10 +181,17 @@ function QuestieEventHandler:RegisterLateEvents()
|
||||
end)
|
||||
end
|
||||
|
||||
-- Questie Debug Offer
|
||||
if Questie.IsSoD then
|
||||
Questie:RegisterEvent("LOOT_OPENED", QuestieDebugOffer.LootWindow)
|
||||
end
|
||||
-- LOOT_OPENED: remove pins for looted quest object nodes, and (SoD) run the debug offer.
|
||||
-- AceEvent allows only one handler per event on the Questie object, so both run here.
|
||||
Questie:RegisterEvent("LOOT_OPENED", function(...)
|
||||
local ok, err = pcall(function() QuestieQuest:RemoveLootedObjectivePins() end)
|
||||
if not ok then
|
||||
Questie:Debug(Questie.DEBUG_ELEVATED, "[QuestieEventHandler] RemoveLootedObjectivePins error:", err)
|
||||
end
|
||||
if Questie.IsSoD and QuestieDebugOffer and QuestieDebugOffer.LootWindow then
|
||||
QuestieDebugOffer.LootWindow(...)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Questie Comms Events
|
||||
|
||||
|
||||
Reference in New Issue
Block a user