[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.
This commit is contained in:
Michael 2022-06-10 13:53:30 -04:00 committed by GitHub
parent 6d4f22a1c0
commit 026133f32a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}