Skip to content

Commit 539ee63

Browse files
committed
Fix Dacus always keeping momentum
1 parent aa56299 commit 539ee63

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

fighters/common/src/general_statuses/attack/attackx4.rs

+12
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ fn nro_hook(info: &skyline::nro::NroInfo) {
1919
status_AttackHi4Start_Main,
2020
//status_AttackHi4Start_Common,
2121
status_AttackLw4Start_Main,
22+
bind_address_call_status_end_attackhi4start,
2223
status_end_AttackHi4Start,
24+
bind_address_call_status_end_attacklw4start,
2325
status_end_AttackLw4Start,
2426
);
2527
}
@@ -117,6 +119,11 @@ unsafe fn status_AttackHi4Start_Common(fighter: &mut L2CFighterCommon, motion: L
117119
fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackHi4Start_Main as *const () as _));
118120
}
119121

122+
#[skyline::hook(replace = L2CFighterCommon_bind_address_call_status_end_AttackHi4Start)]
123+
unsafe extern "C" fn bind_address_call_status_end_attackhi4start(fighter: &mut L2CFighterCommon, _agent: &mut L2CAgent) -> L2CValue {
124+
fighter.status_end_AttackHi4Start()
125+
}
126+
120127
#[skyline::hook(replace = L2CFighterCommon_status_end_AttackHi4Start)]
121128
unsafe fn status_end_AttackHi4Start(fighter: &mut L2CFighterCommon) -> L2CValue {
122129
VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_DACUS);
@@ -207,6 +214,11 @@ unsafe fn status_AttackLw4Start_Main(fighter: &mut L2CFighterCommon) -> L2CValue
207214
return 0.into()
208215
}
209216

217+
#[skyline::hook(replace = L2CFighterCommon_bind_address_call_status_end_AttackLw4Start)]
218+
unsafe extern "C" fn bind_address_call_status_end_attacklw4start(fighter: &mut L2CFighterCommon, _agent: &mut L2CAgent) -> L2CValue {
219+
fighter.status_end_AttackLw4Start()
220+
}
221+
210222
#[skyline::hook(replace = L2CFighterCommon_status_end_AttackLw4Start)]
211223
unsafe fn status_end_AttackLw4Start(fighter: &mut L2CFighterCommon) -> L2CValue {
212224
VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_DACUS);

0 commit comments

Comments
 (0)