diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2019-07-10 00:06:00 +0800 |
---|---|---|
committer | Emistry Haoyan <equinox1991@gmail.com> | 2019-07-10 00:06:00 +0800 |
commit | 0bdc4bd177ba2718cd0ec68d2106aa8dee77f6e9 (patch) | |
tree | 2b6b56afcc40fb459d03b29921069f7102bf4d12 /src | |
parent | a5eb6ec995612c878a3b6cb522520ffae8b13a3b (diff) | |
download | hercules-0bdc4bd177ba2718cd0ec68d2106aa8dee77f6e9.tar.gz hercules-0bdc4bd177ba2718cd0ec68d2106aa8dee77f6e9.tar.bz2 hercules-0bdc4bd177ba2718cd0ec68d2106aa8dee77f6e9.tar.xz hercules-0bdc4bd177ba2718cd0ec68d2106aa8dee77f6e9.zip |
Disable refresh atcommand when talk with NPC.
- using `@refresh` during NPC conversation will caused player stucked
due to unable to close the NPC dialog that no longer visible.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a2db15f6c..ff71d97aa 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6752,6 +6752,9 @@ ACMD(mute) *------------------------------------------*/ ACMD(refresh) { + if (sd->npc_id > 0) + return false; + clif->refresh(sd); return true; } @@ -6763,7 +6766,8 @@ ACMD(refreshall) iter = mapit_getallusers(); for (iter_sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); iter_sd = BL_UCAST(BL_PC, mapit->next(iter))) - clif->refresh(iter_sd); + if (iter_sd->npc_id <= 0) + clif->refresh(iter_sd); mapit->free(iter); return true; } |