summaryrefslogtreecommitdiff
path: root/src/statuseffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/statuseffect.cpp')
-rw-r--r--src/statuseffect.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index d4083eac4..16936ec2b 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -115,9 +115,10 @@ int StatusEffect::blockEffectIndexToEffectIndex(const int blockIndex)
}
StatusEffect *StatusEffect::getStatusEffect(const int index,
- const bool enabling)
+ const Enable enabling)
{
- std::map<int, StatusEffect *> &effects = statusEffects[enabling];
+ std::map<int, StatusEffect *> &effects
+ = statusEffects[enabling == Enable_true];
const std::map<int, StatusEffect *>::iterator it = effects.find(index);
if (it != effects.end())
return (*it).second;
@@ -125,9 +126,11 @@ StatusEffect *StatusEffect::getStatusEffect(const int index,
return nullptr;
}
-StatusEffect *StatusEffect::getStunEffect(const int index, const bool enabling)
+StatusEffect *StatusEffect::getStunEffect(const int index,
+ const Enable enabling)
{
- std::map<int, StatusEffect *> &effects = stunEffects[enabling];
+ std::map<int, StatusEffect *> &effects
+ = stunEffects[enabling == Enable_true];
const std::map<int, StatusEffect *>::iterator it = effects.find(index);
if (it != effects.end())
return (*it).second;