Jump to content
  • 0

need fix change weapon to weapon bug atk spd


Question

Posted (edited)

 

Hi people,add these two codes, but my problem is as follows, he could fix the error of atk spd. It only appears when changing from weapon to weapon, for example the bow is equipped, they attack, and they change to a blade and the bug is executed. What I need is that when there is a weapon exchange, it has a certain hit delay.I have flood protector for movements,only this bug remains.I use jfrozen.



useitem.java

//Eliminando Bug Attack Speed
            if (item.isEquipped())
            {
                activeChar.abortAttack();
                //AGREGAR UN DELAY QUE FUNCIONE
            }
            //Eliminado Bug de Attack Speed
            if (activeChar.isAttackingNow())
            {
              return;
            }

Edited by guishermo15

1 answer to this question

Recommended Posts

  • 0
Posted (edited)

Regular L2J / retail way is to delay the item equip. Simply add it, it's already implemented on L2J. Search for "ThreadPool", you would eventually found it on UseItem.

 

Instead of return when if (activeChar.isAttackingNow()) , you simply have to generate task to do the initial operation. Basically you queue the task of equipping the item.

Edited by Tryskell

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...