mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-05 15:55:45 +00:00
Update magic effects when changing equipment (Fixes #1646)
This commit is contained in:
parent
7f807f31d0
commit
084cc857d4
@ -543,6 +543,9 @@ namespace MWGui
|
||||
if (MWBase::Environment::get().getWindowManager()->getSpellWindow())
|
||||
MWBase::Environment::get().getWindowManager()->getSpellWindow()->updateSpells();
|
||||
|
||||
MWBase::Environment::get().getMechanicsManager()->updateMagicEffects(
|
||||
MWBase::Environment::get().getWorld()->getPlayerPtr());
|
||||
|
||||
mPreviewDirty = true;
|
||||
}
|
||||
|
||||
|
@ -1458,4 +1458,10 @@ namespace MWMechanics
|
||||
mActors.clear();
|
||||
mDeathCount.clear();
|
||||
}
|
||||
|
||||
void Actors::updateMagicEffects(const MWWorld::Ptr &ptr)
|
||||
{
|
||||
adjustMagicEffects(ptr);
|
||||
calculateCreatureStatModifiers(ptr, 0.f);
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ namespace MWMechanics
|
||||
|
||||
/// Update magic effects for an actor. Usually done automatically once per frame, but if we're currently
|
||||
/// paused we may want to do it manually (after equipping permanent enchantment)
|
||||
void updateMagicEffects (const MWWorld::Ptr& ptr) { adjustMagicEffects(ptr); }
|
||||
void updateMagicEffects (const MWWorld::Ptr& ptr);
|
||||
|
||||
void addActor (const MWWorld::Ptr& ptr, bool updateImmediately=false);
|
||||
///< Register an actor for stats management
|
||||
|
Loading…
Reference in New Issue
Block a user