mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 08:24:24 -05:00
Item preview upgrade. Debug info/button added. Debug link when click on item pic. Proper descfuncs with sprintf.
This commit is contained in:
@@ -151,8 +151,6 @@ if ($cmd == "getUniqueItem") {
|
||||
|
||||
$counter = 1;
|
||||
foreach ($props as $k => $v) { // for each property Prop1 Prop2
|
||||
$value = $v['par1'] ?? $v['min1'];
|
||||
|
||||
$params = [
|
||||
'string1' => $v['desc']['string1'],
|
||||
'string2' => $v['desc']['string2'],
|
||||
@@ -164,8 +162,13 @@ if ($cmd == "getUniqueItem") {
|
||||
"max" => $return['max' . $counter]
|
||||
];
|
||||
|
||||
|
||||
/*
|
||||
* getDesc should process string1, not file guide copy pasta
|
||||
*
|
||||
*/
|
||||
if (!empty($v['desc'])) {
|
||||
$props[$k]['string'][] = $idesc->getDesc($value, $params);
|
||||
$props[$k]['string'][] = $idesc->getDesc($params);
|
||||
}
|
||||
$counter++;
|
||||
}
|
||||
@@ -176,7 +179,7 @@ if ($cmd == "getUniqueItem") {
|
||||
|
||||
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($return, JSON_INVALID_UTF8_IGNORE);
|
||||
echo json_encode($return, JSON_INVALID_UTF8_IGNORE|JSON_PRETTY_PRINT);
|
||||
}
|
||||
/*
|
||||
* @cmd = sortBy
|
||||
|
Reference in New Issue
Block a user