No points for autotraders!
Thanks to @secretdataz
This commit is contained in:
parent
cc7215a496
commit
95941df818
@ -339,6 +339,12 @@ int chrif_save(struct map_session_data *sd, int flag) {
|
||||
|
||||
// Store the seconds that already fully passed
|
||||
pc_setreg2( sd, GOLDPC_SECONDS_VAR, battle_config.feature_goldpc_time - remaining / 1000 );
|
||||
|
||||
// If player starts autotrade, stop counting
|
||||
if( flag&CSAVE_AUTOTRADE ){
|
||||
delete_timer( sd->goldpc_tid, pc_goldpc_update );
|
||||
sd->goldpc_tid = INVALID_TIMER;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2121,7 +2121,7 @@ void pc_reg_received(struct map_session_data *sd)
|
||||
clif_instance_info( *sd );
|
||||
#endif
|
||||
|
||||
if( battle_config.feature_goldpc_active && pc_readreg2( sd, GOLDPC_POINT_VAR ) < battle_config.feature_goldpc_max_points ){
|
||||
if( battle_config.feature_goldpc_active && pc_readreg2( sd, GOLDPC_POINT_VAR ) < battle_config.feature_goldpc_max_points && !sd->state.autotrade ){
|
||||
sd->goldpc_tid = add_timer( gettick() + ( battle_config.feature_goldpc_time - pc_readreg2( sd, GOLDPC_SECONDS_VAR ) ) * 1000, pc_goldpc_update, sd->bl.id, (intptr_t)nullptr );
|
||||
#ifndef VIP_ENABLE
|
||||
clif_goldpc_info( *sd );
|
||||
|
@ -1712,4 +1712,6 @@ void pc_macro_detector_disconnect(map_session_data &sd);
|
||||
void pc_macro_reporter_area_select(map_session_data &sd, const int16 x, const int16 y, const int8 radius);
|
||||
void pc_macro_reporter_process(map_session_data &ssd, map_session_data &tsd);
|
||||
|
||||
TIMER_FUNC(pc_goldpc_update);
|
||||
|
||||
#endif /* PC_HPP */
|
||||
|
Loading…
x
Reference in New Issue
Block a user