-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
45 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
// TODO: allow name override? | ||
// TODO: instead of hits allow counting buff apply? | ||
// TODO: support instant casts with buff apply? | ||
|
||
/// Skill definition parsed from a file. | ||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
pub struct SkillDef { | ||
/// Skill id. | ||
pub id: u32, | ||
|
||
/// Whether the definition is active. | ||
#[serde(default = "default_as_true")] | ||
pub enabled: bool, | ||
|
||
/// Additional hit skill ids. | ||
#[serde(default)] | ||
pub hit_ids: Vec<u32>, | ||
|
||
/// Total amount of hits. | ||
pub hits: Option<usize>, | ||
|
||
/// Minimum amount of hits expected. | ||
pub expected: Option<usize>, | ||
|
||
/// Maximum duration (ms) to count as one cast. | ||
pub max_duration: Option<i32>, | ||
|
||
/// Whether to include minion hits. | ||
#[serde(default)] | ||
pub minion: bool, | ||
} | ||
|
||
fn default_as_true() -> bool { | ||
true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.