From ad1b050073417fdc4d0ca419aebd8ae807d7b07e Mon Sep 17 00:00:00 2001 From: ackis Date: Fri, 23 Jan 2009 15:46:57 +0000 Subject: [PATCH] Don't count cooking/first aid books as recipes. --- ARLFrame.lua | 29 ++++++++++++++++++++++++----- AckisRecipeList.lua | 12 ------------ 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index c30ff14..315f12b 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -964,23 +964,42 @@ local function SetProgressBar(playerData) local pbCur, pbMax if (addon.db.profile.includefiltered == true) then - pbCur = playerData.recipes_known pbMax = playerData.recipes_total - -- We're removing filtered recipes from the final count else - pbCur = playerData.recipes_known_filtered pbMax = playerData.recipes_total_filtered - end if (not addon.db.profile.includeexcluded) then - pbCur = pbCur - playerData.excluded_recipes_known pbMax = pbMax - playerData.excluded_recipes_unknown + end + -- Lets remove cooking/first aid recipes from the totals/current + -- Cooking + if (playerData.playerProfession == GetSpellInfo(2550)) then + if (playerData.playerProfessionLevel > 300) then + pbCur = pbCur - 1 + pbMax = pbMax - 1 + end + if (playerData.playerProfessionLevel > 225) then + pbCur = pbCur - 1 + pbMax = pbMax - 1 + end + end + + -- First Aid + if ((playerData.playerProfession == GetSpellInfo(746)) or (playerData.playerProfession == "Premiers soins")) then + if (playerData.playerProfessionLevel > 225) then + pbCur = pbCur - 1 + pbMax = pbMax - 1 + end + if (playerData.playerProfessionLevel > 150) then + pbCur = pbCur - 1 + pbMax = pbMax - 1 + end end ARL_ProgressBar:SetMinMaxValues(0, pbMax) diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 794663a..623ad43 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -787,15 +787,9 @@ function addon:ScanForKnownRecipes(RecipeDB, playerData) -- Cooking if (playerData.playerProfession == GetSpellInfo(2550)) then if (playerData.playerProfessionLevel > 300) then - --@debug@ - self:Print("DEBUG: Cooking 300 book known.") - --@end-debug@ RecipeDB[33359]["Known"] = true end if (playerData.playerProfessionLevel > 225) then - --@debug@ - self:Print("DEBUG: Cooking 225 book known.") - --@end-debug@ RecipeDB[3413]["Known"] = true end end @@ -803,15 +797,9 @@ function addon:ScanForKnownRecipes(RecipeDB, playerData) -- First Aid if ((playerData.playerProfession == GetSpellInfo(746)) or (playerData.playerProfession == "Premiers soins")) then if (playerData.playerProfessionLevel > 225) then - --@debug@ - self:Print("DEBUG: First Aid 225 quest known.") - --@end-debug@ RecipeDB[10846]["Known"] = true end if (playerData.playerProfessionLevel > 150) then - --@debug@ - self:Print("DEBUG: First Aid 150 book known.") - --@end-debug@ RecipeDB[7924]["Known"] = true end end -- 1.7.9.5