mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-14 00:44:23 -05:00
better item parsing, displaying in char page, needs more work
This commit is contained in:
@@ -110,16 +110,16 @@ EOT;
|
||||
// ddump($c->cData['CharacterStatusDied']);
|
||||
|
||||
|
||||
$statuses = [
|
||||
'Died' => 'CharacterStatusDied',
|
||||
'Expansion' => 'CharacterStatusExpansion',
|
||||
'Hardcore' => 'CharacterStatusHardcore',
|
||||
];
|
||||
$statuses = [
|
||||
'Died' => 'CharacterStatusDied',
|
||||
'Expansion' => 'CharacterStatusExpansion',
|
||||
'Hardcore' => 'CharacterStatusHardcore',
|
||||
];
|
||||
|
||||
$checkboxes = '';
|
||||
foreach ($statuses as $status => $dataKey) {
|
||||
$checked = $c->cData[$dataKey] ? 'checked' : '';
|
||||
$checkboxes .= <<<HTML
|
||||
$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>
|
||||
@@ -129,6 +129,31 @@ foreach ($statuses as $status => $dataKey) {
|
||||
HTML;
|
||||
}
|
||||
|
||||
$items = "<div class='container'><div class='row'>";
|
||||
foreach($c->cData['items'] as $item) {
|
||||
$i = array_filter($item->iData);
|
||||
|
||||
$items .= "<div style='border: 1px solid #ccc;' class='col-md-3'>
|
||||
<p style='font-size: 120%;'>
|
||||
{$i['basename']}<br>
|
||||
<img src='/docs/{$_SESSION['modname']}/img/items/inv{$i['code']}.png'>
|
||||
</p>
|
||||
<ul>
|
||||
<li>Code: {$i['code']}</li>
|
||||
<li>Socketed: {$i['gems_in']}</li>
|
||||
<li>Item Level{$i['ilvl']}</li>
|
||||
<li>Identified: {$i['identified']}</li>
|
||||
<li>Starting Item: {$i['startingItem']}</li>
|
||||
<li>Ethereal: {$i['ethereal']}</li>
|
||||
<li>Quality: {$i['iquality']}</li>
|
||||
<li>Container: {$i['container']}</li>
|
||||
<li>Runeword:{$i['runeword']}</li>
|
||||
</ul>
|
||||
</div>";
|
||||
|
||||
}
|
||||
$items .= "</div></div>";
|
||||
|
||||
|
||||
$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">
|
||||
@@ -226,6 +251,10 @@ $checkboxes
|
||||
$wps
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
$items
|
||||
</div>
|
||||
<!--<input class="btn btn-danger" style="" type="submit" value="Save Character">-->
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user