|
|
|
@ -76,9 +76,64 @@ int Function GetWeaponDamage(Weapon weapID) |
|
|
|
|
|
|
|
|
|
EndFunction |
|
|
|
|
|
|
|
|
|
function saveEquippedItemsVanilla() |
|
|
|
|
|
|
|
|
|
Actor PlayerRef = Game.GetForm(0x14) as Actor |
|
|
|
|
|
|
|
|
|
EquippedItemLeft = PlayerRef.GetEquippedWeapon(true) as Form |
|
|
|
|
if ! EquippedItemLeft |
|
|
|
|
EquippedItemLeft = PlayerRef.GetEquippedSpell(0) as Form |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
EquippedItemRight = PlayerRef.GetEquippedWeapon(false) as Form |
|
|
|
|
if ! EquippedItemRight |
|
|
|
|
EquippedItemRight = PlayerRef.GetEquippedSpell(1) as Form |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
If !EquippedItemRight |
|
|
|
|
whatKindRight = 0 |
|
|
|
|
ElseIf (EquippedItemRight as Weapon) |
|
|
|
|
;weaponDamageSpeed += GetWeaponDamage(EquippedItemRight as Weapon) |
|
|
|
|
whatKindRight = 1 |
|
|
|
|
ElseIf (EquippedItemRight as Spell) |
|
|
|
|
whatKindRight = 2 |
|
|
|
|
Else |
|
|
|
|
whatKindRight = 1 |
|
|
|
|
EndIf |
|
|
|
|
|
|
|
|
|
If !EquippedItemLeft |
|
|
|
|
whatKindLeft = 0 |
|
|
|
|
ElseIf (EquippedItemLeft as Weapon) |
|
|
|
|
;GetWeaponDamage(EquippedItemLeft as Weapon) |
|
|
|
|
whatKindLeft = 1 |
|
|
|
|
ElseIf (EquippedItemLeft as Spell) |
|
|
|
|
whatKindLeft = 2 |
|
|
|
|
Else |
|
|
|
|
whatKindLeft = 1 |
|
|
|
|
EndIf |
|
|
|
|
|
|
|
|
|
wornArmor = new Armor[15] |
|
|
|
|
wornArmor[0] = PlayerRef.GetEquippedArmorInSlot(30) as Armor |
|
|
|
|
wornArmor[1] = PlayerRef.GetEquippedArmorInSlot(31) as Armor |
|
|
|
|
wornArmor[2] = PlayerRef.GetEquippedArmorInSlot(32) as Armor |
|
|
|
|
wornArmor[3] = PlayerRef.GetEquippedArmorInSlot(33) as Armor |
|
|
|
|
wornArmor[4] = PlayerRef.GetEquippedArmorInSlot(34) as Armor |
|
|
|
|
wornArmor[5] = PlayerRef.GetEquippedArmorInSlot(35) as Armor |
|
|
|
|
wornArmor[6] = PlayerRef.GetEquippedArmorInSlot(36) as Armor |
|
|
|
|
wornArmor[7] = PlayerRef.GetEquippedArmorInSlot(37) as Armor |
|
|
|
|
wornArmor[8] = PlayerRef.GetEquippedArmorInSlot(38) as Armor |
|
|
|
|
wornArmor[9] = PlayerRef.GetEquippedArmorInSlot(39) as Armor |
|
|
|
|
wornArmor[10] = PlayerRef.GetEquippedArmorInSlot(40) as Armor |
|
|
|
|
wornArmor[11] = PlayerRef.GetEquippedArmorInSlot(41) as Armor |
|
|
|
|
wornArmor[12] = PlayerRef.GetEquippedArmorInSlot(42) as Armor |
|
|
|
|
wornArmor[13] = PlayerRef.GetEquippedArmorInSlot(43) as Armor |
|
|
|
|
wornArmor[13] = PlayerRef.GetEquippedArmorInSlot(47) as Armor ; backpack |
|
|
|
|
|
|
|
|
|
endfunction |
|
|
|
|
|
|
|
|
|
Function saveEquippedItems() |
|
|
|
|
|
|
|
|
|
Actor PlayerRef = Game.GetPlayer() |
|
|
|
|
Actor PlayerRef = Game.GetForm(0x14) as Actor |
|
|
|
|
|
|
|
|
|
EquippedItemLeft = PlayerRef.GetEquippedObject(0) |
|
|
|
|
EquippedItemRight = PlayerRef.GetEquippedObject(1) |
|
|
|
@ -164,7 +219,7 @@ Function equipeItems() |
|
|
|
|
|
|
|
|
|
if whatKindRight == 2 |
|
|
|
|
PlayerRef.EquipSpell(EquippedItemRight as Spell, 1) |
|
|
|
|
elseif PlayerRef.GetItemCount(EquippedItemRight) > 0 |
|
|
|
|
elseif EquippedItemRight && PlayerRef.GetItemCount(EquippedItemRight) > 0 |
|
|
|
|
if SKSE.GetVersion() |
|
|
|
|
PlayerRef.EquipItemEx(EquippedItemRight, 1) |
|
|
|
|
else |
|
|
|
@ -174,7 +229,7 @@ Function equipeItems() |
|
|
|
|
|
|
|
|
|
if whatKindLeft == 2 |
|
|
|
|
PlayerRef.EquipSpell(EquippedItemLeft as Spell, 0) |
|
|
|
|
elseif PlayerRef.GetItemCount(EquippedItemLeft) > 0 |
|
|
|
|
elseif EquippedItemLeft && PlayerRef.GetItemCount(EquippedItemLeft) > 0 |
|
|
|
|
if SKSE.GetVersion() |
|
|
|
|
PlayerRef.EquipItemEx(EquippedItemLeft, 2) |
|
|
|
|
else |
|
|
|
|