From 7b6d9242e4217c8229cb546de495cd2670b97f2d Mon Sep 17 00:00:00 2001
From: Alexander Foremny <aforemny@posteo.de>
Date: Tue, 19 Mar 2024 14:56:30 +0100
Subject: feat: render buffs in client

---
 src/shared/ability.rs | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/shared/ability.rs')

diff --git a/src/shared/ability.rs b/src/shared/ability.rs
index 2cd44c4..d88b63b 100644
--- a/src/shared/ability.rs
+++ b/src/shared/ability.rs
@@ -109,8 +109,8 @@ fn focus_activation(focus: Focus) -> ActivatedAbilityActivation {
                     let Ok(mut buffs) = buffses.get_mut(*entity_id) else {
                         return;
                     };
-                    buffs.haste = Some(Timer::from_seconds(focus.duration, TimerMode::Once));
-                    buffs.speed = Some(Timer::from_seconds(focus.duration, TimerMode::Once));
+                    buffs.haste = Some(focus.duration);
+                    buffs.speed = Some(focus.duration);
                 },
             )
         });
@@ -128,7 +128,7 @@ fn haste_activation(haste: Haste) -> ActivatedAbilityActivation {
                     let Ok(mut buffs) = buffses.get_mut(*entity_id) else {
                         return;
                     };
-                    buffs.haste = Some(Timer::from_seconds(haste.duration, TimerMode::Once));
+                    buffs.haste = Some(haste.duration);
                 },
             )
         });
@@ -152,7 +152,7 @@ fn shield_activation(shield: Shield) -> ActivatedAbilityActivation {
                         return;
                     };
                     health.shield = health.shield + shield.blocked_damage;
-                    buffs.shield = Some(Timer::from_seconds(shield.duration, TimerMode::Once));
+                    buffs.shield = Some(shield.duration);
                 },
             )
         });
@@ -170,7 +170,7 @@ fn speed_activation(speed: Speed) -> ActivatedAbilityActivation {
                     let Ok(mut buffs) = buffses.get_mut(*entity_id) else {
                         return;
                     };
-                    buffs.speed = Some(Timer::from_seconds(speed.duration, TimerMode::Once));
+                    buffs.speed = Some(speed.duration);
                 },
             )
         });
-- 
cgit v1.2.3