Champion mobs have of course bonus xp according to my configs, but for some reason when I have an XP rune in my inventory and kill a champion mob the rune doesn't work (let's say if my champs give x2 exp, and i have a x2 exp rune the champ should give x4 exp, but it only gives x2)
The code for the exp distribution looks like this
Code: Select all
// Calculate Exp and SP rewards
if (attacker.getKnownList().knowsObject(this))
{
// Calculate the difference of level between this attacker (player or servitor owner) and the L2Attackable
// mob = 24, atk = 10, diff = -14 (full xp)
// mob = 24, atk = 28, diff = 4 (some xp)
// mob = 24, atk = 50, diff = 26 (no xp)
final int levelDiff = attacker.getLevel() - getLevel();
final int[] expSp = calculateExpAndSp(levelDiff, damage, totalDamage);
long exp = expSp[0];
int sp = expSp[1];
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
{
exp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
sp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
}
if (Config.L2JMOD_SUPERCHAMPION_ENABLE && isSuperChampion())
{
exp *= Config.L2JMOD_SUPERCHAMPION_REWARDS_EXP_SP;
sp *= Config.L2JMOD_SUPERCHAMPION_REWARDS_EXP_SP;
}
exp *= penalty;
// Check for an over-hit enabled strike
L2Character overhitAttacker = getOverhitAttacker();
if (isOverhit() && (overhitAttacker != null) && (overhitAttacker.getActingPlayer() != null) && (attacker == overhitAttacker.getActingPlayer()))
{
attacker.sendPacket(SystemMessageId.OVER_HIT);
exp += calculateOverhitExp(exp);
}
// Distribute the Exp and SP between the L2PcInstance and its L2Summon
if (!attacker.isDead())
{
final long addexp = Math.round(attacker.calcStat(Stats.EXPSP_RATE, exp, null, null));
final int addsp = (int) attacker.calcStat(Stats.EXPSP_RATE, sp, null, null);
attacker.addExpAndSp(addexp, addsp, useVitalityRate());
if (addexp > 0)
{
attacker.updateVitalityPoints(getVitalityPoints(damage), true, false);
PcCafePointsManager.getInstance().givePcCafePoint((attacker), addexp);
}
}
}
I don't really know about java so i can't figure out a way to fix this, i searched for the error on internet but i didn't get how to fix it because they explained it in a way that surpasses my java knowledge
What can I do to get the results i want?