Fixed champion related issues.

This commit is contained in:
MobiusDevelopment
2019-06-10 05:17:10 +00:00
parent 0850599fec
commit a80a494e6a
54 changed files with 785 additions and 658 deletions

View File

@@ -3,7 +3,7 @@
# Turns random mobs into Champions #
# =========================================================== #
# Enable Champions L2JMod
# Enable champion monsters.
ChampionEnable = False
# Chance for a mob to became champion (in percents) - 0 to disable
@@ -11,7 +11,7 @@ ChampionFrequency = 5
# Min and max lvl allowed for a mob to be champion.
ChampionMinLevel = 20
ChampionMaxLevel = 85
ChampionMaxLevel = 70
# Hp multiplier
ChampionHp = 8

View File

@@ -569,12 +569,11 @@ public class Attackable extends NpcInstance
setChampion(false);
if (Config.L2JMOD_CHAMPION_ENABLE)
{
// Set champion on next spawn
// Set champion on next spawn.
if (!(this instanceof GrandBossInstance) && !(this instanceof RaidBossInstance) && (this instanceof MonsterInstance)
/* && !getTemplate().isQuestMonster */ && (Config.L2JMOD_CHAMPION_FREQUENCY > 0) && (getLevel() >= Config.L2JMOD_CHAMP_MIN_LVL) && (getLevel() <= Config.L2JMOD_CHAMP_MAX_LVL))
{
final int random = Rnd.get(100);
if (random < Config.L2JMOD_CHAMPION_FREQUENCY)
if (Rnd.get(100) < Config.L2JMOD_CHAMPION_FREQUENCY)
{
setChampion(true);
}