mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 10:23:51 +00:00
Feature #1130: Add race power spells for NPCs as well, not just the player
This commit is contained in:
parent
5de8c7fe29
commit
a4404054bb
1 changed files with 8 additions and 0 deletions
|
@ -317,6 +317,14 @@ namespace MWClass
|
||||||
autoCalculateSkills(ref->mBase, data->mNpcStats, ptr);
|
autoCalculateSkills(ref->mBase, data->mNpcStats, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// race powers
|
||||||
|
const ESM::Race *race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(ref->mBase->mRace);
|
||||||
|
for (std::vector<std::string>::const_iterator iter (race->mPowers.mList.begin());
|
||||||
|
iter!=race->mPowers.mList.end(); ++iter)
|
||||||
|
{
|
||||||
|
data->mNpcStats.getSpells().add (*iter);
|
||||||
|
}
|
||||||
|
|
||||||
if (data->mNpcStats.getFactionRanks().size())
|
if (data->mNpcStats.getFactionRanks().size())
|
||||||
{
|
{
|
||||||
static const int iAutoRepFacMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
static const int iAutoRepFacMod = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||||
|
|
Loading…
Reference in a new issue