diff --git a/apps/openmw/mwmechanics/creaturestats.cpp b/apps/openmw/mwmechanics/creaturestats.cpp index 6d9f53831..2480e329e 100644 --- a/apps/openmw/mwmechanics/creaturestats.cpp +++ b/apps/openmw/mwmechanics/creaturestats.cpp @@ -751,7 +751,7 @@ namespace MWMechanics { for (std::map::iterator it = mSummonedCreatures.begin(); it != mSummonedCreatures.end(); ) { - if (Misc::StringUtils::ciEqual(getSummonedCreature(it->first.first), refId)) + if (Misc::StringUtils::ciEqual(getSummonedCreature(it->first.first), refId) && it->second == -1) { it->second = actorId; break; diff --git a/apps/openmw/mwmp/ObjectList.cpp b/apps/openmw/mwmp/ObjectList.cpp index 28bf7bdc4..7cb1cfa87 100644 --- a/apps/openmw/mwmp/ObjectList.cpp +++ b/apps/openmw/mwmp/ObjectList.cpp @@ -499,7 +499,9 @@ void ObjectList::spawnObjects(MWWorld::CellStore* cellStore) LOG_APPEND(TimedLog::LOG_INFO, "-- adding active spell to master with id %s, effect %i, duration %f", baseObject.summonSpellId.c_str(), baseObject.summonEffectId, baseObject.summonDuration); - masterCreatureStats.getActiveSpells().addSpell(baseObject.summonSpellId, false, activeEffects, "", masterCreatureStats.getActorId()); + auto activeSpells = masterCreatureStats.getActiveSpells(); + if (!activeSpells.isSpellActive(baseObject.summonSpellId)) + activeSpells.addSpell(baseObject.summonSpellId, false, activeEffects, "", masterCreatureStats.getActorId()); LOG_APPEND(TimedLog::LOG_INFO, "-- setting summoned creatureActorId for %i-%i to %i", newPtr.getCellRef().getRefNum(), newPtr.getCellRef().getMpNum(), creatureActorId);