Jump to content
  • 0

H>Regarding @refresh


Sallycantdance

Question


  • Group:  Members
  • Topic Count:  225
  • Topics Per Day:  0.14
  • Content Count:  798
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

hello everyone im having a problem regarding @refresh i removed the fade time to 0 then here's the scenario when i try to click my mouse to the desire location and using @refresh i feel like im teleporting can anyone have some modification for this or any experience and how you fix it thank you! im using 2018-06-21aRagexeRE ragnarok.log 
as you can see in the video i try to press the @refresh 3x and it looks like teleporting until i get to the location ive click
 

Quote

/*==========================================
 * @refresh (like @jumpto <<yourself>>)
 *------------------------------------------*/
ACMD_FUNC(refresh)
{
    nullpo_retr(-1, sd);
    clif_refresh(sd);
    return 0;
}

ACMD_FUNC(refreshall)
{
    struct map_session_data* iter_sd;
    struct s_mapiterator* iter;
    nullpo_retr(-1, sd);

    iter = mapit_getallusers();
    for (iter_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); iter_sd = (TBL_PC*)mapit_next(iter))
        clif_refresh(iter_sd);
    mapit_free(iter);
    return 0;
}

/*==========================================

Edited by GM Winter
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   7
  • Joined:  06/07/24
  • Last Seen:  

4 hours ago, GM Winter said:

hello everyone im having a problem regarding @refresh i remove the fade time to 0 then heres the senario when i try to click my mouse to the desire location and using @refresh i feel like im teleporting can anyone have some modification for this or any experience and how you fix it thank you!

Try to diff new exe with the refresh delay 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  225
  • Topics Per Day:  0.14
  • Content Count:  798
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

5 hours ago, Berlin said:

Try to diff new exe with the refresh delay 

already to put back the delay but it was still the same 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  696
  • Reputation:   721
  • Joined:  11/12/12
  • Last Seen:  

That's normal. It doesn't really make sense to send a new walking packet for your own character after using @refresh. But you can forcefully send it again in the clif_refresh function (in clif.cpp). Just add the following at the end of the function.

	struct unit_data* ud = unit_bl2ud(&sd->bl);

	if (ud && ud->walktimer != INVALID_TIMER) {
		unit_walktoxy(&sd->bl, ud->to_x, ud->to_y, 4);
	}

Though, it will look a tad weird because the character has to walk from a center cell, so it will "walk back" when using @refresh. You could also send a "unit_stop_walking(&sd->bl, USW_NONE);" if you want the character to stop moving instead. Whichever you prefer.

  • Upvote 1
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  225
  • Topics Per Day:  0.14
  • Content Count:  798
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

1 hour ago, Tokei said:

That's normal. It doesn't really make sense to send a new walking packet for your own character after using @refresh. But you can forcefully send it again in the clif_refresh function (in clif.cpp). Just add the following at the end of the function.

	struct unit_data* ud = unit_bl2ud(&sd->bl);

	if (ud && ud->walktimer != INVALID_TIMER) {
		unit_walktoxy(&sd->bl, ud->to_x, ud->to_y, 4);
	}

Though, it will look a tad weird because the character has to walk from a center cell, so it will "walk back" when using @refresh. You could also send a "unit_stop_walking(&sd->bl, USW_NONE);" if you want the character to stop moving instead. Whichever you prefer.

Hello thank you so much !
 

Edited by GM Winter
  • Like 1
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...