Use EquipItemEx to re-equip items after turning back from the werewolf form
This commit is contained in:
parent
1081d60eec
commit
b81e14aed9
@ -15,6 +15,7 @@ Beware, spoilers ahead!
|
|||||||
-- Marking NPCs no longer happens solely by pointing, press "Activate" to mark an actor.
|
-- Marking NPCs no longer happens solely by pointing, press "Activate" to mark an actor.
|
||||||
- Added the light attach crash fix by powerofthree.
|
- Added the light attach crash fix by powerofthree.
|
||||||
- Fixed hightlighting of permanent effects in the hero menu (regression since 2.1).
|
- Fixed hightlighting of permanent effects in the hero menu (regression since 2.1).
|
||||||
|
- Fixed apparition talismans not recognized as equipped after turning back from the werewolf form.
|
||||||
|
|
||||||
|
|
||||||
2.1.1 (2024-04-24)
|
2.1.1 (2024-04-24)
|
||||||
|
Binary file not shown.
@ -216,24 +216,25 @@ EndFunction
|
|||||||
|
|
||||||
Function equipeItems()
|
Function equipeItems()
|
||||||
Actor PlayerRef = Game.GetPlayer()
|
Actor PlayerRef = Game.GetPlayer()
|
||||||
|
bool bSKSE = SKSE.GetVersion() as bool
|
||||||
|
|
||||||
if whatKindRight == 2
|
if whatKindRight == 2
|
||||||
PlayerRef.EquipSpell(EquippedItemRight as Spell, 1)
|
PlayerRef.EquipSpell(EquippedItemRight as Spell, 1)
|
||||||
elseif EquippedItemRight && PlayerRef.GetItemCount(EquippedItemRight) > 0
|
elseif EquippedItemRight && PlayerRef.GetItemCount(EquippedItemRight) > 0
|
||||||
if SKSE.GetVersion()
|
if bSKSE
|
||||||
PlayerRef.EquipItemEx(EquippedItemRight, 1)
|
PlayerRef.EquipItemEx(EquippedItemRight, 1)
|
||||||
else
|
else
|
||||||
PlayerRef.equipitem(EquippedItemRight, false, true)
|
PlayerRef.EquipItem(EquippedItemRight, false, true)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if whatKindLeft == 2
|
if whatKindLeft == 2
|
||||||
PlayerRef.EquipSpell(EquippedItemLeft as Spell, 0)
|
PlayerRef.EquipSpell(EquippedItemLeft as Spell, 0)
|
||||||
elseif EquippedItemLeft && PlayerRef.GetItemCount(EquippedItemLeft) > 0
|
elseif EquippedItemLeft && PlayerRef.GetItemCount(EquippedItemLeft) > 0
|
||||||
if SKSE.GetVersion()
|
if bSKSE
|
||||||
PlayerRef.EquipItemEx(EquippedItemLeft, 2)
|
PlayerRef.EquipItemEx(EquippedItemLeft, 2)
|
||||||
else
|
else
|
||||||
PlayerRef.equipitem(EquippedItemLeft, false, true)
|
PlayerRef.EquipItem(EquippedItemLeft, false, true)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -241,10 +242,15 @@ Function equipeItems()
|
|||||||
while index > 0
|
while index > 0
|
||||||
index -= 1
|
index -= 1
|
||||||
If wornArmor[index] && PlayerRef.GetItemCount(wornArmor[index]) > 0
|
If wornArmor[index] && PlayerRef.GetItemCount(wornArmor[index]) > 0
|
||||||
|
if bSKSE
|
||||||
|
; EquipItemEx triggers OnEquipped properly
|
||||||
|
PlayerRef.EquipItemEx(wornArmor[index], 0, false, false)
|
||||||
|
else
|
||||||
;removing and readding items fixes the issue that set bonuses wouldn't apply properly after re-transforming
|
;removing and readding items fixes the issue that set bonuses wouldn't apply properly after re-transforming
|
||||||
PlayerRef.RemoveItem(wornArmor[index], 1, true, _00E_TransformStorageREF)
|
PlayerRef.RemoveItem(wornArmor[index], 1, true, _00E_TransformStorageREF)
|
||||||
_00E_TransformStorageREF.RemoveItem(wornArmor[index], 1, true, PlayerRef)
|
_00E_TransformStorageREF.RemoveItem(wornArmor[index], 1, true, PlayerRef)
|
||||||
PlayerRef.EquipItem(wornArmor[index],false,true)
|
PlayerRef.EquipItem(wornArmor[index], false, true)
|
||||||
|
endif
|
||||||
EndIf
|
EndIf
|
||||||
Endwhile
|
Endwhile
|
||||||
endFunction
|
endFunction
|
Loading…
Reference in New Issue
Block a user