1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-14 12:56:40 +00:00

Make Absorb Skill safe for creatures

This commit is contained in:
Evil Eye 2025-09-22 22:13:03 +02:00
parent bed84e209b
commit d2958a17fa
2 changed files with 3 additions and 2 deletions

View file

@ -71,6 +71,7 @@
Bug #8650: Some plants turn invisible when being called types.Container.inventory(cont):isResolved() Bug #8650: Some plants turn invisible when being called types.Container.inventory(cont):isResolved()
Bug #8680: Dead ancestor ghosts stop being dust when you rest near them Bug #8680: Dead ancestor ghosts stop being dust when you rest near them
Bug #8686: openmw-cs: Crash when smoothing terrain of a not-yet-created cell. Bug #8686: openmw-cs: Crash when smoothing terrain of a not-yet-created cell.
Bug #8710: Absorb Skill breaks on creatures
Feature #2522: Support quick item transfer Feature #2522: Support quick item transfer
Feature #3740: Gamepad GUI Mode Feature #3740: Gamepad GUI Mode
Feature #3769: Allow GetSpellEffects on enchantments Feature #3769: Allow GetSpellEffects on enchantments

View file

@ -850,7 +850,7 @@ namespace MWMechanics
else if (!godmode) else if (!godmode)
{ {
damageSkill(target, effect, effect.mMagnitude); damageSkill(target, effect, effect.mMagnitude);
if (!caster.isEmpty()) if (!caster.isEmpty() && caster.getClass().isNpc())
fortifySkill(caster, effect, effect.mMagnitude); fortifySkill(caster, effect, effect.mMagnitude);
} }
break; break;
@ -1302,7 +1302,7 @@ namespace MWMechanics
{ {
const auto caster = world->searchPtrViaActorId(spellParams.getCasterActorId()); const auto caster = world->searchPtrViaActorId(spellParams.getCasterActorId());
restoreSkill(target, effect, effect.mMagnitude); restoreSkill(target, effect, effect.mMagnitude);
if (!caster.isEmpty()) if (!caster.isEmpty() && caster.getClass().isNpc())
fortifySkill(caster, effect, -effect.mMagnitude); fortifySkill(caster, effect, -effect.mMagnitude);
} }
break; break;