From 3e39e397ba2afec15443cc294e5ffffe09ce48ef Mon Sep 17 00:00:00 2001 From: torhal Date: Wed, 10 Jun 2009 00:32:27 +0000 Subject: [PATCH] In addon:AddLookupList(): Check whether or not DB[ID] exists already: If so, warn alpha testers and return. --- AckisRecipeList.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 0935285..bc8104d 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -715,9 +715,16 @@ function addon:addLookupList(DB, ID, Name, Loc, Coordx, Coordy, Faction) For individual database structures, see Documentation.lua ]]-- - DB[ID] = {} - DB[ID]["Name"] = Name + --@alpha@ + if DB[ID] then + self:Print("Duplicate lookup: "..tostring(ID).." "..Name) + return + end + --@end-alpha@ + DB[ID] = { + ["Name"] = Name + } if (Loc) then DB[ID]["Location"] = Loc else -- 1.7.9.5