From 9109a2876cf7e37696b51548027ed97a0dc09ede Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sun, 4 Jul 2010 18:28:03 -0400 Subject: [PATCH] Waypoints for recipes acquires through quests will now show the quest name instead of "Unknown". --- Waypoint.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Waypoint.lua b/Waypoint.lua index 22c76f7..0c8c491 100644 --- a/Waypoint.lua +++ b/Waypoint.lua @@ -425,6 +425,8 @@ function addon:AddWaypoint(recipe_id, acquire_id, location_id, npc_id) local waypoint = GetWaypoint(acquire_type, id_num, recipe) if waypoint and (not location_id or waypoint.location == location_id) then + waypoint.waypoint_type = acquire_type + waypoint.waypoint_id = id_num maplist[waypoint] = recipe_id end end @@ -463,6 +465,8 @@ function addon:AddWaypoint(recipe_id, acquire_id, location_id, npc_id) local waypoint = GetWaypoint(acquire_type, id_num, recipe) if waypoint then + waypoint.waypoint_type = acquire_type + waypoint.waypoint_id = id_num maplist[waypoint] = sorted_recipes[i] end end @@ -473,12 +477,20 @@ function addon:AddWaypoint(recipe_id, acquire_id, location_id, npc_id) end for entry, spell_id in pairs(maplist) do - local name = string.format("%s (%s)", entry.name or _G.UNKNOWN, recipe_list[spell_id].name) + local name local x = entry.coord_x local y = entry.coord_y local location = entry.location local continent, zone + if entry.waypoint_type == A.QUEST then + name = string.format("Quest: %s (%s)", private.quest_names[entry.waypoint_id], recipe_list[spell_id].name) + else + name = string.format("%s (%s)", entry.name or _G.UNKNOWN, recipe_list[spell_id].name) + end + entry.waypoint_type = nil + entry.waypoint_id = nil + if KALIMDOR_IDNUMS[location] then continent = 1 zone = KALIMDOR_IDNUMS[location] -- 1.7.9.5