engine/calculators/source/TanningCalculator.cpp
// Calculate the resistances for a tanned item.  This will be based on the
// resistances of the skin itself, as well as on certain skills of the
// tanning creature.
Calculate the resistances for a tanned item.  This will be based on the
resistances of the skin itself, as well as on certain skills of the
tanning creature.
Calculate the resistances for a tanned item . This will be based on the resistances of the skin itself as well as on certain skills of the tanning creature .
Resistances TanningCalculator::calculate_item_resistances(CreaturePtr creature, const Resistances& skin_res)
{
  Resistances item_res;
  item_res.set_all_resistances_to(0.0);
  if (creature != nullptr)
  {
    ResistancesMap res = skin_res.get_resistances_map();
    for (const auto& res_pair : res)
    {
      double res_val = calculate_resistance_value(creature, res_pair.second);
      item_res.set_resistance_value(res_pair.first, res_val);
    }
  }
  return item_res;
}
Resistances TanningCalculator :: calculate_item_resistances ( CreaturePtr creature , const Resistances & skin_res ) { Resistances item_res ; item_res . set_all_resistances_to ( 0.0 ) ; if ( creature != nullptr ) { ResistancesMap res = skin_res . get_resistances_map ( ) ; for ( const auto & res_pair : res ) { double res_val = calculate_resistance_value ( creature , res_pair . second ) ; item_res . set_resistance_value ( res_pair . first , res_val ) ; } } return item_res ; }
Calculate the resistances for a tanned item.
Calculate the resistances for a tanned item .