ignore dummy items

This commit is contained in:
Hash Borgir 2023-06-05 23:44:28 -06:00
parent 60b2a7b629
commit 919cbc58e0

View File

@ -114,12 +114,12 @@ class D2Char {
FROM skills as sk FROM skills as sk
LEFT JOIN skilldesc ON sk.skilldesc = skilldesc.skilldesc LEFT JOIN skilldesc ON sk.skilldesc = skilldesc.skilldesc
LEFT JOIN strings on skilldesc.`str name` = strings.Key LEFT JOIN strings on skilldesc.`str name` = strings.Key
WHERE sk.charclass = '$class'"; WHERE sk.charclass = '$class' AND sk.skilldesc != 'dummy'";
$sd = PDO_FetchAll($sql); // Fetch skill data from the database $sd = PDO_FetchAll($sql); // Fetch skill data from the database
foreach ($sd as $k => $v) { foreach ($sd as $k => $v) {
$this->skillData[$k + 1] = $v; $this->skillData[$k + 1] = $v;
} }
return $this->parseChar(); // Call the parseChar() method and return its result return $this->parseChar(); // Call the parseChar() method and return its result
} }
@ -263,7 +263,7 @@ WHERE sk.charclass = '$class'";
$if = strposX($this->data, 'if', 1) + 2; // Find 'if' and skip it $if = strposX($this->data, 'if', 1) + 2; // Find 'if' and skip it
$jm = strposX($this->data, 'JM', 1); $jm = strposX($this->data, 'JM', 1);
$skills = ($this->ByteReader->readc($if, ($jm - $if))); $skills = ($this->ByteReader->readc($if, ($jm - $if)));
$cData = []; // Initialize the result array $cData = []; // Initialize the result array
foreach ($skills as $k => $v) { foreach ($skills as $k => $v) {