EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Small recipe retrieval change. (https://www.eqemulator.org/forums/showthread.php?t=28579)

Rabayn 06-15-2009 01:45 AM

Small recipe retrieval change.
 
This little query change should make it so there is no need for redundant fail/succeed/component rows for the same item in a recipe entry.

In zone\tradeskills.cpp GetTradeRecipe()

Replace:
Code:

qlen = MakeAnyLenString(&query, "SELECT item_id,successcount FROM tradeskill_recipe_entries"
        " WHERE successcount>0 AND componentcount=0 AND recipe_id=%u", recipe_id);

With:
Code:

qlen = MakeAnyLenString(&query, "SELECT item_id,successcount FROM tradeskill_recipe_entries"
        " WHERE successcount>0 AND recipe_id=%u", recipe_id);

and Replace:
Code:

qlen = MakeAnyLenString(&query, "SELECT item_id,failcount FROM tradeskill_recipe_entries"
        " WHERE failcount>0 AND componentcount=0 AND recipe_id=%u", recipe_id);

with:
Code:

qlen = MakeAnyLenString(&query, "SELECT item_id,failcount FROM tradeskill_recipe_entries"
        " WHERE failcount>0 AND recipe_id=%u", recipe_id);


trevius 06-22-2009 05:59 AM

This has now been added to Revision 702 on the SVN.


All times are GMT -4. The time now is 01:21 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.