Рейтинг темы:
  • 2 Голос(ов) - 5 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Работа над Goddess of Destruction (part 6)
I'm just having a problem with this packet.
RequestAcquireAbilityList.

Код:
public class RequestAcquireAbilityList extends L2GameClientPacket
{
    private int count1;
    private int count2;
    private int skillId;
    private int skillLvl;
    private int unk1;
    private int unk2;

    @Override
    protected void readImpl()
    {
        L2PcInstance activeChar = getClient().getActiveChar();
        if(activeChar == null)
        {
            return;
        }
        count1 = readD();
        count2 = readD();

        if(count2 == 1)
        {
            for(int i = 0; i < 2; i++)
            {
                skillId = readD();
                skillLvl = readD();
                activeChar.addAbility(skillId, skillLvl);
                _log.log(Level.DEBUG, "count = " + count1 + " count2 = " + count1 + "skillId = " + skillId + "skillLvl = " + skillLvl + "unk1 & 2 = " + unk1 + " " + unk2);
            }
        }
        else
        {
            for(int i = 0; i < count2; i++)
            {
                skillId = readD();
                skillLvl = readD();
                activeChar.addAbility(skillId, skillLvl);
                _log.log(Level.DEBUG, "count = " + count1 + " count2 = " + count1 + "skillId = " + skillId + "skillLvl = " + skillLvl + "unk1 & 2 = " + unk1 + " " + unk2);
            }
        }
    }

    @Override
    protected void runImpl()
    {
        L2PcInstance activeChar = getClient().getActiveChar();
        if(activeChar == null)
        {
            return;
        }

        if(activeChar.getOlympiadController().isPlayingNow())
        {
            return;
        }

        activeChar.addAbilityPoints(count2);
        activeChar.addAbility(skillId, skillLvl);
        activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
    }

    @Override
    public String getType()
    {
        return getClass().getSimpleName();
    }
}
tuningxtreme Написал:I'm just having a problem with this packet.
RequestAcquireAbilityList.

Код:
public class RequestAcquireAbilityList extends L2GameClientPacket
{
    private int count1;
    private int count2;
    private int skillId;
    private int skillLvl;
    private int unk1;
    private int unk2;

    @Override
    protected void readImpl()
    {
        L2PcInstance activeChar = getClient().getActiveChar();
        if(activeChar == null)
        {
            return;
        }
        count1 = readD();
        count2 = readD();

        if(count2 == 1)
        {
            for(int i = 0; i < 2; i++)
            {
                skillId = readD();
                skillLvl = readD();
                activeChar.addAbility(skillId, skillLvl);
                _log.log(Level.DEBUG, "count = " + count1 + " count2 = " + count1 + "skillId = " + skillId + "skillLvl = " + skillLvl + "unk1 & 2 = " + unk1 + " " + unk2);
            }
        }
        else
        {
            for(int i = 0; i < count2; i++)
            {
                skillId = readD();
                skillLvl = readD();
                activeChar.addAbility(skillId, skillLvl);
                _log.log(Level.DEBUG, "count = " + count1 + " count2 = " + count1 + "skillId = " + skillId + "skillLvl = " + skillLvl + "unk1 & 2 = " + unk1 + " " + unk2);
            }
        }
    }

    @Override
    protected void runImpl()
    {
        L2PcInstance activeChar = getClient().getActiveChar();
        if(activeChar == null)
        {
            return;
        }

        if(activeChar.getOlympiadController().isPlayingNow())
        {
            return;
        }

        activeChar.addAbilityPoints(count2);
        activeChar.addAbility(skillId, skillLvl);
        activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
    }

    @Override
    public String getType()
    {
        return getClass().getSimpleName();
    }
}
What a problem? Explain pls
elastic Написал:What a problem? Explain pls

The points are ok, all ok, however I can not save in db.
tuningxtreme Написал:The points are ok, all ok, however I can not save in db.
Man, you can do this very easy obviously... Its not a serious problem i think
tuningxtreme Написал:I'm just having a problem with this packet.
RequestAcquireAbilityList.

Код:
public class RequestAcquireAbilityList extends L2GameClientPacket
{
    private int count1;
    private int count2;
    private int skillId;
    private int skillLvl;
    private int unk1;
    private int unk2;

    @Override
    protected void readImpl()
    {
        L2PcInstance activeChar = getClient().getActiveChar();
        if(activeChar == null)
        {
            return;
        }
        count1 = readD();
        count2 = readD();

        if(count2 == 1)
        {
            for(int i = 0; i < 2; i++)
            {
                skillId = readD();
                skillLvl = readD();
                activeChar.addAbility(skillId, skillLvl);
                _log.log(Level.DEBUG, "count = " + count1 + " count2 = " + count1 + "skillId = " + skillId + "skillLvl = " + skillLvl + "unk1 & 2 = " + unk1 + " " + unk2);
            }
        }
        else
        {
            for(int i = 0; i < count2; i++)
            {
                skillId = readD();
                skillLvl = readD();
                activeChar.addAbility(skillId, skillLvl);
                _log.log(Level.DEBUG, "count = " + count1 + " count2 = " + count1 + "skillId = " + skillId + "skillLvl = " + skillLvl + "unk1 & 2 = " + unk1 + " " + unk2);
            }
        }
    }

    @Override
    protected void runImpl()
    {
        L2PcInstance activeChar = getClient().getActiveChar();
        if(activeChar == null)
        {
            return;
        }

        if(activeChar.getOlympiadController().isPlayingNow())
        {
            return;
        }

        activeChar.addAbilityPoints(count2);
        activeChar.addAbility(skillId, skillLvl);
        activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
    }

    @Override
    public String getType()
    {
        return getClass().getSimpleName();
    }
}

RequestAcquireAbilityList

Working packet, it is necessary to add the pair of verifications.
Mifesto Написал:
RequestAcquireAbilityList

Working packet, it is necessary to add the pair of verifications.
Thanks brother, I'll work now.
elastic Написал:Уважаемые! Объясните мне, пожалуйста, как работает это зловредное поле в панели новых абилок? Вроде описание читал к системе, какими только способами не реализовывал отображение оставшихся очков - получается ерунда... В моем самом первом варианте все было более-менее, но когда расходуешь последнее очко, то оно либо не расходуется вовсе, либо значение уходит в минус. А еще заметил явление, что поле с остатком очков отображает значение с противоположным знаком. Скрин ниже:
Скрин
Кто-нибудь может прояснить ситуацию?

Я лох, нашел ошибку. :pandaredlol:

Hello Elastik,

im right now at the same part/error... how did you fixed that shitty thingy? Tongue

Thanks in advance...
jalemao Написал:Hello Elastik,

im right now at the same part/error... how did you fixed that shitty thingy? Tongue

Thanks in advance...
Oh, this thing is so stupid:redlol:
This field shows how many points you can use after skill learn.
For example:
Код:
public int getUsedAcquirePoints()
    {
        int consume = 0;
        for(Skill skill : getAllSkills())
        {
            if(skill.getAcquirePointsConsumeMulLevel() > 0)
            {
                consume += skill.getAcquirePointsConsumeMulLevel();
            }
        }
        return consume;
    }
Client automatically calculates a final count of points. Just send this info in ExAcquireAPSkillList, it should be ok
elastic Написал:Oh, this thing is so stupid:redlol:
This field shows how many points you can use after skill learn.
For example:
Код:
public int getUsedAcquirePoints()
    {
        int consume = 0;
        for(Skill skill : getAllSkills())
        {
            if(skill.getAcquirePointsConsumeMulLevel() > 0)
            {
                consume += skill.getAcquirePointsConsumeMulLevel();
            }
        }
        return consume;
    }
Client automatically calculates a final count of points. Just send this info in ExAcquireAPSkillList, it should be ok

OMG rly? and i tryd to make a F**** calc for all that hahahah Smile ty mate

Edit :
How did you got : getAcquirePointsConsumeMulLevel?
jalemao Написал:OMG rly? and i tryd to make a F**** calc for all that hahahah Smile ty mate

Edit :
How did you got : getAcquirePointsConsumeMulLevel?
This method returns "skill points consume * skill_learned_level" as i remember, the first idea which came to my head, but it works :redlol:


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Работа над Goddess of Destruction (part 7) n3k0nation 459 174,279 03-21-2022, 04:21 PM
Последний пост: TieLay
  Помогите с Сервером L2Dream версии 439 для Lineage 2 Gracia Part 2 CAHTEX 4 3,380 10-01-2021, 02:40 PM
Последний пост: tenor
  Работа с камерой и Энтер чат FriendlyGhost 0 1,301 04-29-2018, 06:07 AM
Последний пост: FriendlyGhost
  Goddess of Destruction ( новая ветка от NcSoft ) Bacek 180 59,007 08-22-2017, 12:32 PM
Последний пост: BadStealth
  EmuRT Gracia part 2 ? knaif 3 1,622 02-08-2016, 01:19 PM
Последний пост: knaif
  Gracia Part 1 от l2emu исходы TFH 6 1,964 10-05-2015, 07:53 PM
Последний пост: G1ta0
  Ищу исходы L2-Dream gracia part 2 knaif 1 1,385 10-05-2015, 07:51 PM
Последний пост: G1ta0
  Оплачиваемая работа Grek1993 1 1,349 08-01-2015, 11:29 AM
Последний пост: ztaecz
  Работа с мультиселлом Evencelance 11 2,446 09-19-2014, 12:43 PM
Последний пост: Evencelance
  Работа над Goddess of Destruction (part 5) Ozzy 980 339,160 10-09-2013, 09:13 AM
Последний пост: Ashe

Перейти к форуму:


Пользователи, просматривающие эту тему: 8 Гость(ей)