Configurable event item drop level range between character and monster.

Contributed by CostyKiller.
This commit is contained in:
MobiusDevelopment
2021-11-22 14:20:23 +00:00
parent 542c7d0b05
commit c4e35819c9
69 changed files with 184 additions and 46 deletions

View File

@ -723,6 +723,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 float RATE_KARMA_LOST;
public static float RATE_KARMA_EXP_LOST;
public static float RATE_SIEGE_GUARDS_PRICE;
@ -2397,6 +2398,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);
// Load PvP config file (if exists)
final PropertiesParser pvpConfig = new PropertiesParser(PVP_CONFIG_FILE);

View File

@ -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;
}