From 2d4e3f48885bece0c74750811a41e2891fcda39e Mon Sep 17 00:00:00 2001 From: Emagi Date: Sat, 1 Feb 2025 06:52:55 -0500 Subject: [PATCH] Fix to clear the stealth/invis list when CancelAllStealth is called, additionally to send the update to clients --- source/WorldServer/Entity.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/WorldServer/Entity.cpp b/source/WorldServer/Entity.cpp index f3836f9..2291762 100644 --- a/source/WorldServer/Entity.cpp +++ b/source/WorldServer/Entity.cpp @@ -2694,6 +2694,7 @@ void Entity::CancelAllStealth() { } did_change = true; } + stealth_list->clear(); } MutexList* invis_list = control_effects[CONTROL_EFFECT_TYPE_INVIS]; if (invis_list){ @@ -2707,14 +2708,17 @@ void Entity::CancelAllStealth() { } did_change = true; } + invis_list->clear(); } if (did_change){ info_changed = true; changed = true; AddChangedZoneSpawn(); - if (IsPlayer()) + if (IsPlayer()) { ((Player*)this)->SetCharSheetChanged(true); + GetZone()->SendAllSpawnsForVisChange(((Player*)this)->GetClient()); + } } }