diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index d4dc5ea00..72f1be7a8 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -18,8 +18,8 @@ namespace MWMechanics { // magic effects adjustMagicEffects (ptr); - calculateDynamicStats (ptr); calculateCreatureStatModifiers (ptr); + calculateDynamicStats (ptr); } void Actors::updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused) @@ -78,7 +78,7 @@ namespace MWMechanics int modifier = creatureStats.mMagicEffects.get (EffectKey (79, i)).mMagnitude - creatureStats.mMagicEffects.get (EffectKey (17, i)).mMagnitude; - creatureStats.mAttributes[0].setModifier (modifier); + creatureStats.mAttributes[i].setModifier (modifier); } // dynamic stats @@ -87,7 +87,7 @@ namespace MWMechanics int modifier = creatureStats.mMagicEffects.get (EffectKey (80+i)).mMagnitude - creatureStats.mMagicEffects.get (EffectKey (18+i)).mMagnitude; - creatureStats.mDynamic[0].setModifier (modifier); + creatureStats.mDynamic[i].setModifier (modifier); } } diff --git a/apps/openmw/mwworld/actionapply.cpp b/apps/openmw/mwworld/actionapply.cpp index c5228d798..b330a70e7 100644 --- a/apps/openmw/mwworld/actionapply.cpp +++ b/apps/openmw/mwworld/actionapply.cpp @@ -22,7 +22,7 @@ namespace MWWorld void ActionApplyWithSkill::execute() { - if (MWWorld::Class::get (mTarget).apply (mTarget, mId, mActor)) + if (MWWorld::Class::get (mTarget).apply (mTarget, mId, mActor) && mUsageType!=-1) MWWorld::Class::get (mTarget).skillUsageSucceeded (mActor, mSkillIndex, mUsageType); } }