mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Fix magic effects in the editor
This commit is contained in:
parent
a41259cca8
commit
e01e2f1ae0
@ -15,11 +15,13 @@
|
||||
#include <QVariant>
|
||||
|
||||
#include <components/esm3/loaddial.hpp>
|
||||
#include <components/esm3/loadmgef.hpp>
|
||||
#include <components/esm3/loadskil.hpp>
|
||||
#include <components/misc/strings/lower.hpp>
|
||||
|
||||
#include "collectionbase.hpp"
|
||||
#include "columnbase.hpp"
|
||||
#include "columnimp.hpp"
|
||||
#include "info.hpp"
|
||||
#include "land.hpp"
|
||||
#include "landtexture.hpp"
|
||||
@ -82,6 +84,17 @@ namespace CSMWorld
|
||||
record.mIndex = index;
|
||||
}
|
||||
|
||||
inline ESM::RefId getRecordId(const ESM::MagicEffect& record)
|
||||
{
|
||||
return ESM::RefId::stringRefId(CSMWorld::getStringId(record.mId));
|
||||
}
|
||||
|
||||
inline void setRecordId(const ESM::RefId& id, ESM::MagicEffect& record)
|
||||
{
|
||||
int index = ESM::MagicEffect::indexNameToIndex(id.getRefIdString());
|
||||
record.mId = ESM::RefId::index(ESM::REC_MGEF, static_cast<std::uint32_t>(index));
|
||||
}
|
||||
|
||||
inline ESM::RefId getRecordId(const LandTexture& record)
|
||||
{
|
||||
return ESM::RefId::stringRefId(LandTexture::createUniqueRecordId(record.mPluginIndex, record.mIndex));
|
||||
|
Loading…
x
Reference in New Issue
Block a user