Skip to content

Commit

Permalink
Parser: Added 'isEnableTypeRecipe' (bool) field for special Recipes w…
Browse files Browse the repository at this point in the history
…hich can only be marked as collected by interaction with a specific NPC or location

Applied 'isEnableTypeRecipe' to Tanaan Jungle Jewelcrafting Recipes
Retail: Recipe collection no longer removes 'isEnableTypeRecipe' Recipes from being collected when they are not 'disabled', unless interacting with the proper profession UI
  • Loading branch information
ImUnicke committed Aug 16, 2024
1 parent 559ef76 commit d4b2431
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,10 @@ root(ROOTS.Zones, {
["description"] = "In order to learn these recipes, you have to take the appropriate gemcutter module to this NPC and then right-click to learn how to craft it.",
["coord"] = { 25.8, 39.7, TANAAN_JUNGLE },
["requireSkill"] = JEWELCRAFTING,
["g"] = {
["g"] = sharedData({
-- These Recipes should only cached when learned and not disabled via NPC interact
["isEnableTypeRecipe"] = true,
},{
recipe(187634, { -- Immaculate Critical Strike Taladite
["cost"] = { { "i", 127771, 1 } }, -- Gemcutter Module: Critical Strike
}),
Expand All @@ -340,10 +343,7 @@ root(ROOTS.Zones, {
recipe(187640, { -- Immaculate Stamina Taladite
["cost"] = { { "i", 127775, 1 } }, -- Gemcutter Module: Stamina
}),
-- recipe(187639, { -- Immaculate Versatility Taladite
-- ["cost"] = { { "i", 123123123123, 1 } },
-- }),
},
}),
}),
}),
n(QUESTS, {
Expand Down Expand Up @@ -515,7 +515,9 @@ root(ROOTS.Zones, {
["coord"] = { 17.5, 45.1, TANAAN_JUNGLE },
["sourceQuest"] = 39176, -- Mastery of Taladite
["g"] = {
recipe(187639), -- Immaculate Versatility Taladite
recipe(187639, { -- Immaculate Versatility Taladite
["isEnableTypeRecipe"] = true,
}),
},
}),
q(39565, { -- Rumble in the Jungle
Expand Down
Binary file modified .contrib/Parser/Parser.exe
Binary file not shown.
1 change: 1 addition & 0 deletions .contrib/Source Code/Parser/Framework/Framework.Objects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,7 @@ public static void Merge(IDictionary<string, object> item, string field, object
case "isLimited":
case "isGuild":
case "isDaily":
case "isEnableTypeRecipe":
case "isWeekly":
case "isMonthly":
case "isYearly":
Expand Down
42 changes: 33 additions & 9 deletions AllTheThings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12613,6 +12613,7 @@ customWindowUpdates.Tradeskills = function(self, force, got)
-- app.PrintDebug("Recipe",recipeIDs[i])
if spellRecipeInfo then
recipeID = spellRecipeInfo.recipeID;
local cachedRecipe = SearchForObject("recipeID",recipeID,"key")
currentCategoryID = spellRecipeInfo.categoryID;
if not categories[currentCategoryID] then
C_TradeSkillUI_GetCategoryInfo(currentCategoryID, categoryData);
Expand All @@ -12633,17 +12634,40 @@ customWindowUpdates.Tradeskills = function(self, force, got)
end
-- recipe is learned, so cache that it's learned regardless of being craftable
if spellRecipeInfo and spellRecipeInfo.learned then
charSpells[recipeID] = 1;
if not acctSpells[recipeID] then
acctSpells[recipeID] = 1;
tinsert(learned, recipeID);
if spellRecipeInfo.disabled then
-- disabled recipes shouldn't be marked as known by the character (they require an 'unlock' typically to become usable)
if charSpells[recipeID] then
charSpells[recipeID] = nil;
-- local link = app:Linkify(recipeID, app.Colors.ChatLink, "search:recipeID:"..recipeID);
-- app.PrintDebug("Unlearned Disabled Recipe", link);
end
else
charSpells[recipeID] = 1;
if not acctSpells[recipeID] then
acctSpells[recipeID] = 1;
tinsert(learned, recipeID);
end
end
else
-- unlearned recipes shouldn't be marked as known by the character
if charSpells[recipeID] then
charSpells[recipeID] = nil;
-- local link = app:Linkify(recipeID, app.Colors.ChatLink, "search:spellID:"..recipeID);
-- app.PrintDebug("Unlearned Recipe", link);
if spellRecipeInfo.disabled then
-- disabled & unlearned recipes shouldn't be marked as known by the character
if charSpells[recipeID] then
charSpells[recipeID] = nil;
-- local link = app:Linkify(recipeID, app.Colors.ChatLink, "search:spellID:"..recipeID);
-- app.PrintDebug("Unlearned Disabled Recipe", link);
end
else
if cachedRecipe and cachedRecipe.isEnableTypeRecipe then
-- local link = app:Linkify(recipeID, app.Colors.ChatLink, "search:recipeID:"..recipeID);
-- app.PrintDebug("Unlearned Enable-Type Recipe", link);
else
-- non-disabled, unlearned recipes shouldn't be marked as known by the character
if charSpells[recipeID] then
charSpells[recipeID] = nil;
-- local link = app:Linkify(recipeID, app.Colors.ChatLink, "search:spellID:"..recipeID);
-- app.PrintDebug("Unlearned Recipe", link);
end
end
end
end

Expand Down

0 comments on commit d4b2431

Please sign in to comment.