|
|
|
@ -9,6 +9,7 @@
|
|
|
|
|
|
|
|
|
|
#include <osg/Math>
|
|
|
|
|
|
|
|
|
|
#include <apps/opencs/model/world/cell.hpp>
|
|
|
|
|
#include <components/esm/defs.hpp>
|
|
|
|
|
#include <components/esm3/loadbody.hpp>
|
|
|
|
|
#include <components/esm3/loadinfo.hpp>
|
|
|
|
@ -61,7 +62,7 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mId.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mId.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isEditable() const override { return false; }
|
|
|
|
@ -333,6 +334,31 @@ namespace CSMWorld
|
|
|
|
|
bool isEditable() const override { return true; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
|
struct NameColumn<CSMWorld::Cell> : public Column<CSMWorld::Cell>
|
|
|
|
|
{
|
|
|
|
|
NameColumn(ColumnBase::Display display = ColumnBase::Display_String)
|
|
|
|
|
: Column<CSMWorld::Cell>(Columns::ColumnId_Name, display)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<CSMWorld::Cell>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mName.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<CSMWorld::Cell>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
CSMWorld::Cell record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mName = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isEditable() const override { return true; }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <typename ESXRecordT>
|
|
|
|
|
struct AttributesColumn : public Column<ESXRecordT>
|
|
|
|
|
{
|
|
|
|
@ -690,14 +716,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mSleepList.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mSleepList.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mSleepList = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mSleepList = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -816,14 +842,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mRegion.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mRegion.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mRegion = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mRegion = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -845,14 +871,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mCell.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mCell.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mCell = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mCell = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -872,14 +898,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mOriginalCell.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mOriginalCell.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mOriginalCell = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mOriginalCell = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -899,14 +925,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mRefID.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mRefID.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mRefID = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mRefID = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -944,14 +970,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mOwner.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mOwner.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mOwner = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mOwner = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -969,14 +995,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mSoul.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mSoul.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mSoul = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mSoul = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -994,14 +1020,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mFaction.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mFaction.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mFaction = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mFaction = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1121,14 +1147,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mDestCell.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mDestCell.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mDestCell = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mDestCell = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1168,14 +1194,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mKey.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mKey.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mKey = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mKey = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1193,14 +1219,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mTrap.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mTrap.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mTrap = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mTrap = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1407,14 +1433,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mTopicId.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mTopicId.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mTopicId = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mTopicId = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1434,14 +1460,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mActor.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mActor.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mActor = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mActor = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1459,14 +1485,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mRace.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mRace.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mRace = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mRace = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1484,14 +1510,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mClass.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mClass.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mClass = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mClass = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1509,14 +1535,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mPcFaction.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mPcFaction.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mPcFaction = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mPcFaction = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1926,14 +1952,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mSound.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mSound.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mSound = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mSound = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -1951,14 +1977,14 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
return QString::fromUtf8(record.get().mCreature.c_str());
|
|
|
|
|
return QString::fromUtf8(record.get().mCreature.getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
record2.mCreature = data.toString().toUtf8().constData();
|
|
|
|
|
record2.mCreature = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -2072,7 +2098,7 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
const std::string* string = nullptr;
|
|
|
|
|
const ESM::RefId* string = nullptr;
|
|
|
|
|
|
|
|
|
|
switch (this->mColumnId)
|
|
|
|
|
{
|
|
|
|
@ -2093,35 +2119,35 @@ namespace CSMWorld
|
|
|
|
|
if (!string)
|
|
|
|
|
throw std::logic_error("Unsupported column ID");
|
|
|
|
|
|
|
|
|
|
return QString::fromUtf8(string->c_str());
|
|
|
|
|
return QString::fromUtf8(string->getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
std::string* string = nullptr;
|
|
|
|
|
ESM::RefId* id = nullptr;
|
|
|
|
|
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
switch (this->mColumnId)
|
|
|
|
|
{
|
|
|
|
|
case Columns::ColumnId_CastingObject:
|
|
|
|
|
string = &record2.mCasting;
|
|
|
|
|
id = &record2.mCasting;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_HitObject:
|
|
|
|
|
string = &record2.mHit;
|
|
|
|
|
id = &record2.mHit;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_AreaObject:
|
|
|
|
|
string = &record2.mArea;
|
|
|
|
|
id = &record2.mArea;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_BoltObject:
|
|
|
|
|
string = &record2.mBolt;
|
|
|
|
|
id = &record2.mBolt;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string)
|
|
|
|
|
if (!id)
|
|
|
|
|
throw std::logic_error("Unsupported column ID");
|
|
|
|
|
|
|
|
|
|
*string = data.toString().toUtf8().constData();
|
|
|
|
|
*id = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
@ -2141,56 +2167,56 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
QVariant get(const Record<ESXRecordT>& record) const override
|
|
|
|
|
{
|
|
|
|
|
const std::string* string = nullptr;
|
|
|
|
|
const ESM::RefId* id = nullptr;
|
|
|
|
|
|
|
|
|
|
switch (this->mColumnId)
|
|
|
|
|
{
|
|
|
|
|
case Columns::ColumnId_CastingSound:
|
|
|
|
|
string = &record.get().mCastSound;
|
|
|
|
|
id = &record.get().mCastSound;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_HitSound:
|
|
|
|
|
string = &record.get().mHitSound;
|
|
|
|
|
id = &record.get().mHitSound;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_AreaSound:
|
|
|
|
|
string = &record.get().mAreaSound;
|
|
|
|
|
id = &record.get().mAreaSound;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_BoltSound:
|
|
|
|
|
string = &record.get().mBoltSound;
|
|
|
|
|
id = &record.get().mBoltSound;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string)
|
|
|
|
|
if (!id)
|
|
|
|
|
throw std::logic_error("Unsupported column ID");
|
|
|
|
|
|
|
|
|
|
return QString::fromUtf8(string->c_str());
|
|
|
|
|
return QString::fromUtf8(id->getRefIdString().c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set(Record<ESXRecordT>& record, const QVariant& data) override
|
|
|
|
|
{
|
|
|
|
|
std::string* string = nullptr;
|
|
|
|
|
ESM::RefId* id = nullptr;
|
|
|
|
|
|
|
|
|
|
ESXRecordT record2 = record.get();
|
|
|
|
|
|
|
|
|
|
switch (this->mColumnId)
|
|
|
|
|
{
|
|
|
|
|
case Columns::ColumnId_CastingSound:
|
|
|
|
|
string = &record2.mCastSound;
|
|
|
|
|
id = &record2.mCastSound;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_HitSound:
|
|
|
|
|
string = &record2.mHitSound;
|
|
|
|
|
id = &record2.mHitSound;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_AreaSound:
|
|
|
|
|
string = &record2.mAreaSound;
|
|
|
|
|
id = &record2.mAreaSound;
|
|
|
|
|
break;
|
|
|
|
|
case Columns::ColumnId_BoltSound:
|
|
|
|
|
string = &record2.mBoltSound;
|
|
|
|
|
id = &record2.mBoltSound;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string)
|
|
|
|
|
if (!id)
|
|
|
|
|
throw std::logic_error("Unsupported column ID");
|
|
|
|
|
|
|
|
|
|
*string = data.toString().toUtf8().constData();
|
|
|
|
|
*id = ESM::RefId::stringRefId(data.toString().toUtf8().constData());
|
|
|
|
|
|
|
|
|
|
record.setModified(record2);
|
|
|
|
|
}
|
|
|
|
|