1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

[Client] Fix double summoning magical effects

This commit is contained in:
uramer 2020-03-20 22:28:00 +01:00
parent 3e7230e89d
commit ee84868b7d

View file

@ -495,7 +495,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);