From fde0f20a6f58e0a645e4c81b5a6e6139b56c02fd Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Fri, 26 Jun 2020 11:14:38 +0400 Subject: [PATCH] Fix faction requirement calculations (bug #5499) --- CHANGELOG.md | 1 + apps/openmw/mwmechanics/npcstats.cpp | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a65c25c03..421987e003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ Bug #5479: NPCs who should be walking around town are standing around without walking Bug #5484: Zero value items shouldn't be able to be bought or sold for 1 gold Bug #5490: Hits to carried left slot aren't redistributed if there's no shield equipped + Bug #5499: Faction advance is available when requirements not met Feature #390: 3rd person look "over the shoulder" Feature #2386: Distant Statics in the form of Object Paging Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp index 0e4b3f44cc..1c0c0f17f9 100644 --- a/apps/openmw/mwmechanics/npcstats.cpp +++ b/apps/openmw/mwmechanics/npcstats.cpp @@ -415,7 +415,18 @@ bool MWMechanics::NpcStats::hasSkillsForRank (const std::string& factionId, int if (skills.size() < 2) return true; - return *++iter>=rankData.mSkill2; + iter++; + if (*iter