public function __construct(Player $player, array $properties) { parent::__construct($properties); $this->player = $player; $this->cardCollection = new CardStatusCollection($this, $properties['cardCollection']); $this->themeCollection = new ThemeCollection($this, $this->definitions->themeCollection); }
public function __construct(Account $account, array $properties) { // merge characterBase into main array for easier access $properties = array_merge(array_except($properties, ['characterBase']), $properties['characterBase']); parent::__construct($properties); $this->account = $account; }
public function __construct(Player $player, array $properties, array $stats = null) { parent::__construct($properties); $this->player = $player; $this->statistics = new AccountStatistics($this, $stats); $this->characters = (new CharacterCollection($this, $properties['characters']))->sortBy('characterId'); }
public function __construct(Character $character, array $properties, StatisticsCollection $stats = null, Completion $completion) { parent::__construct($properties); $this->character = $character; $this->stats = $stats ?: new StatisticsCollection(); $this->completion = $completion; }
public function __construct(Player $player, array $properties, array $stats = null) { parent::__construct($properties); $this->player = $player; $this->statistics = new AccountStatistics($this, $stats); $properties['characters'] = array_sort($properties['characters'], function ($value) { return $value['characterBase']['characterId']; }); $this->characters = new CharacterCollection($this, $properties['characters']); }
public function __construct(array $properties) { parent::__construct($properties); $this->definition = manifest()->activity($this->activityHash); $this->rounds = $this->newCollection(); foreach ($properties['rounds'] as $k => $round) { $round = new ArenaRound($this, $round); $round->roundNumber = $k + 1; $this->rounds->put($k, $round); } }
public function __construct(array $properties) { $properties['display'] = new Display($properties['display']); if (isset($properties['status'])) { $properties['status'] = new Status($properties['status']); } if (isset($properties['completion'])) { $properties['completion'] = new Completion($properties['completion']); } parent::__construct($properties); }
public function __construct(array $properties) { if (isset($properties['saleItems']) && is_array($properties['saleItems'])) { $items = []; foreach ($properties['saleItems'] as $saleItem) { $items[] = manifest()->inventoryItem($saleItem['item']['itemHash']); } $properties['items'] = $items; } parent::__construct($properties); }
public function __construct(array $properties) { if (isset($properties['saleItemCategories']) && is_array($properties['saleItemCategories'])) { $categories = []; foreach ($properties['saleItemCategories'] as $saleItemCategory) { $categories[$saleItemCategory['categoryIndex']] = new XurCategory($saleItemCategory); } $properties['itemCategories'] = $categories; } parent::__construct($properties); }
public function __construct(Character $character, array $properties) { $items = []; foreach (array_get($properties, 'items', null) as $property) { $hash = (string) $property['itemHash']; $definition = manifest()->inventoryItem($hash); $property = array_merge($property, $definition->getProperties()); $items['buckets'][$property['bucketHash']] = new InventoryItem(new InventoryBucket($this, $properties), $property); } parent::__construct($items); $this->character = $character; }
public function __construct(ActivityTier $arena, array $properties) { parent::__construct($properties); foreach ($properties['skullCategories'] as $skullCategory) { if ($skullCategory['title'] === "Modifiers") { foreach ($skullCategory['skulls'] as $skull) { $skull = new SkullModifier($skull); $this->skulls[] = $skull; } } } }
public function __construct(Character $character, array $properties) { $definition = manifest()->progression($properties['progressionHash']); $properties = array_merge($properties, $definition->getProperties()); parent::__construct($properties); $this->character = $character; if ($this->name == self::WEEKLY_PVE || $this->name == self::WEEKLY_PVP) { if (!$character->playedAfterWeeklyReset) { $this->level = 0; } $this->nextLevelAt = count($this->steps); $this->progressToNextLevel = $this->level; } $this->percentToNextLevel = $this->nextLevelAt ? $this->progressToNextLevel / $this->nextLevelAt * 100 : 100; $this->percentLabel = sprintf("%d / %d", $this->progressToNextLevel, $this->nextLevelAt); if ($this->isMaxed()) { $this->percentToNextLevel = 100; $this->percentLabel = 'MAX'; } }
public function __construct(Grimoire $grimoire, array $properties) { parent::__construct($properties); $this->grimoire = $grimoire; }
public function __construct(array $properties) { parent::__construct($properties); }
public function __construct(Arena $arena, array $properties) { parent::__construct($properties); $this->arena = $arena; }
/** * Advisors constructor. * @param array $properties */ public function __construct(array $properties = []) { $properties['activities'] = new AdvisorActivityCollection($this, $properties['activities']); parent::__construct($properties); }
public function __construct(Account $account, array $properties = null) { parent::__construct($properties ?: []); $this->account = $account; }
public function __construct(array $properties) { parent::__construct($properties); $this->definition = manifest()->sandboxPerk($this->perkHash); }
public function __construct(Character $character, array $properties) { parent::__construct($properties); $this->character = $character; }
public function __construct(Inventory $inventory, array $properties) { parent::__construct($properties); $this->inventory = $inventory; }
public function __construct(array $properties) { $definition = manifest()->specialEvent($properties['eventHash']); $properties = array_merge($properties, $definition->getProperties()); parent::__construct($properties); }
public function __construct(array $properties) { $properties['definition'] = manifest()->activity($properties['activityHash']); $properties['activityData'] = new ActivityData($properties['activityData']); if (isset($properties['extended']['rounds'])) { $rounds = []; foreach ($properties['extended']['rounds'] as $k => $round) { $round = new ArenaRound($this, $round); $round->roundNumber = $k + 1; $rounds[$round->roundNumber] = $round; } $properties['rounds'] = $rounds; } if (isset($properties['rewards'])) { $rewards = []; foreach ($properties['rewards'] as $rewardGroup) { foreach ($rewardGroup['rewardItems'] as $item) { if (!in_array($item['itemHash'], $this->skippedRewards)) { $rewards[] = new Reward($properties['activityData']->displayLevel, $item); } } } $properties['rewards'] = $rewards; } 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['skullCategories'])) { $skulls = []; foreach ($properties['skullCategories'] as $skullCategory) { foreach ($skullCategory['skulls'] as $skull) { $skull = new SkullModifier($skull); $skull->isModifier = $skullCategory['title'] === "Modifiers"; $skulls[] = $skull; } } // Add heroic skull if HM if ($properties['tierDisplayName'] === "Hard") { $skulls[] = $properties['definition']->skulls->first(); } $properties['skulls'] = $skulls; $this->raid = true; } if (isset($properties['completion'])) { $properties['completion'] = new Completion($properties['completion']); } parent::__construct($properties); }