Skip to content

Commit c3e2e69

Browse files
committed
[General] Support multiple effect summons
1 parent f17f324 commit c3e2e69

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/cell/base.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ function BaseCell:SaveObjectsSpawned(objects)
453453
local summon = {}
454454
summon.duration = object.summon.duration
455455
summon.effectId = object.summon.effectId
456+
summon.effectIndex = object.summon.effectIndex
456457
summon.spellId = object.summon.spellId
457458
summon.startTime = object.summon.startTime
458459

scripts/packetBuilder.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ packetBuilder.AddObjectSpawn = function(uniqueIndex, objectData)
6666
if objectData.summon ~= nil then
6767
tes3mp.SetObjectSummonState(true)
6868
tes3mp.SetObjectSummonEffectId(objectData.summon.effectId)
69+
tes3mp.SetObjectSummonEffectIndex(objectData.summon.effectIndex)
6970
tes3mp.SetObjectSummonSpellId(objectData.summon.spellId)
7071

7172
local currentTime = os.time()

scripts/packetReader.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ packetReader.GetObjectPacketTables = function(packetType)
183183
if summonState == true then
184184
object.summon = {}
185185
object.summon.effectId = tes3mp.GetObjectSummonEffectId(packetIndex)
186+
object.summon.effectIndex = tes3mp.GetObjectSummonEffectIndex(packetIndex)
186187
object.summon.spellId = tes3mp.GetObjectSummonSpellId(packetIndex)
187188
object.summon.duration = tes3mp.GetObjectSummonDuration(packetIndex)
188189
object.summon.startTime = os.time()

0 commit comments

Comments
 (0)