Configurable event item drop level range between character and monster.
Contributed by CostyKiller.
This commit is contained in:
@@ -143,6 +143,10 @@ DropItemMaxLevelDifference = 10
|
||||
# Default: 10
|
||||
DropItemMinLevelGapChance = 10
|
||||
|
||||
# Allow event items drop within custom level range between character and monster.
|
||||
# Default: 9
|
||||
EventItemMaxLevelDifference = 9
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Vitality system rates. Works only if EnableVitality = True
|
||||
|
@@ -747,6 +747,7 @@ public class Config
|
||||
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 EVENT_ITEM_MAX_LEVEL_DIFFERENCE;
|
||||
public static double BLESSING_CHANCE;
|
||||
public static boolean LCOIN_DROP_ENABLED;
|
||||
public static double LCOIN_DROP_CHANCE;
|
||||
@@ -2381,6 +2382,7 @@ public class Config
|
||||
DROP_ITEM_MIN_LEVEL_DIFFERENCE = ratesConfig.getInt("DropItemMinLevelDifference", 5);
|
||||
DROP_ITEM_MAX_LEVEL_DIFFERENCE = ratesConfig.getInt("DropItemMaxLevelDifference", 10);
|
||||
DROP_ITEM_MIN_LEVEL_GAP_CHANCE = ratesConfig.getDouble("DropItemMinLevelGapChance", 10);
|
||||
EVENT_ITEM_MAX_LEVEL_DIFFERENCE = ratesConfig.getInt("EventItemMaxLevelDifference", 9);
|
||||
BLESSING_CHANCE = ratesConfig.getDouble("BlessingChance", 15.0);
|
||||
LCOIN_DROP_ENABLED = ratesConfig.getBoolean("LCoinDropEnable", false);
|
||||
LCOIN_DROP_CHANCE = ratesConfig.getDouble("LCoinDropChance", 15.0);
|
||||
|
@@ -58,9 +58,9 @@ public class EventDropManager
|
||||
return;
|
||||
}
|
||||
|
||||
// Event items drop only within a 9 level difference.
|
||||
// Event items drop only within a default 9 level difference.
|
||||
final Player player = attacker.getActingPlayer();
|
||||
if ((player.getLevel() - attackable.getLevel()) > 9)
|
||||
if ((player.getLevel() - attackable.getLevel()) > Config.EVENT_ITEM_MAX_LEVEL_DIFFERENCE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user