Added the possibility to not use a max level for Fishing

by using a negative number, changed default
treasure.yml file accordingly
This commit is contained in:
bm01 2013-01-26 01:02:04 +01:00
parent 188ad359fe
commit a0a52a3433
4 changed files with 872 additions and 874 deletions

View File

@ -25,13 +25,11 @@ Version 1.4.00-dev
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml
= Fixed abilities activating with the wrong tool in hand
= Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted)
<<<<<<< Upstream, based on origin/master
= Fixed bug where Iron Grip was using the attacker's skill values rather than the defender's.
= Fixed a bug where /party kick would trigger the PartyChangeEvent for the wrong player
= Fixed a bug where party join messages weren't displayed
=======
! A Fishing catch will now always contains a fish even if a treasure is found
>>>>>>> 1f7a94a Changed Fishing to always give a fish on a successful catch
! It is now possible to use a negative number for Max_Level in treasures.yml to not use a maximum level, changed default file accordingly
! A Fishing catch will now always contains a fish even if a treasure is found
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
! Changed how Tree Feller is handled, it should now put less stress on the CPU

View File

@ -131,10 +131,8 @@ public class TreasuresConfig extends ConfigLoader{
}
int maxLevel = config.getInt("Treasures." + treasureName + ".Max_Level");
if (maxLevel < 0) {
reason.add("Invalid Max_Level: " + maxLevel);
}
if (noErrorsInTreasure(reason)) {
FishingTreasure fTreasure = new FishingTreasure(item, xp, dropChance, dropLevel, maxLevel);

View File

@ -111,7 +111,9 @@ public class Fishing {
List<FishingTreasure> rewards = new ArrayList<FishingTreasure>();
for (FishingTreasure treasure : TreasuresConfig.getInstance().fishingRewards) {
if (treasure.getDropLevel() <= skillLevel && treasure.getMaxLevel() >= skillLevel) {
int maxLevel = treasure.getMaxLevel();
if (treasure.getDropLevel() <= skillLevel && (maxLevel >= skillLevel || maxLevel <= 0)) {
rewards.add(treasure);
}
}

File diff suppressed because it is too large Load Diff