mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-18 16:11:32 +00:00
Merge branch 'magic_effects_fix' into 'master'
Fix magic effects in the editor Closes #7481 See merge request OpenMW/openmw!3798
This commit is contained in:
commit
aa9a99bde5
1 changed files with 13 additions and 0 deletions
|
@ -15,11 +15,13 @@
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
#include <components/esm3/loaddial.hpp>
|
#include <components/esm3/loaddial.hpp>
|
||||||
|
#include <components/esm3/loadmgef.hpp>
|
||||||
#include <components/esm3/loadskil.hpp>
|
#include <components/esm3/loadskil.hpp>
|
||||||
#include <components/misc/strings/lower.hpp>
|
#include <components/misc/strings/lower.hpp>
|
||||||
|
|
||||||
#include "collectionbase.hpp"
|
#include "collectionbase.hpp"
|
||||||
#include "columnbase.hpp"
|
#include "columnbase.hpp"
|
||||||
|
#include "columnimp.hpp"
|
||||||
#include "info.hpp"
|
#include "info.hpp"
|
||||||
#include "land.hpp"
|
#include "land.hpp"
|
||||||
#include "landtexture.hpp"
|
#include "landtexture.hpp"
|
||||||
|
@ -82,6 +84,17 @@ namespace CSMWorld
|
||||||
record.mIndex = index;
|
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)
|
inline ESM::RefId getRecordId(const LandTexture& record)
|
||||||
{
|
{
|
||||||
return ESM::RefId::stringRefId(LandTexture::createUniqueRecordId(record.mPluginIndex, record.mIndex));
|
return ESM::RefId::stringRefId(LandTexture::createUniqueRecordId(record.mPluginIndex, record.mIndex));
|
||||||
|
|
Loading…
Reference in a new issue