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

41 lines
638 B
C++

#include "ptr.hpp"
#include <cassert>
#include "containerstore.hpp"
ESM::CellRef& MWWorld::Ptr::getCellRef() const
{
assert(mRef);
if (mContainerStore)
mContainerStore->flagAsModified();
return mRef->mRef;
}
MWWorld::RefData& MWWorld::Ptr::getRefData() const
{
assert(mRef);
if (mContainerStore)
mContainerStore->flagAsModified();
return mRef->mData;
}
void MWWorld::Ptr::setContainerStore (ContainerStore *store)
{
assert (store);
assert (!mCell);
mContainerStore = store;
}
MWWorld::ContainerStore *MWWorld::Ptr::getContainerStore() const
{
return mContainerStore;
}