I have this code in doDie method inside L2MonsterInstance.java file:
int npcId = getTemplate().getId();
switch (npcId)
{
case 150:
if (((L2PcInstance) killer).getClan() == null)
{
return false;
}
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)
{
return false;
}
}
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?
DISCORD :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
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