mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 12:39:59 +00:00
Move WhenStrikes skill success to a more appropriate place
This commit is contained in:
parent
b8db151da7
commit
ea7e0abdc2
@ -603,10 +603,7 @@ namespace MWClass
|
||||
{
|
||||
MWMechanics::CastSpell cast(ptr, victim);
|
||||
cast.mHitPosition = hitPosition;
|
||||
bool success = cast.cast(weapon);
|
||||
|
||||
if (ptr.getRefData().getHandle() == "player" && success)
|
||||
skillUsageSucceeded (ptr, ESM::Skill::Enchant, 3);
|
||||
cast.cast(weapon);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -554,7 +554,10 @@ namespace MWMechanics
|
||||
else if (enchantment->mData.mType != ESM::Enchantment::WhenStrikes)
|
||||
{
|
||||
if (mCaster.getRefData().getHandle() == "player")
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setSelectedEnchantItem(item); // Set again to show the modified charge
|
||||
mCaster.getClass().skillUsageSucceeded (mCaster, ESM::Skill::Enchant, 3);
|
||||
}
|
||||
}
|
||||
|
||||
inflict(mCaster, mCaster, enchantment->mEffects, ESM::RT_Self);
|
||||
|
Loading…
x
Reference in New Issue
Block a user