пакет L2 Underground

Zerox

Выдающийся
Местный
Сообщения
59
Розыгрыши
0
Репутация
120
Реакции
89
Баллы
1 350
someone can help me with packages for L2 Underground? I have problems with the new system from Enchant and the auto soulshots system, I adapt from L2J packets but did not work could help me, please?

If this post is not here I move it to the appropriate category and sorry
 
Последнее редактирование:
English pls...
 
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
Помогите сделать новые системы в Андеграунде: Система заточки, Авто включение сосок, награды за лвл Ап (квесты\инсты... от себя добавил)) - тип этого
 
not all only Enchant System and autosoulshots in IO i have problem with that packets

That is my code from packets ingame bug skill when enchanted its correct packet?
public class ExEnchantSkillInfoPacket extends L2GameServerPacket
{
private final List<Integer> _routes;
private final int _id;
private final int _level;
private final int _maxlvl;
private int _canAdd;
private int canDecrease;

public ExEnchantSkillInfoPacket(final int id, final int level)
{
_routes = new ArrayList<>();
_id = id;
_level = level;
_maxlvl = SkillHolder.getInstance().getMaxLevel(_id, _level);
if (SkillUtils.isEnchantedSkill(_level))
{
canDecrease = 1;
final Skill skill = SkillHolder.getInstance().getSkill(_id, _level + 1);
if (skill != null)
{
addEnchantSkillDetail(skill.getLevel());
_canAdd = 1;
}
for (final Skill temp : SkillUtils.getSkillsForChangeEnchant(_id, _level))
{
addEnchantSkillDetail(temp.getLevel());
}
}
else
{
for (final Skill temp2 : SkillUtils.getSkillsForFirstEnchant(_id))
{
addEnchantSkillDetail(temp2.getLevel());
_canAdd = 1;
}
}
}

public void addEnchantSkillDetail(final int level)
{
_routes.add(level);
}

@Override
protected void writeImpl()
{
writeD(_id);
if (_level < 100)
{
writeD(_level);
}
else
{
writeH(_maxlvl);
writeH(_level);
}
writeD(_canAdd);
writeD(canDecrease);
writeD(_routes.size());
for (int level : _routes)
{
writeH(_maxlvl);
writeH(level);
}
}
}

public class ExEnchantSkillInfoDetailPacket extends L2GameServerPacket
{
private final int _type;
private final int _skillId;
private final int _skillLvl;
private final int _maxlvl;
private final int _sp;
private final int _chance;
private final int _bookId;
private final int _bookCount;
private final int _adenaId;
private final int _adenaCount;

public ExEnchantSkillInfoDetailPacket(final int type, final int skillId, final int skillLvl, final int sp, final int chance, final int bookId, final int bookCount, final int adenaCount)
{
_type = type;
_skillId = skillId;
_skillLvl = skillLvl;
_maxlvl = SkillHolder.getInstance().getMaxLevel(_skillId, _skillLvl);
_sp = sp;
_chance = chance;
_bookId = bookId;
_bookCount = bookCount;
_adenaId = 57;
_adenaCount = adenaCount;

}

@Override
protected void writeImpl()
{
writeD(_type);
writeD(_skillId);
writeH(_maxlvl);
writeH(_skillLvl);
writeQ(_sp);
writeD(_chance);
writeD(0x02);
writeD(_adenaId);
writeD(_adenaCount);
writeD(_bookId);
writeD(_bookCount);
}
}

nothing? help me ....
 
Код:
public class ExEnchantSkillInfoPacket extends L2GameServerPacket
{
    private List<Integer> _routes;

    private int _id, _level, _canAdd, canDecrease;

    public ExEnchantSkillInfoPacket(int id, int level)
    {
        _routes = new ArrayList<Integer>();
        _id = id;
        _level = level;

        // skill already enchanted?
        if(_level > 100)
        {
            canDecrease = 1;
            // get detail for next level
            EnchantSkillLearn esd = SkillTreeTable.getSkillEnchant(_id, _level + 1);

            // if it exists add it
            if(esd != null)
            {
                addEnchantSkillDetail(esd.getLevel());
                _canAdd = 1;
            }

            for(EnchantSkillLearn el : SkillTreeTable.getEnchantsForChange(_id, _level))
                addEnchantSkillDetail(el.getLevel());
        }
        else
            // not already enchanted
            for(EnchantSkillLearn esd : SkillTreeTable.getFirstEnchantsForSkill(_id))
            {
                addEnchantSkillDetail(esd.getLevel());
                _canAdd = 1;
            }
    }

    public void addEnchantSkillDetail(int level)
    {
        _routes.add(level);
    }

    @Override
    protected void writeImpl()
    {
        writeD(_id);
        writeD(_level);
        writeD(_canAdd); // can add enchant
        writeD(canDecrease); // can decrease enchant

        writeD(_routes.size());
        for(Integer route : _routes)
            writeD(route);
    }
}
Код:
public class ExEnchantSkillInfoDetailPacket extends L2GameServerPacket
{
    private final int _unk = 0;
    private final int _skillId;
    private final int _skillLvl;
    private final int _sp;
    private final int _chance;
    private final int _bookId, _bookCount, _adenaCount;

    public ExEnchantSkillInfoDetailPacket(int skillId, int skillLvl, int sp, int chance, int bookId, int bookCount, int adenaCount)
    {
        _skillId = skillId;
        _skillLvl = skillLvl;
        _sp = sp;
        _chance = chance;
        _bookId = bookId;
        _bookCount = bookCount;
        _adenaCount = adenaCount;
    }

    @Override
    protected void writeImpl()
    {
        writeD(_unk); // ?
        writeD(_skillId);
        writeD(_skillLvl);
        writeD(_sp);
        writeD(_chance);

        writeD(2);
        writeD(57); // adena
        writeD(_adenaCount); // adena count ?

        writeD(_bookId); // book
        writeD(_bookCount); // book count
    }
}
 
Назад
Сверху Снизу