diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2018-10-02 22:13:14 +0800 |
---|---|---|
committer | Emistry Haoyan <equinox1991@gmail.com> | 2018-10-02 23:06:22 +0800 |
commit | 0dda2c717349d11742285c09e73f4ee7a01a1149 (patch) | |
tree | a4e4d32a41ac3db60909ef721ff3627fd36398ca /src/map | |
parent | 852c13305f67948531bd0277eb1922dbd02b1f26 (diff) | |
download | hercules-0dda2c717349d11742285c09e73f4ee7a01a1149.tar.gz hercules-0dda2c717349d11742285c09e73f4ee7a01a1149.tar.bz2 hercules-0dda2c717349d11742285c09e73f4ee7a01a1149.tar.xz hercules-0dda2c717349d11742285c09e73f4ee7a01a1149.zip |
Update idle criteria
- remove idle when interact with scripts.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/map/battle.h b/src/map/battle.h index 9f5207e95..3458a72dd 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -584,6 +584,7 @@ enum e_battle_config_idletime { BCIDLE_EMOTION = 0x080, BCIDLE_DROPITEM = 0x100, BCIDLE_ATCOMMAND = 0x200, + BCIDLE_SCRIPT = 0x400, }; // Damage delayed info diff --git a/src/map/clif.c b/src/map/clif.c index 76625f0ba..b9942d72c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2215,6 +2215,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); @@ -2251,6 +2253,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; @@ -2279,6 +2283,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; @@ -2350,6 +2356,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; @@ -2381,6 +2389,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; @@ -2411,6 +2421,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; @@ -11372,6 +11384,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; @@ -11425,6 +11438,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; |