1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-04 00:49:40 +00:00

stop spamming messages

This commit is contained in:
gugus 2012-03-16 17:39:14 +01:00
parent 56a84b6a1a
commit 91801e5cab

View file

@ -157,7 +157,6 @@ namespace MWDialogue
char comp = select.selectRule[4]; char comp = select.selectRule[4];
std::string name = select.selectRule.substr (5); std::string name = select.selectRule.substr (5);
std::string function = select.selectRule.substr(2,2); std::string function = select.selectRule.substr(2,2);
std::cout << "f " <<select.selectRule <<" ";
int ifunction; int ifunction;
std::istringstream iss(function); std::istringstream iss(function);
@ -165,11 +164,10 @@ namespace MWDialogue
switch(ifunction) switch(ifunction)
{ {
case 50://choice case 50://choice
std::cout << "choice";
isAChoice = true; isAChoice = true;
if(choice) if(choice)
{ {
if(!selectCompare(comp,mChoice,select.i)){std::cout << "pbhere"; return false;} if(!selectCompare(comp,mChoice,select.i)) return false;
} }
break; break;
@ -181,7 +179,6 @@ namespace MWDialogue
} }
if(isAChoice) if(isAChoice)
{ {
std::cout << "CHOICEEE!";
return true; return true;
} }
/*if(!choice && !isAChoice) /*if(!choice && !isAChoice)
@ -529,27 +526,16 @@ namespace MWDialogue
for (std::vector<ESM::DialInfo>::const_iterator iter (it->second.mInfo.begin()); for (std::vector<ESM::DialInfo>::const_iterator iter (it->second.mInfo.begin());
iter!=it->second.mInfo.end(); ++iter) iter!=it->second.mInfo.end(); ++iter)
{ {
if(it->first == "anneau")
{
std::cout << iter->response << std::endl;
}
//std::cout << "a";
if (isMatching (actor, *iter) && functionFilter(mActor,*iter,false)) if (isMatching (actor, *iter) && functionFilter(mActor,*iter,false))
{ {
std::cout << "OK";
//std::cout << it->first;
actorKnownTopics[it->first].push_back(*iter); actorKnownTopics[it->first].push_back(*iter);
if(knownTopics.find(toLower(it->first)) != knownTopics.end()) if(knownTopics.find(toLower(it->first)) != knownTopics.end())
{ {
MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow(); MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow();
win->addKeyword(it->first,iter->response); win->addKeyword(it->first,iter->response);
//std::cout << it->first;
//std::cout << "match found!!";
//break;
} }
} }
} }
//std::cout << "b";
} }
} }
//ESMS::RecListT<ESM::Dialogue>::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list; //ESMS::RecListT<ESM::Dialogue>::MapType dialogueList = mEnvironment.mWorld->getStore().dialogs.list;
@ -694,7 +680,6 @@ namespace MWDialogue
if(mChoiceMap.find(answere) != mChoiceMap.end()) if(mChoiceMap.find(answere) != mChoiceMap.end())
{ {
mChoice = mChoiceMap[answere]; mChoice = mChoiceMap[answere];
std::cout << "found1";
std::list<ESM::DialInfo> dials = actorKnownTopics[mLastTopic]; std::list<ESM::DialInfo> dials = actorKnownTopics[mLastTopic];
//bool passedLastDialogue = false; //bool passedLastDialogue = false;
@ -707,13 +692,11 @@ namespace MWDialogue
for(std::list<ESM::DialInfo>::iterator it = iter; it!=actorKnownTopics[mLastTopic].begin();) for(std::list<ESM::DialInfo>::iterator it = iter; it!=actorKnownTopics[mLastTopic].begin();)
{ {
it--; it--;
std::cout << "parsing\n";
if(functionFilter(mActor,*it,true)) if(functionFilter(mActor,*it,true))
{ {
mChoiceMap.clear(); mChoiceMap.clear();
mChoice = -1; mChoice = -1;
mIsInChoice = false; mIsInChoice = false;
std::cout << "2";
MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow(); MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow();
std::string text = it->response; std::string text = it->response;
parseText(text); parseText(text);
@ -725,7 +708,6 @@ namespace MWDialogue
} }
} }
} }
std::cout << "and the ansere is..."<< answere;
} }
void DialogueManager::printError(std::string error) void DialogueManager::printError(std::string error)
@ -740,6 +722,5 @@ namespace MWDialogue
win->askQuestion(question); win->askQuestion(question);
mChoiceMap[question] = choice; mChoiceMap[question] = choice;
mIsInChoice = true; mIsInChoice = true;
std::cout << "choice";
} }
} }