Add the ability to disable a tradeskill recipe

This commit is contained in:
Leere
2013-10-31 17:55:04 +01:00
parent 1bae570b68
commit cf117b1a4d
4 changed files with 10 additions and 5 deletions
+4 -3
View File
@@ -1223,8 +1223,9 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3
qlen = MakeAnyLenString(&query, "SELECT tre.recipe_id "
" FROM tradeskill_recipe_entries AS tre"
" WHERE ( tre.item_id IN(%s) AND tre.componentcount>0 )"
" OR ( tre.item_id %s AND tre.iscontainer=1 )"
" INNER JOIN tradeskill_recipe AS tr ON (tre.recipe_id = tr.id) "
" WHERE tr.enabled AND (( tre.item_id IN(%s) AND tre.componentcount>0 )"
" OR ( tre.item_id %s AND tre.iscontainer=1 ))"
" GROUP BY tre.recipe_id HAVING sum(tre.componentcount) = %u"
" AND sum(tre.item_id * tre.componentcount) = %u", buf2, containers, count, sum);
@@ -1387,7 +1388,7 @@ bool ZoneDatabase::GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint32 some_id
" ON tr.id = tre.recipe_id"
" LEFT JOIN (SELECT recipe_id, madecount from char_recipe_list WHERE char_id = %u) AS crl "
" ON tr.id = crl.recipe_id "
" WHERE tr.id = %lu AND tre.item_id %s"
" WHERE tr.id = %lu AND tre.item_id %s AND tr.enabled "
" GROUP BY tr.id", char_id, (unsigned long)recipe_id, containers);
if (!RunQuery(query, qlen, errbuf, &result)) {