Code:
cvs diff -- client.h client_packet.cpp tradeskills.cpp zonedb.h (in directory M:\cvswork\EQEmuCVS\Source\zone\)
Index: client.h
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/client.h,v
retrieving revision 1.49
diff -r1.49 client.h
496c496
< bool TradeskillExecute(DBTradeskillRecipe_Struct *spec, SkillType tradeskill);
---
> bool TradeskillExecute(DBTradeskillRecipe_Struct *spec);
Index: client_packet.cpp
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/client_packet.cpp,v
retrieving revision 1.46
diff -r1.46 client_packet.cpp
3979,3982c3979,3991
< uint32 tskill = Object::TypeToSkill(tsf->object_type);
< if(tskill == 0) {
< LogFile->write(EQEMuLog::Error, "Unknown container type for OP_RecipesFavorite: %d\n", tsf->object_type);
< return;
---
> LogFile->write(EQEMuLog::Debug, "Requested Favorites for: %d - %d\n", tsf->object_type, tsf->some_id);
>
> // results show that object_type is combiner type
> // some_id = 0 if world combiner, item number otherwise
>
> // make where clause segment for container(s)
> char containers[30];
> if (tsf->some_id == 0) {
> // world combiner so no item number
> snprintf(containers,29, "= %u", tsf->object_type);
> } else {
> // container in inventory
> snprintf(containers,29, "in (%u,%u)", tsf->object_type, tsf->some_id);
4014,4015c4023,4026
< " WHERE tr.id IN (%s) AND tradeskill=%lu "
< " GROUP BY tr.id LIMIT 100 ", buf, tskill);
---
> " WHERE tr.id IN (%s) "
> " GROUP BY tr.id "
> " HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 "
> " LIMIT 100 ", buf, containers);
4035,4038c4046,4055
< uint32 tskill = Object::TypeToSkill(rss->object_type);
< if(tskill == 0) {
< LogFile->write(EQEMuLog::Error, "Unknown container type for OP_RecipesSearch: %d\n", rss->object_type);
< return;
---
> LogFile->write(EQEMuLog::Debug, "Requested search recipes for: %d - %d\n", rss->object_type, rss->some_id);
>
> // make where clause segment for container(s)
> char containers[30];
> if (rss->some_id == 0) {
> // world combiner so no item number
> snprintf(containers,29, "= %u", rss->object_type);
> } else {
> // container in inventory
> snprintf(containers,29, "in (%u,%u)", rss->object_type, rss->some_id);
4059,4060c4076,4080
< " WHERE %s tr.trivial >= %u AND tr.trivial <= %u AND tradeskill=%lu "
< " GROUP BY tr.id LIMIT 200 ", searchclause, rss->mintrivial, rss->maxtrivial, tskill);
---
> " WHERE %s tr.trivial >= %u AND tr.trivial <= %u "
> " GROUP BY tr.id "
> " HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 "
> " LIMIT 200 "
> , searchclause, rss->mintrivial, rss->maxtrivial, containers);
Index: zonedb.h
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/zonedb.h,v
retrieving revision 1.7
diff -r1.7 zonedb.h
37a38
> Skilltype tradeskill;
226,227c227,228
< bool GetTradeRecipe(const ItemInst* container, uint8 c_type, uint8 tradeskill, DBTradeskillRecipe_Struct *spec);
< bool GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint8 tradeskill, DBTradeskillRecipe_Struct *spec);
---
> bool GetTradeRecipe(const ItemInst* container, uint8 c_type, uint32 some_id, DBTradeskillRecipe_Struct *spec);
> bool GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint32 some_id, DBTradeskillRecipe_Struct *spec);