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));
};
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));
};