forked from mirror/openmw-tes3mp
[OpenMW] Implement MWWorld::createRecord for Creatures
This commit is contained in:
parent
a2f6d99dfd
commit
7af73782f3
3 changed files with 14 additions and 0 deletions
|
@ -42,6 +42,7 @@ namespace ESM
|
|||
struct EffectList;
|
||||
struct CreatureLevList;
|
||||
struct ItemLevList;
|
||||
struct Creature;
|
||||
}
|
||||
|
||||
namespace MWRender
|
||||
|
@ -328,6 +329,10 @@ namespace MWBase
|
|||
///< Create a new record (of type npc) in the ESM store.
|
||||
/// \return pointer to created record
|
||||
|
||||
virtual const ESM::Creature *createRecord (const ESM::Creature &record) = 0;
|
||||
///< Create a new record (of type creature) in the ESM store.
|
||||
/// \return pointer to created record
|
||||
|
||||
virtual const ESM::Armor *createRecord (const ESM::Armor& record) = 0;
|
||||
///< Create a new record (of type armor) in the ESM store.
|
||||
/// \return pointer to created record
|
||||
|
|
|
@ -1666,6 +1666,11 @@ namespace MWWorld
|
|||
return ret;
|
||||
}
|
||||
|
||||
const ESM::Creature *World::createRecord(const ESM::Creature &record)
|
||||
{
|
||||
return mStore.insert(record);
|
||||
}
|
||||
|
||||
const ESM::Armor *World::createRecord (const ESM::Armor& record)
|
||||
{
|
||||
return mStore.insert(record);
|
||||
|
|
|
@ -436,6 +436,10 @@ namespace MWWorld
|
|||
///< Create a new record (of type npc) in the ESM store.
|
||||
/// \return pointer to created record
|
||||
|
||||
virtual const ESM::Creature *createRecord(const ESM::Creature &record);
|
||||
///< Create a new record (of type creature) in the ESM store.
|
||||
/// \return pointer to created record
|
||||
|
||||
virtual const ESM::Armor *createRecord (const ESM::Armor& record);
|
||||
///< Create a new record (of type armor) in the ESM store.
|
||||
/// \return pointer to created record
|
||||
|
|
Loading…
Reference in a new issue