Skip to content

Commit

Permalink
Fixed help topics not working right when multiple factions share an id
Browse files Browse the repository at this point in the history
For example the factions of Default Era and Age of Heroes have the same id's, which caused the faction help topics to have the same id's as well, leading to a faction link on both era pages to lead to the same faction page. Adding an era prefix to the faction topic id's makes them unique and solves the problem.
  • Loading branch information
ln-zookeeper committed Jun 21, 2017
1 parent fbc7652 commit 01b4a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/help/help_impl.cpp
Expand Up @@ -656,7 +656,7 @@ std::vector<topic> generate_faction_topics(const config & era, const bool sort_g
}

const std::string name = f["name"];
const std::string ref_id = faction_prefix + id;
const std::string ref_id = era_prefix + era["id"] + "_" + faction_prefix + id;
topics.emplace_back(name, ref_id, text.str());
}
if (sort_generated)
Expand Down

0 comments on commit 01b4a16

Please sign in to comment.