forked from teamnwah/openmw-tes3coop
removed redundant data from quest class
This commit is contained in:
parent
944291d34f
commit
3406d2fa89
2 changed files with 11 additions and 4 deletions
|
@ -78,10 +78,10 @@ namespace MWDialogue
|
||||||
setIndex (index, world);
|
setIndex (index, world);
|
||||||
|
|
||||||
for (TEntryIter iter (mEntries.begin()); iter!=mEntries.end(); ++iter)
|
for (TEntryIter iter (mEntries.begin()); iter!=mEntries.end(); ++iter)
|
||||||
if (iter->mInfoId==entry.mInfoId)
|
if (*iter==entry.mInfoId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mEntries.push_back (entry);
|
mEntries.push_back (entry.mInfoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
Quest::TEntryIter Quest::begin()
|
Quest::TEntryIter Quest::begin()
|
||||||
|
@ -93,4 +93,9 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
return mEntries.end();
|
return mEntries.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JournalEntry Quest::getEntry (const std::string& infoId)
|
||||||
|
{
|
||||||
|
return JournalEntry (mTopic, infoId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,14 +18,14 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef std::vector<JournalEntry> TEntryContainer;
|
typedef std::vector<std::string> TEntryContainer;
|
||||||
typedef TEntryContainer::const_iterator TEntryIter;
|
typedef TEntryContainer::const_iterator TEntryIter;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::string mTopic;
|
std::string mTopic;
|
||||||
int mIndex;
|
int mIndex;
|
||||||
std::vector<JournalEntry> mEntries;
|
TEntryContainer mEntries; // info-IDs
|
||||||
bool mFinished;
|
bool mFinished;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -54,6 +54,8 @@ namespace MWDialogue
|
||||||
|
|
||||||
TEntryIter end();
|
TEntryIter end();
|
||||||
///< Iterator pointing past the end of the journal for this quest.
|
///< Iterator pointing past the end of the journal for this quest.
|
||||||
|
|
||||||
|
JournalEntry getEntry (const std::string& infoId);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue