mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 20:06:41 +00:00
Missing const, thanks to jeaye
This commit is contained in:
parent
afafaf73e8
commit
6f3d737498
4 changed files with 5 additions and 5 deletions
|
@ -120,7 +120,7 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWorld ()->getStore ().get<ESM::MagicEffect>().find(effectIt->mEffectID);
|
MWBase::Environment::get().getWorld ()->getStore ().get<ESM::MagicEffect>().find(effectIt->mEffectID);
|
||||||
|
|
||||||
MagicEffectInfo effectInfo;
|
MagicEffectInfo effectInfo;
|
||||||
if (it->second.mName != "")
|
if (!it->second.mName.empty())
|
||||||
effectInfo.mSource = it->second.mName;
|
effectInfo.mSource = it->second.mName;
|
||||||
else
|
else
|
||||||
effectInfo.mSource = getSpellDisplayName(it->first);
|
effectInfo.mSource = getSpellDisplayName(it->first);
|
||||||
|
|
|
@ -343,9 +343,9 @@ namespace MWMechanics
|
||||||
return mLastHitObject;
|
return mLastHitObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreatureStats::canUsePower(const std::string &power)
|
bool CreatureStats::canUsePower(const std::string &power) const
|
||||||
{
|
{
|
||||||
std::map<std::string, MWWorld::TimeStamp>::iterator it = mUsedPowers.find(power);
|
std::map<std::string, MWWorld::TimeStamp>::const_iterator it = mUsedPowers.find(power);
|
||||||
if (it == mUsedPowers.end() || it->second + 24 <= MWBase::Environment::get().getWorld()->getTimeStamp())
|
if (it == mUsedPowers.end() || it->second + 24 <= MWBase::Environment::get().getWorld()->getTimeStamp())
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace MWMechanics
|
||||||
public:
|
public:
|
||||||
CreatureStats();
|
CreatureStats();
|
||||||
|
|
||||||
bool canUsePower (const std::string& power);
|
bool canUsePower (const std::string& power) const;
|
||||||
void usePower (const std::string& power);
|
void usePower (const std::string& power);
|
||||||
|
|
||||||
const Stat<int> & getAttribute(int index) const;
|
const Stat<int> & getAttribute(int index) const;
|
||||||
|
|
|
@ -2030,7 +2030,7 @@ namespace MWWorld
|
||||||
stats.setAttackingOrSpell(false);
|
stats.setAttackingOrSpell(false);
|
||||||
|
|
||||||
std::string selectedSpell = stats.getSpells().getSelectedSpell();
|
std::string selectedSpell = stats.getSpells().getSelectedSpell();
|
||||||
std::string sourceName = "";
|
std::string sourceName;
|
||||||
if (!selectedSpell.empty())
|
if (!selectedSpell.empty())
|
||||||
{
|
{
|
||||||
const ESM::Spell* spell = getStore().get<ESM::Spell>().search(selectedSpell);
|
const ESM::Spell* spell = getStore().get<ESM::Spell>().search(selectedSpell);
|
||||||
|
|
Loading…
Reference in a new issue