From efc8b51c8fad872f00802884417a7f6eded967a5 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Tue, 4 Mar 2025 00:29:08 +0100 Subject: [PATCH] Enchantment/Spells * initialize SpellList as null so it can be referenced --- includes/types/enchantment.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/types/enchantment.class.php b/includes/types/enchantment.class.php index 178994ba..6c628071 100644 --- a/includes/types/enchantment.class.php +++ b/includes/types/enchantment.class.php @@ -8,16 +8,16 @@ class EnchantmentList extends BaseType { use listviewHelper; - public static $type = Type::ENCHANTMENT; - public static $brickFile = 'enchantment'; - public static $dataTable = '?_itemenchantment'; + public static $type = Type::ENCHANTMENT; + public static $brickFile = 'enchantment'; + public static $dataTable = '?_itemenchantment'; - private $jsonStats = []; - private SpellList $relSpells; - private $triggerIds = []; + private array $jsonStats = []; + private ?SpellList $relSpells = null; + private array $triggerIds = []; - protected $queryBase = 'SELECT ie.*, ie.id AS ARRAY_KEY FROM ?_itemenchantment ie'; - protected $queryOpts = array( // 502 => Type::ENCHANTMENT + protected $queryBase = 'SELECT ie.*, ie.id AS ARRAY_KEY FROM ?_itemenchantment ie'; + protected $queryOpts = array( // 502 => Type::ENCHANTMENT 'ie' => [['is']], 'is' => ['j' => ['?_item_stats `is` ON `is`.`type` = 502 AND `is`.`typeId` = `ie`.`id`', true], 's' => ', `is`.*'], );