Dropped onKillDelay.

This commit is contained in:
MobiusDev
2016-03-01 10:34:58 +00:00
parent d3ed651c3a
commit f2e3e8171c
4 changed files with 4 additions and 33 deletions

View File

@@ -710,7 +710,6 @@ public final class Antharas extends AbstractNpcAI
{ {
cancelQuestTimer("SET_REGEN", npc, null); cancelQuestTimer("SET_REGEN", npc, null);
startQuestTimer("SET_REGEN", 60000, npc, null); startQuestTimer("SET_REGEN", 60000, npc, null);
((L2Attackable) npc).setOnKillDelay(0);
} }
else else
{ {

View File

@@ -108,7 +108,6 @@ public class L2Attackable extends L2Npc
private final Map<Integer, AbsorberInfo> _absorbersList = new ConcurrentHashMap<>(); private final Map<Integer, AbsorberInfo> _absorbersList = new ConcurrentHashMap<>();
// Misc // Misc
private boolean _mustGiveExpSp; private boolean _mustGiveExpSp;
protected int _onKillDelay = 5000;
/** /**
* Creates an attackable NPC. * Creates an attackable NPC.
@@ -347,7 +346,7 @@ public class L2Attackable extends L2Npc
if ((killer != null) && killer.isPlayable()) if ((killer != null) && killer.isPlayable())
{ {
// Delayed notification // 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 // if killer have stat hpRestoreOnKill
final int hpRestore = (int) killer.getStat().calcStat(Stats.HP_RESTORE_ON_KILL, 0, null, null); final int hpRestore = (int) killer.getStat().calcStat(Stats.HP_RESTORE_ON_KILL, 0, null, null);
if (hpRestore > 0) if (hpRestore > 0)
@@ -1582,20 +1581,6 @@ public class L2Attackable extends L2Npc
return _seeded; 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. * Check if the server allows Random Animation.
*/ */

View File

@@ -50,7 +50,6 @@ import com.l2jmobius.gameserver.model.L2WorldRegion;
import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.TeleportWhereType; 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.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance; import com.l2jmobius.gameserver.model.actor.instance.L2DoorInstance;
@@ -587,7 +586,7 @@ public final class Instance
final List<L2Spawn> manualSpawn = new ArrayList<>(); final List<L2Spawn> manualSpawn = new ArrayList<>();
for (Node d = group.getFirstChild(); d != null; d = d.getNextSibling()) 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; Boolean allowRandomWalk = null;
String areaName = null; String areaName = null;
int globalMapId = 0; int globalMapId = 0;
@@ -601,13 +600,7 @@ public final class Instance
heading = Integer.parseInt(d.getAttributes().getNamedItem("heading").getNodeValue()); heading = Integer.parseInt(d.getAttributes().getNamedItem("heading").getNodeValue());
respawn = Integer.parseInt(d.getAttributes().getNamedItem("respawn").getNodeValue()); respawn = Integer.parseInt(d.getAttributes().getNamedItem("respawn").getNodeValue());
Node node = d.getAttributes().getNamedItem("onKillDelay"); Node node = d.getAttributes().getNamedItem("respawnRandom");
if (node != null)
{
delay = Integer.parseInt(node.getNodeValue());
}
node = d.getAttributes().getNamedItem("respawnRandom");
if (node != null) if (node != null)
{ {
respawnRandom = Integer.parseInt(node.getNodeValue()); respawnRandom = Integer.parseInt(node.getNodeValue());
@@ -661,11 +654,7 @@ public final class Instance
if (spawnGroup.equals("general")) if (spawnGroup.equals("general"))
{ {
final L2Npc spawned = spawnDat.doSpawn(); spawnDat.doSpawn();
if ((delay >= 0) && (spawned instanceof L2Attackable))
{
((L2Attackable) spawned).setOnKillDelay(delay);
}
} }
else else
{ {

View File

@@ -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 callback
* @param npcIds * @param npcIds
* @return * @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 callback
* @param npcIds * @param npcIds
* @return * @return