From e1a37a3319a5d51dad95261fcfde37e12e18de9b Mon Sep 17 00:00:00 2001 From: kokekanon <114332266+kokekanon@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:06:22 -0300 Subject: [PATCH] temp fix: I could not find another solution --- src/client/protocolgameparse.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 1ded05e7d..c7bb8ccac 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -3456,10 +3456,14 @@ CreaturePtr ProtocolGame::getCreature(const InputMessagePtr& msg, int type) cons creature->setMasterId(masterId); creature->setShader(shader); creature->clearTemporaryAttachedEffects(); + std::unordered_set currentAttachedEffectIds; + for (const auto& attachedEffect : creature->getAttachedEffects()) { + currentAttachedEffectIds.insert(attachedEffect->getId()); + } for (const auto effectId : attachedEffectList) { const auto& effect = g_attachedEffects.getById(effectId); - if (effect) { + if (effect && currentAttachedEffectIds.find(effectId) == currentAttachedEffectIds.end()) { const auto& clonedEffect = effect->clone(); clonedEffect->setPermanent(false); creature->attachEffect(clonedEffect);