forked from mirror/openmw-tes3mp
Use soulgem value rebalance formula from morrowind code patch
This commit is contained in:
parent
ec900ef4ad
commit
4b1247597e
1 changed files with 13 additions and 2 deletions
|
@ -84,8 +84,19 @@ namespace MWClass
|
||||||
if (ptr.getCellRef().getSoul() != "")
|
if (ptr.getCellRef().getSoul() != "")
|
||||||
{
|
{
|
||||||
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) {
|
||||||
value *= creature->mData.mSoul;
|
// value *= creature->mData.mSoul;
|
||||||
|
|
||||||
|
// use soulgem value rebalance formula from morrowind code patch
|
||||||
|
int soul = creature->mData.mSoul;
|
||||||
|
float soul_value = 0.0001 * pow(soul, 3) + 2 * soul;
|
||||||
|
|
||||||
|
// for Azura's star add the unfilled value
|
||||||
|
if (Misc::StringUtils::ciEqual(ptr.getCellRef().getRefId(), "Misc_SoulGem_Azura"))
|
||||||
|
value += soul_value;
|
||||||
|
else
|
||||||
|
value = soul_value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|
Loading…
Reference in a new issue