|
|
|
@ -12,6 +12,8 @@
|
|
|
|
|
#include "../mwworld/class.hpp"
|
|
|
|
|
#include "../mwworld/player.hpp"
|
|
|
|
|
|
|
|
|
|
#include "spellcasting.hpp"
|
|
|
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
|
{
|
|
|
|
|
void MechanicsManager::buildPlayer()
|
|
|
|
@ -123,6 +125,19 @@ namespace MWMechanics
|
|
|
|
|
npcStats.getSkill (index).setBase (
|
|
|
|
|
npcStats.getSkill (index).getBase() + bonus);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (i==1)
|
|
|
|
|
{
|
|
|
|
|
// Major skill - add starting spells for this skill if existing
|
|
|
|
|
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
|
|
|
MWWorld::Store<ESM::Spell>::iterator it = store.get<ESM::Spell>().begin();
|
|
|
|
|
for (; it != store.get<ESM::Spell>().end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
if (it->mData.mFlags & ESM::Spell::F_PCStart
|
|
|
|
|
&& spellSchoolToSkill(getSpellSchool(&*it, ptr)) == index)
|
|
|
|
|
creatureStats.getSpells().add(it->mId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|