mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 12:36:03 +00:00
Item preview upgrade. Debug info/button added. Debug link when click on item pic. Proper descfuncs with sprintf.
This commit is contained in:
parent
13568c5b74
commit
21546a57db
@ -151,8 +151,6 @@ if ($cmd == "getUniqueItem") {
|
|||||||
|
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
foreach ($props as $k => $v) { // for each property Prop1 Prop2
|
foreach ($props as $k => $v) { // for each property Prop1 Prop2
|
||||||
$value = $v['par1'] ?? $v['min1'];
|
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
'string1' => $v['desc']['string1'],
|
'string1' => $v['desc']['string1'],
|
||||||
'string2' => $v['desc']['string2'],
|
'string2' => $v['desc']['string2'],
|
||||||
@ -164,8 +162,13 @@ if ($cmd == "getUniqueItem") {
|
|||||||
"max" => $return['max' . $counter]
|
"max" => $return['max' . $counter]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* getDesc should process string1, not file guide copy pasta
|
||||||
|
*
|
||||||
|
*/
|
||||||
if (!empty($v['desc'])) {
|
if (!empty($v['desc'])) {
|
||||||
$props[$k]['string'][] = $idesc->getDesc($value, $params);
|
$props[$k]['string'][] = $idesc->getDesc($params);
|
||||||
}
|
}
|
||||||
$counter++;
|
$counter++;
|
||||||
}
|
}
|
||||||
@ -176,7 +179,7 @@ if ($cmd == "getUniqueItem") {
|
|||||||
|
|
||||||
|
|
||||||
header('Content-Type: application/json');
|
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
|
* @cmd = sortBy
|
||||||
|
Binary file not shown.
BIN
fonts/ExocetHeavy_.ttf
Normal file
BIN
fonts/ExocetHeavy_.ttf
Normal file
Binary file not shown.
BIN
fonts/ExocetLight.ttf
Normal file
BIN
fonts/ExocetLight.ttf
Normal file
Binary file not shown.
57
res/app.js
57
res/app.js
@ -39,6 +39,27 @@
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function syntaxHighlight(json) {
|
||||||
|
json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||||
|
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
|
||||||
|
var cls = 'number';
|
||||||
|
if (/^"/.test(match)) {
|
||||||
|
if (/:$/.test(match)) {
|
||||||
|
cls = 'key';
|
||||||
|
} else {
|
||||||
|
cls = 'string';
|
||||||
|
}
|
||||||
|
} else if (/true|false/.test(match)) {
|
||||||
|
cls = 'boolean';
|
||||||
|
} else if (/null/.test(match)) {
|
||||||
|
cls = 'null';
|
||||||
|
}
|
||||||
|
return '<span class="' + cls + '">' + match + '</span>';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function search() {
|
function search() {
|
||||||
$.get("/ajax/uniqueitems.php?cmd=search&search=" + searchbox.value, function (data) {
|
$.get("/ajax/uniqueitems.php?cmd=search&search=" + searchbox.value, function (data) {
|
||||||
$('.uniqueitems-select').html(data)
|
$('.uniqueitems-select').html(data)
|
||||||
@ -167,24 +188,34 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// cmd = getUniqueItem
|
// cmd = getUniqueItem
|
||||||
$('.uniqueitems-select').change(function () {
|
$('.uniqueitems-select').change(function () {
|
||||||
$(".item").attr("src", "/img/items/1.png");
|
$(".item").attr("src", "/img/items/1.png");
|
||||||
|
$(".item_debug_link").attr('href', "/ajax/uniqueitems.php?cmd=getUniqueItem&index=" + this.value)
|
||||||
$.get("/ajax/uniqueitems.php?cmd=getUniqueItem&index=" + this.value, function (data) {
|
$.get("/ajax/uniqueitems.php?cmd=getUniqueItem&index=" + this.value, function (data) {
|
||||||
|
debugData = (JSON.stringify(data, null, 4));
|
||||||
|
$('.debug, .debug_preview').html(syntaxHighlight(debugData));
|
||||||
props = data.props;
|
props = data.props;
|
||||||
$('.item_desc').html("<p></p>");
|
$('.item_stats div').html("<p></p>");
|
||||||
|
|
||||||
|
|
||||||
|
type = data["*type"];
|
||||||
|
lvlreq = data["lvl req"];
|
||||||
|
|
||||||
|
|
||||||
|
$('.item_stats p').append(`<li class="statindex">${data.index}</li>`);
|
||||||
|
$('.item_stats p').append(`<li class="stattype">${type}</li>`);
|
||||||
|
$('.item_stats p').append(`<li class="statlvlreq">Level Required: ${lvlreq}</li>`);
|
||||||
|
// $('.item_stats p').append(`<li class="index">${data.index}</li>`);
|
||||||
|
// $('.item_stats p').append(`<li class="index">${data.index}</li>`);
|
||||||
|
// $('.item_stats p').append(`<li class="index">${data.index}</li>`);
|
||||||
|
// $('.item_stats p').append(`<li class="index">${data.index}</li>`);
|
||||||
|
|
||||||
|
|
||||||
$.each(props, function (i, v) {
|
$.each(props, function (i, v) {
|
||||||
|
|
||||||
if(v.string){
|
if(v.string){
|
||||||
$('.item_desc p').append('<li class="'+i+'">'+v.string[0]+"</li>");
|
$('.item_stats p').append('<li class="'+i+'">'+v.string[0]+"</li>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -197,10 +228,14 @@ $(document).ready(function () {
|
|||||||
$('select[name="code[]"]').val(v);
|
$('select[name="code[]"]').val(v);
|
||||||
$('select[name="code[]"]').prop('required', '');
|
$('select[name="code[]"]').prop('required', '');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".btnDebug").click(function(){
|
||||||
|
$(".debug_preview").slideToggle();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// cmd = sortBy
|
// cmd = sortBy
|
||||||
$('input[name="sort"]').change(function () {
|
$('input[name="sort"]').change(function () {
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Exocet';
|
font-family: 'ExocetHeavy';
|
||||||
src: url('/fonts/ExocetHeavy.eot');
|
src: url('/fonts/ExocetHeavy.eot');
|
||||||
src: local('Exocet Heavy'), local('ExocetHeavy'),
|
src: local('Exocet Heavy'), local('ExocetHeavy'),
|
||||||
url('/fonts/ExocetHeavy.eot?#iefix') format('embedded-opentype'),
|
url('/fonts/ExocetHeavy.eot?#iefix') format('embedded-opentype'),
|
||||||
@ -52,6 +52,15 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'ExocetLight';
|
||||||
|
src: local('Exocet Light'), local('ExocetLight'),
|
||||||
|
url('/fonts/ExocetLight.ttf') format('truetype');
|
||||||
|
|
||||||
|
font-weight: 900;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Lato';
|
font-family: 'Lato';
|
||||||
src: url('/fonts/Lato-Regular.ttf') format('truetype');
|
src: url('/fonts/Lato-Regular.ttf') format('truetype');
|
||||||
@ -111,8 +120,9 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1,h2,h3,h4,h5,h6, div > p {
|
h1,h2,h3,h4,h5,h6, div > p {
|
||||||
font-family: Exocet;
|
font-family: ExocetLight;
|
||||||
color: #778;
|
color: #778;
|
||||||
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
#loading {
|
#loading {
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
@ -165,25 +175,60 @@ option {
|
|||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
text-align: left;
|
||||||
|
position:absolute;
|
||||||
|
right:282px;
|
||||||
|
}
|
||||||
|
|
||||||
.item_desc {
|
.item_desc {
|
||||||
height: auto;
|
height: 560px;
|
||||||
width: 640px;
|
width: 620px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 110px;
|
left: -80px;
|
||||||
top: 23px;
|
top: 0px;
|
||||||
|
|
||||||
|
/* background: black url(/img/items/bg.png) center top no-repeat;*/
|
||||||
|
|
||||||
text-align: center;
|
background: #333;
|
||||||
background: black;
|
|
||||||
padding: 10px;
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item_desc p {
|
.item_desc p {
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
color: #4169E1;
|
color: #4169E1;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
.item_desc span {
|
||||||
}
|
}
|
||||||
|
|
||||||
ul, li, ul li {
|
ul, li, ul li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debug {
|
||||||
|
height: 800px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }
|
||||||
|
.string { color: green; }
|
||||||
|
.number { color: darkorange; }
|
||||||
|
.boolean { color: blue; }
|
||||||
|
.null { color: magenta; }
|
||||||
|
.key { color: red; }
|
||||||
|
|
||||||
|
.statindex, .stattype{
|
||||||
|
color: #A59263;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: ExocetHeavy;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.statlvlreq {
|
||||||
|
color: white;
|
||||||
}
|
}
|
@ -172,28 +172,33 @@ class D2ItemDesc {
|
|||||||
'19' => 'StrSklTabItem20',
|
'19' => 'StrSklTabItem20',
|
||||||
'20' => 'StrSklTabItem21'
|
'20' => 'StrSklTabItem21'
|
||||||
];
|
];
|
||||||
|
|
||||||
public $charClass = [
|
public $charClass = [
|
||||||
"ama" => "Amazon",
|
"ama" => "Amazon",
|
||||||
"sor" => "Sorceress",
|
"sor" => "Sorceress",
|
||||||
"nec" => "Necromancer",
|
"nec" => "Necromancer",
|
||||||
"pal" => "Paladin",
|
"pal" => "Paladin",
|
||||||
"bar" => "Barbarian",
|
"bar" => "Barbarian",
|
||||||
"dru" => "Druid",
|
"dru" => "Druid",
|
||||||
"ass" => "Assassin"
|
"ass" => "Assassin"
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getDesc($value, $params = []) {
|
public function getDesc($params = []) {
|
||||||
if (empty($params))
|
if (empty($params))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$v = '<span style="font-family: Lato; color: white; font-weight: 900">' . $value . "</span>";
|
|
||||||
$s1 = $params['string1'];
|
$s1 = $params['string1'];
|
||||||
$s2 = $params['string2'];
|
$s2 = $params['string2'];
|
||||||
$prop = $params['prop'];
|
$prop = $params['prop'];
|
||||||
$par = $params['par'];
|
$par = $params['par'];
|
||||||
$min = '<span style="color: white; font-weight: 900">' . $params['min'] . "</span>";
|
$min = (int) $params['min'];
|
||||||
$max = '<span style="color: white; font-weight: 900">' . $params['max'] . "</span>";
|
$v = $min;
|
||||||
|
|
||||||
|
$max = (int) $params['max'];
|
||||||
|
|
||||||
|
if ($min == $max) {
|
||||||
|
$max = '';
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($this->skilltabs as $s) {
|
foreach ($this->skilltabs as $s) {
|
||||||
$sql = "SELECT `String` FROM `strings` WHERE `Key`='$s'";
|
$sql = "SELECT `String` FROM `strings` WHERE `Key`='$s'";
|
||||||
$this->skilltabsDesc[] = PDO_FetchRow($sql);
|
$this->skilltabsDesc[] = PDO_FetchRow($sql);
|
||||||
@ -205,11 +210,23 @@ class D2ItemDesc {
|
|||||||
|
|
||||||
//ddump($this->skilltabsDescClean);
|
//ddump($this->skilltabsDescClean);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Descval 1
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* $format = 'The %s contains %d monkeys';
|
||||||
|
echo sprintf($format, $num, $location);
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
if ($params['descval'] == 1 || $params['descval'] == '') {
|
if ($params['descval'] == 1 || $params['descval'] == '') {
|
||||||
|
|
||||||
if ($params['descfunc'] == 1) {
|
if ($params['descfunc'] == 1) {
|
||||||
$this->str = "+$v $s1";
|
if (!empty($max)) {
|
||||||
|
$max = "-" . $max;
|
||||||
|
}
|
||||||
|
$this->str = "+$min$max $s1";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 2) {
|
if ($params['descfunc'] == 2) {
|
||||||
@ -229,7 +246,7 @@ class D2ItemDesc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 6) {
|
if ($params['descfunc'] == 6) {
|
||||||
$this->str = "+$v $s1 $s2";
|
$this->str = "+$par $s1 $s2";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 7) {
|
if ($params['descfunc'] == 7) {
|
||||||
@ -248,7 +265,7 @@ class D2ItemDesc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 11) {
|
if ($params['descfunc'] == 11) {
|
||||||
$this->str = "Repairs 1 Durability In " . (100 / $value) . " seconds";
|
$this->str = "Repairs 1 Durability In " . (100 / $par) . " seconds";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 12) {
|
if ($params['descfunc'] == 12) {
|
||||||
@ -262,17 +279,18 @@ class D2ItemDesc {
|
|||||||
if ($params['descfunc'] == 14) {
|
if ($params['descfunc'] == 14) {
|
||||||
|
|
||||||
$sql = "SELECT class
|
$sql = "SELECT class
|
||||||
FROM `charstats`
|
FROM `charstats`
|
||||||
WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
||||||
`StrSkillTab2`='{$this->skilltabs[$par]}' OR
|
`StrSkillTab2`='{$this->skilltabs[$par]}' OR
|
||||||
`StrSkillTab3`='{$this->skilltabs[$par]}'";
|
`StrSkillTab3`='{$this->skilltabs[$par]}'";
|
||||||
|
|
||||||
$class = PDO_FetchOne($sql);
|
$class = PDO_FetchOne($sql);
|
||||||
|
$this->str = sprintf($s1, $min, $this->skilltabsDescClean[$par]['String']);
|
||||||
$this->str = "+$min-$max{$this->skilltabsDescClean[$par]['String']} Skill Levels ($class Only)";
|
|
||||||
}
|
}
|
||||||
if ($params['descfunc'] == 15) {
|
if ($params['descfunc'] == 15) {
|
||||||
$this->str = "[chance]% to case [slvl] [skill] on [event]";
|
$sql = "SELECT skill FROM `skills` WHERE `Id`='$par'";
|
||||||
|
$skill = PDO_FetchOne($sql);
|
||||||
|
$this->str = sprintf($s1, $min, $max, $skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 16) {
|
if ($params['descfunc'] == 16) {
|
||||||
@ -292,7 +310,7 @@ WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 20) {
|
if ($params['descfunc'] == 20) {
|
||||||
$this->str = ($v * -1) . "% $s1";
|
$this->str = ($v) . "% $s1";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 21) {
|
if ($params['descfunc'] == 21) {
|
||||||
@ -307,7 +325,11 @@ WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 24) {
|
if ($params['descfunc'] == 24) {
|
||||||
$this->str = "+$v to Skill Charges Or Something";
|
$string = str_replace("\\", "", $s1);
|
||||||
|
$sql = "SELECT skill FROM `skills` WHERE `Id`='$par'";
|
||||||
|
$skill = PDO_FetchOne($sql);
|
||||||
|
$this->str = "+$min to Skill Charges Or Something";
|
||||||
|
$this->str = sprintf("Level $max $skill ".$string,$min,$min);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 25) {
|
if ($params['descfunc'] == 25) {
|
||||||
@ -319,17 +341,28 @@ WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 27) {
|
if ($params['descfunc'] == 27) {
|
||||||
$this->str = "+$v to [skill] ([class] Only)";
|
$sql = "SELECT skill,charclass FROM `skills` WHERE `Id`='$par'";
|
||||||
|
$res = PDO_FetchRow($sql);
|
||||||
|
$this->str = "+$par to a Random Skill";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 28) {
|
if ($params['descfunc'] == 28) {
|
||||||
$sql = "SELECT `skill` FROM `skills` WHERE `skilldesc`='$par'";
|
$sql = "SELECT `skill` FROM `skills` WHERE `skilldesc`='$par'";
|
||||||
$skill = PDO_FetchOne($sql);
|
$skill = PDO_FetchOne($sql);
|
||||||
|
|
||||||
|
|
||||||
$this->str = "+$min to $skill ";
|
$this->str = "+$min to $skill ";
|
||||||
}
|
}
|
||||||
} else if ($params['descval'] == 0) {
|
}
|
||||||
|
/*
|
||||||
|
* Descval 0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/ else if ($params['descval'] == 0) {
|
||||||
if ($params['descfunc'] == 1) {
|
if ($params['descfunc'] == 1) {
|
||||||
$this->str = "$s1";
|
$this->str = "$s1";
|
||||||
}
|
}
|
||||||
@ -432,13 +465,24 @@ WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 27) {
|
if ($params['descfunc'] == 27) {
|
||||||
$this->str = "to [skill] ([class] Only)";
|
$sql = "SELECT skill,charclass FROM `skills` WHERE `Id`='$par'";
|
||||||
|
$res = PDO_FetchRow($sql);
|
||||||
|
$this->str = "+$min to {$res['skill']} ({$this->charClass[$res['charclass']]} Only)";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 28) {
|
if ($params['descfunc'] == 28) {
|
||||||
$this->str = "to [skill] ";
|
$this->str = "to [skill] ";
|
||||||
}
|
}
|
||||||
} else if ($params['descval'] == 2) {
|
}
|
||||||
|
/*
|
||||||
|
* Descval 0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/ else if ($params['descval'] == 2) {
|
||||||
if ($params['descfunc'] == 1) {
|
if ($params['descfunc'] == 1) {
|
||||||
$this->str = "$s1 +$v";
|
$this->str = "$s1 +$v";
|
||||||
}
|
}
|
||||||
@ -491,7 +535,16 @@ WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 14) {
|
if ($params['descfunc'] == 14) {
|
||||||
$this->str = "to [skilltab] Skill Levels ([class] Only) +$v ";
|
|
||||||
|
$sql = "SELECT class
|
||||||
|
FROM `charstats`
|
||||||
|
WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
||||||
|
`StrSkillTab2`='{$this->skilltabs[$par]}' OR
|
||||||
|
`StrSkillTab3`='{$this->skilltabs[$par]}'";
|
||||||
|
|
||||||
|
$class = PDO_FetchOne($sql);
|
||||||
|
|
||||||
|
$this->str = "{$this->skilltabsDescClean[$par]['String']} ($class Only) +$max";
|
||||||
}
|
}
|
||||||
if ($params['descfunc'] == 15) {
|
if ($params['descfunc'] == 15) {
|
||||||
$this->str = "[chance]% to case [slvl] [skill] on [event]";
|
$this->str = "[chance]% to case [slvl] [skill] on [event]";
|
||||||
@ -541,7 +594,9 @@ WHERE `StrSkillTab1`='{$this->skilltabs[$par]}' OR
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 27) {
|
if ($params['descfunc'] == 27) {
|
||||||
$this->str = "+$v to [skill] ([class] Only)";
|
$sql = "SELECT skill,charclass FROM `skills` WHERE `Id`='$par'";
|
||||||
|
$res = PDO_FetchRow($sql);
|
||||||
|
$this->str = "+$min to {$res['skill']} ({$this->charClass[$res['charclass']]} Only)";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['descfunc'] == 28) {
|
if ($params['descfunc'] == 28) {
|
||||||
|
@ -1,43 +1,43 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Copyright (C) 2021 Hash Borgir
|
Copyright (C) 2021 Hash Borgir
|
||||||
|
|
||||||
This file is part of D2Modder
|
This file is part of D2Modder
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with
|
Redistribution and use in source and binary forms, with
|
||||||
or without modification, are permitted provided that the
|
or without modification, are permitted provided that the
|
||||||
following conditions are met:
|
following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above
|
* Redistributions of source code must retain the above
|
||||||
copyright notice, this list of conditions and the
|
copyright notice, this list of conditions and the
|
||||||
following disclaimer.
|
following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above
|
* Redistributions in binary form must reproduce the above
|
||||||
copyright notice, this list of conditions and the
|
copyright notice, this list of conditions and the
|
||||||
following disclaimer in the documentation and/or other
|
following disclaimer in the documentation and/or other
|
||||||
materials provided with the distribution.
|
materials provided with the distribution.
|
||||||
|
|
||||||
* This software must not be used for commercial purposes
|
* This software must not be used for commercial purposes
|
||||||
* without my consent. Any sales or commercial use are prohibited
|
* without my consent. Any sales or commercial use are prohibited
|
||||||
* without my express knowledge and consent.
|
* without my express knowledge and consent.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY!
|
but WITHOUT ANY WARRANTY!
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||||
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<img src="/img/Diablo2.png" style="float:right"><h1 syle="display:inline; font-weight: 900;"><?php echo $title . " " . $version; ?><span style="font-family: Lato !important; font-size: 14px;"> <?php echo " By" . $author ?></span></h1>
|
<img src="/img/Diablo2.png" style="float:right"><h1 syle="display:inline; font-weight: 900;"><?php echo $title . " " . $version; ?><span style="font-family: Lato !important; font-size: 14px;"> <?php echo " By" . $author ?></span></h1>
|
||||||
<div style="font-family: Lato !important; text-align:right; color: tomato">
|
<div style="font-family: Lato !important; text-align:right; color: tomato">
|
||||||
Active Mod: <span style="color: purple"><?php echo $_SESSION['modname'] ?></span>
|
Active Mod: <span style="color: purple"><?php echo $_SESSION['modname'] ?></span>
|
||||||
<span style="color: #8888FF">[<?php echo $_SESSION['path'] ?>]</span>
|
<span style="color: #8888FF">[<?php echo $_SESSION['path'] ?>]</span>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs" id="Tabs" role="tablist">
|
<ul class="nav nav-tabs" id="Tabs" role="tablist">
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
@ -67,7 +67,10 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<a class="nav-link" id="Gem-tab" data-toggle="tab" href="#Gem" role="tab" aria-controls="Set" aria-selected="false">Gems</a>
|
<a class="nav-link" id="Gem-tab" data-toggle="tab" href="#Gem" role="tab" aria-controls="Set" aria-selected="false">Gems</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<a class="nav-link" id="Debug-tab" data-toggle="tab" href="#Debug" role="tab" aria-controls="Set" aria-selected="false">Debug</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -80,6 +83,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="Gem" role="tabpanel" aria-labelledby="Gem-tab">
|
<div class="tab-pane fade" id="Gem" role="tabpanel" aria-labelledby="Gem-tab">
|
||||||
<?php require_once 'tabs/Gems.php'; ?>
|
<?php require_once 'tabs/Gems.php'; ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tab-pane fade" id="Debug" role="tabpanel" aria-labelledby="Debug-tab">
|
||||||
|
<?php require_once 'tabs/Debug.php'; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
6
src/tabs/Debug.php
Normal file
6
src/tabs/Debug.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h2>Debug Output</h2>
|
||||||
|
<pre class="debug"></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,35 +1,7 @@
|
|||||||
<div style="height: 40px; margin: 40px 10px;"><h2>Unique Item Maker</h2></div>
|
<div style="height: 40px; margin: 40px 10px;"><h2>Unique Item Maker</h2></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="offset-4 col"><h3 style="font-family:fixed; font-size:80%;">Preview</h3>
|
<div class="col sortby">
|
||||||
<div class="" style="height: 117px; background: url(/img/items/bg.png) no-repeat">
|
<p style="">Sort By: </p>
|
||||||
<img style="" class="item" src="">
|
|
||||||
<div class="item_desc">
|
|
||||||
<p></p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="row" style="margin-bottom:40px;">
|
|
||||||
<div class="col" style="">
|
|
||||||
<p>Search for Item</p>
|
|
||||||
<input style="border: 1px solid #999; padding: 10px;width: 440px;" id="search" type="text custom-control-inline" placeholder="Search item" name="search">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" style="">
|
|
||||||
<div class="col-5">
|
|
||||||
<select style="height: 260px;padding:10px;margin-bottom: 20px;" name="uniqueitems" class="custom-select uniqueitems-select" multiple>
|
|
||||||
<!--<option value=""></option>-->
|
|
||||||
<?php foreach ($uniqueitems as $u) { ?>
|
|
||||||
<option value="<?php echo $u['index'] ?>"><?php echo $u['index'] ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-7 sortby">
|
|
||||||
<p style="font-family:Exocet;">Sort By: </p>
|
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
<input name="sort" id="sort_0" type="radio" class="custom-control-input" value="lvl">
|
<input name="sort" id="sort_0" type="radio" class="custom-control-input" value="lvl">
|
||||||
<label for="sort_0" class="custom-control-label">Level</label>
|
<label for="sort_0" class="custom-control-label">Level</label>
|
||||||
@ -47,7 +19,7 @@
|
|||||||
<label for="sort_3" class="custom-control-label">Item Code</label>
|
<label for="sort_3" class="custom-control-label">Item Code</label>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<p style="font-family:Exocet;">Filter By: </p>
|
<p style="">Filter By: </p>
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
<div class="custom-control custom-radio custom-control-inline">
|
||||||
<input name="view" id="view_0" type="radio" class="custom-control-input" value="rin">
|
<input name="view" id="view_0" type="radio" class="custom-control-input" value="rin">
|
||||||
<label for="view_0" class="custom-control-label">Rings</label>
|
<label for="view_0" class="custom-control-label">Rings</label>
|
||||||
@ -72,6 +44,45 @@
|
|||||||
<input name="view" id="view_5" type="radio" class="custom-control-input" value="char">
|
<input name="view" id="view_5" type="radio" class="custom-control-input" value="char">
|
||||||
<label for="view_5" class="custom-control-label">Charms</label>
|
<label for="view_5" class="custom-control-label">Charms</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div>
|
||||||
|
<div class="center item_desc" style="">
|
||||||
|
|
||||||
|
<div style="height: 116px;background: url(/img/items/bg.png) center top no-repeat;">
|
||||||
|
<a href="" target="_blank" class="item_debug_link">
|
||||||
|
<img style="" class="item img-fluid" src="">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="item_stats" style="background: #222; margin: 20px; padding: 20px;">
|
||||||
|
<div class=""><p>ITEM PREVIEW</p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<button style="margin: 20px;" class="btn btn-outline-warning btnDebug">Debug Info</button>
|
||||||
|
<pre class="debug_preview" style="display:none; background: #eee; height: 420px;width: 1123px;"></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="margin-bottom:40px;">
|
||||||
|
<div class="col" style="">
|
||||||
|
<p>Search for Item</p>
|
||||||
|
<input style="border: 1px solid #999; padding: 10px;width: 440px;" id="search" type="text custom-control-inline" placeholder="Search item" name="search">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="">
|
||||||
|
<div class="col-5">
|
||||||
|
<select style="height: 160px;padding:10px;margin-bottom: 20px;" name="uniqueitems" class="custom-select uniqueitems-select" multiple>
|
||||||
|
<!--<option value=""></option>-->
|
||||||
|
<?php foreach ($uniqueitems as $u) { ?>
|
||||||
|
<option value="<?php echo $u['index'] ?>"><?php echo $u['index'] ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form action="/index.php" method="post">
|
<form action="/index.php" method="post">
|
||||||
|
Loading…
Reference in New Issue
Block a user