Inheritance: extends Destiny\Model
Ejemplo n.º 1
0
 public function __construct(Advisors $advisors, array $properties)
 {
     $properties['activityTier'] = (new ActivityTierCollection($this, $properties['activityTiers']))->first();
     if (isset($properties['bountyHashes'])) {
         $bounties = [];
         foreach ($properties['bountyHashes'] as $bountyHash) {
             $bounties[] = manifest()->inventoryItem($bountyHash);
         }
         $properties['bounties'] = $bounties;
     }
     if (isset($properties['activityTiers'][0]['activityHash'])) {
         $properties['definition'] = manifest()->activity($properties['activityTiers'][0]['activityHash']);
     }
     if (isset($properties['extended']['skullCategories'])) {
         $skulls = [];
         foreach ($properties['extended']['skullCategories'] as $skullCategory) {
             foreach ($skullCategory['skulls'] as $skull) {
                 $skull = new SkullModifier($skull);
                 $skull->isModifier = $skullCategory['title'] === "Modifiers";
                 $skulls[] = $skull;
             }
         }
         $properties['skulls'] = $skulls;
     }
     parent::__construct($properties);
 }
Ejemplo n.º 2
0
 public function __construct(Advisors $advisors, array $properties)
 {
     if (isset($properties['extended']['orders'])) {
         $items = [];
         foreach ($properties['extended']['orders'] as $order) {
             $items[] = manifest()->inventoryItem($order['item']['itemHash']);
         }
         $properties['weapons'] = $items;
     }
     parent::__construct($properties);
 }
Ejemplo n.º 3
0
 public function __construct(Advisors $advisors, array $properties)
 {
     if ($properties['status']['active']) {
         try {
             $vendorXur = destiny()->xur();
             $properties['xur'] = $vendorXur;
         } catch (\Exception $e) {
             $properties['xur'] = new \Destiny\Xur([]);
         }
     }
     parent::__construct($properties);
 }
Ejemplo n.º 4
0
 public function __construct(Advisors $advisors, array $properties)
 {
     $properties['activityTier'] = (new ActivityTierCollection($this, $properties['activityTiers']))->first();
     if (isset($properties['bountyHashes'])) {
         $bounties = [];
         foreach ($properties['bountyHashes'] as $bountyHash) {
             $bounties[] = manifest()->inventoryItem($bountyHash);
         }
         $properties['bounties'] = $bounties;
     }
     if (isset($properties['activityTiers'][0]['activityHash'])) {
         $properties['definition'] = manifest()->activity($properties['activityTiers'][0]['activityHash']);
     }
     parent::__construct($properties);
 }
Ejemplo n.º 5
0
 public function __construct(Advisors $advisors, array $properties)
 {
     $properties['activityTiers'] = new ActivityTierCollection($this, $properties['activityTiers']);
     $skullsCategories = $properties['activityTiers']->first()['skullCategories'];
     $properties['definition'] = $properties['activityTiers']->first()['definition'];
     if (is_array($skullsCategories)) {
         $skulls = [];
         foreach ($skullsCategories as $skullCategory) {
             foreach ($skullCategory['skulls'] as $skull) {
                 $skull = new SkullModifier($skull);
                 $skull->isModifier = $skullCategory['title'] === "Modifiers";
                 $skulls[] = $skull;
             }
         }
         $properties['skulls'] = $skulls;
     }
     parent::__construct($properties);
 }
Ejemplo n.º 6
0
 public function __construct(Advisors $advisors, array $properties)
 {
     $bounties = [];
     foreach ($properties['bountyHashes'] as $bountyHash) {
         $bounties[] = manifest()->inventoryItem($bountyHash);
     }
     $properties['bounties'] = $bounties;
     $winDetails = [];
     if (isset($properties['extended']['winRewardDetails'])) {
         foreach ($properties['extended']['winRewardDetails'] as $winRewardDetail) {
             foreach ($winRewardDetail['rewardItemHashes'] as $itemHash) {
                 $winDetails[$winRewardDetail['winCount']][] = manifest()->inventoryItem($itemHash);
             }
         }
     }
     $properties['winRewards'] = $winDetails;
     parent::__construct($properties);
 }
 public function __construct(Advisors $advisors, array $properties)
 {
     if (isset($properties['extended']['skullCategories'])) {
         $skulls = [];
         foreach ($properties['extended']['skullCategories'] as $skullCategory) {
             foreach ($skullCategory['skulls'] as $skull) {
                 $skull = new SkullModifier($skull);
                 $skull->isModifier = $skullCategory['title'] === "Modifiers";
                 $skulls[] = $skull;
             }
         }
         $properties['skulls'] = $skulls;
     }
     if (isset($properties['extended']['objectives'])) {
         $objectives = [];
         foreach ($properties['extended']['objectives'] as $objective) {
             $objective = new Objective($objective);
             $objectives[] = $objective;
         }
         $properties['objectives'] = $objectives;
     }
     $properties['activityTiers'] = new ActivityTierCollection($this, $properties['activityTiers']);
     parent::__construct($properties);
 }
 public function __construct(Advisors $advisors, array $properties)
 {
     $properties['activityTiers'] = new ActivityTierCollection($this, $properties['activityTiers']);
     parent::__construct($properties);
 }
Ejemplo n.º 9
0
 public function __construct(Advisors $advisors, array $properties)
 {
     parent::__construct($properties);
 }