mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
2.1.85
This commit is contained in:
parent
83636644b1
commit
5698d8282c
@ -1,3 +1,10 @@
|
||||
Version 2.1.85
|
||||
Fixed a nearly 6 year old bug where Super Repair was not included as a child permission under Repair ability permission nodes (which meant some players would not have access to this skill)
|
||||
Fixed a bug that could prevent salvage from working for certain players
|
||||
Renamed the advanced salvage permission node to 'mcmmo.ability.salvage.scrapcollector'
|
||||
Fixed a bug that would send players skill unlock notifications if they did not have the permission node for that skill
|
||||
Dramatically increased the chance of receiving full materials when salvaging
|
||||
|
||||
Version 2.1.84
|
||||
Added some code to make mcMMO more compatible with EpicSpawners
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>2.1.84</version>
|
||||
<version>2.1.85</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<scm>
|
||||
|
@ -115,21 +115,21 @@ public class SalvageManager extends SkillManager {
|
||||
//Lottery on Salvageable Amount
|
||||
|
||||
int lotteryResults = 1;
|
||||
int chanceOfSuccess = 80;
|
||||
int chanceOfSuccess = 99;
|
||||
|
||||
for(int x = 1; x < salvageableAmount-1; x++) {
|
||||
for(int x = 0; x < salvageableAmount-1; x++) {
|
||||
|
||||
if(RandomChanceUtil.rollDice(chanceOfSuccess, 100)) {
|
||||
chanceOfSuccess-=20;
|
||||
Math.max(chanceOfSuccess, 33);
|
||||
chanceOfSuccess-=2;
|
||||
Math.max(chanceOfSuccess, 95);
|
||||
|
||||
lotteryResults+=1;
|
||||
}
|
||||
}
|
||||
|
||||
if(lotteryResults == salvageableAmount) {
|
||||
if(lotteryResults == salvageableAmount && salvageableAmount != 1) {
|
||||
NotificationManager.sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Perfect", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
|
||||
} else if(RankUtils.isPlayerMaxRankInSubSkill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE)) {
|
||||
} else if(RankUtils.isPlayerMaxRankInSubSkill(player, SubSkillType.SALVAGE_ARCANE_SALVAGE) || salvageableAmount == 1) {
|
||||
NotificationManager.sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Normal", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
|
||||
} else {
|
||||
NotificationManager.sendPlayerInformationChatOnly(player, "Salvage.Skills.Lottery.Untrained", String.valueOf(lotteryResults), StringUtils.getPrettyItemString(item.getType()));
|
||||
|
@ -8,6 +8,7 @@ import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
import com.gmail.nossr50.runnables.skills.SkillUnlockNotificationTask;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
@ -37,6 +38,10 @@ public class RankUtils {
|
||||
if(innerMap == null || innerMap.get(playerRankInSkill) == null)
|
||||
continue;
|
||||
|
||||
//Don't send notifications if the player lacks the permission node
|
||||
if(!Permissions.isSubSkillEnabled(mcMMOPlayer.getPlayer(), subSkillType))
|
||||
continue;
|
||||
|
||||
//The players level is the exact level requirement for this skill
|
||||
if(newLevel == innerMap.get(playerRankInSkill))
|
||||
{
|
||||
|
@ -454,6 +454,7 @@ permissions:
|
||||
description: Allows access to all Repair abilities
|
||||
children:
|
||||
mcmmo.ability.repair.arcaneforging: true
|
||||
mcmmo.ability.repair.superrepair: true
|
||||
mcmmo.ability.repair.armorrepair: true
|
||||
mcmmo.ability.repair.diamondrepair: true
|
||||
mcmmo.ability.repair.goldrepair: true
|
||||
@ -503,7 +504,7 @@ permissions:
|
||||
mcmmo.ability.salvage.all:
|
||||
description: Allows access to all Smelting abilities
|
||||
children:
|
||||
mcmmo.ability.salvage.advancedsalvage: true
|
||||
mcmmo.ability.salvage.scrapcollector: true
|
||||
mcmmo.ability.salvage.arcanesalvage: true
|
||||
mcmmo.ability.salvage.armorsalvage: true
|
||||
mcmmo.ability.salvage.diamondsalvage: true
|
||||
@ -516,8 +517,8 @@ permissions:
|
||||
mcmmo.ability.salvage.stringsalvage: true
|
||||
mcmmo.ability.salvage.toolsalvage: true
|
||||
mcmmo.ability.salvage.woodsalvage: true
|
||||
mcmmo.ability.salvage.advancedsalvage:
|
||||
description: Allows access to the Advanced Salvage ability
|
||||
mcmmo.ability.salvage.scrapcollector:
|
||||
description: Allows access to the Scrap Collector ability
|
||||
mcmmo.ability.salvage.arcanesalvage:
|
||||
description: Allows access to the Arcane Salvage ability
|
||||
mcmmo.ability.salvage.armorsalvage:
|
||||
|
Loading…
Reference in New Issue
Block a user