From 8f9acedb8f77d49a1f65498ff09b6c62a48be4c3 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Tue, 23 Dec 2025 21:29:55 +0100 Subject: [PATCH] Items/Enchantments * cleanup list generation for random enchantments * note that rand enchants should be grouped purely by stat type, which requires more work than it is currently worth --- endpoints/item/item.php | 2 ++ template/pages/item.tpl.php | 39 +++++++------------------------------ 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/endpoints/item/item.php b/endpoints/item/item.php index d16b1bcd..e2e59e9e 100644 --- a/endpoints/item/item.php +++ b/endpoints/item/item.php @@ -375,6 +375,8 @@ class ItemBaseResponse extends TemplateResponse implements ICache ); // merge identical stats and names for normal users (e.g. spellPower of a specific school became general spellPower with 3.0) + // see: https://web.archive.org/web/20101118041612/wowhead.com/item=11946 + // stats should also be merged if only the keys are the same, resulting in "+(8 - 9) Spirit" etc. if (!User::isInGroup(U_GROUP_EMPLOYEE)) { diff --git a/template/pages/item.tpl.php b/template/pages/item.tpl.php index e4314d4d..23b1c768 100644 --- a/template/pages/item.tpl.php +++ b/template/pages/item.tpl.php @@ -47,46 +47,21 @@ if ($this->subItems): ?>

- +subItems['data'], ceil(count($this->subItems['data']) / 2)) as $columns): +?>
subItems) > 1): -?> -
- -
-brick('book');