Fixed admin respawn commands.

This commit is contained in:
MobiusDev
2018-09-05 23:49:55 +00:00
parent af44edb79e
commit 0aed0ae98a
24 changed files with 577 additions and 231 deletions

View File

@@ -73,7 +73,27 @@ public final class QuestManager
*/
public void reloadAllScripts()
{
unloadAllScripts();
LOGGER.info("Reloading all server scripts.");
try
{
ScriptEngineManager.getInstance().executeScriptList();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "Failed executing script list!", e);
}
getInstance().report();
}
/**
* Unload all quests and scripts.
*/
public void unloadAllScripts()
{
LOGGER.info("Unloading all server scripts.");
// Unload quests.
for (Quest quest : _quests.values())
@@ -93,17 +113,6 @@ public final class QuestManager
}
}
_scripts.clear();
try
{
ScriptEngineManager.getInstance().executeScriptList();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "Failed executing script list!", e);
}
getInstance().report();
}
/**

View File

@@ -93,6 +93,26 @@ public final class ZoneManager implements IGameXmlReader
* Reload.
*/
public void reload()
{
// Unload zones.
unload();
// Load the zones.
load();
// Re-validate all characters in zones.
for (L2Object obj : L2World.getInstance().getVisibleObjects())
{
if (obj.isCharacter())
{
((L2Character) obj).revalidateZone(true);
}
}
SETTINGS.clear();
}
public void unload()
{
// Get the world regions
int count = 0;
@@ -119,20 +139,6 @@ public final class ZoneManager implements IGameXmlReader
}
}
LOGGER.info(getClass().getSimpleName() + ": Removed zones in " + count + " regions.");
// Load the zones
load();
// Re-validate all characters in zones
for (L2Object obj : L2World.getInstance().getVisibleObjects())
{
if (obj.isCharacter())
{
((L2Character) obj).revalidateZone(true);
}
}
SETTINGS.clear();
}
@Override