added missing initialisation of NPC/creature spell lists from ESX records

This commit is contained in:
Marc Zinnschlag 2012-09-10 13:04:00 +02:00
parent bcf3a81a6c
commit 6c928e93d3
2 changed files with 10 additions and 0 deletions

View file

@ -66,6 +66,11 @@ namespace MWClass
data->mCreatureStats.setFlee(ref->base->mAiData.mFlee);
data->mCreatureStats.setAlarm(ref->base->mAiData.mAlarm);
// spells
for (std::vector<std::string>::const_iterator iter (ref->base->mSpells.list.begin());
iter!=ref->base->mSpells.list.end(); ++iter)
data->mCreatureStats.getSpells().add (*iter);
// store
ptr.getRefData().setCustomData (data.release());
}

View file

@ -105,6 +105,11 @@ namespace MWClass
data->mCreatureStats.setFlee(ref->base->mAiData.mFlee);
data->mCreatureStats.setAlarm(ref->base->mAiData.mAlarm);
// spells
for (std::vector<std::string>::const_iterator iter (ref->base->spells.list.begin());
iter!=ref->base->spells.list.end(); ++iter)
data->mCreatureStats.getSpells().add (*iter);
// store
ptr.getRefData().setCustomData (data.release());
}