char_templates

Antarctica

Выдающийся
Участник
Сообщения
217
Розыгрыши
0
Решения
3
Репутация
22
Реакции
35
Баллы
1 345
Помещайте логи под сполер, либо в тег [code]
Хроники
  1. Chaotic Throne: High Five
Исходники
Присутствуют
Сборка
JTS
при создание чара выдает такую ошибку..
в чем может быть ошибка , приму любую подсказку ..

Код:
2021-03-07 05:13:59,250 ERROR o.m.g.n.l.c.L2GameClientPacket [ThreadPoolExecutor-3] - Client: AUTHED IP: 127.0.0.1 Account: cvbcvb - Failed running: [C] CharacterCreate - Server Version: ${build.revision}
java.lang.IndexOutOfBoundsException: Index: 7, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:657)
    at java.util.ArrayList.get(ArrayList.java:433)
    at org.mmocore.gameserver.object.components.player.template.PlayerTemplateComponent.getParameter(PlayerTemplateComponent.java:125)
    at org.mmocore.gameserver.object.Player.getCON(Player.java:8335)
    at org.mmocore.gameserver.model.base.BaseStats$5.calcBonus(BaseStats.java:96)
    at org.mmocore.gameserver.stats.StatFunctions$FuncMaxHpMul.calc(StatFunctions.java:562)
    at org.mmocore.gameserver.stats.Calculator.calc(Calculator.java:97)
    at org.mmocore.gameserver.object.Creature.calcStat(Creature.java:819)
    at org.mmocore.gameserver.object.Player.getMaxHp(Player.java:8403)
    at org.mmocore.gameserver.object.Creature.setCurrentHpMp(Creature.java:3351)
    at org.mmocore.gameserver.object.Creature.setCurrentHpMp(Creature.java:3385)
    at org.mmocore.gameserver.object.components.player.player_class.PlayerClassComponent.setActiveSubClass(PlayerClassComponent.java:266)
    at org.mmocore.gameserver.object.components.player.player_class.PlayerClassComponent.restoreCharSubClasses(PlayerClassComponent.java:359)
    at org.mmocore.gameserver.network.lineage.clientpackets.CharacterCreate.initNewChar(CharacterCreate.java:123)
    at org.mmocore.gameserver.network.lineage.clientpackets.CharacterCreate.runImpl(CharacterCreate.java:95)
    at org.mmocore.gameserver.network.lineage.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:43)
    at org.mmocore.commons.net.nio.impl.MMOExecutableQueue.run(MMOExecutableQueue.java:34)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at org.mmocore.commons.threading.PriorityThreadFactory$1.run(PriorityThreadFactory.java:29)
 
Последнее редактирование модератором:
А можно все ошибки с консоли? Такое может быть, когда не парсит файл data/pts_scripts/setting.txt, так как там не может быть 0 размер:

Java:
    @Override
    public void afterParsing()
    {
        super.afterParsing();
        // Создание базовых конструкторов
        // Человек-воин
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.human, ClassID.fighter, maximumStat.getFor(PlayerRace.human, false), recommendedStat.getFor(PlayerRace.human, ClassID.fighter), minimumStat.getFor(PlayerRace.human, false)));
        // Человек-маг
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.human, ClassID.mage, maximumStat.getFor(PlayerRace.human, true), recommendedStat.getFor(PlayerRace.human, ClassID.mage), minimumStat.getFor(PlayerRace.human, true)));
        // Светлый эльф-воин
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.elf, ClassID.elven_fighter, maximumStat.getFor(PlayerRace.elf, false), recommendedStat.getFor(PlayerRace.elf, ClassID.elven_fighter), minimumStat.getFor(PlayerRace.elf, false)));
        // Светлый эльф-маг
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.elf, ClassID.elven_mage, maximumStat.getFor(PlayerRace.elf, true), recommendedStat.getFor(PlayerRace.elf, ClassID.elven_mage), minimumStat.getFor(PlayerRace.elf, true)));
        // Темный эльф-воин
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.darkelf, ClassID.dark_fighter, maximumStat.getFor(PlayerRace.darkelf, false), recommendedStat.getFor(PlayerRace.darkelf, ClassID.dark_fighter), minimumStat.getFor(PlayerRace.darkelf, false)));
        // Темный эльф-маг
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.darkelf, ClassID.dark_mage, maximumStat.getFor(PlayerRace.darkelf, true), recommendedStat.getFor(PlayerRace.darkelf, ClassID.dark_mage), minimumStat.getFor(PlayerRace.darkelf, true)));
        // Орк-воин
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.orc, ClassID.orc_fighter, maximumStat.getFor(PlayerRace.orc, false), recommendedStat.getFor(PlayerRace.orc, ClassID.orc_fighter), minimumStat.getFor(PlayerRace.orc, false)));
        // Орк-маг
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.orc, ClassID.orc_mage, maximumStat.getFor(PlayerRace.orc, true), recommendedStat.getFor(PlayerRace.orc, ClassID.orc_mage), minimumStat.getFor(PlayerRace.orc, true)));
        // Гном
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.dwarf, ClassID.dwarven_fighter, maximumStat.getFor(PlayerRace.dwarf, false), recommendedStat.getFor(PlayerRace.dwarf, ClassID.dwarven_fighter), minimumStat.getFor(PlayerRace.dwarf, false)));
        // Кмаэль - мужчина
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.kamael, ClassID.kamael_m_soldier, maximumStat.getFor(PlayerRace.kamael, false), recommendedStat.getFor(PlayerRace.kamael, ClassID.kamael_m_soldier), minimumStat.getFor(PlayerRace.kamael, false)));
        // Кмаэль - женщина
        newPlayerBaseStats.add(new NewPlayerBaseStat(PlayerRace.kamael, ClassID.kamael_f_soldier, maximumStat.getFor(PlayerRace.kamael, true), recommendedStat.getFor(PlayerRace.kamael, ClassID.kamael_f_soldier), minimumStat.getFor(PlayerRace.kamael, true)));
    }

java.lang.IndexOutOfBoundsException: Index: 7, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.mmocore.gameserver.object.components.player.template.PlayerTemplateComponent.getParameter(PlayerTemplateComponent.java:125)

Java:
    /**
     * @return parsed parameter(INT, STR, DEX...etc)
     */
    public NewPlayerBaseStat getParameter()
    {
        if(getPlayer() == null)
        {
            if(Config.DEBUG)
            {
                LOGGER.error("Player is not found in references. Returned default value from BaseParameter template.");
            }
            return SettingHolder.getInstance().getNewPlayerBaseStats().get(0);
        }

        if(getPlayer().isTransformed() && getPlayer().getTransformationComponent().isBattleTransformation())
        {
            return TransformHolder.getInstance().getTransformBaseParameter(getPlayer().getTransformationComponent().getTransformation());
        }
        return SettingHolder.getInstance().getNewPlayerBaseStats().get(getPlayer().getPlayerClassComponent().getClassId().getPlayerClasses().ordinal());
    }
 
 
Назад
Сверху Снизу