[Client] Use mpNum for every WorldObject

0.6.1
David Cernat 8 years ago
parent 82f38dcfad
commit 2bd81c3de0

@ -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);

@ -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

@ -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);

@ -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);

@ -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;
}

@ -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);

@ -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);

@ -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);

@ -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);

@ -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;

@ -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);

@ -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);

@ -39,6 +39,7 @@ namespace mwmp
{
std::string refId;
int refNumIndex;
int mpNum;
bool loot;
};

Loading…
Cancel
Save