Skip to content

Commit 201ab4f

Browse files
committed
Better fix for gear item detection
1 parent 5468a07 commit 201ab4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/Lodestone/Parser/ParseCharacter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function parseEquipGear()
131131
// get lodestone id
132132
$lodestoneId = $node->find('.db-tooltip__bt_item_detail a')->attr('href');
133133
$explodedLodestoneId = explode('/', $lodestoneId);
134-
$item->ID = trim($explodedLodestoneId[count($explodedLodestoneId) - 1]);
134+
$item->ID = trim($explodedLodestoneId[count($explodedLodestoneId) - 2]);
135135

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

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

0 commit comments

Comments
 (0)