Droplists randomization and maximum drop occurrences setting.
This commit is contained in:
@@ -106,6 +106,12 @@ RaidDropChanceMultiplier = 1
|
||||
DropAmountMultiplierByItemId = 57,1
|
||||
DropChanceMultiplierByItemId = 57,1
|
||||
|
||||
# Maximum drop occurrences.
|
||||
# Note: Items that have 100% drop chance without server rate multipliers
|
||||
# are not counted by this value. They will drop as extra drops.
|
||||
DropMaxOccurrencesNormal = 2
|
||||
DropMaxOccurrencesRaidboss = 7
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Drop Level Difference Settings
|
||||
|
@@ -643,12 +643,6 @@ public final class Config
|
||||
public static int INVENTORY_MAXIMUM_PET;
|
||||
public static double PET_HP_REGEN_MULTIPLIER;
|
||||
public static double PET_MP_REGEN_MULTIPLIER;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int VITALITY_CONSUME_BY_MOB;
|
||||
public static int VITALITY_CONSUME_BY_BOSS;
|
||||
|
||||
@@ -702,6 +696,14 @@ public final class Config
|
||||
public static float RATE_RAID_DROP_CHANCE_MULTIPLIER;
|
||||
public static Map<Integer, Float> RATE_DROP_AMOUNT_BY_ID;
|
||||
public static Map<Integer, Float> RATE_DROP_CHANCE_BY_ID;
|
||||
public static int DROP_MAX_OCCURRENCES_NORMAL;
|
||||
public static int DROP_MAX_OCCURRENCES_RAIDBOSS;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static float RATE_KARMA_LOST;
|
||||
public static float RATE_KARMA_EXP_LOST;
|
||||
public static float RATE_SIEGE_GUARDS_PRICE;
|
||||
@@ -2087,6 +2089,9 @@ public final class Config
|
||||
}
|
||||
}
|
||||
|
||||
DROP_MAX_OCCURRENCES_NORMAL = RatesSettings.getInt("DropMaxOccurrencesNormal", 2);
|
||||
DROP_MAX_OCCURRENCES_RAIDBOSS = RatesSettings.getInt("DropMaxOccurrencesRaidboss", 7);
|
||||
|
||||
DROP_ADENA_MIN_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMinLevelDifference", 8);
|
||||
DROP_ADENA_MAX_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMaxLevelDifference", 15);
|
||||
DROP_ADENA_MIN_LEVEL_GAP_CHANCE = RatesSettings.getDouble("DropAdenaMinLevelGapChance", 10);
|
||||
|
@@ -604,10 +604,21 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
return null;
|
||||
}
|
||||
|
||||
// randomize drop order
|
||||
Collections.shuffle(dropList);
|
||||
|
||||
final int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
int dropOccurrenceCounter = victim.isRaid() ? Config.DROP_MAX_OCCURRENCES_RAIDBOSS : Config.DROP_MAX_OCCURRENCES_NORMAL;
|
||||
Collection<ItemHolder> calculatedDrops = null;
|
||||
for (DropHolder dropItem : dropList)
|
||||
{
|
||||
// check if maximum drop occurrences have been reached
|
||||
// items that have 100% drop chance without server rate multipliers drop normally
|
||||
if ((dropOccurrenceCounter == 0) && (dropItem.getChance() < 100))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// check level gap that may prevent drop this item
|
||||
final double levelGapChanceToDrop;
|
||||
if (dropItem.getItemId() == Inventory.ADENA_ID)
|
||||
@@ -637,6 +648,10 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
|
||||
// finally
|
||||
if (dropItem.getChance() < 100)
|
||||
{
|
||||
dropOccurrenceCounter--;
|
||||
}
|
||||
calculatedDrops.add(drop);
|
||||
}
|
||||
|
||||
|
@@ -106,6 +106,12 @@ RaidDropChanceMultiplier = 1
|
||||
DropAmountMultiplierByItemId = 57,1
|
||||
DropChanceMultiplierByItemId = 57,1
|
||||
|
||||
# Maximum drop occurrences.
|
||||
# Note: Items that have 100% drop chance without server rate multipliers
|
||||
# are not counted by this value. They will drop as extra drops.
|
||||
DropMaxOccurrencesNormal = 2
|
||||
DropMaxOccurrencesRaidboss = 7
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Drop Level Difference Settings
|
||||
|
@@ -644,12 +644,6 @@ public final class Config
|
||||
public static int INVENTORY_MAXIMUM_PET;
|
||||
public static double PET_HP_REGEN_MULTIPLIER;
|
||||
public static double PET_MP_REGEN_MULTIPLIER;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int VITALITY_CONSUME_BY_MOB;
|
||||
public static int VITALITY_CONSUME_BY_BOSS;
|
||||
|
||||
@@ -703,6 +697,14 @@ public final class Config
|
||||
public static float RATE_RAID_DROP_CHANCE_MULTIPLIER;
|
||||
public static Map<Integer, Float> RATE_DROP_AMOUNT_BY_ID;
|
||||
public static Map<Integer, Float> RATE_DROP_CHANCE_BY_ID;
|
||||
public static int DROP_MAX_OCCURRENCES_NORMAL;
|
||||
public static int DROP_MAX_OCCURRENCES_RAIDBOSS;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static float RATE_KARMA_LOST;
|
||||
public static float RATE_KARMA_EXP_LOST;
|
||||
public static float RATE_SIEGE_GUARDS_PRICE;
|
||||
@@ -2089,6 +2091,9 @@ public final class Config
|
||||
}
|
||||
}
|
||||
|
||||
DROP_MAX_OCCURRENCES_NORMAL = RatesSettings.getInt("DropMaxOccurrencesNormal", 2);
|
||||
DROP_MAX_OCCURRENCES_RAIDBOSS = RatesSettings.getInt("DropMaxOccurrencesRaidboss", 7);
|
||||
|
||||
DROP_ADENA_MIN_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMinLevelDifference", 8);
|
||||
DROP_ADENA_MAX_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMaxLevelDifference", 15);
|
||||
DROP_ADENA_MIN_LEVEL_GAP_CHANCE = RatesSettings.getDouble("DropAdenaMinLevelGapChance", 10);
|
||||
|
@@ -604,10 +604,21 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
return null;
|
||||
}
|
||||
|
||||
// randomize drop order
|
||||
Collections.shuffle(dropList);
|
||||
|
||||
final int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
int dropOccurrenceCounter = victim.isRaid() ? Config.DROP_MAX_OCCURRENCES_RAIDBOSS : Config.DROP_MAX_OCCURRENCES_NORMAL;
|
||||
Collection<ItemHolder> calculatedDrops = null;
|
||||
for (DropHolder dropItem : dropList)
|
||||
{
|
||||
// check if maximum drop occurrences have been reached
|
||||
// items that have 100% drop chance without server rate multipliers drop normally
|
||||
if ((dropOccurrenceCounter == 0) && (dropItem.getChance() < 100))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// check level gap that may prevent drop this item
|
||||
final double levelGapChanceToDrop;
|
||||
if (dropItem.getItemId() == Inventory.ADENA_ID)
|
||||
@@ -637,6 +648,10 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
|
||||
// finally
|
||||
if (dropItem.getChance() < 100)
|
||||
{
|
||||
dropOccurrenceCounter--;
|
||||
}
|
||||
calculatedDrops.add(drop);
|
||||
}
|
||||
|
||||
|
@@ -106,6 +106,12 @@ RaidDropChanceMultiplier = 1
|
||||
DropAmountMultiplierByItemId = 57,1
|
||||
DropChanceMultiplierByItemId = 57,1
|
||||
|
||||
# Maximum drop occurrences.
|
||||
# Note: Items that have 100% drop chance without server rate multipliers
|
||||
# are not counted by this value. They will drop as extra drops.
|
||||
DropMaxOccurrencesNormal = 2
|
||||
DropMaxOccurrencesRaidboss = 7
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Drop Level Difference Settings
|
||||
|
@@ -644,12 +644,6 @@ public final class Config
|
||||
public static int INVENTORY_MAXIMUM_PET;
|
||||
public static double PET_HP_REGEN_MULTIPLIER;
|
||||
public static double PET_MP_REGEN_MULTIPLIER;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int VITALITY_CONSUME_BY_MOB;
|
||||
public static int VITALITY_CONSUME_BY_BOSS;
|
||||
|
||||
@@ -703,6 +697,14 @@ public final class Config
|
||||
public static float RATE_RAID_DROP_CHANCE_MULTIPLIER;
|
||||
public static Map<Integer, Float> RATE_DROP_AMOUNT_BY_ID;
|
||||
public static Map<Integer, Float> RATE_DROP_CHANCE_BY_ID;
|
||||
public static int DROP_MAX_OCCURRENCES_NORMAL;
|
||||
public static int DROP_MAX_OCCURRENCES_RAIDBOSS;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static float RATE_KARMA_LOST;
|
||||
public static float RATE_KARMA_EXP_LOST;
|
||||
public static float RATE_SIEGE_GUARDS_PRICE;
|
||||
@@ -2089,6 +2091,9 @@ public final class Config
|
||||
}
|
||||
}
|
||||
|
||||
DROP_MAX_OCCURRENCES_NORMAL = RatesSettings.getInt("DropMaxOccurrencesNormal", 2);
|
||||
DROP_MAX_OCCURRENCES_RAIDBOSS = RatesSettings.getInt("DropMaxOccurrencesRaidboss", 7);
|
||||
|
||||
DROP_ADENA_MIN_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMinLevelDifference", 8);
|
||||
DROP_ADENA_MAX_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMaxLevelDifference", 15);
|
||||
DROP_ADENA_MIN_LEVEL_GAP_CHANCE = RatesSettings.getDouble("DropAdenaMinLevelGapChance", 10);
|
||||
|
@@ -604,10 +604,21 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
return null;
|
||||
}
|
||||
|
||||
// randomize drop order
|
||||
Collections.shuffle(dropList);
|
||||
|
||||
final int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
int dropOccurrenceCounter = victim.isRaid() ? Config.DROP_MAX_OCCURRENCES_RAIDBOSS : Config.DROP_MAX_OCCURRENCES_NORMAL;
|
||||
Collection<ItemHolder> calculatedDrops = null;
|
||||
for (DropHolder dropItem : dropList)
|
||||
{
|
||||
// check if maximum drop occurrences have been reached
|
||||
// items that have 100% drop chance without server rate multipliers drop normally
|
||||
if ((dropOccurrenceCounter == 0) && (dropItem.getChance() < 100))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// check level gap that may prevent drop this item
|
||||
final double levelGapChanceToDrop;
|
||||
if (dropItem.getItemId() == Inventory.ADENA_ID)
|
||||
@@ -637,6 +648,10 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
|
||||
// finally
|
||||
if (dropItem.getChance() < 100)
|
||||
{
|
||||
dropOccurrenceCounter--;
|
||||
}
|
||||
calculatedDrops.add(drop);
|
||||
}
|
||||
|
||||
|
@@ -94,6 +94,12 @@ RaidDropChanceMultiplier = 1
|
||||
DropAmountMultiplierByItemId = 57,1
|
||||
DropChanceMultiplierByItemId = 57,1
|
||||
|
||||
# Maximum drop occurrences.
|
||||
# Note: Items that have 100% drop chance without server rate multipliers
|
||||
# are not counted by this value. They will drop as extra drops.
|
||||
DropMaxOccurrencesNormal = 2
|
||||
DropMaxOccurrencesRaidboss = 7
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Drop Level Difference Settings
|
||||
|
@@ -864,12 +864,6 @@ public final class Config
|
||||
public static int INVENTORY_MAXIMUM_PET;
|
||||
public static double PET_HP_REGEN_MULTIPLIER;
|
||||
public static double PET_MP_REGEN_MULTIPLIER;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
|
||||
// --------------------------------------------------
|
||||
// PvP Settings
|
||||
@@ -913,6 +907,14 @@ public final class Config
|
||||
public static float RATE_RAID_DROP_CHANCE_MULTIPLIER;
|
||||
public static Map<Integer, Float> RATE_DROP_AMOUNT_BY_ID;
|
||||
public static Map<Integer, Float> RATE_DROP_CHANCE_BY_ID;
|
||||
public static int DROP_MAX_OCCURRENCES_NORMAL;
|
||||
public static int DROP_MAX_OCCURRENCES_RAIDBOSS;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static float RATE_KARMA_LOST;
|
||||
public static float RATE_KARMA_EXP_LOST;
|
||||
public static float RATE_SIEGE_GUARDS_PRICE;
|
||||
@@ -2216,6 +2218,9 @@ public final class Config
|
||||
}
|
||||
}
|
||||
|
||||
DROP_MAX_OCCURRENCES_NORMAL = RatesSettings.getInt("DropMaxOccurrencesNormal", 2);
|
||||
DROP_MAX_OCCURRENCES_RAIDBOSS = RatesSettings.getInt("DropMaxOccurrencesRaidboss", 7);
|
||||
|
||||
DROP_ADENA_MIN_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMinLevelDifference", 8);
|
||||
DROP_ADENA_MAX_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMaxLevelDifference", 15);
|
||||
DROP_ADENA_MIN_LEVEL_GAP_CHANCE = RatesSettings.getDouble("DropAdenaMinLevelGapChance", 10);
|
||||
|
@@ -551,10 +551,21 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
return null;
|
||||
}
|
||||
|
||||
// randomize drop order
|
||||
Collections.shuffle(dropList);
|
||||
|
||||
final int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
int dropOccurrenceCounter = victim.isRaid() ? Config.DROP_MAX_OCCURRENCES_RAIDBOSS : Config.DROP_MAX_OCCURRENCES_NORMAL;
|
||||
Collection<ItemHolder> calculatedDrops = null;
|
||||
for (DropHolder dropItem : dropList)
|
||||
{
|
||||
// check if maximum drop occurrences have been reached
|
||||
// items that have 100% drop chance without server rate multipliers drop normally
|
||||
if ((dropOccurrenceCounter == 0) && (dropItem.getChance() < 100))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// check level gap that may prevent drop this item
|
||||
final double levelGapChanceToDrop;
|
||||
if (dropItem.getItemId() == Inventory.ADENA_ID)
|
||||
@@ -584,6 +595,10 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
|
||||
// finally
|
||||
if (dropItem.getChance() < 100)
|
||||
{
|
||||
dropOccurrenceCounter--;
|
||||
}
|
||||
calculatedDrops.add(drop);
|
||||
}
|
||||
|
||||
|
@@ -106,6 +106,12 @@ RaidDropChanceMultiplier = 1
|
||||
DropAmountMultiplierByItemId = 57,1
|
||||
DropChanceMultiplierByItemId = 57,1
|
||||
|
||||
# Maximum drop occurrences.
|
||||
# Note: Items that have 100% drop chance without server rate multipliers
|
||||
# are not counted by this value. They will drop as extra drops.
|
||||
DropMaxOccurrencesNormal = 2
|
||||
DropMaxOccurrencesRaidboss = 7
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Drop Level Difference Settings
|
||||
|
@@ -645,12 +645,6 @@ public final class Config
|
||||
public static int INVENTORY_MAXIMUM_PET;
|
||||
public static double PET_HP_REGEN_MULTIPLIER;
|
||||
public static double PET_MP_REGEN_MULTIPLIER;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int VITALITY_CONSUME_BY_MOB;
|
||||
public static int VITALITY_CONSUME_BY_BOSS;
|
||||
|
||||
@@ -704,6 +698,14 @@ public final class Config
|
||||
public static float RATE_RAID_DROP_CHANCE_MULTIPLIER;
|
||||
public static Map<Integer, Float> RATE_DROP_AMOUNT_BY_ID;
|
||||
public static Map<Integer, Float> RATE_DROP_CHANCE_BY_ID;
|
||||
public static int DROP_MAX_OCCURRENCES_NORMAL;
|
||||
public static int DROP_MAX_OCCURRENCES_RAIDBOSS;
|
||||
public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
|
||||
public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
|
||||
public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
|
||||
public static float RATE_KARMA_LOST;
|
||||
public static float RATE_KARMA_EXP_LOST;
|
||||
public static float RATE_SIEGE_GUARDS_PRICE;
|
||||
@@ -2026,6 +2028,9 @@ public final class Config
|
||||
}
|
||||
}
|
||||
|
||||
DROP_MAX_OCCURRENCES_NORMAL = RatesSettings.getInt("DropMaxOccurrencesNormal", 2);
|
||||
DROP_MAX_OCCURRENCES_RAIDBOSS = RatesSettings.getInt("DropMaxOccurrencesRaidboss", 7);
|
||||
|
||||
DROP_ADENA_MIN_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMinLevelDifference", 8);
|
||||
DROP_ADENA_MAX_LEVEL_DIFFERENCE = RatesSettings.getInt("DropAdenaMaxLevelDifference", 15);
|
||||
DROP_ADENA_MIN_LEVEL_GAP_CHANCE = RatesSettings.getDouble("DropAdenaMinLevelGapChance", 10);
|
||||
|
@@ -604,10 +604,21 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
return null;
|
||||
}
|
||||
|
||||
// randomize drop order
|
||||
Collections.shuffle(dropList);
|
||||
|
||||
final int levelDifference = victim.getLevel() - killer.getLevel();
|
||||
int dropOccurrenceCounter = victim.isRaid() ? Config.DROP_MAX_OCCURRENCES_RAIDBOSS : Config.DROP_MAX_OCCURRENCES_NORMAL;
|
||||
Collection<ItemHolder> calculatedDrops = null;
|
||||
for (DropHolder dropItem : dropList)
|
||||
{
|
||||
// check if maximum drop occurrences have been reached
|
||||
// items that have 100% drop chance without server rate multipliers drop normally
|
||||
if ((dropOccurrenceCounter == 0) && (dropItem.getChance() < 100))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// check level gap that may prevent drop this item
|
||||
final double levelGapChanceToDrop;
|
||||
if (dropItem.getItemId() == Inventory.ADENA_ID)
|
||||
@@ -637,6 +648,10 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
|
||||
// finally
|
||||
if (dropItem.getChance() < 100)
|
||||
{
|
||||
dropOccurrenceCounter--;
|
||||
}
|
||||
calculatedDrops.add(drop);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user