Respawn rework and various changes.

This commit is contained in:
MobiusDev
2018-03-31 16:36:49 +00:00
parent 41e19cc19e
commit 10b722829a
282 changed files with 866 additions and 1807 deletions

View File

@@ -296,7 +296,7 @@ public class AdminSpawn implements IAdminCommandHandler
L2NpcTemplate[] mobs = NpcTable.getInstance().getAllMonstersOfLevel(level);
// Start
tb.append("<html><title>Spawn Monster:</title><body><p> Level " + level + ":<br>Total Npc's : " + mobs.length + "<br>");
tb.append("<html><title>Spawn Monster:</title><body><p> Level " + level + ":<br>Total NPCs : " + mobs.length + "<br>");
String end1 = "<br><center><button value=\"Next\" action=\"bypass -h admin_spawn_index " + level + " $from$\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center></body></html>";
String end2 = "<br><center><button value=\"Back\" action=\"bypass -h admin_show_spawns\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center></body></html>";

View File

@@ -1007,7 +1007,7 @@ public final class L2World
*/
public synchronized void deleteVisibleNpcSpawns()
{
LOGGER.info("Deleting all visible NPC's.");
LOGGER.info("Deleting all visible NPCs.");
for (int i = 0; i <= REGIONS_X; i++)
{
@@ -1016,7 +1016,7 @@ public final class L2World
_worldRegions[i][j].deleteVisibleNpcSpawns();
}
}
LOGGER.info("All visible NPC's deleted.");
LOGGER.info("All visible NPCs deleted.");
}
/**

View File

@@ -470,7 +470,7 @@ public final class L2WorldRegion
*/
public synchronized void deleteVisibleNpcSpawns()
{
LOGGER.info("Deleting all visible NPC's in Region: " + getName());
LOGGER.info("Deleting all visible NPCs in Region: " + getName());
for (L2Object obj : _visibleObjects)
{
if (obj instanceof L2NpcInstance)
@@ -490,7 +490,7 @@ public final class L2WorldRegion
}
if (Config.DEBUG)
{
LOGGER.info("All visible NPC's deleted in Region: " + getName());
LOGGER.info("All visible NPCs deleted in Region: " + getName());
}
}

View File

@@ -31,7 +31,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate;
/**
* Olympiad Npc's Instance
* Olympiad NPCs Instance
* @author godson
*/

View File

@@ -100,14 +100,8 @@ public class L2Spawn
/** The task launching the function doSpawn() */
class SpawnTask implements Runnable
{
// L2NpcInstance _instance;
// int _objId;
private final L2NpcInstance _oldNpc;
public SpawnTask(/* int objid */final L2NpcInstance pOldNpc)
public SpawnTask()
{
// _objId= objid;
_oldNpc = pOldNpc;
}
@Override
@@ -115,8 +109,7 @@ public class L2Spawn
{
try
{
// doSpawn();
respawnNpc(_oldNpc);
doSpawn();
}
catch (Exception e)
{
@@ -429,8 +422,7 @@ public class L2Spawn
_scheduledCount++;
// Create a new SpawnTask to launch after the respawn Delay
// ClientScheduler.getInstance().scheduleLow(new SpawnTask(npcId), _respawnDelay);
ThreadPoolManager.schedule(new SpawnTask(oldNpc), _respawnDelay);
ThreadPoolManager.schedule(new SpawnTask(), _respawnDelay);
}
}
@@ -671,15 +663,6 @@ public class L2Spawn
return _lastSpawn;
}
/**
* @param oldNpc
*/
public void respawnNpc(L2NpcInstance oldNpc)
{
oldNpc.refreshID();
/* L2NpcInstance instance = */initializeNpcInstance(oldNpc);
}
public L2NpcTemplate getTemplate()
{
return _template;
@@ -694,5 +677,4 @@ public class L2Spawn
{
_instanceId = instanceId;
}
}