Make use of bonus drop stats with group drop calculation.

This commit is contained in:
MobiusDevelopment
2022-08-23 14:33:02 +00:00
parent 573f765b23
commit 04fbe1c4f8
25 changed files with 250 additions and 0 deletions

View File

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