mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-28 10:05:27 +02:00
Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.config.treasure.FishingTreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@@ -28,7 +29,7 @@ public class FishingCommand extends SkillCommand {
|
||||
private String rareTreasure;
|
||||
private String epicTreasure;
|
||||
private String legendaryTreasure;
|
||||
private String recordTreasure;
|
||||
private String mythicTreasure;
|
||||
|
||||
private String magicChance;
|
||||
|
||||
@@ -54,19 +55,19 @@ public class FishingCommand extends SkillCommand {
|
||||
lootTier = fishingManager.getLootTier();
|
||||
|
||||
// Item drop rates
|
||||
commonTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.COMMON) / 100.0);
|
||||
uncommonTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.UNCOMMON) / 100.0);
|
||||
rareTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RARE) / 100.0);
|
||||
epicTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.EPIC) / 100.0);
|
||||
legendaryTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.LEGENDARY) / 100.0);
|
||||
recordTreasure = percent.format(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RECORD) / 100.0);
|
||||
commonTreasure = percent.format(FishingTreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.COMMON) / 100.0);
|
||||
uncommonTreasure = percent.format(FishingTreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.UNCOMMON) / 100.0);
|
||||
rareTreasure = percent.format(FishingTreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RARE) / 100.0);
|
||||
epicTreasure = percent.format(FishingTreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.EPIC) / 100.0);
|
||||
legendaryTreasure = percent.format(FishingTreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.LEGENDARY) / 100.0);
|
||||
mythicTreasure = percent.format(FishingTreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.MYTHIC) / 100.0);
|
||||
|
||||
// Magic hunter drop rates
|
||||
double totalEnchantChance = 0;
|
||||
|
||||
for (Rarity rarity : Rarity.values()) {
|
||||
if (rarity != Rarity.RECORD) {
|
||||
totalEnchantChance += TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity);
|
||||
if (rarity != Rarity.MYTHIC) {
|
||||
totalEnchantChance += FishingTreasureConfig.getInstance().getEnchantmentDropRate(lootTier, rarity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +145,7 @@ public class FishingCommand extends SkillCommand {
|
||||
String.valueOf(rareTreasure),
|
||||
String.valueOf(epicTreasure),
|
||||
String.valueOf(legendaryTreasure),
|
||||
String.valueOf(recordTreasure)));
|
||||
String.valueOf(mythicTreasure)));
|
||||
}
|
||||
|
||||
return messages;
|
||||
|
Reference in New Issue
Block a user