forked from teamnwah/openmw-tes3coop
added missing initialisation of NPC/creature spell lists from ESX records
This commit is contained in:
parent
bcf3a81a6c
commit
6c928e93d3
2 changed files with 10 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue