diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index e4af9c3b0..311409e78 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -114,6 +114,7 @@ namespace MWGui mwmp::WorldObject worldObject; worldObject.refId = mPtr.getCellRef().getRefId(); worldObject.refNumIndex = mPtr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = mPtr.getCellRef().getMpNum(); MWWorld::Ptr itemPtr = mModel->getItem(mSelectedItem).mBase; @@ -174,6 +175,7 @@ namespace MWGui mwmp::WorldObject worldObject; worldObject.refId = mPtr.getCellRef().getRefId(); worldObject.refNumIndex = mPtr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = mPtr.getCellRef().getMpNum(); MWWorld::Ptr itemPtr = mDragAndDrop->mItem.mBase; @@ -330,6 +332,7 @@ namespace MWGui mwmp::WorldObject worldObject; worldObject.refId = mPtr.getCellRef().getRefId(); worldObject.refNumIndex = mPtr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = mPtr.getCellRef().getMpNum(); worldEvent->addObject(worldObject); mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->setEvent(worldEvent); diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 54fc88799..31033b946 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -70,6 +70,7 @@ namespace MWGui mwmp::WorldObject worldObject; worldObject.refId = dropped.getCellRef().getRefId(); worldObject.refNumIndex = dropped.getCellRef().getRefNum().mIndex; + worldObject.mpNum = 0; worldObject.charge = dropped.getCellRef().getCharge(); // Make sure we send the RefData position instead of the CellRef one, because that's what diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 5ea8fb434..bbbc0ee26 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -650,6 +650,7 @@ namespace MWGui mwmp::WorldObject worldObject; worldObject.refId = object.getCellRef().getRefId(); worldObject.refNumIndex = object.getCellRef().getRefNum().mIndex; + worldObject.mpNum = object.getCellRef().getMpNum(); worldEvent->addObject(worldObject); mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->setEvent(worldEvent); diff --git a/apps/openmw/mwmechanics/security.cpp b/apps/openmw/mwmechanics/security.cpp index aa42a2199..808109907 100644 --- a/apps/openmw/mwmechanics/security.cpp +++ b/apps/openmw/mwmechanics/security.cpp @@ -69,6 +69,7 @@ namespace MWMechanics mwmp::WorldObject worldObject; worldObject.refId = lock.getCellRef().getRefId(); worldObject.refNumIndex = lock.getCellRef().getRefNum().mIndex; + worldObject.mpNum = lock.getCellRef().getMpNum(); worldEvent->addObject(worldObject); mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_UNLOCK)->setEvent(worldEvent); diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index b671600bc..b963f69d5 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -1129,6 +1129,7 @@ void LocalPlayer::clearCurrentContainer() { currentContainer.refId = ""; currentContainer.refNumIndex = 0; + currentContainer.mpNum = 0; } void LocalPlayer::storeCellState(ESM::Cell cell, int stateType) @@ -1158,6 +1159,7 @@ void LocalPlayer::storeCurrentContainer(const MWWorld::Ptr &container, bool loot { currentContainer.refId = container.getCellRef().getRefId(); currentContainer.refNumIndex = container.getCellRef().getRefNum().mIndex; + currentContainer.mpNum = container.getCellRef().getMpNum(); currentContainer.loot = loot; } diff --git a/apps/openmw/mwmp/WorldEvent.cpp b/apps/openmw/mwmp/WorldEvent.cpp index ce35070dc..85079119e 100644 --- a/apps/openmw/mwmp/WorldEvent.cpp +++ b/apps/openmw/mwmp/WorldEvent.cpp @@ -56,6 +56,7 @@ void WorldEvent::sendContainers(MWWorld::CellStore* cellStore) mwmp::WorldObject worldObject; worldObject.refId = container.getCellRef().getRefId(); worldObject.refNumIndex = container.getCellRef().getRefNum().mIndex; + worldObject.mpNum = container.getCellRef().getMpNum(); MWWorld::ContainerStore& containerStore = container.getClass().getContainerStore(container); diff --git a/apps/openmw/mwscript/animationextensions.cpp b/apps/openmw/mwscript/animationextensions.cpp index 17c8de00f..9e6d41d94 100644 --- a/apps/openmw/mwscript/animationextensions.cpp +++ b/apps/openmw/mwscript/animationextensions.cpp @@ -77,6 +77,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = ptr.getCellRef().getRefId(); worldObject.refNumIndex = ptr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = ptr.getCellRef().getMpNum(); worldObject.animGroup = group; worldObject.animMode = mode; worldEvent->addObject(worldObject); diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index f17b2aefb..1f4fa20c6 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -208,6 +208,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = mReference.getCellRef().getRefId(); worldObject.refNumIndex = mReference.getCellRef().getRefNum().mIndex; + worldObject.mpNum = mReference.getCellRef().getMpNum(); worldObject.index = index; worldObject.shortVal = value; worldEvent->addObject(worldObject); @@ -254,6 +255,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = mReference.getCellRef().getRefId(); worldObject.refNumIndex = mReference.getCellRef().getRefNum().mIndex; + worldObject.mpNum = mReference.getCellRef().getMpNum(); worldObject.index = index; worldObject.floatVal = value; worldEvent->addObject(worldObject); diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index f642182bc..9446d7aa4 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -218,6 +218,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = ptr.getCellRef().getRefId(); worldObject.refNumIndex = ptr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = ptr.getCellRef().getMpNum(); worldObject.lockLevel = lockLevel; worldEvent->addObject(worldObject); @@ -265,6 +266,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = ptr.getCellRef().getRefId(); worldObject.refNumIndex = ptr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = ptr.getCellRef().getMpNum(); worldEvent->addObject(worldObject); mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_UNLOCK)->setEvent(worldEvent); @@ -745,6 +747,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = ptr.getCellRef().getRefId(); worldObject.refNumIndex = ptr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = ptr.getCellRef().getMpNum(); worldEvent->addObject(worldObject); mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->setEvent(worldEvent); diff --git a/apps/openmw/mwscript/transformationextensions.cpp b/apps/openmw/mwscript/transformationextensions.cpp index 86bde76da..1c173dbfe 100644 --- a/apps/openmw/mwscript/transformationextensions.cpp +++ b/apps/openmw/mwscript/transformationextensions.cpp @@ -58,6 +58,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = ptr.getCellRef().getRefId(); worldObject.refNumIndex = ptr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = ptr.getCellRef().getMpNum(); worldObject.scale = scale; worldEvent->addObject(worldObject); @@ -562,6 +563,7 @@ namespace MWScript mwmp::WorldObject worldObject; worldObject.refId = ptr.getCellRef().getRefId(); worldObject.refNumIndex = ptr.getCellRef().getRefNum().mIndex; + worldObject.mpNum = 0; worldObject.charge = ptr.getCellRef().getCharge(); worldObject.count = 1; diff --git a/apps/openmw/mwworld/actiontake.cpp b/apps/openmw/mwworld/actiontake.cpp index d00de6004..845d1a363 100644 --- a/apps/openmw/mwworld/actiontake.cpp +++ b/apps/openmw/mwworld/actiontake.cpp @@ -40,6 +40,7 @@ namespace MWWorld mwmp::WorldObject worldObject; worldObject.refId = getTarget().getCellRef().getRefId(); worldObject.refNumIndex = getTarget().getCellRef().getRefNum().mIndex; + worldObject.mpNum = getTarget().getCellRef().getMpNum(); worldEvent->addObject(worldObject); mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->setEvent(worldEvent); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index d1994da89..1b1993fcc 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2330,6 +2330,7 @@ namespace MWWorld mwmp::WorldObject worldObject; worldObject.refId = door.getCellRef().getRefId(); worldObject.refNumIndex = door.getCellRef().getRefNum().mIndex; + worldObject.mpNum = door.getCellRef().getMpNum(); worldObject.doorState = state; worldEvent->addObject(worldObject); @@ -2360,6 +2361,7 @@ namespace MWWorld mwmp::WorldObject worldObject; worldObject.refId = door.getCellRef().getRefId(); worldObject.refNumIndex = door.getCellRef().getRefNum().mIndex; + worldObject.mpNum = door.getCellRef().getMpNum(); worldObject.doorState = state; worldEvent->addObject(worldObject); diff --git a/components/openmw-mp/Base/BasePlayer.hpp b/components/openmw-mp/Base/BasePlayer.hpp index e4a1e04f5..ce2ac9a82 100644 --- a/components/openmw-mp/Base/BasePlayer.hpp +++ b/components/openmw-mp/Base/BasePlayer.hpp @@ -39,6 +39,7 @@ namespace mwmp { std::string refId; int refNumIndex; + int mpNum; bool loot; };