From e7d3ff7ab42b3ee56bd60b9bb78b9088bb6dbc9e Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Fri, 4 Mar 2011 00:52:53 -0600 Subject: [PATCH] Future-proofing: Instead of relying on the hard-coded A_MAX, assume that private.acquire_strings will be updated simultaneously with private.acquire_types and simply check for its size instead. --- Interface/List.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Interface/List.lua b/Interface/List.lua index b90e4f7..83115fb 100644 --- a/Interface/List.lua +++ b/Interface/List.lua @@ -43,7 +43,6 @@ local SF = private.recipe_state_flags local COMMON1 = private.common_flags_word1 local A = private.acquire_types -local A_MAX = 9 local FACTION_NEUTRAL = BFAC["Neutral"] @@ -1280,6 +1279,7 @@ function private.InitializeListFrame() local function ExpandAcquireData(entry_index, entry_type, parent_entry, acquire_type, acquire_data, recipe_id, hide_location, hide_type) local obtain_filters = addon.db.profile.filters.obtain + local num_acquire_types = #private.acquire_strings for id_num, info in pairs(acquire_data) do local func @@ -1312,7 +1312,7 @@ function private.InitializeListFrame() --@alpha@ elseif acquire_type == A.ACHIEVEMENT and obtain_filters.achievement then func = ExpandAchievementData - elseif acquire_type > A_MAX then + elseif acquire_type > num_acquire_types then local t = AcquireTable() t.text = "Unhandled Acquire Case - Type: " .. acquire_type -- 1.7.9.5