From 2689fba992a453fbe6b294aef18dbbd599e8159c Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Tue, 1 Apr 2025 23:10:24 +0200 Subject: [PATCH] SpellDetailPage/Source * do not acces sources directly * fixes source display in infobox --- pages/spell.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pages/spell.php b/pages/spell.php index 1f0e0f36..5a711be9 100644 --- a/pages/spell.php +++ b/pages/spell.php @@ -272,10 +272,13 @@ class SpellPage extends GenericPage } // accquisition.. 10: starter spell; 7: discovery - if (isset($this->subject->sources[$this->subject->id][10])) - $infobox[] = Lang::spell('starter'); - else if (isset($this->subject->sources[$this->subject->id][7])) - $infobox[] = Lang::spell('discovered'); + if ($this->subject->getSources($s)) + { + if (in_array(SRC_STARTER, $s)) + $infobox[] = Lang::spell('starter'); + else if (in_array(SRC_DISCOVERY, $s)) + $infobox[] = Lang::spell('discovered'); + } // training cost if ($cost = $this->subject->getField('trainingCost'))