From 786f375dd7cdcc6a92e3c7f4b027826629cd9baf Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 10 Oct 2018 17:52:46 +0200 Subject: update to latest arcdps This comes with several changes: First, the revision header field is now properly parsed and saved, instead of just being hardcoded to zero. This is the first step in allowing newer log files to be parsed. To accommodate this, the Header struct has been extended with the "revision: u8" field. To be able to parse both formats, the CbtEvent struct has been changed. It is now the unification of both the new struct and the old struct, as the changes are pretty minor and mostly concern the parsing itself. The data types have been adjusted, and two fields have been added. Moving fields around does not concern CbtEvent at all. If the struct diverges more from this in the future, some splitting might be introduced, but for now, the change is pretty transparent to other code. During this process, the structs have lost their [repr(C]) property. It was never used, as the structs were not directly involved in C FFI. It has been a relic of the past from earlier iterations. Finally, the parsing function has been changed from parse_event to parse_event_rev0, with the addition of a parse_event_rev1. parse_events now takes the event parsing function as an additional parameter, and parse_file correctly choses the implementation based on the revision number. --- src/statistics/trackers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/statistics/trackers.rs') diff --git a/src/statistics/trackers.rs b/src/statistics/trackers.rs index 66a7bf8..98915d2 100644 --- a/src/statistics/trackers.rs +++ b/src/statistics/trackers.rs @@ -230,7 +230,7 @@ impl Tracker for CombatTimeTracker { /// boons defined in `evtclib::statistics::gamedata::BOONS`. pub struct BoonTracker { boon_logs: FnvHashMap, - boon_queues: FnvHashMap>, + boon_queues: FnvHashMap>, last_time: u64, } @@ -284,7 +284,7 @@ impl BoonTracker { /// /// * `agent_addr` - The address of the agent. /// * `buff_id` - The buff (or condition) id. - fn get_queue(&mut self, agent_addr: u64, buff_id: u16) -> Option<&mut BoonQueue> { + fn get_queue(&mut self, agent_addr: u64, buff_id: u32) -> Option<&mut BoonQueue> { use std::collections::hash_map::Entry; let entry = self .boon_queues -- cgit v1.2.3