public void doDie(L2Character killer)
{
// Enhance soul crystals of the attacker if this L2Attackable had its soul absorbed
try {
if (killer instanceof L2PcInstance)
{
levelSoulCrystals(killer);
}
}
catch (Exception e) { _log.log(Level.SEVERE, "", e); }
// Distribute Exp and SP rewards to L2PcInstance (including Summon owner) that hit the L2Attackable and to their Party members
if (getHaveToDrop() || getMustRewardExpSP())
{
try {
calculateRewards(killer);
} catch (Exception e)
{ _log.log(Level.SEVERE, "", e); }
}
// Notify the Quest Engine of the L2Attackable death if necessary
try {
if (killer instanceof L2PcInstance || killer instanceof L2Summon)
{
L2PcInstance player = killer instanceof L2PcInstance?(L2PcInstance)killer:((L2Summon)killer).getOwner();
if (getTemplate().getEventQuests(Quest.QuestEventType.MOBKILLED) != null)
for (Quest quest: getTemplate().getEventQuests(Quest.QuestEventType.MOBKILLED))
quest.notifyKill(this, player);
}
}
catch (Exception e) { _log.log(Level.SEVERE, "", e); }
if (Config.L2JMOD_CHAMPION_ENABLE)
{
//Set champion on next spawn
setChampion(false);
if (this instanceof L2MonsterInstance && Config.L2JMOD_CHAMPION_FREQUENCY > 0 && getLevel()>=Config.L2JMOD_CHAMP_MIN_LVL && getLevel()<=Config.L2JMOD_CHAMP_MAX_LVL)
{
int random = Rnd.get(100);
if (random < Config.L2JMOD_CHAMPION_FREQUENCY)
setChampion(true);
}
}
// Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
super.doDie(killer);
}