Browse Source

Tradeskill /recipe fixes

1. fixed blank crafting screen if there was no Stage 0 product in recipe
2. fixed examine recipe not get correct total of primary components available
Robert Allen 1 year ago
parent
commit
52d997bd39

+ 0 - 1
EQ2/source/WorldServer/Recipes/Recipe.cpp

@@ -460,7 +460,6 @@ EQ2Packet * Recipe::SerializeRecipe(Client *client, Recipe *recipe, bool display
 				for (int8 i = 0; i < itemss.size(); i++) {
 					have_qty += itemss[i]->details.count;
 				}
-				break;
 			}
 		}
 		packet->setSubstructDataByName("recipe_info", "primary_qty_avail", have_qty);

+ 1 - 1
EQ2/source/WorldServer/Tradeskills/TradeskillsPackets.cpp

@@ -479,7 +479,7 @@ void ClientPacketFunctions::SendItemCreationUI(Client* client, Recipe* recipe) {
 		// get the product for this stage, if none found default to fuel
 		if (recipe->products.count(i) > 0)
 			rp = recipe->products[i];
-		if (!rp) {
+		if (!rp || (rp->product_id == 0)) {
 			rp = new RecipeProducts;
 			rp->product_id = recipe->components[5].front();
 			rp->product_qty = recipe->GetFuelComponentQuantity();