From 939567d361edf7a272d8d698fafc61cdfc308cf3 Mon Sep 17 00:00:00 2001 From: Atemo Date: Sun, 16 Apr 2023 14:58:47 +0200 Subject: [PATCH] Fixed an issue with cloak*npc (#7715) * all the npcs saved in pc should be removed on map change --- src/map/pc.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 4f4290e4af..edd2744758 100755 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -6889,15 +6889,8 @@ enum e_setpos pc_setpos(map_session_data* sd, unsigned short mapindex, int x, in channel_pcquit(sd,4); //quit map chan - // Remove Cloaked NPC if changing to another map - for (auto it = sd->cloaked_npc.begin(); it != sd->cloaked_npc.end(); ++it) { - block_list *npc_bl = map_id2bl(*it); - - if (npc_bl && npc_bl->m != m) { - sd->cloaked_npc.erase(it); - break; - } - } + // Remove Cloaked NPCs on map change + sd->cloaked_npc.clear(); } if( m < 0 )