engine/creatures/source/CreatureUtils.cpp
// Mark all modifiers for a particular identifier for deletion.
Mark all modifiers for a particular identifier for deletion.
Mark all modifiers for a particular identifier for deletion .
void CreatureUtils::mark_modifiers_for_deletion(CreaturePtr creature, const string& identifier, const StatusRemovalType sr)
{
  if (creature != nullptr && !identifier.empty())
  {
    map<double, vector<pair<string, Modifier>>>& creature_modifiers = creature->get_modifiers_ref();
    for (auto& cm_pair : creature_modifiers)
    {
      vector<pair<string, Modifier>>& modifiers = cm_pair.second;
      for (auto& mod : modifiers)
      {
        if (mod.first == identifier)
        {
          process_creature_modifier(creature, mod, sr);
        }
      }
    }
  }
}
void CreatureUtils :: mark_modifiers_for_deletion ( CreaturePtr creature , const string & identifier , const StatusRemovalType sr ) { if ( creature != nullptr && ! identifier . empty ( ) ) { map < double , vector < pair < string , Modifier > > > & creature_modifiers = creature -> get_modifiers_ref ( ) ; for ( auto & cm_pair : creature_modifiers ) { vector < pair < string , Modifier > > & modifiers = cm_pair . second ; for ( auto & mod : modifiers ) { if ( mod . first == identifier ) { process_creature_modifier ( creature , mod , sr ) ; } } } } }
Mark all modifiers for a particular identifier for deletion.
Mark all modifiers for a particular identifier for deletion .