Added fallbacks for GetType() and GetBaseDamage()
This commit is contained in:
parent
1b91e81321
commit
dae5c10a96
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -128,6 +128,10 @@ EndFunction
|
||||
|
||||
float Function GetDealtDamage(Form akDamageSource)
|
||||
|
||||
if ! SKSE.GetVersion()
|
||||
return 55.0
|
||||
endif
|
||||
|
||||
bool bIsSpell
|
||||
bool bIsArrow
|
||||
|
||||
|
@ -37,7 +37,7 @@ Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile,
|
||||
_00E_NQG07_s_PetrifiedCombatAttackHasNoEffect.Show()
|
||||
MAGFail.Play(akSelf)
|
||||
Else
|
||||
DamageShield(akSource, akSource.GetType())
|
||||
DamageShield(akSource)
|
||||
MAGShockImpact.Play(akSelf)
|
||||
If !bIsFlickering
|
||||
Flicker()
|
||||
@ -129,9 +129,9 @@ Function Flicker()
|
||||
|
||||
EndFunction
|
||||
|
||||
Function DamageShield(Form akDamageSource, int iDamageSourceType)
|
||||
Function DamageShield(Form akDamageSource)
|
||||
|
||||
__Config_fShieldStrength = __Config_fShieldStrength - GetDealtDamage(akDamageSource, iDamageSourceType)
|
||||
__Config_fShieldStrength = __Config_fShieldStrength - GetDealtDamage(akDamageSource)
|
||||
|
||||
If (__Config_fShieldStrength > 0) && ((fOriginalStrength - fCurrentSubtrahend) >= __Config_fShieldStrength)
|
||||
float fCurrentPercentage = ((__Config_fShieldStrength)/(fOriginalStrength/100))
|
||||
@ -145,12 +145,20 @@ Function DamageShield(Form akDamageSource, int iDamageSourceType)
|
||||
|
||||
EndFunction
|
||||
|
||||
float Function GetDealtDamage(Form akDamageSource, int iDamageSourceType)
|
||||
float Function GetDealtDamage(Form akDamageSource)
|
||||
|
||||
Weapon wpSourceWeapon = akDamageSource as Weapon
|
||||
|
||||
if wpSourceWeapon
|
||||
if ! SKSE.GetVersion()
|
||||
if PlayerREF.GetEquippedItemType(1) == 5 || PlayerREF.GetEquippedItemType(1) == 6
|
||||
return 50.0
|
||||
endif
|
||||
return 40
|
||||
endif
|
||||
|
||||
if iDamageSourceType == 41
|
||||
Weapon wpSourceWeapon = akDamageSource as Weapon
|
||||
Return wpSourceWeapon.GetBaseDamage() as Float
|
||||
Elseif iDamageSourceType == 22 || iDamageSourceType == 21
|
||||
Else
|
||||
Return 25.0
|
||||
EndIf
|
||||
|
||||
|
@ -471,7 +471,7 @@ State Transfomed
|
||||
EndEvent
|
||||
|
||||
Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
|
||||
if (akBaseObject != _00E_Theriantrophist_Claws) || akBaseObject.GetType() == 119
|
||||
if akBaseObject != _00E_Theriantrophist_Claws
|
||||
self.getActorReference().UnequipItem(akBaseObject)
|
||||
self.getActorReference().equipItem(_00E_Theriantrophist_Claws, abSilent = true)
|
||||
Endif
|
||||
|
Loading…
Reference in New Issue
Block a user