Conflicts filter now returns all plugin CRCs.

Closes #212.
This commit is contained in:
WrinklyNinja
2014-08-17 09:05:10 +01:00
parent 4b71b28180
commit b8281cfffe
2 changed files with 7 additions and 6 deletions
+3 -5
View File
@@ -116,17 +116,15 @@ function getConflictingPluginsFromFilter() {
return loot.query(request).then(function(result){
result = JSON.parse(result);
var plugins = [];
for (var key in result) {
plugins.push(key);
for (var key in result.crcs) {
for (var i = 0; i < loot.game.plugins.length; ++i) {
if (loot.game.plugins[i].name == key) {
loot.game.plugins[i].crc = result[key];
loot.game.plugins[i].crc = result.crcs[key];
break;
}
}
}
return plugins;
return result.conflicts;
}).catch(processCefError);
}
}
+4 -1
View File
@@ -255,16 +255,19 @@ namespace loot {
g_app_state.CurrentGame().LoadPlugins(false);
map<string, uint32_t> conflictingPlugins;
YAML::Node node;
if (pluginIt != g_app_state.CurrentGame().plugins.end()) {
for (const auto& pluginPair : g_app_state.CurrentGame().plugins) {
if (pluginIt->second.DoFormIDsOverlap(pluginPair.second)) {
BOOST_LOG_TRIVIAL(debug) << "Found conflicting plugin: " << pluginPair.second.Name();
conflictingPlugins.emplace(pluginPair.second.Name(), pluginPair.second.Crc());
node["conflicts"].push_back(pluginPair.second.Name());
}
node["crcs"][pluginPair.second.Name()] = pluginPair.second.Crc();
}
}
callback->Success(JSON::stringify(YAML::Node(conflictingPlugins)));
callback->Success(JSON::stringify(node));
return true;
}
else if (requestName == "copyMetadata") {