I have this code in doDie method inside L2MonsterInstance.java file:
int npcId = getTemplate().getId();switch(npcId){case150:if(((L2PcInstance) killer).getClan()==null){returnfalse;}if(killer.getActingPlayer()!=null){((L2PcInstance) killer).getClan().addReputationScore(10,true);// Change 1 with the reputation points you want to add upon kill monster((L2PcInstance) killer).sendMessage("Your Clan Reputation is increased by 10.");}final L2Summon summon = killer.getSummon();if(summon.getOwner()!=null){returnfalse;}}
However, when i am killing monster with ID 150 i am getting a NullPointerException. Instead if the monster is killed by a summon or a pet i am getting a ClassCasterException. How to solve it?
Продам почты БЕЗ ПАРОЛЕЙ. Много уника.
Не валидированы, валид 20-40%. Гео - в основном ЕУ.
Selling emails WITHOUT PASSWORDS. Lots of uniques.
Not validated, valid 20-40%. Geo - mostly EU.
tg
@poslob
Question
Gries
I have this code in doDie method inside L2MonsterInstance.java file:
However, when i am killing monster with ID 150 i am getting a NullPointerException. Instead if the monster is killed by a summon or a pet i am getting a ClassCasterException.
Edited by GriesHow to solve it?
10 answers to this question
Recommended Posts