Made passive skill binding optionnal.

This commit is contained in:
Ka0rX 2022-10-14 00:33:09 +02:00
parent c4ccb593c6
commit 91b5f6b813
4 changed files with 19 additions and 17 deletions

View File

@ -97,8 +97,16 @@ public class PlayerStats {
* This updates the player's PASSIVE skills
*/
final PassiveSkillMap skillMap = data.getMMOPlayerData().getPassiveSkillMap();
if(!MMOCore.plugin.configManager.passiveSkillNeedBound) {
skillMap.removeModifiers("MMOCorePassiveSkill");
for (ClassSkill skill : data.getProfess().getSkills())
if (skill.getSkill().getTrigger().isPassive())
skillMap.addModifier(skill.toPassive(data));
}
// This updates the player's class SCRIPTS
skillMap.removeModifiers("MMOCoreClassScript");
for (PassiveSkill script : data.getProfess().getScripts())

View File

@ -22,7 +22,7 @@ import java.util.logging.Level;
public class ConfigManager {
public final CommandVerbose commandVerbose = new CommandVerbose();
public boolean overrideVanillaExp, canCreativeCast, cobbleGeneratorXP, saveDefaultClassInfo, attributesAsClassInfo, splitProfessionExp, disableQuestBossBar;
public boolean overrideVanillaExp, canCreativeCast, passiveSkillNeedBound, cobbleGeneratorXP, saveDefaultClassInfo, attributesAsClassInfo, splitProfessionExp, disableQuestBossBar;
public String partyChatPrefix, noSkillBoundPlaceholder;
public ChatColor staminaFull, staminaHalf, staminaEmpty;
public long combatLogTimer, lootChestExpireTime, lootChestPlayerCooldown, globalSkillCooldown;
@ -115,7 +115,7 @@ public class ConfigManager {
staminaFull = getColorOrDefault("stamina-whole", ChatColor.GREEN);
staminaHalf = getColorOrDefault("stamina-half", ChatColor.DARK_GREEN);
staminaEmpty = getColorOrDefault("stamina-empty", ChatColor.WHITE);
passiveSkillNeedBound = MMOCore.plugin.getConfig().getBoolean("passive-skill-need-bound");
canCreativeCast = MMOCore.plugin.getConfig().getBoolean("can-creative-cast");
cobbleGeneratorXP = MMOCore.plugin.getConfig().getBoolean("should-cobblestone-generators-give-exp");
saveDefaultClassInfo = MMOCore.plugin.getConfig().getBoolean("save-default-class-info");

View File

@ -188,6 +188,12 @@ death-exp-loss:
#Default max bound active and passive skills.
#These value can be modified for each class in the class yml.
max-bound-active-skills: 6
#If you want players to bound their passive skills.
#If false, all the passive skills unlocked will be active
#Also set max-bound-passive-skills to 0 if seting passive-skill-need-bound to false.
passive-skill-need-bound: true
max-bound-passive-skills: 3
# Fun extra RPG feature that switches the player's hotbar with

View File

@ -34,7 +34,7 @@ items:
lore: { }
reallocate:
slots: [26]
slots: [45]
function: reallocation
item: CAULDRON
name: '&aReallocate Skill Points'
@ -46,19 +46,7 @@ items:
- '&eCosts 1 skill reallocation point.'
- '&e◆ Skill Reallocation Points: &6{points}'
#switch:
#
# slots: [28]
# function: switch
# item: PLAYER_HEAD
# binding:
# item: PINK_STAINED_GLASS
# name: '&aSwitch to Binding'
# lore: {}
# upgrading:
# item: PINK_STAINED_GLASS
# name: '&aSwitch to Upgrading'
# lore: {}
passive-skill-slot:
slots: [ 7,16,25,34,43,52 ]
function: passive-slot