[General] Make JournalItem consistent with other packet structs

This commit is contained in:
David Cernat 2017-05-18 10:32:23 +03:00
parent 90c594b726
commit 0189dbf916
3 changed files with 11 additions and 7 deletions

View file

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

View file

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

View file

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