use super::{combat::change_health, comms::broadcast_to_room};
#[double]
use crate::db::DBTrans;
use crate::{
models::{
effect::{Effect, EffectSet, EffectType},
item::Item,
task::{Task, TaskDetails, TaskMeta},
},
regular_tasks::{TaskHandler, TaskRunContext},
DResult,
};
use async_trait::async_trait;
use chrono::Utc;
use log::info;
use mockall_double::double;
use serde::{Deserialize, Serialize};
use std::collections::{BTreeMap, VecDeque};
use std::time;
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
pub struct DelayedHealthEffect {
magnitude: i64,
delay: u64,
message: String,
message_nonexp: String,
}
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
pub struct DelayedMessageEffect {
delay: u64,
message: String,
message_nonexp: String,
}
pub struct DelayedHealthTaskHandler;
#[async_trait]
impl TaskHandler for DelayedHealthTaskHandler {
async fn do_task(&self, ctx: &mut TaskRunContext) -> DResult