This Codes Works Fine. But The Problem is When Normal Character Starts To Log in the @warp/@go delay wont Refresh
it needs to take action like doing Skill or attack before the delay will start to refresh at 5sec. so how would i fix this to make the delay timer refresh
without doing any actions? is there anyway to fix this problem? hope you guys can help me.
Heres My Codes
src/map/pc.cpp
Spoiler
/*==========================================
* Invoked when a player has received damage
*------------------------------------------*/
void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
if (sp) clif_updatestatus(sd,SP_SP);
if (hp) clif_updatestatus(sd,SP_HP);
else return;
}
if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) {
clif_displaymessage(fd,"@warp cannot be issued since you were into battle recently");
return -1;
}
/*==========================================
* @go [city_number or city_name] - Updated by Harbin
*------------------------------------------*/
}
if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) {
clif_displaymessage(fd,"@go cannot be issued since you were into battle recently");
return -1;
}
Question
Fuse
This Codes Works Fine. But The Problem is When Normal Character Starts To Log in the @warp/@go delay wont Refresh
it needs to take action like doing Skill or attack before the delay will start to refresh at 5sec. so how would i fix this to make the delay timer refresh
without doing any actions? is there anyway to fix this problem? hope you guys can help me.
Heres My Codes
src/map/pc.cpp
/*==========================================
* Invoked when a player has received damage
*------------------------------------------*/
void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int hp, unsigned int sp)
{
if (sp) clif_updatestatus(sd,SP_SP);
if (hp) clif_updatestatus(sd,SP_HP);
else return;
if (!src)
return;
if( pc_issit(sd) ) {
pc_setstand(sd, true);
skill_sit(sd,0);
}
if (sd->progressbar.npc_id)
clif_progressbar_abort(sd);
if( sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support )
pet_target_check(sd->pd,src,1);
if( src->type == BL_PC ) {
((TBL_PC*)src)->canlog_tick = gettick();
sd->canlog_tick = gettick();
}
if( sd->status.ele_id > 0 )
elemental_set_target(sd,src);
if(battle_config.prevent_logout_trigger&PLT_DAMAGE) {
sd->canlog_tick = gettick();
}
src/map/atcommand.cpp
/*==========================================
* @rura, @warp, @mapmove
*------------------------------------------*/
}
if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) {
clif_displaymessage(fd,"@warp cannot be issued since you were into battle recently");
return -1;
}
/*==========================================
* @go [city_number or city_name] - Updated by Harbin
*------------------------------------------*/
}
if( !pc_get_group_level(sd) && DIFF_TICK(gettick(),sd->canlog_tick) < 5000 ) {
clif_displaymessage(fd,"@go cannot be issued since you were into battle recently");
return -1;
}
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.