1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwworld/ptr.cpp

40 lines
644 B
C++
Raw Normal View History

#include "ptr.hpp"
#include <cassert>
2012-03-21 11:48:05 +00:00
#include "containerstore.hpp"
ESM::CellRef& MWWorld::Ptr::getCellRef() const
{
assert (mCellRef);
2012-03-21 11:48:05 +00:00
if (mContainerStore)
mContainerStore->flagAsModified();
return *mCellRef;
}
MWWorld::RefData& MWWorld::Ptr::getRefData() const
{
assert (mRefData);
2012-03-21 11:48:05 +00:00
if (mContainerStore)
mContainerStore->flagAsModified();
return *mRefData;
}
void MWWorld::Ptr::setContainerStore (ContainerStore *store)
{
assert (store);
assert (!mCell);
mContainerStore = store;
}
MWWorld::ContainerStore *MWWorld::Ptr::getContainerStore() const
{
return mContainerStore;
}