Jump to content
  • 0

@go/@warp delay When Hit (Refresh Timer Problem)


Fuse

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   2
  • Joined:  03/03/18
  • Last Seen:  

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 (!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

Spoiler

/*==========================================
 * @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;
        }

 

 

Edited by Fuse
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   0
  • Joined:  02/07/12
  • Last Seen:  

none

Edited by Siberian
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

I'm experiencing this issue as well

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...