mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Merge branch '0.7.1-summons-ordering' into 0.7.1
This commit is contained in:
commit
907c5fc6de
@ -751,7 +751,7 @@ namespace MWMechanics
|
||||
{
|
||||
for (std::map<CreatureStats::SummonKey, int>::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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user