mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
Implement Charm magic effect
This commit is contained in:
parent
14b70a3ce6
commit
44e96fcaaa
2 changed files with 3 additions and 1 deletions
|
@ -228,7 +228,7 @@ namespace MWMechanics
|
||||||
|
|
||||||
now += creatureStats.getActiveSpells().getMagicEffects();
|
now += creatureStats.getActiveSpells().getMagicEffects();
|
||||||
|
|
||||||
MagicEffects diff = MagicEffects::diff (creatureStats.getMagicEffects(), now);
|
//MagicEffects diff = MagicEffects::diff (creatureStats.getMagicEffects(), now);
|
||||||
|
|
||||||
creatureStats.setMagicEffects(now);
|
creatureStats.setMagicEffects(now);
|
||||||
|
|
||||||
|
|
|
@ -481,6 +481,8 @@ namespace MWMechanics
|
||||||
if (playerStats.getDrawState() == MWMechanics::DrawState_Weapon)
|
if (playerStats.getDrawState() == MWMechanics::DrawState_Weapon)
|
||||||
x += MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fDispWeaponDrawn")->getFloat();
|
x += MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fDispWeaponDrawn")->getFloat();
|
||||||
|
|
||||||
|
x += ptr.getClass().getCreatureStats(ptr).getMagicEffects().get(ESM::MagicEffect::Charm).mMagnitude;
|
||||||
|
|
||||||
int effective_disposition = std::max(0,std::min(int(x),100));//, normally clamped to [0..100] when used
|
int effective_disposition = std::max(0,std::min(int(x),100));//, normally clamped to [0..100] when used
|
||||||
return effective_disposition;
|
return effective_disposition;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue