diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-18 04:19:34 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-18 04:19:34 +0100 |
commit | 937e1ed8d240c1a5b42f5b8cf1104321b9d79c4a (patch) | |
tree | c9cc6f8ec35e3e9b1ba97b5fd42091cf0ab2afb6 /src/shared/cooldown.rs | |
parent | ab675360c0005718a3c9b8b5e7962af897269c04 (diff) |
fix: fix abilities selecting the right cooldown
Diffstat (limited to 'src/shared/cooldown.rs')
-rw-r--r-- | src/shared/cooldown.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/shared/cooldown.rs b/src/shared/cooldown.rs index f27d7fc..2d6b6ae 100644 --- a/src/shared/cooldown.rs +++ b/src/shared/cooldown.rs @@ -5,13 +5,12 @@ use serde::Serialize; use std::default::Default; #[derive(Component, Message, Serialize, Deserialize, Clone, Copy, PartialEq, Debug, Default)] -pub struct Cooldown { - pub a_cooldown: Duration, - pub q_cooldown: Duration, - pub w_cooldown: Duration, - pub e_cooldown: Duration, - pub r_cooldown: Duration, - pub d_cooldown: Duration, - pub f_cooldown: Duration, - pub g_cooldown: Duration, +pub struct Cooldown(pub [Duration; 7]); + +pub struct BaseCooldown(pub [Duration; 7]); + +impl BaseCooldown { + pub fn from_champion(_champion: Champion) -> Self { + BaseCooldown([1., 5., 5., 10., 25., 50., 50.].map(Duration::from_secs_f32)) + } } |