mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-09-28 02:26:03 +00:00
NPC Finder: fix zone-ID mislabel and show all zones per NPC
- Translate the coord's WMA id to pfQuest before the MTH_DS_Zones parent lookup, so e.g. Feralas (WMA 121) no longer collides with pfQ 121 (Raven Hill) and prints its parent 'Duskwood' - Zone column now lists every distinct zone an NPC occupies, smallest-map first, so border/capital NPCs read 'Darnassus, Teldrassil' etc. (sort key matches)
This commit is contained in:
+2
-2
@@ -1518,7 +1518,7 @@ local function MTH_BOOK_GetSortKey(entry, col)
|
||||
if not npc then return nil end
|
||||
local react = MTH_BOOK_GetNPCReactBucket(npc.fac)
|
||||
local functionSummary = MTH_BOOK_GetNPCFunctionSummary(npc)
|
||||
local zoneName = MTH_BOOK_GetNPCZoneSummary(npc)
|
||||
local zoneName = (type(MTH_BOOK_GetNPCZoneDisplay) == "function" and MTH_BOOK_GetNPCZoneDisplay(npc)) or MTH_BOOK_GetNPCZoneSummary(npc)
|
||||
if col == 1 then return tonumber(entry) or 0 end
|
||||
if col == 2 then
|
||||
local npcName = (MTH and MTH.GetLocalizedNPCNameById and MTH:GetLocalizedNPCNameById(entry, npc.name)) or npc.name
|
||||
@@ -4333,7 +4333,7 @@ local function MTH_BOOK_GetRowValues(entry)
|
||||
if not vendor then return { "", "", "", "", "" } end
|
||||
local react = MTH_BOOK_GetNPCReactBucket(vendor.fac)
|
||||
local functionSummary = MTH_BOOK_GetNPCFunctionSummary(vendor)
|
||||
local zoneName = MTH_BOOK_GetNPCZoneSummary(vendor)
|
||||
local zoneName = (type(MTH_BOOK_GetNPCZoneDisplay) == "function" and MTH_BOOK_GetNPCZoneDisplay(vendor)) or MTH_BOOK_GetNPCZoneSummary(vendor)
|
||||
local vendorName = (MTH and MTH.GetLocalizedNPCNameById and MTH:GetLocalizedNPCNameById(entry, vendor.name)) or vendor.name
|
||||
return {
|
||||
"|cFF33CCFF" .. tostring(entry) .. "|r",
|
||||
|
||||
Reference in New Issue
Block a user