From 2fe671951369b8f049e8acf02e9e9750c96b4dcd Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 13 Jun 2018 13:17:28 +0200 Subject: clean up a bit --- src/event.rs | 67 ------------------------------------------------------------ 1 file changed, 67 deletions(-) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index f87688e..02f4686 100644 --- a/src/event.rs +++ b/src/event.rs @@ -104,73 +104,6 @@ pub enum EventKind { }, } -impl EventKind { - /// Returns the source agent address for this event, if one exists. - pub fn source_agent_addr(&self) -> Option { - use EventKind::*; - match *self { - EnterCombat { agent_addr, .. } => return Some(agent_addr), - ExitCombat { agent_addr } => return Some(agent_addr), - ChangeUp { agent_addr } => return Some(agent_addr), - ChangeDown { agent_addr } => return Some(agent_addr), - ChangeDead { agent_addr } => return Some(agent_addr), - Spawn { agent_addr } => return Some(agent_addr), - Despawn { agent_addr } => return Some(agent_addr), - HealthUpdate { agent_addr, .. } => return Some(agent_addr), - WeaponSwap { agent_addr, .. } => return Some(agent_addr), - MaxHealthUpdate { agent_addr, .. } => return Some(agent_addr), - PointOfView { agent_addr } => return Some(agent_addr), - SkillUse { - source_agent_addr, .. - } => return Some(source_agent_addr), - ConditionTick { - source_agent_addr, .. - } => return Some(source_agent_addr), - InvulnTick { - source_agent_addr, .. - } => return Some(source_agent_addr), - Physical { - source_agent_addr, .. - } => return Some(source_agent_addr), - BuffApplication { - source_agent_addr, .. - } => return Some(source_agent_addr), - BuffRemove { - source_agent_addr, .. - } => return Some(source_agent_addr), - _ => return None, - } - } - - /// Returns the destination agent address for this event, if one exists. - pub fn destination_agent_addr(&self) -> Option { - use EventKind::*; - match *self { - ConditionTick { - destination_agent_addr, - .. - } => return Some(destination_agent_addr), - InvulnTick { - destination_agent_addr, - .. - } => return Some(destination_agent_addr), - Physical { - destination_agent_addr, - .. - } => return Some(destination_agent_addr), - BuffApplication { - destination_agent_addr, - .. - } => return Some(destination_agent_addr), - BuffRemove { - destination_agent_addr, - .. - } => return Some(destination_agent_addr), - _ => return None, - } - } -} - /// A higher-level representation of a combat event. #[derive(Clone, Debug, PartialEq, Eq)] pub struct Event { -- cgit v1.2.3