Skip to content

Commit

Permalink
Better fix for gear item detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Supamiu committed Mar 16, 2021
1 parent 5468a07 commit 201ab4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Lodestone/Parser/ParseCharacter.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private function parseEquipGear()
// get lodestone id
$lodestoneId = $node->find('.db-tooltip__bt_item_detail a')->attr('href');
$explodedLodestoneId = explode('/', $lodestoneId);
$item->ID = trim($explodedLodestoneId[count($explodedLodestoneId) - 1]);
$item->ID = trim($explodedLodestoneId[count($explodedLodestoneId) - 2]);

// get category
// this is a bit buggy for crafters, eg: https://eu.finalfantasyxiv.com/lodestone/character/17650647
Expand All @@ -143,7 +143,7 @@ private function parseEquipGear()
$catSecond = $catData[1] ?? null;
$catName = trim(str_ireplace(['Two-handed', 'One-handed'], null, $catName));
$catName = ucwords(strtolower($catName));
$item->Category = $catName;
$item->Category = $catName;

// get slot from category
$slot = ($i == 0) ? 'MainHand' : $catName;
Expand Down

0 comments on commit 201ab4f

Please sign in to comment.