Jump to content

Question

Posted

hello i need help when im on territory war and kill the flag to take it in my character arms got this npe i cant understand what cause this

 

Exception in thread "AISTPool-5" java.lang.NullPointerException
        at com.l2jserver.gameserver.model.actor.instance.L2TerritoryWardInstance.doDie(L2TerritoryWardInstance.java:154)
        at com.l2jserver.gameserver.model.actor.status.CharStatus.reduceHp(CharStatus.java:181)
        at com.l2jserver.gameserver.model.actor.status.NpcStatus.reduceHp(NpcStatus.java:59)
        at com.l2jserver.gameserver.model.actor.status.AttackableStatus.reduceHp(AttackableStatus.java:61)
        at com.l2jserver.gameserver.model.actor.L2Character.reduceCurrentHp(L2Character.java:6460)
        at com.l2jserver.gameserver.model.actor.L2Attackable.reduceCurrentHp(L2Attackable.java:311)
        at com.l2jserver.gameserver.model.actor.instance.L2TerritoryWardInstance.reduceCurrentHp(L2TerritoryWardInstance.java:125)
        at com.l2jserver.gameserver.model.actor.L2Attackable.reduceCurrentHp(L2Attackable.java:244)
        at com.l2jserver.gameserver.model.actor.L2Character.onHitTimer(L2Character.java:4866)
        at com.l2jserver.gameserver.model.actor.tasks.character.HitTask.run(HitTask.java:60)
        at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:89)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

 

5 answers to this question

Recommended Posts

  • 0
Posted (edited)


@Override

    public boolean doDie(L2Character killer)

    {

        // Kill the L2NpcInstance (the corpse disappeared after 7 seconds)

        if (!super.doDie(killer) || (getCastle() == null) || !TerritoryWarManager.getInstance().isTWInProgress())

        {

            return false;

        }

        

        if (killer instanceof L2PcInstance)

        {

            if ((((L2PcInstance) killer).getSiegeSide() > 0) && !((L2PcInstance) killer).isCombatFlagEquipped())

            {

                ((L2PcInstance) killer).addItem("Pickup", getId() - 23012, 1, null, false);

            }

            else

            {

                TerritoryWarManager.getInstance().getTerritoryWard(getId() - 36491).spawnMe();

            }

            SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_S1_WARD_HAS_BEEN_DESTROYED_C2_HAS_THE_WARD);

   HERE IS THE LINE 154 --->    sm.addString(getName().replaceAll(" Ward", ""));

            sm.addPcName((L2PcInstance) killer);

            TerritoryWarManager.getInstance().announceToParticipants(sm, 0, 0);

        }

        else

        {

            TerritoryWarManager.getInstance().getTerritoryWard(getId() - 36491).spawnMe();

        }

        decayMe();

        return true;

    }

 

Edited by GoldenNightmare
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..