forked from mirror/openmw-tes3mp
Fix potential case smashing issue
This commit is contained in:
parent
b4132faaea
commit
77cb438714
1 changed files with 2 additions and 2 deletions
|
@ -312,7 +312,7 @@ namespace MWMechanics
|
|||
|
||||
bool Spells::canUsePower(const std::string &power) const
|
||||
{
|
||||
std::map<std::string, MWWorld::TimeStamp>::const_iterator it = mUsedPowers.find(power);
|
||||
std::map<std::string, MWWorld::TimeStamp>::const_iterator it = mUsedPowers.find(Misc::StringUtils::lowerCase(power));
|
||||
if (it == mUsedPowers.end() || it->second + 24 <= MWBase::Environment::get().getWorld()->getTimeStamp())
|
||||
return true;
|
||||
else
|
||||
|
@ -321,7 +321,7 @@ namespace MWMechanics
|
|||
|
||||
void Spells::usePower(const std::string &power)
|
||||
{
|
||||
mUsedPowers[power] = MWBase::Environment::get().getWorld()->getTimeStamp();
|
||||
mUsedPowers[Misc::StringUtils::lowerCase(power)] = MWBase::Environment::get().getWorld()->getTimeStamp();
|
||||
}
|
||||
|
||||
void Spells::readState(const ESM::SpellState &state)
|
||||
|
|
Loading…
Reference in a new issue