Cube documenter working half way

This commit is contained in:
color.diff=auto
2021-05-10 01:15:44 -06:00
parent e3365ed343
commit 2d504c947f
1043 changed files with 27077 additions and 126 deletions

View File

@@ -3,10 +3,23 @@
class D2ItemData {
public function uniqueItems($index, $doc = FALSE) {
// This is where we get props for each item
$sql = "SELECT * FROM `uniqueitems` WHERE `enabled`='1' AND `index`=\"$index\"";
$res = array_filter(PDO_FetchRow($sql));
$res = (PDO_FetchRow($sql));
/*
*
*
*
* Grag invfile code all 3 item tables wherever it is
*
*
*
*
*
*
*/
if (empty($res['invfile'])) {
@@ -44,7 +57,16 @@ class D2ItemData {
}
// var_dump($return);
// for all props for this unique item, get ISC strings
/*
*
*
*
*
*
*
* for all props for this unique item, get ISC strings
*/
$props = array_filter([
"Prop1" => array_filter(
@@ -80,6 +102,13 @@ class D2ItemData {
]);
// need par, min, max value for each prop
//
//
// ( Also need func1 and val1 for each prop )
//
//
//
//
// for each prop, get stat
$counter = 1;
foreach ($props as $key => $val) {
@@ -87,7 +116,7 @@ class D2ItemData {
// for each propr, get all 7 stats in ISC
$sql = "SELECT stat1,stat2,stat3,stat4,stat5,stat6,stat7 FROM `properties` WHERE `code` = '{$val['prop' . $counter]}'";
$props[$key]['stat'] = PDO_FetchRow($sql);
if (!empty($props[$key]['stat'])){
$props[$key]['stat'] = array_filter($props[$key]['stat']);
}
@@ -107,6 +136,12 @@ class D2ItemData {
$counter = 1;
foreach ($props as $k => $v) { // for each property Prop1 Prop2
// $sql = "SELECT val$counter,func$counter FROM `properties` WHERE `code`=\"{$return['prop' . $counter]}\"";
// $funcval = PDO_FetchRow($sql);
//
// var_dump($funcval);
$params = [
'string1' => $v['desc']['string1'],
'string2' => $v['desc']['string2'],
@@ -116,12 +151,14 @@ class D2ItemData {
"par" => $return['par' . $counter],
"min" => $return['min' . $counter],
"max" => $return['max' . $counter],
// 'item' => $return
// "val1" => $funcval['val1'],
// "func1" => $funcval['func1']
// 'item' => $return
];
/*
* getDesc should process string1, not file guide copy pasta
*
*
*/
if (!empty($v['desc'])) {
require_once 'D2ItemDesc.php';
@@ -148,7 +185,7 @@ class D2ItemData {
}
$return['baseItemInfo'] = $baseItemInfo;
if(!empty($baseItemInfo)){
$return['baseItemInfo'] = array_filter($baseItemInfo);
}
@@ -159,20 +196,20 @@ class D2ItemData {
} else {
return $return;
}
}
function getIscStrings($iscStat) {
$sql = "
SELECT
SELECT
(
SELECT String
FROM itemstatcost as i
LEFT JOIN strings AS `s` ON `i`.descstrpos = `s`.`Key`
WHERE `Stat` = '$iscStat'
)
)
AS string1,
(
SELECT String
@@ -186,27 +223,27 @@ AS string2,
FROM itemstatcost as i
LEFT JOIN strings AS `s` ON `i`.descstrpos = `s`.`Key`
WHERE `Stat` = '$iscStat'
)
)
AS descfunc,
(
SELECT descval
FROM itemstatcost as i
LEFT JOIN strings AS `s` ON `i`.descstrpos = `s`.`Key`
WHERE `Stat` = '$iscStat'
)
AS descval
)
AS descval
";
return PDO_FetchRow($sql);
}
public function genDoc($itemData){
}
public function genDoc($itemData){
}
}