fix(arrow): Sunstrider zoneId 3431, rotation CW, collection distance, native map pins
- zoneId detection: accept 3430 OR 3431 OR uiMapId 1241 (4 locations) - SetRotation is CW-positive: rotAngle=relative (was -relative) - Collection functions: override target->1241 when player on Sunstrider - NPC 15281: spawn zone 1241 (not 3430) for correct coord space - _ResolveMapUiMapId: removed 1241->1941 redirect - zoneDB: added areaIdToUiMapId[1241]=1241 - Updated CHANGELOG, README, docs
This commit is contained in:
@@ -31,22 +31,26 @@ local GetClassColor = QuestieCompat.GetClassColor
|
||||
|
||||
|
||||
-- Silent quest log index lookup (prevents warning spam for auto-complete/achievement "quests")
|
||||
-- Uses QuestieCompat wrapper which normalizes return values across API versions.
|
||||
local function _Questie_SilentGetQuestLogIndexByID(questId)
|
||||
questId = tonumber(questId)
|
||||
if not questId then return 0 end
|
||||
|
||||
if _G.GetQuestLogIndexByID then
|
||||
return _G.GetQuestLogIndexByID(questId) or 0
|
||||
-- QuestieCompat.GetQuestLogIndexByID returns nil when not found,
|
||||
-- coerce to 0 for callers that check > 0.
|
||||
local idx = QuestieCompat.GetQuestLogIndexByID(questId)
|
||||
if idx then
|
||||
return idx
|
||||
end
|
||||
|
||||
local n = (GetNumQuestLogEntries and select(1, GetNumQuestLogEntries())) or 0
|
||||
if n > 0 and GetQuestLogTitle then
|
||||
for i = 1, n do
|
||||
local _, _, _, isHeader, _, _, _, qid = GetQuestLogTitle(i)
|
||||
qid = tonumber(qid)
|
||||
if (not isHeader) and qid and qid == questId then
|
||||
return i
|
||||
end
|
||||
-- Fallback: use the compat-normalized GetQuestLogTitle (always 8 returns)
|
||||
local GetQuestLogTitleCompat = QuestieCompat.GetQuestLogTitle
|
||||
local n = select(1, GetNumQuestLogEntries()) or 0
|
||||
for i = 1, n do
|
||||
local _, _, _, isHeader, _, _, _, qid = GetQuestLogTitleCompat(i)
|
||||
qid = tonumber(qid)
|
||||
if (not isHeader) and qid and qid == questId then
|
||||
return i
|
||||
end
|
||||
end
|
||||
return 0
|
||||
@@ -224,8 +228,14 @@ function MapIconTooltip:Show()
|
||||
handleMapIcon(icon)
|
||||
end
|
||||
else
|
||||
for pin in HBDPins.worldmapProvider:GetMap():EnumeratePinsByTemplate("HereBeDragonsPinsTemplateQuestie") do
|
||||
handleMapIcon(pin.icon)
|
||||
if QuestieCompat.Is335 then
|
||||
for icon, _ in next, HBDPins.worldmapPins do
|
||||
handleMapIcon(icon)
|
||||
end
|
||||
else
|
||||
for pin in HBDPins.worldmapProvider:GetMap():EnumeratePinsByTemplate("HereBeDragonsPinsTemplateQuestie") do
|
||||
handleMapIcon(pin.icon)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -402,7 +412,7 @@ function MapIconTooltip:Show()
|
||||
break
|
||||
end
|
||||
|
||||
factionName = select(1, GetFactionInfoByID(factionId))
|
||||
factionName = select(1, QuestieCompat.GetFactionInfoByID(factionId))
|
||||
if factionName then
|
||||
rewardValue = rewardPair[2]
|
||||
|
||||
@@ -423,10 +433,10 @@ function MapIconTooltip:Show()
|
||||
end
|
||||
|
||||
if aldorPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(932))
|
||||
factionName = select(1, QuestieCompat.GetFactionInfoByID(932))
|
||||
tinsert(rewardTable, aldorPenalty .. " " .. factionName)
|
||||
elseif scryersPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(934))
|
||||
factionName = select(1, QuestieCompat.GetFactionInfoByID(934))
|
||||
tinsert(rewardTable, scryersPenalty .. " " .. factionName)
|
||||
end
|
||||
|
||||
@@ -513,6 +523,7 @@ function MapIconTooltip:Show()
|
||||
end
|
||||
return levelString
|
||||
end
|
||||
|
||||
-- Used to get the white color for the quests which don't have anything to collect
|
||||
local defaultQuestColor = QuestieLib:GetRGBForObjective({})
|
||||
local creatureLevels = QuestieDB:GetCreatureLevels(quest) -- Data for min and max level
|
||||
@@ -585,7 +596,7 @@ function MapIconTooltip:Show()
|
||||
break
|
||||
end
|
||||
|
||||
factionName = select(1, GetFactionInfoByID(factionId))
|
||||
factionName = select(1, QuestieCompat.GetFactionInfoByID(factionId))
|
||||
if factionName then
|
||||
rewardValue = rewardPair[2]
|
||||
|
||||
@@ -606,10 +617,10 @@ function MapIconTooltip:Show()
|
||||
end
|
||||
|
||||
if aldorPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(932))
|
||||
factionName = select(1, QuestieCompat.GetFactionInfoByID(932))
|
||||
tinsert(rewardTable, aldorPenalty .. " " .. factionName)
|
||||
elseif scryersPenalty then
|
||||
factionName = select(1, GetFactionInfoByID(934))
|
||||
factionName = select(1, QuestieCompat.GetFactionInfoByID(934))
|
||||
tinsert(rewardTable, scryersPenalty .. " " .. factionName)
|
||||
end
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
-- Try to find in learned NPCs or objects
|
||||
local id = tonumber(key:sub(3))
|
||||
if id then
|
||||
if key:sub(1,2) == "m_" then
|
||||
if key:sub(1,2) == "m_" then
|
||||
local learnedNpc = QuestieLearner.data.npcs[id]
|
||||
-- npc[10] from _AddToArray is an array of questIds, not {questId -> objList}
|
||||
if learnedNpc and learnedNpc[10] then
|
||||
@@ -248,13 +248,11 @@ function QuestieTooltips:GetTooltip(key)
|
||||
local objText = objEntry[2]
|
||||
local needed, collected
|
||||
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
||||
local objectiveIcon
|
||||
if objectives then
|
||||
for _, obj in next, objectives do
|
||||
if obj.text and objText and (obj.text == objText or string.find(obj.text, objText, 1, true) or string.find(objText, obj.text, 1, true)) then
|
||||
needed = obj.numRequired
|
||||
collected = obj.numFulfilled
|
||||
objectiveIcon = obj.Icon
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -264,7 +262,6 @@ function QuestieTooltips:GetTooltip(key)
|
||||
Description = objText,
|
||||
Needed = needed,
|
||||
Collected = collected,
|
||||
Icon = objectiveIcon,
|
||||
Update = function(self)
|
||||
local objs = QuestLogCache.GetQuestObjectives(questId)
|
||||
if objs then
|
||||
@@ -288,7 +285,7 @@ function QuestieTooltips:GetTooltip(key)
|
||||
tinsert(tooltipLines, "|cFF5EBAF3(Learned - Confidence: " .. tostring(learnedNpc.mc) .. ")|r")
|
||||
end
|
||||
end
|
||||
elseif key:sub(1,2) == "o_" then
|
||||
elseif key:sub(1,2) == "o_" then
|
||||
local learnedObj = QuestieLearner.data.objects[id]
|
||||
-- obj[2] from _AddToArray is an array of questIds (questStarts), not {questId -> objList}
|
||||
if learnedObj and learnedObj[2] then
|
||||
@@ -304,13 +301,11 @@ function QuestieTooltips:GetTooltip(key)
|
||||
local objText = objEntry[2]
|
||||
local needed, collected
|
||||
local objectives = QuestLogCache.GetQuestObjectives(questId)
|
||||
local objectiveIcon
|
||||
if objectives then
|
||||
for _, obj in next, objectives do
|
||||
if obj.text and objText and (obj.text == objText or string.find(obj.text, objText, 1, true) or string.find(objText, obj.text, 1, true)) then
|
||||
needed = obj.numRequired
|
||||
collected = obj.numFulfilled
|
||||
objectiveIcon = obj.Icon
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -320,7 +315,6 @@ function QuestieTooltips:GetTooltip(key)
|
||||
Description = objText,
|
||||
Needed = needed,
|
||||
Collected = collected,
|
||||
Icon = objectiveIcon,
|
||||
Update = function(self)
|
||||
local objs = QuestLogCache.GetQuestObjectives(questId)
|
||||
if objs then
|
||||
|
||||
Reference in New Issue
Block a user