mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 21:40:11 +00:00
Fix faction reputation case sensitivity issue (Fixes #2360)
This commit is contained in:
parent
ad8790fba0
commit
b542143e3a
@ -125,6 +125,21 @@ bool MWMechanics::NpcStats::isInFaction (const std::string& faction) const
|
|||||||
return (mFactionRank.find(Misc::StringUtils::lowerCase(faction)) != mFactionRank.end());
|
return (mFactionRank.find(Misc::StringUtils::lowerCase(faction)) != mFactionRank.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MWMechanics::NpcStats::getFactionReputation (const std::string& faction) const
|
||||||
|
{
|
||||||
|
std::map<std::string, int>::const_iterator iter = mFactionReputation.find (Misc::StringUtils::lowerCase(faction));
|
||||||
|
|
||||||
|
if (iter==mFactionReputation.end())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return iter->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MWMechanics::NpcStats::setFactionReputation (const std::string& faction, int value)
|
||||||
|
{
|
||||||
|
mFactionReputation[Misc::StringUtils::lowerCase(faction)] = value;
|
||||||
|
}
|
||||||
|
|
||||||
float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& class_, int usageType,
|
float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& class_, int usageType,
|
||||||
int level, float extraFactor) const
|
int level, float extraFactor) const
|
||||||
{
|
{
|
||||||
@ -329,21 +344,6 @@ void MWMechanics::NpcStats::setBounty (int bounty)
|
|||||||
mBounty = bounty;
|
mBounty = bounty;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MWMechanics::NpcStats::getFactionReputation (const std::string& faction) const
|
|
||||||
{
|
|
||||||
std::map<std::string, int>::const_iterator iter = mFactionReputation.find (faction);
|
|
||||||
|
|
||||||
if (iter==mFactionReputation.end())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return iter->second;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MWMechanics::NpcStats::setFactionReputation (const std::string& faction, int value)
|
|
||||||
{
|
|
||||||
mFactionReputation[faction] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
int MWMechanics::NpcStats::getReputation() const
|
int MWMechanics::NpcStats::getReputation() const
|
||||||
{
|
{
|
||||||
return mReputation;
|
return mReputation;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user