mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
applying new interface vol.3, inconsistent
This commit is contained in:
parent
86ad7a96f4
commit
e628b23da6
4 changed files with 42 additions and 28 deletions
|
@ -589,10 +589,14 @@ namespace MWDialogue
|
|||
mCompilerContext.setExtensions (&extensions);
|
||||
mDialogueMap.clear();
|
||||
mActorKnownTopics.clear();
|
||||
MWWorld::RecListCaseT<ESM::Dialogue>::MapType dialogueList = MWBase::Environment::get().getWorld()->getStore().dialogs.list;
|
||||
for(MWWorld::RecListCaseT<ESM::Dialogue>::MapType::iterator it = dialogueList.begin(); it!=dialogueList.end();it++)
|
||||
|
||||
const MWWorld::Store<ESM::Dialogue> &dialogs =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>();
|
||||
|
||||
MWWorld::Store<ESM::Dialogue>::iterator it = dialogs.begin();
|
||||
for (; it != dialogs.end(); ++it)
|
||||
{
|
||||
mDialogueMap[toLower(it->first)] = it->second;
|
||||
mDialogueMap[toLower(it->mId)] = *it;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -641,16 +645,17 @@ namespace MWDialogue
|
|||
|
||||
//greeting
|
||||
bool greetingFound = false;
|
||||
//MWWorld::RecListT<ESM::Dialogue>::MapType dialogueList = MWBase::Environment::get().getWorld()->getStore().dialogs.list;
|
||||
MWWorld::RecListCaseT<ESM::Dialogue>::MapType dialogueList = MWBase::Environment::get().getWorld()->getStore().dialogs.list;
|
||||
for(MWWorld::RecListCaseT<ESM::Dialogue>::MapType::iterator it = dialogueList.begin(); it!=dialogueList.end();it++)
|
||||
const MWWorld::Store<ESM::Dialogue> &dialogs =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>();
|
||||
|
||||
MWWorld::Store<ESM::Dialogue>::iterator it = dialogs.begin();
|
||||
for (; it != dialogs.end(); ++it)
|
||||
{
|
||||
ESM::Dialogue ndialogue = it->second;
|
||||
if(ndialogue.mType == ESM::Dialogue::Greeting)
|
||||
if(it->mType == ESM::Dialogue::Greeting)
|
||||
{
|
||||
if (greetingFound) break;
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (it->second.mInfo.begin());
|
||||
iter!=it->second.mInfo.end(); ++iter)
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (it->mInfo.begin());
|
||||
iter!=it->mInfo.end(); ++iter)
|
||||
{
|
||||
if (isMatching (actor, *iter) && functionFilter(mActor,*iter,true))
|
||||
{
|
||||
|
@ -664,7 +669,7 @@ namespace MWDialogue
|
|||
win->addText(iter->mResponse);
|
||||
executeScript(iter->mResultScript);
|
||||
greetingFound = true;
|
||||
mLastTopic = it->first;
|
||||
mLastTopic = it->mId;
|
||||
mLastDialogue = *iter;
|
||||
break;
|
||||
}
|
||||
|
@ -741,22 +746,26 @@ namespace MWDialogue
|
|||
mChoice = -1;
|
||||
mActorKnownTopics.clear();
|
||||
MWGui::DialogueWindow* win = MWBase::Environment::get().getWindowManager()->getDialogueWindow();
|
||||
MWWorld::RecListCaseT<ESM::Dialogue>::MapType dialogueList = MWBase::Environment::get().getWorld()->getStore().dialogs.list;
|
||||
for(MWWorld::RecListCaseT<ESM::Dialogue>::MapType::iterator it = dialogueList.begin(); it!=dialogueList.end();it++)
|
||||
|
||||
const MWWorld::Store<ESM::Dialogue> &dialogs =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>();
|
||||
|
||||
|
||||
MWWordl::Store<ESM::Dialogue>::iterator it = dialogs.begin();
|
||||
for (; it != dialogs.end(); ++it)
|
||||
{
|
||||
ESM::Dialogue ndialogue = it->second;
|
||||
if(ndialogue.mType == ESM::Dialogue::Topic)
|
||||
if(it->mType == ESM::Dialogue::Topic)
|
||||
{
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (it->second.mInfo.begin());
|
||||
iter!=it->second.mInfo.end(); ++iter)
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (it->mInfo.begin());
|
||||
iter!=it->mInfo.end(); ++iter)
|
||||
{
|
||||
if (isMatching (mActor, *iter) && functionFilter(mActor,*iter,true))
|
||||
{
|
||||
mActorKnownTopics.push_back(toLower(it->first));
|
||||
mActorKnownTopics.push_back(toLower(it->mId));
|
||||
//does the player know the topic?
|
||||
if(mKnownTopics.find(toLower(it->first)) != mKnownTopics.end())
|
||||
if(mKnownTopics.find(toLower(it->mId)) != mKnownTopics.end())
|
||||
{
|
||||
keywordList.push_back(it->first);
|
||||
keywordList.push_back(it->mId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,8 @@ namespace MWDialogue
|
|||
|
||||
std::string JournalEntry::idFromIndex (const std::string& topic, int index)
|
||||
{
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (topic);
|
||||
const ESM::Dialogue *dialogue =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>().find (topic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
|
|
@ -18,7 +18,8 @@ namespace MWDialogue
|
|||
|
||||
const std::string Quest::getName() const
|
||||
{
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (mTopic);
|
||||
const ESM::Dialogue *dialogue =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>().find (mTopic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
@ -35,7 +36,8 @@ namespace MWDialogue
|
|||
|
||||
void Quest::setIndex (int index)
|
||||
{
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (mTopic);
|
||||
const ESM::Dialogue *dialogue =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>().find (mTopic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
@ -63,7 +65,8 @@ namespace MWDialogue
|
|||
{
|
||||
int index = -1;
|
||||
|
||||
const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().dialogs.find (entry.mTopic);
|
||||
const ESM::Dialogue *dialogue =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>().find (entry.mTopic);
|
||||
|
||||
for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
|
||||
iter!=dialogue->mInfo.end(); ++iter)
|
||||
|
|
|
@ -116,9 +116,8 @@ namespace MWSound
|
|||
std::string SoundManager::lookup(const std::string &soundId,
|
||||
float &volume, float &min, float &max)
|
||||
{
|
||||
const ESM::Sound *snd = MWBase::Environment::get().getWorld()->getStore().sounds.search(soundId);
|
||||
if(snd == NULL)
|
||||
throw std::runtime_error(std::string("Failed to lookup sound ")+soundId);
|
||||
const ESM::Sound *snd =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Sound>().find(soundId);
|
||||
|
||||
volume *= pow(10.0, (snd->mData.mVolume/255.0*3348.0 - 3348.0) / 2000.0);
|
||||
|
||||
|
@ -424,7 +423,9 @@ namespace MWSound
|
|||
total = 0;
|
||||
}
|
||||
|
||||
const ESM::Region *regn = MWBase::Environment::get().getWorld()->getStore().regions.search(regionName);
|
||||
const ESM::Region *regn =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Region>().search(regionName);
|
||||
|
||||
if (regn == NULL)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue