From 5087460cca63ccb7863057ee8219e7f659736984 Mon Sep 17 00:00:00 2001 From: gered Date: Wed, 6 Apr 2016 16:35:43 -0400 Subject: [PATCH] fix entity alive time calculation to account for resurrections better --- vwowrla.core/src/vwowrla/core/encounters/analysis.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vwowrla.core/src/vwowrla/core/encounters/analysis.clj b/vwowrla.core/src/vwowrla/core/encounters/analysis.clj index b2b9d89..bd9155f 100644 --- a/vwowrla.core/src/vwowrla/core/encounters/analysis.clj +++ b/vwowrla.core/src/vwowrla/core/encounters/analysis.clj @@ -74,8 +74,11 @@ :from at) ; first state change we find is a death - (and (nil? current-status) - (= :dead status)) + ; OR, this is a death after one or more previous state changes and they were alive up til now + (or (and (nil? current-status) + (= :dead status)) + (and (= :alive current-status) + (= :dead status))) (assoc result :current-status :dead :from at