Proper instance NPC deletion.
This commit is contained in:
@@ -112,7 +112,7 @@ public class TimerHolder<T> implements Runnable
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_task.cancel(false);
|
_task.cancel(true);
|
||||||
_cancelScript.onTimerCancel(this);
|
_cancelScript.onTimerCancel(this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -642,6 +642,7 @@ public final class Instance implements IIdentifiable, INamable
|
|||||||
public void removeNpcs()
|
public void removeNpcs()
|
||||||
{
|
{
|
||||||
_spawns.forEach(SpawnTemplate::despawnAll);
|
_spawns.forEach(SpawnTemplate::despawnAll);
|
||||||
|
_npcs.forEach(L2Npc::deleteMe);
|
||||||
_npcs.clear();
|
_npcs.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,3 +47,5 @@ TODO list
|
|||||||
-Floran Agricultural Area clan halls
|
-Floran Agricultural Area clan halls
|
||||||
-Test castle sieges
|
-Test castle sieges
|
||||||
-Whisper of Dreams quests
|
-Whisper of Dreams quests
|
||||||
|
-Moon Knight quest
|
||||||
|
-Dungeon of Abyss https://www.youtube.com/watch?v=FZEu0hjCAK8
|
||||||
|
@@ -112,7 +112,7 @@ public class TimerHolder<T> implements Runnable
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_task.cancel(false);
|
_task.cancel(true);
|
||||||
_cancelScript.onTimerCancel(this);
|
_cancelScript.onTimerCancel(this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -642,6 +642,7 @@ public final class Instance implements IIdentifiable, INamable
|
|||||||
public void removeNpcs()
|
public void removeNpcs()
|
||||||
{
|
{
|
||||||
_spawns.forEach(SpawnTemplate::despawnAll);
|
_spawns.forEach(SpawnTemplate::despawnAll);
|
||||||
|
_npcs.forEach(L2Npc::deleteMe);
|
||||||
_npcs.clear();
|
_npcs.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -112,7 +112,7 @@ public class TimerHolder<T> implements Runnable
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_task.cancel(false);
|
_task.cancel(true);
|
||||||
_cancelScript.onTimerCancel(this);
|
_cancelScript.onTimerCancel(this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -642,6 +642,7 @@ public final class Instance implements IIdentifiable, INamable
|
|||||||
public void removeNpcs()
|
public void removeNpcs()
|
||||||
{
|
{
|
||||||
_spawns.forEach(SpawnTemplate::despawnAll);
|
_spawns.forEach(SpawnTemplate::despawnAll);
|
||||||
|
_npcs.forEach(L2Npc::deleteMe);
|
||||||
_npcs.clear();
|
_npcs.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user