mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 16:58:02 +00:00
Add the ability to disable a tradeskill recipe
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user