feat(server): finish updating for 6.2
This commit is contained in:
parent
170f5f7b20
commit
5d92a6140f
|
@ -172,6 +172,7 @@ pub fn duty_name<'a>(duty_type: DutyType, category: DutyCategory, duty: u16, lan
|
|||
_ => {}
|
||||
}
|
||||
|
||||
eprintln!("unknown type/category/duty: {:?}/{:?}/{}", duty_type, category, duty);
|
||||
Cow::from(format!("{:?}", category))
|
||||
}
|
||||
|
||||
|
@ -196,6 +197,16 @@ mod old {
|
|||
high_end: false,
|
||||
content_kind: ContentKind::Trials,
|
||||
},
|
||||
83 => DutyInfo {
|
||||
name: LocalisedText {
|
||||
en: "The Steps of Faith",
|
||||
ja: "皇都イシュガルド防衛戦",
|
||||
de: "Der Schicksalsweg",
|
||||
fr: "Le Siège de la sainte Cité d'Ishgard",
|
||||
},
|
||||
high_end: false,
|
||||
content_kind: ContentKind::Trials,
|
||||
},
|
||||
143 => DutyInfo {
|
||||
name: LocalisedText {
|
||||
en: "The Feast (4 on 4 - Training)",
|
||||
|
@ -316,6 +327,16 @@ mod old {
|
|||
high_end: true,
|
||||
content_kind: ContentKind::Trials,
|
||||
},
|
||||
821 => DutyInfo {
|
||||
name: LocalisedText {
|
||||
en: "Ultima's Bane (Unreal)",
|
||||
ja: "幻アルテマウェポン破壊作戦",
|
||||
de: "Traumprüfung - Ultima",
|
||||
fr: "Le fléau d'Ultima (irréel)",
|
||||
},
|
||||
high_end: true,
|
||||
content_kind: ContentKind::Trials,
|
||||
},
|
||||
};
|
||||
|
||||
pub static ref OLD_ROULETTES: HashMap<u32, RouletteInfo> = maplit::hashmap! {
|
||||
|
|
|
@ -36,7 +36,7 @@ pub enum ContentKind {
|
|||
CustomDeliveries = 25,
|
||||
Eureka = 26,
|
||||
UltimateRaids = 28,
|
||||
V&CDungeonFinder = 30,
|
||||
VCDungeonFinder = 30,
|
||||
Other(u32),
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ impl ContentKind {
|
|||
25 => Self::CustomDeliveries,
|
||||
26 => Self::Eureka,
|
||||
28 => Self::UltimateRaids,
|
||||
30 => Self::V&CDungeonFinder,
|
||||
30 => Self::VCDungeonFinder,
|
||||
x => Self::Other(x),
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ impl ContentKind {
|
|||
Self::CustomDeliveries => 25,
|
||||
Self::Eureka => 26,
|
||||
Self::UltimateRaids => 28,
|
||||
Self::V&CDungeonFinder => 30,
|
||||
Self::VCDungeonFinder => 30,
|
||||
Self::Other(x) => x,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
mod stats;
|
||||
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
convert::Infallible,
|
||||
sync::Arc,
|
||||
time::Duration,
|
||||
};
|
||||
use anyhow::{Result, Context};
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use chrono::Utc;
|
||||
use mongodb::{
|
||||
bson::doc,
|
||||
Client as MongoClient,
|
||||
Collection,
|
||||
IndexModel,
|
||||
bson::doc,
|
||||
options::{IndexOptions, UpdateOptions},
|
||||
results::UpdateResult,
|
||||
};
|
||||
|
@ -20,10 +19,11 @@ use tokio::sync::RwLock;
|
|||
use tokio_stream::StreamExt;
|
||||
use warp::{
|
||||
Filter,
|
||||
Reply,
|
||||
filters::BoxedFilter,
|
||||
http::Uri,
|
||||
Reply,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
config::Config,
|
||||
ffxiv::Language,
|
||||
|
@ -34,6 +34,8 @@ use crate::{
|
|||
template::stats::StatsTemplate,
|
||||
};
|
||||
|
||||
mod stats;
|
||||
|
||||
pub async fn start(config: Arc<Config>) -> Result<()> {
|
||||
let state = State::new(Arc::clone(&config)).await?;
|
||||
|
||||
|
@ -448,7 +450,19 @@ fn contribute_multiple(state: Arc<State>) -> BoxedFilter<(impl Reply, )> {
|
|||
warp::post().and(route).boxed()
|
||||
}
|
||||
|
||||
async fn insert_listing(state: &State, listing: PartyFinderListing) -> mongodb::error::Result<UpdateResult> {
|
||||
async fn insert_listing(state: &State, mut listing: PartyFinderListing) -> mongodb::error::Result<UpdateResult> {
|
||||
if listing.created_world >= 144 && listing.created_world <= 147 {
|
||||
listing.created_world += 256;
|
||||
}
|
||||
|
||||
if listing.home_world >= 144 && listing.home_world <= 147 {
|
||||
listing.home_world += 256;
|
||||
}
|
||||
|
||||
if listing.current_world >= 144 && listing.current_world <= 147 {
|
||||
listing.current_world += 256;
|
||||
}
|
||||
|
||||
let opts = UpdateOptions::builder()
|
||||
.upsert(true)
|
||||
.build();
|
||||
|
|
Loading…
Reference in New Issue