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,

  • Like 1

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...