engine/items/source/InitialItemEquipper.cpp
// Create the creature's inventory based on the items specified in its class.
Create the creature's inventory based on the items specified in its class.
Create the creature ' s inventory based on the items specified in its class .
void InitialItemEquipper::add_inventory_items(CreaturePtr creature, const CreatureGenerationValues& cgv, ActionManager& am)
{
  if (creature)
  {
    ClassManager cm;
    string creature_race = creature->get_race_id();
    ClassPtr current_class = cm.get_class(creature->get_class_id());
    vector<vector<InitialItem>> initial_inventories;
    if (current_class)
    {
      initial_inventories.push_back(current_class->get_initial_inventory());
    }
    initial_inventories.push_back(cgv.get_initial_inventory());
    for (const auto& inv : initial_inventories)
    {
      process_initial_inventory(creature, inv, am);
    }
  }
}
void InitialItemEquipper :: add_inventory_items ( CreaturePtr creature , const CreatureGenerationValues & cgv , ActionManager & am ) { if ( creature ) { ClassManager cm ; string creature_race = creature -> get_race_id ( ) ; ClassPtr current_class = cm . get_class ( creature -> get_class_id ( ) ) ; vector < vector < InitialItem > > initial_inventories ; if ( current_class ) { initial_inventories . push_back ( current_class -> get_initial_inventory ( ) ) ; } initial_inventories . push_back ( cgv . get_initial_inventory ( ) ) ; for ( const auto & inv : initial_inventories ) { process_initial_inventory ( creature , inv , am ) ; } } }
Create the creature's inventory based on the items specified in its class.
Create the creature ' s inventory based on the items specified in its class .