1use std::ops::Add;
2
3use chrono::{Duration, NaiveTime, Timelike};
4
5use crate::schedule::EventSchedule;
6
7use super::{category::Category, event::EventInstance};
8
9pub struct MapMeta {
10 pub name: &'static str,
11 pub category: Category,
12 pub schedules: Vec<EventSchedule>,
13}
14
15impl IntoIterator for MapMeta {
16 type Item = EventInstance;
17
18 type IntoIter = IntoIter;
19
20 fn into_iter(self) -> Self::IntoIter {
21 IntoIter {
22 current_time: Duration::zero(),
23 schedules: self.schedules,
24 }
25 }
26}
27
28pub struct IntoIter {
29 current_time: Duration,
31
32 schedules: Vec<EventSchedule>,
34}
35
36impl IntoIter {
37 pub fn time(mut self, time: NaiveTime) -> Self {
39 self.current_time = Duration::seconds(time.num_seconds_from_midnight() as i64);
40 self
41 }
42
43 pub fn fast_forward(mut self, amount: Duration) -> Self {
45 self.current_time = self.current_time.add(amount);
46 self
47 }
48
49 pub fn now(&self) -> Option<EventInstance> {
50 let time = self.current_time;
51 self.schedules
52 .iter()
53 .find_map(|event_schedules| event_schedules.iter().fast_forward(time).now())
54 }
55}
56
57impl Iterator for IntoIter {
58 type Item = EventInstance;
59
60 fn next(&mut self) -> Option<EventInstance> {
61 let next_event: EventInstance = self
62 .schedules
63 .iter()
64 .filter_map(|event_schedule| {
65 event_schedule.iter().fast_forward(self.current_time).next()
66 })
67 .reduce(|event_a, event_b| {
68 if event_b.start_time < event_a.start_time {
69 event_b
70 } else {
71 event_a
72 }
73 })
74 .unwrap();
75 self.current_time = next_event.start_time;
76 Some(next_event)
77 }
78}
79
80impl IntoIterator for MapMetaKind {
81 type Item = EventInstance;
82
83 type IntoIter = IntoIter;
84
85 fn into_iter(self) -> Self::IntoIter {
86 self.info().into_iter()
87 }
88}
89
90impl<'a> IntoIterator for &'a MapMetaKind {
91 type Item = EventInstance;
92
93 type IntoIter = IntoIter;
94
95 fn into_iter(self) -> Self::IntoIter {
96 self.info().into_iter()
97 }
98}
99
100impl<'a> IntoIterator for &'a mut MapMetaKind {
101 type Item = EventInstance;
102
103 type IntoIter = IntoIter;
104
105 fn into_iter(self) -> Self::IntoIter {
106 self.info().into_iter()
107 }
108}
109
110pub enum MapMetaKind {
111 DayAndNight,
112 WorldBosses,
113 HardWorldBosses,
114 LeyLineAnomaly,
115 TwistedMarionette,
116 PVPTournaments,
117 DryTop,
118 VerdantBrink,
119 AuricBasin,
120 TangledDepths,
121 DragonsStand,
122 LakeDoric,
123 CrystalOasis,
124 DesertHighlands,
125 ElonRiverlands,
126 TheDesolation,
127 DomainOfVabbi,
128 DomainOfIstan,
129 JahaiBluffs,
130 ThunderheadPeaks,
131 GrothmarValley,
132 BjoraMarches,
133 Dragonstorm,
134 Cantha,
135 SeitungProvince,
136 NewKainengCity,
137 TheEchovaldWilds,
138 DragonsEnd,
139}
140
141impl MapMetaKind {
142 pub fn all_keys() -> [MapMetaKind; 28] {
144 [
145 MapMetaKind::DayAndNight,
146 MapMetaKind::WorldBosses,
147 MapMetaKind::HardWorldBosses,
148 MapMetaKind::LeyLineAnomaly,
149 MapMetaKind::TwistedMarionette,
150 MapMetaKind::PVPTournaments,
151 MapMetaKind::DryTop,
152 MapMetaKind::VerdantBrink,
153 MapMetaKind::AuricBasin,
154 MapMetaKind::TangledDepths,
155 MapMetaKind::DragonsStand,
156 MapMetaKind::LakeDoric,
157 MapMetaKind::CrystalOasis,
158 MapMetaKind::DesertHighlands,
159 MapMetaKind::ElonRiverlands,
160 MapMetaKind::TheDesolation,
161 MapMetaKind::DomainOfVabbi,
162 MapMetaKind::DomainOfIstan,
163 MapMetaKind::JahaiBluffs,
164 MapMetaKind::ThunderheadPeaks,
165 MapMetaKind::GrothmarValley,
166 MapMetaKind::BjoraMarches,
167 MapMetaKind::Dragonstorm,
168 MapMetaKind::Cantha,
169 MapMetaKind::SeitungProvince,
170 MapMetaKind::NewKainengCity,
171 MapMetaKind::TheEchovaldWilds,
172 MapMetaKind::DragonsEnd,
173 ]
174 }
175
176 pub fn info(&self) -> MapMeta {
178 match self {
179 MapMetaKind::DayAndNight => MapMeta {
180 name: "Day and Night",
181 category: Category::CoreTyria,
182 schedules: vec![
183 EventSchedule {
184 name: "Dawn",
185 offset: NaiveTime::from_hms(0, 25, 0),
186 length: Duration::minutes(5),
187 frequency: Duration::hours(2),
188 },
189 EventSchedule {
190 name: "Day",
191 offset: NaiveTime::from_hms(0, 30, 0),
192 length: Duration::minutes(70),
193 frequency: Duration::hours(2),
194 },
195 EventSchedule {
196 name: "Dusk",
197 offset: NaiveTime::from_hms(1, 40, 0),
198 length: Duration::minutes(5),
199 frequency: Duration::hours(2),
200 },
201 EventSchedule {
202 name: "Night",
203 offset: NaiveTime::from_hms(1, 45, 0),
204 length: Duration::minutes(40),
205 frequency: Duration::hours(2),
206 },
207 ],
208 },
209 MapMetaKind::WorldBosses => MapMeta {
210 name: "World Bosses",
211 category: Category::CoreTyria,
212 schedules: vec![
213 EventSchedule {
214 name: "Admiral Taidha Covington",
215 offset: NaiveTime::from_hms(0, 0, 0),
216 frequency: Duration::hours(3),
217 length: Duration::minutes(15),
218 },
219 EventSchedule {
220 name: "Svanir Shaman Chief",
221 offset: NaiveTime::from_hms(0, 15, 0),
222 frequency: Duration::hours(2),
223 length: Duration::minutes(15),
224 },
225 EventSchedule {
226 name: "Megadestroyer",
227 offset: NaiveTime::from_hms(0, 30, 0),
228 frequency: Duration::hours(3),
229 length: Duration::minutes(15),
230 },
231 EventSchedule {
232 name: "Fire Elemental",
233 offset: NaiveTime::from_hms(0, 45, 0),
234 frequency: Duration::hours(2),
235 length: Duration::minutes(15),
236 },
237 EventSchedule {
238 name: "The Shatterer",
239 offset: NaiveTime::from_hms(1, 0, 0),
240 frequency: Duration::hours(3),
241 length: Duration::minutes(15),
242 },
243 EventSchedule {
244 name: "Great Jungle Wurm",
245 offset: NaiveTime::from_hms(1, 15, 0),
246 frequency: Duration::hours(2),
247 length: Duration::minutes(15),
248 },
249 EventSchedule {
250 name: "Modniir Ulgoth",
251 offset: NaiveTime::from_hms(1, 30, 0),
252 frequency: Duration::hours(3),
253 length: Duration::minutes(15),
254 },
255 EventSchedule {
256 name: "Shadow Behemoth",
257 offset: NaiveTime::from_hms(1, 45, 0),
258 frequency: Duration::hours(2),
259 length: Duration::minutes(15),
260 },
261 EventSchedule {
262 name: "Golem Mark II",
263 offset: NaiveTime::from_hms(2, 0, 0),
264 frequency: Duration::hours(3),
265 length: Duration::minutes(15),
266 },
267 EventSchedule {
268 name: "Claw of Jormag",
269 offset: NaiveTime::from_hms(2, 30, 0),
270 frequency: Duration::hours(3),
271 length: Duration::minutes(15),
272 },
273 ],
274 },
275 MapMetaKind::HardWorldBosses => MapMeta {
276 name: "Hard World Bosses",
277 category: Category::CoreTyria,
278 schedules: vec![
279 EventSchedule {
280 name: "Tequatl the Sunless",
281 offset: NaiveTime::from_hms(0, 0, 0),
282 frequency: Duration::hours(24),
283 length: Duration::minutes(30),
284 },
285 EventSchedule {
286 name: "Triple Trouble",
287 offset: NaiveTime::from_hms(1, 0, 0),
288 frequency: Duration::hours(24),
289 length: Duration::minutes(30),
290 },
291 EventSchedule {
292 name: "Karka Queen",
293 offset: NaiveTime::from_hms(2, 0, 0),
294 frequency: Duration::hours(24),
295 length: Duration::minutes(30),
296 },
297 EventSchedule {
298 name: "Tequatl the Sunless",
299 offset: NaiveTime::from_hms(3, 0, 0),
300 frequency: Duration::hours(24),
301 length: Duration::minutes(30),
302 },
303 EventSchedule {
304 name: "Triple Trouble",
305 offset: NaiveTime::from_hms(4, 0, 0),
306 frequency: Duration::hours(24),
307 length: Duration::minutes(30),
308 },
309 EventSchedule {
310 name: "Karka Queen",
311 offset: NaiveTime::from_hms(6, 0, 0),
312 frequency: Duration::hours(24),
313 length: Duration::minutes(30),
314 },
315 EventSchedule {
316 name: "Tequatl the Sunless",
317 offset: NaiveTime::from_hms(7, 0, 0),
318 frequency: Duration::hours(24),
319 length: Duration::minutes(30),
320 },
321 EventSchedule {
322 name: "Triple Trouble",
323 offset: NaiveTime::from_hms(8, 0, 0),
324 frequency: Duration::hours(24),
325 length: Duration::minutes(30),
326 },
327 EventSchedule {
328 name: "Karka Queen",
329 offset: NaiveTime::from_hms(10, 30, 0),
330 frequency: Duration::hours(24),
331 length: Duration::minutes(30),
332 },
333 EventSchedule {
334 name: "Tequatl the Sunless",
335 offset: NaiveTime::from_hms(11, 30, 0),
336 frequency: Duration::hours(24),
337 length: Duration::minutes(30),
338 },
339 EventSchedule {
340 name: "Triple Trouble",
341 offset: NaiveTime::from_hms(12, 30, 0),
342 frequency: Duration::hours(24),
343 length: Duration::minutes(30),
344 },
345 EventSchedule {
346 name: "Karka Queen",
347 offset: NaiveTime::from_hms(15, 0, 0),
348 frequency: Duration::hours(24),
349 length: Duration::minutes(30),
350 },
351 EventSchedule {
352 name: "Tequatl the Sunless",
353 offset: NaiveTime::from_hms(16, 0, 0),
354 frequency: Duration::hours(24),
355 length: Duration::minutes(30),
356 },
357 EventSchedule {
358 name: "Triple Trouble",
359 offset: NaiveTime::from_hms(17, 0, 0),
360 frequency: Duration::hours(24),
361 length: Duration::minutes(30),
362 },
363 EventSchedule {
364 name: "Karka Queen",
365 offset: NaiveTime::from_hms(18, 0, 0),
366 frequency: Duration::hours(24),
367 length: Duration::minutes(30),
368 },
369 EventSchedule {
370 name: "Tequatl the Sunless",
371 offset: NaiveTime::from_hms(19, 0, 0),
372 frequency: Duration::hours(24),
373 length: Duration::minutes(30),
374 },
375 EventSchedule {
376 name: "Triple Trouble",
377 offset: NaiveTime::from_hms(20, 0, 0),
378 frequency: Duration::hours(24),
379 length: Duration::minutes(30),
380 },
381 EventSchedule {
382 name: "Karka Queen",
383 offset: NaiveTime::from_hms(23, 0, 0),
384 frequency: Duration::hours(24),
385 length: Duration::minutes(30),
386 },
387 ],
388 },
389 MapMetaKind::LeyLineAnomaly => MapMeta {
390 name: "Ley-Line Anomaly",
391 category: Category::CoreTyria,
392 schedules: vec![
393 EventSchedule {
394 name: "Timberline Falls",
395 offset: NaiveTime::from_hms(0, 20, 0),
396 frequency: Duration::hours(6),
397 length: Duration::minutes(20),
398 },
399 EventSchedule {
400 name: "Iron Marches",
401 offset: NaiveTime::from_hms(2, 20, 0),
402 frequency: Duration::hours(6),
403 length: Duration::minutes(20),
404 },
405 EventSchedule {
406 name: "Gendarran Fields",
407 offset: NaiveTime::from_hms(4, 20, 0),
408 frequency: Duration::hours(6),
409 length: Duration::minutes(20),
410 },
411 ],
412 },
413 MapMetaKind::TwistedMarionette => MapMeta {
414 name: "Twisted Marionette",
415 category: Category::CoreTyria,
416 schedules: vec![EventSchedule {
417 name: "Twisted Marionette (Public)",
418 offset: NaiveTime::from_hms(0, 0, 0),
419 frequency: Duration::hours(2),
420 length: Duration::minutes(20),
421 }],
422 },
423 MapMetaKind::PVPTournaments => MapMeta {
424 name: "PvP Tournaments",
425 category: Category::CoreTyria,
426 schedules: vec![
427 EventSchedule {
428 name: "Balthazar's Brawl",
429 offset: NaiveTime::from_hms(0, 0, 0),
430 frequency: Duration::hours(12),
431 length: Duration::hours(1),
432 },
433 EventSchedule {
434 name: "Grenth's Game",
435 offset: NaiveTime::from_hms(3, 0, 0),
436 frequency: Duration::hours(12),
437 length: Duration::hours(1),
438 },
439 EventSchedule {
440 name: "Melandru's Matchup",
441 offset: NaiveTime::from_hms(6, 0, 0),
442 frequency: Duration::hours(12),
443 length: Duration::hours(1),
444 },
445 EventSchedule {
446 name: "Lyssa's Legions",
447 offset: NaiveTime::from_hms(9, 0, 0),
448 frequency: Duration::hours(12),
449 length: Duration::hours(1),
450 },
451 ],
452 },
453 MapMetaKind::DryTop => MapMeta {
454 name: "Dry Top",
455 category: Category::LivingWorldSeason2,
456 schedules: vec![
457 EventSchedule {
458 name: "Crash Site",
459 offset: NaiveTime::from_hms(0, 0, 0),
460 frequency: Duration::hours(1),
461 length: Duration::minutes(40),
462 },
463 EventSchedule {
464 name: "Sandstorm",
465 offset: NaiveTime::from_hms(0, 40, 0),
466 frequency: Duration::hours(1),
467 length: Duration::minutes(20),
468 },
469 ],
470 },
471 MapMetaKind::VerdantBrink => MapMeta {
472 name: "Verdant Brink",
473 category: Category::HeartOfThorns,
474 schedules: vec![
475 EventSchedule {
476 name: "Night: Night and the Enemy",
477 offset: NaiveTime::from_hms(1, 45, 0),
478 frequency: Duration::hours(2),
479 length: Duration::minutes(25),
480 },
481 EventSchedule {
482 name: "Night Bosses",
483 offset: NaiveTime::from_hms(10, 0, 0),
484 frequency: Duration::hours(2),
485 length: Duration::minutes(20),
486 },
487 EventSchedule {
488 name: "Day: Securing Verdant Brink",
489 offset: NaiveTime::from_hms(0, 30, 0),
490 frequency: Duration::hours(2),
491 length: Duration::hours(1).add(Duration::minutes(15)),
492 },
493 ],
494 },
495 MapMetaKind::AuricBasin => MapMeta {
496 name: "Auric Basin",
497 category: Category::HeartOfThorns,
498 schedules: vec![
499 EventSchedule {
500 name: "Challenges",
501 offset: NaiveTime::from_hms(0, 45, 0),
502 frequency: Duration::hours(2),
503 length: Duration::minutes(15),
504 },
505 EventSchedule {
506 name: "Octovine",
507 offset: NaiveTime::from_hms(1, 0, 0),
508 frequency: Duration::hours(2),
509 length: Duration::minutes(20),
510 },
511 EventSchedule {
512 name: "Reset",
513 offset: NaiveTime::from_hms(1, 20, 0),
514 frequency: Duration::hours(2),
515 length: Duration::minutes(10),
516 },
517 EventSchedule {
518 name: "Pylons",
519 offset: NaiveTime::from_hms(1, 30, 0),
520 frequency: Duration::hours(2),
521 length: Duration::minutes(75),
522 },
523 ],
524 },
525 MapMetaKind::TangledDepths => MapMeta {
526 name: "Tangled Depths",
527 category: Category::HeartOfThorns,
528 schedules: vec![
529 EventSchedule {
530 name: "Prep",
531 offset: NaiveTime::from_hms(0, 25, 0),
532 frequency: Duration::hours(2),
533 length: Duration::minutes(5),
534 },
535 EventSchedule {
536 name: "Chak Gerent",
537 offset: NaiveTime::from_hms(0, 30, 0),
538 frequency: Duration::hours(2),
539 length: Duration::minutes(20),
540 },
541 EventSchedule {
542 name: "Help the Outposts",
543 offset: NaiveTime::from_hms(0, 50, 0),
544 frequency: Duration::hours(2),
545 length: Duration::hours(1).add(Duration::minutes(35)),
546 },
547 ],
548 },
549 MapMetaKind::DragonsStand => MapMeta {
550 name: "Dragon's Stand",
551 category: Category::HeartOfThorns,
552 schedules: vec![EventSchedule {
553 name: "Start advancing on the Blighting Towers",
554 offset: NaiveTime::from_hms(1, 30, 0),
555 frequency: Duration::hours(2),
556 length: Duration::hours(2),
557 }],
558 },
559 MapMetaKind::LakeDoric => MapMeta {
560 name: "Lake Doric",
561 category: Category::LivingWorldSeason3,
562 schedules: vec![
563 EventSchedule {
564 name: "Noran's Homestead",
565 offset: NaiveTime::from_hms(0, 30, 0),
566 frequency: Duration::hours(2),
567 length: Duration::minutes(30),
568 },
569 EventSchedule {
570 name: "Saidra's Haven",
571 offset: NaiveTime::from_hms(1, 0, 0),
572 frequency: Duration::hours(2),
573 length: Duration::minutes(45),
574 },
575 EventSchedule {
576 name: "New Loamhurst",
577 offset: NaiveTime::from_hms(1, 45, 0),
578 frequency: Duration::hours(2),
579 length: Duration::minutes(45),
580 },
581 ],
582 },
583 MapMetaKind::CrystalOasis => MapMeta {
584 name: "Crystal Oasis",
585 category: Category::PathOfFire,
586 schedules: vec![
587 EventSchedule {
588 name: "Rounds 1 to 3",
589 offset: NaiveTime::from_hms(0, 5, 0),
590 frequency: Duration::hours(2),
591 length: Duration::minutes(10),
592 },
593 EventSchedule {
594 name: "Pinata/Reset",
595 offset: NaiveTime::from_hms(0, 20, 0),
596 frequency: Duration::hours(2),
597 length: Duration::minutes(10),
598 },
599 ],
600 },
601 MapMetaKind::DesertHighlands => MapMeta {
602 name: "Desert Highlands",
603 category: Category::PathOfFire,
604 schedules: vec![EventSchedule {
605 name: "Buried Treasure",
606 offset: NaiveTime::from_hms(1, 0, 0),
607 frequency: Duration::hours(2),
608 length: Duration::minutes(20),
609 }],
610 },
611 MapMetaKind::ElonRiverlands => MapMeta {
612 name: "Elon Riverlands",
613 category: Category::PathOfFire,
614 schedules: vec![
615 EventSchedule {
616 name: "The Path to Ascension: Augury Rock",
617 offset: NaiveTime::from_hms(1, 30, 0),
618 frequency: Duration::hours(2),
619 length: Duration::minutes(25),
620 },
621 EventSchedule {
622 name: "Doppelganger",
623 offset: NaiveTime::from_hms(1, 50, 0),
624 frequency: Duration::hours(2),
625 length: Duration::minutes(20),
626 },
627 ],
628 },
629 MapMetaKind::TheDesolation => MapMeta {
630 name: "The Desolation",
631 category: Category::PathOfFire,
632 schedules: vec![
633 EventSchedule {
634 name: "Junudu Rising",
635 offset: NaiveTime::from_hms(0, 30, 0),
636 frequency: Duration::hours(2),
637 length: Duration::minutes(20),
638 },
639 EventSchedule {
640 name: "Maws of Torment",
641 offset: NaiveTime::from_hms(1, 0, 0),
642 frequency: Duration::hours(2),
643 length: Duration::minutes(20),
644 },
645 EventSchedule {
646 name: "Junudu Rising",
647 offset: NaiveTime::from_hms(1, 30, 0),
648 frequency: Duration::hours(2),
649 length: Duration::minutes(20),
650 },
651 ],
652 },
653 MapMetaKind::DomainOfVabbi => MapMeta {
654 name: "Domain of Vabbi",
655 category: Category::PathOfFire,
656 schedules: vec![
657 EventSchedule {
658 name: "Forged with Fire",
659 offset: NaiveTime::from_hms(0, 0, 0),
660 frequency: Duration::hours(1),
661 length: Duration::minutes(30),
662 },
663 EventSchedule {
664 name: "Serpents' Ire",
665 offset: NaiveTime::from_hms(0, 30, 0),
666 frequency: Duration::hours(2),
667 length: Duration::minutes(30),
668 },
669 ],
670 },
671 MapMetaKind::DomainOfIstan => MapMeta {
672 name: "Domain of Istan",
673 category: Category::LivingWorldSeason4,
674 schedules: vec![EventSchedule {
675 name: "Palawadan",
676 offset: NaiveTime::from_hms(1, 45, 0),
677 frequency: Duration::hours(2),
678 length: Duration::minutes(30),
679 }],
680 },
681 MapMetaKind::JahaiBluffs => MapMeta {
682 name: "Jahai Bluffs",
683 category: Category::LivingWorldSeason4,
684 schedules: vec![
685 EventSchedule {
686 name: "Escorts",
687 offset: NaiveTime::from_hms(1, 0, 0),
688 frequency: Duration::hours(2),
689 length: Duration::minutes(15),
690 },
691 EventSchedule {
692 name: "Death-Branded Shatterer",
693 offset: NaiveTime::from_hms(1, 15, 0),
694 frequency: Duration::hours(2),
695 length: Duration::minutes(15),
696 },
697 ],
698 },
699 MapMetaKind::ThunderheadPeaks => MapMeta {
700 name: "Thunderhead Peaks",
701 category: Category::LivingWorldSeason4,
702 schedules: vec![
703 EventSchedule {
704 name: "The Oil Floes",
705 offset: NaiveTime::from_hms(0, 45, 0),
706 frequency: Duration::hours(2),
707 length: Duration::minutes(15),
708 },
709 EventSchedule {
710 name: "Thunderhead Keep",
711 offset: NaiveTime::from_hms(1, 45, 0),
712 frequency: Duration::hours(2),
713 length: Duration::minutes(20),
714 },
715 ],
716 },
717 MapMetaKind::GrothmarValley => MapMeta {
718 name: "Grothmar Valley",
719 category: Category::TheIcebroodSaga,
720 schedules: vec![
721 EventSchedule {
722 name: "Effigy",
723 offset: NaiveTime::from_hms(0, 10, 0),
724 frequency: Duration::hours(2),
725 length: Duration::minutes(15),
726 },
727 EventSchedule {
728 name: "Doomlore Shrine",
729 offset: NaiveTime::from_hms(0, 38, 0),
730 frequency: Duration::hours(2),
731 length: Duration::minutes(22),
732 },
733 EventSchedule {
734 name: "Ooze Pits",
735 offset: NaiveTime::from_hms(1, 5, 0),
736 frequency: Duration::hours(2),
737 length: Duration::minutes(20),
738 },
739 EventSchedule {
740 name: "Metal Concert",
741 offset: NaiveTime::from_hms(1, 40, 0),
742 frequency: Duration::hours(2),
743 length: Duration::minutes(20),
744 },
745 ],
746 },
747 MapMetaKind::BjoraMarches => MapMeta {
748 name: "Bjora Marches",
749 category: Category::TheIcebroodSaga,
750 schedules: vec![
751 EventSchedule {
752 name: "Shards and Construct",
753 offset: NaiveTime::from_hms(0, 0, 0),
754 frequency: Duration::hours(2),
755 length: Duration::minutes(5),
756 },
757 EventSchedule {
758 name: "Icebrood Champions",
759 offset: NaiveTime::from_hms(0, 5, 0),
760 frequency: Duration::hours(2),
761 length: Duration::minutes(15),
762 },
763 EventSchedule {
764 name: "Drakkar and Spirits of the Wild",
765 offset: NaiveTime::from_hms(1, 5, 0),
766 frequency: Duration::hours(2),
767 length: Duration::minutes(35),
768 },
769 EventSchedule {
770 name: "Raven Shrines",
771 offset: NaiveTime::from_hms(1, 45, 0),
772 frequency: Duration::hours(2),
773 length: Duration::minutes(15),
774 },
775 ],
776 },
777 MapMetaKind::Dragonstorm => MapMeta {
778 name: "Dragonstorm",
779 category: Category::TheIcebroodSaga,
780 schedules: vec![EventSchedule {
781 name: "Dragonstorm (Public)",
782 offset: NaiveTime::from_hms(1, 0, 0),
783 frequency: Duration::hours(2),
784 length: Duration::minutes(20),
785 }],
786 },
787 MapMetaKind::Cantha => MapMeta {
788 name: "Cantha: Day and Night",
789 category: Category::EndOfDragons,
790 schedules: vec![
791 EventSchedule {
792 name: "Dawn",
793 offset: NaiveTime::from_hms(0, 25, 0),
794 frequency: Duration::hours(2),
795 length: Duration::minutes(5),
796 },
797 EventSchedule {
798 name: "Day",
799 offset: NaiveTime::from_hms(0, 30, 0),
800 frequency: Duration::hours(2),
801 length: Duration::hours(1).add(Duration::minutes(10)),
802 },
803 EventSchedule {
804 name: "Dusk",
805 offset: NaiveTime::from_hms(1, 40, 0),
806 frequency: Duration::hours(2),
807 length: Duration::minutes(5),
808 },
809 EventSchedule {
810 name: "Night",
811 offset: NaiveTime::from_hms(1, 45, 0),
812 frequency: Duration::hours(2),
813 length: Duration::minutes(40),
814 },
815 ],
816 },
817 MapMetaKind::SeitungProvince => MapMeta {
818 name: "Seitung Province",
819 category: Category::EndOfDragons,
820 schedules: vec![EventSchedule {
821 name: "Aetherblade Assault",
822 offset: NaiveTime::from_hms(1, 30, 0),
823 frequency: Duration::hours(2),
824 length: Duration::minutes(30),
825 }],
826 },
827 MapMetaKind::NewKainengCity => MapMeta {
828 name: "New Kaineng City",
829 category: Category::EndOfDragons,
830 schedules: vec![EventSchedule {
831 name: "Kaineng Blackout",
832 offset: NaiveTime::from_hms(0, 0, 0),
833 frequency: Duration::hours(2),
834 length: Duration::minutes(40),
835 }],
836 },
837 MapMetaKind::TheEchovaldWilds => MapMeta {
838 name: "The Echovald Wilds",
839 category: Category::EndOfDragons,
840 schedules: vec![
841 EventSchedule {
842 name: "Gang War",
843 offset: NaiveTime::from_hms(0, 30, 0),
844 frequency: Duration::hours(2),
845 length: Duration::minutes(35),
846 },
847 EventSchedule {
848 name: "Aspenwood",
849 offset: NaiveTime::from_hms(1, 40, 0),
850 frequency: Duration::hours(2),
851 length: Duration::minutes(20),
852 },
853 ],
854 },
855 MapMetaKind::DragonsEnd => MapMeta {
856 name: "Dragon's End",
857 category: Category::EndOfDragons,
858 schedules: vec![
859 EventSchedule {
860 name: "Jade Maw",
861 offset: NaiveTime::from_hms(0, 5, 0),
862 frequency: Duration::hours(2),
863 length: Duration::minutes(8),
864 },
865 EventSchedule {
866 name: "Preparations",
867 offset: NaiveTime::from_hms(0, 13, 0),
868 frequency: Duration::hours(2),
869 length: Duration::minutes(32),
870 },
871 EventSchedule {
872 name: "Jade Maw",
873 offset: NaiveTime::from_hms(0, 45, 0),
874 frequency: Duration::hours(2),
875 length: Duration::minutes(8),
876 },
877 EventSchedule {
878 name: "Preparations",
879 offset: NaiveTime::from_hms(0, 53, 0),
880 frequency: Duration::hours(2),
881 length: Duration::minutes(8),
882 },
883 EventSchedule {
884 name: "The Battle for the Jade Sea",
885 offset: NaiveTime::from_hms(1, 0, 0),
886 frequency: Duration::hours(2),
887 length: Duration::hours(1),
888 },
889 ],
890 },
891 }
892 }
893}