diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gamedata.rs | 11 | ||||
-rw-r--r-- | src/lib.rs | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/gamedata.rs b/src/gamedata.rs index 5e83167..775cf30 100644 --- a/src/gamedata.rs +++ b/src/gamedata.rs @@ -63,6 +63,12 @@ pub enum Boss { // Strike missions IcebroodConstruct = 0x568A, + /// This is the ID of the Voice of the Fallen. + /// + /// The strike mission itself contains two bosses, the Voice of the Fallen and the Claw of the + /// Fallen. Consider using either [`VOICE_OF_THE_FALLEN_ID`][VOICE_OF_THE_FALLEN_ID] or + /// [`CLAW_OF_THE_FALLEN_ID`][CLAW_OF_THE_FALLEN_ID] if you refer to one of those bosses + /// specifically. VoiceOfTheFallen = 0x5747, FraenirOfJormag = 0x57DC, Boneskinner = 0x57F9, @@ -176,6 +182,11 @@ pub const NIKARE_ID: u16 = Boss::LargosTwins as u16; /// The ID of Kenut in the Twin Largos fight. pub const KENUT_ID: u16 = 21089; +/// The ID of the Voice of the Fallen. +pub const VOICE_OF_THE_FALLEN_ID: u16 = Boss::VoiceOfTheFallen as u16; +/// The ID of the Claw of the Fallen. +pub const CLAW_OF_THE_FALLEN_ID: u16 = 22481; + /// Error for when converting a string to a profession fails. #[derive(Debug, Clone, PartialEq, Eq, Hash, Error)] #[error("Invalid profession identifier: {0}")] @@ -762,6 +762,11 @@ impl Log { vec![self.boss_id, gamedata::XERA_PHASE2_ID] } else if self.boss_id == Boss::LargosTwins as u16 { vec![gamedata::NIKARE_ID, gamedata::KENUT_ID] + } else if self.encounter() == Some(Boss::VoiceOfTheFallen) { + vec![ + gamedata::VOICE_OF_THE_FALLEN_ID, + gamedata::CLAW_OF_THE_FALLEN_ID, + ] } else { vec![self.boss_id] }; @@ -789,6 +794,12 @@ impl Log { /// if we know about it in [`Boss`][Boss]. #[inline] pub fn encounter(&self) -> Option<Boss> { + // Sometimes, encounters of the strike mission "Voice of the Fallen and Claw of the Fallen" + // are saved with the ID of the Claw and sometimes with the Voice. Therefore, we need to + // unify those cases. + if self.boss_id == gamedata::CLAW_OF_THE_FALLEN_ID { + return Some(Boss::VoiceOfTheFallen); + } Boss::from_u16(self.boss_id) } |