Apply suggestions from code review
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
This commit is contained in:
parent
8053e36190
commit
63cb80aa89
@ -141,13 +141,13 @@ feature.dynamicnpc_direction: no
|
|||||||
feature.goldpc_active: yes
|
feature.goldpc_active: yes
|
||||||
|
|
||||||
// How many seconds does a player have to be online to receive a point?
|
// How many seconds does a player have to be online to receive a point?
|
||||||
// Default: 3600s (1h)
|
// Default: 3600 (1h)
|
||||||
feature.goldpc_time: 3600
|
feature.goldpc_time: 3600
|
||||||
|
|
||||||
// How many points can a player have at maximum?
|
// How many points can a player have at maximum?
|
||||||
// Default: 300
|
// Default: 300
|
||||||
feature.goldpc_max_points: 300
|
feature.goldpc_max_points: 300
|
||||||
|
|
||||||
// Should being a VIP player double the points a player gets? (Note 1)
|
// Should being VIP double the points a player gets? (Note 1)
|
||||||
// Default: yes
|
// Default: yes
|
||||||
feature.goldpc_vip: yes
|
feature.goldpc_vip: yes
|
||||||
|
|||||||
@ -2003,7 +2003,7 @@ TIMER_FUNC(pc_goldpc_update){
|
|||||||
pc_setreg2( sd, GOLDPC_SECONDS_VAR, 0 );
|
pc_setreg2( sd, GOLDPC_SECONDS_VAR, 0 );
|
||||||
|
|
||||||
if( points < battle_config.feature_goldpc_max_points ){
|
if( points < battle_config.feature_goldpc_max_points ){
|
||||||
sd->goldpc_tid = add_timer( gettick() + battle_config.feature_goldpc_time * 1000, pc_goldpc_update, sd->bl.id, NULL );
|
sd->goldpc_tid = add_timer( gettick() + battle_config.feature_goldpc_time * 1000, pc_goldpc_update, sd->bl.id, nullptr );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the client
|
// Update the client
|
||||||
@ -2122,7 +2122,7 @@ void pc_reg_received(struct map_session_data *sd)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( battle_config.feature_goldpc_active ){
|
if( battle_config.feature_goldpc_active ){
|
||||||
sd->goldpc_tid = add_timer( gettick() + ( battle_config.feature_goldpc_time - pc_readreg2( sd, GOLDPC_SECONDS_VAR ) ) * 1000, pc_goldpc_update, sd->bl.id, NULL );
|
sd->goldpc_tid = add_timer( gettick() + ( battle_config.feature_goldpc_time - pc_readreg2( sd, GOLDPC_SECONDS_VAR ) ) * 1000, pc_goldpc_update, sd->bl.id, nullptr );
|
||||||
#ifndef VIP_ENABLE
|
#ifndef VIP_ENABLE
|
||||||
clif_goldpc_info( *sd );
|
clif_goldpc_info( *sd );
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user