mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
Correct skill numbers from d2s stream now working
This commit is contained in:
parent
919cbc58e0
commit
7ba575ad1d
@ -146,19 +146,19 @@ foreach ($c->cData['Waypoints'] as $diff => $waypoints) {
|
|||||||
'col' => int 2
|
'col' => int 2
|
||||||
'icon' => int 0
|
'icon' => int 0
|
||||||
*/
|
*/
|
||||||
$skillcounter = 1;
|
// $skillcounter = 1;
|
||||||
foreach ($c->cData['skills']['skills'] as $k => $skill) {
|
// foreach ($c->cData['skills']['skills'] as $k => $skill) {
|
||||||
$skills .= "<input cmd='skills' style='width: 64px;' class='skill-$k skill' name='$skillcounter' type='number' min='0' max='255' value='{$skill['points']}'>: {$skill['skill']}<hr>";
|
// $skills .= "<input cmd='skills' style='width: 64px;' class='skill-$k skill' name='$skillcounter' type='number' min='0' max='255' value='{$skill['points']}'>: {$skill['skill']}<hr>";
|
||||||
$skillcounter++;
|
// $skillcounter++;
|
||||||
}
|
// }
|
||||||
|
|
||||||
$skillsByPage = array();
|
$skillsByPage = array();
|
||||||
foreach ($c->cData['skills']['skills'] as $skill) {
|
foreach ($c->cData['skills']['skills'] as $skNum => $skill) {
|
||||||
$page = $skill['page'];
|
$page = $skill['page'];
|
||||||
if (!isset($skillsByPage[$page])) {
|
if (!isset($skillsByPage[$page])) {
|
||||||
$skillsByPage[$page] = array();
|
$skillsByPage[$page] = array();
|
||||||
}
|
}
|
||||||
$skillsByPage[$page][] = $skill;
|
$skillsByPage[$page][$skNum] = $skill;
|
||||||
}
|
}
|
||||||
|
|
||||||
$skillDivs = '';
|
$skillDivs = '';
|
||||||
@ -177,9 +177,9 @@ foreach ($skillsByPage as $page => $skills) {
|
|||||||
|
|
||||||
$skillDivs .= '<div id="' . $collapseId . '" class="collapse ' . $isExpanded . '" aria-labelledby="' . $headingId . '" data-parent="#accordionExample">';
|
$skillDivs .= '<div id="' . $collapseId . '" class="collapse ' . $isExpanded . '" aria-labelledby="' . $headingId . '" data-parent="#accordionExample">';
|
||||||
$skillDivs .= '<div class="card-body">';
|
$skillDivs .= '<div class="card-body">';
|
||||||
foreach ($skills as $skill) {
|
foreach ($skills as $skillNumber => $skill) {
|
||||||
$skillcounter++;
|
$skillNumber++;
|
||||||
$skillDivs .= "<input cmd='skills' style='width: 64px;' class='skill-$k skill' name='$skillcounter' type='number' min='0' max='255' value='{$skill['points']}'>: {$skill['skill']}<hr>";
|
$skillDivs .= "<input cmd='skills' style='width: 64px;' class='skill-{$skill['id']} skill' name='$skillNumber' type='number' min='0' max='255' value='{$skill['points']}'>: {$skill['skill']}<hr>";
|
||||||
}
|
}
|
||||||
$skillDivs .= '</div>';
|
$skillDivs .= '</div>';
|
||||||
$skillDivs .= '</div>';
|
$skillDivs .= '</div>';
|
||||||
@ -320,49 +320,49 @@ $checkboxes
|
|||||||
<div class="form-row" style="background: #eed;">
|
<div class="form-row" style="background: #eed;">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="strength">Strength:</label>
|
<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>
|
<input type="number" class="form-control" id="strength" name="strength" min="1" max="511" value="{$c->cData['stats']['strength']}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="dexterity">Dexterity:</label>
|
<label for="dexterity">Dexterity:</label>
|
||||||
<input type="number" class="form-control" id="dexterity" name="dexterity" min="1" max="255" value="{$c->cData['stats']['dexterity']}" required>
|
<input type="number" class="form-control" id="dexterity" name="dexterity" min="1" max="511" value="{$c->cData['stats']['dexterity']}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="vitality">Vitality:</label>
|
<label for="vitality">Vitality:</label>
|
||||||
<input type="number" class="form-control" id="vitality" name="vitality" min="1" max="255" value="{$c->cData['stats']['vitality']}" required>
|
<input type="number" class="form-control" id="vitality" name="vitality" min="1" max="511" value="{$c->cData['stats']['vitality']}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="energy">Energy:</label>
|
<label for="energy">Energy:</label>
|
||||||
<input type="number" class="form-control" id="energy" name="energy" min="1" max="255" value="{$c->cData['stats']['energy']}" required>
|
<input type="number" class="form-control" id="energy" name="energy" min="1" max="511" value="{$c->cData['stats']['energy']}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row" style="background: #eee;">
|
<div class="form-row" style="background: #eee;">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="hitpoints">Hitpoints:</label>
|
<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>
|
<input type="number" class="form-control" id="hitpoints" name="hitpoints" min="1" max="2097151" value="{$c->cData['stats']['hitpoints']}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="maxhp">Max HP:</label>
|
<label for="maxhp">Max HP:</label>
|
||||||
<input type="number" class="form-control" id="maxhp" name="maxhp" min="1" max="255" value="{$c->cData['stats']['maxhp']}" required>
|
<input type="number" class="form-control" id="maxhp" name="maxhp" min="1" max="2097151" value="{$c->cData['stats']['maxhp']}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="mana">Mana:</label>
|
<label for="mana">Mana:</label>
|
||||||
<input type="number" class="form-control" id="mana" name="mana" min="1" max="255" value="{$c->cData['stats']['mana']}" required>
|
<input type="number" class="form-control" id="mana" name="mana" min="1" max="2097151" value="{$c->cData['stats']['mana']}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="maxmana">Max Mana:</label>
|
<label for="maxmana">Max Mana:</label>
|
||||||
<input type="number" class="form-control" id="maxmana" name="maxmana" min="1" max="255" value="{$c->cData['stats']['maxmana']}" required>
|
<input type="number" class="form-control" id="maxmana" name="maxmana" min="1" max="" value="{$c->cData['stats']['maxmana']}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row" style="background: #eed;">
|
<div class="form-row" style="background: #eed;">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="stamina">Stamina:</label>
|
<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>
|
<input type="number" class="form-control" id="stamina" name="stamina" min="1" max="2097151" value="{$c->cData['stats']['stamina']}" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="maxstamina">Max Stamina:</label>
|
<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>
|
<input type="number" class="form-control" id="maxstamina" name="maxstamina" min="1" max="2097151" value="{$c->cData['stats']['maxstamina']}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user