mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-14 00:44:23 -05:00
D2S Editor Pretty much finished, seems to be working 100%
This commit is contained in:
@@ -25,15 +25,15 @@ EOT;
|
||||
$quests = '';
|
||||
foreach ($c->cData['Quests'] as $quest) {
|
||||
foreach ($quest as $difficulty => $q) {
|
||||
$quests .= "<h2>$difficulty</h2>";
|
||||
$quests .= "<h2 style='text-align: center'>$difficulty</h2>";
|
||||
|
||||
foreach ($q as $k => $v) {
|
||||
$kD = str_replace("_", " ", $k);
|
||||
$kD = str_replace([" NM", " Hell"], "", $kD);
|
||||
$checked = ($v == 1) ? 'checked' : '';
|
||||
|
||||
$quests .= "<input class='qcheck' diff='$difficulty' type='checkbox' value='1' name='$k' id='$k' $checked>";
|
||||
$quests .= "<label for='$k'>$kD</label><br>";
|
||||
$quests .= "<div class='qcheckgroup' ><input class='qcheck' diff='$difficulty' type='checkbox' value='1' name='$k' id='$k' $checked>";
|
||||
$quests .= "<label for='$k'>$kD</label><br></div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ EOT;
|
||||
//$wps .= "<label style='font-size: 1.3em; color: red;' for='wp_all_off'>Disable All Waypoints</label><hr>";
|
||||
|
||||
foreach ($c->cData['Waypoints'] as $diff => $waypoints) { // diff is difficulty
|
||||
$wps .= "<h2>$diff</h2>";
|
||||
$wps .= "<h2 style='text-align: center'>$diff</h2>";
|
||||
array_pop($waypoints);
|
||||
$wp_count = 0;
|
||||
foreach ($waypoints as $k => $v) {
|
||||
@@ -54,8 +54,8 @@ EOT;
|
||||
$kD = str_replace([" NM", " Hell"], "", $kD);
|
||||
$checked = ($v == 1 && $k != '') ? 'checked ' : '';
|
||||
|
||||
$wps .= "<input diff='$diff' class='wpcheck' type='checkbox' value='1' name='$wp_count' id='$k' $checked>";
|
||||
$wps .= "<label for='$k'>$kD</label><br>";
|
||||
$wps .= "<div class='wcheckgroup' ><input diff='$diff' class='wpcheck' type='checkbox' value='1' name='$wp_count' id='$k' $checked>";
|
||||
$wps .= "<label for='$k'>$kD</label><br></div>";
|
||||
$wp_count++;
|
||||
}
|
||||
}
|
||||
@@ -71,34 +71,35 @@ EOT;
|
||||
}
|
||||
|
||||
$difficulties = [
|
||||
'Normal' => '1',
|
||||
'NM' => '2',
|
||||
'Hell' => '3'
|
||||
'Normal' => '0',
|
||||
'Finished Normal' => '1',
|
||||
'Finished Nightmare' => '2',
|
||||
'Finished Hell' => '3'
|
||||
];
|
||||
|
||||
$radio = '';
|
||||
|
||||
foreach ($difficulties as $difficulty => $id) {
|
||||
$checked = ($c->cData['Difficulty'][$difficulty] == 1) ? 'checked' : '';
|
||||
$radio .= "<input $checked type='radio' id='$difficulty' name='Difficulty' value='$difficulty'>";
|
||||
$radio .= "<input $checked type='radio' id='$difficulty' name='Difficulty' value='$id'>";
|
||||
$radio .= "<label for='$difficulty'>$difficulty</label><br>";
|
||||
}
|
||||
|
||||
|
||||
$skills = '';
|
||||
/*
|
||||
'skills' =>
|
||||
array (size=1)
|
||||
'skills' =>
|
||||
array (size=52)
|
||||
0 =>
|
||||
array (size=7)
|
||||
'id' => int 36
|
||||
'skill' => string 'Fire Bolt' (length=9)
|
||||
'points' => int 0
|
||||
'page' => int 3
|
||||
'row' => int 1
|
||||
'col' => int 2
|
||||
'icon' => int 0
|
||||
/*
|
||||
'skills' =>
|
||||
array (size=1)
|
||||
'skills' =>
|
||||
array (size=52)
|
||||
0 =>
|
||||
array (size=7)
|
||||
'id' => int 36
|
||||
'skill' => string 'Fire Bolt' (length=9)
|
||||
'points' => int 0
|
||||
'page' => int 3
|
||||
'row' => int 1
|
||||
'col' => int 2
|
||||
'icon' => int 0
|
||||
*/
|
||||
$skillcounter = 1;
|
||||
foreach ($c->cData['skills']['skills'] as $k => $skill) {
|
||||
@@ -106,6 +107,29 @@ EOT;
|
||||
$skillcounter++;
|
||||
}
|
||||
|
||||
// ddump($c->cData['CharacterStatusDied']);
|
||||
|
||||
|
||||
$statuses = [
|
||||
'Died' => 'CharacterStatusDied',
|
||||
'Expansion' => 'CharacterStatusExpansion',
|
||||
'Hardcore' => 'CharacterStatusHardcore',
|
||||
];
|
||||
|
||||
$checkboxes = '';
|
||||
foreach ($statuses as $status => $dataKey) {
|
||||
$checked = $c->cData[$dataKey] ? 'checked' : '';
|
||||
$checkboxes .= <<<HTML
|
||||
<div class="col">
|
||||
<div class="form-check">
|
||||
<label class="form-check-label" for="{$status}">{$status}: </label><br>
|
||||
<input class="form-check-input" {$checked} type="checkbox" id="{$status}" name="CharacterStatus[{$status}]" value="{$c->cData[$dataKey]}">
|
||||
</div>
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
|
||||
$tabContent .= <<<EOT
|
||||
<div style="background: white; margin-top: 10px;" class="tab-pane fade" id="{$c->cData['CharacterName']}" role="tabpanel" aria-labelledby="{$c->cData['CharacterName']}-tab">
|
||||
<form id='{$c->cData['CharacterName']}' class="charform {$c->cData['CharacterName']}" method="POST" action="/saveCharacter.php">
|
||||
@@ -122,10 +146,23 @@ EOT;
|
||||
</select><br>
|
||||
Character Level: <input style="border: 1px solid black;width: 54px;" type="number" name="CharacterLevel" id="CharacterLevel" value="{$c->cData['CharacterLevel']}">
|
||||
<hr>
|
||||
<div style="background: #efe;">
|
||||
Difficulty:<br>
|
||||
$radio
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<!--Character Status -->
|
||||
<div class="form-row">
|
||||
$checkboxes
|
||||
<br><br>
|
||||
</div>
|
||||
|
||||
|
||||
<hr>
|
||||
<!-- STATS -->
|
||||
<div class="stats">
|
||||
<div class="form-row">
|
||||
<div class="form-row" style="background: #eed;">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="strength">Strength:</label>
|
||||
<input type="number" class="form-control" id="strength" name="strength" min="1" max="255" value="{$c->cData['stats']['strength']}" required>
|
||||
@@ -144,7 +181,7 @@ EOT;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-row" style="background: #eee;">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="hitpoints">Hitpoints:</label>
|
||||
<input type="number" class="form-control" id="hitpoints" name="hitpoints" min="1" max="255" value="{$c->cData['stats']['hitpoints']}" required>
|
||||
@@ -163,7 +200,7 @@ EOT;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-row" style="background: #eed;">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="stamina">Stamina:</label>
|
||||
<input type="number" class="form-control" id="stamina" name="stamina" min="1" max="255" value="{$c->cData['stats']['stamina']}" required>
|
||||
@@ -172,22 +209,20 @@ EOT;
|
||||
<label for="maxstamina">Max Stamina:</label>
|
||||
<input type="number" class="form-control" id="maxstamina" name="maxstamina" min="1" max="255" value="{$c->cData['stats']['maxstamina']}" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<!--Difficulty:<br>
|
||||
$radio-->
|
||||
<div>
|
||||
<h3>Skills</h3>
|
||||
<div style="background:;">
|
||||
<h3 style="text-align: center">Skills</h3>
|
||||
$skills
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Quests</h3>
|
||||
<h3 style="text-align: center">Quests</h3>
|
||||
$quests
|
||||
</div>
|
||||
<div class="col">
|
||||
<h3>Waypoints</h3>
|
||||
<h3 style="text-align: center">Waypoints</h3>
|
||||
$wps
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user