Dropped Classic support.

This commit is contained in:
MobiusDev
2015-10-23 23:44:21 +00:00
parent d49a007f9d
commit 39f05439c3
7958 changed files with 58 additions and 782473 deletions

View File

@ -178,7 +178,6 @@ public final class Config
public static byte BASE_SUBCLASS_LEVEL;
public static byte BASE_DUALCLASS_LEVEL;
public static byte MAX_SUBCLASS_LEVEL;
public static byte MAX_CLASSIC_PLAYER_LEVEL;
public static int MAX_PVTSTORESELL_SLOTS_DWARF;
public static int MAX_PVTSTORESELL_SLOTS_OTHER;
public static int MAX_PVTSTOREBUY_SLOTS_DWARF;
@ -992,7 +991,6 @@ public final class Config
public static int SERVER_LIST_TYPE;
public static int SERVER_LIST_AGE;
public static boolean SERVER_LIST_BRACKET;
public static boolean SERVER_CLASSIC_SUPPORT = false;
public static boolean LOGIN_SERVER_SCHEDULE_RESTART;
public static long LOGIN_SERVER_SCHEDULE_RESTART_TIME;
@ -1233,7 +1231,7 @@ public final class Config
try
{
DATAPACK_ROOT = new File(serverSettings.getString((SERVER_CLASSIC_SUPPORT ? "ClassicDatapackRoot" : "DatapackRoot"), ".").replaceAll("\\\\", "/")).getCanonicalFile();
DATAPACK_ROOT = new File(serverSettings.getString("DatapackRoot", ".").replaceAll("\\\\", "/")).getCanonicalFile();
}
catch (IOException e)
{
@ -1531,7 +1529,6 @@ public final class Config
BASE_SUBCLASS_LEVEL = character.getByte("BaseSubclassLevel", (byte) 40);
BASE_DUALCLASS_LEVEL = character.getByte("BaseDualclassLevel", (byte) 85);
MAX_SUBCLASS_LEVEL = character.getByte("MaxSubclassLevel", (byte) 80);
MAX_CLASSIC_PLAYER_LEVEL = character.getByte("MaxClassicPlayerLevel", (byte) 75);
MAX_PVTSTORESELL_SLOTS_DWARF = character.getInt("MaxPvtStoreSellSlotsDwarf", 4);
MAX_PVTSTORESELL_SLOTS_OTHER = character.getInt("MaxPvtStoreSellSlotsOther", 3);
MAX_PVTSTOREBUY_SLOTS_DWARF = character.getInt("MaxPvtStoreBuySlotsDwarf", 5);
@ -3897,7 +3894,6 @@ public final class Config
break;
case "classic":
serverType |= 0x400;
SERVER_CLASSIC_SUPPORT = true;
break;
}
}

View File

@ -201,10 +201,13 @@ public final class GameServer
printSection("Effects");
EffectHandler.getInstance().executeScript();
printSection("Enchant Skill Groups");
EnchantSkillGroupsData.getInstance();
printSection("Skill Trees");
SkillTreesData.getInstance();
printSection("Skills");
SkillData.getInstance();
SummonSkillsTable.getInstance();
@ -213,12 +216,9 @@ public final class GameServer
ItemTable.getInstance();
EnchantItemGroupsData.getInstance();
EnchantItemData.getInstance();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
EnchantItemOptionsData.getInstance();
ItemCrystalizationData.getInstance();
OptionData.getInstance();
}
EnchantItemOptionsData.getInstance();
ItemCrystalizationData.getInstance();
OptionData.getInstance();
EnchantItemHPBonusData.getInstance();
MerchantPriceConfigTable.getInstance().loadInstances();
BuyListData.getInstance();
@ -226,15 +226,12 @@ public final class GameServer
RecipeData.getInstance();
ArmorSetsData.getInstance();
HennaData.getInstance();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
FishData.getInstance();
FishingMonstersData.getInstance();
FishingRodsData.getInstance();
CommissionManager.getInstance();
PrimeShopData.getInstance();
AppearanceItemData.getInstance();
}
FishData.getInstance();
FishingMonstersData.getInstance();
FishingRodsData.getInstance();
CommissionManager.getInstance();
PrimeShopData.getInstance();
AppearanceItemData.getInstance();
printSection("Characters");
ClassListData.getInstance();
@ -249,11 +246,9 @@ public final class GameServer
BeautyShopData.getInstance();
AdminData.getInstance();
CharSummonTable.getInstance().init();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
PetDataTable.getInstance();
MentorManager.getInstance();
}
PetDataTable.getInstance();
MentorManager.getInstance();
if (Config.FACTION_SYSTEM_ENABLED)
{
FactionManager.getInstance();
@ -295,14 +290,12 @@ public final class GameServer
NpcBufferTable.getInstance();
GrandBossManager.getInstance().initZones();
EventDroplist.getInstance();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
printSection("Auction Manager");
ItemAuctionManager.getInstance();
printSection("Olympiad");
Olympiad.getInstance();
}
printSection("Auction Manager");
ItemAuctionManager.getInstance();
printSection("Olympiad");
Olympiad.getInstance();
Hero.getInstance();
// Call to load caches
@ -315,10 +308,7 @@ public final class GameServer
PartyMatchWaitingList.getInstance();
PartyMatchRoomList.getInstance();
PetitionManager.getInstance();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
AugmentationData.getInstance();
}
AugmentationData.getInstance();
CursedWeaponsManager.getInstance();
TransformData.getInstance();
BotReportTable.getInstance();
@ -326,13 +316,10 @@ public final class GameServer
printSection("Scripts");
QuestManager.getInstance();
BoatManager.getInstance();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
AirShipManager.getInstance();
ShuttleData.getInstance();
JumpManager.getInstance();
GraciaSeedsManager.getInstance();
}
AirShipManager.getInstance();
ShuttleData.getInstance();
JumpManager.getInstance();
GraciaSeedsManager.getInstance();
try
{
@ -350,20 +337,14 @@ public final class GameServer
SpawnTable.getInstance().load();
DayNightSpawnManager.getInstance().trim().notifyChangeMode();
RaidBossSpawnManager.getInstance();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
FourSepulchersManager.getInstance().init();
}
FourSepulchersManager.getInstance().init();
printSection("Siege");
SiegeManager.getInstance().getSieges();
CastleManager.getInstance().activateInstances();
if (!Config.SERVER_CLASSIC_SUPPORT)
{
FortManager.getInstance().loadInstances();
FortManager.getInstance().activateInstances();
FortSiegeManager.getInstance();
}
FortManager.getInstance().loadInstances();
FortManager.getInstance().activateInstances();
FortSiegeManager.getInstance();
SiegeScheduleData.getInstance();
MerchantPriceConfigTable.getInstance().updateReferences();

View File

@ -25,7 +25,6 @@ import java.util.logging.Level;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.options.EnchantOptions;
import com.l2jserver.gameserver.util.Util;
@ -47,12 +46,6 @@ public class EnchantItemOptionsData implements IXmlReader
public synchronized void load()
{
_data.clear();
if (Config.SERVER_CLASSIC_SUPPORT)
{
return;
}
parseDatapackFile("enchantItemOptions.xml");
}

View File

@ -26,7 +26,6 @@ import java.util.logging.Level;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import com.l2jserver.Config;
import com.l2jserver.util.data.xml.IXmlReader;
/**
@ -103,10 +102,6 @@ public class SecondaryAuthData implements IXmlReader
public boolean isEnabled()
{
if (Config.SERVER_CLASSIC_SUPPORT)
{
return false;
}
return _enabled;
}

View File

@ -72,7 +72,7 @@ public final class CursedWeaponsManager
{
_cursedWeapons = new HashMap<>();
if (!Config.ALLOW_CURSED_WEAPONS || Config.SERVER_CLASSIC_SUPPORT)
if (!Config.ALLOW_CURSED_WEAPONS)
{
return;
}

View File

@ -229,7 +229,7 @@ public final class L2TeleporterInstance extends L2Npc
{
if (type == TeleportType.NORMAL)
{
if (!player.isSubClassActive() && (player.getLevel() < (Config.SERVER_CLASSIC_SUPPORT ? 1 : 77)))
if (!player.isSubClassActive() && (player.getLevel() < 77))
{
return 0;
}
@ -247,7 +247,7 @@ public final class L2TeleporterInstance extends L2Npc
protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc)
{
return (type != TeleportType.NORMAL) || (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > (Config.SERVER_CLASSIC_SUPPORT ? 0 : 76)) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0)));
return (type != TeleportType.NORMAL) || (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > 76) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0)));
}
protected int parseNextInt(StringTokenizer st, int defaultVal)

View File

@ -480,7 +480,7 @@ public class Olympiad extends ListenersContainer
_scheduledCompStart = ThreadPoolManager.getInstance().scheduleGeneral(() ->
{
if (isOlympiadEnd() || Config.SERVER_CLASSIC_SUPPORT)
if (isOlympiadEnd())
{
return;
}

View File

@ -54,7 +54,7 @@ public class L2FishingZone extends L2ZoneType
character.setInsideZone(ZoneId.FISHING, true);
}
if (character.isPlayer() && !Config.SERVER_CLASSIC_SUPPORT)
if (character.isPlayer())
{
final L2PcInstance plr = (L2PcInstance) character;
if (!_task.containsKey(plr.getObjectId()))

View File

@ -359,7 +359,7 @@ public final class CharacterCreate extends L2GameClientPacket
EventDispatcher.getInstance().notifyEvent(new OnPlayerCreate(newChar, newChar.getObjectId(), newChar.getName(), client), Containers.Players());
newChar.setOnlineStatus(true, false);
if (Config.SHOW_GOD_VIDEO_INTRO && !Config.SERVER_CLASSIC_SUPPORT)
if (Config.SHOW_GOD_VIDEO_INTRO)
{
newChar.getVariables().set("intro_god_video", true);
}

View File

@ -622,20 +622,17 @@ public class EnterWorld extends L2GameClientPacket
L2ClassMasterInstance.showQuestionMark(activeChar);
if (!Config.SERVER_CLASSIC_SUPPORT)
int birthday = activeChar.checkBirthDay();
if (birthday == 0)
{
int birthday = activeChar.checkBirthDay();
if (birthday == 0)
{
activeChar.sendPacket(SystemMessageId.HAPPY_BIRTHDAY_ALEGRIA_HAS_SENT_YOU_A_BIRTHDAY_GIFT);
// activeChar.sendPacket(new ExBirthdayPopup()); Removed in H5?
}
else if (birthday != -1)
{
sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_DAYS_REMAINING_UNTIL_YOUR_BIRTHDAY_ON_YOUR_BIRTHDAY_YOU_WILL_RECEIVE_A_GIFT_THAT_ALEGRIA_HAS_CAREFULLY_PREPARED);
sm.addString(Integer.toString(birthday));
activeChar.sendPacket(sm);
}
activeChar.sendPacket(SystemMessageId.HAPPY_BIRTHDAY_ALEGRIA_HAS_SENT_YOU_A_BIRTHDAY_GIFT);
// activeChar.sendPacket(new ExBirthdayPopup()); Removed in H5?
}
else if (birthday != -1)
{
sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_DAYS_REMAINING_UNTIL_YOUR_BIRTHDAY_ON_YOUR_BIRTHDAY_YOU_WILL_RECEIVE_A_GIFT_THAT_ALEGRIA_HAS_CAREFULLY_PREPARED);
sm.addString(Integer.toString(birthday));
activeChar.sendPacket(sm);
}
if (!activeChar.getPremiumItemList().isEmpty())
@ -658,11 +655,8 @@ public class EnterWorld extends L2GameClientPacket
activeChar.sendPacket(ExNewSkillToLearnByLevelUp.STATIC_PACKET);
}
if (!Config.SERVER_CLASSIC_SUPPORT)
{
activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
activeChar.sendPacket(new ExWorldChatCnt(activeChar));
}
activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
activeChar.sendPacket(new ExWorldChatCnt(activeChar));
// Unstuck players that had client open when server crashed.
activeChar.sendPacket(ActionFailed.STATIC_PACKET);

View File

@ -32,15 +32,13 @@ import com.l2jserver.tools.dbinstaller.util.mysql.ScriptExecutor;
public class RunTasks extends Thread
{
DBOutputInterface _frame;
boolean _classicInstall;
String _db;
String _sqlDir;
public RunTasks(DBOutputInterface frame, String db, String sqlDir, boolean classicInstall)
public RunTasks(DBOutputInterface frame, String db, String sqlDir)
{
_frame = frame;
_db = db;
_classicInstall = classicInstall;
_sqlDir = sqlDir;
}
@ -53,16 +51,6 @@ public class RunTasks extends Thread
_frame.appendToProgressArea("Installing Database Content...");
exec.execSqlBatch(new File(_sqlDir));
if (_classicInstall)
{
File cusDir = new File(_sqlDir, "classic");
if (cusDir.exists())
{
_frame.appendToProgressArea("Installing Classic Tables...");
exec.execSqlBatch(cusDir);
}
}
_frame.appendToProgressArea("Database Installation Complete!");
try

View File

@ -71,12 +71,12 @@ public class DBInstallerConsole implements DBOutputInterface
System.out.print("Do you really want to destroy your db (Y/N)?");
if (scn.next().equalsIgnoreCase("y"))
{
rt = new RunTasks(this, db, dir, true);
rt = new RunTasks(this, db, dir);
}
}
else if (resp.equalsIgnoreCase("u"))
{
rt = new RunTasks(this, db, dir, false);
rt = new RunTasks(this, db, dir);
}
}
@ -114,7 +114,7 @@ public class DBInstallerConsole implements DBOutputInterface
if ((mode != null) && ("c".equalsIgnoreCase(mode) || "u".equalsIgnoreCase(mode)))
{
final RunTasks rt = new RunTasks(this, database, dir, "c".equalsIgnoreCase(mode));
final RunTasks rt = new RunTasks(this, database, dir);
rt.run();
}
}

View File

@ -131,7 +131,6 @@ public class DBConfigGUI extends JFrame
_prop.put("dbUser_" + _db, _dbUser.getText());
_prop.put("dbDbse_" + _db, _dbDbse.getText());
boolean classicInstall = false;
DBInstallerGUI dbi = new DBInstallerGUI(connector.getConnection());
setVisible(false);
@ -153,25 +152,19 @@ public class DBConfigGUI extends JFrame
{
Object[] options =
{
"Classic Install",
"Ertheia Install",
"Install Server",
"Exit"
};
int n = JOptionPane.showOptionDialog(null, "Select installation type.", "Select an option", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
int n = JOptionPane.showOptionDialog(null, "Install game server database?", "Select an option", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
if ((n == 2) || (n == -1))
if ((n == 1) || (n == -1))
{
System.exit(0);
}
if (n == 0)
{
classicInstall = true;
}
}
dbi.setVisible(true);
RunTasks task = new RunTasks(dbi, _db, _dir, classicInstall);
RunTasks task = new RunTasks(dbi, _db, _dir);
task.setPriority(Thread.MAX_PRIORITY);
task.start();
}