1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Merge branch 'self_target' into 'master'

Apply on self effects on projectiles to the target instead

Closes #6321

See merge request OpenMW/openmw!1312
This commit is contained in:
Alexei Kotov 2021-10-21 20:37:11 +00:00
commit 156f2a471a
2 changed files with 5 additions and 1 deletions

View File

@ -53,6 +53,7 @@
Bug #6291: Can't pickup the dead mage's journal from the mysterious hunter mod
Bug #6302: Teleporting disabled actor breaks its disabled state
Bug #6307: Pathfinding in Infidelities quest from Tribunal addon is broken
Bug #6321: Arrow enchantments should always be applied to the target
Bug #6322: Total sold/cost should reset to 0 when there are no items offered
Bug #6323: Wyrmhaven: Alboin doesn't follower the player character out of his house
Bug #6326: Detect Enchantment/Key should detect items in unresolved containers

View File

@ -333,7 +333,10 @@ namespace MWMechanics
mCaster.getClass().skillUsageSucceeded (mCaster, ESM::Skill::Enchant, 3);
}
inflict(mCaster, mCaster, enchantment->mEffects, ESM::RT_Self);
if (isProjectile)
inflict(mTarget, mCaster, enchantment->mEffects, ESM::RT_Self);
else
inflict(mCaster, mCaster, enchantment->mEffects, ESM::RT_Self);
if (isProjectile || !mTarget.isEmpty())
inflict(mTarget, mCaster, enchantment->mEffects, ESM::RT_Touch);