Skip to content

Commit

Permalink
temp fix: I could not find another solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kokekanon committed Jan 3, 2025
1 parent 17231ac commit e1a37a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/protocolgameparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3456,10 +3456,14 @@ CreaturePtr ProtocolGame::getCreature(const InputMessagePtr& msg, int type) cons
creature->setMasterId(masterId);
creature->setShader(shader);
creature->clearTemporaryAttachedEffects();
std::unordered_set<uint16_t> 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);
Expand Down

0 comments on commit e1a37a3

Please sign in to comment.