Laveo vs l2nextgen v35(5760)

Vodka TreasureHunter

Выдающийся
Местный
За веру и верность форуму
Сообщения
371
Розыгрыши
0
Репутация
242
Реакции
174
Баллы
1 388
Два топ исходника для епилога но какой же лучше?

Плюсы Laveo 808
+ Где то преуспели, где то нет.
+ Они закрыли пару критических багов, которые не закрыты у l2nextgen.
+ Всегда можно перетянуть фиксы с оверо подобных сборок

Минусы
- Толковой реализации хб нету.
- Многие инстансы придется доставать с emurt исходников и бо они не рабочие.
- Дроп у некоторых мобов еще с хф и таких мобов много.
- В спавн листе, туча нерабочих сундуков и мобов которых не видно с геодатой и без.(По всем локам)
- У мобов и рб уровень и статы с HF, весь нпц пак надо переделывать, можно конечно переставить нпц пак Джанки но это слишком.
- Слышал про пару критических багов и за которых крашится сервер, я их прикрыл но все же, это чутка напрягает.
- В шаре я нашел средне доработанный исходный код laveo, но почему то он был в шаре значит не понравился кому то очень сильно.

Плюсы l2nextgen
+ Реализован хб, но надо пару поправок сделать.
+ Есть две сборки откуда можно вытащить фиксы l2nextgen rev 7584 и R2core rev 14.
+ Многие говорят что l2nextgen хорошо оптимизирован и его берут за основу, пример тому OnStar и High.

Минусы
- Просто тонна багов но у этой тонны багов хоть есть описание на webarchive
- Надо будет делать правки в геодвижке.
- Читал тему что мобы подвисают, гринд исправлял кому то.
- Тоже есть критические баги и за которых возможен краш сервера, пример тому не открывшийся theanion.

Если пишите ответ в теме то пожалуйста хотелось бы больше конструктивности.
 
А теперь возьми это, исключи использование Javalution, все помножь раз на 10 и получишь исходники лавео.
Да что мне рассказывать или наверное круто так кодить?
Код:
package l2n.game.scripts;

import gnu.trove.map.hash.THashMap;

import java.io.File;
import java.lang.reflect.Constructor;

import l2n.commons.compiler.Compiler;
import l2n.commons.compiler.MemoryClassLoader;
import l2n.commons.list.GArray;
import l2n.extensions.scripts.ScriptFileLoader;
import l2n.game.ai.Fighter;
import l2n.game.ai.Guard;
import l2n.game.ai.L2CharacterAI;
import l2n.game.ai.Mystic;
import l2n.game.ai.Priest;
import l2n.game.ai.RaceManager;
import l2n.game.ai.Ranger;
import l2n.game.ai.SiegeGuard;
import l2n.game.ai.SiegeGuardFighter;
import l2n.game.ai.SiegeGuardMystic;
import l2n.game.ai.SiegeGuardPriest;
import l2n.game.ai.SiegeGuardRanger;
import l2n.game.ai.Trap;
import l2n.game.model.actor.L2Character;
import l2n.game.scripts.ai.AncientEgg;
import l2n.game.scripts.ai.AttackMobNotPlayerFighter;
import l2n.game.scripts.ai.BehemothDragon;
import l2n.game.scripts.ai.CaughtFighter;
import l2n.game.scripts.ai.CaughtMystic;
import l2n.game.scripts.ai.CrystallineGolem;
import l2n.game.scripts.ai.DarkWaterDragon;
import l2n.game.scripts.ai.DeluLizardmanSpecialAgent;
import l2n.game.scripts.ai.DeluLizardmanSpecialCommander;
import l2n.game.scripts.ai.Elpy;
import l2n.game.scripts.ai.EvasGiftBox;
import l2n.game.scripts.ai.FafurionKindred;
import l2n.game.scripts.ai.FieldMachine;
import l2n.game.scripts.ai.ForgeOfGods;
import l2n.game.scripts.ai.FrightenedRagnaOrc;
import l2n.game.scripts.ai.FrostBuffalo;
import l2n.game.scripts.ai.GatekeeperZombie;
import l2n.game.scripts.ai.GhostOfVonHellmannsPage;
import l2n.game.scripts.ai.GraveRobberSummoner;
import l2n.game.scripts.ai.GuardRndWalkAndAnim;
import l2n.game.scripts.ai.GuardianAngel;
import l2n.game.scripts.ai.HotSpringsMob;
import l2n.game.scripts.ai.IsleOfPrayerFighter;
import l2n.game.scripts.ai.IsleOfPrayerMystic;
import l2n.game.scripts.ai.KarulBugbear;
import l2n.game.scripts.ai.KashasEye;
import l2n.game.scripts.ai.Keltirs;
import l2n.game.scripts.ai.Lavasaurus;
import l2n.game.scripts.ai.Leogul;
import l2n.game.scripts.ai.MoSMonk;
import l2n.game.scripts.ai.NightAgressionMystic;
import l2n.game.scripts.ai.NoRndWalkFighter;
import l2n.game.scripts.ai.NoRndWalkMystic;
import l2n.game.scripts.ai.OlMahumGeneral;
import l2n.game.scripts.ai.PaganGuard;
import l2n.game.scripts.ai.PrisonGuard;
import l2n.game.scripts.ai.Pronghorn;
import l2n.game.scripts.ai.Pterosaur;
import l2n.game.scripts.ai.RagnaHealer;
import l2n.game.scripts.ai.RndTeleportFighter;
import l2n.game.scripts.ai.RndWalkAndAnim;
import l2n.game.scripts.ai.Shade;
import l2n.game.scripts.ai.TarBeetle;
import l2n.game.scripts.ai.TimakOrcTroopLeader;
import l2n.game.scripts.ai.WatchmanMonster;
import l2n.game.scripts.ai.WitchWarder;
import l2n.game.scripts.ai.ZoneSwither;
import l2n.game.scripts.ai.event.HandysBlock;
import l2n.game.scripts.ai.event.Thomas;
import l2n.game.scripts.ai.grandboss.Antharas;
import l2n.game.scripts.ai.grandboss.Baium;
import l2n.game.scripts.ai.grandboss.BaiumNpc;
import l2n.game.scripts.ai.grandboss.Core;
import l2n.game.scripts.ai.grandboss.Orfen;
import l2n.game.scripts.ai.grandboss.Orfen_RibaIren;
import l2n.game.scripts.ai.grandboss.QueenAntNurse;
import l2n.game.scripts.ai.grandboss.Scarlet;
import l2n.game.scripts.ai.grandboss.Valakas;
import l2n.game.scripts.ai.grandboss.Zaken;
import l2n.game.scripts.ai.hellbound.BelethMinion;
import l2n.game.scripts.ai.hellbound.BelethSlave;
import l2n.game.scripts.ai.hellbound.BodyDestroyer;
import l2n.game.scripts.ai.hellbound.Challenger;
import l2n.game.scripts.ai.hellbound.Chimeras;
import l2n.game.scripts.ai.hellbound.ExperimentalGolem;
import l2n.game.scripts.ai.hellbound.FloatingGhost;
import l2n.game.scripts.ai.hellbound.InfinitumFighter;
import l2n.game.scripts.ai.hellbound.InfinitumMystic;
import l2n.game.scripts.ai.hellbound.MasterFestina;
import l2n.game.scripts.ai.hellbound.MasterZelos;
import l2n.game.scripts.ai.hellbound.MutatedElpy;
import l2n.game.scripts.ai.hellbound.NaiaSpore;
import l2n.game.scripts.ai.hellbound.Sandstorm;
import l2n.game.scripts.ai.hellbound.SoulCrystalPillar;
import l2n.game.scripts.ai.hellbound.SteelCitadelKeymaster;
import l2n.game.scripts.ai.hellbound.TorturedNative;
import l2n.game.scripts.ai.hellbound.TownGuard;
import l2n.game.scripts.ai.hellbound.TullyServant;
import l2n.game.scripts.ai.hellbound.TullyWarden;
import l2n.game.scripts.ai.kamaloka.Kama56Boss;
import l2n.game.scripts.ai.kamaloka.Kama56Minion;
import l2n.game.scripts.ai.kamaloka.Kama63Minion;
import l2n.game.scripts.ai.npc.AirshipGuard1;
import l2n.game.scripts.ai.npc.AirshipGuard2;
import l2n.game.scripts.ai.npc.Alhena;
import l2n.game.scripts.ai.npc.DaimonTheWhiteEyed;
import l2n.game.scripts.ai.npc.Edwin;
import l2n.game.scripts.ai.npc.EdwinFollower;
import l2n.game.scripts.ai.npc.EvilNpc;
import l2n.game.scripts.ai.npc.Jaradine;
import l2n.game.scripts.ai.npc.Kasiel;
import l2n.game.scripts.ai.npc.Kreed;
import l2n.game.scripts.ai.npc.Leandro;
import l2n.game.scripts.ai.npc.MercenaryCaptain;
import l2n.game.scripts.ai.npc.Remy;
import l2n.game.scripts.ai.npc.Rogin;
import l2n.game.scripts.ai.npc.Rokar;
import l2n.game.scripts.ai.npc.Rooney;
import l2n.game.scripts.ai.npc.SuspiciousMerchantAaru;
import l2n.game.scripts.ai.npc.SuspiciousMerchantAntharas;
import l2n.game.scripts.ai.npc.SuspiciousMerchantArchaic;
import l2n.game.scripts.ai.npc.SuspiciousMerchantBayou;
import l2n.game.scripts.ai.npc.SuspiciousMerchantBorderland;
import l2n.game.scripts.ai.npc.SuspiciousMerchantCloud;
import l2n.game.scripts.ai.npc.SuspiciousMerchantDemon;
import l2n.game.scripts.ai.npc.SuspiciousMerchantDragonspine;
import l2n.game.scripts.ai.npc.SuspiciousMerchantFloran;
import l2n.game.scripts.ai.npc.SuspiciousMerchantHive;
import l2n.game.scripts.ai.npc.SuspiciousMerchantHunters;
import l2n.game.scripts.ai.npc.SuspiciousMerchantIvoryTower;
import l2n.game.scripts.ai.npc.SuspiciousMerchantMarshland;
import l2n.game.scripts.ai.npc.SuspiciousMerchantMonastic;
import l2n.game.scripts.ai.npc.SuspiciousMerchantShanty;
import l2n.game.scripts.ai.npc.SuspiciousMerchantSouthernGludio;
import l2n.game.scripts.ai.npc.SuspiciousMerchantTanor;
import l2n.game.scripts.ai.npc.SuspiciousMerchantValley;
import l2n.game.scripts.ai.npc.SuspiciousMerchantWestern;
import l2n.game.scripts.ai.npc.SuspiciousMerchantWhiteSands;
import l2n.game.scripts.ai.npc.Tate;
import l2n.game.scripts.ai.npc.Taurin;
import l2n.game.scripts.ai.npc.Turnir;
import l2n.game.scripts.ai.npc.Yakand;
import l2n.game.scripts.ai.quests.EpicQuestAnakim;
import l2n.game.scripts.ai.quests.EpicQuestFighter;
import l2n.game.scripts.ai.quests.EpicQuestLilith;
import l2n.game.scripts.ai.quests.EpicQuestMage;
import l2n.game.scripts.ai.quests.Lematan;
import l2n.game.scripts.ai.quests.PailakaBoss;
import l2n.game.scripts.ai.quests.PailakaHelperFighter;
import l2n.game.scripts.ai.quests.PailakaHelperMystic;
import l2n.game.scripts.ai.quests.PailakaHelperRanger;
import l2n.game.scripts.ai.quests.PailakaInvader;
import l2n.game.scripts.ai.quests.Quest024Fighter;
import l2n.game.scripts.ai.quests.Quest024Mystic;
import l2n.game.scripts.ai.quests.Quest421FairyTree;
import l2n.game.scripts.ai.quests.SealDevice;
import l2n.game.scripts.ai.raidboss.Aenkinel;
import l2n.game.scripts.ai.raidboss.Baylor;
import l2n.game.scripts.ai.raidboss.Beleth;
import l2n.game.scripts.ai.raidboss.Darion;
import l2n.game.scripts.ai.raidboss.Darnel;
import l2n.game.scripts.ai.raidboss.DemonPrince;
import l2n.game.scripts.ai.raidboss.Epidos;
import l2n.game.scripts.ai.raidboss.Gordon;
import l2n.game.scripts.ai.raidboss.Kechi;
import l2n.game.scripts.ai.raidboss.QueenShyeed;
import l2n.game.scripts.ai.raidboss.Ranku;
import l2n.game.scripts.ai.raidboss.RankuScapegoat;
import l2n.game.scripts.ai.raidboss.Tears;
import l2n.game.scripts.ai.raidboss.Tully;
import l2n.game.scripts.ai.raidboss.Tyrannosaurus;
import l2n.game.scripts.ai.sod.DimensionMovingDevice;
import l2n.game.scripts.ai.sod.NoRndWalkMonster;
import l2n.game.scripts.ai.sod.Tiat;
import l2n.game.scripts.ai.soi.AbstractSOIMonster;
import l2n.game.scripts.ai.soi.Cohemenes;
import l2n.game.scripts.ai.soi.FeralHound;
import l2n.game.scripts.ai.soi.HallOfSufferingBoss;
import l2n.game.scripts.ai.soi.UnstableSeed;
import l2n.game.scripts.ai.stakato.BizarreCocoon;
import l2n.game.scripts.ai.stakato.FemaleSpikedStakato;
import l2n.game.scripts.ai.stakato.SpikedStakatoNurse;
import l2n.game.scripts.ai.stakato.StakatoCheif;
import l2n.game.scripts.ai.stakato.StakatoFollower;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author bloodshed (L2NextGen)
* @date 29.08.2011
* @time 9:58:13
*/
public class CharacterAILoader extends ScriptFileLoader
{
    protected static final Logger _log = LoggerFactory.getLogger(CharacterAILoader.class.getName());

    public final THashMap<String, Constructor<? extends L2CharacterAI>> ai_constructors;

    public static CharacterAILoader getInstance()
    {
        return SingletonHolder._instance;
    }

    private CharacterAILoader()
    {
        ai_constructors = new THashMap<String, Constructor<? extends L2CharacterAI>>();
        // загружаем
        load(false);
        ai_constructors.trimToSize();
    }

    public void load(final boolean reload)
    {
        if(reload)
            ai_constructors.clear();

        loadStaticAI();
        final int count = loadCustomAI();
        _log.info("CharacterAILoader: loaded " + ai_constructors.size() + " (" + count + " custom) AIs.");
    }

    /**
     * Загружает AI которые в ядре
     */
    private void loadStaticAI()
    {
        // Основные типы ИИ
        loadConstructor("Fighter", Fighter.class);
        loadConstructor("Guard", Guard.class);
        loadConstructor("Mystic", Mystic.class);
        loadConstructor("Priest", Priest.class);
        loadConstructor("RaceManager", RaceManager.class);
        loadConstructor("Ranger", Ranger.class);
        loadConstructor("SiegeGuard", SiegeGuard.class);
        loadConstructor("SiegeGuardFighter", SiegeGuardFighter.class);
        loadConstructor("SiegeGuardMystic", SiegeGuardMystic.class);
        loadConstructor("SiegeGuardPriest", SiegeGuardPriest.class);
        loadConstructor("SiegeGuardRanger", SiegeGuardRanger.class);
        loadConstructor("Trap", Trap.class);

        // Дополнительные типы ИИ
        loadConstructor("AirshipGuard1", AirshipGuard1.class);
        loadConstructor("AirshipGuard2", AirshipGuard2.class);

        // RaidBoss
        loadConstructor("Aenkinel", Aenkinel.class);
        loadConstructor("Antharas", Antharas.class);
        loadConstructor("Baium", Baium.class);
        loadConstructor("BaiumNpc", BaiumNpc.class);
        loadConstructor("Baylor", Baylor.class);
        loadConstructor("Darnel", Darnel.class);
        loadConstructor("Core", Core.class);
        loadConstructor("Gordon", Gordon.class);
        loadConstructor("RankuScapegoat", RankuScapegoat.class);
        loadConstructor("Orfen", Orfen.class);
        loadConstructor("Orfen_RibaIren", Orfen_RibaIren.class);
        loadConstructor("Tears", Tears.class);
        loadConstructor("Tiat", Tiat.class);
        loadConstructor("Tyrannosaurus", Tyrannosaurus.class);
        loadConstructor("Valakas", Valakas.class);
        loadConstructor("Zaken", Zaken.class);

        loadConstructor("Alhena", Alhena.class);
        loadConstructor("AncientEgg", AncientEgg.class);
        loadConstructor("AttackMobNotPlayerFighter", AttackMobNotPlayerFighter.class);
        loadConstructor("BehemothDragon", BehemothDragon.class);
        loadConstructor("BodyDestroyer", BodyDestroyer.class);
        loadConstructor("CaughtFighter", CaughtFighter.class);
        loadConstructor("CaughtMystic", CaughtMystic.class);
        loadConstructor("Chimeras", Chimeras.class);
        loadConstructor("CrystallineGolem", CrystallineGolem.class);
        loadConstructor("DaimonTheWhiteEyed", DaimonTheWhiteEyed.class);
        loadConstructor("DarkWaterDragon", DarkWaterDragon.class);
        loadConstructor("DeluLizardmanSpecialAgent", DeluLizardmanSpecialAgent.class);
        loadConstructor("DeluLizardmanSpecialCommander", DeluLizardmanSpecialCommander.class);
        loadConstructor("DimensionMovingDevice", DimensionMovingDevice.class);
        loadConstructor("Edwin", Edwin.class);
        loadConstructor("EdwinFollower", EdwinFollower.class);
        loadConstructor("Elpy", Elpy.class);
        loadConstructor("EvasGiftBox", EvasGiftBox.class);
        loadConstructor("EvilNpc", EvilNpc.class);
        loadConstructor("FafurionKindred", FafurionKindred.class);
        loadConstructor("FieldMachine", FieldMachine.class);
        loadConstructor("FrightenedRagnaOrc", FrightenedRagnaOrc.class);
        loadConstructor("FrostBuffalo", FrostBuffalo.class);
        loadConstructor("GatekeeperZombie", GatekeeperZombie.class);
        loadConstructor("GhostOfVonHellmannsPage", GhostOfVonHellmannsPage.class);
        loadConstructor("GraveRobberSummoner", GraveRobberSummoner.class);
        loadConstructor("GuardianAngel", GuardianAngel.class);
        loadConstructor("GuardRndWalkAndAnim", GuardRndWalkAndAnim.class);

        // AI для Seed Of Infinity
        loadConstructor("HallOfSufferingBoss", HallOfSufferingBoss.class);
        loadConstructor("Cohemenes", Cohemenes.class);
        loadConstructor("UnstableSeed", UnstableSeed.class);
        loadConstructor("AbstractSOIMonster", AbstractSOIMonster.class);
        loadConstructor("FeralHound", FeralHound.class);

        loadConstructor("HotSpringsMob", HotSpringsMob.class);
        loadConstructor("InfinitumFighter", InfinitumFighter.class);
        loadConstructor("InfinitumMystic", InfinitumMystic.class);
        loadConstructor("IsleOfPrayerFighter", IsleOfPrayerFighter.class);
        loadConstructor("IsleOfPrayerMystic", IsleOfPrayerMystic.class);
        loadConstructor("Jaradine", Jaradine.class);
        loadConstructor("Kama56Boss", Kama56Boss.class);
        loadConstructor("Kama56Minion", Kama56Minion.class);
        loadConstructor("Kama63Minion", Kama63Minion.class);
        loadConstructor("KarulBugbear", KarulBugbear.class);
        loadConstructor("KashasEye", KashasEye.class);
        loadConstructor("Kasiel", Kasiel.class);
        loadConstructor("Keltirs", Keltirs.class);
        loadConstructor("Kreed", Kreed.class);
        loadConstructor("Leandro", Leandro.class);
        loadConstructor("Leogul", Leogul.class);
        loadConstructor("MercenaryCaptain", MercenaryCaptain.class);
        loadConstructor("MoSMonk", MoSMonk.class);
        loadConstructor("NightAgressionMystic", NightAgressionMystic.class);

        loadConstructor("NoRndWalkFighter", NoRndWalkFighter.class);
        loadConstructor("NoRndWalkMystic", NoRndWalkMystic.class);
        loadConstructor("NoRndWalkMonster", NoRndWalkMonster.class);

        loadConstructor("OlMahumGeneral", OlMahumGeneral.class);
        loadConstructor("PaganGuard", PaganGuard.class);
        loadConstructor("PrisonGuard", PrisonGuard.class);
        loadConstructor("Pronghorn", Pronghorn.class);
        loadConstructor("Pterosaur", Pterosaur.class);
        loadConstructor("QueenAntNurse", QueenAntNurse.class);
        loadConstructor("RagnaHealer", RagnaHealer.class);
        loadConstructor("Remy", Remy.class);
        loadConstructor("RndTeleportFighter", RndTeleportFighter.class);
        loadConstructor("RndWalkAndAnim", RndWalkAndAnim.class);
        loadConstructor("Rogin", Rogin.class);
        loadConstructor("Rokar", Rokar.class);
        loadConstructor("Rooney", Rooney.class);
        loadConstructor("Sandstorm", Sandstorm.class);
        loadConstructor("Scarlet", Scarlet.class);
        loadConstructor("Shade", Shade.class);
        loadConstructor("SteelCitadelKeymaster", SteelCitadelKeymaster.class);
        loadConstructor("SuspiciousMerchantAaru", SuspiciousMerchantAaru.class);
        loadConstructor("SuspiciousMerchantAntharas", SuspiciousMerchantAntharas.class);
        loadConstructor("SuspiciousMerchantArchaic", SuspiciousMerchantArchaic.class);
        loadConstructor("SuspiciousMerchantBayou", SuspiciousMerchantBayou.class);
        loadConstructor("SuspiciousMerchantBorderland", SuspiciousMerchantBorderland.class);
        loadConstructor("SuspiciousMerchantCloud", SuspiciousMerchantCloud.class);
        loadConstructor("SuspiciousMerchantDemon", SuspiciousMerchantDemon.class);
        loadConstructor("SuspiciousMerchantDragonspine", SuspiciousMerchantDragonspine.class);
        loadConstructor("SuspiciousMerchantFloran", SuspiciousMerchantFloran.class);
        loadConstructor("SuspiciousMerchantHive", SuspiciousMerchantHive.class);
        loadConstructor("SuspiciousMerchantHunters", SuspiciousMerchantHunters.class);
        loadConstructor("SuspiciousMerchantIvoryTower", SuspiciousMerchantIvoryTower.class);
        loadConstructor("SuspiciousMerchantMarshland", SuspiciousMerchantMarshland.class);
        loadConstructor("SuspiciousMerchantMonastic", SuspiciousMerchantMonastic.class);
        loadConstructor("SuspiciousMerchantShanty", SuspiciousMerchantShanty.class);
        loadConstructor("SuspiciousMerchantSouthernGludio", SuspiciousMerchantSouthernGludio.class);
        loadConstructor("SuspiciousMerchantTanor", SuspiciousMerchantTanor.class);
        loadConstructor("SuspiciousMerchantValley", SuspiciousMerchantValley.class);
        loadConstructor("SuspiciousMerchantWestern", SuspiciousMerchantWestern.class);
        loadConstructor("SuspiciousMerchantWhiteSands", SuspiciousMerchantWhiteSands.class);
        loadConstructor("Tate", Tate.class);
        loadConstructor("Taurin", Taurin.class);
        loadConstructor("Thomas", Thomas.class);
        loadConstructor("TimakOrcTroopLeader", TimakOrcTroopLeader.class);
        loadConstructor("TorturedNative", TorturedNative.class);
        loadConstructor("TownGuard", TownGuard.class);
        loadConstructor("Turnir", Turnir.class);
        loadConstructor("WatchmanMonster", WatchmanMonster.class);
        loadConstructor("WitchWarder", WitchWarder.class);
        loadConstructor("Yakand", Yakand.class);

        // AI для монстров в Forge of Gods
        loadConstructor("ForgeOfGods", ForgeOfGods.class);
        loadConstructor("TarBeetle", TarBeetle.class);
        loadConstructor("Lavasaurus", Lavasaurus.class);

        // AI для монстров в Stakato
        loadConstructor("QueenShyeed", QueenShyeed.class);
        loadConstructor("StakatoCheif", StakatoCheif.class);
        loadConstructor("BizarreCocoon", BizarreCocoon.class);
        loadConstructor("FemaleSpikedStakato", FemaleSpikedStakato.class);
        loadConstructor("SpikedStakatoNurse", SpikedStakatoNurse.class);
        loadConstructor("StakatoFollower", StakatoFollower.class);

        // Различные квесты
        loadConstructor("Quest024Fighter", Quest024Fighter.class);
        loadConstructor("Quest024Mystic", Quest024Mystic.class);
        loadConstructor("Quest421FairyTree", Quest421FairyTree.class);
        loadConstructor("EpicQuestLilith", EpicQuestLilith.class);
        loadConstructor("EpicQuestAnakim", EpicQuestAnakim.class);
        loadConstructor("EpicQuestMage", EpicQuestMage.class);
        loadConstructor("EpicQuestFighter", EpicQuestFighter.class);
        loadConstructor("SealDevice", SealDevice.class);
        // FIXME конструктор тут другой, можно не грузить loadConstructor("GuardsOfDawn", GuardsOfDawn.class);
        loadConstructor("Lematan", Lematan.class);

        loadConstructor("PailakaBoss", PailakaBoss.class);
        loadConstructor("PailakaInvader", PailakaInvader.class);
        loadConstructor("PailakaHelperFighter", PailakaHelperFighter.class);
        loadConstructor("PailakaHelperMystic", PailakaHelperMystic.class);
        loadConstructor("PailakaHelperRanger", PailakaHelperRanger.class);

        // Hellbound
        loadConstructor("Darion", Darion.class);
        loadConstructor("DemonPrince", DemonPrince.class);
        loadConstructor("Ranku", Ranku.class);
        loadConstructor("Kechi", Kechi.class);
        loadConstructor("MasterZelos", MasterZelos.class);
        loadConstructor("MasterFestina", MasterFestina.class);
        loadConstructor("Tully", Tully.class);
        loadConstructor("TullyWarden", TullyWarden.class);
        loadConstructor("TullyServant", TullyServant.class);
        loadConstructor("ExperimentalGolem", ExperimentalGolem.class);
        loadConstructor("FloatingGhost", FloatingGhost.class);
        loadConstructor("SoulCrystalPillar", SoulCrystalPillar.class);
        loadConstructor("Challenger", Challenger.class);
        loadConstructor("MutatedElpy", MutatedElpy.class);
        loadConstructor("BelethSlave", BelethSlave.class);
        loadConstructor("NaiaSpore", NaiaSpore.class);
        loadConstructor("Epidos", Epidos.class);
        loadConstructor("Beleth", Beleth.class);
        loadConstructor("BelethMinion", BelethMinion.class);

        loadConstructor("ZoneSwither", ZoneSwither.class);
        // event Handys Block Checker
        loadConstructor("HandysBlock", HandysBlock.class);
    }

    private int loadCustomAI()
    {
        final GArray<File> ai_files = new GArray<File>();
        parseClasses(new File("./data/scripts/ai"), ai_files);
        if(Compiler.getInstance().compile(ai_files, System.out))
        {
            int count = 0;
            final MemoryClassLoader classLoader = Compiler.getInstance().getClassLoader();
            for(final String name : classLoader.getClasses())
            {
                if(name.contains("$"))
                    continue; // пропускаем вложенные классы
                try
                {
                    @SuppressWarnings("unchecked")
                    final Class<? extends L2CharacterAI> c = (Class<? extends L2CharacterAI>) classLoader.loadClass(name);
                    if(loadConstructor(c))
                        count++;
                }
                catch(final Exception e)
                {
                    _log.warn("Can't load custom AI script class[" + name + "]:" + e.getMessage());
                }
            }
            Compiler.getInstance().clearClassLoader();
            return count;
        }
        else
            _log.warn("Can't compile custom AI scripts!");
        return 0;
    }

    protected void loadConstructor(final String nameAI, final Class<? extends L2CharacterAI> c)
    {
        Constructor<? extends L2CharacterAI> constructor = null;
        try
        {
            constructor = c.getConstructor(L2Character.class);
        }
        catch(final SecurityException e)
        {
            _log.warn("", e);
        }
        catch(final NoSuchMethodException e)
        {
            // _log.warn("", e);
        }

        if(constructor != null)
            ai_constructors.put(nameAI, constructor);
    }

    protected boolean loadConstructor(final Class<? extends L2CharacterAI> c)
    {
        Constructor<? extends L2CharacterAI> constructor = null;
        try
        {
            constructor = c.getConstructor(L2Character.class);
        }
        catch(final SecurityException e)
        {
            _log.warn("", e);
        }
        catch(final NoSuchMethodException e)
        {
            // _log.warn("", e);
        }

        if(constructor != null)
        {
            ai_constructors.put(c.getSimpleName(), constructor);
            return true;
        }
        return false;
    }

    /**
     * @param aiType
     *            - название AI
     * @return true если AI с таким названием есть
     */
    public boolean isAvailable(final String aiType)
    {
        return ai_constructors.containsKey(aiType);
    }

    public L2CharacterAI getAI(final String aiType, final L2Character actor)
    {
        final Constructor<? extends L2CharacterAI> constructor = ai_constructors.get(aiType);
        if(constructor != null)
            try
        {
                return constructor.newInstance(actor);
        }
        catch(final Exception e)
        {
            _log.error("CharacterAILoader getAI error: ", e);
            return null;
        }
        return null;
    }

    @Override
    protected boolean checkFileCondition(final File file, final boolean dir)
    {
        if(dir)
        {
            if(file.isHidden() || file.getName().equals(".svn"))
                return false;
        }
        else if(file.isHidden() || !file.getName().contains(".java"))
            return false;

        return true;
    }

    @SuppressWarnings("synthetic-access")
    private static class SingletonHolder
    {
        private static final CharacterAILoader _instance = new CharacterAILoader();
    }
}
И сурсы лавео куда чище и лучше будут в разы. Понятия о DAO моделях отсутствует о нормальной работе механизмов так же а в не которых местах так вообще отсутствует понятие ООП.
 

Да что мне рассказывать или наверное круто так кодить?
Код:
package l2n.game.scripts;

import gnu.trove.map.hash.THashMap;

import java.io.File;
import java.lang.reflect.Constructor;

import l2n.commons.compiler.Compiler;
import l2n.commons.compiler.MemoryClassLoader;
import l2n.commons.list.GArray;
import l2n.extensions.scripts.ScriptFileLoader;
import l2n.game.ai.Fighter;
import l2n.game.ai.Guard;
import l2n.game.ai.L2CharacterAI;
import l2n.game.ai.Mystic;
import l2n.game.ai.Priest;
import l2n.game.ai.RaceManager;
import l2n.game.ai.Ranger;
import l2n.game.ai.SiegeGuard;
import l2n.game.ai.SiegeGuardFighter;
import l2n.game.ai.SiegeGuardMystic;
import l2n.game.ai.SiegeGuardPriest;
import l2n.game.ai.SiegeGuardRanger;
import l2n.game.ai.Trap;
import l2n.game.model.actor.L2Character;
import l2n.game.scripts.ai.AncientEgg;
import l2n.game.scripts.ai.AttackMobNotPlayerFighter;
import l2n.game.scripts.ai.BehemothDragon;
import l2n.game.scripts.ai.CaughtFighter;
import l2n.game.scripts.ai.CaughtMystic;
import l2n.game.scripts.ai.CrystallineGolem;
import l2n.game.scripts.ai.DarkWaterDragon;
import l2n.game.scripts.ai.DeluLizardmanSpecialAgent;
import l2n.game.scripts.ai.DeluLizardmanSpecialCommander;
import l2n.game.scripts.ai.Elpy;
import l2n.game.scripts.ai.EvasGiftBox;
import l2n.game.scripts.ai.FafurionKindred;
import l2n.game.scripts.ai.FieldMachine;
import l2n.game.scripts.ai.ForgeOfGods;
import l2n.game.scripts.ai.FrightenedRagnaOrc;
import l2n.game.scripts.ai.FrostBuffalo;
import l2n.game.scripts.ai.GatekeeperZombie;
import l2n.game.scripts.ai.GhostOfVonHellmannsPage;
import l2n.game.scripts.ai.GraveRobberSummoner;
import l2n.game.scripts.ai.GuardRndWalkAndAnim;
import l2n.game.scripts.ai.GuardianAngel;
import l2n.game.scripts.ai.HotSpringsMob;
import l2n.game.scripts.ai.IsleOfPrayerFighter;
import l2n.game.scripts.ai.IsleOfPrayerMystic;
import l2n.game.scripts.ai.KarulBugbear;
import l2n.game.scripts.ai.KashasEye;
import l2n.game.scripts.ai.Keltirs;
import l2n.game.scripts.ai.Lavasaurus;
import l2n.game.scripts.ai.Leogul;
import l2n.game.scripts.ai.MoSMonk;
import l2n.game.scripts.ai.NightAgressionMystic;
import l2n.game.scripts.ai.NoRndWalkFighter;
import l2n.game.scripts.ai.NoRndWalkMystic;
import l2n.game.scripts.ai.OlMahumGeneral;
import l2n.game.scripts.ai.PaganGuard;
import l2n.game.scripts.ai.PrisonGuard;
import l2n.game.scripts.ai.Pronghorn;
import l2n.game.scripts.ai.Pterosaur;
import l2n.game.scripts.ai.RagnaHealer;
import l2n.game.scripts.ai.RndTeleportFighter;
import l2n.game.scripts.ai.RndWalkAndAnim;
import l2n.game.scripts.ai.Shade;
import l2n.game.scripts.ai.TarBeetle;
import l2n.game.scripts.ai.TimakOrcTroopLeader;
import l2n.game.scripts.ai.WatchmanMonster;
import l2n.game.scripts.ai.WitchWarder;
import l2n.game.scripts.ai.ZoneSwither;
import l2n.game.scripts.ai.event.HandysBlock;
import l2n.game.scripts.ai.event.Thomas;
import l2n.game.scripts.ai.grandboss.Antharas;
import l2n.game.scripts.ai.grandboss.Baium;
import l2n.game.scripts.ai.grandboss.BaiumNpc;
import l2n.game.scripts.ai.grandboss.Core;
import l2n.game.scripts.ai.grandboss.Orfen;
import l2n.game.scripts.ai.grandboss.Orfen_RibaIren;
import l2n.game.scripts.ai.grandboss.QueenAntNurse;
import l2n.game.scripts.ai.grandboss.Scarlet;
import l2n.game.scripts.ai.grandboss.Valakas;
import l2n.game.scripts.ai.grandboss.Zaken;
import l2n.game.scripts.ai.hellbound.BelethMinion;
import l2n.game.scripts.ai.hellbound.BelethSlave;
import l2n.game.scripts.ai.hellbound.BodyDestroyer;
import l2n.game.scripts.ai.hellbound.Challenger;
import l2n.game.scripts.ai.hellbound.Chimeras;
import l2n.game.scripts.ai.hellbound.ExperimentalGolem;
import l2n.game.scripts.ai.hellbound.FloatingGhost;
import l2n.game.scripts.ai.hellbound.InfinitumFighter;
import l2n.game.scripts.ai.hellbound.InfinitumMystic;
import l2n.game.scripts.ai.hellbound.MasterFestina;
import l2n.game.scripts.ai.hellbound.MasterZelos;
import l2n.game.scripts.ai.hellbound.MutatedElpy;
import l2n.game.scripts.ai.hellbound.NaiaSpore;
import l2n.game.scripts.ai.hellbound.Sandstorm;
import l2n.game.scripts.ai.hellbound.SoulCrystalPillar;
import l2n.game.scripts.ai.hellbound.SteelCitadelKeymaster;
import l2n.game.scripts.ai.hellbound.TorturedNative;
import l2n.game.scripts.ai.hellbound.TownGuard;
import l2n.game.scripts.ai.hellbound.TullyServant;
import l2n.game.scripts.ai.hellbound.TullyWarden;
import l2n.game.scripts.ai.kamaloka.Kama56Boss;
import l2n.game.scripts.ai.kamaloka.Kama56Minion;
import l2n.game.scripts.ai.kamaloka.Kama63Minion;
import l2n.game.scripts.ai.npc.AirshipGuard1;
import l2n.game.scripts.ai.npc.AirshipGuard2;
import l2n.game.scripts.ai.npc.Alhena;
import l2n.game.scripts.ai.npc.DaimonTheWhiteEyed;
import l2n.game.scripts.ai.npc.Edwin;
import l2n.game.scripts.ai.npc.EdwinFollower;
import l2n.game.scripts.ai.npc.EvilNpc;
import l2n.game.scripts.ai.npc.Jaradine;
import l2n.game.scripts.ai.npc.Kasiel;
import l2n.game.scripts.ai.npc.Kreed;
import l2n.game.scripts.ai.npc.Leandro;
import l2n.game.scripts.ai.npc.MercenaryCaptain;
import l2n.game.scripts.ai.npc.Remy;
import l2n.game.scripts.ai.npc.Rogin;
import l2n.game.scripts.ai.npc.Rokar;
import l2n.game.scripts.ai.npc.Rooney;
import l2n.game.scripts.ai.npc.SuspiciousMerchantAaru;
import l2n.game.scripts.ai.npc.SuspiciousMerchantAntharas;
import l2n.game.scripts.ai.npc.SuspiciousMerchantArchaic;
import l2n.game.scripts.ai.npc.SuspiciousMerchantBayou;
import l2n.game.scripts.ai.npc.SuspiciousMerchantBorderland;
import l2n.game.scripts.ai.npc.SuspiciousMerchantCloud;
import l2n.game.scripts.ai.npc.SuspiciousMerchantDemon;
import l2n.game.scripts.ai.npc.SuspiciousMerchantDragonspine;
import l2n.game.scripts.ai.npc.SuspiciousMerchantFloran;
import l2n.game.scripts.ai.npc.SuspiciousMerchantHive;
import l2n.game.scripts.ai.npc.SuspiciousMerchantHunters;
import l2n.game.scripts.ai.npc.SuspiciousMerchantIvoryTower;
import l2n.game.scripts.ai.npc.SuspiciousMerchantMarshland;
import l2n.game.scripts.ai.npc.SuspiciousMerchantMonastic;
import l2n.game.scripts.ai.npc.SuspiciousMerchantShanty;
import l2n.game.scripts.ai.npc.SuspiciousMerchantSouthernGludio;
import l2n.game.scripts.ai.npc.SuspiciousMerchantTanor;
import l2n.game.scripts.ai.npc.SuspiciousMerchantValley;
import l2n.game.scripts.ai.npc.SuspiciousMerchantWestern;
import l2n.game.scripts.ai.npc.SuspiciousMerchantWhiteSands;
import l2n.game.scripts.ai.npc.Tate;
import l2n.game.scripts.ai.npc.Taurin;
import l2n.game.scripts.ai.npc.Turnir;
import l2n.game.scripts.ai.npc.Yakand;
import l2n.game.scripts.ai.quests.EpicQuestAnakim;
import l2n.game.scripts.ai.quests.EpicQuestFighter;
import l2n.game.scripts.ai.quests.EpicQuestLilith;
import l2n.game.scripts.ai.quests.EpicQuestMage;
import l2n.game.scripts.ai.quests.Lematan;
import l2n.game.scripts.ai.quests.PailakaBoss;
import l2n.game.scripts.ai.quests.PailakaHelperFighter;
import l2n.game.scripts.ai.quests.PailakaHelperMystic;
import l2n.game.scripts.ai.quests.PailakaHelperRanger;
import l2n.game.scripts.ai.quests.PailakaInvader;
import l2n.game.scripts.ai.quests.Quest024Fighter;
import l2n.game.scripts.ai.quests.Quest024Mystic;
import l2n.game.scripts.ai.quests.Quest421FairyTree;
import l2n.game.scripts.ai.quests.SealDevice;
import l2n.game.scripts.ai.raidboss.Aenkinel;
import l2n.game.scripts.ai.raidboss.Baylor;
import l2n.game.scripts.ai.raidboss.Beleth;
import l2n.game.scripts.ai.raidboss.Darion;
import l2n.game.scripts.ai.raidboss.Darnel;
import l2n.game.scripts.ai.raidboss.DemonPrince;
import l2n.game.scripts.ai.raidboss.Epidos;
import l2n.game.scripts.ai.raidboss.Gordon;
import l2n.game.scripts.ai.raidboss.Kechi;
import l2n.game.scripts.ai.raidboss.QueenShyeed;
import l2n.game.scripts.ai.raidboss.Ranku;
import l2n.game.scripts.ai.raidboss.RankuScapegoat;
import l2n.game.scripts.ai.raidboss.Tears;
import l2n.game.scripts.ai.raidboss.Tully;
import l2n.game.scripts.ai.raidboss.Tyrannosaurus;
import l2n.game.scripts.ai.sod.DimensionMovingDevice;
import l2n.game.scripts.ai.sod.NoRndWalkMonster;
import l2n.game.scripts.ai.sod.Tiat;
import l2n.game.scripts.ai.soi.AbstractSOIMonster;
import l2n.game.scripts.ai.soi.Cohemenes;
import l2n.game.scripts.ai.soi.FeralHound;
import l2n.game.scripts.ai.soi.HallOfSufferingBoss;
import l2n.game.scripts.ai.soi.UnstableSeed;
import l2n.game.scripts.ai.stakato.BizarreCocoon;
import l2n.game.scripts.ai.stakato.FemaleSpikedStakato;
import l2n.game.scripts.ai.stakato.SpikedStakatoNurse;
import l2n.game.scripts.ai.stakato.StakatoCheif;
import l2n.game.scripts.ai.stakato.StakatoFollower;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author bloodshed (L2NextGen)
* @date 29.08.2011
* @time 9:58:13
*/
public class CharacterAILoader extends ScriptFileLoader
{
    protected static final Logger _log = LoggerFactory.getLogger(CharacterAILoader.class.getName());

    public final THashMap<String, Constructor<? extends L2CharacterAI>> ai_constructors;

    public static CharacterAILoader getInstance()
    {
        return SingletonHolder._instance;
    }

    private CharacterAILoader()
    {
        ai_constructors = new THashMap<String, Constructor<? extends L2CharacterAI>>();
        // загружаем
        load(false);
        ai_constructors.trimToSize();
    }

    public void load(final boolean reload)
    {
        if(reload)
            ai_constructors.clear();

        loadStaticAI();
        final int count = loadCustomAI();
        _log.info("CharacterAILoader: loaded " + ai_constructors.size() + " (" + count + " custom) AIs.");
    }

    /**
     * Загружает AI которые в ядре
     */
    private void loadStaticAI()
    {
        // Основные типы ИИ
        loadConstructor("Fighter", Fighter.class);
        loadConstructor("Guard", Guard.class);
        loadConstructor("Mystic", Mystic.class);
        loadConstructor("Priest", Priest.class);
        loadConstructor("RaceManager", RaceManager.class);
        loadConstructor("Ranger", Ranger.class);
        loadConstructor("SiegeGuard", SiegeGuard.class);
        loadConstructor("SiegeGuardFighter", SiegeGuardFighter.class);
        loadConstructor("SiegeGuardMystic", SiegeGuardMystic.class);
        loadConstructor("SiegeGuardPriest", SiegeGuardPriest.class);
        loadConstructor("SiegeGuardRanger", SiegeGuardRanger.class);
        loadConstructor("Trap", Trap.class);

        // Дополнительные типы ИИ
        loadConstructor("AirshipGuard1", AirshipGuard1.class);
        loadConstructor("AirshipGuard2", AirshipGuard2.class);

        // RaidBoss
        loadConstructor("Aenkinel", Aenkinel.class);
        loadConstructor("Antharas", Antharas.class);
        loadConstructor("Baium", Baium.class);
        loadConstructor("BaiumNpc", BaiumNpc.class);
        loadConstructor("Baylor", Baylor.class);
        loadConstructor("Darnel", Darnel.class);
        loadConstructor("Core", Core.class);
        loadConstructor("Gordon", Gordon.class);
        loadConstructor("RankuScapegoat", RankuScapegoat.class);
        loadConstructor("Orfen", Orfen.class);
        loadConstructor("Orfen_RibaIren", Orfen_RibaIren.class);
        loadConstructor("Tears", Tears.class);
        loadConstructor("Tiat", Tiat.class);
        loadConstructor("Tyrannosaurus", Tyrannosaurus.class);
        loadConstructor("Valakas", Valakas.class);
        loadConstructor("Zaken", Zaken.class);

        loadConstructor("Alhena", Alhena.class);
        loadConstructor("AncientEgg", AncientEgg.class);
        loadConstructor("AttackMobNotPlayerFighter", AttackMobNotPlayerFighter.class);
        loadConstructor("BehemothDragon", BehemothDragon.class);
        loadConstructor("BodyDestroyer", BodyDestroyer.class);
        loadConstructor("CaughtFighter", CaughtFighter.class);
        loadConstructor("CaughtMystic", CaughtMystic.class);
        loadConstructor("Chimeras", Chimeras.class);
        loadConstructor("CrystallineGolem", CrystallineGolem.class);
        loadConstructor("DaimonTheWhiteEyed", DaimonTheWhiteEyed.class);
        loadConstructor("DarkWaterDragon", DarkWaterDragon.class);
        loadConstructor("DeluLizardmanSpecialAgent", DeluLizardmanSpecialAgent.class);
        loadConstructor("DeluLizardmanSpecialCommander", DeluLizardmanSpecialCommander.class);
        loadConstructor("DimensionMovingDevice", DimensionMovingDevice.class);
        loadConstructor("Edwin", Edwin.class);
        loadConstructor("EdwinFollower", EdwinFollower.class);
        loadConstructor("Elpy", Elpy.class);
        loadConstructor("EvasGiftBox", EvasGiftBox.class);
        loadConstructor("EvilNpc", EvilNpc.class);
        loadConstructor("FafurionKindred", FafurionKindred.class);
        loadConstructor("FieldMachine", FieldMachine.class);
        loadConstructor("FrightenedRagnaOrc", FrightenedRagnaOrc.class);
        loadConstructor("FrostBuffalo", FrostBuffalo.class);
        loadConstructor("GatekeeperZombie", GatekeeperZombie.class);
        loadConstructor("GhostOfVonHellmannsPage", GhostOfVonHellmannsPage.class);
        loadConstructor("GraveRobberSummoner", GraveRobberSummoner.class);
        loadConstructor("GuardianAngel", GuardianAngel.class);
        loadConstructor("GuardRndWalkAndAnim", GuardRndWalkAndAnim.class);

        // AI для Seed Of Infinity
        loadConstructor("HallOfSufferingBoss", HallOfSufferingBoss.class);
        loadConstructor("Cohemenes", Cohemenes.class);
        loadConstructor("UnstableSeed", UnstableSeed.class);
        loadConstructor("AbstractSOIMonster", AbstractSOIMonster.class);
        loadConstructor("FeralHound", FeralHound.class);

        loadConstructor("HotSpringsMob", HotSpringsMob.class);
        loadConstructor("InfinitumFighter", InfinitumFighter.class);
        loadConstructor("InfinitumMystic", InfinitumMystic.class);
        loadConstructor("IsleOfPrayerFighter", IsleOfPrayerFighter.class);
        loadConstructor("IsleOfPrayerMystic", IsleOfPrayerMystic.class);
        loadConstructor("Jaradine", Jaradine.class);
        loadConstructor("Kama56Boss", Kama56Boss.class);
        loadConstructor("Kama56Minion", Kama56Minion.class);
        loadConstructor("Kama63Minion", Kama63Minion.class);
        loadConstructor("KarulBugbear", KarulBugbear.class);
        loadConstructor("KashasEye", KashasEye.class);
        loadConstructor("Kasiel", Kasiel.class);
        loadConstructor("Keltirs", Keltirs.class);
        loadConstructor("Kreed", Kreed.class);
        loadConstructor("Leandro", Leandro.class);
        loadConstructor("Leogul", Leogul.class);
        loadConstructor("MercenaryCaptain", MercenaryCaptain.class);
        loadConstructor("MoSMonk", MoSMonk.class);
        loadConstructor("NightAgressionMystic", NightAgressionMystic.class);

        loadConstructor("NoRndWalkFighter", NoRndWalkFighter.class);
        loadConstructor("NoRndWalkMystic", NoRndWalkMystic.class);
        loadConstructor("NoRndWalkMonster", NoRndWalkMonster.class);

        loadConstructor("OlMahumGeneral", OlMahumGeneral.class);
        loadConstructor("PaganGuard", PaganGuard.class);
        loadConstructor("PrisonGuard", PrisonGuard.class);
        loadConstructor("Pronghorn", Pronghorn.class);
        loadConstructor("Pterosaur", Pterosaur.class);
        loadConstructor("QueenAntNurse", QueenAntNurse.class);
        loadConstructor("RagnaHealer", RagnaHealer.class);
        loadConstructor("Remy", Remy.class);
        loadConstructor("RndTeleportFighter", RndTeleportFighter.class);
        loadConstructor("RndWalkAndAnim", RndWalkAndAnim.class);
        loadConstructor("Rogin", Rogin.class);
        loadConstructor("Rokar", Rokar.class);
        loadConstructor("Rooney", Rooney.class);
        loadConstructor("Sandstorm", Sandstorm.class);
        loadConstructor("Scarlet", Scarlet.class);
        loadConstructor("Shade", Shade.class);
        loadConstructor("SteelCitadelKeymaster", SteelCitadelKeymaster.class);
        loadConstructor("SuspiciousMerchantAaru", SuspiciousMerchantAaru.class);
        loadConstructor("SuspiciousMerchantAntharas", SuspiciousMerchantAntharas.class);
        loadConstructor("SuspiciousMerchantArchaic", SuspiciousMerchantArchaic.class);
        loadConstructor("SuspiciousMerchantBayou", SuspiciousMerchantBayou.class);
        loadConstructor("SuspiciousMerchantBorderland", SuspiciousMerchantBorderland.class);
        loadConstructor("SuspiciousMerchantCloud", SuspiciousMerchantCloud.class);
        loadConstructor("SuspiciousMerchantDemon", SuspiciousMerchantDemon.class);
        loadConstructor("SuspiciousMerchantDragonspine", SuspiciousMerchantDragonspine.class);
        loadConstructor("SuspiciousMerchantFloran", SuspiciousMerchantFloran.class);
        loadConstructor("SuspiciousMerchantHive", SuspiciousMerchantHive.class);
        loadConstructor("SuspiciousMerchantHunters", SuspiciousMerchantHunters.class);
        loadConstructor("SuspiciousMerchantIvoryTower", SuspiciousMerchantIvoryTower.class);
        loadConstructor("SuspiciousMerchantMarshland", SuspiciousMerchantMarshland.class);
        loadConstructor("SuspiciousMerchantMonastic", SuspiciousMerchantMonastic.class);
        loadConstructor("SuspiciousMerchantShanty", SuspiciousMerchantShanty.class);
        loadConstructor("SuspiciousMerchantSouthernGludio", SuspiciousMerchantSouthernGludio.class);
        loadConstructor("SuspiciousMerchantTanor", SuspiciousMerchantTanor.class);
        loadConstructor("SuspiciousMerchantValley", SuspiciousMerchantValley.class);
        loadConstructor("SuspiciousMerchantWestern", SuspiciousMerchantWestern.class);
        loadConstructor("SuspiciousMerchantWhiteSands", SuspiciousMerchantWhiteSands.class);
        loadConstructor("Tate", Tate.class);
        loadConstructor("Taurin", Taurin.class);
        loadConstructor("Thomas", Thomas.class);
        loadConstructor("TimakOrcTroopLeader", TimakOrcTroopLeader.class);
        loadConstructor("TorturedNative", TorturedNative.class);
        loadConstructor("TownGuard", TownGuard.class);
        loadConstructor("Turnir", Turnir.class);
        loadConstructor("WatchmanMonster", WatchmanMonster.class);
        loadConstructor("WitchWarder", WitchWarder.class);
        loadConstructor("Yakand", Yakand.class);

        // AI для монстров в Forge of Gods
        loadConstructor("ForgeOfGods", ForgeOfGods.class);
        loadConstructor("TarBeetle", TarBeetle.class);
        loadConstructor("Lavasaurus", Lavasaurus.class);

        // AI для монстров в Stakato
        loadConstructor("QueenShyeed", QueenShyeed.class);
        loadConstructor("StakatoCheif", StakatoCheif.class);
        loadConstructor("BizarreCocoon", BizarreCocoon.class);
        loadConstructor("FemaleSpikedStakato", FemaleSpikedStakato.class);
        loadConstructor("SpikedStakatoNurse", SpikedStakatoNurse.class);
        loadConstructor("StakatoFollower", StakatoFollower.class);

        // Различные квесты
        loadConstructor("Quest024Fighter", Quest024Fighter.class);
        loadConstructor("Quest024Mystic", Quest024Mystic.class);
        loadConstructor("Quest421FairyTree", Quest421FairyTree.class);
        loadConstructor("EpicQuestLilith", EpicQuestLilith.class);
        loadConstructor("EpicQuestAnakim", EpicQuestAnakim.class);
        loadConstructor("EpicQuestMage", EpicQuestMage.class);
        loadConstructor("EpicQuestFighter", EpicQuestFighter.class);
        loadConstructor("SealDevice", SealDevice.class);
        // FIXME конструктор тут другой, можно не грузить loadConstructor("GuardsOfDawn", GuardsOfDawn.class);
        loadConstructor("Lematan", Lematan.class);

        loadConstructor("PailakaBoss", PailakaBoss.class);
        loadConstructor("PailakaInvader", PailakaInvader.class);
        loadConstructor("PailakaHelperFighter", PailakaHelperFighter.class);
        loadConstructor("PailakaHelperMystic", PailakaHelperMystic.class);
        loadConstructor("PailakaHelperRanger", PailakaHelperRanger.class);

        // Hellbound
        loadConstructor("Darion", Darion.class);
        loadConstructor("DemonPrince", DemonPrince.class);
        loadConstructor("Ranku", Ranku.class);
        loadConstructor("Kechi", Kechi.class);
        loadConstructor("MasterZelos", MasterZelos.class);
        loadConstructor("MasterFestina", MasterFestina.class);
        loadConstructor("Tully", Tully.class);
        loadConstructor("TullyWarden", TullyWarden.class);
        loadConstructor("TullyServant", TullyServant.class);
        loadConstructor("ExperimentalGolem", ExperimentalGolem.class);
        loadConstructor("FloatingGhost", FloatingGhost.class);
        loadConstructor("SoulCrystalPillar", SoulCrystalPillar.class);
        loadConstructor("Challenger", Challenger.class);
        loadConstructor("MutatedElpy", MutatedElpy.class);
        loadConstructor("BelethSlave", BelethSlave.class);
        loadConstructor("NaiaSpore", NaiaSpore.class);
        loadConstructor("Epidos", Epidos.class);
        loadConstructor("Beleth", Beleth.class);
        loadConstructor("BelethMinion", BelethMinion.class);

        loadConstructor("ZoneSwither", ZoneSwither.class);
        // event Handys Block Checker
        loadConstructor("HandysBlock", HandysBlock.class);
    }

    private int loadCustomAI()
    {
        final GArray<File> ai_files = new GArray<File>();
        parseClasses(new File("./data/scripts/ai"), ai_files);
        if(Compiler.getInstance().compile(ai_files, System.out))
        {
            int count = 0;
            final MemoryClassLoader classLoader = Compiler.getInstance().getClassLoader();
            for(final String name : classLoader.getClasses())
            {
                if(name.contains("$"))
                    continue; // пропускаем вложенные классы
                try
                {
                    @SuppressWarnings("unchecked")
                    final Class<? extends L2CharacterAI> c = (Class<? extends L2CharacterAI>) classLoader.loadClass(name);
                    if(loadConstructor(c))
                        count++;
                }
                catch(final Exception e)
                {
                    _log.warn("Can't load custom AI script class[" + name + "]:" + e.getMessage());
                }
            }
            Compiler.getInstance().clearClassLoader();
            return count;
        }
        else
            _log.warn("Can't compile custom AI scripts!");
        return 0;
    }

    protected void loadConstructor(final String nameAI, final Class<? extends L2CharacterAI> c)
    {
        Constructor<? extends L2CharacterAI> constructor = null;
        try
        {
            constructor = c.getConstructor(L2Character.class);
        }
        catch(final SecurityException e)
        {
            _log.warn("", e);
        }
        catch(final NoSuchMethodException e)
        {
            // _log.warn("", e);
        }

        if(constructor != null)
            ai_constructors.put(nameAI, constructor);
    }

    protected boolean loadConstructor(final Class<? extends L2CharacterAI> c)
    {
        Constructor<? extends L2CharacterAI> constructor = null;
        try
        {
            constructor = c.getConstructor(L2Character.class);
        }
        catch(final SecurityException e)
        {
            _log.warn("", e);
        }
        catch(final NoSuchMethodException e)
        {
            // _log.warn("", e);
        }

        if(constructor != null)
        {
            ai_constructors.put(c.getSimpleName(), constructor);
            return true;
        }
        return false;
    }

    /**
     * @param aiType
     *            - название AI
     * @return true если AI с таким названием есть
     */
    public boolean isAvailable(final String aiType)
    {
        return ai_constructors.containsKey(aiType);
    }

    public L2CharacterAI getAI(final String aiType, final L2Character actor)
    {
        final Constructor<? extends L2CharacterAI> constructor = ai_constructors.get(aiType);
        if(constructor != null)
            try
        {
                return constructor.newInstance(actor);
        }
        catch(final Exception e)
        {
            _log.error("CharacterAILoader getAI error: ", e);
            return null;
        }
        return null;
    }

    @Override
    protected boolean checkFileCondition(final File file, final boolean dir)
    {
        if(dir)
        {
            if(file.isHidden() || file.getName().equals(".svn"))
                return false;
        }
        else if(file.isHidden() || !file.getName().contains(".java"))
            return false;

        return true;
    }

    @SuppressWarnings("synthetic-access")
    private static class SingletonHolder
    {
        private static final CharacterAILoader _instance = new CharacterAILoader();
    }
}
И сурсы лавео куда чище и лучше будут в разы. Понятия о DAO моделях отсутствует о нормальной работе механизмов так же а в не которых местах так вообще отсутствует понятие ООП.

Да я уже это видел, поржал :)
А теперь сравни самые тяжелые классы Player там и там :)
 
Использование Javolution
Я 4 года помалкивал, не хотел показывать свой скил в этом деле, но решил таки выложить, чтобы люди могли использовать javolution без утечек памяти
Javolution 5.5.1 Fix
Умников много, а фиксить пришлось мне.
 
Последнее редактирование:
1. Не нужно HighME приписывать, он ничего не сделал по сборке толком. Исход дал ему раст, конфиги пилил раст.
А High только толкает лохам исходы которые я расшарил.
2. Зависание мобов о котором ты говоришь фиксится в ядре методом (не скажу).
Умные ребята которые понимают из за чего идет зависание уже давно пофиксили.

А по поводу выбора. Нет смысла выбирать. Что там что там море работы.

Да и добавлю:
Я хоти и пилю свой товар на некстгене, но всегда признаю что он кал ибо это сплошной костыль.
А знаешь как пилю? Пихаю костыли в костыль. Вот такие дела.
мобы там зависали иза того что капча недоделанная слегка там еще. а функцию включали иза этого только. выключите капчу либо засуньте туда пару идов мобов и не будут лагать.
 
1. Не нужно HighME приписывать, он ничего не сделал по сборке толком. Исход дал ему раст, конфиги пилил раст.
А High только толкает лохам исходы которые я расшарил.
2. Зависание мобов о котором ты говоришь фиксится в ядре методом (не скажу).
Умные ребята которые понимают из за чего идет зависание уже давно пофиксили.

А по поводу выбора. Нет смысла выбирать. Что там что там море работы.

Да и добавлю:
Я хоти и пилю свой товар на некстгене, но всегда признаю что он кал ибо это сплошной костыль.
А знаешь как пилю? Пихаю костыли в костыль. Вот такие дела.
Но что то они сделали в rev 14, дошли по веб архиву до 6800+ ревы.
 
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
Вы что под бутератом?)
Какие капчи, какие иды?
Суть бага в том что при нанесении последнего удара low мобам они зависают с 0 хп и добить можно только скилом. Правится это в ядре а не методом каких то капч.

По поводу р2кор и их фиксы:

Сбоока мусор так как убогий не только код на и дроп и статы с хф и т.д. Все что было сделано это конфиги и небольшие правки в дп.
Весь фикс лист есть на шмакси в описании 14 ветки (это фиксы с 1-14 ветку) половина из них выдуманы. К тому же за основу взята шаровая ветка некстгена 2012 года. Лучше уже что то опускать или брать лавео.


По поводу положить сервер:
Да она есть. Как и дюпы. Но имея голову на плечах, все это фиксится но не за один час.
 
Я 4 года помалкивал, не хотел показывать свой скил в этом деле, но решил таки выложить, чтобы люди могли использовать javolution без утечек памяти
Javolution 5.5.1 Fix
Умников много, а фиксить пришлось мне.
1 но - зачем его вообще использовать? Если оно уже реально устарело.
 
Вы что под бутератом?)
Какие капчи, какие иды?
Суть бага в том что при нанесении последнего удара low мобам они зависают с 0 хп и добить можно только скилом. Правится это в ядре а не методом каких то капч.

По поводу р2кор и их фиксы:

Сбоока мусор так как убогий не только код на и дроп и статы с хф и т.д. Все что было сделано это конфиги и небольшие правки в дп.
Весь фикс лист есть на шмакси в описании 14 ветки (это фиксы с 1-14 ветку) половина из них выдуманы. К тому же за основу взята шаровая ветка некстгена 2012 года. Лучше уже что то опускать или брать лавео.


По поводу положить сервер:
Да она есть. Как и дюпы. Но имея голову на плечах, все это фиксится но не за один час.
И самый их интересный файлик + еще куча говна.
 

Вложения

  • L2System.java.txt
    1,6 КБ · Просмотры: 61
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
1 но - зачем его вообще использовать? Если оно уже реально устарело.
Для хороших решений слово "устарело" не совсем к месту. К примеру л2 ИЛ тоже вроде "устарело", но расскажи это куче школьников запускающих л2 ИЛ, или игрокам.

Я выложил это для того, чтобы люди понимали для себя, что не javolution плохой, а плохому танцору яйца мешают. Куча умников с завышенным ЧСВ рассказывающих как они умеют бороться с утечками памяти - просто сказочники. Все говорили что Javolution говно (из тех кто вообще об этом говорил) - а я взял профилер, нашел утечки в Javolution и исправил и уже 4 года не знаю проблем с мапами, списками и прочей фигней с чем "борется" народ и дует по этому поводу щеки в своей значимости.

Javolution так и остается надежным и достаточно быстрым инструментом для safe- мап и списков, конечно когда исправлены утечки памяти. Кто думает, что он умнее других - сначала научитесь использовать то то у вас есть под рукой, не выдумывая всяких "велосипедов".
 
Ok


И учитывая текущую ситуацию с явкой на сегодняшний день javolution использовать не айс.
 
  • Мне нравится
Реакции: GenCloud

    GenCloud

    Баллов: 8
    Без комментариев
Ok


И учитывая текущую ситуацию с явкой на сегодняшний день javolution использовать не айс.
Тоже потоконезависимая мапа? Или к чему это, ты что-то конкретное имеешь ввиду или просто так, типа умен?
По отношению к чему использовать не айс?
 
Я так понимаю ты досихпор на 6,7 яве?
 
Назад
Сверху Снизу