[Bug Fix] Tradeskill Autocombine MinSkill (#2260)

* [Bug] Tradeskill Autocombine MinSkill

Require min tradeskill or above for autocombine.

* Syntax fixes
This commit is contained in:
Michael 2022-06-10 13:52:31 -04:00 committed by GitHub
parent e75f87a535
commit 6d4f22a1c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -512,6 +512,15 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
return;
}
// Character does not have the required skill.
if (spec.skill_needed > 0 && user->GetSkill(spec.tradeskill) < spec.skill_needed) {
// Notify client.
user->Message(Chat::Red, "You are not skilled enough.");
user->QueuePacket(outapp);
safe_delete(outapp);
return;
}
//pull the list of components
std::string query = StringFormat("SELECT tre.item_id, tre.componentcount "
"FROM tradeskill_recipe_entries AS tre "