Respawn rework and various changes.
This commit is contained in:
@@ -44,7 +44,7 @@ public final class NonTalkingNpcs extends AbstractNpcAI
|
||||
32031, // Ice Fairy Sculpture
|
||||
32032, // Strange Machine
|
||||
32306, // Native's Corpse
|
||||
32619, 32620, 32621, // NPC's without name
|
||||
32619, 32620, 32621, // NPCs without name
|
||||
32715, 32716, 32717, // Lilith's group
|
||||
32718, 32719, 32720, 32721, // Anakim's group
|
||||
18839, // Wild Maguen
|
||||
|
||||
@@ -37,7 +37,7 @@ import ai.AbstractNpcAI;
|
||||
*/
|
||||
public final class SelMahumSquad extends AbstractNpcAI
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int CHEF = 18908;
|
||||
private static final int FIRE = 18927;
|
||||
private static final int STOVE = 18933;
|
||||
|
||||
@@ -35,7 +35,7 @@ import ai.AbstractNpcAI;
|
||||
|
||||
public final class TurekOrcs extends AbstractNpcAI
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int[] MOBS =
|
||||
{
|
||||
20494, // Turek War Hound
|
||||
|
||||
@@ -86,7 +86,7 @@ public final class Elpies extends Event
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check Custom Table - we use custom NPC's
|
||||
// Check Custom Table - we use custom NPCs
|
||||
if (!Config.CUSTOM_NPC_DATA)
|
||||
{
|
||||
_log.info(getName() + ": Event can't be started because custom NPC table is disabled!");
|
||||
|
||||
@@ -39,7 +39,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
|
||||
*/
|
||||
public final class Race extends Event
|
||||
{
|
||||
// Event NPC's list
|
||||
// Event NPCs list
|
||||
private final Set<L2Npc> _npcs = ConcurrentHashMap.newKeySet();
|
||||
// Npc
|
||||
private L2Npc _npc;
|
||||
@@ -55,7 +55,7 @@ public final class Race extends Event
|
||||
private static final int _time_register = 5;
|
||||
// 5 min for race
|
||||
private static final int _time_race = 10;
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int _start_npc = 900103;
|
||||
private static final int _stop_npc = 900104;
|
||||
// Skills (Frog by default)
|
||||
@@ -119,7 +119,7 @@ public final class Race extends Event
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check Custom Table - we use custom NPC's
|
||||
// Check Custom Table - we use custom NPCs
|
||||
if (!Config.CUSTOM_NPC_DATA)
|
||||
{
|
||||
_log.info(getName() + ": Event can't be started, because custom npc table is disabled!");
|
||||
|
||||
@@ -472,7 +472,7 @@ public class AdminSpawn implements IAdminCommandHandler
|
||||
final List<L2NpcTemplate> mobs = NpcData.getInstance().getAllMonstersOfLevel(level);
|
||||
final int mobsCount = mobs.size();
|
||||
final StringBuilder tb = new StringBuilder(500 + (mobsCount * 80));
|
||||
tb.append("<html><title>Spawn Monster:</title><body><p> Level : " + level + "<br>Total Npc's : " + mobsCount + "<br>");
|
||||
tb.append("<html><title>Spawn Monster:</title><body><p> Level : " + level + "<br>Total NPCs : " + mobsCount + "<br>");
|
||||
|
||||
// Loop
|
||||
int i = from;
|
||||
|
||||
@@ -57,7 +57,7 @@ import ai.AbstractNpcAI;
|
||||
*/
|
||||
public final class TullyWorkshop extends AbstractNpcAI
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int AGENT = 32372;
|
||||
private static final int CUBE_68 = 32467;
|
||||
private static final int DORIAN = 32373;
|
||||
@@ -123,7 +123,7 @@ public final class TullyWorkshop extends AbstractNpcAI
|
||||
|
||||
protected ScheduledFuture<?> _countdown = null;
|
||||
|
||||
// NPC's, spawned after Tully's death are stored here
|
||||
// NPCs, spawned after Tully's death are stored here
|
||||
protected static List<L2Npc> postMortemSpawn = new ArrayList<>();
|
||||
protected static Set<Integer> brokenContraptions = ConcurrentHashMap.newKeySet();
|
||||
protected static Set<Integer> rewardedContraptions = new HashSet<>();
|
||||
|
||||
@@ -201,10 +201,10 @@ public abstract class AbstractInstance extends AbstractNpcAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawns group of instance NPC's
|
||||
* Spawns group of instance NPCs
|
||||
* @param groupName the name of group from XML definition to spawn
|
||||
* @param instanceId the instance ID
|
||||
* @return list of spawned NPC's
|
||||
* @return list of spawned NPCs
|
||||
*/
|
||||
protected List<L2Npc> spawnGroup(String groupName, int instanceId)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.Location;
|
||||
*/
|
||||
public final class ChamberOfDelusionNorth extends Chamber
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int ENTRANCE_GATEKEEPER = 32661;
|
||||
private static final int ROOM_GATEKEEPER_FIRST = 32679;
|
||||
private static final int ROOM_GATEKEEPER_LAST = 32683;
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.Location;
|
||||
*/
|
||||
public final class ChamberOfDelusionSouth extends Chamber
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int ENTRANCE_GATEKEEPER = 32660;
|
||||
private static final int ROOM_GATEKEEPER_FIRST = 32674;
|
||||
private static final int ROOM_GATEKEEPER_LAST = 32678;
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.Location;
|
||||
*/
|
||||
public final class ChamberOfDelusionSquare extends Chamber
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int ENTRANCE_GATEKEEPER = 32662;
|
||||
private static final int ROOM_GATEKEEPER_FIRST = 32684;
|
||||
private static final int ROOM_GATEKEEPER_LAST = 32692;
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.Location;
|
||||
*/
|
||||
public final class ChamberOfDelusionTower extends Chamber
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int ENTRANCE_GATEKEEPER = 32663;
|
||||
private static final int ROOM_GATEKEEPER_FIRST = 32693;
|
||||
private static final int ROOM_GATEKEEPER_LAST = 32701;
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.Location;
|
||||
*/
|
||||
public final class ChamberOfDelusionWest extends Chamber
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int ENTRANCE_GATEKEEPER = 32659;
|
||||
private static final int ROOM_GATEKEEPER_FIRST = 32669;
|
||||
private static final int ROOM_GATEKEEPER_LAST = 32673;
|
||||
|
||||
@@ -361,7 +361,7 @@ public final class Kamaloka extends AbstractInstance
|
||||
*/
|
||||
private static final int TELEPORTER = 32496;
|
||||
|
||||
/** Kamaloka captains (start npc's) npcIds. */
|
||||
/** Kamaloka captains (start NPCs) npcIds. */
|
||||
private static final int[] CAPTAINS =
|
||||
{
|
||||
30332,
|
||||
|
||||
@@ -30,7 +30,7 @@ import quests.Q00184_ArtOfPersuasion.Q00184_ArtOfPersuasion;
|
||||
*/
|
||||
public final class Q00185_NikolasCooperation extends Quest
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int MAESTRO_NIKOLA = 30621;
|
||||
private static final int RESEARCHER_LORAIN = 30673;
|
||||
private static final int DESTROYED_DEVICE = 32366;
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.l2jmobius.gameserver.util.Util;
|
||||
*/
|
||||
public final class Q00292_BrigandsSweep extends Quest
|
||||
{
|
||||
// NPC's
|
||||
// NPCs
|
||||
private static final int SPIRON = 30532;
|
||||
private static final int BALANKI = 30533;
|
||||
// Items
|
||||
|
||||
@@ -437,7 +437,7 @@ public class Q00727_HopeWithinTheDarkness extends Quest
|
||||
{
|
||||
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), STRINGID_DIE[npc.getId() - 36562]));
|
||||
|
||||
// All other friendly NPC's do suicide - start timer
|
||||
// All other friendly NPCs do suicide - start timer
|
||||
startQuestTimer("suicide", 1500, npc, null);
|
||||
cancelQuestTimer("check_for_foes", npc, null);
|
||||
cancelQuestTimer("buff", npc, null);
|
||||
|
||||
@@ -88,11 +88,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
/** The task launching the function doSpawn() */
|
||||
class SpawnTask implements Runnable
|
||||
{
|
||||
private final L2Npc _oldNpc;
|
||||
|
||||
public SpawnTask(L2Npc pOldNpc)
|
||||
public SpawnTask()
|
||||
{
|
||||
_oldNpc = pOldNpc;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -100,8 +97,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
{
|
||||
try
|
||||
{
|
||||
// doSpawn();
|
||||
respawnNpc(_oldNpc);
|
||||
doSpawn();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -445,8 +441,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
_scheduledCount++;
|
||||
|
||||
// Create a new SpawnTask to launch after the respawn Delay
|
||||
// ClientScheduler.getInstance().scheduleLow(new SpawnTask(npcId), _respawnDelay);
|
||||
ThreadPoolManager.schedule(new SpawnTask(oldNpc), hasRespawnRandom() ? Rnd.get(_respawnMinDelay, _respawnMaxDelay) : _respawnMinDelay);
|
||||
ThreadPoolManager.schedule(new SpawnTask(), hasRespawnRandom() ? Rnd.get(_respawnMinDelay, _respawnMaxDelay) : _respawnMinDelay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +616,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
// DO NOT CORRECT SPAWN Z IN GENERAL - Prevent NPC spawns on top of buildings
|
||||
// don't correct z of flying npc's
|
||||
// don't correct z of flying NPCs
|
||||
// if (!npc.isFlying())
|
||||
// {
|
||||
// newlocz = GeoEngine.getInstance().getHeight(newlocx, newlocy, newlocz);
|
||||
@@ -779,18 +774,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _spawnedNpcs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param oldNpc
|
||||
*/
|
||||
public void respawnNpc(L2Npc oldNpc)
|
||||
{
|
||||
if (_doRespawn)
|
||||
{
|
||||
oldNpc.refreshID();
|
||||
initializeNpcInstance(oldNpc);
|
||||
}
|
||||
}
|
||||
|
||||
public L2NpcTemplate getTemplate()
|
||||
{
|
||||
return _template;
|
||||
|
||||
@@ -566,7 +566,7 @@ public final class L2World
|
||||
*/
|
||||
public void deleteVisibleNpcSpawns()
|
||||
{
|
||||
_log.info("Deleting all visible NPC's.");
|
||||
_log.info("Deleting all visible NPCs.");
|
||||
for (int i = 0; i <= REGIONS_X; i++)
|
||||
{
|
||||
for (int j = 0; j <= REGIONS_Y; j++)
|
||||
@@ -574,7 +574,7 @@ public final class L2World
|
||||
_worldRegions[i][j].deleteVisibleNpcSpawns();
|
||||
}
|
||||
}
|
||||
_log.info("All visible NPC's deleted.");
|
||||
_log.info("All visible NPCs deleted.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -443,7 +443,7 @@ public final class L2WorldRegion
|
||||
*/
|
||||
public void deleteVisibleNpcSpawns()
|
||||
{
|
||||
_log.fine("Deleting all visible NPC's in Region: " + getName());
|
||||
_log.fine("Deleting all visible NPCs in Region: " + getName());
|
||||
for (L2Object obj : _visibleObjects.values())
|
||||
{
|
||||
if (obj instanceof L2Npc)
|
||||
@@ -459,6 +459,6 @@ public final class L2WorldRegion
|
||||
_log.finest("Removed NPC " + target.getObjectId());
|
||||
}
|
||||
}
|
||||
_log.info("All visible NPC's deleted in Region: " + getName());
|
||||
_log.info("All visible NPCs deleted in Region: " + getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||
|
||||
/**
|
||||
* Olympiad Npc's Instance
|
||||
* Olympiad NPCs Instance
|
||||
* @author godson
|
||||
*/
|
||||
public class L2OlympiadManagerInstance extends L2Npc
|
||||
|
||||
@@ -44,7 +44,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
|
||||
|
||||
/**
|
||||
* Parent class for long time events.<br>
|
||||
* Maintains config reading, spawn of NPC's, adding of event's drop.
|
||||
* Maintains config reading, spawn of NPCs, adding of event's drop.
|
||||
* @author GKR
|
||||
*/
|
||||
public class LongTimeEvent extends Quest
|
||||
@@ -252,7 +252,7 @@ public class LongTimeEvent extends Quest
|
||||
}
|
||||
|
||||
/**
|
||||
* Maintenance event start - adds global drop, spawns event NPC's, shows start announcement.
|
||||
* Maintenance event start - adds global drop, spawns event NPCs, shows start announcement.
|
||||
*/
|
||||
protected void startEvent()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user