From a4404054bbe79699d82d32227ff659e5c2e90069 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 20 Jan 2014 16:02:39 +0100 Subject: [PATCH] Feature #1130: Add race power spells for NPCs as well, not just the player --- apps/openmw/mwclass/npc.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 6b1be1b8f..ef45fa28a 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -317,6 +317,14 @@ namespace MWClass autoCalculateSkills(ref->mBase, data->mNpcStats, ptr); } + // race powers + const ESM::Race *race = MWBase::Environment::get().getWorld()->getStore().get().find(ref->mBase->mRace); + for (std::vector::const_iterator iter (race->mPowers.mList.begin()); + iter!=race->mPowers.mList.end(); ++iter) + { + data->mNpcStats.getSpells().add (*iter); + } + if (data->mNpcStats.getFactionRanks().size()) { static const int iAutoRepFacMod = MWBase::Environment::get().getWorld()->getStore().get()