Pummel now calculates correctly

This commit is contained in:
nossr50
2019-01-28 13:14:15 -08:00
parent 3734300e59
commit 399a1529f4
3 changed files with 4 additions and 1 deletions

View File

@ -989,6 +989,7 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
/*public int getFastFoodUnlock() { return config.getInt("Skills.Taming.FastFood.UnlockLevel", 50); }*/
public double getFastFoodChance() { return config.getDouble("Skills.Taming.FastFood.Chance", 50.0D); }
public double getPummelChance() { return config.getDouble("Skills.Taming.Pummel.Chance", 10.0D); }
public int getEnviromentallyAwareUnlock() { return config.getInt("Skills.Taming.EnvironmentallyAware.UnlockLevel", 100); }

View File

@ -18,6 +18,7 @@ import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.StringUtils;
import com.gmail.nossr50.util.player.NotificationManager;
import com.gmail.nossr50.util.player.UserManager;
import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
import com.gmail.nossr50.util.random.RandomChanceUtil;
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
import com.gmail.nossr50.util.skills.RankUtils;
@ -209,7 +210,7 @@ public class TamingManager extends SkillManager {
if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.TAMING_PUMMEL))
return;
if(!RandomChanceUtil.checkRandomChanceExecutionSuccess(getPlayer(), SubSkillType.TAMING_PUMMEL, true))
if(!RandomChanceUtil.checkRandomChanceExecutionSuccess(new RandomChanceSkillStatic(AdvancedConfig.getInstance().getPummelChance(), getPlayer(), SubSkillType.TAMING_PUMMEL)))
return;
ParticleEffectUtils.playGreaterImpactEffect(target);