diff --git a/endpoints/items/items.php b/endpoints/items/items.php index 27dde3f5..88ed9ca8 100644 --- a/endpoints/items/items.php +++ b/endpoints/items/items.php @@ -191,7 +191,7 @@ class ItemsBaseResponse extends TemplateResponse implements ICache /* handle auto-gemming */ /***********************/ - $this->createGemScores($fiForm['gm'] ?? 0); + $this->createGemScores(); /*************************/ @@ -474,7 +474,7 @@ class ItemsBaseResponse extends TemplateResponse implements ICache } // fetch best possible gems for chosen weights - private function createGemScores(int $gemQuality) : void + private function createGemScores() : void { if (!$this->filter->fiSetWeights) return; @@ -485,15 +485,15 @@ class ItemsBaseResponse extends TemplateResponse implements ICache array_push($this->sharedLV['hiddenCols'], 'type', 'source'); - if (!$gemQuality) + if (!$this->filter->values['gm']) return; $this->sharedLV['computeDataFunc'] = '$fi_scoreSockets'; - $q = intVal($gemQuality); + $q = $this->filter->values['gm']; $mask = 0xE; $cnd = [10, ['class', ITEM_CLASS_GEM], ['gemColorMask', &$mask, '&'], ['quality', &$q]]; - if (!isset($fiForm['jc'])) + if (!$this->filter->values['jc']) $cnd[] = ['itemLimitCategory', 0]; // Jeweler's Gems if ($this->filter->wtCnd) @@ -509,7 +509,7 @@ class ItemsBaseResponse extends TemplateResponse implements ICache for ($i = 0; $i < 4; $i++) { $mask = 1 << $i; - $q = !$i ? ITEM_QUALITY_RARE : intVal($gemQuality); // meta gems are always included.. ($q is backReferenced) + $q = !$i ? ITEM_QUALITY_RARE : $this->filter->values['gm']; // meta gems are always included.. ($q is backReferenced) $byColor = new ItemList($cnd, ['extraOpts' => $this->filter->extraOpts]); if (!$byColor->error) {