refactor: format all files
This commit is contained in:
@@ -18,9 +18,9 @@ void Mob::addEffect(EffectType effectType, float durationSec) {
|
||||
if (isImmuneTo(effectType))
|
||||
return;
|
||||
if (hasEffect(effectType)) {
|
||||
auto it = std::find_if(m_Effects.begin(), m_Effects.end(), [&effectType](EffectDuration effect){ return effect.first == effectType;});
|
||||
auto it = std::find_if(m_Effects.begin(), m_Effects.end(), [&effectType](EffectDuration effect) { return effect.first == effectType;});
|
||||
EffectDuration& effect = *it;
|
||||
if(effect.second < durationSec)
|
||||
if (effect.second < durationSec)
|
||||
effect.second = durationSec; // setting new duration if it's greater then the actual
|
||||
} else {
|
||||
m_Effects.push_back({ effectType, durationSec });
|
||||
@@ -42,7 +42,7 @@ void Mob::updateEffects(std::uint64_t delta) {
|
||||
}
|
||||
|
||||
bool Mob::hasEffect(EffectType type) {
|
||||
return std::find_if(m_Effects.begin(), m_Effects.end(), [&type](EffectDuration effect){ return effect.first == type;}) != m_Effects.end();
|
||||
return std::find_if(m_Effects.begin(), m_Effects.end(), [&type](EffectDuration effect) { return effect.first == type;}) != m_Effects.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user