Improve INFO struct naming

openmw-35
scrawl 10 years ago
parent 4cbb79191f
commit 6367b4dc0b

@ -754,7 +754,7 @@ void Record<ESM::DialInfo>::print()
if (mData.mCell != "") if (mData.mCell != "")
std::cout << " Cell: " << mData.mCell << std::endl; std::cout << " Cell: " << mData.mCell << std::endl;
if (mData.mData.mDisposition > 0) if (mData.mData.mDisposition > 0)
std::cout << " Disposition: " << mData.mData.mDisposition << std::endl; std::cout << " Disposition/Journal index: " << mData.mData.mDisposition << std::endl;
if (mData.mData.mGender != ESM::DialInfo::NA) if (mData.mData.mGender != ESM::DialInfo::NA)
std::cout << " Gender: " << mData.mData.mGender << std::endl; std::cout << " Gender: " << mData.mData.mGender << std::endl;
if (mData.mSound != "") if (mData.mSound != "")

@ -89,7 +89,7 @@ namespace MWDialogue
for (ESM::Dialogue::InfoContainer::const_iterator iter (dialogue->mInfo.begin()); for (ESM::Dialogue::InfoContainer::const_iterator iter (dialogue->mInfo.begin());
iter!=dialogue->mInfo.end(); ++iter) iter!=dialogue->mInfo.end(); ++iter)
if (iter->mData.mDisposition==index) /// \todo cleanup info structure if (iter->mData.mJournalIndex==index)
{ {
return iter->mId; return iter->mId;
} }

@ -75,7 +75,7 @@ namespace MWDialogue
iter!=dialogue->mInfo.end(); ++iter) iter!=dialogue->mInfo.end(); ++iter)
if (iter->mId == entry.mInfoId) if (iter->mId == entry.mInfoId)
{ {
index = iter->mData.mDisposition; /// \todo cleanup info structure index = iter->mData.mJournalIndex;
break; break;
} }

@ -32,7 +32,11 @@ struct DialInfo
struct DATAstruct struct DATAstruct
{ {
int mUnknown1; int mUnknown1;
int mDisposition; union
{
int mDisposition; // Used for dialogue responses
int mJournalIndex; // Used for journal entries
};
signed char mRank; // Rank of NPC signed char mRank; // Rank of NPC
signed char mGender; // See Gender enum signed char mGender; // See Gender enum
signed char mPCrank; // Player rank signed char mPCrank; // Player rank

Loading…
Cancel
Save