Skip to content

Commit

Permalink
fix: Supplementary damage should not have stun values
Browse files Browse the repository at this point in the history
  • Loading branch information
false-spring committed Jul 6, 2024
1 parent 237123e commit beb8f6e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src-hook/src/hooks/damage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ impl OnProcessDamageHook {
let target_type_id: u32 = actor_type_id(target_specified_instance_ptr as *const usize);
let target_idx = actor_idx(target_specified_instance_ptr as *const usize);

let stun_value = if matches!(action_type, ActionType::SupplementaryDamage(_)) {
None
} else {
Some(damage_instance.stun_value)
};

let event = Message::DamageEvent(DamageEvent {
source: Actor {
index: source_idx,
Expand All @@ -124,7 +130,7 @@ impl OnProcessDamageHook {
flags,
action_id: action_type,
attack_rate: Some(damage_instance.attack_rate),
stun_value: Some(damage_instance.stun_value),
stun_value: stun_value,
damage_cap: Some(damage_instance.damage_cap),
});

Expand Down

0 comments on commit beb8f6e

Please sign in to comment.