diff options
author | Haru <haru@dotalux.com> | 2018-12-16 19:32:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-16 19:32:07 +0100 |
commit | 65eacabdc302d02a80bef578fb83b58c5203463e (patch) | |
tree | 9849a91659e185e965b8439c2ea3991601db0dc2 /src/map/clif.c | |
parent | 52360f0cee7916f58da6eda0399f74199f957c44 (diff) | |
parent | 0dda2c717349d11742285c09e73f4ee7a01a1149 (diff) | |
download | hercules-65eacabdc302d02a80bef578fb83b58c5203463e.tar.gz hercules-65eacabdc302d02a80bef578fb83b58c5203463e.tar.bz2 hercules-65eacabdc302d02a80bef578fb83b58c5203463e.tar.xz hercules-65eacabdc302d02a80bef578fb83b58c5203463e.zip |
Merge pull request #2244 from Emistry/incomplete_checkidle
Remove idle when interact with scripts
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 9166c83ea..e8780c6ff 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2219,6 +2219,8 @@ static void clif_scriptmes(struct map_session_data *sd, int npcid, const char *m slen = (int)strlen(mes) + 9; Assert_retv(slen <= INT16_MAX); + pc->update_idle_time(sd, BCIDLE_SCRIPT); + sd->state.dialog = 1; WFIFOHEAD(fd, slen); @@ -2255,6 +2257,8 @@ static void clif_scriptnext(struct map_session_data *sd, int npcid) nullpo_retv(sd); + pc->update_idle_time(sd, BCIDLE_SCRIPT); + fd=sd->fd; WFIFOHEAD(fd, packet_len(0xb5)); WFIFOW(fd,0)=0xb5; @@ -2283,6 +2287,8 @@ static void clif_scriptclose(struct map_session_data *sd, int npcid) nullpo_retv(sd); + pc->update_idle_time(sd, BCIDLE_SCRIPT); + fd=sd->fd; WFIFOHEAD(fd, packet_len(0xb6)); WFIFOW(fd,0)=0xb6; @@ -2354,6 +2360,8 @@ static void clif_scriptmenu(struct map_session_data *sd, int npcid, const char * bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) clif->sendfakenpc(sd, npcid); + pc->update_idle_time(sd, BCIDLE_SCRIPT); + WFIFOHEAD(fd, slen); WFIFOW(fd,0) = 0xb7; WFIFOW(fd,2) = slen; @@ -2385,6 +2393,8 @@ static void clif_scriptinput(struct map_session_data *sd, int npcid) bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) clif->sendfakenpc(sd, npcid); + pc->update_idle_time(sd, BCIDLE_SCRIPT); + fd=sd->fd; WFIFOHEAD(fd, packet_len(0x142)); WFIFOW(fd,0)=0x142; @@ -2415,6 +2425,8 @@ static void clif_scriptinputstr(struct map_session_data *sd, int npcid) bl->y<sd->bl.y-AREA_SIZE-1 || bl->y>sd->bl.y+AREA_SIZE+1)))) clif->sendfakenpc(sd, npcid); + pc->update_idle_time(sd, BCIDLE_SCRIPT); + fd=sd->fd; WFIFOHEAD(fd, packet_len(0x1d4)); WFIFOW(fd,0)=0x1d4; @@ -11571,6 +11583,7 @@ static void clif_npc_buy_result(struct map_session_data *sd, unsigned char resul int fd; nullpo_retv(sd); + pc->update_idle_time(sd, BCIDLE_SCRIPT); fd = sd->fd; WFIFOHEAD(fd,packet_len(0xca)); WFIFOW(fd,0) = 0xca; @@ -11624,6 +11637,7 @@ static void clif_npc_sell_result(struct map_session_data *sd, unsigned char resu int fd; nullpo_retv(sd); + pc->update_idle_time(sd, BCIDLE_SCRIPT); fd = sd->fd; WFIFOHEAD(fd,packet_len(0xcb)); WFIFOW(fd,0) = 0xcb; |