Esempio n. 1
0
void CreatureAttributes::initializeLastingEffects() {
  for (LastingEffect effect : ENUM_ALL(LastingEffect))
    lastingEffects[effect] = GlobalTime(-500);
  for (auto effect : ENUM_ALL(LastingEffect))
    if (body->isIntrinsicallyAffected(effect))
      ++permanentEffects[effect];
}
Esempio n. 2
0
bool CreatureAttributes::considerTimeout(LastingEffect effect, GlobalTime current) {
  if (lastingEffects[effect] > GlobalTime(0) && lastingEffects[effect] <= current) {
    clearLastingEffect(effect);
    if (!isAffected(effect, current))
      return true;
  }
  return false;
}
Esempio n. 3
0
void SpellMap::add(SpellId id) {
  if (!elems[id])
    elems[id] = GlobalTime(-10000);
}
Esempio n. 4
0
void CreatureAttributes::clearLastingEffect(LastingEffect effect) {
  lastingEffects[effect] = GlobalTime(0);
}