fixed cooldown bug by filtering all resolved skills and checking for cd
This commit is contained in:
parent
a4b0fc0c4f
commit
2cac373afe
@ -508,15 +508,13 @@ impl Game {
|
|||||||
// only reduce cooldowns if no cd was used
|
// only reduce cooldowns if no cd was used
|
||||||
// have to borrow self for the skill check
|
// have to borrow self for the skill check
|
||||||
{
|
{
|
||||||
if let Some(skill) = resolved.iter().find(|s| s.source_construct_id == construct.id) {
|
if let Some(skill) = resolved.iter()
|
||||||
if skill.used_cooldown() {
|
.filter(|s| s.source_construct_id == construct.id)
|
||||||
|
.find(|s| s.used_cooldown()) {
|
||||||
construct.skill_set_cd(skill.skill);
|
construct.skill_set_cd(skill.skill);
|
||||||
} else {
|
} else {
|
||||||
construct.reduce_cooldowns();
|
construct.reduce_cooldowns();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
construct.reduce_cooldowns();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// always reduce durations
|
// always reduce durations
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user