Always stop the timer on logout
Thanks to @Tolimatoi
This commit is contained in:
parent
95941df818
commit
4f98d0198f
@ -340,11 +340,9 @@ int chrif_save(struct map_session_data *sd, int flag) {
|
|||||||
// Store the seconds that already fully passed
|
// Store the seconds that already fully passed
|
||||||
pc_setreg2( sd, GOLDPC_SECONDS_VAR, battle_config.feature_goldpc_time - remaining / 1000 );
|
pc_setreg2( sd, GOLDPC_SECONDS_VAR, battle_config.feature_goldpc_time - remaining / 1000 );
|
||||||
|
|
||||||
// If player starts autotrade, stop counting
|
// If a player logs out or starts autotrade, stop counting
|
||||||
if( flag&CSAVE_AUTOTRADE ){
|
delete_timer( sd->goldpc_tid, pc_goldpc_update );
|
||||||
delete_timer( sd->goldpc_tid, pc_goldpc_update );
|
sd->goldpc_tid = INVALID_TIMER;
|
||||||
sd->goldpc_tid = INVALID_TIMER;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user