[Rule] Classic Tradeskill Skill Clamp (#3914)

Legacy Tradeskills had a 252 clamp regardless of modifier and skill.

Default to 0 to bypass clamp
This commit is contained in:
Fryguy
2024-01-08 02:48:40 -05:00
committed by GitHub
parent b30fbc70a3
commit c731f3f560
2 changed files with 9 additions and 2 deletions
+8 -2
View File
@@ -952,10 +952,16 @@ void Client::SendTradeskillDetails(uint32 recipe_id) {
//returns true on success
bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
if(spec == nullptr)
return(false);
if (!spec) {
return false;
}
uint16 user_skill = GetSkill(spec->tradeskill);
if (RuleI(Skills, TradeSkillClamp) != 0 && user_skill > RuleI(Skills, TradeSkillClamp)) {
user_skill = RuleI(Skills, TradeSkillClamp);
}
float chance = 0.0;
float skillup_modifier = 0.0;
int16 thirdstat = 0;