A Project for Chronicle 4 based on L2JServer.


    Sounds of critical aren't working on blow attacks

    Share
    avatar
    WilliamFS

    Posts : 55
    Join date : 2013-08-17
    Age : 30
    Location : São Paulo - Brazil

    Sounds of critical aren't working on blow attacks

    Post  WilliamFS on 12th April 2016, 08:42

    Hi, all the projects that I see have the same bug, expect the server from my example:



    Any idea how to fix?
    avatar
    Karakan

    Posts : 425
    Join date : 2013-10-04

    Re: Sounds of critical aren't working on blow attacks

    Post  Karakan on 12th April 2016, 13:57

    Seems that Packet is send from Client, but none have implemented it yet.

    L2j Forum topic about that packet




    There is also a way to link the critical sound directly ,but thats a bad idea.


    Example : (in Blow.java)

    activeChar.sendPacket(new PlaySound("skillsound.critical_hit_02"));
    avatar
    WilliamFS

    Posts : 55
    Join date : 2013-08-17
    Age : 30
    Location : São Paulo - Brazil

    Re: Sounds of critical aren't working on blow attacks

    Post  WilliamFS on 12th April 2016, 14:55

    Karakan wrote:Seems that Packet is send from Client, but none have implemented it yet.

    L2j Forum topic about that packet




    There is also a way to link the critical sound directly ,but thats a bad idea.


    Example : (in Blow.java)

    activeChar.sendPacket(new PlaySound("skillsound.critical_hit_02"));

    Seems that's hard to fix, maybe the server from my example used "the bad ideia" Sad

    Edit: Why is a bad ideia?
    avatar
    Karakan

    Posts : 425
    Join date : 2013-10-04

    Re: Sounds of critical aren't working on blow attacks

    Post  Karakan on 12th April 2016, 15:13

    I think traffic wise its better to use those given Packets.
    At least for more crowded servers.
    avatar
    Karakan

    Posts : 425
    Join date : 2013-10-04

    Re: Sounds of critical aren't working on blow attacks

    Post  Karakan on 13th April 2016, 14:42

    Here is the implementation if you wanna use it.



    gameserver\handler\skillhandlers\Blow.java



    Code:
                   if (activeChar instanceof L2PcInstance)

                    {
                        if (((L2PcInstance)activeChar).isInOlympiadMode() && target instanceof L2PcInstance)
                            ((L2PcInstance)activeChar).dmgDealt += damage;

                        activeChar.sendPacket(new SystemMessage(SystemMessage.CRITICAL_HIT));
                        SystemMessage sm = new SystemMessage(SystemMessage.YOU_DID_S1_DMG);
                        sm.addNumber((int)damage);
                        activeChar.sendPacket(sm);
    +                   activeChar.sendPacket(new PlaySound("skillsound.critical_hit_02"));
                    }

                }
    avatar
    WilliamFS

    Posts : 55
    Join date : 2013-08-17
    Age : 30
    Location : São Paulo - Brazil

    Re: Sounds of critical aren't working on blow attacks

    Post  WilliamFS on 13th April 2016, 15:55

    Karakan wrote:Here is the implementation if you wanna use it.



    Spoiler:
    gameserver\handler\skillhandlers\Blow.java



    Code:
                   if (activeChar instanceof L2PcInstance)

                    {
                        if (((L2PcInstance)activeChar).isInOlympiadMode() && target instanceof L2PcInstance)
                            ((L2PcInstance)activeChar).dmgDealt += damage;

                        activeChar.sendPacket(new SystemMessage(SystemMessage.CRITICAL_HIT));
                        SystemMessage sm = new SystemMessage(SystemMessage.YOU_DID_S1_DMG);
                        sm.addNumber((int)damage);
                        activeChar.sendPacket(sm);
    +                   activeChar.sendPacket(new PlaySound("skillsound.critical_hit_02"));
                    }

                }


    I'll use that for now, thank you bro cheers
    avatar
    Karakan

    Posts : 425
    Join date : 2013-10-04

    Re: Sounds of critical aren't working on blow attacks

    Post  Karakan on 13th April 2016, 19:01

    Your welcome! Smile

    The critical sound may be delayed sometimes.
    Ill try to implement it in a better way, when ive some time.
    avatar
    DnR
    Admin
    Admin

    Posts : 1027
    Join date : 2012-12-03

    Re: Sounds of critical aren't working on blow attacks

    Post  DnR on 13th April 2016, 20:31

    This issue has been discussed in L2J forums long ago.
    Sound isn't applied to the skill, because some values are missing from MagicSkillUse packet.
    The reporter of the problem and founder of those missing values was Tryskell, who actually gave the fix to L2J but it was never adapted.
    I'm going to correct the values among the next commits. Smile
    avatar
    WilliamFS

    Posts : 55
    Join date : 2013-08-17
    Age : 30
    Location : São Paulo - Brazil

    Re: Sounds of critical aren't working on blow attacks

    Post  WilliamFS on 20th April 2016, 03:42

    DnR wrote:This issue has been discussed in L2J forums long ago.
    Sound isn't applied to the skill, because some values are missing from MagicSkillUse packet.
    The reporter of the problem and founder of those missing values was Tryskell, who actually gave the fix to L2J but it was never adapted.
    I'm going to correct the values among the next commits. Smile


    You is my hero! @.@

    Sponsored content

    Re: Sounds of critical aren't working on blow attacks

    Post  Sponsored content


      Current date/time is 20th October 2017, 09:57