Separated the Classic Datapack to it's own folder.

This commit is contained in:
MobiusDev
2015-05-02 03:45:56 +00:00
parent 08e28fe058
commit 484bff80bb
11501 changed files with 2200482 additions and 627 deletions

View File

@ -123,7 +123,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
@Override
public final void load()
{
parseDatapackFile("data/seeds.xml");
parseDatapackFile("seeds.xml");
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _seeds.size() + " seeds.");
}

View File

@ -96,10 +96,10 @@ public final class CursedWeaponsManager
factory.setValidating(false);
factory.setIgnoringComments(true);
File file = new File(Config.DATAPACK_ROOT + "/data/cursedWeapons.xml");
File file = new File(Config.DATAPACK_ROOT + "/cursedWeapons.xml");
if (!file.exists())
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't find data/" + file.getName());
_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't find " + file.getName());
return;
}

View File

@ -306,7 +306,7 @@ public class FishingChampionshipManager
pl.addItem("fishing_reward", Config.ALT_FISH_CHAMPIONSHIP_REWARD_ITEM, rewardCnt, null, true);
final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event_reward001.htm");
html.setFile(pl.getHtmlPrefix(), "html/fisherman/championship/fish_event_reward001.htm");
pl.sendPacket(html);
}
}
@ -320,7 +320,7 @@ public class FishingChampionshipManager
if (_needRefresh)
{
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event003.htm");
html.setFile(pl.getHtmlPrefix(), "html/fisherman/championship/fish_event003.htm");
pl.sendPacket(html);
refreshResult();
@ -328,7 +328,7 @@ public class FishingChampionshipManager
return;
}
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event002.htm");
html.setFile(pl.getHtmlPrefix(), "html/fisherman/championship/fish_event002.htm");
String str = null;
for (int x = 1; x <= 5; x++)
@ -350,7 +350,7 @@ public class FishingChampionshipManager
public void showChampScreen(L2PcInstance pl, L2NpcInstance npc)
{
final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event001.htm");
html.setFile(pl.getHtmlPrefix(), "html/fisherman/championship/fish_event001.htm");
String str = null;
for (int x = 1; x <= 5; x++)

View File

@ -1551,7 +1551,7 @@ public final class FourSepulchersManager
public void showHtmlFile(L2PcInstance player, String file, L2Npc npc, L2PcInstance member)
{
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
html.setFile(player.getHtmlPrefix(), "data/html/SepulcherNpc/" + file);
html.setFile(player.getHtmlPrefix(), "html/SepulcherNpc/" + file);
if (member != null)
{
html.replace("%member%", member.getName());

View File

@ -67,7 +67,7 @@ public final class InstanceManager implements IXmlReader
public void load()
{
_instanceIdNames.clear();
parseDatapackFile("data/instancenames.xml");
parseDatapackFile("instancenames.xml");
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _instanceIdNames.size() + " instance names.");
}

View File

@ -74,7 +74,7 @@ public final class ItemAuctionManager
_log.log(Level.SEVERE, getClass().getSimpleName() + ": Failed loading auctions.", e);
}
final File file = new File(Config.DATAPACK_ROOT + "/data/ItemAuctions.xml");
final File file = new File(Config.DATAPACK_ROOT + "/ItemAuctions.xml");
if (!file.exists())
{
_log.log(Level.WARNING, getClass().getSimpleName() + ": Missing ItemAuctions.xml!");

View File

@ -108,7 +108,7 @@ public class JumpManager
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
File file = new File(Config.DATAPACK_ROOT, "data/JumpTrack.xml");
File file = new File(Config.DATAPACK_ROOT, "JumpTrack.xml");
Document doc = null;
if (file.exists())

View File

@ -60,7 +60,7 @@ public final class MapRegionManager implements IXmlReader
public void load()
{
_regions.clear();
parseDatapackDirectory("data/mapregion", false);
parseDatapackDirectory("mapregion", false);
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _regions.size() + " map regions.");
}

View File

@ -446,7 +446,7 @@ public final class PetitionManager
final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/petition.htm");
html.setFile(activeChar.getHtmlPrefix(), "html/admin/petition.htm");
html.replace("%petition%", String.valueOf(currPetition.getId()));
html.replace("%time%", dateFormat.format(new Date(currPetition.getSubmitTime())));
html.replace("%type%", currPetition.getTypeAsString());

View File

@ -103,7 +103,7 @@ public final class QuestManager extends ScriptManager<Quest>
try
{
L2ScriptEngineManager.getInstance().executeScriptList(new File(Config.DATAPACK_ROOT, "data/scripts.cfg"));
L2ScriptEngineManager.getInstance().executeScriptList(new File(Config.DATAPACK_ROOT, "scripts.cfg"));
}
catch (IOException e)
{

View File

@ -77,7 +77,7 @@ public class RaidBossSpawnManager
_schedules.clear();
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement statement = con.prepareStatement("SELECT * FROM " + (Config.SERVER_CLASSIC_SUPPORT ? "classic_raidboss_spawnlist" : "raidboss_spawnlist") + " ORDER BY boss_id");
PreparedStatement statement = con.prepareStatement("SELECT * FROM raidboss_spawnlist ORDER BY boss_id");
ResultSet rset = statement.executeQuery())
{
while (rset.next())
@ -266,7 +266,7 @@ public class RaidBossSpawnManager
if (storeInDb)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement statement = con.prepareStatement("INSERT INTO " + (Config.SERVER_CLASSIC_SUPPORT ? "classic_raidboss_spawnlist" : "raidboss_spawnlist") + " (boss_id,amount,loc_x,loc_y,loc_z,heading,respawn_time,currentHp,currentMp) VALUES(?,?,?,?,?,?,?,?,?)"))
PreparedStatement statement = con.prepareStatement("INSERT INTO raidboss_spawnlist (boss_id,amount,loc_x,loc_y,loc_z,heading,respawn_time,currentHp,currentMp) VALUES(?,?,?,?,?,?,?,?,?)"))
{
statement.setInt(1, spawnDat.getId());
statement.setInt(2, spawnDat.getAmount());
@ -327,7 +327,7 @@ public class RaidBossSpawnManager
if (updateDb)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement statement = con.prepareStatement("DELETE FROM " + (Config.SERVER_CLASSIC_SUPPORT ? "classic_raidboss_spawnlist" : "raidboss_spawnlist") + " WHERE boss_id=?"))
PreparedStatement statement = con.prepareStatement("DELETE FROM raidboss_spawnlist WHERE boss_id=?"))
{
statement.setInt(1, bossId);
statement.execute();
@ -346,7 +346,7 @@ public class RaidBossSpawnManager
private void updateDb()
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement statement = con.prepareStatement("UPDATE " + (Config.SERVER_CLASSIC_SUPPORT ? "classic_raidboss_spawnlist" : "raidboss_spawnlist") + " SET respawn_time = ?, currentHP = ?, currentMP = ? WHERE boss_id = ?"))
PreparedStatement statement = con.prepareStatement("UPDATE raidboss_spawnlist SET respawn_time = ?, currentHP = ?, currentMP = ? WHERE boss_id = ?"))
{
for (Integer bossId : _storedInfo.keySet())
{

View File

@ -27,7 +27,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.enums.ChatType;
@ -75,7 +74,7 @@ public final class WalkingManager implements IXmlReader
@Override
public final void load()
{
parseDatapackFile(Config.SERVER_CLASSIC_SUPPORT ? "data/classic_routes.xml" : "data/Routes.xml");
parseDatapackFile("Routes.xml");
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _routes.size() + " walking routes.");
}

View File

@ -384,8 +384,8 @@ public final class ZoneManager implements IXmlReader
{
_classZones.clear();
_spawnTerritories.clear();
parseDatapackDirectory("data/zones", false);
parseDatapackDirectory("data/zones/npcSpawnTerritories", false);
parseDatapackDirectory("zones", false);
parseDatapackDirectory("zones/npcSpawnTerritories", false);
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _classZones.size() + " zone classes and " + getSize() + " zones.");
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _spawnTerritories.size() + " NPC spawn territoriers.");
}