Allow scripted faction leaving using PCLowerRank (feature #5036)

pull/2380/head
Capostrophic 6 years ago
parent 8920b34b75
commit 555e43855d

@ -115,6 +115,7 @@
Feature #5010: Native graphics herbalism support
Feature #5031: Make GetWeaponType function return different values for tools
Feature #5033: Magic armor mitigation for creatures
Feature #5036: Allow scripted faction leaving
Task #4686: Upgrade media decoder to a more current FFmpeg API
Task #4695: Optimize Distant Terrain memory consumption
Task #4721: Add NMake support to the Windows prebuild script

@ -85,7 +85,9 @@ void MWMechanics::NpcStats::lowerRank(const std::string &faction)
std::map<std::string, int>::iterator it = mFactionRank.find(lower);
if (it != mFactionRank.end())
{
it->second = std::max(0, it->second-1);
it->second = it->second-1;
if (it->second < 0)
mFactionRank.erase(it);
}
}

Loading…
Cancel
Save