Fix dialogue topics displayed in lower case

new-script-api
scrawl 7 years ago
parent f3be39660b
commit 768da57da2

@ -325,8 +325,7 @@ namespace MWDialogue
{ {
if (filter.responseAvailable (*iter)) if (filter.responseAvailable (*iter))
{ {
std::string lower = Misc::StringUtils::lowerCase(iter->mId); mActorKnownTopics.insert (iter->mId);
mActorKnownTopics.insert (lower);
} }
} }
} }
@ -342,7 +341,7 @@ namespace MWDialogue
for (const std::string& topic : mActorKnownTopics) for (const std::string& topic : mActorKnownTopics)
{ {
//does the player know the topic? //does the player know the topic?
if (mKnownTopics.count(Misc::StringUtils::lowerCase(topic))) if (mKnownTopics.count(topic))
keywordList.push_back(topic); keywordList.push_back(topic);
} }

@ -8,6 +8,7 @@
#include <components/compiler/streamerrorhandler.hpp> #include <components/compiler/streamerrorhandler.hpp>
#include <components/translation/translation.hpp> #include <components/translation/translation.hpp>
#include <components/misc/stringops.hpp>
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -22,13 +23,13 @@ namespace MWDialogue
{ {
class DialogueManager : public MWBase::DialogueManager class DialogueManager : public MWBase::DialogueManager
{ {
std::set<std::string> mKnownTopics;// Those are the topics the player knows. std::set<std::string, Misc::StringUtils::CiComp> mKnownTopics;// Those are the topics the player knows.
// Modified faction reactions. <Faction1, <Faction2, Difference> > // Modified faction reactions. <Faction1, <Faction2, Difference> >
typedef std::map<std::string, std::map<std::string, int> > ModFactionReactionMap; typedef std::map<std::string, std::map<std::string, int> > ModFactionReactionMap;
ModFactionReactionMap mChangedFactionReaction; ModFactionReactionMap mChangedFactionReaction;
std::set<std::string> mActorKnownTopics; std::set<std::string, Misc::StringUtils::CiComp> mActorKnownTopics;
Translation::Storage& mTranslationDataStorage; Translation::Storage& mTranslationDataStorage;
MWScript::CompilerContext mCompilerContext; MWScript::CompilerContext mCompilerContext;

Loading…
Cancel
Save