[General] Make JournalItem consistent with other packet structs

0.6.1
David Cernat 8 years ago
parent 90c594b726
commit 0189dbf916

@ -671,8 +671,8 @@ void LocalPlayer::addJournalItems()
if (!ptrCellStore) continue;
MWWorld::Ptr ptrFound = ptrCellStore->searchExact(journalItem.actorCellRef.mRefID,
journalItem.actorCellRef.mRefNum.mIndex, journalItem.actorCellRef.mMpNum);
MWWorld::Ptr ptrFound = ptrCellStore->searchExact(journalItem.actorRefId,
journalItem.actorRefNumIndex, journalItem.actorMpNum);
if (!ptrFound)
{
@ -1092,8 +1092,9 @@ void LocalPlayer::sendJournalEntry(const std::string& quest, int index, const MW
if (actor.mCell != nullptr)
journalItem.actorCell = *actor.mCell->getCell();
journalItem.actorCellRef.mRefID = actor.getCellRef().getRefId();
journalItem.actorCellRef.mRefNum = actor.getCellRef().getRefNum();
journalItem.actorRefId = actor.getCellRef().getRefId();
journalItem.actorRefNumIndex = actor.getCellRef().getRefNum().mIndex;
journalItem.actorMpNum = actor.getCellRef().getMpNum();
journalChanges.journalItems.push_back(journalItem);

@ -49,7 +49,9 @@ namespace mwmp
};
ESM::Cell actorCell;
ESM::CellRef actorCellRef;
std::string actorRefId;
int actorRefNumIndex;
int actorMpNum;
int type; // 0 - An entire entry, 1 - An index
};

@ -33,8 +33,9 @@ void PacketPlayerJournal::Packet(RakNet::BitStream *bs, bool send)
if (journalItem.type == JournalItem::ENTRY)
{
RW(journalItem.actorCellRef.mRefID, send);
RW(journalItem.actorCellRef.mRefNum.mIndex, send);
RW(journalItem.actorRefId, send);
RW(journalItem.actorRefNumIndex, send);
RW(journalItem.actorMpNum, send);
RW(journalItem.actorCell.mData.mFlags, send);
RW(journalItem.actorCell.mData.mX, send);
RW(journalItem.actorCell.mData.mY, send);

Loading…
Cancel
Save