Make use of bonus drop stats with group drop calculation.
This commit is contained in:
@ -821,6 +821,9 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
||||
groupRate = Math.min(groupRate, rateChance);
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
groupRate *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||
|
||||
if ((Rnd.nextDouble() * 100) < (group.getChance() * groupRate))
|
||||
{
|
||||
double totalChance = 0; // total group chance is 100
|
||||
@ -1071,6 +1074,13 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop amount effect
|
||||
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_AMOUNT, 1);
|
||||
if (itemId == Inventory.ADENA_ID)
|
||||
{
|
||||
rateAmount *= killer.getStat().getMul(Stat.BONUS_DROP_ADENA, 1);
|
||||
}
|
||||
|
||||
// finally
|
||||
return new ItemHolder(itemId, (long) (Rnd.get(dropItem.getMin(), dropItem.getMax()) * rateAmount));
|
||||
}
|
||||
|
Reference in New Issue
Block a user