Addition of BonusDropRate effect handler.
This commit is contained in:
@@ -43,6 +43,7 @@ import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -714,6 +715,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
final double dropRateEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
|
||||
// calculate if item will drop
|
||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||
{
|
||||
|
@@ -130,6 +130,7 @@ public enum Stats
|
||||
EXPSP_RATE("rExp"),
|
||||
BONUS_EXP("bonusExp"),
|
||||
BONUS_SP("bonusSp"),
|
||||
BONUS_DROP_RATE("bonusDropRate"),
|
||||
ATTACK_CANCEL("cancel"),
|
||||
|
||||
// ACCURACY & RANGE
|
||||
|
Reference in New Issue
Block a user