From 026133f32a19176c282e37fab7fb8ab299316ba7 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 10 Jun 2022 13:53:30 -0400 Subject: [PATCH] [Bug Fix] Tradeskill Item 0 Error (#2256) When trying to fully script a combine so the tradeskill itself does not return an item (Item 0) and handling all items through quests, the source will provide an error regardless that "Item 0 does not exist". This change will move the item summon after the validity check thus preventing the error to the client. --- zone/tradeskills.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index 8746718b8..8e6e68cce 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -1060,9 +1060,9 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) { itr = spec->onsuccess.begin(); while(itr != spec->onsuccess.end() && !spec->quest) { - SummonItem(itr->first, itr->second); item = database.GetItem(itr->first); if (item) { + SummonItem(itr->first, itr->second); if (GetGroup()) { entity_list.MessageGroup(this, true, Chat::Skills, "%s has successfully fashioned %s!", GetName(), item->Name); }