mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 22:45:15 -04:00
Get soul magnitude before checking the rebalance setting
This commit is contained in:
parent
9346a552fa
commit
028b528c0b
@ -87,10 +87,10 @@ namespace MWClass
|
|||||||
const ESM::Creature *creature = MWBase::Environment::get().getWorld()->getStore().get<ESM::Creature>().search(ref->mRef.getSoul());
|
const ESM::Creature *creature = MWBase::Environment::get().getWorld()->getStore().get<ESM::Creature>().search(ref->mRef.getSoul());
|
||||||
if (creature)
|
if (creature)
|
||||||
{
|
{
|
||||||
|
int soul = creature->mData.mSoul;
|
||||||
if (Settings::Manager::getBool("rebalance soulgem values", "Game"))
|
if (Settings::Manager::getBool("rebalance soulgem values", "Game"))
|
||||||
{
|
{
|
||||||
// use soulgem value rebalance formula from morrowind code patch
|
// use soulgem value rebalance formula from morrowind code patch
|
||||||
int soul = creature->mData.mSoul;
|
|
||||||
float soulValue = 0.0001 * pow(soul, 3) + 2 * soul;
|
float soulValue = 0.0001 * pow(soul, 3) + 2 * soul;
|
||||||
|
|
||||||
// for Azura's star add the unfilled value
|
// for Azura's star add the unfilled value
|
||||||
@ -100,7 +100,7 @@ namespace MWClass
|
|||||||
value = soulValue;
|
value = soulValue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
value *= creature->mData.mSoul;
|
value *= soul;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user