mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-18 06:32:25 +00:00
[Rules] Add Skills:TrivialTradeskillCombinesNoFail Rule (#3481)
* Add TrivialNoFail rule * feedback fixes * Update tradeskills.cpp * Update 1392_recipe_learning.sql * Update ruletypes.h --------- Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
parent
5c1be3643e
commit
98e56bdfe9
@ -241,6 +241,7 @@ RULE_CATEGORY_END()
|
||||
RULE_CATEGORY(Skills)
|
||||
RULE_INT(Skills, MaxTrainTradeskills, 21, "Highest level for trading skills that can be learnt by the trainer")
|
||||
RULE_BOOL(Skills, UseLimitTradeskillSearchSkillDiff, true, "Enables the limit for the maximum difference between trivial and skill for recipe searches and favorites")
|
||||
RULE_BOOL(Skills, TrivialTradeskillCombinesNoFail, false, "Enable to make all trivial tradeskill combines unable to fail")
|
||||
RULE_INT(Skills, MaxTradeskillSearchSkillDiff, 50, "The maximum difference in skill between the trivial of an item and the skill of the player if the trivial is higher than the skill. Recipes that have not been learnt or made at least once via the Experiment mode will be removed from searches based on this criteria.")
|
||||
RULE_INT(Skills, MaxTrainSpecializations, 50, "Maximum level a GM trainer will train casting specializations")
|
||||
RULE_INT(Skills, SwimmingStartValue, 100, "Start value of swimming skill")
|
||||
|
||||
@ -1050,6 +1050,11 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
// above critical still stands.
|
||||
// Mastery modifier is: 10%/25%/50% for rank one/two/three
|
||||
chance = 95.0f + (float(user_skill - spec->trivial) / 40.0f);
|
||||
|
||||
if (RuleB(Skills, TrivialTradeskillCombinesNoFail)) {
|
||||
chance = 100;
|
||||
}
|
||||
|
||||
MessageString(Chat::Emote, TRADESKILL_TRIVIAL);
|
||||
} else if(chance < 5) {
|
||||
// Minimum chance is always 5
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user