From 0bdc4bd177ba2718cd0ec68d2106aa8dee77f6e9 Mon Sep 17 00:00:00 2001 From: Emistry Haoyan Date: Wed, 10 Jul 2019 00:06:00 +0800 Subject: 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. --- src/map/atcommand.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/map') 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; } -- cgit v1.2.3-70-g09d2