Added missing final modifiers.
This commit is contained in:
@@ -42,7 +42,7 @@ public interface IAmountMultiplierStrategy
|
||||
{
|
||||
multiplier *= item.getItemId() != Inventory.ADENA_ID ? Config.L2JMOD_CHAMPION_REWARDS_AMOUNT : Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT;
|
||||
}
|
||||
Float dropAmountMultiplier = Config.RATE_DROP_AMOUNT_MULTIPLIER.get(item.getItemId());
|
||||
final Float dropAmountMultiplier = Config.RATE_DROP_AMOUNT_MULTIPLIER.get(item.getItemId());
|
||||
if (dropAmountMultiplier != null)
|
||||
{
|
||||
multiplier *= dropAmountMultiplier;
|
||||
|
@@ -57,7 +57,7 @@ public interface IChanceMultiplierStrategy
|
||||
{
|
||||
multiplier *= item.getItemId() != Inventory.ADENA_ID ? Config.L2JMOD_CHAMPION_REWARDS_CHANCE : Config.L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE;
|
||||
}
|
||||
Float dropChanceMultiplier = Config.RATE_DROP_CHANCE_MULTIPLIER.get(item.getItemId());
|
||||
final Float dropChanceMultiplier = Config.RATE_DROP_CHANCE_MULTIPLIER.get(item.getItemId());
|
||||
if (dropChanceMultiplier != null)
|
||||
{
|
||||
multiplier *= dropChanceMultiplier;
|
||||
|
@@ -33,7 +33,7 @@ public interface IDropCalculationStrategy
|
||||
{
|
||||
public static final IDropCalculationStrategy DEFAULT_STRATEGY = (item, victim, killer) ->
|
||||
{
|
||||
double chance = item.getChance(victim, killer);
|
||||
final double chance = item.getChance(victim, killer);
|
||||
if (chance > (Rnd.nextDouble() * 100))
|
||||
{
|
||||
int amountMultiply = 1;
|
||||
|
@@ -58,7 +58,7 @@ public interface IGroupedItemDropCalculationStrategy
|
||||
return getSingleItem(dropItem).calculateDrops(victim, killer);
|
||||
}
|
||||
|
||||
GroupedGeneralDropItem normalized = dropItem.normalizeMe(victim, killer);
|
||||
final GroupedGeneralDropItem normalized = dropItem.normalizeMe(victim, killer);
|
||||
if (normalized.getChance() > (Rnd.nextDouble() * 100))
|
||||
{
|
||||
final double random = (Rnd.nextDouble() * 100);
|
||||
@@ -92,7 +92,7 @@ public interface IGroupedItemDropCalculationStrategy
|
||||
*/
|
||||
public static final IGroupedItemDropCalculationStrategy DISBAND_GROUP = (item, victim, killer) ->
|
||||
{
|
||||
List<ItemHolder> dropped = new ArrayList<>();
|
||||
final List<ItemHolder> dropped = new ArrayList<>();
|
||||
for (IDropItem dropItem : item.extractMe())
|
||||
{
|
||||
dropped.addAll(dropItem.calculateDrops(victim, killer));
|
||||
@@ -110,16 +110,16 @@ public interface IGroupedItemDropCalculationStrategy
|
||||
// if item hasn't precise calculation there's no change from DEFAULT_STRATEGY
|
||||
return DEFAULT_STRATEGY.calculateDrops(item, victim, victim);
|
||||
}
|
||||
GroupedGeneralDropItem newItem = new GroupedGeneralDropItem(item.getChance(), DEFAULT_STRATEGY, item.getKillerChanceModifierStrategy(), IPreciseDeterminationStrategy.NEVER);
|
||||
final GroupedGeneralDropItem newItem = new GroupedGeneralDropItem(item.getChance(), DEFAULT_STRATEGY, item.getKillerChanceModifierStrategy(), IPreciseDeterminationStrategy.NEVER);
|
||||
newItem.setItems(item.getItems());
|
||||
GroupedGeneralDropItem normalized = newItem.normalizeMe(victim, killer);
|
||||
final GroupedGeneralDropItem normalized = newItem.normalizeMe(victim, killer);
|
||||
// Let's determine the number of rolls.
|
||||
int rolls = (int) (normalized.getChance() / 100);
|
||||
if ((Rnd.nextDouble() * 100) < (normalized.getChance() % 100))
|
||||
{
|
||||
rolls++;
|
||||
}
|
||||
List<ItemHolder> dropped = new ArrayList<>(rolls);
|
||||
final List<ItemHolder> dropped = new ArrayList<>(rolls);
|
||||
for (int i = 0; i < rolls; i++)
|
||||
{
|
||||
// As further normalizing on already normalized drop group does nothing, we can just pass the calculation to DEFAULT_STRATEGY with precise calculation disabled as we handle it.
|
||||
|
@@ -32,7 +32,7 @@ public interface IKillerChanceModifierStrategy extends INonGroupedKillerChanceMo
|
||||
{
|
||||
public static final IKillerChanceModifierStrategy DEFAULT_STRATEGY = (item, victim, killer) ->
|
||||
{
|
||||
int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
final int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
if ((victim.isRaid()) && Config.DEEPBLUE_DROP_RULES_RAID)
|
||||
{
|
||||
// FIXME: Config?
|
||||
@@ -49,7 +49,7 @@ public interface IKillerChanceModifierStrategy extends INonGroupedKillerChanceMo
|
||||
{
|
||||
if (((!(victim.isRaid())) && Config.DEEPBLUE_DROP_RULES) || ((victim.isRaid()) && Config.DEEPBLUE_DROP_RULES_RAID))
|
||||
{
|
||||
int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
final int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
if (item.getItemId() == Inventory.ADENA_ID)
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user