diff --git a/apps/esmtool/esmtool.cpp b/apps/esmtool/esmtool.cpp index dd9ed648c..06348e949 100644 --- a/apps/esmtool/esmtool.cpp +++ b/apps/esmtool/esmtool.cpp @@ -410,7 +410,6 @@ int load(Arguments& info) { rec = new Creature(); Creature& b = *(Creature*)rec; - b.setID(id); b.load(esm); if(quiet) break; cout << " Name: " << b.name << endl; diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 7270fd22b..8a5b149ff 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -65,7 +65,7 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - return ref->base->mId; + return ref->base->getId(); } void Creature::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 83a94d27d..04ac31f98 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -88,7 +88,7 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - return ref->base->mId; + return ref->base->getId(); } void Npc::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const diff --git a/components/esm/loadcrea.cpp b/components/esm/loadcrea.cpp index 7b84a7f29..259d37b4a 100644 --- a/components/esm/loadcrea.cpp +++ b/components/esm/loadcrea.cpp @@ -2,11 +2,6 @@ namespace ESM { -void Creature::setID(const std::string& id) -{ - mId = id; -} - void Creature::load(ESMReader &esm) { model = esm.getHNString("MODL"); diff --git a/components/esm/loadcrea.hpp b/components/esm/loadcrea.hpp index 3035003cf..348c14b23 100644 --- a/components/esm/loadcrea.hpp +++ b/components/esm/loadcrea.hpp @@ -63,9 +63,6 @@ struct Creature : public Record // Defined in loadcont.hpp InventoryList inventory; - std::string mId; - - void setID(const std::string& id); void load(ESMReader &esm); void save(ESMWriter &esm); diff --git a/components/esm/loadnpc.cpp b/components/esm/loadnpc.cpp index 34b5e69ed..b689ba5e8 100644 --- a/components/esm/loadnpc.cpp +++ b/components/esm/loadnpc.cpp @@ -3,11 +3,6 @@ namespace ESM { -void NPC::setID(const std::string& id) -{ - mId = id; -} - void NPC::load(ESMReader &esm) { npdt52.gold = -10; diff --git a/components/esm/loadnpc.hpp b/components/esm/loadnpc.hpp index 3f8a60304..13ee9ef6d 100644 --- a/components/esm/loadnpc.hpp +++ b/components/esm/loadnpc.hpp @@ -100,10 +100,9 @@ struct NPC : public Record std::string name, model, race, cls, faction, script, hair, head; // body parts - std::string mId; + //std::string mId; // Implementation moved to load_impl.cpp - void setID(const std::string& id); void load(ESMReader &esm); void save(ESMWriter &esm); diff --git a/components/esm/record.hpp b/components/esm/record.hpp index d273b175a..dfecab7b9 100644 --- a/components/esm/record.hpp +++ b/components/esm/record.hpp @@ -64,7 +64,7 @@ public: virtual void load(ESMReader& esm) = 0; virtual void save(ESMWriter& esm) = 0; - std::string getId() { return m_id; } + std::string getId() const { return m_id; } void setId(const std::string& in) { m_id = in; } virtual int getName() = 0; diff --git a/components/esm_store/reclists.hpp b/components/esm_store/reclists.hpp index bc3b676a2..22bb55b52 100644 --- a/components/esm_store/reclists.hpp +++ b/components/esm_store/reclists.hpp @@ -104,7 +104,7 @@ namespace ESMS void load(ESMReader &esm, const std::string &id) { std::string id2 = toLower (id); - list[id2].setID(id2); + list[id2].setId(id2); list[id2].load(esm); }