1 #ifndef GAME_MWWORLD_CELLSTORE_H
2 #define GAME_MWWORLD_CELLSTORE_H
73 std::vector<std::string>
mIds;
122 template<
class Visitor,
class List>
125 for (
typename List::List::iterator iter (list.mList.begin()); iter!=list.mList.end();
137 template<
class Visitor>
191 template <
typename T>
204 std::vector<ESM::ESMReader>& readerList);
216 bool hasId (
const std::string&
id)
const;
258 template<
class Visitor>
285 template<
class Visitor>
308 template <
class T,
class Visitor>
387 void loadRef (
ESM::CellRef& ref,
bool deleted, std::map<ESM::RefNum, std::string>& refNumToID);
467 return mCreatureLists;
540 bool operator== (
const CellStore& left,
const CellStore& right);
541 bool operator!= (
const CellStore& left,
const CellStore& right);
State
Definition: cellstore.hpp:55
Used to create pointers to hold any type of LiveCellRef<> object.
Definition: livecellref.hpp:22
CellStore(const ESM::Cell *cell_, const MWWorld::ESMStore &store, std::vector< ESM::ESMReader > &readerList)
Definition: cellstore.cpp:333
Encapsulated variant of ESM::CellRef with change tracking.
Definition: cellref.hpp:15
static bool isAccessible(const MWWorld::RefData &refdata, const MWWorld::CellRef &cref)
Definition: cellstore.hpp:175
bool forEachType(Visitor &visitor)
Definition: cellstore.hpp:309
LiveCellRefBase * insert(const LiveCellRef< T > *ref)
Definition: cellstore.hpp:192
const MWWorld::ESMStore & mStore
Definition: cellstore.hpp:62
const ESM::Cell * mCell
Definition: cellstore.hpp:70
CellRefList< ESM::Potion > mPotions
Definition: cellstore.hpp:80
const ESM::Cell * getCell() const
Definition: cellstore.cpp:339
bool operator==(const LiveCellRef< X > &ref, int pRefnum)
Definition: cellstore.cpp:207
const CellRefList< ESM::Static > & getReadOnlyStatics() const
Definition: cellstore.hpp:348
CellRefList< ESM::Repair > mRepairs
Definition: cellstore.hpp:96
CellRefList< ESM::Ingredient > mIngreds
Definition: cellstore.hpp:88
Definition: esmreader.hpp:21
void load()
Load references from content file.
Definition: cellstore.cpp:440
float mWaterLevel
Definition: cellstore.hpp:74
Definition: cellstore.hpp:367
float getWaterLevel() const
Definition: cellstore.cpp:422
Definition: fogstate.hpp:19
bool forEach(Visitor &visitor)
Definition: cellstore.hpp:259
bool mHasState
Definition: cellstore.hpp:72
MWWorld::CellRef mRef
Definition: livecellref.hpp:29
MWWorld::Ptr moveTo(const MWWorld::Ptr &object, MWWorld::CellStore *cellToMoveTo)
Definition: cellstore.cpp:240
CellRefList< ESM::Probe > mProbes
Definition: cellstore.hpp:95
void loadRefs()
Definition: cellstore.cpp:519
void updateMergedRefs()
Repopulate mMergedRefs.
Definition: cellstore.cpp:325
CellRefList< ESM::Miscellaneous > mMiscItems
Definition: cellstore.hpp:93
const CellRefList< ESM::Door > & getReadOnlyDoors() const
Definition: cellstore.hpp:344
CellRefList< ESM::Activator > mActivators
Definition: cellstore.hpp:79
Definition: livecellref.hpp:77
State getState() const
Definition: cellstore.cpp:344
bool isExterior() const
Definition: cellstore.cpp:574
bool hasId(const std::string &id) const
Definition: cellstore.cpp:359
bool isDeletedByContentFile() const
Returns true if the object was deleted by a content file.
Definition: refdata.cpp:180
LiveRef & insert(const LiveRef &item)
Definition: cellreflist.hpp:27
Definition: refdata.hpp:29
RefData mData
Definition: livecellref.hpp:32
void moveFrom(const MWWorld::Ptr &object, MWWorld::CellStore *from)
Moves object from the given cell to this cell.
Definition: cellstore.cpp:220
void writeFog(ESM::ESMWriter &writer) const
Definition: cellstore.cpp:695
void saveState(ESM::CellState &state) const
Definition: cellstore.cpp:684
CellRefList< ESM::NPC > mNpcs
Definition: cellstore.hpp:94
Definition: esmwriter.hpp:17
Definition: cellstore.hpp:57
bool forEachConst(Visitor &visitor) const
Definition: cellstore.hpp:286
int count() const
Return total number of references, including deleted ones.
Definition: cellstore.cpp:435
Definition: esmstore.hpp:17
CellRefList< ESM::Clothing > mClothes
Definition: cellstore.hpp:84
void respawn()
Check mLastRespawn and respawn references if necessary. This is a no-op if the cell is not loaded...
Definition: cellstore.cpp:981
void loadRef(ESM::CellRef &ref, bool deleted, std::map< ESM::RefNum, std::string > &refNumToID)
Definition: cellstore.cpp:599
CellRefList< ESM::CreatureLevList > mCreatureLists
Definition: cellstore.hpp:89
int getCount() const
Definition: refdata.cpp:149
ConstPtr searchConst(const std::string &id) const
Definition: cellstore.cpp:394
void listRefs()
Run through references and store IDs.
Definition: cellstore.cpp:463
Ptr search(const std::string &id)
Definition: cellstore.cpp:386
Mutable state of a cell.
Definition: cellstore.hpp:51
std::shared_ptr< ESM::FogState > mFogState
Definition: cellstore.hpp:68
List mList
Definition: cellreflist.hpp:16
bool forEachInternal(Visitor &visitor)
Definition: cellstore.hpp:138
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
CellRefList< ESM::Book > mBooks
Definition: cellstore.hpp:83
bool forEachImp(Visitor &visitor, List &list)
Definition: cellstore.hpp:123
void preload()
Build ID list from content file.
Definition: cellstore.cpp:453
MovedRefTracker mMovedHere
Definition: cellstore.hpp:104
Definition: cellref.hpp:36
Definition: loadcell.hpp:64
CellRefList< ESM::ItemLevList > mItemLists
Definition: cellstore.hpp:90
std::vector< ESM::ESMReader > & mReader
Definition: cellstore.hpp:63
bool hasState() const
Does this cell have state that needs to be stored in a saved game file?
Definition: cellstore.cpp:354
In-game time stamp.
Definition: timestamp.hpp:14
CellRefList< ESM::Static > mStatics
Definition: cellstore.hpp:97
CellRefList< ESM::Creature > mCreatures
Definition: cellstore.hpp:86
ESM::FogState * getFog() const
Definition: cellstore.cpp:940
void loadState(const ESM::CellState &state)
Definition: cellstore.cpp:674
void setWaterLevel(float level)
Definition: cellstore.cpp:429
CellRefList< ESM::Light > mLights
Definition: cellstore.hpp:91
std::vector< std::string > mIds
Definition: cellstore.hpp:73
std::map< LiveCellRefBase *, MWWorld::CellStore * > MovedRefTracker
Definition: cellstore.hpp:101
CellRefList< ESM::Container > mContainers
Definition: cellstore.hpp:85
void readFog(ESM::ESMReader &reader)
Definition: cellstore.cpp:703
Ptr searchInContainer(const std::string &id)
Definition: cellstore.cpp:579
Definition: cellstore.hpp:57
virtual CellStore * getCellStore(const ESM::CellId &cellId)=0
CellRefList< ESM::Weapon > mWeapons
Definition: cellstore.hpp:98
void setFog(ESM::FogState *fog)
Definition: cellstore.cpp:935
CellRefList< ESM::BodyPart > mBodyParts
Definition: cellstore.hpp:99
void rest()
Definition: cellstore.cpp:958
Definition: cellstore.hpp:57
State mState
Definition: cellstore.hpp:71
CellRefList< ESM::Armor > mArmors
Definition: cellstore.hpp:82
Ptr getCurrentPtr(MWWorld::LiveCellRefBase *ref)
Definition: cellstore.cpp:212
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
void readReferences(ESM::ESMReader &reader, const std::map< int, int > &contentFileMap, GetCellStoreCallback *callback)
Definition: cellstore.cpp:744
bool operator!=(const CellStore &left, const CellStore &right)
Definition: cellstore.cpp:930
CellRefList< ESM::Lockpick > mLockpicks
Definition: cellstore.hpp:92
void writeReferences(ESM::ESMWriter &writer) const
Definition: cellstore.cpp:709
Definition: cellid.hpp:11
MWWorld::TimeStamp mLastRespawn
Definition: cellstore.hpp:76
bool hasContentFile() const
Does the RefNum have a content file?
Definition: cellref.cpp:13
CellRefList< ESM::Apparatus > mAppas
Definition: cellstore.hpp:81
Ptr searchViaActorId(int id)
Will return an empty Ptr if cell is not loaded.
Definition: cellstore.cpp:402
std::vector< LiveCellRefBase * > mMergedRefs
Definition: cellstore.hpp:110
CellRefList< ESM::Door > mDoors
Definition: cellstore.hpp:87
MovedRefTracker mMovedToAnotherCell
Definition: cellstore.hpp:107
const std::vector< std::string > & getPreloadedIds() const
Get Ids of objects in this cell, only valid in State_Preloaded.
Definition: cellstore.cpp:349
Definition: cellstate.hpp:16