diff --git a/spells.php b/spells.php index aad09db..db85592 100644 --- a/spells.php +++ b/spells.php @@ -33,6 +33,11 @@ if (user_logged_in() && is_admin($user_data)) { //if (isset($attributes['id'])) unset($attributes['id']); //if (isset($attributes['conjureId'])) unset($attributes['conjureId']); if (isset($attributes['function'])) unset($attributes['function']); + + // Alias attributes + if (isset($attributes['level'])) $attributes['lvl'] = $attributes['level']; + if (isset($attributes['magiclevel'])) $attributes['maglv'] = $attributes['magiclevel']; + // Populate type attributes foreach (array_keys($attributes) as $attr) { if (!in_array($attr, $type_attr[$type])) @@ -67,6 +72,7 @@ if (user_logged_in() && is_admin($user_data)) { $spells[$type][$name][$att] = (isset($attributes[$att])) ? $attributes[$att] : false; } } + // Sort the spell list properly foreach (array_keys($spells) as $type) { usort($spells[$type], function ($a, $b) { @@ -155,12 +161,16 @@ if ($spells) { ', $names); } - echo implode(',
', $names); } ?> @@ -187,12 +197,16 @@ if ($spells) { Rune image ', $names); } - echo implode(',
', $names); } ?> @@ -200,6 +214,7 @@ if ($spells) { +

Conjure Spells

Jump to top @@ -225,12 +240,16 @@ if ($spells) { @@ -238,6 +257,7 @@ if ($spells) {
Rune image ', $names); } - echo implode(',
', $names); } ?>
Jump to top + @@ -252,6 +272,6 @@ foreach ($spells as $type => $spells) { } // All spell attributes? -'group', 'words', 'lvl', 'maglv', 'charges', 'allowfaruse', 'blocktype', 'mana', 'soul', 'prem', 'aggressive', 'range', 'selftarget', 'needtarget', 'blockwalls', 'needweapon', 'exhaustion', 'groupcooldown', 'needlearn', 'casterTargetOrDirection', 'direction', 'params', 'playernameparam', 'conjureId', 'reagentId', 'conjureCount', 'vocations' +'group', 'words', 'lvl', 'level', 'maglv', 'magiclevel', 'charges', 'allowfaruse', 'blocktype', 'mana', 'soul', 'prem', 'aggressive', 'range', 'selftarget', 'needtarget', 'blockwalls', 'needweapon', 'exhaustion', 'groupcooldown', 'needlearn', 'casterTargetOrDirection', 'direction', 'params', 'playernameparam', 'conjureId', 'reagentId', 'conjureCount', 'vocations' */ include 'layout/overall/footer.php'; ?>