mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Move WhenStrikes skill success to a more appropriate place
This commit is contained in:
parent
b8db151da7
commit
ea7e0abdc2
2 changed files with 4 additions and 4 deletions
|
@ -603,10 +603,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWMechanics::CastSpell cast(ptr, victim);
|
MWMechanics::CastSpell cast(ptr, victim);
|
||||||
cast.mHitPosition = hitPosition;
|
cast.mHitPosition = hitPosition;
|
||||||
bool success = cast.cast(weapon);
|
cast.cast(weapon);
|
||||||
|
|
||||||
if (ptr.getRefData().getHandle() == "player" && success)
|
|
||||||
skillUsageSucceeded (ptr, ESM::Skill::Enchant, 3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -554,7 +554,10 @@ namespace MWMechanics
|
||||||
else if (enchantment->mData.mType != ESM::Enchantment::WhenStrikes)
|
else if (enchantment->mData.mType != ESM::Enchantment::WhenStrikes)
|
||||||
{
|
{
|
||||||
if (mCaster.getRefData().getHandle() == "player")
|
if (mCaster.getRefData().getHandle() == "player")
|
||||||
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->setSelectedEnchantItem(item); // Set again to show the modified charge
|
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);
|
inflict(mCaster, mCaster, enchantment->mEffects, ESM::RT_Self);
|
||||||
|
|
Loading…
Reference in a new issue