L2JMobius

Crusader character exception

webcam · 3 · 884

Offline webcam

  • Vassal
  • *
    • Posts: 2
Hello everyone,
Quote
PacketHandler->ExecuteTask: Problem with [Character: 1323[268492564] - Account: ffdonvan - IP: 127.0.0.1] [Packet: 0x11]
[06/06 07:49:21] java.lang.NullPointerException: Cannot invoke "org.l2jmobius.gameserver.model.item.Weapon.getBodyPart()" because the return value of "org.l2jmobius.gameserver.model.actor.Creature.getActiveWeaponItem()" is null
        at org.l2jmobius.gameserver.model.conditions.ConditionUsingSlotType.testImpl(ConditionUsingSlotType.java:42)
        at org.l2jmobius.gameserver.model.conditions.Condition.test(Condition.java:125)
        at org.l2jmobius.gameserver.model.conditions.Condition.test(Condition.java:110)
        at handlers.effecthandlers.TwoHandedSwordBonus.pump(TwoHandedSwordBonus.java:123)
        at org.l2jmobius.gameserver.model.actor.stat.CreatureStat.recalculateStats(CreatureStat.java:910)
        at org.l2jmobius.gameserver.model.actor.stat.PlayerStat.recalculateStats(PlayerStat.java:773)
        at org.l2jmobius.gameserver.model.EffectList.updateEffectList(EffectList.java:1307)
        at org.l2jmobius.gameserver.model.EffectList.add(EffectList.java:904)
        at org.l2jmobius.gameserver.model.skill.Skill.applyEffects(Skill.java:1401)
        at org.l2jmobius.gameserver.model.actor.Creature.addSkill(Creature.java:4443)
        at org.l2jmobius.gameserver.model.actor.Player.addSkill(Player.java:7711)
        at org.l2jmobius.gameserver.model.actor.Player.addSkill(Player.java:7726)
        at org.l2jmobius.gameserver.model.clan.Clan.addSkillEffects(Clan.java:1492)
        at org.l2jmobius.gameserver.model.clan.ClanMember.setPlayer(ClanMember.java:131)
        at org.l2jmobius.gameserver.network.clientpackets.EnterWorld.notifyClanMembers(EnterWorld.java:883)
        at org.l2jmobius.gameserver.network.clientpackets.EnterWorld.run(EnterWorld.java:276)
        at org.l2jmobius.gameserver.network.PacketHandler$ExecuteTask.run(PacketHandler.java:119)
        at org.l2jmobius.commons.threads.RunnableWrapper.run(RunnableWrapper.java:35)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16114
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java
===================================================================
--- java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java (revision 12065)
+++ java/org/l2jmobius/gameserver/model/conditions/ConditionUsingSlotType.java (working copy)
@@ -18,6 +18,7 @@
 
 import org.l2jmobius.gameserver.model.actor.Creature;
 import org.l2jmobius.gameserver.model.item.ItemTemplate;
+import org.l2jmobius.gameserver.model.item.Weapon;
 import org.l2jmobius.gameserver.model.skill.Skill;
 
 /**
@@ -39,6 +40,13 @@
  {
  return false;
  }
- return (effector.getActiveWeaponItem().getBodyPart() & _mask) != 0;
+
+ final Weapon activeWeapon = effector.getActiveWeaponItem();
+ if (activeWeapon == null)
+ {
+ return false;
+ }
+
+ return (activeWeapon.getBodyPart() & _mask) != 0;
  }
 }