Skip to content

Wrong calculation of the PrecastSkill.duration  #428

@milnapangel

Description

@milnapangel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions