aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-09-15 15:06:55 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-09-15 15:06:55 +0200
commit24df15dbbb4967a96c6b3be4376f64be6126b686 (patch)
treec15522966b83f27decd7f2f4b7337f4acdc1f330 /src
parent440eac287eaad072e1cb1261dfe2cf1bcb9922b0 (diff)
downloadevtclib-24df15dbbb4967a96c6b3be4376f64be6126b686.tar.gz
evtclib-24df15dbbb4967a96c6b3be4376f64be6126b686.tar.bz2
evtclib-24df15dbbb4967a96c6b3be4376f64be6126b686.zip
fix logs with Claw of the Fallen ID
Diffstat (limited to 'src')
-rw-r--r--src/gamedata.rs11
-rw-r--r--src/lib.rs11
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}")]
diff --git a/src/lib.rs b/src/lib.rs
index c9f1ec1..babfc34 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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)
}