1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! `wow_spells`
//!
//! Crate containing spell definitions for World of Warcraft versions 1.12.x (`vanilla`), 2.4.3.8606 (`tbc`), and 3.3.5.x (`wrath`).
//!
//! ## Usage
//!
//! Add the crate with the required features:
//!
//! ```bash
//! cargo add --features 'vanilla tbc wrath' wow_spells
//! ```
//!
//! Each expansion module contains an [`all_spells`](vanilla::all_spells) function that returns a slice to all spells
//! and a [`lookup_spell`](vanilla::lookup_spell) function that searches all available spells.
//! Prefer [`lookup_spell`](vanilla::lookup_spell) over manually searching [`all_spells`](vanilla::all_spells).
//!
//! ```rust
//! let spell_id = 7598; // Increased Critical 2
//!
//! # #[cfg(feature = "vanilla")]
//! if let Some(spell) = wow_spells::vanilla::lookup_spell(spell_id) {
//! println!("Spell is named '{}'.", spell.spell_name());
//! } else {
//! println!("Spell not found.");
//! }
//! ```
//!
//! ## Notice
//!
//! This crate contains very large constant arrays which can cause out-of-memory errors during compilation.
//! Try reducing the amount of cores used for compilation if this is the case.
//!
//! ## Auto Generation
//!
//! This crate is partially auto generated through sqlite databases in the
//! [`wow_messages` repository](https://github.com/gtker/wow_messages/).
//!
/// Version 2.4.3.8606.
/// Version 1.12.x.
/// Version 3.3.5.x.