Jump to content
  • 0

L2jfrozen bug skills reuse coldown


Question

Posted

Hello, there is a simple bug with skill reuse time, when you use one skill with high time to reload, and you get like 3-99%, if you do restart or left game before skill get already 100% the time back to 0%, someone know how to fix this? Thanks

 

Video from bug: 

 

 

1 answer to this question

Recommended Posts

  • 0
Posted
/**
			 * Restore Type 1 The remaning skills lost effect upon logout but were still under a high reuse delay.
			 */
			statement = con.prepareStatement(RESTORE_SKILL_SAVE);
			statement.setInt(1, getObjectId());
			statement.setInt(2, getClassIndex());
			statement.setInt(3, 1);
			rset = statement.executeQuery();
			
			while (rset.next())
			{
				final int skillId = rset.getInt("skill_id");
				final int skillLvl = rset.getInt("skill_level");
				final long reuseDelay = rset.getLong("reuse_delay");
				final long systime = rset.getLong("systime");

				if (reuseDelay <= 0)
				{
					continue;
				}
				
				final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLvl);
				
				if (skill == null)
					continue;
				final long remainingTime = systime - System.currentTimeMillis();
			++	if (remainingTime > 10)
			++	{
				disableSkill(skill, remainingTime);
				addTimeStamp(skill, reuseDelay, systime);
			++	}
			}

this if condition if (remainingTime > 10) helped me with this bug, idk why,

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..