diff --git a/apps/openmw/mwmp/WorldEvent.cpp b/apps/openmw/mwmp/WorldEvent.cpp index 824d57322..1faed8b3d 100644 --- a/apps/openmw/mwmp/WorldEvent.cpp +++ b/apps/openmw/mwmp/WorldEvent.cpp @@ -47,6 +47,20 @@ void WorldEvent::addContainerItem(ContainerItem containerItem) void WorldEvent::sendContainers(MWWorld::CellStore* cellStore) { + MWWorld::CellRefList *containerList = cellStore->getContainers(); + + for (typename MWWorld::CellRefList::List::iterator listIter(containerList->mList.begin()); + listIter != containerList->mList.end(); ++listIter) + { + MWWorld::Ptr container(&*listIter, 0); + + MWWorld::ContainerStore& containerStore = container.getClass().getContainerStore(container); + + for (MWWorld::ContainerStoreIterator storeIter = containerStore.begin(); storeIter != containerStore.end(); ++storeIter) + { + MWWorld::Ptr itemPtr = *storeIter; + } + } } diff --git a/apps/openmw/mwworld/cellstore.cpp b/apps/openmw/mwworld/cellstore.cpp index ffc929c3f..99545a64f 100644 --- a/apps/openmw/mwworld/cellstore.cpp +++ b/apps/openmw/mwworld/cellstore.cpp @@ -491,6 +491,12 @@ namespace MWWorld lastRefNumIndex = value; } + // Added by tes3mp and used to get all the containers in the cell + CellRefList *CellStore::getContainers() + { + return &mContainers; + } + float CellStore::getWaterLevel() const { if (isExterior()) diff --git a/apps/openmw/mwworld/cellstore.hpp b/apps/openmw/mwworld/cellstore.hpp index e32017cd3..d0667520d 100644 --- a/apps/openmw/mwworld/cellstore.hpp +++ b/apps/openmw/mwworld/cellstore.hpp @@ -243,6 +243,9 @@ namespace MWWorld void setLastRefNumIndex(unsigned int value); // Added by tes3mp and used to record the last reference number in the cell + CellRefList *getContainers(); + // Added by tes3mp and used to get all the containers in the cell + float getWaterLevel() const; void setWaterLevel (float level);