Lineage 2 Lindvior - Конкурс

:Kukukuh: Если вот так по чуть чуть напихивать говна(Если большой проект). То получим бешеное время загрузки. :Omgnooo: Так что тут дело гонки за более новым и стабильным.
Да. Время загрузки сервера о многом говорит. *сарказм*
Если это такой важный фактор, то есть замечательная вещь, называется: многопоточность. Буст в 100 и выше раз, в отличие от ваших "микрооптимизаций", которые не несут никакого толка, по сути. О таких микро-оптимизациях, надо думать, когда уже сделано все и перформанса все равно не хватает, хотя, в таком случае, уместнее задуматься: "а не переписать всю эту подсистему нафиг, если она не выполняет своих требований?".

И да. Более новое, это всегда недоверие к проверенным годами решениям. И зачастую, эти решения, не совсем стабильны (если не говорить о энтерпрайзе конечно же, хотя и там бывают случаи) :)
 
Последнее редактирование:

да я вобще фигею - смысл гнаться за скоростью загрузки, выжимая доли секунд за счет смены парсеров xml...
 
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
ну это жи круто (сарказм).....
загрузка огого, а функционала хухухухуху....
типа такого...
 
Написал Deobfuscator для Stringer
Поправить и скомплить уже любой сможет.
PHP:
/*
* Decompiled with CFR 0_102.
*
* Could not load the following classes:
*  com.google.gson.Gson
*  org.apache.log4j.Level
*  org.apache.log4j.LogManager
*  org.apache.log4j.Logger
*  org.apache.log4j.Priority
*/
package services.lineage.gameserver;

import com.google.gson.Gson;
import java.awt.Toolkit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.InetAddress;
import java.net.URL;
import java.util.Calendar;
import java.util.HashSet;
import java.util.List;
import java.util.concurrent.ScheduledFuture;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.log4j.Priority;
import services.lineage.config.Config;
import services.lineage.gameserver.Announcements;
import services.lineage.gameserver.GameServerShutdown;
import services.lineage.gameserver.GameServerShutdown$GameServerStartup$Lic;
import services.lineage.gameserver.GameServerStartup$Lic;
import services.lineage.gameserver.GameTimeController;
import services.lineage.gameserver.LoginServerThread;
import services.lineage.gameserver.ThreadPoolManager;
import services.lineage.gameserver.ThreadPoolManager$ThreadPoolManager$PriorityThreadFactory;
import services.lineage.gameserver.cache.CrestCache;
import services.lineage.gameserver.cache.HtmCache;
import services.lineage.gameserver.datatables.json.BuffStackGroupData;
import services.lineage.gameserver.datatables.sql.CharNameTable;
import services.lineage.gameserver.datatables.sql.CharSummonTable;
import services.lineage.gameserver.datatables.sql.ClanTable;
import services.lineage.gameserver.datatables.sql.OfflineTradersTable;
import services.lineage.gameserver.datatables.xml.AdminTable;
import services.lineage.gameserver.datatables.xml.ArmorSetsTable;
import services.lineage.gameserver.datatables.xml.AugmentationData;
import services.lineage.gameserver.datatables.xml.AutoChatDataTable;
import services.lineage.gameserver.datatables.xml.BeautyShopData;
import services.lineage.gameserver.datatables.xml.BuyListData;
import services.lineage.gameserver.datatables.xml.ChampionData;
import services.lineage.gameserver.datatables.xml.CharJumpRoutesTable;
import services.lineage.gameserver.datatables.xml.CharTemplateTable;
import services.lineage.gameserver.datatables.xml.ClassTemplateTable;
import services.lineage.gameserver.datatables.xml.CommunityBuffTable;
import services.lineage.gameserver.datatables.xml.CommunityTeleportData;
import services.lineage.gameserver.datatables.xml.CrystallizationData;
import services.lineage.gameserver.datatables.xml.CustomDropListDataXml;
import services.lineage.gameserver.datatables.xml.DefaultBuffSheme;
import services.lineage.gameserver.datatables.xml.DropListData;
import services.lineage.gameserver.datatables.xml.DropMod;
import services.lineage.gameserver.datatables.xml.DropToAllTable;
import services.lineage.gameserver.datatables.xml.DynamicSpawnData;
import services.lineage.gameserver.datatables.xml.EnchantBonusData;
import services.lineage.gameserver.datatables.xml.EnchantItemData;
import services.lineage.gameserver.datatables.xml.EnchantSkillGroupsTable;
import services.lineage.gameserver.datatables.xml.ExperienceTable;
import services.lineage.gameserver.datatables.xml.FishData;
import services.lineage.gameserver.datatables.xml.FishingRodsData;
import services.lineage.gameserver.datatables.xml.FortSpawnList;
import services.lineage.gameserver.datatables.xml.GmShopTable;
import services.lineage.gameserver.datatables.xml.HennaTable;
import services.lineage.gameserver.datatables.xml.HennaTreeTable;
import services.lineage.gameserver.datatables.xml.HerbDropTable;
import services.lineage.gameserver.datatables.xml.HitConditionBonus;
import services.lineage.gameserver.datatables.xml.ItemPriceTable;
import services.lineage.gameserver.datatables.xml.ManorData;
import services.lineage.gameserver.datatables.xml.MultiSellData;
import services.lineage.gameserver.datatables.xml.NpcModificationTable;
import services.lineage.gameserver.datatables.xml.NpcTable;
import services.lineage.gameserver.datatables.xml.NpcWalkerRoutesData;
import services.lineage.gameserver.datatables.xml.ObsceneFilterTable;
import services.lineage.gameserver.datatables.xml.PetDataTable;
import services.lineage.gameserver.datatables.xml.PrimeShopTable;
import services.lineage.gameserver.datatables.xml.RecipeData;
import services.lineage.gameserver.datatables.xml.ResidenceFunctionData;
import services.lineage.gameserver.datatables.xml.ResidenceSiegeMusicList;
import services.lineage.gameserver.datatables.xml.ShapeShiftingItemsData;
import services.lineage.gameserver.datatables.xml.SkillTreesData;
import services.lineage.gameserver.datatables.xml.SoulCrystalData;
import services.lineage.gameserver.datatables.xml.SpawnTable;
import services.lineage.gameserver.datatables.xml.StaticObjectsData;
import services.lineage.gameserver.datatables.xml.SummonItemsData;
import services.lineage.gameserver.datatables.xml.SummonPointsTable;
import services.lineage.gameserver.datatables.xml.TeleportListTable;
import services.lineage.gameserver.engine.databaseengine.L2DatabaseFactory;
import services.lineage.gameserver.engine.databaseengine.idfactory.IdFactory;
import services.lineage.gameserver.engine.documentengine.XmlDocumentEngine;
import services.lineage.gameserver.engine.geodataengine.GeoEngine;
import services.lineage.gameserver.engine.geodataengine.PathFinding;
import services.lineage.gameserver.engine.geodataengine.door.DoorGeoEngine;
import services.lineage.gameserver.handler.ActionHandler;
import services.lineage.gameserver.handler.ActionShiftHandler;
import services.lineage.gameserver.handler.AdminCommandHandler;
import services.lineage.gameserver.handler.BypassCommandManager;
import services.lineage.gameserver.handler.ChatCommandManager;
import services.lineage.gameserver.handler.EffectHandler;
import services.lineage.gameserver.handler.ItemHandler;
import services.lineage.gameserver.handler.SkillHandler;
import services.lineage.gameserver.handler.TargetHandler;
import services.lineage.gameserver.handler.TransformHandler;
import services.lineage.gameserver.handler.UserCommandManager;
import services.lineage.gameserver.handler.VoicedHandlerManager;
import services.lineage.gameserver.instancemanager.AuctionManager;
import services.lineage.gameserver.instancemanager.AwakeningManager;
import services.lineage.gameserver.instancemanager.ClanSearchManager;
import services.lineage.gameserver.instancemanager.CommissionManager;
import services.lineage.gameserver.instancemanager.CursedWeaponsManager;
import services.lineage.gameserver.instancemanager.DayNightSpawnManager;
import services.lineage.gameserver.instancemanager.DynamicQuestManager;
import services.lineage.gameserver.instancemanager.FestivalChaosManager;
import services.lineage.gameserver.instancemanager.FourSepulchersManager;
import services.lineage.gameserver.instancemanager.GlobalVariablesManager;
import services.lineage.gameserver.instancemanager.GraciaSeedsManager;
import services.lineage.gameserver.instancemanager.GrandBossManager;
import services.lineage.gameserver.instancemanager.HellboundManager;
import services.lineage.gameserver.instancemanager.HeroManager;
import services.lineage.gameserver.instancemanager.InstanceManager;
import services.lineage.gameserver.instancemanager.ItemAuctionManager;
import services.lineage.gameserver.instancemanager.ItemsOnGroundAutoDestroyManager;
import services.lineage.gameserver.instancemanager.ItemsOnGroundManager;
import services.lineage.gameserver.instancemanager.MapRegionManager;
import services.lineage.gameserver.instancemanager.MentorManager;
import services.lineage.gameserver.instancemanager.PcCafePointsManager;
import services.lineage.gameserver.instancemanager.PetitionManager;
import services.lineage.gameserver.instancemanager.PremiumIpManager;
import services.lineage.gameserver.instancemanager.QuestManager;
import services.lineage.gameserver.instancemanager.RaidBossPointsManager;
import services.lineage.gameserver.instancemanager.RaidBossSpawnManager;
import services.lineage.gameserver.instancemanager.RelationListManager;
import services.lineage.gameserver.instancemanager.ScriptsManager;
import services.lineage.gameserver.instancemanager.TransformationManager;
import services.lineage.gameserver.instancemanager.WalkingManager;
import services.lineage.gameserver.instancemanager.WeddingManager;
import services.lineage.gameserver.instancemanager.WorldManager;
import services.lineage.gameserver.instancemanager.ZoneManager;
import services.lineage.gameserver.instancemanager.castle.CastleManager;
import services.lineage.gameserver.instancemanager.castle.CastleManorManager;
import services.lineage.gameserver.instancemanager.castle.CastleMercTicketManager;
import services.lineage.gameserver.instancemanager.castle.CastleSiegeManager;
import services.lineage.gameserver.instancemanager.clanhall.ClanHallManager;
import services.lineage.gameserver.instancemanager.clanhall.ClanHallSiegeManager;
import services.lineage.gameserver.instancemanager.fort.FortManager;
import services.lineage.gameserver.instancemanager.fort.FortSiegeManager;
import services.lineage.gameserver.instancemanager.vehicle.AirShipManager;
import services.lineage.gameserver.instancemanager.vehicle.BoatManager;
import services.lineage.gameserver.instancemanager.vehicle.ShuttleManager;
import services.lineage.gameserver.instancemanager.votemanager.L2OopsManager;
import services.lineage.gameserver.instancemanager.votemanager.L2TopManager;
import services.lineage.gameserver.instancemanager.votemanager.MMOTopManager;
import services.lineage.gameserver.model.items.ItemTable;
import services.lineage.gameserver.model.player.duel.DuelManager;
import services.lineage.gameserver.model.player.formation.group.PartyMatchRoomList;
import services.lineage.gameserver.model.player.formation.group.PartyMatchWaitingList;
import services.lineage.gameserver.model.player.mail.MailManager;
import services.lineage.gameserver.model.skills.ClientSkills;
import services.lineage.gameserver.model.skills.SkillTable;
import services.lineage.gameserver.model.world.npc.spawn.AutoSpawnHandler;
import services.lineage.gameserver.model.world.olympiad.Olympiad;
import services.lineage.gameserver.model.world.residence.castle.CastleSiegeEngine;
import services.lineage.gameserver.network.L2GameClient;
import services.lineage.gameserver.network.game.L2GamePacketHandler;
import services.lineage.gameserver.network.mmocore.IAcceptFilter;
import services.lineage.gameserver.network.mmocore.IClientFactory;
import services.lineage.gameserver.network.mmocore.IMMOExecutor;
import services.lineage.gameserver.network.mmocore.IPacketHandler;
import services.lineage.gameserver.network.mmocore.SelectorConfig;
import services.lineage.gameserver.network.mmocore.SelectorThread;
import services.lineage.gameserver.taskmanager.manager.AutoAnnounceTaskManager;
import services.lineage.gameserver.taskmanager.manager.KnownListUpdateTaskManager;
import services.lineage.gameserver.taskmanager.manager.TaskManager;
import services.lineage.gameserver.util.DeadLockDetector;
import services.lineage.gameserver.util.Tools;
import services.lineage.gameserver.util.Util;
import services.lineage.gameserver.util.crypt.MD5;
import services.lineage.gameserver.util.network.IPv4Filter;
import services.lineage.mods.fakes.FakeManager;
import services.lineage.options.OptionLic;
import services.lineage.options.Options;
import services.lineage.scripts.ScriptManager;
import services.lineage.scripts.eventsnew.EventsManager;
import services.lineage.scripts.services.GiveItemsInOnline;
import services.lineage.xmlrpcserver.XMLRPCServer;

public final class GameServerStartup {
    public static final Calendar dateTimeServerStarted = Calendar.getInstance();
    private static final Logger _log = LogManager.getLogger((Class)GameServerStartup.class);
    public static GameServerStartup gameServer = null;
    private final SelectorThread<L2GameClient> _selectorThread;
    public static final int version = 1;
    private static GameServerStartup$Lic lic;

    public static int getOnline() {
        return lic != null ? lic.getMaxOnline() : 100;
    }

    public static boolean checkMod(String string) {
        return lic != null && lic.getMods().contains(string);
    }

    public GameServerStartup() throws Exception {
        long l = System.currentTimeMillis();
        gameServer = this;
        Tools.printSection("Database Engine");
        Tools.printSection("Database Engine");
        L2DatabaseFactory.getInstance();
        Tools.printSection("IDFactory Engine");
        Tools.printSection("IDFactory Engine");
        IdFactory.getInstance();
        _log.log((Priority)Level.INFO, (Object)("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size()));
        _log.log((Priority)Level.INFO, (Object)("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size()));
        ThreadPoolManager.getInstance();
        Tools.printSection("Engines");
        Tools.printSection("Engines");
        ScriptsManager.getInstance();
        DefaultBuffSheme.load();
        Tools.printSection("World Engine");
        Tools.printSection("World Engine");
        GameTimeController.init();
        InstanceManager.getInstance();
        WorldManager.getInstance();
        MapRegionManager.getInstance();
        Announcements.getInstance();
        GlobalVariablesManager.getInstance();
        DynamicSpawnData.getInstance();
        ResidenceFunctionData.getInstance();
        Tools.printSection("Skills Engine");
        Tools.printSection("Skills Engine");
        BuffStackGroupData.getInstance();
        EnchantSkillGroupsTable.getInstance();
        SkillTable.getInstance();
        SkillTreesData.getInstance();
        ClientSkills.getInstance();
        XmlDocumentEngine.getInstance().loadOptionDatas(false);
        Tools.printSection("Items Engine");
        Tools.printSection("Items Engine");
        ItemPriceTable.getInstance();
        ItemTable.getInstance();
        SummonItemsData.getInstance();
        EnchantBonusData.getInstance();
        BuyListData.getInstance();
        MultiSellData.getInstance();
        RecipeData.getInstance();
        PrimeShopTable.getInstance();
        ArmorSetsTable.getInstance();
        FishData.getInstance();
        FishingRodsData.getInstance();
        EnchantItemData.getInstance();
        CrystallizationData.getInstance();
        SoulCrystalData.getInstance();
        ShapeShiftingItemsData.getInstance();
        HennaTable.getInstance();
        HennaTreeTable.getInstance();
        AugmentationData.getInstance();
        Tools.printSection("Characters Engine");
        Tools.printSection("Characters Engine");
        CharTemplateTable.getInstance();
        ClassTemplateTable.getInstance();
        CharNameTable.getInstance();
        ExperienceTable.getInstance();
        AdminTable.getInstance();
        RaidBossPointsManager.getInstance();
        RelationListManager.getInstance();
        PetDataTable.getInstance();
        CharSummonTable.getInstance();
        SummonPointsTable.getInstance();
        HitConditionBonus.getInstance();
        ObsceneFilterTable.getInstance();
        FestivalChaosManager.getInstance();
        Tools.printSection("Clans Engine");
        Tools.printSection("Clans Engine");
        ClanTable.getInstance();
        ClanTable.getInstance().restoreWars();
        ClanHallSiegeManager.getInstance();
        ClanHallManager.getInstance();
        AuctionManager.getInstance();
        Tools.printSection("Geodata Engine");
        Tools.printSection("Geodata Engine");
        GeoEngine.init();
        PathFinding.init();
        DoorGeoEngine.init();
        Tools.printSection("NPCs Engine");
        Tools.printSection("NPCs Engine");
        ChampionData.getInstance();
        HerbDropTable.getInstance();
        NpcModificationTable.getInstance();
        DropMod.getInstance();
        DropToAllTable.getInstance();
        GmShopTable.getInstance();
        NpcTable.getInstance();
        DropListData.getInstance();
        CustomDropListDataXml.getInstance();
        AutoChatDataTable.getInstance();
        NpcWalkerRoutesData.getInstance();
        WalkingManager.getInstance();
        ZoneManager.getInstance();
        StaticObjectsData.getInstance();
        ItemAuctionManager.getInstance();
        CastleManager.getInstance();
        FortManager.getInstance().init();
        SpawnTable.getInstance();
        AutoSpawnHandler.getInstance();
        HellboundManager.getInstance();
        RaidBossSpawnManager.getInstance();
        DayNightSpawnManager.getInstance().trim().notifyChangeMode();
        GrandBossManager.getInstance().initZones();
        FourSepulchersManager.getInstance().init();
        TeleportListTable.getInstance();
        BeautyShopData.getInstance();
        Tools.printSection("Residence Siege Engine");
        Tools.printSection("Residence Siege Engine");
        CastleSiegeManager.getInstance().getSieges();
        FortSpawnList.getInstance();
        FortSiegeManager.getInstance();
        CastleManorManager.getInstance();
        CastleMercTicketManager.getInstance();
        ManorData.getInstance();
        ResidenceSiegeMusicList.getInstance();
        Tools.printSection("Olympiad Engine");
        Tools.printSection("Olympiad Engine");
        Olympiad.getInstance();
        HeroManager.getInstance();
        Tools.printSection("Cache Engine");
        Tools.printSection("Cache Engine");
        CrestCache.getInstance();
        HtmCache.getInstance();
        PartyMatchWaitingList.getInstance();
        PartyMatchRoomList.getInstance();
        PetitionManager.getInstance();
        CursedWeaponsManager.getInstance();
        CommunityBuffTable.getInstance();
        CommunityTeleportData.getInstance();
        Tools.printSection("Mods Engine");
        Tools.printSection("Mods Engine");
        PcCafePointsManager.getInstance();
        PremiumIpManager.getInstance();
        if (Config.MMO_TOP_MANAGER_ENABLED) {
            MMOTopManager.getInstance();
        }
        if (Config.L2_TOP_MANAGER_ENABLED) {
            L2TopManager.getInstance();
        }
        if (Config.L2_OOPS_MANAGER_ENABLED) {
            L2OopsManager.getInstance();
        }
        Tools.printSection("Handlers Engine");
        Tools.printSection("Handlers Engine");
        ActionHandler.getInstance();
        ActionShiftHandler.getInstance();
        AdminCommandHandler.getInstance();
        BypassCommandManager.getInstance();
        ChatCommandManager.getInstance();
        EffectHandler.getInstance();
        ItemHandler.getInstance();
        SkillHandler.getInstance();
        TargetHandler.getInstance();
        TransformHandler.getInstance();
        UserCommandManager.getInstance();
        VoicedHandlerManager.getInstance();
        Tools.printSection("Transformations Engine");
        Tools.printSection("Transformations Engine");
        TransformationManager.getInstance();
        TransformationManager.getInstance().report();
        Tools.printSection("Jump Engine");
        Tools.printSection("Jump Engine");
        CharJumpRoutesTable.getInstance();
        Tools.printSection("Commission Engine");
        Tools.printSection("Commission Engine");
        CommissionManager.getInstance();
        Tools.printSection("ClanSearch Engine");
        Tools.printSection("ClanSearch Engine");
        ClanSearchManager.getInstance();
        Tools.printSection("Awakening Engine");
        Tools.printSection("Awakening Engine");
        AwakeningManager.getInstance();
        Tools.printSection("Quests Engine");
        Tools.printSection("Quests Engine");
        QuestManager.getInstance();
        DynamicQuestManager.getInstance();
        BoatManager.getInstance();
        AirShipManager.getInstance();
        ShuttleManager.getInstance();
        GraciaSeedsManager.getInstance();
        if (Config.ALLOW_WEDDING) {
            WeddingManager.getInstance();
        }
        AutoChatDataTable.getInstance().setAutoChatActive(true);
        Tools.printSection("Scripts Engine");
        Tools.printSection("Scripts Engine");
        ScriptsManager.getInstance().executeCoreScripts();
        EventsManager.getInstance();
        TaskManager.getInstance();
        QuestManager.getInstance().report();
        if (Config.SAVE_DROPPED_ITEM) {
            ItemsOnGroundManager.getInstance();
        }
        if (Config.AUTODESTROY_ITEM_AFTER > 0 || Config.HERB_AUTO_DESTROY_TIME > 0) {
            ItemsOnGroundAutoDestroyManager.getInstance();
        }
        CastleManager.getInstance().spawnDoors();
        FortManager.getInstance().spawnDoors();
        if (Config.ALLOW_MAIL) {
            MailManager.getInstance();
        }
        MentorManager.getInstance();
        DuelManager.getInstance();
        Runtime.getRuntime().addShutdownHook(GameServerShutdown.getInstance());
        _log.log((Priority)Level.INFO, (Object)("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size()));
        _log.log((Priority)Level.INFO, (Object)("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size()));
        KnownListUpdateTaskManager.getInstance();
        if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) {
            OfflineTradersTable.restoreOfflineTraders();
        }
        GiveItemsInOnline.getInstance();
        ScriptManager.getInstance();
        AutoAnnounceTaskManager.getInstance();
        FakeManager.getInstance();
        XMLRPCServer.getInstance();
        Calendar calendar = Calendar.getInstance();
        calendar.set(11, 5);
        calendar.set(12, 0);
        calendar.set(13, 0);
        calendar.set(14, 0);
        if (calendar.get(5) <= Calendar.getInstance().get(5)) {
            calendar.add(5, 1);
        }
        ThreadPoolManager.getInstance().scheduleEffect(() -> {
            GameServerShutdown gameServerShutdown = new GameServerShutdown(600, true);
            gameServerShutdown.start();
        }
        , calendar.getTimeInMillis() - System.currentTimeMillis() - 600000);
        if (Config.DEADLOCK_DETECTOR) {
            DeadLockDetector deadLockDetector = new DeadLockDetector();
            deadLockDetector.setDaemon(true);
            deadLockDetector.start();
        }
        Tools.printSection("Finalization");
        Tools.printSection("Finalization");
        System.runFinalization();
        System.gc();
        Util.printMemoryInfo();
        Util.printCpuInfo();
        Util.printOSInfo();
        Toolkit.getDefaultToolkit().beep();
        Tools.printSection("Server Thread");
        Tools.printSection("Server Thread");
        LoginServerThread.getInstance().start();
        SelectorConfig selectorConfig = new SelectorConfig();
        L2GamePacketHandler l2GamePacketHandler = new L2GamePacketHandler();
        this._selectorThread = new SelectorThread(selectorConfig, l2GamePacketHandler, l2GamePacketHandler, l2GamePacketHandler, new IPv4Filter());
        InetAddress inetAddress = null;
        try {
            inetAddress = InetAddress.getByName(GameServerStartup.check());
        }
        catch (Exception var8_7) {
            // empty catch block
        }
        try {
            this._selectorThread.openServerSocket(inetAddress, Config.PORT_GAME);
        }
        catch (IOException var8_8) {
            _log.log((Priority)Level.FATAL, (Object)("GameServerStartup:: Failed to open server socket. Reason: " + var8_8.getMessage()), (Throwable)var8_8);
            _log.log((Priority)Level.FATAL, (Object)("GameServerStartup:: Failed to open server socket. Reason: " + var8_8.getMessage()), (Throwable)var8_8);
            System.exit(1);
        }
        this._selectorThread.start();
        long l2 = System.currentTimeMillis();
        _log.log((Priority)Level.INFO, (Object)("Server Loaded in " + (l2 - l) / 1000 + " seconds"));
        _log.log((Priority)Level.INFO, (Object)("Server Loaded in " + (l2 - l) / 1000 + " seconds"));
    }

    public SelectorThread<L2GameClient> getSelectorThread() {
        return this._selectorThread;
    }

    /*
     * Unable to fully structure code
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Lifted jumps to return sites
     */
    private static String check() {
        var0 = new Gson();
        try {
            block15 : {
                var2_1 = null;
                var3_3 = new URL("http://cp.lineage.services/Home/Check?Key=" + Options.lic.Key() + "&Key2=" + MD5.getHash(GameServerStartup.getCurrentIP()));
                var3_3 = new URL("http://cp.lineage.services/Home/Check?Key=" + Options.lic.Key() + "&Key2=" + MD5.getHash(GameServerStartup.getCurrentIP()));
                var4_7 = var3_3.openStream();
                var2_1 = new BufferedReader(new InputStreamReader(var4_7));
                var5_8 = new StringBuilder();
                var6_9 = new char[1024];
                while ((var7_10 = var2_1.read(var6_9)) != -1) {
                    var5_8.append(var6_9, 0, var7_10);
                }
                var1_11 = var5_8.toString();
                if (!var1_11.contains((CharSequence)"AllowIp")) ** GOTO lbl29
                if (!var1_11.contains((CharSequence)"AllowIp")) ** GOTO lbl29
                GameServerStartup.lic = (GameServerStartup$Lic)var0.fromJson(var1_11, (Class)GameServerStartup$Lic.class);
                if (GameServerStartup.lic.getVersion() > 1 || !GameServerStartup.lic.getAllowIp().equalsIgnoreCase(GameServerStartup.getCurrentIP())) break block15;
                var8_12 = "0.0.0.0";
                var8_12 = "0.0.0.0";
                if (var2_1 == null) return var8_12;
                try {
                    var2_1.close();
                    return var8_12;
                }
                catch (Exception var9_13) {
                    // empty catch block
                }
                return var8_12;
            }
            GameServerStartup._log.fatal((Object)"THIS VERSION IN NOT ALLOW !!!");
            GameServerStartup._log.fatal((Object)"THIS VERSION IN NOT ALLOW !!!");
            ** GOTO lbl30
lbl29: // 1 sources:
            GameServerStartup._log.fatal((Object)"DEMO VERSION !!!");
            GameServerStartup._log.fatal((Object)"DEMO VERSION !!!");
lbl30: // 2 sources:
            if (var2_1 == null) return "127.0.0.1";
            if (var2_1 == null) return "127.0.0.1";
            try {
                var2_1.close();
                return "127.0.0.1";
                return "127.0.0.1";
            }
            catch (Exception var3_4) {
                return "127.0.0.1";
                return "127.0.0.1";
            }
            catch (Exception var3_5) {
                if (var2_1 == null) return "127.0.0.1";
                if (var2_1 == null) return "127.0.0.1";
                try {
                    var2_1.close();
                    return "127.0.0.1";
                    return "127.0.0.1";
                }
                catch (Exception var3_6) {
                    return "127.0.0.1";
                    return "127.0.0.1";
                }
            }
            catch (Throwable var10_14) {
                if (var2_1 == null) throw var10_14;
                try {
                    var2_1.close();
                    throw var10_14;
                }
                catch (Exception var11_15) {
                    // empty catch block
                }
                throw var10_14;
            }
        }
        catch (Exception var2_2) {
            // empty catch block
        }
        return "127.0.0.1";
        return "127.0.0.1";
    }

    /*
     * Loose catch block
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Lifted jumps to return sites
     */
    private static String getCurrentIP() {
        String string = null;
        try {
            int n;
            BufferedReader bufferedReader = null;
            URL uRL = new URL("http://myip.by/");
            URL uRL = new URL("http://myip.by/");
            InputStream inputStream = uRL.openStream();
            bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
            StringBuilder stringBuilder = new StringBuilder();
            char[] arrc = new char[1024];
            while ((n = bufferedReader.read(arrc)) != -1) {
                stringBuilder.append(arrc, 0, n);
            }
            Integer n2 = stringBuilder.indexOf("">whois ");
            Integer n2 = stringBuilder.indexOf("">whois ");
            Integer n3 = stringBuilder.indexOf("</a>", n2);
            Integer n3 = stringBuilder.indexOf("</a>", n2);
            String string2 = stringBuilder.substring(n2 + 8, n3);
            if (string2.split("\.").length == 4) {
            if (string2.split("\.").length == 4) {
                string = string2;
            }
            if (bufferedReader == null) return string;
            try {
                bufferedReader.close();
                return string;
            }
            catch (Exception var2_4) {
                return string;
            }
            catch (Exception exception) {
                if (bufferedReader == null) return string;
                try {
                    bufferedReader.close();
                    return string;
                }
                catch (Exception var2_6) {
                    return string;
                }
            }
            catch (Throwable throwable) {
                if (bufferedReader == null) throw throwable;
                try {
                    bufferedReader.close();
                    throw throwable;
                }
                catch (Exception var11_15) {
                    // empty catch block
                }
                throw throwable;
            }
        }
        catch (Exception var1_2) {
            // empty catch block
        }
        return string;
    }
}

PHP:
/*
* Decompiled with CFR 0_102.
*
* Could not load the following classes:
*  org.apache.log4j.Level
*  org.apache.log4j.LogManager
*  org.apache.log4j.Logger
*  org.apache.log4j.Priority
*/
package services.lineage;

import java.io.File;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.log4j.Priority;
import services.lineage.BootManager$0;
import services.lineage.config.Config;
import services.lineage.gameserver.GameServerStartup;
import services.lineage.gameserver.engine.logengine.L2Log;
import services.lineage.gameserver.handler.AdminCommandHandler;
import services.lineage.gameserver.handler.IAdminCommandHandler;
import services.lineage.gameserver.util.Tools;
import services.lineage.gameserver.util.database.DatabaseBackupManager;
import services.lineage.smartguard.GuardConfig;
import services.lineage.smartguard.manager.LicenseManager;
import services.lineage.smartguard.manager.UpdateManager;
import services.lineage.smartguard.manager.bans.BanManager;
import services.lineage.smartguard.manager.screen.ScreenTextManager;
import services.lineage.smartguard.menu.SmartGuardMenu;
import services.lineage.smartguard.utils.log.GuardLog;

public final class BootManager {
    private static Logger _log = LogManager.getLogger((Class)BootManager.class);

    public BootManager() throws Throwable {
        try {
            GuardConfig.load();
            if (GuardConfig.ProtectionEnabled) {
                LicenseManager.getInstance();
                UpdateManager.getInstance();
                ScreenTextManager.getInstance();
                BanManager.store();
            }
        }
        catch (Exception var1_1) {
            GuardLog.getLogger().severe("Error initializing SmartGuard");
            GuardLog.getLogger().severe("Error initializing SmartGuard");
            GuardLog.logException(var1_1);
            return;
        }
        try {
            AdminCommandHandler.getInstance().registerHandler(new SmartGuardMenu());
        }
        catch (Exception var1_2) {
            GuardLog.getLogger().severe("Error initializing SmartGuard AdminCommandHandler!");
            GuardLog.getLogger().severe("Error initializing SmartGuard AdminCommandHandler!");
            GuardLog.logException(var1_2);
        }
        Tools.printSection("Boot Manager");
        Tools.printSection("Boot Manager");
        _log.log((Priority)Level.INFO, (Object)"BootManager: Initializing Boot Manager.");
        _log.log((Priority)Level.INFO, (Object)"BootManager: Initializing Boot Manager.");
        _log.log((Priority)Level.INFO, (Object)"BootManager: Initializing Configs.");
        _log.log((Priority)Level.INFO, (Object)"BootManager: Initializing Configs.");
        Config.loadAll();
        _log.log((Priority)Level.INFO, (Object)"BootManager: Config Successfully Loaded.");
        _log.log((Priority)Level.INFO, (Object)"BootManager: Config Successfully Loaded.");
        if (Config.DATABASE_BACKUP_MAKE_BACKUP_ON_STARTUP) {
            Tools.printSection("Database Backup");
            Tools.printSection("Database Backup");
            _log.log((Priority)Level.INFO, (Object)"BootManager: Starting backup database...");
            _log.log((Priority)Level.INFO, (Object)"BootManager: Starting backup database...");
            DatabaseBackupManager.makeBackup();
        }
        Tools.printSection("Game Server");
        Tools.printSection("Game Server");
        _log.log((Priority)Level.INFO, (Object)"BootManager: Preparations Done. Starting GameServer!");
        _log.log((Priority)Level.INFO, (Object)"BootManager: Preparations Done. Starting GameServer!");
        new GameServerStartup();
    }

    public static void main(String[] arrstring) throws Throwable {
        Tools.printSection("http://lineage.services");
        Tools.printSection("http://lineage.services");
        Tools.printSection("Progect Enzo");
        Tools.printSection("Progect Enzo");
        Tools.printSection("Version: 1");
        Tools.printSection("Version: 1");
        BootManager.createBootDirs();
        L2Log.initLogging();
        _log.log((Priority)Level.INFO, (Object)"BootManager: All Directories and Files Created!");
        _log.log((Priority)Level.INFO, (Object)"BootManager: All Directories and Files Created!");
        new BootManager();
    }

    private static void createBootDirs() {
        new File("log").mkdirs();
        new File("log").mkdirs();
        new File("log/java").mkdirs();
        new File("log/java").mkdirs();
        new File("log/GMAudit").mkdirs();
        new File("log/GMAudit").mkdirs();
        new File(Config.DATAPACK_ROOT, "crests").mkdirs();
        new File(Config.DATAPACK_ROOT, "crests").mkdirs();
    }
}
 
Назад
Сверху Снизу