removed redundant mScript field in ESM::StartScript

celladd
Marc Zinnschlag 10 years ago
parent 3b8d709583
commit bf92d5cde9

@ -1253,7 +1253,7 @@ void Record<ESM::Spell>::print()
template<>
void Record<ESM::StartScript>::print()
{
std::cout << "Start Script: " << mData.mScript << std::endl;
std::cout << "Start Script: " << mData.mId << std::endl;
std::cout << "Start Data: " << mData.mData << std::endl;
}

@ -100,7 +100,7 @@ namespace MWScript
mStore.get<ESM::StartScript>().begin();
iter != mStore.get<ESM::StartScript>().end(); ++iter)
{
scripts.push_back (iter->mScript);
scripts.push_back (iter->mId);
}
// add scripts

@ -364,19 +364,6 @@ namespace MWWorld
inserted.first->second = scpt;
}
template <>
inline void Store<ESM::StartScript>::load(ESM::ESMReader &esm, const std::string &id) {
ESM::StartScript s;
s.load(esm);
s.mId = Misc::StringUtils::toLower(s.mScript);
std::pair<typename Static::iterator, bool> inserted = mStatic.insert(std::make_pair(s.mId, s));
if (inserted.second)
mShared.push_back(&inserted.first->second);
else
inserted.first->second = s;
}
template <>
class Store<ESM::LandTexture> : public StoreBase
{

@ -23,7 +23,7 @@ namespace ESM
hasData = true;
break;
case ESM::FourCC<'N','A','M','E'>::value:
mScript = esm.getHString();
mId = esm.getHString();
hasName = true;
break;
default:
@ -38,7 +38,7 @@ namespace ESM
void StartScript::save(ESMWriter &esm) const
{
esm.writeHNString("DATA", mData);
esm.writeHNString("NAME", mScript);
esm.writeHNString("NAME", mId);
}
}

@ -22,7 +22,7 @@ struct StartScript
static unsigned int sRecordId;
std::string mData;
std::string mId, mScript;
std::string mId;
// Load a record and add it to the list
void load(ESMReader &esm);

Loading…
Cancel
Save