Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong calculation of the PrecastSkill.duration #428

Open
milnapangel opened this issue Jan 14, 2025 · 0 comments
Open

Wrong calculation of the PrecastSkill.duration #428

milnapangel opened this issue Jan 14, 2025 · 0 comments

Comments

@milnapangel
Copy link

At the very first time of calculating PrecastSkill.duration in remaining function.
It should be switched to proper hand before calculate.
But due to calculation happens in remaining function which is before weaponswitch, sometimes duration was wrong specially for CTA.
For me. I just commented calculation in remaining function as below and it works fine to me because it will be calculated in precastCTA.

PrecastSkill.prototype.remaining = function () {
//if (!this.duration) {
// this.duration = Skill.getDuration(this.skillId);
//}
const pRemaining = 100 * (1 - (getTickCount() - this.lastCast) / this.duration);
return Math.max(0, Math.min(100, pRemaining));
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant