Addition of configurable drops for bosses.
Contributed by MrNiceGuy.
This commit is contained in:
@@ -215,6 +215,21 @@ SinEaterXpRate = 1
|
||||
BlessingChance = 15.0
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Additional drops from raid bosses (except GrandBoss)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
BossDropEnable = False
|
||||
BossDropMinLevel = 40
|
||||
BossDropMaxLevel = 999
|
||||
|
||||
# The following configures the items you want to add to the drop
|
||||
# Usage: itemId1,minAmount1;maxAmount1,chance1;itemId2...
|
||||
# Default: L-Coin Pouch, min: 1x, max: 2x, 100% chance of drop
|
||||
# PLEASE NOTE: Chance of drop also increases from VIP level/runes/etc.
|
||||
BossDropList = 71856,1,2,100;
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# LCoin Drop
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -62,8 +62,10 @@ import org.l2jmobius.commons.util.PropertiesParser;
|
||||
import org.l2jmobius.commons.util.StringUtil;
|
||||
import org.l2jmobius.gameserver.enums.ChatType;
|
||||
import org.l2jmobius.gameserver.enums.ClassId;
|
||||
import org.l2jmobius.gameserver.enums.DropType;
|
||||
import org.l2jmobius.gameserver.enums.IllegalActionPunishmentType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.ResurrectByPaymentHolder;
|
||||
import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect;
|
||||
@@ -759,9 +761,13 @@ public class Config
|
||||
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 BOSS_DROP_ENABLED;
|
||||
public static int BOSS_DROP_MIN_LEVEL;
|
||||
public static int BOSS_DROP_MAX_LEVEL;
|
||||
public static List<DropHolder> BOSS_DROP_LIST = new ArrayList<>();
|
||||
public static boolean LCOIN_DROP_ENABLED;
|
||||
public static double LCOIN_DROP_CHANCE;
|
||||
public static int LCOIN_MIN_MOB_LV;
|
||||
public static int LCOIN_MIN_MOB_LEVEL;
|
||||
public static int LCOIN_MIN_QUANTITY;
|
||||
public static int LCOIN_MAX_QUANTITY;
|
||||
public static float RATE_KARMA_LOST;
|
||||
@@ -2476,9 +2482,21 @@ public class Config
|
||||
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);
|
||||
BOSS_DROP_ENABLED = ratesConfig.getBoolean("BossDropEnable", false);
|
||||
BOSS_DROP_MIN_LEVEL = ratesConfig.getInt("BossDropMinLevel", 40);
|
||||
BOSS_DROP_MAX_LEVEL = ratesConfig.getInt("BossDropMaxLevel", 999);
|
||||
BOSS_DROP_LIST.clear();
|
||||
for (String s : ratesConfig.getString("BossDropList", "").trim().split(";"))
|
||||
{
|
||||
if (s.isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
BOSS_DROP_LIST.add(new DropHolder(DropType.DROP, Integer.parseInt(s.split(",")[0]), Integer.parseInt(s.split(",")[1]), Integer.parseInt(s.split(",")[2]), (Double.parseDouble(s.split(",")[3]))));
|
||||
}
|
||||
LCOIN_DROP_ENABLED = ratesConfig.getBoolean("LCoinDropEnable", false);
|
||||
LCOIN_DROP_CHANCE = ratesConfig.getDouble("LCoinDropChance", 15.0);
|
||||
LCOIN_MIN_MOB_LV = ratesConfig.getInt("LCoinMinimumMonsterLevel", 40);
|
||||
LCOIN_MIN_MOB_LEVEL = ratesConfig.getInt("LCoinMinimumMonsterLevel", 40);
|
||||
LCOIN_MIN_QUANTITY = ratesConfig.getInt("LCoinMinDropQuantity", 1);
|
||||
LCOIN_MAX_QUANTITY = ratesConfig.getInt("LCoinMaxDropQuantity", 5);
|
||||
|
||||
|
||||
@@ -674,18 +674,18 @@ public class NpcData implements IXmlReader
|
||||
// Clean old drop lists.
|
||||
template.removeDrops();
|
||||
|
||||
// Add LCoin drop for bosses.
|
||||
if (type.contains("boss"))
|
||||
// Add configurable item drop for bosses.
|
||||
if ((Config.BOSS_DROP_ENABLED) && (type.contains("RaidBoss") && (level >= Config.BOSS_DROP_MIN_LEVEL) && (level <= Config.BOSS_DROP_MAX_LEVEL)))
|
||||
{
|
||||
if (dropLists == null)
|
||||
{
|
||||
dropLists = new ArrayList<>();
|
||||
}
|
||||
dropLists.add(new DropHolder(DropType.DROP, Inventory.LCOIN_ID, 1, 1, 100));
|
||||
dropLists.addAll(Config.BOSS_DROP_LIST);
|
||||
}
|
||||
|
||||
// Add configurable LCoin drop for monsters.
|
||||
if ((Config.LCOIN_DROP_ENABLED) && (type.contains("Monster") && !type.contains("boss")) && (level >= Config.LCOIN_MIN_MOB_LV))
|
||||
if ((Config.LCOIN_DROP_ENABLED) && (type.contains("Monster") && !type.contains("boss")) && (level >= Config.LCOIN_MIN_MOB_LEVEL))
|
||||
{
|
||||
if (dropLists == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user