Addition of monster book minimum party level.

Contributed by SmiDmi.
This commit is contained in:
MobiusDevelopment
2019-07-10 06:27:52 +00:00
parent 9a8db7c814
commit 1c489d824c
4 changed files with 8 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ import ai.AbstractNpcAI;
public class MonsterBook extends AbstractNpcAI
{
private static final int MAXIMUM_REWARD_RANGE = 2500;
private static final int MINIMUM_PARTY_LEVEL = 99;
private MonsterBook()
{
@@ -59,7 +60,7 @@ public class MonsterBook extends AbstractNpcAI
final MonsterBookCardHolder card = MonsterBookData.getInstance().getMonsterBookCardByMonsterId(npc.getId());
for (PlayerInstance player : rewardedPlayers)
{
if ((player != null) && (player.calculateDistance2D(killer) < MAXIMUM_REWARD_RANGE))
if (((player != null) && (player.calculateDistance2D(killer) < MAXIMUM_REWARD_RANGE)) && (player.getLevel() >= MINIMUM_PARTY_LEVEL))
{
player.updateMonsterBook(card);
}