示例#1
0
 public function getProfile($job = 'ALC', $start_level = 1)
 {
     $options = array_diff(explode(',', \Request::get('options', '')), ['']);
     $gear = Gear::profile($job, $start_level, 5, $options);
     $classjob = ClassJob::get_by_abbr($job);
     $stat_focus = Stat::gear_focus($job);
     $stat_focus_ids = Stat::get_ids($stat_focus, true);
     return view('gear.profile', compact('gear', 'classjob', 'stat_focus', 'stat_focus_ids', 'start_level', 'options'));
 }
示例#2
0
 /**
  * Gear Profile, An overview of all gear based on the parameters
  * @param  string/integer  $job    A string or integer is accepted
  * @param  integer $starting_level [description]
  * @param  integer $level_range   [description]
  * @param  array  $options         [description]
  * @return array  $equipment_list  an array of equipment slots
  */
 public static function profile($job = '', $starting_level = 1, $level_range = 1, $options = [])
 {
     // Get the job, depending on string or id
     $job = is_numeric($job) ? ClassJob::with('en_abbr')->find($job_id) : ClassJob::get_by_abbr($job);
     $job_abbr = $job->en_abbr->term;
     // Slot data
     $slots = Config::get('site.defined_slots');
     // Stat data
     $stat_ids_to_focus = Stat::get_ids(Stat::gear_focus($job_abbr));
     // Get all items
     $items = self::items($job->id, $starting_level - 10, $starting_level + $level_range, array_keys($slots), $stat_ids_to_focus, $options);
     // Sort those items into the appropriate buckets
     $equipment_list = self::organize($items, $job_abbr, $starting_level, $stat_ids_to_focus, $options);
     return $equipment_list;
 }