Dropped onKillDelay.
This commit is contained in:
parent
d3ed651c3a
commit
f2e3e8171c
@ -710,7 +710,6 @@ public final class Antharas extends AbstractNpcAI
|
||||
{
|
||||
cancelQuestTimer("SET_REGEN", npc, null);
|
||||
startQuestTimer("SET_REGEN", 60000, npc, null);
|
||||
((L2Attackable) npc).setOnKillDelay(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -108,7 +108,6 @@ public class L2Attackable extends L2Npc
|
||||
private final Map<Integer, AbsorberInfo> _absorbersList = new ConcurrentHashMap<>();
|
||||
// Misc
|
||||
private boolean _mustGiveExpSp;
|
||||
protected int _onKillDelay = 5000;
|
||||
|
||||
/**
|
||||
* Creates an attackable NPC.
|
||||
@ -347,7 +346,7 @@ public class L2Attackable extends L2Npc
|
||||
if ((killer != null) && killer.isPlayable())
|
||||
{
|
||||
// Delayed notification
|
||||
EventDispatcher.getInstance().notifyEventAsyncDelayed(new OnAttackableKill(killer.getActingPlayer(), this, killer.isSummon()), this, _onKillDelay);
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnAttackableKill(killer.getActingPlayer(), this, killer.isSummon()), this);
|
||||
// if killer have stat hpRestoreOnKill
|
||||
final int hpRestore = (int) killer.getStat().calcStat(Stats.HP_RESTORE_ON_KILL, 0, null, null);
|
||||
if (hpRestore > 0)
|
||||
@ -1582,20 +1581,6 @@ public class L2Attackable extends L2Npc
|
||||
return _seeded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set delay for onKill() call, in ms Default: 5000 ms
|
||||
* @param delay
|
||||
*/
|
||||
public final void setOnKillDelay(int delay)
|
||||
{
|
||||
_onKillDelay = delay;
|
||||
}
|
||||
|
||||
public final int getOnKillDelay()
|
||||
{
|
||||
return _onKillDelay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the server allows Random Animation.
|
||||
*/
|
||||
|
@ -50,7 +50,6 @@ import com.l2jmobius.gameserver.model.L2WorldRegion;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.TeleportWhereType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
|
||||
@ -587,7 +586,7 @@ public final class Instance
|
||||
final List<L2Spawn> manualSpawn = new ArrayList<>();
|
||||
for (Node d = group.getFirstChild(); d != null; d = d.getNextSibling())
|
||||
{
|
||||
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0, delay = -1;
|
||||
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0;
|
||||
Boolean allowRandomWalk = null;
|
||||
String areaName = null;
|
||||
int globalMapId = 0;
|
||||
@ -601,13 +600,7 @@ public final class Instance
|
||||
heading = Integer.parseInt(d.getAttributes().getNamedItem("heading").getNodeValue());
|
||||
respawn = Integer.parseInt(d.getAttributes().getNamedItem("respawn").getNodeValue());
|
||||
|
||||
Node node = d.getAttributes().getNamedItem("onKillDelay");
|
||||
if (node != null)
|
||||
{
|
||||
delay = Integer.parseInt(node.getNodeValue());
|
||||
}
|
||||
|
||||
node = d.getAttributes().getNamedItem("respawnRandom");
|
||||
Node node = d.getAttributes().getNamedItem("respawnRandom");
|
||||
if (node != null)
|
||||
{
|
||||
respawnRandom = Integer.parseInt(node.getNodeValue());
|
||||
@ -661,11 +654,7 @@ public final class Instance
|
||||
|
||||
if (spawnGroup.equals("general"))
|
||||
{
|
||||
final L2Npc spawned = spawnDat.doSpawn();
|
||||
if ((delay >= 0) && (spawned instanceof L2Attackable))
|
||||
{
|
||||
((L2Attackable) spawned).setOnKillDelay(delay);
|
||||
}
|
||||
spawnDat.doSpawn();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -355,7 +355,6 @@ public abstract class AbstractScript implements INamable
|
||||
// ---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Provides delayed (Depending on {@link com.l2jmobius.gameserver.model.actor.L2Attackable#getOnKillDelay()}) callback operation when L2Attackable dies from a player.
|
||||
* @param callback
|
||||
* @param npcIds
|
||||
* @return
|
||||
@ -366,7 +365,6 @@ public abstract class AbstractScript implements INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides delayed (Depending on {@link com.l2jmobius.gameserver.model.actor.L2Attackable#getOnKillDelay()}) callback operation when L2Attackable dies from a player.
|
||||
* @param callback
|
||||
* @param npcIds
|
||||
* @return
|
||||
|
Loading…
Reference in New Issue
Block a user